@@ -28,9 +28,32 @@ namespace interface {
2828
2929struct bitcoind_rest_methods
3030{
31+ // github.com/bitcoin/bitcoin/blob/master/doc/REST-interface.md
3132 static constexpr std::tuple methods
3233 {
33- method<" rest1" >{},
34+ // blocks (block_part is bin|hex only)
35+ method<" block" , uint8_t , system::hash_cptr>{ " media" , " hash" },
36+ method<" block_hash" , uint8_t , uint32_t >{ " media" , " height" },
37+ method<" block_txs" , uint8_t , system::hash_cptr>{ " media" , " hash" },
38+ method<" block_headers" , uint8_t , system::hash_cptr, uint32_t >{ " media" , " hash" , " count" },
39+ method<" block_part" , uint8_t , system::hash_cptr, uint32_t , uint32_t >{ " media" , " hash" , " offset" , " size" },
40+ method<" block_spent_tx_outputs" , uint8_t , system::hash_cptr>{ " media" , " hash" },
41+
42+ // client filters
43+ method<" block_filter" , uint8_t , system::hash_cptr, uint8_t >{ " media" , " hash" , " type" },
44+ method<" block_filter_headers" , uint8_t , system::hash_cptr, uint8_t >{ " media" , " hash" , " type" },
45+
46+ // unspent outputs
47+ method<" get_utxos" , uint8_t , system::hash_cptr, uint8_t >{ " media" , " hash" , " type" },
48+ method<" get_utxos_confirmed" , uint8_t , system::hash_cptr, uint8_t >{ " media" , " hash" , " type" },
49+
50+ // mempool (json only)
51+ method<" mempool" , optional<true >, optional<false >>{ " verbose" , " sequence" },
52+
53+ // info (json only)
54+ method<" chain_information" >{},
55+ method<" mempool_information" >{},
56+ method<" fork_information" , nullable<system::hash_cptr>>{ " hash" }
3457 };
3558
3659 template <typename ... Args>
@@ -40,7 +63,20 @@ struct bitcoind_rest_methods
4063 using at = method_at<methods, Index>;
4164
4265 // Derive this from above in c++26 using reflection.
43- using rest1 = at<0 >;
66+ using block = at<0 >;
67+ using block_hash = at<1 >;
68+ using block_txs = at<2 >;
69+ using block_headers = at<3 >;
70+ using block_part = at<4 >;
71+ using block_spent_tx_outputs = at<5 >;
72+ using block_filter = at<6 >;
73+ using block_filter_headers = at<7 >;
74+ using get_utxos = at<8 >;
75+ using get_utxos_confirmed = at<9 >;
76+ using mempool = at<10 >;
77+ using chain_information = at<11 >;
78+ using mempool_information = at<12 >;
79+ using fork_information = at<13 >;
4480};
4581
4682} // namespace interface
0 commit comments