eth-signer-trezor 0.1.2
Install from the command line:
Learn more about npm packages
$ npm install @axieinfinity/eth-signer-trezor@0.1.2
Install via package.json:
"@axieinfinity/eth-signer-trezor": "0.1.2"
About this version
ethers
signer that derives address and signs transactions using Trezor device.
yarn add @axieinfinity/eth-signer-trezor
const hardwareWalletModule = require('@axieinfinity/eth-signer-trezor');
const providers = require('ethers').providers;
const TrezorSigner = hardwareWalletModule.TrezorSigner;
const provider = new providers.JsonRpcProvider(providerUrl);
const derivationPath = `m/44'/60'/0'/0`; // This follows BIP-44 wallet, without <index> in derivation path
/**
* Specifying account by either index in account or by address, NOT both
*
* const index = 0;
* const address = undefined;
**/
const index = undefined;
const address = "0xcB6a85e9Ff428d0cD7c6F3D7A03Aa5F6DF771525";
const sessionName = 'trezor user'
const ethersSigner = new TrezorSigner(
provider,
derivationPath,
index,
address,
sessionName
);
The TrezorSigner
class in trezor-signer.ts satisfies following:
- extends
ethers.signer
- loads and interacts with Trezor Connect
- fetches public key by derivation path from Trezor and derives available addresses in the device
Details
- eth-signer-trezor
- axieinfinity
- over 2 years ago
- ISC
- 14 dependencies
Assets
- eth-signer-trezor-0.1.2.tgz
Download activity
- Total downloads 2,414
- Last 30 days 1
- Last week 1
- Today 0