Util
createmultisig
createmultisig nrequired [ "key", ... ]
The createmultisig
method creates a multi-signature address with n
signature(s) of m
key(s) required. The method returns a json object with the address and redeemScript.
Arguments
Name
Type
Description
number_required
(numeric, required)
the number of required signatures out of the n
key(s) or address(es)
"keys"
(string, required)
a json array of keys which are addresses or hex-encoded public keys
"key"
(string)
an address or hex-encoded public key
Response
Name
Type
Description
"address"
(string)
the value of the new multisig address
"redeemScript"
(string)
the string value of the hex-encoded redemption script
📌 Examples
Command:
<collapse-text hidden title="Response">
</collapse-text>
You can find the rpcuser
, rpcpassword
, and rpcport
in the coin's .conf
file.
Command:
<collapse-text hidden title="Response">
</collapse-text>
decodeccopret
decodeccopret scriptPubKey
The decodeccopret
method decodes the OP RETURN data from a CC transaction to output the EVALCODE
and function id
of the method that produced the transaction.
Finding the OP RETURN Data From a CC Transaction
The OP RETURN data from a CC transaction can be found by following these steps:
Decode a transaction produced by a CC module using the method getrawtransaction's verbose option.
Look for the
vout
key; it is an array of jsonsFind the json that contains the
scriptPubkey
, and which has thetype:nulldata
key pairCopy the
hex
value from thatscriptPubkey
jsonThis is the hex-string that is expected as the argument for the above method.
You can verify that the transaction was produced by a CC module by checking if one of the
vout
json'sscriptPubkey
json has thetype:cryptocondition
key pair
Arguments
Name
Type
Description
scriptPubKey
(string)
the hex-string format scriptPubKey
of the type
: nulldata
in the vout
of a transaction produced by a CC module
Response
Name
Type
Description
result
(string)
whether the call succeeded
OpRets
(json)
a json containing the keys EVALCODE
and function id
eval_code
(hexadecimal number)
the EVALCODE
of the method that produced the transaction
function
(string)
the function id
of the method that produced the transaction
📌 Examples
Command:
<collapse-text hidden title="Response">
</collapse-text>
You can find the rpcuser
, rpcpassword
, and rpcport
in the coin's .conf
file.
Command:
<collapse-text hidden title="Response">
</collapse-text>
estimatefee
estimatefee nblocks
The estimatefee
method estimates the approximate fee per kilobyte. The method is needed for a transaction to begin confirmation within nblocks
blocks.
The value -1.0
is returned if not enough transactions and blocks have been observed to make an estimate.
Arguments
Name
Type
Description
nblocks
(numeric)
the number of blocks within which the fee should be tested
Response
Name
Type
Description
n
(numeric)
the estimated fee
📌 Examples
Command:
<collapse-text hidden title="Response">
</collapse-text>
estimatepriority
estimatepriority nblocks
The estimatepriority
method estimates the approximate priority of a zero-fee transaction, when it needs to begin confirmation within nblocks
blocks.
The value -1.0
is returned if not enough transactions and blocks have been observed to make an estimate.
Arguments
Name
Type
Description
nblocks
(numeric)
a statement indicating within how many blocks the transaction should be confirmed
Response
Name
Type
Description
n
(numeric)
the estimated priority
📌 Examples
Command:
<collapse-text hidden title="Response">
</collapse-text>
invalidateblock
invalidateblock "hash"
The invalidateblock
method permanently marks a block as invalid, as if it violated a consensus rule.
Arguments
Name
Type
Description
hash
(string, required)
the hash of the block to mark as invalid
Response
Name
Type
Description
(none)
📌 Examples
Command:
<collapse-text hidden title="Response">
</collapse-text>
You can find the rpcuser
, rpcpassword
, and rpcport
in the coin's .conf
file.
Command:
<collapse-text hidden title="Response">
</collapse-text>
reconsiderblock
reconsiderblock "hash"
The reconsiderblock
method removes invalidity status of a block and its descendants, reconsidering them for activation. This can be used to undo the effects of the invalidateblock
method.
Arguments
Name
Type
Description
hash
(string, required)
the hash of the block to reconsider
Response
Name
Type
Description
(none)
📌 Examples
Command:
<collapse-text hidden title="Response">
</collapse-text>
txnotarizedconfirmed
txnotarizedconfirmed txid
The txnotarizedconfirmed
method returns information about a transaction's state of confirmation.
If the transaction is on a chain that has Komodo's dPoW security service, the method returns true
if the transaction is notarized.
If the chain does not have dPoW, the method returned true
if the confirmation number is greater than 60
.
Arguments
Name
Type
Description
"txid"
(string, required)
the transaction id
Response
Name
Type
Description
"result"
(boolean)
whether the transaction is confirmed, for dPoW-based chains; for non-dPoW chains, the value indicates whether the transaction has 60
or more confirmations
📌 Examples
Command:
<collapse-text hidden title="Response">
</collapse-text>
validateaddress
validateaddress "komodoaddress"
The validateaddress
method returns information about the given address.
Arguments
Name
Type
Description
"address"
(string, required)
the address to validate
Response
Name
Type
Description
"isvalid"
(boolean)
indicates whether the address is valid. If it is not, this is the only property returned.
"address"
(string)
the address validated
"scriptPubKey"
(string)
the hex encoded scriptPubKey generated by the address
"ismine"
(boolean)
indicates whether the address is yours
"isscript"
(boolean)
whether the key is a script
"pubkey"
(string)
the hex value of the raw public key
"iscompressed"
(boolean)
whether the address is compressed
"account"
(string)
DEPRECATED the account associated with the address; "" is the default account
📌 Examples
Command:
<collapse-text hidden title="Response">
</collapse-text>
verifymessage
verifymessage "address" "signature" "message"
The verifymessage
method verifies a signed message.
::: tip See also signmessage. :::
Arguments
Name
Type
Description
"address"
(string, required)
the address to use for the signature
"signature"
(string, required)
the signature provided by the signer in base 64 encoding
"message"
(string, required)
the message that was signed
Response
Name
Type
Description
true/false
(boolean)
indicates whether the signature is verified
📌 Examples
Create the signature:
Command:
<collapse-text hidden title="Response">
</collapse-text>
Verify the signature:
Command:
<collapse-text hidden title="Response">
</collapse-text>
z_validateaddress
z_validateaddress "zaddr"
The z_validateaddress
method returns information about the given z address.
Arguments
Name
Type
Description
"zaddr"
(string, required)
the z address to validate
Response
Name
Type
Description
"isvalid"
(boolean)
indicates whether the address is valid; if not, this is the only property returned
"address"
(string)
the z address validated
"ismine"
(boolean)
indicates if the address is yours or not
"payingkey"
(string)
the hex value of the paying key, a_pk
"transmissionkey"
(string)
the hex value of the transmission key, pk_enc
📌 Examples
Command:
<collapse-text hidden title="Response">
</collapse-text>
Last updated
Was this helpful?