Expand description
Bitcoin Core compatible JSON-RPC API for Subcoin.
This crate provides a Bitcoin Core compatible RPC layer that enables Subcoin to work with Bitcoin ecosystem tools like electrs (Electrum server).
§Supported RPC Methods
§Blockchain
getbestblockhash- Returns the hash of the best blockgetblockchaininfo- Returns blockchain state infogetblockcount- Returns the current block countgetblockhash- Returns block hash at given heightgetblock- Returns block data (raw hex or JSON)getblockheader- Returns block header (raw hex or JSON)
§Raw Transactions
getrawtransaction- Returns raw transaction datasendrawtransaction- Broadcasts a raw transactiondecoderawtransaction- Decodes a raw transaction hex
§Network
getnetworkinfo- Returns network state info
§Mempool
getrawmempool- Returns all mempool txidsgetmempoolinfo- Returns mempool statisticsgetmempoolentry- Returns mempool entry for a txid
§Mining/Fees
estimatesmartfee- Estimates fee rate for confirmation target
Structs§
- Bitcoind
Rpc - Bitcoin Core compatible RPC server.
- Blockchain
- Bitcoin Core compatible blockchain RPC implementation.
- Estimate
Smart Fee - Response for
estimatesmartfeeRPC. - GetBlock
- Response for
getblockRPC with verbosity=1 (JSON without tx details). - GetBlock
Header - Response for
getblockheaderRPC with verbose=true. - GetBlockchain
Info - Response for
getblockchaininfoRPC. - GetMempool
Entry - Response for
getmempoolentryRPC. - GetMempool
Info - Response for
getmempoolinfoRPC. - GetNetwork
Info - Response for
getnetworkinfoRPC. - GetRaw
Transaction - Response for
getrawtransactionRPC with verbose=true. - Local
Address - Local address information.
- Mempool
Rpc - Bitcoin Core compatible mempool RPC implementation.
- Mining
Rpc - Bitcoin Core compatible mining RPC implementation.
- Network
Rpc - Bitcoin Core compatible network RPC implementation.
- RawTransaction
- Bitcoin Core compatible raw transaction RPC implementation.
- Script
PubKey - Script pubkey.
- Script
Sig - Script signature.
- Vin
- Transaction input.
- Vout
- Transaction output.
Enums§
- Error
- Bitcoin Core compatible RPC errors.
Traits§
- Blockchain
ApiServer - Server trait implementation for the
BlockchainApiRPC API. - Mempool
ApiServer - Server trait implementation for the
MempoolApiRPC API. - Mining
ApiServer - Server trait implementation for the
MiningApiRPC API. - Network
ApiServer - Server trait implementation for the
NetworkApiRPC API. - RawTransaction
ApiServer - Server trait implementation for the
RawTransactionApiRPC API.