Util RPC Commands
Documentation for Raptoreum Util RPC calls.
createmultisig
Creates a multi-signature address with n signature of m keys required. It returns a json object with the address and redeemScript.
Arguments
| Position | Name | Type | Required | Default | Description |
|---|---|---|---|---|---|
| 1 | nrequired | numeric | True | The number of required signatures out of the n keys. | |
| 2 | keys | json array | True | A json array of hex-encoded public keys. | |
| Keys | |||||
| 2.1 | key | string | The hex-encoded public key. | ||
| ### Result | |||||
|
|||||
| ### Examples | |||||
|
|||||
|
|||||
|
|||||
|
deriveaddresses
Derives one or more addresses corresponding to an output descriptor.
Examples of output descriptors are:
pkh(
Arguments
| Position | Name | Type | Required | Default | Description |
|---|---|---|---|---|---|
| 1 | descriptor | string | True | The descriptor | |
| 2 | range | numeric or array | False | If a ranged descriptor is used, this specifies the beginning of the range (in [begin,end] notation) to derive. | |
| ### Result | |||||
|
|||||
| ### Examples | |||||
|
|||||
|
estimatesmartfee
Estimates the approximate fee per kilobyte needed for a transaction to begin confirmation within conf_target blocks if possible and return the number of blocks for which the estimate is valid.
Arguments
| Position | Name | Type | Required | Default | Description |
|---|---|---|---|---|---|
| 1 | conf_target | numeric | True | Confirmation target in blocks (1 - 1008) | |
| 2 | estimate_mode | string | False | CONSERVATIVE | The fee estimate mode. |
Result
{ (json object)
"feerate" : n, (numeric, optional) estimate fee rate in RTM/kB
"errors" : [ (json array) Errors encountered during processing
"str", (string) error
...
],
"blocks" : n (numeric) block number where estimate was found
The request target will be clamped between 2 and the highest target
fee estimation is able to return based on how long it has been running.
An error is returned if not enough transactions and blocks
have been observed to make an estimate for any number of blocks.
}
Examples
raptoreum-cli estimatesmartfee 6
getdescriptorinfo
Analyses a descriptor.
Arguments
| Position | Name | Type | Required | Default | Description |
|---|---|---|---|---|---|
Result
{ (json object)
"descriptor" : "str", (string) The descriptor in canonical form, without private keys
"checksum" : "str", (string) The checksum for the input descriptor
"isrange" : true|false, (boolean) Whether the descriptor is ranged
"issolvable" : true|false, (boolean) Whether the descriptor is solvable
"hasprivatekeys" : true|false (boolean) Whether the input descriptor contained at least one private key
}
Examples
Analyse a descriptor
raptoreum-cli getdescriptorinfo "pkh([d34db33f/84h/0h/0h]0279be667ef9dcbbac55a06295Ce870b07029Bfcdb2dce28d959f2815b16f81798)"
signmessagewithprivkey
Sign a message with the private key of an address
Arguments
| Position | Name | Type | Required | Default | Description |
|---|---|---|---|---|---|
Result
"str" (string) The signature of the message encoded in base 64
Examples
Create the signature
raptoreum-cli signmessagewithprivkey "privkey" "my message"
Verify the signature
raptoreum-cli verifymessage "XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwG" "signature" "my message"
As json rpc
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "signmessagewithprivkey", "params": ["privkey", "my message"] }' -H 'content-type: text/plain;' http://127.0.0.1:10225/
validateaddress
Return information about the given raptoreum address.
Arguments
| Position | Name | Type | Required | Default | Description |
|---|---|---|---|---|---|
Result
{ (json object)
"isvalid" : true|false, (boolean) If the address is valid or not. If not, this is the only property returned.
"address" : "str", (string) The raptoreum address validated
"scriptPubKey" : "hex", (string) The hex-encoded scriptPubKey generated by the address
"isscript" : true|false (boolean) If the key is a script
}
Examples
raptoreum-cli validateaddress "XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "validateaddress", "params": ["XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg"] }' -H 'content-type: text/plain;' http://127.0.0.1:10225/
verifymessage
Verify a signed message
Arguments
| Position | Name | Type | Required | Default | Description |
|---|---|---|---|---|---|
Result
true|false (boolean) If the signature is verified or not.
Examples
Unlock the wallet for 30 seconds
raptoreum-cli walletpassphrase "mypassphrase" 30
Create the signature
raptoreum-cli signmessage "XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwG" "my message"
Verify the signature
raptoreum-cli verifymessage "XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwG" "signature" "my message"
As json rpc
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "verifymessage", "params": ["XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwG", "signature", "my message"] }' -H 'content-type: text/plain;' http://127.0.0.1:10225/