Skip to content

Latest commit

 

History

History
16 lines (15 loc) · 1.78 KB

commonParams.md

File metadata and controls

16 lines (15 loc) · 1.78 KB

Common parameters

Every call require an Object with combination of common and method specified fields. All common parameters are optional.

  • device - optional Object
    • path - obligatory string call to a direct device. Useful when working with multiple connected devices. This value is emitted by TrezorConnectEvent
    • state - optional string sets expected state. This value is emitted by TrezorConnectEvent
    • instance - optional number sets an instance of device. Useful when working with one device and multiple passphrases. This value is emitted by TrezorConnectEvent
  • useEmptyPassphraseoptional boolean method will not ask for a passphrase. Default is set to false
  • allowSeedlessDeviceoptional boolean allows to use TrezorConnect methods with device with seedless setup. Default is set to false
  • keepSessionoptional boolean Advanced feature. After method return a response device session will NOT! be released. Session shoul be released after all calls are performed by calling any method with keepSession set to false or undefined. Useful when you need to do multiple different calls to TrezorConnect API without releasing. Example sequence loop for 10 account should look like:
    • TrezorConnect.getPublicKey({ device: { path: "web01"}, keepSession: true, ...otherParams }) for first account,
    • Trezor.getAddress({ device: { path: "web01"}, ...otherParams }) for the same account,
    • looking up for balance in external blockchain
    • loop iteration
    • after last iteration call TrezorConnect.getFeatures({ device: { path: "web01"}, keepSession: false, ...otherParams })