aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/md/docs
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-03-22 02:04:48 +0800
committerFabio Berger <me@fabioberger.com>2018-03-22 02:04:48 +0800
commit78e9c4880358621cb5a4393d7e32d81bfba1ae6d (patch)
tree2de7f4b0b0251eca78a9327910e9b9224f5e2d50 /packages/website/md/docs
parent18d3e5458a31e7d2368e506e8cf14f190e19b7ff (diff)
downloaddexon-sol-tools-78e9c4880358621cb5a4393d7e32d81bfba1ae6d.tar
dexon-sol-tools-78e9c4880358621cb5a4393d7e32d81bfba1ae6d.tar.gz
dexon-sol-tools-78e9c4880358621cb5a4393d7e32d81bfba1ae6d.tar.bz2
dexon-sol-tools-78e9c4880358621cb5a4393d7e32d81bfba1ae6d.tar.lz
dexon-sol-tools-78e9c4880358621cb5a4393d7e32d81bfba1ae6d.tar.xz
dexon-sol-tools-78e9c4880358621cb5a4393d7e32d81bfba1ae6d.tar.zst
dexon-sol-tools-78e9c4880358621cb5a4393d7e32d81bfba1ae6d.zip
Move docs from README into docs page and add a link to it.
Diffstat (limited to 'packages/website/md/docs')
-rw-r--r--packages/website/md/docs/subproviders/ledger_node_hid.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/packages/website/md/docs/subproviders/ledger_node_hid.md b/packages/website/md/docs/subproviders/ledger_node_hid.md
new file mode 100644
index 000000000..3089817af
--- /dev/null
+++ b/packages/website/md/docs/subproviders/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,
+});
+```