Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 65 additions & 43 deletions src/rpc/blockchain.cpp

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/rpc/mining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,8 @@ static RPCHelpMan getmininginfo()
{RPCResult::Type::NUM, "blocks", "The current block"},
{RPCResult::Type::NUM, "currentblockweight", /*optional=*/true, "The block weight of the last assembled block (only present if a block was ever assembled)"},
{RPCResult::Type::NUM, "currentblocktx", /*optional=*/true, "The number of block transactions of the last assembled block (only present if a block was ever assembled)"},
{RPCResult::Type::NUM, "difficulty", "The current difficulty"},
{RPCResult::Type::NUM, "networkhashps", "The network hashes per second"},
{RPCResult::Type::NUM, "difficulty", /*optional=*/true, "The current difficulty"},
{RPCResult::Type::NUM, "networkhashps", /*optional=*/true, "The network hashes per second"},
{RPCResult::Type::NUM, "pooledtx", "The size of the mempool"},
{RPCResult::Type::STR, "chain", "current network name (main, test, signet, regtest, liquidv1, liquidv1test, liquidtestnet)"},
{RPCResult::Type::STR, "warnings", "any network and blockchain warnings"},
Expand Down Expand Up @@ -1556,7 +1556,7 @@ static RPCHelpMan consumecompactsketch()
{
{RPCResult::Type::STR_HEX, "blockhex", "The filled block hex. Only returns when block is final"},
{RPCResult::Type::STR_HEX, "block_tx_req", "The serialized structure of missing transaction indices, given to serving node"},
{RPCResult::Type::STR_HEX, "found_tranasctions", "The serialized list of found transactions to be used in finalizecompactblock"},
{RPCResult::Type::STR_HEX, "found_transactions", "The serialized list of found transactions to be used in finalizecompactblock"},
},
},
RPCExamples{
Expand Down Expand Up @@ -1624,8 +1624,8 @@ static RPCHelpMan consumegetblocktxn()
return RPCHelpMan{"consumegetblocktxn",
"Consumes a transaction request for a compact block sketch.",
{
{"full_block", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "Hex serialied block that corresponds to the block request `block_tx_req`."},
{"block_tx_req", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "Hex serialied BlockTransactionsRequest, aka getblocktxn network message."},
{"full_block", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "Hex serialized block that corresponds to the block request `block_tx_req`."},
{"block_tx_req", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "Hex serialized BlockTransactionsRequest, aka getblocktxn network message."},
},
RPCResult{
RPCResult::Type::STR_HEX, "block_transactions", "The serialized list of found transactions aka BlockTransactions",
Expand Down
19 changes: 12 additions & 7 deletions src/rpc/misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,8 @@ static RPCHelpMan tweakfedpegscript()
RPCResult::Type::OBJ, "", "",
{
{RPCResult::Type::STR_HEX, "script", "The fedpegscript tweaked with claim_script"},
{RPCResult::Type::STR, "address", "The address corresponding to the tweaked fedpegscript"},
{RPCResult::Type::STR, "p2wsh", "Native segwit address (P2WSH) for the tweaked fedpegscript"},
{RPCResult::Type::STR, "p2shwsh", "Wrapped segwit address (P2SH-P2WSH) for the tweaked fedpegscript"},
}
},
RPCExamples{""},
Expand Down Expand Up @@ -918,9 +919,11 @@ static RPCHelpMan getpakinfo()
RPCResult{
RPCResult::Type::OBJ, "", "",
{
{RPCResult::Type::ARR, "block_paklist", "The PAK list loaded from latest epoch",
{RPCResult::Type::OBJ, "block_paklist", "The PAK list loaded from the latest epoch",
{
{RPCResult::Type::ELISION, "", ""}
{RPCResult::Type::ARR, "online", "Online keys (hex-encoded)", {{RPCResult::Type::STR_HEX, "", ""}}},
{RPCResult::Type::ARR, "offline", "Offline keys (hex-encoded)", {{RPCResult::Type::STR_HEX, "", ""}}},
{RPCResult::Type::BOOL, "reject", "True when there are no offline keys (reject pegouts)"},
}},
}
},
Expand Down Expand Up @@ -976,12 +979,14 @@ static RPCHelpMan calcfastmerkleroot()
static RPCHelpMan dumpassetlabels()
{
return RPCHelpMan{"dumpassetlabels",
"\nLists all known asset id/label pairs in this wallet. This list can be modified with `-assetdir` configuration argument.\n",
"\nLists all known asset label/id pairs for this node. Object keys are asset labels and values are hex-encoded asset identifiers. This list can be modified with the `-assetdir` configuration argument.\n",
{},
RPCResult{
RPCResult::Type::OBJ, "labels", "",
RPCResult::Type::OBJ_DYN,
"",
"Map from asset label (object key) to asset id (hex string value)",
{
{RPCResult::Type::ELISION, "", "the label for each asset id"},
{RPCResult::Type::STR_HEX, "xxxx", "asset id for the label named by each dynamic object key"},
},
},
RPCExamples{
Expand Down Expand Up @@ -1050,7 +1055,7 @@ static RPCHelpMan createblindedaddress()
{"blinding_key", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The blinding public key. This can be obtained for a given address using `getaddressinfo` (`confidential_key` field)."},
},
RPCResult{
RPCResult::Type::STR, "blinded_address", "The blinded address"
RPCResult::Type::STR, "", "The blinded address string"
},
RPCExamples{
"\nCreate a blinded address\n"
Expand Down
14 changes: 7 additions & 7 deletions src/rpc/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -580,17 +580,17 @@ static RPCHelpMan getnetworkinfo()
{RPCResult::Type::NUM, "version", "the server version"},
{RPCResult::Type::STR, "subversion", "the server subversion string"},
{RPCResult::Type::NUM, "protocolversion", "the protocol version"},
{RPCResult::Type::STR_HEX, "localservices", "the services we offer to the network"},
{RPCResult::Type::ARR, "localservicesnames", "the services we offer to the network, in human-readable form",
{RPCResult::Type::STR_HEX, "localservices", /*optional=*/true, "the services we offer to the network"},
{RPCResult::Type::ARR, "localservicesnames", /*optional=*/true, "the services we offer to the network, in human-readable form",
{
{RPCResult::Type::STR, "SERVICE_NAME", "the service name"},
}},
{RPCResult::Type::BOOL, "localrelay", "true if transaction relay is requested from peers"},
{RPCResult::Type::BOOL, "localrelay", /*optional=*/true, "true if transaction relay is requested from peers"},
{RPCResult::Type::NUM, "timeoffset", "the time offset"},
{RPCResult::Type::NUM, "connections", "the total number of connections"},
{RPCResult::Type::NUM, "connections_in", "the number of inbound connections"},
{RPCResult::Type::NUM, "connections_out", "the number of outbound connections"},
{RPCResult::Type::BOOL, "networkactive", "whether p2p networking is enabled"},
{RPCResult::Type::NUM, "connections", /*optional=*/true, "the total number of connections"},
{RPCResult::Type::NUM, "connections_in", /*optional=*/true, "the number of inbound connections"},
{RPCResult::Type::NUM, "connections_out", /*optional=*/true, "the number of outbound connections"},
{RPCResult::Type::BOOL, "networkactive", /*optional=*/true, "whether p2p networking is enabled"},
{RPCResult::Type::ARR, "networks", "information per network",
{
{RPCResult::Type::OBJ, "", "",
Expand Down
Loading