{"id":15077744,"url":"https://github.com/ledgerhq/bitcoin-lib-grpc","last_synced_at":"2025-11-02T03:30:29.996Z","repository":{"id":37706804,"uuid":"278604251","full_name":"LedgerHQ/bitcoin-lib-grpc","owner":"LedgerHQ","description":"A modular gRPC service to interact with the Bitcoin protocol.  ₿","archived":true,"fork":false,"pushed_at":"2023-10-02T11:08:45.000Z","size":365,"stargazers_count":9,"open_issues_count":12,"forks_count":2,"subscribers_count":21,"default_branch":"main","last_synced_at":"2024-12-26T13:43:22.780Z","etag":null,"topics":["bitcoin","golang","grpc","infraprj-4968","ledger"],"latest_commit_sha":null,"homepage":"","language":"Go","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/LedgerHQ.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":"2020-07-10T10:19:30.000Z","updated_at":"2024-11-19T06:35:08.000Z","dependencies_parsed_at":"2024-06-20T01:39:45.381Z","dependency_job_id":null,"html_url":"https://github.com/LedgerHQ/bitcoin-lib-grpc","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LedgerHQ%2Fbitcoin-lib-grpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LedgerHQ%2Fbitcoin-lib-grpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LedgerHQ%2Fbitcoin-lib-grpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LedgerHQ%2Fbitcoin-lib-grpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LedgerHQ","download_url":"https://codeload.github.com/LedgerHQ/bitcoin-lib-grpc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239302358,"owners_count":19616516,"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":["bitcoin","golang","grpc","infraprj-4968","ledger"],"created_at":"2024-09-25T04:31:27.473Z","updated_at":"2025-11-02T03:30:29.952Z","avatar_url":"https://github.com/LedgerHQ.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bitcoin-lib-grpc\n\nbitcoin-lib-grpc is a modular service that exposes a gRPC interface to wrap\nprotocol-centric logic related to Bitcoin, and related forks.\n\nIt is based on btcd - a Bitcoin SDK and full node implementation written in Go.\n\n### Supported chains\n\n* Bitcoin\n  * mainnet\n  * testnet3\n  * regtest\n* Litecoin\n  * mainnet\n\n### Summary of gRPC methods\n\nFull details available [here](https://github.com/LedgerHQ/bitcoin-lib-grpc/blob/master/pb/bitcoin/service.proto).\n\n* [`ValidateAddress`](https://github.com/LedgerHQ/bitcoin-lib-grpc/blob/e515b9797f25565955207594448664e32a5e35b0/pb/bitcoin/service.proto#L13-L16)\n  ➔ check whether an address is valid for the given chain parameters.\n\n* [`DeriveExtendedKey`](https://github.com/LedgerHQ/bitcoin-lib-grpc/blob/e515b9797f25565955207594448664e32a5e35b0/pb/bitcoin/service.proto#L18-L21)\n  ➔ derive a child extended key based on BIP0032 derivation rules.\n\n* [`EncodeAddress`](https://github.com/LedgerHQ/bitcoin-lib-grpc/blob/e515b9797f25565955207594448664e32a5e35b0/pb/bitcoin/service.proto#L23-L32)\n  ➔ serialize public key into a network-specific address.\n\n* [`GetAccountExtendedKey`](https://github.com/LedgerHQ/bitcoin-lib-grpc/blob/e515b9797f25565955207594448664e32a5e35b0/pb/bitcoin/service.proto#L34-L36)\n  ➔ serialize public key-material into xPub.\n\n* [`CreateTransaction`](https://github.com/LedgerHQ/bitcoin-lib-grpc/blob/e515b9797f25565955207594448664e32a5e35b0/pb/bitcoin/service.proto#L38-L39)\n  ➔ prepare a raw TX based on TX params.\n\n* [`SignTransaction`](https://github.com/LedgerHQ/bitcoin-lib-grpc/blob/e515b9797f25565955207594448664e32a5e35b0/pb/bitcoin/service.proto#L48-L51)\n  ➔ combine a raw TX with DER signatures to produce the signed TX.\n\n* [`GetKeypair`](https://github.com/LedgerHQ/bitcoin-lib-grpc/blob/e515b9797f25565955207594448664e32a5e35b0/pb/bitcoin/service.proto#L41-L43)\n  ➔ derive an extended public-private keypair from a seed on a given derivation.\n  \n  ⚠️ **Note:** for use in tests only.\n* [`GenerateDerSignatures`](https://github.com/LedgerHQ/bitcoin-lib-grpc/blob/e515b9797f25565955207594448664e32a5e35b0/pb/bitcoin/service.proto#L45-L46)\n  ➔ sign a raw TX with a private key to produce DER signatures.\n\n  ⚠️ **Note:** for use in tests only.\n\n### Architecture\n\n![](./docs/lbs.png)\n\n### Development\n\n1. Install [mage](https://magefile.org).\n2. Build the project to produce the executable.\n    ```\n    $ mage build\n    ```\n3. Run the binary.\n  ```\n  $ ./lbs\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fledgerhq%2Fbitcoin-lib-grpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fledgerhq%2Fbitcoin-lib-grpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fledgerhq%2Fbitcoin-lib-grpc/lists"}