Skip to content

@keymaster/connect / KeymasterConnectOptions

Interface: KeymasterConnectOptions ​

Configuration for KeymasterConnectClient.

Properties overview ​

PropertyTypeRequiredDescription
targetOriginstringYesExact Keymaster deployment origin supplied by the host application.
mode?KeymasterConnectModeNopopup for direct integrations; appView for apps launched by Keymaster.
popupPath?stringNoSession Window path relative to targetOrigin.
popupName?stringNoBrowser window name reused by direct integrations.
popupWidth?numberNo—
popupHeight?numberNo—
readyTimeoutMs?numberNoMaximum wait for a popup-mode ready message.
requestTimeoutMs?numberNoDefault request timeout.
closePollMs?numberNoSession Window close detection interval.
onEvent?(event) => voidNo接收当前精确订阅频道上的已验签 Channel 事件。
onStateChange?(state) => voidNoReceives transport lifecycle changes.
environment?KeymasterBrowserEnvironmentNoOptional browser adapter, normally only supplied by tests.

Properties ​

targetOrigin ​

targetOrigin: string

Exact Keymaster deployment origin supplied by the host application.


mode? ​

optional mode?: KeymasterConnectMode

popup for direct integrations; appView for apps launched by Keymaster.


popupPath? ​

optional popupPath?: string

Session Window path relative to targetOrigin.


popupName? ​

optional popupName?: string

Browser window name reused by direct integrations.


popupWidth? ​

optional popupWidth?: number


popupHeight? ​

optional popupHeight?: number


readyTimeoutMs? ​

optional readyTimeoutMs?: number

Maximum wait for a popup-mode ready message. Defaults to 30 seconds.


requestTimeoutMs? ​

optional requestTimeoutMs?: number

Default request timeout. Defaults to two minutes.


closePollMs? ​

optional closePollMs?: number

Session Window close detection interval. Defaults to 500ms.


onEvent? ​

optional onEvent?: (event) => void

接收当前精确订阅频道上的已验签 Channel 事件。

Parameters ​

event ​

ProtocolEventMessage

Returns ​

void


onStateChange? ​

optional onStateChange?: (state) => void

Receives transport lifecycle changes.

Parameters ​

state ​

KeymasterConnectState

Returns ​

void


environment? ​

optional environment?: KeymasterBrowserEnvironment

Optional browser adapter, normally only supplied by tests.

使用能力,不托管私钥。