Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 1.69 KB

File metadata and controls

27 lines (20 loc) · 1.69 KB

Init

Initiate TrezorConnect

const result = await TrezorConnect.init(params);

Params

init type

  • manifest - required Object of type [Manifest](https://github.com/trezor/trezor-suite/blob/develop/packages/connect/src/types/settings.ts#L3),
  • connectSrc - optional string. Set custom src for TrezorConnect iframe.
  • debug - optional boolean, default false. Prints debug logs.
  • transportReconnect - optional boolean, default true. If transport dies during lifecycle of application, this field decides whether TrezorConnect tries to reestablish connection with transport layer.
  • pendingTransportEvent - optional boolean, default true. Postpone emitting TRANSPORT.START event to the moment when connected device becomes available.
  • interactionTimeout - optional number, default 600. Time in seconds after which popup automatically closes.
  • lazyLoad - optional boolean, default false. Postpone iframe creation until TrezorConnect is called for the first time.
  • popup - optional boolean, default true. Projects running on trusted domains (trezor.io) are not required to use popup. For other domains this option is ignored.
  • transports — _optional '(BridgeTransport' | 'WebUsbTransport | 'NodeUsbTransport')[]', Array of transports that should be use. If not provided, TrezorConnect will chose a reasonable default based on your environment.
  • webusbdeprecated boolean, default true. Allow webusb. Deprecated, you should use transports instead.

Result

TrezorConnect.init returns Promise<void>