Bitcoin full node and query server

Nov 28, 2025

View in context in the libbitcoin Slack #general mirror.

evoskuil21:50
I completed the URL target path to request parser. This can drop in to an http body type and produce an rpc request object, which can then be passed directly to the dispatcher typed over that interface. This required some further generalization of the dispatcher, so that nullable parameters are also optional parameters, and so that complex types can also be nullable. That came out well, and allows us to define the interface as:
static constexpr std::tuple methods
{
    // The block hash or height is logically required.
    method<"block", uint8_t, nullable<system::hash_cptr>, nullable<uint32_t>>{ "version", "hash", "height" },
    method<"header", uint8_t, nullable<system::hash_cptr>, nullable<uint32_t>>{ "version", "hash", "height" },
    method<"filter", uint8_t, nullable<system::hash_cptr>, nullable<uint32_t>>{ "version", "hash", "height" },
    method<"block_txs", uint8_t, nullable<system::hash_cptr>, nullable<uint32_t>>{ "version", "hash", "height" },

    // The block hash or height is logically required.
    // The position parameter is out of URL order because it's required.
    method<"block_tx", uint8_t, uint32_t, nullable<system::hash_cptr>, nullable<uint32_t>>{ "version", "position", "hash", "height" },

    // All parameters are required.
    method<"transaction", uint8_t, system::hash_cptr>{ "version", "hash" },
    method<"input", uint8_t, system::hash_cptr, uint32_t>{ "version", "hash", "index" },
    method<"inputs", uint8_t, system::hash_cptr>{ "version", "hash" },
    method<"input_script", uint8_t, system::hash_cptr, uint32_t>{ "version", "hash", "index" },
    method<"input_scripts", uint8_t, system::hash_cptr>{ "version", "hash" },
    method<"input_witness", uint8_t, system::hash_cptr, uint32_t>{ "version", "hash", "index" },
    method<"input_witnesses", uint8_t, system::hash_cptr>{ "version", "hash" },
    method<"output", uint8_t, system::hash_cptr, uint32_t>{ "version", "hash", "index" },
    method<"outputs", uint8_t, system::hash_cptr>{ "version", "hash" },
    method<"output_script", uint8_t, system::hash_cptr, uint32_t>{ "version", "hash", "index" },
    method<"output_scripts", uint8_t, system::hash_cptr>{ "version", "hash" },
    method<"output_spender", uint8_t, system::hash_cptr, uint32_t>{ "version", "hash", "index" },
    method<"output_spenders", uint8_t, system::hash_cptr>{ "version", "hash" },
    method<"address", uint8_t, system::hash_cptr>{ "version", "hash" }
};