How to use the trezor-connect.default.getPublicKey function in trezor-connect

To help you get started, we’ve selected a few trezor-connect examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github unchained-capital / unchained-wallets / src / trezor.js View on Github external
async run() {
    const result = await TrezorConnect.getPublicKey({
      path: this.bip32Path,
      coin: this.trezorCoin,
      crossChain: true,
    });
    if (!result.success) {
      throw new Error(result.payload.error);
    }
    return result.payload;
  }
github go-faast / faast-web / src / services / Trezor.ts View on Github external
getXPubKey(assetSymbol: string, derivationPath: string): Promise {
    return TrezorConnect.getPublicKey(log.debugInline('TrezorConnect.getPublicKey', {
      coin: assetSymbol.toLowerCase(),
      path: derivationPath,
    })).then(handleResult)
  }
github floating / frame / app / flex / trezor / index.js View on Github external
getPublicKey (path, cb) {
    TrezorConnect.getPublicKey({ device: this.device, path }).then(res => {
      if (!res.success) return cb(new Error(res.payload.error))
      cb(null, res.payload)
    }).catch(err => cb(err))
  }