You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I also moved some RPC methods that were not at the end of the file with
the other ELEMENTS RPC methods. This makes the diff on my machine look
crazy. Let's hope GitHub has more intelligent diffs..
"\nGets hex representation of a proposed, unmined new block\n"
993
-
"\nArguments:\n"
994
-
"1. min_tx_age (numeric, optional, default=0) How many seconds a transaction must have been in the mempool to be inluded in the block proposal. This may help with faster block convergence among functionaries using compact blocks.\n"
995
-
"\nResult\n"
994
+
RPCHelpMan{"getnewblockhex",
995
+
"\nGets hex representation of a proposed, unmined new block\n",
996
+
{
997
+
{"min_tx_age", RPCArg::Type::NUM, /* default */"0", "How many seconds a transaction must have been in the mempool to be inluded in the block proposal. This may help with faster block convergence among functionaries using compact blocks."},
998
+
},
999
+
RPCResult{
996
1000
"blockhex (hex) The block hex\n"
997
-
"\nExamples:\n"
998
-
+ HelpExampleCli("getnewblockhex", "")
999
-
);
1001
+
},
1002
+
RPCExamples{
1003
+
HelpExampleCli("getnewblockhex", ""),
1004
+
}
1005
+
}.ToString());
1000
1006
1001
1007
int required_wait = !request.params[0].isNull() ? request.params[0].get_int() : 0;
"2. \"block_transactions\" (string, required), Hex serialized BlockTransactions, the response to getblocktxn.\n"
1243
-
"3. \"found_transactions\" (string, required), Hex serialized list of transactions that were found in response to receiving a compact sketch in `consumecompactsketch`.\n"
1244
-
"\nResult\n"
1257
+
RPCHelpMan{"finalizecompactblock",
1258
+
"Takes the two transaction lists, fills out the compact block and attempts to finalize it.",
{"block_transactions", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "Hex serialized BlockTransactions, the response to getblocktxn."},
1262
+
{"found_transactions", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "Hex serialized list of transactions that were found in response to receiving a compact sketch in `consumecompactsketch`."},
if (request.fHelp || request.params.size() < 1 || request.params.size() > 2)
1291
1313
throwstd::runtime_error(
1292
-
"testproposedblock \"blockhex\"\n"
1293
-
"\nChecks a block proposal for validity, and that it extends chaintip\n"
1294
-
"\nArguments:\n"
1295
-
"1. \"blockhex\" (string, required) The hex-encoded block from getnewblockhex\n"
1296
-
"2. \"acceptnonstd\" (bool, optional) If set false, returns error if block contains non-standard transaction. Default is set via `-acceptnonstdtxn`. If PAK enforcement is set, block commitment mismatches with configuration PAK lists are rejected as well.\n"
1297
-
"\nResult\n"
1298
-
"\nExamples:\n"
1299
-
+ HelpExampleCli("testproposedblock", "<hex>")
1300
-
);
1314
+
RPCHelpMan{"testproposedblock",
1315
+
"\nChecks a block proposal for validity, and that it extends chaintip\n",
1316
+
{
1317
+
{"blockhex", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The hex-encoded block from getnewblockhex"},
1318
+
{"acceptnonstd", RPCArg::Type::BOOL, RPCArg::Optional::OMITTED_NAMED_ARG, "If set false, returns error if block contains non-standard transaction. Default is set via `-acceptnonstdtxn`. If PAK enforcement is set, block commitment mismatches with configuration PAK lists are rejected as well."},
1319
+
},
1320
+
RPCResults{},
1321
+
RPCExamples{
1322
+
HelpExampleCli("testproposedblock", "<hex>")
1323
+
}
1324
+
}.ToString());
1301
1325
1302
1326
CBlock block;
1303
1327
if (!DecodeHexBlk(block, request.params[0].get_str()))
"1. \"claim_script\" (string, required) Script to tweak the fedpegscript with. For example obtained as a result of getpeginaddress.\n"
640
-
"\nResult:\n"
636
+
RPCHelpMan{"tweakfedpegscript",
637
+
"\nReturns a tweaked fedpegscript.\n",
638
+
{
639
+
{"claim_script", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "Script to tweak the fedpegscript with. For example obtained as a result of getpeginaddress."},
640
+
},
641
+
RPCResult{
641
642
"{\n"
642
643
"\"script\" (string) The fedpegscript tweaked with claim_script\n"
643
644
"\"address\" (string) The address corresponding to the tweaked fedpegscript\n"
644
645
"}\n"
645
-
);
646
-
646
+
},
647
+
RPCExamples{""},
648
+
}.ToString());
647
649
648
650
if (!IsHex(request.params[0].get_str())) {
649
651
throwJSONRPCError(RPC_TYPE_ERROR, "the first argument must be a hex string");
"\nCreates a blinded address using the provided blinding key.\n"
787
-
"\nArguments:\n"
788
-
"1. \"address\" (string, required) The unblinded address to be blinded.\n"
789
-
"2. \"blinding_key\" (string, required) The blinding public key. This can be obtained for a given address using `validateaddress`.\n"
790
-
"\nResult:\n"
793
+
RPCHelpMan{"createblindedaddress",
794
+
"\nCreates a blinded address using the provided blinding key.\n",
795
+
{
796
+
{"address", RPCArg::Type::STR, RPCArg::Optional::NO, "The unblinded address to be blinded."},
797
+
{"blinding_key", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The blinding public key. This can be obtained for a given address using `validateaddress`."},
798
+
},
799
+
RPCResult{
791
800
"\"blinded_address\" (string) The blinded address.\n"
0 commit comments