{"id":18913766,"url":"https://github.com/ethers-io/ext-signer-ledger","last_synced_at":"2025-04-15T08:30:55.896Z","repository":{"id":182903536,"uuid":"668524872","full_name":"ethers-io/ext-signer-ledger","owner":"ethers-io","description":"Ethers extension for LedgerSigner for Ledger Hardware Wallet support.","archived":false,"fork":false,"pushed_at":"2023-07-20T22:50:14.000Z","size":45,"stargazers_count":8,"open_issues_count":3,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-11T05:02:01.287Z","etag":null,"topics":["ethers","ethersjs","ledger"],"latest_commit_sha":null,"homepage":"https://ethers.org","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ethers-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"ethers-io"}},"created_at":"2023-07-20T02:47:44.000Z","updated_at":"2025-03-15T09:51:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"adcdeeb8-6562-430e-af4a-2aaca0b0e10d","html_url":"https://github.com/ethers-io/ext-signer-ledger","commit_stats":null,"previous_names":["ethers-io/ext-signer-ledger"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethers-io%2Fext-signer-ledger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethers-io%2Fext-signer-ledger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethers-io%2Fext-signer-ledger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethers-io%2Fext-signer-ledger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ethers-io","download_url":"https://codeload.github.com/ethers-io/ext-signer-ledger/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248651031,"owners_count":21139730,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ethers","ethersjs","ledger"],"created_at":"2024-11-08T10:08:54.203Z","updated_at":"2025-04-15T08:30:55.864Z","avatar_url":"https://github.com/ethers-io.png","language":"TypeScript","funding_links":["https://github.com/sponsors/ethers-io"],"categories":[],"sub_categories":[],"readme":"Ethers: LedgerSigner\n====================\n\nA **LedgerSigner** connects to a [Ledger Hardware Wallet](https://www.ledger.com)\nover some transport, and allows all normal [Signer operations](https://docs.ethers.org/v6/api/providers/#Signer)\nprotected by the hardware wallet.\n\n\nInstalling\n----------\n\nWhen you use the **LedgerSigner**, you must also include the intended\ntransport, which provides a generic interface for the communication\nchannel to the Ledger Hardware Device.\n\nBelow are examples and notes on installing the necessary transports:\n\n```shell\n# Install the extension pacakge\n/home/ricmoo\u003e npm install @ethers-ext/signer-ledger\n\n# Depending on your environment, install any of the\n# relevant Transport(s) below:\n\n# For use of a USB-based device in node\n# - You must include \"dom\" in your TypeScript libs\n# - On MacOD, only the current user may access the USB\n/home/ricmoo\u003e npm install @ledgerhq/hw-transport-node-hid\n\n# For use of a BLE-based device in node\n/home/ricmoo\u003e npm install @ledgerhq/hw-transport-node-ble\n\n# For use of USB-based device in a browser using the WebUSB API\n/home/ricmoo\u003e npm install @ledgerhq/hw-transport-webusb\n\n# For use of USB-based device in a browser using the WebHID API\n/home/ricmoo\u003e npm install @ledgerhq/hw-transport-webhid\n\n# For use of BLE-based device in a browser using the Web Bluetooth API\n/home/ricmoo\u003e npm install @ledgerhq/hw-transport-web-ble\n\n# For testing purposes, a virtual device for mocking\n/home/ricmoo\u003e npm install @ledgerhq/hw-transport-mocker\n```\n\n\nUsage\n-----\n\n### `new LedgerSigner(transport, provider?, path?) =\u003e Signer`\n\nCreate a new LedgerSigner connected to a Ledger Hardware Wallet\nvia `transport` and optionally connected to the blockchain using\n`provider`. The default path is the path for Account #0, otherwise\nthe logic for the LedgerSigner.getPath is used.\n\n```javascript\nimport { LedgerSigner } from \"@ethers-ext/signer-ledger\";\n\n// Import your relevant transport; see the above \"Installing\"\n// section for the package name; for example, we'll use node-hid\nimport HIDTransport from \"@ledgerhq/hw-transport-node-hid\";\n\nconst signer = new LedgerSigner(HIDTransport, provider);\n```\n\n### `signer.getSigner(pathOrAccount?) =\u003e LedgerSigner`\n\nReturns a new Signer with the same transport and provider, but\nwith using the `pathOrAccount`.\n\n### `LedgerSigner.getPath(pathOrAccount?) =\u003e string`\n\nReturns the HD path for `pathOrAccount`. If none is provided, the\ndefault path (account #0) is returned, if a number is provided,\nthe HD path for that account is returned, otherwise a valid HD path\nis expected (starting with `m/`).\n\n\nNotes\n-----\n\n- Some platforms, such as [MetaMask](https://metamask.io) use a different derivation path for accounts. For those, you can use the Ethers [getIndexedAccount function](https://docs.ethers.org/v6/api/wallet/#getIndexedAccountPath).\n\n\nLicense\n-------\n\nMIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethers-io%2Fext-signer-ledger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethers-io%2Fext-signer-ledger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethers-io%2Fext-signer-ledger/lists"}