diff options
author | Fabio Berger <me@fabioberger.com> | 2018-10-19 00:31:38 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-10-19 00:31:38 +0800 |
commit | c4ae91c7c5aaa2d6e278448667bf828162be93bc (patch) | |
tree | 46843ed4273b158e0313897d2b5029516c4222ba /packages/website/md/docs/subproviders/1/ledger_node_hid.md | |
parent | 8b62b350b1fed6a0d8827ca9ed5fcec3e78ae82f (diff) | |
download | dexon-0x-contracts-c4ae91c7c5aaa2d6e278448667bf828162be93bc.tar dexon-0x-contracts-c4ae91c7c5aaa2d6e278448667bf828162be93bc.tar.gz dexon-0x-contracts-c4ae91c7c5aaa2d6e278448667bf828162be93bc.tar.bz2 dexon-0x-contracts-c4ae91c7c5aaa2d6e278448667bf828162be93bc.tar.lz dexon-0x-contracts-c4ae91c7c5aaa2d6e278448667bf828162be93bc.tar.xz dexon-0x-contracts-c4ae91c7c5aaa2d6e278448667bf828162be93bc.tar.zst dexon-0x-contracts-c4ae91c7c5aaa2d6e278448667bf828162be93bc.zip |
Update doc ref markdown sections
Diffstat (limited to 'packages/website/md/docs/subproviders/1/ledger_node_hid.md')
-rw-r--r-- | packages/website/md/docs/subproviders/1/ledger_node_hid.md | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/packages/website/md/docs/subproviders/1/ledger_node_hid.md b/packages/website/md/docs/subproviders/1/ledger_node_hid.md new file mode 100644 index 000000000..3089817af --- /dev/null +++ b/packages/website/md/docs/subproviders/1/ledger_node_hid.md @@ -0,0 +1,17 @@ +By default, node-hid transport support is an optional dependency. This is due to the requirement of native usb developer packages on the host system. If these aren't installed the entire `npm install` fails. We also no longer export node-hid transport client factories. To re-create this see our integration tests or follow the example below: + +```typescript +import Eth from '@ledgerhq/hw-app-eth'; +import TransportNodeHid from '@ledgerhq/hw-transport-node-hid'; +async function ledgerEthereumNodeJsClientFactoryAsync(): Promise<LedgerEthereumClient> { + const ledgerConnection = await TransportNodeHid.create(); + const ledgerEthClient = new Eth(ledgerConnection); + return ledgerEthClient; +} + +// Create a LedgerSubprovider with the node-hid transport +ledgerSubprovider = new LedgerSubprovider({ + networkId, + ledgerEthereumClientFactoryAsync: ledgerEthereumNodeJsClientFactoryAsync, +}); +``` |