mirror of
https://github.com/trezor/trezor-suite.git
synced 2026-03-22 23:27:18 +01:00
1.7 KiB
1.7 KiB
Init
Initiate TrezorConnect
const result = await TrezorConnect.init(params);
Params
manifest- requiredObjectof type[Manifest](https://github.com/trezor/trezor-suite/blob/develop/packages/connect/src/types/settings.ts#L3),connectSrc- optionalstring. Set custom src for TrezorConnect iframe.debug- optionalboolean, defaultfalse. Prints debug logs.transportReconnect- optionalboolean, defaulttrue. If transport dies during lifecycle of application, this field decides whether TrezorConnect tries to reestablish connection with transport layer.pendingTransportEvent- optionalboolean, defaulttrue. Postpone emitting TRANSPORT.START event to the moment when connected device becomes available.interactionTimeout- optionalnumber, default600. Time in seconds after which popup automatically closes.lazyLoad- optionalboolean, defaultfalse. Postpone iframe creation until TrezorConnect is called for the first time.popup- optionalboolean, defaulttrue. 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.webusb— deprecatedboolean, defaulttrue. Allow webusb. Deprecated, you should usetransportsinstead.
Result
TrezorConnect.init returns Promise<void>