{"id":23330478,"url":"https://github.com/vekexasia/dpos-ledger-api","last_synced_at":"2025-04-07T10:14:37.409Z","repository":{"id":146345604,"uuid":"124505486","full_name":"vekexasia/dpos-ledger-api","owner":"vekexasia","description":"TypeScript library for ledger communication","archived":false,"fork":false,"pushed_at":"2019-04-02T09:18:09.000Z","size":394,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-13T13:16:46.156Z","etag":null,"topics":["dpos","hardware-wallet","ledger"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vekexasia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-09T07:38:01.000Z","updated_at":"2019-04-02T09:18:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"42ec4a75-a6aa-4af4-a196-998dccef96df","html_url":"https://github.com/vekexasia/dpos-ledger-api","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vekexasia%2Fdpos-ledger-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vekexasia%2Fdpos-ledger-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vekexasia%2Fdpos-ledger-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vekexasia%2Fdpos-ledger-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vekexasia","download_url":"https://codeload.github.com/vekexasia/dpos-ledger-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247631833,"owners_count":20970069,"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":["dpos","hardware-wallet","ledger"],"created_at":"2024-12-20T22:18:12.008Z","updated_at":"2025-04-07T10:14:37.368Z","avatar_url":"https://github.com/vekexasia.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm](https://img.shields.io/npm/v/dpos-ledger-api.svg)](https://npmjs.org/package/dpos-ledger-api) [![Build Status](https://travis-ci.org/vekexasia/dpos-ledger-api.svg?branch=master)](https://travis-ci.org/vekexasia/dpos-ledger-api)  [![Coverage Status](https://coveralls.io/repos/github/vekexasia/dpos-ledger-api/badge.svg?branch=master)](https://coveralls.io/github/vekexasia/dpos-ledger-api?branch=master)\n\n# dPoS Ledger \n\nThis library is meant to be used with the corresponding Ledger C implementation. Given the end-user have:\n\n - His ledger connected \u0026 unlocked;\n - the corresponding app open;\n\nThis JS library will serve as an interface between your code and the hardware wallet handling the communication protocol.\n\n\n## Documentation\n\nDocumention is available [here](https://vekexasia.github.io/dpos-ledger-api/index.html).\n\n## Environment Support\n\nThis library does not make any assumption on the environment on which it is being consumed.\n\nBoth Node.JS and minified Browser version of this library are provided.\n\n### NodeJS\n\nTo consume this library through an app running under the NodeVM, you'll need to use the [@ledgerhq/hw-transport-node-hid](https://github.com/LedgerHQ/ledgerjs/blob/master/packages/hw-transport-node-hid) transport.\n\nThis library, and the ledger app, have been developed and tested with `hw-transport-node-hid@4.7.6`.\n\n### Browser\n\nThe Browser version currently weights `32KB` (non gzipped). It can be used both via webpack or directly including it in your page just like any other script.\n\nThis library, and the ledger app, have been tested with `@ledgerhq/hw-transport-node-hid@4.7.3` as Transport.\n\n## Platform Indipendent Example\n\n```typescript\nimport TransportU2F from '@ledgerhq/hw-transport-u2f';\nimport TransportNodeHid from '@ledgerhq/hw-transport-node-hid';\nimport { isBrowser, isNode } from 'browser-or-node';\nimport { DposLedge, CommHandler } from 'dpos-ledger-api';\n\nlet transportMethod;\nif (isBrowser) {\n\ttransportMethod = TransportU2F;\n} else if (isNode) {\n\ttransportMethod = TransportNodeHid;\n} else {\n\t// ??\n}\n\ntransportMethod.create()\n\t.then((transport) =\u003e new DposLedger(new CommHandler(transport)))\n\t.then((instance) =\u003e {\n\t    // ..\n\t});\n\n```\n\n## Thanks\n\nAny improvement/suggestion is very welcome :)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvekexasia%2Fdpos-ledger-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvekexasia%2Fdpos-ledger-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvekexasia%2Fdpos-ledger-api/lists"}