Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ledgerhq/bitcoin-lib-grpc
A modular gRPC service to interact with the Bitcoin protocol. ₿
https://github.com/ledgerhq/bitcoin-lib-grpc
bitcoin golang grpc ledger
Last synced: 3 months ago
JSON representation
A modular gRPC service to interact with the Bitcoin protocol. ₿
- Host: GitHub
- URL: https://github.com/ledgerhq/bitcoin-lib-grpc
- Owner: LedgerHQ
- Created: 2020-07-10T10:19:30.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-10-02T11:08:45.000Z (over 1 year ago)
- Last Synced: 2024-09-30T16:21:49.186Z (3 months ago)
- Topics: bitcoin, golang, grpc, ledger
- Language: Go
- Homepage:
- Size: 356 KB
- Stars: 8
- Watchers: 20
- Forks: 2
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# bitcoin-lib-grpc
bitcoin-lib-grpc is a modular service that exposes a gRPC interface to wrap
protocol-centric logic related to Bitcoin, and related forks.It is based on btcd - a Bitcoin SDK and full node implementation written in Go.
### Supported chains
* Bitcoin
* mainnet
* testnet3
* regtest
* Litecoin
* mainnet### Summary of gRPC methods
Full details available [here](https://github.com/LedgerHQ/bitcoin-lib-grpc/blob/master/pb/bitcoin/service.proto).
* [`ValidateAddress`](https://github.com/LedgerHQ/bitcoin-lib-grpc/blob/e515b9797f25565955207594448664e32a5e35b0/pb/bitcoin/service.proto#L13-L16)
➔ check whether an address is valid for the given chain parameters.* [`DeriveExtendedKey`](https://github.com/LedgerHQ/bitcoin-lib-grpc/blob/e515b9797f25565955207594448664e32a5e35b0/pb/bitcoin/service.proto#L18-L21)
➔ derive a child extended key based on BIP0032 derivation rules.* [`EncodeAddress`](https://github.com/LedgerHQ/bitcoin-lib-grpc/blob/e515b9797f25565955207594448664e32a5e35b0/pb/bitcoin/service.proto#L23-L32)
➔ serialize public key into a network-specific address.* [`GetAccountExtendedKey`](https://github.com/LedgerHQ/bitcoin-lib-grpc/blob/e515b9797f25565955207594448664e32a5e35b0/pb/bitcoin/service.proto#L34-L36)
➔ serialize public key-material into xPub.* [`CreateTransaction`](https://github.com/LedgerHQ/bitcoin-lib-grpc/blob/e515b9797f25565955207594448664e32a5e35b0/pb/bitcoin/service.proto#L38-L39)
➔ prepare a raw TX based on TX params.* [`SignTransaction`](https://github.com/LedgerHQ/bitcoin-lib-grpc/blob/e515b9797f25565955207594448664e32a5e35b0/pb/bitcoin/service.proto#L48-L51)
➔ combine a raw TX with DER signatures to produce the signed TX.* [`GetKeypair`](https://github.com/LedgerHQ/bitcoin-lib-grpc/blob/e515b9797f25565955207594448664e32a5e35b0/pb/bitcoin/service.proto#L41-L43)
➔ derive an extended public-private keypair from a seed on a given derivation.
⚠️ **Note:** for use in tests only.
* [`GenerateDerSignatures`](https://github.com/LedgerHQ/bitcoin-lib-grpc/blob/e515b9797f25565955207594448664e32a5e35b0/pb/bitcoin/service.proto#L45-L46)
➔ sign a raw TX with a private key to produce DER signatures.⚠️ **Note:** for use in tests only.
### Architecture
![](./docs/lbs.png)
### Development
1. Install [mage](https://magefile.org).
2. Build the project to produce the executable.
```
$ mage build
```
3. Run the binary.
```
$ ./lbs
```