Init
To initiate TrezorConnect, please provide the manifest object with your email and appURL. This is crucial for us to identify your use of TrezorConnect and to contact you if necessary. If the manifest object is not set, TrezorConnect methods will not be available.
It is also possible to customize more advanced options for TrezorConnect.
const result = await TrezorConnect.init({
manifest: {
appUrl: 'https://your.application.com',
appName: 'Trezor Connect Example',
email: 'your@email.com',
},
// More advanced options
debug: true,
coreMode: 'auto',
});Params
manifest
Object
Application manifest with your email and appUrl.
debug
Boolean
default false. Prints debug logs.
transportReconnect
Boolean
default true. If transport dies during lifecycle of application, this field decides whether TrezorConnect tries to reestablish connection with transport layer.
pendingTransportEvent
Boolean
default true. Postpone emitting TRANSPORT.START event to the moment when connected device becomes available.
transports
Array<"BridgeTransport" | "WebUsbTransport" | "NodeUsbTransport">
Array of transports that should be use. If not provided, TrezorConnect will choose a reasonable default based on your environment.
coreMode
"auto" | "core-in-suite-desktop" | "core-in-suite-web"
default auto.
In the default auto mode, TrezorConnect will automatically choose core-in-suite-desktop if Suite desktop is available and core-in-suite-web otherwise, to allow for webUSB use.
Result
TrezorConnect.init returns Promise<void>