How to use the trezor-connect.default.ethereumVerifyMessage 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 rate-engineering / rate3-monorepo / packages / wallet / Trezor.js View on Github external
async verifyMessage(address, message, signature, hex = false) {
    let result;
    if (this.currency === 'ethereum') {
      const params = {
        address, message, signature, hex
      };
      result = await TrezorConnect.ethereumVerifyMessage(params);
    } else {
      console.log('Stellar verifying messages is not supported by Trezor.');
      result = false;
    }
    return result;
  }
}
github floating / frame / app / flex / trezor / index.js View on Github external
ethereumVerifyMessage (path, address, message, signature, cb) {
    TrezorConnect.ethereumVerifyMessage({ device: this.device, path, address, message, signature }).then(res => {
      if (!res.success) return cb(new Error(res.payload.error))
      cb(null, res.payload)
    }).catch(err => cb(err))
  }
}