How to use the @ledgerhq/hw-app-str.default function in @ledgerhq/hw-app-str

To help you get started, we’ve selected a few @ledgerhq/hw-app-str 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 stellarchat / desktop-client / src / main / hardwareWalletLedger.js View on Github external
async _watchdogCallback() {
      console.log(`Hardwallet<${this.uid}> Watchdog: state='${this.state}' busy='${this.busy}'`)
      if(!this.transport) {
        try {
          const transport = await Transport.open(this.descriptor);
          const str = new Str(transport);
          this.transport = transport;
          this.str = str;
          console.info(`Hardwallet<${this.uid}>: Transport open.`)
        } catch(e) {
          console.warn(`Hardwallet<${this.uid}> Watchdog: recovering from error... (${e.message})`)
          return;  // Skip the rest try again later.
        }
      }

      let newState;
      try {

        if(this.subaccount) {
          if(!this.publicKey && !this.busy) await this.selectSubaccount(this.subaccount)
          if(!this.busy) await this.ping();
          newState = HWW_STATE.READY;

@ledgerhq/hw-app-str

Ledger Hardware Wallet Stellar Application API

MIT
Latest version published 3 months ago

Package Health Score

85 / 100
Full package analysis

Popular @ledgerhq/hw-app-str functions