UI Events: Passphrase

  • When a hidden wallet is needed, the SDK emits UI_REQUEST.REQUEST_PASSPHRASE.

  • Two options:

    • Enter on device (most secure):

      await HardwareSDK.uiResponse({ 
        type: UI_RESPONSE.RECEIVE_PASSPHRASE, 
        payload: { 
          passphraseOnDevice: true, 
          value: '' 
        } 
      });
    • Software input (optionally cache for session):

      await HardwareSDK.uiResponse({ 
        type: UI_RESPONSE.RECEIVE_PASSPHRASE, 
        payload: {
          value, 
          passphraseOnDevice: false, 
          save: true 
        } 
      });
  • Force Standard Wallet for a call: add useEmptyPassphrase: true in method params.

Example (force standard wallet for this call only):

const res = await HardwareSDK.btcGetAddress(connectId, deviceId, {
  path: "m/44'/0'/0'/0/0",
  coin: 'btc',
  showOnOneKey: false,
  useEmptyPassphrase: true,
});

Last updated

Was this helpful?