Bitcoin full node and query server

Dec 15, 2025

View in context in the libbitcoin Slack #general mirror.

evoskuil03:25
bitcoind-rest (URL GET) compat interface, same endpoint as JSON-RPC (POST)
// github.com/bitcoin/bitcoin/blob/master/doc/REST-interface.md
static constexpr std::tuple methods
{
    // blocks (block_part is bin|hex only)
    method<"block", uint8_t, system::hash_cptr>{ "media", "hash" },
    method<"block_hash", uint8_t, uint32_t>{ "media", "height" },
    method<"block_txs", uint8_t, system::hash_cptr>{ "media", "hash" },
    method<"block_headers", uint8_t, system::hash_cptr, uint32_t>{ "media", "hash", "count" },
    method<"block_part", uint8_t, system::hash_cptr, uint32_t, uint32_t>{ "media", "hash", "offset", "size" },
    method<"block_spent_tx_outputs", uint8_t, system::hash_cptr>{ "media", "hash" },

    // client filters
    method<"block_filter", uint8_t, system::hash_cptr, uint8_t>{ "media", "hash", "type" },
    method<"block_filter_headers", uint8_t, system::hash_cptr, uint8_t>{ "media", "hash", "type" },

    // unspent outputs
    method<"get_utxos", uint8_t, system::hash_cptr, uint8_t>{ "media", "hash", "type" },
    method<"get_utxos_confirmed", uint8_t, system::hash_cptr, uint8_t>{ "media", "hash", "type" },

    // mempool (json only)
    method<"mempool", optional<true>, optional<false>>{ "verbose", "sequence" },

    // info (json only)
    method<"chain_information">{},
    method<"mempool_information">{},
    method<"fork_information", nullable<system::hash_cptr>>{ "hash" }
};