RPC Reference

Remote Procedure Call (RPC) is a powerful technology that enables the execution of commands across a network, allowing software components to communicate with each other. In the context of Stohn Coin, the RPC interface provides developers with the ability to query and interact with the Stohn Coin network programmatically. This means you can issue commands to perform various actions, such as creating transactions, managing wallets, and retrieving blockchain information, all through simple code. This RPC reference page serves as your guide to utilizing the RPC commands for Stohn Coin, offering detailed information on each available command and how to use them effectively in your applications. Whether you're developing new software or integrating with existing systems, this resource aims to empower you with the tools needed for seamless interaction with the Stohn Coin ecosystem.

  • abandon transaction

    abandontransaction "txid"

    Mark in-wallet transaction <txid> as abandoned This will mark this transaction and all its in-wallet descendants as abandoned which will allow for their inputs to be respent. It can be used to replace “stuck” or evicted transactions.

    It only works on transactions which are not included in a block and are not currently in the mempool.

    It has no effect on transactions which are already abandoned.

    Argument #1 - txid

    Type: string, required

    The transaction id

    Result

    null    (json null)
                            

    Examples

    stohncoin-cli abandontransaction "1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "abandontransaction", "params": ["1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • abort rescan

    abortrescan

    Stops current wallet rescan triggered by an RPC call, e.g. by an importprivkey call.

    Note: Use “getwalletinfo” to query the scanning progress.

    Result

    Name

    Type

    Description

    true|false

    boolean

    Whether the abort was successful

    Examples

    Import a private key:

    stohncoin-cli importprivkey "mykey"
                            

    Abort the running wallet rescan:

    stohncoin-cli abortrescan
                            

    As a JSON-RPC call:

    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "abortrescan", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • add multisig address

    addmultisigaddress nrequired ["key",...] ( "label" "address_type" )

    Add an nrequired-to-sign multisignature address to the wallet. Requires a new wallet backup.

    Each key is a Stohncoin address or hex-encoded public key.

    This functionality is only intended for use with non-watchonly addresses.

    See importaddress for watchonly p2sh address support.

    If ‘label’ is specified, assign address to that label.

    Argument #1 - nrequired

    Type: numeric, required

    The number of required signatures out of the n keys or addresses.

    Argument #2 - keys

    Type: json array, required

    The stohncoin addresses or hex-encoded public keys

    [
                              "key",      (string) stohncoin address or hex-encoded public key
                              ...
                            ]
                            

    Argument #3 - label

    Type: string, optional

    A label to assign the addresses to.

    Argument #4 - address_type

    Type: string, optional, default=set by -addresstype

    The address type to use. Options are “legacy”, “p2sh-segwit”, and “bech32”.

    Result

    {                            (json object)
                              "address" : "str",         (string) The value of the new multisig address
                              "redeemScript" : "hex",    (string) The string value of the hex-encoded redemption script
                              "descriptor" : "str"       (string) The descriptor for this multisig
                            }
                            

    Examples

    Add a multisig address from 2 addresses:

    stohncoin-cli addmultisigaddress 2 "[\"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl\",\"bc1q02ad21edsxd23d32dfgqqsz4vv4nmtfzuklhy3\"]"
                            

    As a JSON-RPC call:

    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "addmultisigaddress", "params": [2, "[\"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl\",\"bc1q02ad21edsxd23d32dfgqqsz4vv4nmtfzuklhy3\"]"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • add node

    addnode "node" "command"

    Attempts to add or remove a node from the addnode list.

    Or try a connection to a node once.

    Nodes added using addnode (or -connect) are protected from DoS disconnection and are not required to be full nodes/support SegWit as other outbound peers are (though such peers will not be synced from).

    Argument #1 - node

    Type: string, required

    The node (see getpeerinfo for nodes)

    Argument #2 - command

    Type: string, required

    ‘add’ to add a node to the list, ‘remove’ to remove a node from the list, ‘onetry’ to try a connection to the node once

    Result

    null    (json null)
                            

    Examples

    stohncoin-cli addnode "192.168.0.6:8333" "onetry"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "addnode", "params": ["192.168.0.6:8333", "onetry"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • analyzepsbt

    analyzepsbt "psbt"

    Analyzes and provides information about the current status of a PSBT and its inputs

    Argument #1 - psbt

    Type: string, required

    A base64 string of a PSBT

    Result

    {                                   (json object)
                              "inputs" : [                      (json array)
                                {                               (json object)
                                  "has_utxo" : true|false,      (boolean) Whether a UTXO is provided
                                  "is_final" : true|false,      (boolean) Whether the input is finalized
                                  "missing" : {                 (json object, optional) Things that are missing that are required to complete this input
                                    "pubkeys" : [               (json array, optional)
                                      "hex",                    (string) Public key ID, hash160 of the public key, of a public key whose BIP 32 derivation path is missing
                                      ...
                                    ],
                                    "signatures" : [            (json array, optional)
                                      "hex",                    (string) Public key ID, hash160 of the public key, of a public key whose signature is missing
                                      ...
                                    ],
                                    "redeemscript" : "hex",     (string, optional) Hash160 of the redeemScript that is missing
                                    "witnessscript" : "hex"     (string, optional) SHA256 of the witnessScript that is missing
                                  },
                                  "next" : "str"                (string, optional) Role of the next person that this input needs to go to
                                },
                                ...
                              ],
                              "estimated_vsize" : n,            (numeric, optional) Estimated vsize of the final signed transaction
                              "estimated_feerate" : n,          (numeric, optional) Estimated feerate of the final signed transaction in SOH/kB. Shown only if all UTXO slots in the PSBT have been filled
                              "fee" : n,                        (numeric, optional) The transaction fee paid. Shown only if all UTXO slots in the PSBT have been filled
                              "next" : "str",                   (string) Role of the next person that this psbt needs to go to
                              "error" : "str"                   (string, optional) Error message (if there is one)
                            }
                            

    Examples

    stohncoin-cli analyzepsbt "psbt"
                            
  • backup wallet

    backupwallet "destination"

    Safely copies current wallet file to destination, which can be a directory or a path with filename.

    Argument #1 - destination

    Type: string, required

    The destination directory or file

    Result

    null    (json null)
                            

    Examples

    stohncoin-cli backupwallet "backup.dat"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "backupwallet", "params": ["backup.dat"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • bumpfee

    bumpfee "txid" ( options )

    Bumps the fee of an opt-in-RBF transaction T, replacing it with a new transaction B.

    An opt-in RBF transaction with the given txid must be in the wallet.

    The command will pay the additional fee by reducing change outputs or adding inputs when necessary.

    It may add a new change output if one does not already exist.

    All inputs in the original transaction will be included in the replacement transaction.

    The command will fail if the wallet or mempool contains a transaction that spends one of T’s outputs.

    By default, the new fee will be calculated automatically using the estimatesmartfee RPC.

    The user can specify a confirmation target for estimatesmartfee.

    Alternatively, the user can specify a fee rate in sat/vB for the new transaction.

    At a minimum, the new fee rate must be high enough to pay an additional new relay fee (incrementalfee returned by getnetworkinfo) to enter the node’s mempool.

    * WARNING: before version 0.21, fee_rate was in SOH/kvB. As of 0.21, fee_rate is in sat/vB. *

    Argument #1 - txid

    Type: string, required

    The txid to be bumped

    Argument #2 - options

    Type: json object, optional

    {
                              "conf_target": n,          (numeric, optional, default=wallet -txconfirmtarget) Confirmation target in blocks
    
                              "fee_rate": amount,        (numeric or string, optional, default=not set, fall back to wallet fee estimation)
                                                         Specify a fee rate in sat/vB instead of relying on the built-in fee estimator.
                                                         Must be at least 1.000 sat/vB higher than the current transaction fee rate.
                                                         WARNING: before version 0.21, fee_rate was in SOH/kvB. As of 0.21, fee_rate is in sat/vB.
    
                              "replaceable": bool,       (boolean, optional, default=true) Whether the new transaction should still be
                                                         marked bip-125 replaceable. If true, the sequence numbers in the transaction will
                                                         be left unchanged from the original. If false, any input sequence numbers in the
                                                         original transaction that were less than 0xfffffffe will be increased to 0xfffffffe
                                                         so the new transaction will not be explicitly bip-125 replaceable (though it may
                                                         still be replaceable in practice, for example if it has unconfirmed ancestors which
                                                         are replaceable).
    
                              "estimate_mode": "str",    (string, optional, default=unset) The fee estimate mode, must be one of (case insensitive):
                                                         "unset"
                                                         "economical"
                                                         "conservative"
                            }
                            

    Result

    {                    (json object)
                              "psbt" : "str",    (string) The base64-encoded unsigned PSBT of the new transaction. Only returned when wallet private keys are disabled. (DEPRECATED)
                              "txid" : "hex",    (string) The id of the new transaction. Only returned when wallet private keys are enabled.
                              "origfee" : n,     (numeric) The fee of the replaced transaction.
                              "fee" : n,         (numeric) The fee of the new transaction.
                              "errors" : [       (json array) Errors encountered during processing (may be empty).
                                "str",           (string)
                                ...
                              ]
                            }
                            

    Examples

    Bump the fee, get the new transaction’stxid:

    stohncoin-cli bumpfee <txid>
                            
  • clearbanned

    clearbanned

    Clear all banned IPs.

    Result

    null    (json null)
                            

    Examples

    stohncoin-cli clearbanned
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "clearbanned", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • combinepsbt

    combinepsbt ["psbt",...]

    Combine multiple partially signed Stohncoin transactions into one transaction.

    Implements the Combiner role.

    Argument #1 - txs

    Type: json array, required

    The base64 strings of partially signed transactions

    [
                              "psbt",    (string) A base64 string of a PSBT
                              ...
                            ]
                            

    Result

    Name

    Type

    Description

    str

    string

    The base64-encoded partially signed transaction

    Examples

    stohncoin-cli combinepsbt '["mybase64_1", "mybase64_2", "mybase64_3"]'
                            
  • combinerawtransaction

    combinerawtransaction ["hexstring",...]

    Combine multiple partially signed transactions into one transaction.

    The combined transaction may be another partially signed transaction or a fully signed transaction.

    Argument #1 - txs

    Type: json array, required

    The hex strings of partially signed transactions

    [
                              "hexstring",    (string) A hex-encoded raw transaction
                              ...
                            ]
                            

    Result

    Name

    Type

    Description

    str

    string

    The hex-encoded raw transaction with signature(s)

    Examples

    stohncoin-cli combinerawtransaction '["myhex1", "myhex2", "myhex3"]'
                            
  • converttopsbt

    converttopsbt "hexstring" ( permitsigdata iswitness )

    Converts a network serialized transaction to a PSBT. This should be used only with createrawtransaction and fundrawtransaction createpsbt and walletcreatefundedpsbt should be used for new applications.

    Argument #1 - hexstring

    Type: string, required

    The hex string of a raw transaction

    Argument #2 - permitsigdata

    Type: boolean, optional, default=false

    If true, any signatures in the input will be discarded and conversion

    will continue. If false, RPC will fail if any signatures are present.

    Argument #3 - iswitness

    Type: boolean, optional, default=depends on heuristic tests

    Whether the transaction hex is a serialized witness transaction.

    If iswitness is not present, heuristic tests will be used in decoding. If true, only witness deserialization will be tried. If false, only non-witness deserialization will be tried. This boolean should reflect whether the transaction has inputs (e.g. fully valid, or on-chain transactions), if known by the caller.

    Result

    Name

    Type

    Description

    str

    string

    The resulting raw transaction (base64-encoded string)

    Examples

    Create a transaction:

    stohncoin-cli createrawtransaction "[{\"txid\":\"myid\",\"vout\":0}]" "[{\"data\":\"00010203\"}]"
                            

    Convert the transaction to a PSBT:

    stohncoin-cli converttopsbt "rawtransaction"
                            
  • createmultisig

    createmultisig nrequired ["key",...] ( "address_type" )

    Creates a multi-signature address with n signature of m keys required.

    It returns a json object with the address and redeemScript.

    Argument #1 - nrequired

    Type: numeric, required

    The number of required signatures out of the n keys.

    Argument #2 - keys

    Type: json array, required

    The hex-encoded public keys.

    [
                              "key",      (string) The hex-encoded public key
                              ...
                            ]
                            

    Argument #3 - address_type

    Type: string, optional, default=legacy

    The address type to use. Options are “legacy”, “p2sh-segwit”, and “bech32”.

    Result

    {                            (json object)
                              "address" : "str",         (string) The value of the new multisig address.
                              "redeemScript" : "hex",    (string) The string value of the hex-encoded redemption script.
                              "descriptor" : "str"       (string) The descriptor for this multisig
                            }
                            

    Examples

    Create a multisig address from 2 public keys:

    stohncoin-cli createmultisig 2 "[\"03789ed0bb717d88f7d321a368d905e7430207ebbd82bd342cf11ae157a7ace5fd\",\"03dbc6764b8884a92e871274b87583e6d5c2a58819473e17e107ef3f6aa5a61626\"]"
                            

    As a JSON-RPC call:

    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "createmultisig", "params": [2, "[\"03789ed0bb717d88f7d321a368d905e7430207ebbd82bd342cf11ae157a7ace5fd\",\"03dbc6764b8884a92e871274b87583e6d5c2a58819473e17e107ef3f6aa5a61626\"]"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • createpsbt

    createpsbt [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount},{"data":"hex"},...] ( locktime replaceable )

    Creates a transaction in the Partially Signed Transaction format.

    Implements the Creator role.

    Argument #1 - inputs

    Type: json array, required

    The json objects

    [
                              {                       (json object)
                                "txid": "hex",        (string, required) The transaction id
                                "vout": n,            (numeric, required) The output number
                                "sequence": n,        (numeric, optional, default=depends on the value of the 'replaceable' and 'locktime' arguments) The sequence number
                              },
                              ...
                            ]
                            

    Argument #2 - outputs

    Type: json array, required

    The outputs (key-value pairs), where none of the keys are duplicated.

    That is, each address can only appear once and there can only be one ‘data’ object. For compatibility reasons, a dictionary, which holds the key-value pairs directly, is also accepted as second parameter.

    [
                              {                       (json object)
                                "address": amount,    (numeric or string, required) A key-value pair. The key (string) is the stohncoin address, the value (float or string) is the amount in SOH
                              },
                              {                       (json object)
                                "data": "hex",        (string, required) A key-value pair. The key must be "data", the value is hex-encoded data
                              },
                              ...
                            ]
                            

    Argument #3 - locktime

    Type: numeric, optional, default=0

    Raw locktime. Non-0 value also locktime-activates inputs

    Argument #4 - replaceable

    Type: boolean, optional, default=false

    Marks this transaction as BIP125 replaceable.

    Allows this transaction to be replaced by a transaction with higher fees. If provided, it is an error if explicit sequence numbers are incompatible.

    Result

    Name

    Type

    Description

    str

    string

    The resulting raw transaction (base64-encoded string)

    Examples

    stohncoin-cli createpsbt "[{\"txid\":\"myid\",\"vout\":0}]" "[{\"data\":\"00010203\"}]"
                            
  • createrawtransaction

    createrawtransaction [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount},{"data":"hex"},...] ( locktime replaceable )

    Create a transaction spending the given inputs and creating new outputs.

    Outputs can be addresses or data.

    Returns hex-encoded raw transaction.

    Note that the transaction’s inputs are not signed, and it is not stored in the wallet or transmitted to the network.

    Argument #1 - inputs

    Type: json array, required

    The inputs

    [
                              {                       (json object)
                                "txid": "hex",        (string, required) The transaction id
                                "vout": n,            (numeric, required) The output number
                                "sequence": n,        (numeric, optional, default=depends on the value of the 'replaceable' and 'locktime' arguments) The sequence number
                              },
                              ...
                            ]
                            

    Argument #2 - outputs

    Type: json array, required

    The outputs (key-value pairs), where none of the keys are duplicated.

    That is, each address can only appear once and there can only be one ‘data’ object. For compatibility reasons, a dictionary, which holds the key-value pairs directly, is also accepted as second parameter.

    [
                              {                       (json object)
                                "address": amount,    (numeric or string, required) A key-value pair. The key (string) is the stohncoin address, the value (float or string) is the amount in SOH
                              },
                              {                       (json object)
                                "data": "hex",        (string, required) A key-value pair. The key must be "data", the value is hex-encoded data
                              },
                              ...
                            ]
                            

    Argument #3 - locktime

    Type: numeric, optional, default=0

    Raw locktime. Non-0 value also locktime-activates inputs

    Argument #4 - replaceable

    Type: boolean, optional, default=false

    Marks this transaction as BIP125-replaceable.

    Allows this transaction to be replaced by a transaction with higher fees. If provided, it is an error if explicit sequence numbers are incompatible.

    Result

    Name

    Type

    Description

    hex

    string

    hex string of the transaction

    Examples

    stohncoin-cli createrawtransaction "[{\"txid\":\"myid\",\"vout\":0}]" "[{\"address\":0.01}]"
                            
    stohncoin-cli createrawtransaction "[{\"txid\":\"myid\",\"vout\":0}]" "[{\"data\":\"00010203\"}]"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "createrawtransaction", "params": ["[{\"txid\":\"myid\",\"vout\":0}]", "[{\"address\":0.01}]"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "createrawtransaction", "params": ["[{\"txid\":\"myid\",\"vout\":0}]", "[{\"data\":\"00010203\"}]"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • creatwallet

    createwallet "wallet_name" ( disable_private_keys blank "passphrase" avoid_reuse descriptors load_on_startup )

    Creates and loads a new wallet.

    Argument #1 - wallet_name

    Type: string, required

    The name for the new wallet. If this is a path, the wallet will be created at the path location.

    Argument #2 - disable_private_keys

    Type: boolean, optional, default=false

    Disable the possibility of private keys (only watchonlys are possible in this mode).

    Argument #3 - blank

    Type: boolean, optional, default=false

    Create a blank wallet. A blank wallet has no keys or HD seed. One can be set using sethdseed.

    Argument #4 - passphrase

    Type: string

    Encrypt the wallet with this passphrase.

    Argument #5 - avoid_reuse

    Type: boolean, optional, default=false

    Keep track of coin reuse, and treat dirty and clean coins differently with privacy considerations in mind.

    Argument #6 - descriptors

    Type: boolean, optional, default=false

    Create a native descriptor wallet. The wallet will use descriptors internally to handle address creation

    Argument #7 - load_on_startup

    Type: boolean, optional, default=null

    Save wallet name to persistent settings and load on startup. True to add wallet to startup list, false to remove, null to leave unchanged.

    Result

    {                       (json object)
                              "name" : "str",       (string) The wallet name if created successfully. If the wallet was created using a full path, the wallet_name will be the full path.
                              "warning" : "str"     (string) Warning message if wallet was not loaded cleanly.
                            }
                            

    Examples

    stohncoin-cli createwallet "testwallet"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "createwallet", "params": ["testwallet"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • decodepbst

    decodepsbt "psbt"

    Return a JSON object representing the serialized, base64-encoded partially signed Stohncoin transaction.

    Argument #1 - psbt

    Type: string, required

    The PSBT base64 string

    Result

    {                                          (json object)
                              "tx" : {                                 (json object) The decoded network-serialized unsigned transaction.
                                ...                                    The layout is the same as the output of decoderawtransaction.
                              },
                              "unknown" : {                            (json object) The unknown global fields
                                "key" : "hex",                         (string) (key-value pair) An unknown key-value pair
                                ...
                              },
                              "inputs" : [                             (json array)
                                {                                      (json object)
                                  "non_witness_utxo" : {               (json object, optional) Decoded network transaction for non-witness UTXOs
                                    ...
                                  },
                                  "witness_utxo" : {                   (json object, optional) Transaction output for witness UTXOs
                                    "amount" : n,                      (numeric) The value in SOH
                                    "scriptPubKey" : {                 (json object)
                                      "asm" : "str",                   (string) The asm
                                      "hex" : "hex",                   (string) The hex
                                      "type" : "str",                  (string) The type, eg 'pubkeyhash'
                                      "address" : "str"                (string)  Stohncoin address if there is one
                                    }
                                  },
                                  "partial_signatures" : {             (json object, optional)
                                    "pubkey" : "str",                  (string) The public key and signature that corresponds to it.
                                    ...
                                  },
                                  "sighash" : "str",                   (string, optional) The sighash type to be used
                                  "redeem_script" : {                  (json object, optional)
                                    "asm" : "str",                     (string) The asm
                                    "hex" : "hex",                     (string) The hex
                                    "type" : "str"                     (string) The type, eg 'pubkeyhash'
                                  },
                                  "witness_script" : {                 (json object, optional)
                                    "asm" : "str",                     (string) The asm
                                    "hex" : "hex",                     (string) The hex
                                    "type" : "str"                     (string) The type, eg 'pubkeyhash'
                                  },
                                  "bip32_derivs" : [                   (json array, optional)
                                    {                                  (json object, optional) The public key with the derivation path as the value.
                                      "master_fingerprint" : "str",    (string) The fingerprint of the master key
                                      "path" : "str"                   (string) The path
                                    },
                                    ...
                                  ],
                                  "final_scriptsig" : {                (json object, optional)
                                    "asm" : "str",                     (string) The asm
                                    "hex" : "str"                      (string) The hex
                                  },
                                  "final_scriptwitness" : [            (json array)
                                    "hex",                             (string) hex-encoded witness data (if any)
                                    ...
                                  ],
                                  "unknown" : {                        (json object) The unknown global fields
                                    "key" : "hex",                     (string) (key-value pair) An unknown key-value pair
                                    ...
                                  }
                                },
                                ...
                              ],
                              "outputs" : [                            (json array)
                                {                                      (json object)
                                  "redeem_script" : {                  (json object, optional)
                                    "asm" : "str",                     (string) The asm
                                    "hex" : "hex",                     (string) The hex
                                    "type" : "str"                     (string) The type, eg 'pubkeyhash'
                                  },
                                  "witness_script" : {                 (json object, optional)
                                    "asm" : "str",                     (string) The asm
                                    "hex" : "hex",                     (string) The hex
                                    "type" : "str"                     (string) The type, eg 'pubkeyhash'
                                  },
                                  "bip32_derivs" : [                   (json array, optional)
                                    {                                  (json object)
                                      "pubkey" : "str",                (string) The public key this path corresponds to
                                      "master_fingerprint" : "str",    (string) The fingerprint of the master key
                                      "path" : "str"                   (string) The path
                                    },
                                    ...
                                  ],
                                  "unknown" : {                        (json object) The unknown global fields
                                    "key" : "hex",                     (string) (key-value pair) An unknown key-value pair
                                    ...
                                  }
                                },
                                ...
                              ],
                              "fee" : n                                (numeric, optional) The transaction fee paid if all UTXOs slots in the PSBT have been filled.
                            }
                            

    Examples

    stohncoin-cli decodepsbt "psbt"
                            
  • decoderawtransaction

    decoderawtransaction "hexstring" ( iswitness )

    Return a JSON object representing the serialized, hex-encoded transaction.

    Argument #1 - hexstring

    Type: string, required

    The transaction hex string

    Argument #2 - iswitness

    Type: boolean, optional, default=depends on heuristic tests

    Whether the transaction hex is a serialized witness transaction.

    If iswitness is not present, heuristic tests will be used in decoding. If true, only witness deserialization will be tried. If false, only non-witness deserialization will be tried. This boolean should reflect whether the transaction has inputs (e.g. fully valid, or on-chain transactions), if known by the caller.

    Result

    {                           (json object)
                              "txid" : "hex",           (string) The transaction id
                              "hash" : "hex",           (string) The transaction hash (differs from txid for witness transactions)
                              "size" : n,               (numeric) The transaction size
                              "vsize" : n,              (numeric) The virtual transaction size (differs from size for witness transactions)
                              "weight" : n,             (numeric) The transaction's weight (between vsize*4 - 3 and vsize*4)
                              "version" : n,            (numeric) The version
                              "locktime" : xxx,         (numeric) The lock time
                              "vin" : [                 (json array)
                                {                       (json object)
                                  "txid" : "hex",       (string) The transaction id
                                  "vout" : n,           (numeric) The output number
                                  "scriptSig" : {       (json object) The script
                                    "asm" : "str",      (string) asm
                                    "hex" : "hex"       (string) hex
                                  },
                                  "txinwitness" : [     (json array)
                                    "hex",              (string) hex-encoded witness data (if any)
                                    ...
                                  ],
                                  "sequence" : n        (numeric) The script sequence number
                                },
                                ...
                              ],
                              "vout" : [                (json array)
                                {                       (json object)
                                  "value" : n,          (numeric) The value in SOH
                                  "n" : n,              (numeric) index
                                  "scriptPubKey" : {    (json object)
                                    "asm" : "str",      (string) the asm
                                    "hex" : "hex",      (string) the hex
                                    "reqSigs" : n,      (numeric) The required sigs
                                    "type" : "str",     (string) The type, eg 'pubkeyhash'
                                    "addresses" : [     (json array)
                                      "str",            (string) stohncoin address
                                      ...
                                    ]
                                  }
                                },
                                ...
                              ]
                            }
                            

    Examples

    stohncoin-cli decoderawtransaction "hexstring"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "decoderawtransaction", "params": ["hexstring"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • decodescript

    decodescript "hexstring"

    Decode a hex-encoded script.

    Argument #1 - hexstring

    Type: string, required

    the hex-encoded script

    Result

    {                             (json object)
                              "asm" : "str",              (string) Script public key
                              "type" : "str",             (string) The output type (e.g. nonstandard, pubkey, pubkeyhash, scripthash, multisig, nulldata, witness_v0_scripthash, witness_v0_keyhash, witness_v1_taproot, witness_unknown)
                              "reqSigs" : n,              (numeric) The required signatures
                              "addresses" : [             (json array)
                                "str",                    (string) stohncoin address
                                ...
                              ],
                              "p2sh" : "str",             (string) address of P2SH script wrapping this redeem script (not returned if the script is already a P2SH)
                              "segwit" : {                (json object) Result of a witness script public key wrapping this redeem script (not returned if the script is a P2SH or witness)
                                "asm" : "str",            (string) String representation of the script public key
                                "hex" : "hex",            (string) Hex string of the script public key
                                "type" : "str",           (string) The type of the script public key (e.g. witness_v0_keyhash or witness_v0_scripthash)
                                "reqSigs" : n,            (numeric) The required signatures (always 1)
                                "addresses" : [           (json array) (always length 1)
                                  "str",                  (string) segwit address
                                  ...
                                ],
                                "p2sh-segwit" : "str"     (string) address of the P2SH script wrapping this witness redeem script
                              }
                            }
                            

    Examples

    stohncoin-cli decodescript "hexstring"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "decodescript", "params": ["hexstring"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • deriveaddresses

    deriveaddresses "descriptor" ( range )

    Derives one or more addresses corresponding to an output descriptor.

    Examples of output descriptors are:

    pkh(<pubkey>) P2PKH outputs for the given pubkey wpkh(<pubkey>) Native segwit P2PKH outputs for the given pubkey sh(multi(<n>,<pubkey>,<pubkey>,…)) P2SH-multisig outputs for the given threshold and pubkeys raw(<hex script>) Outputs whose scriptPubKey equals the specified hex scripts

    In the above, <pubkey> either refers to a fixed public key in hexadecimal notation, or to an xpub/xprv optionally followed by one or more path elements separated by “/”, where “h” represents a hardened child key.

    For more information on output descriptors, see the documentation in the doc/descriptors.md file.

    Argument #1 - descriptor

    Type: string, required

    The descriptor.

    Argument #2 - range

    Type: numeric or array, optional

    If a ranged descriptor is used, this specifies the end or the range (in [begin,end] notation) to derive.

    Result

    [           (json array)
                              "str",    (string) the derived addresses
                              ...
                            ]
                            

    Examples

    First three native segwit receive addresses:

    stohncoin-cli deriveaddresses "wpkh([d34db33f/84h/0h/0h]xpub6DJ2dNUysrn5Vt36jH2KLBT2i1auw1tTSSomg8PhqNiUtx8QX2SvC9nrHu81fT41fvDUnhMjEzQgXnQjKEu3oaqMSzhSrHMxyyoEAmUHQbY/0/*)#cjjspncu" "[0,2]"
                            
  • disconnectnode

    disconnectnode ( "address" nodeid )

    Immediately disconnects from the specified peer node.

    Strictly one out of ‘address’ and ‘nodeid’ can be provided to identify the node.

    To disconnect by nodeid, either set ‘address’ to the empty string, or call using the named ‘nodeid’ argument only.

    Argument #1 - address

    Type: string, optional, default=fallback to nodeid

    The IP address/port of the node

    Argument #2 - nodeid

    Type: numeric, optional, default=fallback to address

    The node ID (see getpeerinfo for node IDs)

    Result

    null    (json null)
                            

    Examples

    stohncoin-cli disconnectnode "192.168.0.6:8333"
                            
    stohncoin-cli disconnectnode "" 1
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "disconnectnode", "params": ["192.168.0.6:8333"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "disconnectnode", "params": ["", 1]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • dumpprivkey

    dumpprivkey "address"

    Reveals the private key corresponding to ‘address’.

    Then the importprivkey can be used with this output

    Argument #1 - address

    Type: string, required

    The stohncoin address for the private key

    Result

    Name

    Type

    Description

    str

    string

    The private key

    Examples

    stohncoin-cli dumpprivkey "myaddress"
                            
    stohncoin-cli importprivkey "mykey"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "dumpprivkey", "params": ["myaddress"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • dumpwallet

    dumpwallet "filename"

    Dumps all wallet keys in a human-readable format to a server-side file. This does not allow overwriting existing files.

    Imported scripts are included in the dumpfile, but corresponding BIP173 addresses, etc. may not be added automatically by importwallet.

    Note that if your wallet contains keys which are not derived from your HD seed (e.g. imported keys), these are not covered by only backing up the seed itself, and must be backed up too (e.g. ensure you back up the whole dumpfile).

    Argument #1 - filename

    Type: string, required

    The filename with path (absolute path recommended)

    Result

    {                        (json object)
                              "filename" : "str"     (string) The filename with full absolute path
                            }
                            

    Examples

    stohncoin-cli dumpwallet "test"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "dumpwallet", "params": ["test"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • encryptwallet

    encryptwallet "passphrase"

    Encrypts the wallet with ‘passphrase’. This is for first time encryption.

    After this, any calls that interact with private keys such as sending or signing will require the passphrase to be set prior the making these calls.

    Use the walletpassphrase call for this, and then walletlock call.

    If the wallet is already encrypted, use the walletpassphrasechange call.

    Argument #1 - passphrase

    Type: string, required

    The pass phrase to encrypt the wallet with. It must be at least 1 character, but should be long.

    Result

    Name

    Type

    Description

    str

    string

    A string with further instructions

    Examples

    Encrypt your wallet:

    stohncoin-cli encryptwallet "my pass phrase"
                            

    Now set the passphrase to use the wallet, such as for signing or sending stohncoin:

    stohncoin-cli walletpassphrase "my pass phrase"
                            

    Now we can do something like sign:

    stohncoin-cli signmessage "address" "test message"
                            

    Now lock the wallet again by removing the passphrase:

    stohncoin-cli walletlock
                            

    As a JSON-RPC call:

    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "encryptwallet", "params": ["my pass phrase"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • estimatesmartfee

    estimatesmartfee conf_target ( "estimate_mode" )

    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. Uses virtual transaction size as defined in BIP 141 (witness data is discounted).

    Argument #1 - conf_target

    Type: numeric, required

    Confirmation target in blocks (1 - 1008)

    Argument #2 - estimate_mode

    Type: string, optional, default=CONSERVATIVE

    The fee estimate mode.

    Whether to return a more conservative estimate which also satisfies a longer history. A conservative estimate potentially returns a higher feerate and is more likely to be sufficient for the desired target, but is not as responsive to short term drops in the prevailing fee market. Must be one of: “UNSET” “ECONOMICAL” “CONSERVATIVE”

    Result

    {                   (json object)
                              "feerate" : n,    (numeric, optional) estimate fee rate in SOH/kB (only present if no errors were encountered)
                              "errors" : [      (json array, optional) Errors encountered during processing (if there are any)
                                "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

    stohncoin-cli estimatesmartfee 6
                            
  • finalizepbst

    finalizepsbt "psbt" ( extract )

    Finalize the inputs of a PSBT. If the transaction is fully signed, it will produce a network serialized transaction which can be broadcast with sendrawtransaction. Otherwise a PSBT will be created which has the final_scriptSig and final_scriptWitness fields filled for inputs that are complete.

    Implements the Finalizer and Extractor roles.

    Argument #1 - psbt

    Type: string, required

    A base64 string of a PSBT

    Argument #2 - extract

    Type: boolean, optional, default=true

    If true and the transaction is complete,

    extract and return the complete transaction in normal network serialization instead of the PSBT.

    Result

    {                             (json object)
                              "psbt" : "str",             (string) The base64-encoded partially signed transaction if not extracted
                              "hex" : "hex",              (string) The hex-encoded network transaction if extracted
                              "complete" : true|false     (boolean) If the transaction has a complete set of signatures
                            }
                            

    Examples

    stohncoin-cli finalizepsbt "psbt"
                            
  • fundrawtransaction

    fundrawtransaction "hexstring" ( options iswitness )

    If the transaction has no inputs, they will be automatically selected to meet its out value.

    It will add at most one change output to the outputs.

    No existing outputs will be modified unless “subtractFeeFromOutputs” is specified.

    Note that inputs which were signed may need to be resigned after completion since in/outputs have been added.

    The inputs added will not be signed, use signrawtransactionwithkey

    or signrawtransactionwithwallet for that.

    Note that all existing inputs must have their previous output transaction be in the wallet.

    Note that all inputs selected must be of standard form and P2SH scripts must be in the wallet using importaddress or addmultisigaddress (to calculate fees).

    You can see whether this is the case by checking the “solvable” field in the listunspent output.

    Only pay-to-pubkey, multisig, and P2SH versions thereof are currently supported for watch-only

    Argument #1 - hexstring

    Type: string, required

    The hex string of the raw transaction

    Argument #2 - options

    Type: json object, optional

    for backward compatibility: passing in a true instead of an object will result in {“includeWatching”:true}

    “replaceable”: bool, (boolean, optional, default=wallet default) Marks this transaction as BIP125 replaceable. Allows this transaction to be replaced by a transaction with higher fees “conf_target”: n, (numeric, optional, default=wallet -txconfirmtarget) Confirmation target in blocks “estimate_mode”: “str”, (string, optional, default=unset) The fee estimate mode, must be one of (case insensitive): “unset” “economical” “conservative” }

    {
                              "add_inputs": bool,            (boolean, optional, default=true) For a transaction with existing inputs, automatically include more if they are not enough.
                              "changeAddress": "str",        (string, optional, default=pool address) The stohncoin address to receive the change
                              "changePosition": n,           (numeric, optional, default=random) The index of the change output
                              "change_type": "str",          (string, optional, default=set by -changetype) The output type to use. Only valid if changeAddress is not specified. Options are "legacy", "p2sh-segwit", and "bech32".
                              "includeWatching": bool,       (boolean, optional, default=true for watch-only wallets, otherwise false) Also select inputs which are watch only.
                                                             Only solvable inputs can be used. Watch-only destinations are solvable if the public key and/or output script was imported,
                                                             e.g. with 'importpubkey' or 'importmulti' with the 'pubkeys' or 'desc' field.
                              "lockUnspents": bool,          (boolean, optional, default=false) Lock selected unspent outputs
                              "fee_rate": amount,            (numeric or string, optional, default=not set, fall back to wallet fee estimation) Specify a fee rate in sat/vB.
                              "feeRate": amount,             (numeric or string, optional, default=not set, fall back to wallet fee estimation) Specify a fee rate in SOH/kvB.
                              "subtractFeeFromOutputs": [    (json array, optional, default=empty array) The integers.
                                                             The fee will be equally deducted from the amount of each specified output.
                                                             Those recipients will receive less stohncoins than you enter in their corresponding amount field.
                                                             If no outputs are specified here, the sender pays the fee.
                                vout_index,                  (numeric) The zero-based output index, before a change output is added.
                                ...
                              ],
                            

    Argument #3 - iswitness

    Type: boolean, optional, default=depends on heuristic tests

    Whether the transaction hex is a serialized witness transaction.

    If iswitness is not present, heuristic tests will be used in decoding. If true, only witness deserialization will be tried. If false, only non-witness deserialization will be tried. This boolean should reflect whether the transaction has inputs (e.g. fully valid, or on-chain transactions), if known by the caller.

    Result

    {                     (json object)
                              "hex" : "hex",      (string) The resulting raw transaction (hex-encoded string)
                              "fee" : n,          (numeric) Fee in SOH the resulting transaction pays
                              "changepos" : n     (numeric) The position of the added change output, or -1
                            }
                            

    Examples

    Create a transaction with no inputs:

    stohncoin-cli createrawtransaction "[]" "{\"myaddress\":0.01}"
                            

    Add sufficient unsigned inputs to meet the output value:

    stohncoin-cli fundrawtransaction "rawtransactionhex"
                            

    Sign the transaction:

    stohncoin-cli signrawtransactionwithwallet "fundedtransactionhex"
                            

    Send the transaction:

    stohncoin-cli sendrawtransaction "signedtransactionhex"
                            
  • generateblock

    generateblock "output" ["rawtx/txid",...]

    Mine a block with a set of ordered transactions immediately to a specified address or descriptor (before the RPC call returns)

    Argument #1 - output

    Type: string, required

    The address or descriptor to send the newly generated stohncoin to.

    Argument #2 - transactions

    Type: json array, required

    An array of hex strings which are either txids or raw transactions.

    Txids must reference transactions currently in the mempool. All transactions must be valid and in valid order, otherwise the block will be rejected.

    [
                              "rawtx/txid",    (string)
                              ...
                            ]
                            

    Result

    {                    (json object)
                              "hash" : "hex"     (string) hash of generated block
                            }
                            

    Examples

    Generate a block to myaddress, with txs rawtx and mempool_txid:

    stohncoin-cli generateblock "myaddress" '["rawtx", "mempool_txid"]'
                            
  • generatetoaddress

    generatetoaddress nblocks "address" ( maxtries )

    Mine blocks immediately to a specified address (before the RPC call returns)

    Argument #1 - nblocks

    Type: numeric, required

    How many blocks are generated immediately.

    Argument #2 - address

    Type: string, required

    The address to send the newly generated stohncoin to.

    Argument #3 - maxtries

    Type: numeric, optional, default=1000000

    How many iterations to try.

    Result

    [           (json array) hashes of blocks generated
                              "hex",    (string) blockhash
                              ...
                            ]
                            

    Examples

    Generate 11 blocks to myaddress:

    stohncoin-cli generatetoaddress 11 "myaddress"
                            

    If you are using the Stohncoin Core wallet, you can get a new address to send the newly generated stohncoin to with::

    stohncoin-cli getnewaddress
                            
  • generatetodescriptor

    generatetodescriptor num_blocks "descriptor" ( maxtries )

    Mine blocks immediately to a specified descriptor (before the RPC call returns)

    Argument #1 - num_blocks

    Type: numeric, required

    How many blocks are generated immediately.

    Argument #2 - descriptor

    Type: string, required

    The descriptor to send the newly generated stohncoin to.

    Argument #3 - maxtries

    Type: numeric, optional, default=1000000

    How many iterations to try.

    Result

    [           (json array) hashes of blocks generated
                              "hex",    (string) blockhash
                              ...
                            ]
                            

    Examples

    Generate 11 blocks to mydesc:

    stohncoin-cli generatetodescriptor 11 "mydesc"
                            
  • getaddednodeinfo

    getaddednodeinfo ( "node" )

    Returns information about the given added node, or all added nodes (note that onetry addnodes are not listed here)

    Argument #1 - node

    Type: string, optional, default=all nodes

    If provided, return information about this specific node, otherwise all nodes are returned.

    Result

    [                                (json array)
                              {                              (json object)
                                "addednode" : "str",         (string) The node IP address or name (as provided to addnode)
                                "connected" : true|false,    (boolean) If connected
                                "addresses" : [              (json array) Only when connected = true
                                  {                          (json object)
                                    "address" : "str",       (string) The stohncoin server IP and port we're connected to
                                    "connected" : "str"      (string) connection, inbound or outbound
                                  },
                                  ...
                                ]
                              },
                              ...
                            ]
                            

    Examples

    stohncoin-cli getaddednodeinfo "192.168.0.201"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getaddednodeinfo", "params": ["192.168.0.201"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getaddressbylabel

    getaddressesbylabel "label"

    Returns the list of addresses assigned the specified label.

    Argument #1 - label

    Type: string, required

    The label.

    Result

    {                         (json object) json object with addresses as keys
                              "address" : {           (json object) json object with information about address
                                "purpose" : "str"     (string) Purpose of address ("send" for sending address, "receive" for receiving address)
                              },
                              ...
                            }
                            

    Examples

    stohncoin-cli getaddressesbylabel "tabby"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getaddressesbylabel", "params": ["tabby"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getaddressinfo

    getaddressinfo "address"

    Return information about the given stohncoin address.

    Some of the information will only be present if the address is in the active wallet.

    Argument #1 - address

    Type: string, required

    The stohncoin address for which to get information.

    Result

    {                                   (json object)
                              "address" : "str",                (string) The stohncoin address validated.
                              "scriptPubKey" : "hex",           (string) The hex-encoded scriptPubKey generated by the address.
                              "ismine" : true|false,            (boolean) If the address is yours.
                              "iswatchonly" : true|false,       (boolean) If the address is watchonly.
                              "solvable" : true|false,          (boolean) If we know how to spend coins sent to this address, ignoring the possible lack of private keys.
                              "desc" : "str",                   (string, optional) A descriptor for spending coins sent to this address (only when solvable).
                              "isscript" : true|false,          (boolean) If the key is a script.
                              "ischange" : true|false,          (boolean) If the address was used for change output.
                              "iswitness" : true|false,         (boolean) If the address is a witness address.
                              "witness_version" : n,            (numeric, optional) The version number of the witness program.
                              "witness_program" : "hex",        (string, optional) The hex value of the witness program.
                              "script" : "str",                 (string, optional) The output script type. Only if isscript is true and the redeemscript is known. Possible
                                                                types: nonstandard, pubkey, pubkeyhash, scripthash, multisig, nulldata, witness_v0_keyhash,
                                                                witness_v0_scripthash, witness_unknown.
                              "hex" : "hex",                    (string, optional) The redeemscript for the p2sh address.
                              "pubkeys" : [                     (json array, optional) Array of pubkeys associated with the known redeemscript (only if script is multisig).
                                "str",                          (string)
                                ...
                              ],
                              "sigsrequired" : n,               (numeric, optional) The number of signatures required to spend multisig output (only if script is multisig).
                              "pubkey" : "hex",                 (string, optional) The hex value of the raw public key for single-key addresses (possibly embedded in P2SH or P2WSH).
                              "embedded" : {                    (json object, optional) Information about the address embedded in P2SH or P2WSH, if relevant and known.
                                ...                             Includes all getaddressinfo output fields for the embedded address, excluding metadata (timestamp, hdkeypath, hdseedid)
                                                                and relation to the wallet (ismine, iswatchonly).
                              },
                              "iscompressed" : true|false,      (boolean, optional) If the pubkey is compressed.
                              "timestamp" : xxx,                (numeric, optional) The creation time of the key, if available, expressed in UNIX epoch time.
                              "hdkeypath" : "str",              (string, optional) The HD keypath, if the key is HD and available.
                              "hdseedid" : "hex",               (string, optional) The Hash160 of the HD seed.
                              "hdmasterfingerprint" : "hex",    (string, optional) The fingerprint of the master key.
                              "labels" : [                      (json array) Array of labels associated with the address. Currently limited to one label but returned
                                                                as an array to keep the API stable if multiple labels are enabled in the future.
                                "str",                          (string) Label name (defaults to "").
                                ...
                              ]
                            }
                            

    Examples

    stohncoin-cli getaddressinfo "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getaddressinfo", "params": ["bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getbalance

    getbalance ( "dummy" minconf include_watchonly avoid_reuse )

    Returns the total available balance.

    The available balance is what the wallet considers currently spendable, and is thus affected by options which limit spendability such as -spendzeroconfchange.

    Argument #1 - dummy

    Type: string, optional

    Remains for backward compatibility. Must be excluded or set to “*”.

    Argument #2 - minconf

    Type: numeric, optional, default=0

    Only include transactions confirmed at least this many times.

    Argument #3 - include_watchonly

    Type: boolean, optional, default=true for watch-only wallets, otherwise false

    Also include balance in watch-only addresses (see ‘importaddress’)

    Argument #4 - avoid_reuse

    Type: boolean, optional, default=true

    (only available if avoid_reuse wallet flag is set) Do not include balance in dirty outputs; addresses are considered dirty if they have previously been used in a transaction.

    Result

    Name

    Type

    Description

    n

    numeric

    The total amount in SOH received for this wallet.

    Examples

    The total amount in the wallet with 0 or more confirmations:

    stohncoin-cli getbalance
                            

    The total amount in the wallet with at least 6 confirmations:

    stohncoin-cli getbalance "*" 6
                            

    As a JSON-RPC call:

    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getbalance", "params": ["*", 6]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getbalances

    getbalances

    Returns an object with all balances in SOH.

    Result

    {                               (json object)
                              "mine" : {                    (json object) balances from outputs that the wallet can sign
                                "trusted" : n,              (numeric) trusted balance (outputs created by the wallet or confirmed outputs)
                                "untrusted_pending" : n,    (numeric) untrusted pending balance (outputs created by others that are in the mempool)
                                "immature" : n,             (numeric) balance from immature coinbase outputs
                                "used" : n                  (numeric) (only present if avoid_reuse is set) balance from coins sent to addresses that were previously spent from (potentially privacy violating)
                              },
                              "watchonly" : {               (json object) watchonly balances (not present if wallet does not watch anything)
                                "trusted" : n,              (numeric) trusted balance (outputs created by the wallet or confirmed outputs)
                                "untrusted_pending" : n,    (numeric) untrusted pending balance (outputs created by others that are in the mempool)
                                "immature" : n              (numeric) balance from immature coinbase outputs
                              }
                            }
                            

    Examples

    stohncoin-cli getbalances
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getbalances", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getbestblockhash

    getbestblockhash

    Returns the hash of the best (tip) block in the most-work fully-validated chain.

    Result

    Name

    Type

    Description

    hex

    string

    the block hash, hex-encoded

    Examples

    stohncoin-cli getbestblockhash
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getbestblockhash", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getblock

    getblock "blockhash" ( verbosity )

    If verbosity is 0, returns a string that is serialized, hex-encoded data for block ‘hash’.

    If verbosity is 1, returns an Object with information about block ‘hash’.

    If verbosity is 2, returns an Object with information about block ‘hash’ and information about each transaction.

    Argument #1 - blockhash

    Type: string, required

    The block hash

    Argument #2 - verbosity

    Type: numeric, optional, default=1

    0 for hex-encoded data, 1 for a json object, and 2 for json object with transaction data

    Result (for verbosity = 0)

    Name

    Type

    Description

    hex

    string

    A string that is serialized, hex-encoded data for block ‘hash’

    Result (for verbosity = 1)

    {                                 (json object)
                              "hash" : "hex",                 (string) the block hash (same as provided)
                              "confirmations" : n,            (numeric) The number of confirmations, or -1 if the block is not on the main chain
                              "size" : n,                     (numeric) The block size
                              "strippedsize" : n,             (numeric) The block size excluding witness data
                              "weight" : n,                   (numeric) The block weight as defined in BIP 141
                              "height" : n,                   (numeric) The block height or index
                              "version" : n,                  (numeric) The block version
                              "versionHex" : "hex",           (string) The block version formatted in hexadecimal
                              "merkleroot" : "hex",           (string) The merkle root
                              "tx" : [                        (json array) The transaction ids
                                "hex",                        (string) The transaction id
                                ...
                              ],
                              "time" : xxx,                   (numeric) The block time expressed in UNIX epoch time
                              "mediantime" : xxx,             (numeric) The median block time expressed in UNIX epoch time
                              "nonce" : n,                    (numeric) The nonce
                              "bits" : "hex",                 (string) The bits
                              "difficulty" : n,               (numeric) The difficulty
                              "chainwork" : "hex",            (string) Expected number of hashes required to produce the chain up to this block (in hex)
                              "nTx" : n,                      (numeric) The number of transactions in the block
                              "previousblockhash" : "hex",    (string) The hash of the previous block
                              "nextblockhash" : "hex"         (string) The hash of the next block
                            }
                            

    Result (for verbosity = 2)

    {             (json object)
                              ...,        Same output as verbosity = 1
                              "tx" : [    (json array)
                                {         (json object)
                                  ...     The transactions in the format of the getrawtransaction RPC. Different from verbosity = 1 "tx" result
                                },
                                ...
                              ]
                            }
                            

    Examples

    stohncoin-cli getblock "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblock", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getblockchaininfo

    getblockchaininfo

    Returns an object containing various state info regarding blockchain processing.

    Result

    {                                         (json object)
                              "chain" : "str",                        (string) current network name (main, test, regtest)
                              "blocks" : n,                           (numeric) the height of the most-work fully-validated chain. The genesis block has height 0
                              "headers" : n,                          (numeric) the current number of headers we have validated
                              "bestblockhash" : "str",                (string) the hash of the currently best block
                              "difficulty" : n,                       (numeric) the current difficulty
                              "mediantime" : n,                       (numeric) median time for the current best block
                              "verificationprogress" : n,             (numeric) estimate of verification progress [0..1]
                              "initialblockdownload" : true|false,    (boolean) (debug information) estimate of whether this node is in Initial Block Download mode
                              "chainwork" : "hex",                    (string) total amount of work in active chain, in hexadecimal
                              "size_on_disk" : n,                     (numeric) the estimated size of the block and undo files on disk
                              "pruned" : true|false,                  (boolean) if the blocks are subject to pruning
                              "pruneheight" : n,                      (numeric) lowest-height complete block stored (only present if pruning is enabled)
                              "automatic_pruning" : true|false,       (boolean) whether automatic pruning is enabled (only present if pruning is enabled)
                              "prune_target_size" : n,                (numeric) the target size used by pruning (only present if automatic pruning is enabled)
                              "softforks" : {                         (json object) status of softforks
                                "xxxx" : {                            (json object) name of the softfork
                                  "type" : "str",                     (string) one of "buried", "bip9"
                                  "bip9" : {                          (json object) status of bip9 softforks (only for "bip9" type)
                                    "status" : "str",                 (string) one of "defined", "started", "locked_in", "active", "failed"
                                    "bit" : n,                        (numeric) the bit (0-28) in the block version field used to signal this softfork (only for "started" status)
                                    "start_time" : xxx,               (numeric) the minimum median time past of a block at which the bit gains its meaning
                                    "timeout" : xxx,                  (numeric) the median time past of a block at which the deployment is considered failed if not yet locked in
                                    "since" : n,                      (numeric) height of the first block to which the status applies
                                    "statistics" : {                  (json object) numeric statistics about BIP9 signalling for a softfork (only for "started" status)
                                      "period" : n,                   (numeric) the length in blocks of the BIP9 signalling period
                                      "threshold" : n,                (numeric) the number of blocks with the version bit set required to activate the feature
                                      "elapsed" : n,                  (numeric) the number of blocks elapsed since the beginning of the current period
                                      "count" : n,                    (numeric) the number of blocks with the version bit set in the current period
                                      "possible" : true|false         (boolean) returns false if there are not enough blocks left in this period to pass activation threshold
                                    }
                                  },
                                  "height" : n,                       (numeric) height of the first block which the rules are or will be enforced (only for "buried" type, or "bip9" type with "active" status)
                                  "active" : true|false               (boolean) true if the rules are enforced for the mempool and the next block
                                },
                                ...
                              },
                              "warnings" : "str"                      (string) any network and blockchain warnings
                            }
                            

    Examples

    stohncoin-cli getblockchaininfo
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockchaininfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getblockcount

    getblockcount

    Returns the height of the most-work fully-validated chain.

    The genesis block has height 0.

    Result

    Name

    Type

    Description

    n

    numeric

    The current block count

    Examples

    stohncoin-cli getblockcount
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockcount", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getblockfilter

    getblockfilter "blockhash" ( "filtertype" )

    Retrieve a BIP 157 content filter for a particular block.

    Argument #1 - blockhash

    Type: string, required

    The hash of the block

    Argument #2 - filtertype

    Type: string, optional, default=basic

    The type name of the filter

    Result

    {                      (json object)
                              "filter" : "hex",    (string) the hex-encoded filter data
                              "header" : "hex"     (string) the hex-encoded filter header
                            }
                            

    Examples

    stohncoin-cli getblockfilter "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09" "basic"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockfilter", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09", "basic"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getblockhash

    getblockhash height

    Returns hash of block in best-block-chain at height provided.

    Argument #1 - height

    Type: numeric, required

    The height index

    Result

    Name

    Type

    Description

    hex

    string

    The block hash

    Examples

    stohncoin-cli getblockhash 1000
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockhash", "params": [1000]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getblockheader

    getblockheader "blockhash" ( verbose )

    If verbose is false, returns a string that is serialized, hex-encoded data for blockheader ‘hash’.

    If verbose is true, returns an Object with information about blockheader ‘hash’.

    Argument #1 - blockhash

    Type: string, required

    The block hash

    Argument #2 - verbose

    Type: boolean, optional, default=true

    true for a json object, false for the hex-encoded data

    Result (for verbose = true)

    {                                 (json object)
                              "hash" : "hex",                 (string) the block hash (same as provided)
                              "confirmations" : n,            (numeric) The number of confirmations, or -1 if the block is not on the main chain
                              "height" : n,                   (numeric) The block height or index
                              "version" : n,                  (numeric) The block version
                              "versionHex" : "hex",           (string) The block version formatted in hexadecimal
                              "merkleroot" : "hex",           (string) The merkle root
                              "time" : xxx,                   (numeric) The block time expressed in UNIX epoch time
                              "mediantime" : xxx,             (numeric) The median block time expressed in UNIX epoch time
                              "nonce" : n,                    (numeric) The nonce
                              "bits" : "hex",                 (string) The bits
                              "difficulty" : n,               (numeric) The difficulty
                              "chainwork" : "hex",            (string) Expected number of hashes required to produce the current chain
                              "nTx" : n,                      (numeric) The number of transactions in the block
                              "previousblockhash" : "hex",    (string) The hash of the previous block
                              "nextblockhash" : "hex"         (string) The hash of the next block
                            }
                            

    Result (for verbose=false)

    Name

    Type

    Description

    hex

    string

    A string that is serialized, hex-encoded data for block ‘hash’

    Examples

    stohncoin-cli getblockheader "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockheader", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getblockstats

    getblockstats hash_or_height ( stats )

    Compute per block statistics for a given window. All amounts are in satoshis.

    It won’t work for some heights with pruning.

    Argument #1 - hash_or_height

    Type: string or numeric, required

    The block hash or height of the target block

    Argument #2 - stats

    Type: json array, optional, default=all values

    Values to plot (see result below)

    [
                              "height",     (string) Selected statistic
                              "time",       (string) Selected statistic
                              ...
                            ]
                            

    Result

    {                              (json object)
                              "avgfee" : n,                (numeric) Average fee in the block
                              "avgfeerate" : n,            (numeric) Average feerate (in satoshis per virtual byte)
                              "avgtxsize" : n,             (numeric) Average transaction size
                              "blockhash" : "hex",         (string) The block hash (to check for potential reorgs)
                              "feerate_percentiles" : [    (json array) Feerates at the 10th, 25th, 50th, 75th, and 90th percentile weight unit (in satoshis per virtual byte)
                                n,                         (numeric) The 10th percentile feerate
                                n,                         (numeric) The 25th percentile feerate
                                n,                         (numeric) The 50th percentile feerate
                                n,                         (numeric) The 75th percentile feerate
                                n                          (numeric) The 90th percentile feerate
                              ],
                              "height" : n,                (numeric) The height of the block
                              "ins" : n,                   (numeric) The number of inputs (excluding coinbase)
                              "maxfee" : n,                (numeric) Maximum fee in the block
                              "maxfeerate" : n,            (numeric) Maximum feerate (in satoshis per virtual byte)
                              "maxtxsize" : n,             (numeric) Maximum transaction size
                              "medianfee" : n,             (numeric) Truncated median fee in the block
                              "mediantime" : n,            (numeric) The block median time past
                              "mediantxsize" : n,          (numeric) Truncated median transaction size
                              "minfee" : n,                (numeric) Minimum fee in the block
                              "minfeerate" : n,            (numeric) Minimum feerate (in satoshis per virtual byte)
                              "mintxsize" : n,             (numeric) Minimum transaction size
                              "outs" : n,                  (numeric) The number of outputs
                              "subsidy" : n,               (numeric) The block subsidy
                              "swtotal_size" : n,          (numeric) Total size of all segwit transactions
                              "swtotal_weight" : n,        (numeric) Total weight of all segwit transactions
                              "swtxs" : n,                 (numeric) The number of segwit transactions
                              "time" : n,                  (numeric) The block time
                              "total_out" : n,             (numeric) Total amount in all outputs (excluding coinbase and thus reward [ie subsidy + totalfee])
                              "total_size" : n,            (numeric) Total size of all non-coinbase transactions
                              "total_weight" : n,          (numeric) Total weight of all non-coinbase transactions
                              "totalfee" : n,              (numeric) The fee total
                              "txs" : n,                   (numeric) The number of transactions (including coinbase)
                              "utxo_increase" : n,         (numeric) The increase/decrease in the number of unspent outputs
                              "utxo_size_inc" : n          (numeric) The increase/decrease in size for the utxo index (not discounting op_return and similar)
                            }
                            

    Examples

    stohncoin-cli getblockstats '"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"' '["minfeerate","avgfeerate"]'
                            
    stohncoin-cli getblockstats 1000 '["minfeerate","avgfeerate"]'
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockstats", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09", ["minfeerate","avgfeerate"]]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockstats", "params": [1000, ["minfeerate","avgfeerate"]]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getblocktemplate

    getblocktemplate ( "template_request" )

    If the request parameters include a ‘mode’ key, that is used to explicitly select between the default ‘template’ request or a ‘proposal’.

    It returns data needed to construct a block to work on.

    For full specification, see BIPs 22, 23, 9, and 145:

    Argument #1 - template_request

    Type: json object, optional, default={}

    Format of the template

    “rules”: [ (json array, required) A list of strings “segwit”, (string, required) (literal) indicates client side segwit support “str”, (string) other client side supported softfork deployment … ], }

    {
                              "mode": "str",       (string, optional) This must be set to "template", "proposal" (see BIP 23), or omitted
                              "capabilities": [    (json array, optional) A list of strings
                                "str",             (string) client side supported feature, 'longpoll', 'coinbasevalue', 'proposal', 'serverlist', 'workid'
                                ...
                              ],
                            

    Result

    {                                          (json object)
                              "version" : n,                           (numeric) The preferred block version
                              "rules" : [                              (json array) specific block rules that are to be enforced
                                "str",                                 (string) name of a rule the client must understand to some extent; see BIP 9 for format
                                ...
                              ],
                              "vbavailable" : {                        (json object) set of pending, supported versionbit (BIP 9) softfork deployments
                                "rulename" : n,                        (numeric) identifies the bit number as indicating acceptance and readiness for the named softfork rule
                                ...
                              },
                              "vbrequired" : n,                        (numeric) bit mask of versionbits the server requires set in submissions
                              "previousblockhash" : "str",             (string) The hash of current highest block
                              "transactions" : [                       (json array) contents of non-coinbase transactions that should be included in the next block
                                {                                      (json object)
                                  "data" : "hex",                      (string) transaction data encoded in hexadecimal (byte-for-byte)
                                  "txid" : "hex",                      (string) transaction id encoded in little-endian hexadecimal
                                  "hash" : "hex",                      (string) hash encoded in little-endian hexadecimal (including witness data)
                                  "depends" : [                        (json array) array of numbers
                                    n,                                 (numeric) transactions before this one (by 1-based index in 'transactions' list) that must be present in the final block if this one is
                                    ...
                                  ],
                                  "fee" : n,                           (numeric) difference in value between transaction inputs and outputs (in satoshis); for coinbase transactions, this is a negative Number of the total collected block fees (ie, not including the block subsidy); if key is not present, fee is unknown and clients MUST NOT assume there isn't one
                                  "sigops" : n,                        (numeric) total SigOps cost, as counted for purposes of block limits; if key is not present, sigop cost is unknown and clients MUST NOT assume it is zero
                                  "weight" : n                         (numeric) total transaction weight, as counted for purposes of block limits
                                },
                                ...
                              ],
                              "coinbaseaux" : {                        (json object) data that should be included in the coinbase's scriptSig content
                                "key" : "hex",                         (string) values must be in the coinbase (keys may be ignored)
                                ...
                              },
                              "coinbasevalue" : n,                     (numeric) maximum allowable input to coinbase transaction, including the generation award and transaction fees (in satoshis)
                              "longpollid" : "str",                    (string) an id to include with a request to longpoll on an update to this template
                              "target" : "str",                        (string) The hash target
                              "mintime" : xxx,                         (numeric) The minimum timestamp appropriate for the next block time, expressed in UNIX epoch time
                              "mutable" : [                            (json array) list of ways the block template may be changed
                                "str",                                 (string) A way the block template may be changed, e.g. 'time', 'transactions', 'prevblock'
                                ...
                              ],
                              "noncerange" : "hex",                    (string) A range of valid nonces
                              "sigoplimit" : n,                        (numeric) limit of sigops in blocks
                              "sizelimit" : n,                         (numeric) limit of block size
                              "weightlimit" : n,                       (numeric) limit of block weight
                              "curtime" : xxx,                         (numeric) current timestamp in UNIX epoch time
                              "bits" : "str",                          (string) compressed target of next block
                              "height" : n,                            (numeric) The height of the next block
                              "default_witness_commitment" : "str"     (string, optional) a valid witness commitment for the unmodified block template
                            }
                            

    Examples

    stohncoin-cli getblocktemplate '{"rules": ["segwit"]}'
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblocktemplate", "params": [{"rules": ["segwit"]}]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getchaintips

    getchaintips

    Return information about all known tips in the block tree, including the main chain as well as orphaned branches.

    Result

    [                        (json array)
                              {                      (json object)
                                "height" : n,        (numeric) height of the chain tip
                                "hash" : "hex",      (string) block hash of the tip
                                "branchlen" : n,     (numeric) zero for main chain, otherwise length of branch connecting the tip to the main chain
                                "status" : "str"     (string) status of the chain, "active" for the main chain
                                                     Possible values for status:
                                                     1.  "invalid"               This branch contains at least one invalid block
                                                     2.  "headers-only"          Not all blocks for this branch are available, but the headers are valid
                                                     3.  "valid-headers"         All blocks are available for this branch, but they were never fully validated
                                                     4.  "valid-fork"            This branch is not part of the active chain, but is fully validated
                                                     5.  "active"                This is the tip of the active main chain, which is certainly valid
                              },
                              ...
                            ]
                            

    Examples

    stohncoin-cli getchaintips
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getchaintips", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getchaintxstats

    getchaintxstats ( nblocks "blockhash" )

    Compute statistics about the total number and rate of transactions in the chain.

    Argument #1 - nblocks

    Type: numeric, optional, default=one month

    Size of the window in number of blocks

    Argument #2 - blockhash

    Type: string, optional, default=chain tip

    The hash of the block that ends the window.

    Result

    {                                       (json object)
                              "time" : xxx,                         (numeric) The timestamp for the final block in the window, expressed in UNIX epoch time
                              "txcount" : n,                        (numeric) The total number of transactions in the chain up to that point
                              "window_final_block_hash" : "hex",    (string) The hash of the final block in the window
                              "window_final_block_height" : n,      (numeric) The height of the final block in the window.
                              "window_block_count" : n,             (numeric) Size of the window in number of blocks
                              "window_tx_count" : n,                (numeric) The number of transactions in the window. Only returned if "window_block_count" is > 0
                              "window_interval" : n,                (numeric) The elapsed time in the window in seconds. Only returned if "window_block_count" is > 0
                              "txrate" : n                          (numeric) The average rate of transactions per second in the window. Only returned if "window_interval" is > 0
                            }
                            

    Examples

    stohncoin-cli getchaintxstats
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getchaintxstats", "params": [2016]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getconnectioncount

    getconnectioncount

    Returns the number of connections to other nodes.

    Result

    Name

    Type

    Description

    n

    numeric

    The connection count

    Examples

    stohncoin-cli getconnectioncount
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getconnectioncount", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getdescriptorinfo

    getdescriptorinfo "descriptor"

    Analyses a descriptor.

    Argument #1 - descriptor

    Type: string, required

    The descriptor.

    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:

    stohncoin-cli getdescriptorinfo "wpkh([d34db33f/84h/0h/0h]0279be667ef9dcbbac55a06295Ce870b07029Bfcdb2dce28d959f2815b16f81798)"
                            
  • getdifficulty

    getdifficulty

    Returns the proof-of-work difficulty as a multiple of the minimum difficulty.

    Result

    Name

    Type

    Description

    n

    numeric

    the proof-of-work difficulty as a multiple of the minimum difficulty.

    Examples

    stohncoin-cli getdifficulty
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getdifficulty", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getindexinfo

    getindexinfo ( "index_name" )

    Returns the status of one or all available indices currently running in the node.

    Argument #1 - index_name

    Type: string, optional

    Filter results for an index with a specific name.

    Result

    {                               (json object)
                              "name" : {                    (json object) The name of the index
                                "synced" : true|false,      (boolean) Whether the index is synced or not
                                "best_block_height" : n     (numeric) The block height to which the index is synced
                              }
                            }
                            

    Examples

    stohncoin-cli getindexinfo
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getindexinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
    stohncoin-cli getindexinfo txindex
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getindexinfo", "params": [txindex]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getmemoryinfo

    getmemoryinfo ( "mode" )

    Returns an object containing information about memory usage.

    Argument #1 - mode

    Type: string, optional, default=”stats”

    determines what kind of information is returned.
    • “stats” returns general statistics about memory usage in the daemon.

    • “mallocinfo” returns an XML string describing low-level heap state (only available if compiled with glibc 2.10+).

    Result (mode “stats”)

    {                         (json object)
                              "locked" : {            (json object) Information about locked memory manager
                                "used" : n,           (numeric) Number of bytes used
                                "free" : n,           (numeric) Number of bytes available in current arenas
                                "total" : n,          (numeric) Total number of bytes managed
                                "locked" : n,         (numeric) Amount of bytes that succeeded locking. If this number is smaller than total, locking pages failed at some point and key data could be swapped to disk.
                                "chunks_used" : n,    (numeric) Number allocated chunks
                                "chunks_free" : n     (numeric) Number unused chunks
                              }
                            }
                            

    Result (mode “mallocinfo”)

    Name

    Type

    Description

    str

    string

    “<malloc version=”1”>…”

    Examples

    stohncoin-cli getmemoryinfo
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getmemoryinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getmempoolancestors

    getmempoolancestors "txid" ( verbose )

    If txid is in the mempool, returns all in-mempool ancestors.

    Argument #1 - txid

    Type: string, required

    The transaction id (must be in mempool)

    Argument #2 - verbose

    Type: boolean, optional, default=false

    True for a json object, false for array of transaction ids

    Result (for verbose = false)

    [           (json array)
                              "hex",    (string) The transaction id of an in-mempool ancestor transaction
                              ...
                            ]
                            

    Result (for verbose = true)

    {                                         (json object)
                              "transactionid" : {                     (json object)
                                "vsize" : n,                          (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted.
                                "weight" : n,                         (numeric) transaction weight as defined in BIP 141.
                                "fee" : n,                            (numeric) transaction fee in SOH (DEPRECATED)
                                "modifiedfee" : n,                    (numeric) transaction fee with fee deltas used for mining priority (DEPRECATED)
                                "time" : xxx,                         (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT
                                "height" : n,                         (numeric) block height when transaction entered pool
                                "descendantcount" : n,                (numeric) number of in-mempool descendant transactions (including this one)
                                "descendantsize" : n,                 (numeric) virtual transaction size of in-mempool descendants (including this one)
                                "descendantfees" : n,                 (numeric) modified fees (see above) of in-mempool descendants (including this one) (DEPRECATED)
                                "ancestorcount" : n,                  (numeric) number of in-mempool ancestor transactions (including this one)
                                "ancestorsize" : n,                   (numeric) virtual transaction size of in-mempool ancestors (including this one)
                                "ancestorfees" : n,                   (numeric) modified fees (see above) of in-mempool ancestors (including this one) (DEPRECATED)
                                "wtxid" : "hex",                      (string) hash of serialized transaction, including witness data
                                "fees" : {                            (json object)
                                  "base" : n,                         (numeric) transaction fee in SOH
                                  "modified" : n,                     (numeric) transaction fee with fee deltas used for mining priority in SOH
                                  "ancestor" : n,                     (numeric) modified fees (see above) of in-mempool ancestors (including this one) in SOH
                                  "descendant" : n                    (numeric) modified fees (see above) of in-mempool descendants (including this one) in SOH
                                },
                                "depends" : [                         (json array) unconfirmed transactions used as inputs for this transaction
                                  "hex",                              (string) parent transaction id
                                  ...
                                ],
                                "spentby" : [                         (json array) unconfirmed transactions spending outputs from this transaction
                                  "hex",                              (string) child transaction id
                                  ...
                                ],
                                "bip125-replaceable" : true|false,    (boolean) Whether this transaction could be replaced due to BIP125 (replace-by-fee)
                                "unbroadcast" : true|false            (boolean) Whether this transaction is currently unbroadcast (initial broadcast not yet acknowledged by any peers)
                              },
                              ...
                            }
                            

    Examples

    stohncoin-cli getmempoolancestors "mytxid"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getmempoolancestors", "params": ["mytxid"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getmempooldescendants

    getmempooldescendants "txid" ( verbose )

    If txid is in the mempool, returns all in-mempool descendants.

    Argument #1 - txid

    Type: string, required

    The transaction id (must be in mempool)

    Argument #2 - verbose

    Type: boolean, optional, default=false

    True for a json object, false for array of transaction ids

    Result (for verbose = false)

    [           (json array)
                              "hex",    (string) The transaction id of an in-mempool descendant transaction
                              ...
                            ]
                            

    Result (for verbose = true)

    {                                         (json object)
                              "transactionid" : {                     (json object)
                                "vsize" : n,                          (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted.
                                "weight" : n,                         (numeric) transaction weight as defined in BIP 141.
                                "fee" : n,                            (numeric) transaction fee in SOH (DEPRECATED)
                                "modifiedfee" : n,                    (numeric) transaction fee with fee deltas used for mining priority (DEPRECATED)
                                "time" : xxx,                         (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT
                                "height" : n,                         (numeric) block height when transaction entered pool
                                "descendantcount" : n,                (numeric) number of in-mempool descendant transactions (including this one)
                                "descendantsize" : n,                 (numeric) virtual transaction size of in-mempool descendants (including this one)
                                "descendantfees" : n,                 (numeric) modified fees (see above) of in-mempool descendants (including this one) (DEPRECATED)
                                "ancestorcount" : n,                  (numeric) number of in-mempool ancestor transactions (including this one)
                                "ancestorsize" : n,                   (numeric) virtual transaction size of in-mempool ancestors (including this one)
                                "ancestorfees" : n,                   (numeric) modified fees (see above) of in-mempool ancestors (including this one) (DEPRECATED)
                                "wtxid" : "hex",                      (string) hash of serialized transaction, including witness data
                                "fees" : {                            (json object)
                                  "base" : n,                         (numeric) transaction fee in SOH
                                  "modified" : n,                     (numeric) transaction fee with fee deltas used for mining priority in SOH
                                  "ancestor" : n,                     (numeric) modified fees (see above) of in-mempool ancestors (including this one) in SOH
                                  "descendant" : n                    (numeric) modified fees (see above) of in-mempool descendants (including this one) in SOH
                                },
                                "depends" : [                         (json array) unconfirmed transactions used as inputs for this transaction
                                  "hex",                              (string) parent transaction id
                                  ...
                                ],
                                "spentby" : [                         (json array) unconfirmed transactions spending outputs from this transaction
                                  "hex",                              (string) child transaction id
                                  ...
                                ],
                                "bip125-replaceable" : true|false,    (boolean) Whether this transaction could be replaced due to BIP125 (replace-by-fee)
                                "unbroadcast" : true|false            (boolean) Whether this transaction is currently unbroadcast (initial broadcast not yet acknowledged by any peers)
                              },
                              ...
                            }
                            

    Examples

    stohncoin-cli getmempooldescendants "mytxid"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getmempooldescendants", "params": ["mytxid"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getmempoolentry

    getmempoolentry "txid"

    Returns mempool data for given transaction

    Argument #1 - txid

    Type: string, required

    The transaction id (must be in mempool)

    Result

    {                                       (json object)
                              "vsize" : n,                          (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted.
                              "weight" : n,                         (numeric) transaction weight as defined in BIP 141.
                              "fee" : n,                            (numeric) transaction fee in SOH (DEPRECATED)
                              "modifiedfee" : n,                    (numeric) transaction fee with fee deltas used for mining priority (DEPRECATED)
                              "time" : xxx,                         (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT
                              "height" : n,                         (numeric) block height when transaction entered pool
                              "descendantcount" : n,                (numeric) number of in-mempool descendant transactions (including this one)
                              "descendantsize" : n,                 (numeric) virtual transaction size of in-mempool descendants (including this one)
                              "descendantfees" : n,                 (numeric) modified fees (see above) of in-mempool descendants (including this one) (DEPRECATED)
                              "ancestorcount" : n,                  (numeric) number of in-mempool ancestor transactions (including this one)
                              "ancestorsize" : n,                   (numeric) virtual transaction size of in-mempool ancestors (including this one)
                              "ancestorfees" : n,                   (numeric) modified fees (see above) of in-mempool ancestors (including this one) (DEPRECATED)
                              "wtxid" : "hex",                      (string) hash of serialized transaction, including witness data
                              "fees" : {                            (json object)
                                "base" : n,                         (numeric) transaction fee in SOH
                                "modified" : n,                     (numeric) transaction fee with fee deltas used for mining priority in SOH
                                "ancestor" : n,                     (numeric) modified fees (see above) of in-mempool ancestors (including this one) in SOH
                                "descendant" : n                    (numeric) modified fees (see above) of in-mempool descendants (including this one) in SOH
                              },
                              "depends" : [                         (json array) unconfirmed transactions used as inputs for this transaction
                                "hex",                              (string) parent transaction id
                                ...
                              ],
                              "spentby" : [                         (json array) unconfirmed transactions spending outputs from this transaction
                                "hex",                              (string) child transaction id
                                ...
                              ],
                              "bip125-replaceable" : true|false,    (boolean) Whether this transaction could be replaced due to BIP125 (replace-by-fee)
                              "unbroadcast" : true|false            (boolean) Whether this transaction is currently unbroadcast (initial broadcast not yet acknowledged by any peers)
                            }
                            

    Examples

    stohncoin-cli getmempoolentry "mytxid"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getmempoolentry", "params": ["mytxid"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getmempoolinfo

    getmempoolinfo

    Returns details on the active state of the TX memory pool.

    Result

    {                            (json object)
                              "loaded" : true|false,     (boolean) True if the mempool is fully loaded
                              "size" : n,                (numeric) Current tx count
                              "bytes" : n,               (numeric) Sum of all virtual transaction sizes as defined in BIP 141. Differs from actual serialized size because witness data is discounted
                              "usage" : n,               (numeric) Total memory usage for the mempool
                              "maxmempool" : n,          (numeric) Maximum memory usage for the mempool
                              "mempoolminfee" : n,       (numeric) Minimum fee rate in SOH/kB for tx to be accepted. Is the maximum of minrelaytxfee and minimum mempool fee
                              "minrelaytxfee" : n,       (numeric) Current minimum relay fee for transactions
                              "unbroadcastcount" : n     (numeric) Current number of transactions that haven't passed initial broadcast yet
                            }
                            

    Examples

    stohncoin-cli getmempoolinfo
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getmempoolinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getnettotals

    getnettotals

    Returns information about network traffic, including bytes in, bytes out, and current time.

    Result

    {                                              (json object)
                              "totalbytesrecv" : n,                        (numeric) Total bytes received
                              "totalbytessent" : n,                        (numeric) Total bytes sent
                              "timemillis" : xxx,                          (numeric) Current UNIX epoch time in milliseconds
                              "uploadtarget" : {                           (json object)
                                "timeframe" : n,                           (numeric) Length of the measuring timeframe in seconds
                                "target" : n,                              (numeric) Target in bytes
                                "target_reached" : true|false,             (boolean) True if target is reached
                                "serve_historical_blocks" : true|false,    (boolean) True if serving historical blocks
                                "bytes_left_in_cycle" : n,                 (numeric) Bytes left in current time cycle
                                "time_left_in_cycle" : n                   (numeric) Seconds left in current time cycle
                              }
                            }
                            

    Examples

    stohncoin-cli getnettotals
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getnettotals", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getnetworkhashps

    getnetworkhashps ( nblocks height )

    Returns the estimated network hashes per second based on the last n blocks.

    Pass in [blocks] to override # of blocks, -1 specifies since last difficulty change.

    Pass in [height] to estimate the network speed at the time when a certain block was found.

    Argument #1 - nblocks

    Type: numeric, optional, default=120

    The number of blocks, or -1 for blocks since last difficulty change.

    Argument #2 - height

    Type: numeric, optional, default=-1

    To estimate at the time of the given height.

    Result

    Name

    Type

    Description

    n

    numeric

    Hashes per second estimated

    Examples

    stohncoin-cli getnetworkhashps
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getnetworkhashps", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getnetworkinfo

    getnetworkinfo

    Returns an object containing various state info regarding P2P networking.

    Result

    {                                                    (json object)
                              "version" : n,                                     (numeric) the server version
                              "subversion" : "str",                              (string) the server subversion string
                              "protocolversion" : n,                             (numeric) the protocol version
                              "localservices" : "hex",                           (string) the services we offer to the network
                              "localservicesnames" : [                           (json array) the services we offer to the network, in human-readable form
                                "str",                                           (string) the service name
                                ...
                              ],
                              "localrelay" : true|false,                         (boolean) true if transaction relay is requested from peers
                              "timeoffset" : n,                                  (numeric) the time offset
                              "connections" : n,                                 (numeric) the total number of connections
                              "connections_in" : n,                              (numeric) the number of inbound connections
                              "connections_out" : n,                             (numeric) the number of outbound connections
                              "networkactive" : true|false,                      (boolean) whether p2p networking is enabled
                              "networks" : [                                     (json array) information per network
                                {                                                (json object)
                                  "name" : "str",                                (string) network (ipv4, ipv6 or onion)
                                  "limited" : true|false,                        (boolean) is the network limited using -onlynet?
                                  "reachable" : true|false,                      (boolean) is the network reachable?
                                  "proxy" : "str",                               (string) ("host:port") the proxy that is used for this network, or empty if none
                                  "proxy_randomize_credentials" : true|false     (boolean) Whether randomized credentials are used
                                },
                                ...
                              ],
                              "relayfee" : n,                                    (numeric) minimum relay fee for transactions in SOH/kB
                              "incrementalfee" : n,                              (numeric) minimum fee increment for mempool limiting or BIP 125 replacement in SOH/kB
                              "localaddresses" : [                               (json array) list of local addresses
                                {                                                (json object)
                                  "address" : "str",                             (string) network address
                                  "port" : n,                                    (numeric) network port
                                  "score" : n                                    (numeric) relative score
                                },
                                ...
                              ],
                              "warnings" : "str"                                 (string) any network and blockchain warnings
                            }
                            

    Examples

    stohncoin-cli getnetworkinfo
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getnetworkinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getnodeaddresses

    getnodeaddresses ( count )

    Return known addresses which can potentially be used to find new nodes in the network

    Argument #1 - count

    Type: numeric, optional, default=1

    The maximum number of addresses to return. Specify 0 to return all known addresses.

    Result

    [                         (json array)
                              {                       (json object)
                                "time" : xxx,         (numeric) The UNIX epoch time of when the node was last seen
                                "services" : n,       (numeric) The services offered
                                "address" : "str",    (string) The address of the node
                                "port" : n            (numeric) The port of the node
                              },
                              ...
                            ]
                            

    Examples

    stohncoin-cli getnodeaddresses 8
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getnodeaddresses", "params": [8]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getpeerinfo

    getpeerinfo

    Returns data about each connected network node as a json array of objects.

    Result

    [                                  (json array)
                              {                                (json object)
                                "id" : n,                      (numeric) Peer index
                                "addr" : "str",                (string) (host:port) The IP address and port of the peer
                                "addrbind" : "str",            (string) (ip:port) Bind address of the connection to the peer
                                "addrlocal" : "str",           (string) (ip:port) Local address as reported by the peer
                                "network" : "str",             (string) Network (ipv4, ipv6, or onion) the peer connected through
                                "mapped_as" : n,               (numeric) The AS in the BGP route to the peer used for diversifying
                                                               peer selection (only available if the asmap config flag is set)
                                "services" : "hex",            (string) The services offered
                                "servicesnames" : [            (json array) the services offered, in human-readable form
                                  "str",                       (string) the service name if it is recognised
                                  ...
                                ],
                                "relaytxes" : true|false,      (boolean) Whether peer has asked us to relay transactions to it
                                "lastsend" : xxx,              (numeric) The UNIX epoch time of the last send
                                "lastrecv" : xxx,              (numeric) The UNIX epoch time of the last receive
                                "last_transaction" : xxx,      (numeric) The UNIX epoch time of the last valid transaction received from this peer
                                "last_block" : xxx,            (numeric) The UNIX epoch time of the last block received from this peer
                                "bytessent" : n,               (numeric) The total bytes sent
                                "bytesrecv" : n,               (numeric) The total bytes received
                                "conntime" : xxx,              (numeric) The UNIX epoch time of the connection
                                "timeoffset" : n,              (numeric) The time offset in seconds
                                "pingtime" : n,                (numeric) ping time (if available)
                                "minping" : n,                 (numeric) minimum observed ping time (if any at all)
                                "pingwait" : n,                (numeric) ping wait (if non-zero)
                                "version" : n,                 (numeric) The peer version, such as 70001
                                "subver" : "str",              (string) The string version
                                "inbound" : true|false,        (boolean) Inbound (true) or Outbound (false)
                                "addnode" : true|false,        (boolean) Whether connection was due to addnode/-connect or if it was an automatic/inbound connection
                                                               (DEPRECATED, returned only if the config option -deprecatedrpc=getpeerinfo_addnode is passed)
                                "connection_type" : "str",     (string) Type of connection:
                                                               outbound-full-relay (default automatic connections),
                                                               block-relay-only (does not relay transactions or addresses),
                                                               inbound (initiated by the peer),
                                                               manual (added via addnode RPC or -addnode/-connect configuration options),
                                                               addr-fetch (short-lived automatic connection for soliciting addresses),
                                                               feeler (short-lived automatic connection for testing addresses).
                                                               Please note this output is unlikely to be stable in upcoming releases as we iterate to
                                                               best capture connection behaviors.
                                "startingheight" : n,          (numeric) The starting height (block) of the peer
                                "banscore" : n,                (numeric) The ban score (DEPRECATED, returned only if config option -deprecatedrpc=banscore is passed)
                                "synced_headers" : n,          (numeric) The last header we have in common with this peer
                                "synced_blocks" : n,           (numeric) The last block we have in common with this peer
                                "inflight" : [                 (json array)
                                  n,                           (numeric) The heights of blocks we're currently asking from this peer
                                  ...
                                ],
                                "whitelisted" : true|false,    (boolean, optional) Whether the peer is whitelisted with default permissions
                                                               (DEPRECATED, returned only if config option -deprecatedrpc=whitelisted is passed)
                                "permissions" : [              (json array) Any special permissions that have been granted to this peer
                                  "str",                       (string) bloomfilter (allow requesting BIP37 filtered blocks and transactions),
                                                               noban (do not ban for misbehavior; implies download),
                                                               forcerelay (relay transactions that are already in the mempool; implies relay),
                                                               relay (relay even in -blocksonly mode, and unlimited transaction announcements),
                                                               mempool (allow requesting BIP35 mempool contents),
                                                               download (allow getheaders during IBD, no disconnect after maxuploadtarget limit),
                                                               addr (responses to GETADDR avoid hitting the cache and contain random records with the most up-to-date info).
    
                                  ...
                                ],
                                "minfeefilter" : n,            (numeric) The minimum fee rate for transactions this peer accepts
                                "bytessent_per_msg" : {        (json object)
                                  "msg" : n,                   (numeric) The total bytes sent aggregated by message type
                                                               When a message type is not listed in this json object, the bytes sent are 0.
                                                               Only known message types can appear as keys in the object.
                                  ...
                                },
                                "bytesrecv_per_msg" : {        (json object)
                                  "msg" : n                    (numeric) The total bytes received aggregated by message type
                                                               When a message type is not listed in this json object, the bytes received are 0.
                                                               Only known message types can appear as keys in the object and all bytes received
                                                               of unknown message types are listed under '*other*'.
                                }
                              },
                              ...
                            ]
                            

    Examples

    stohncoin-cli getpeerinfo
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getpeerinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getrawchangeaddress

    getrawchangeaddress ( "address_type" )

    Returns a new Stohncoin address, for receiving change.

    This is for use with raw transactions, NOT normal use.

    Argument #1 - address_type

    Type: string, optional, default=set by -changetype

    The address type to use. Options are “legacy”, “p2sh-segwit”, and “bech32”.

    Result

    Name

    Type

    Description

    str

    string

    The address

    Examples

    stohncoin-cli getrawchangeaddress
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getrawchangeaddress", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getrawmempool

    getrawmempool ( verbose mempool_sequence )

    Returns all transaction ids in memory pool as a json array of string transaction ids.

    Hint: use getmempoolentry to fetch a specific transaction from the mempool.

    Argument #1 - verbose

    Type: boolean, optional, default=false

    True for a json object, false for array of transaction ids

    Argument #2 - mempool_sequence

    Type: boolean, optional, default=false

    If verbose=false, returns a json object with transaction list and mempool sequence number attached.

    Result (for verbose = false)

    [           (json array)
                              "hex",    (string) The transaction id
                              ...
                            ]
                            

    Result (for verbose = true)

    {                                         (json object)
                              "transactionid" : {                     (json object)
                                "vsize" : n,                          (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted.
                                "weight" : n,                         (numeric) transaction weight as defined in BIP 141.
                                "fee" : n,                            (numeric) transaction fee in SOH (DEPRECATED)
                                "modifiedfee" : n,                    (numeric) transaction fee with fee deltas used for mining priority (DEPRECATED)
                                "time" : xxx,                         (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT
                                "height" : n,                         (numeric) block height when transaction entered pool
                                "descendantcount" : n,                (numeric) number of in-mempool descendant transactions (including this one)
                                "descendantsize" : n,                 (numeric) virtual transaction size of in-mempool descendants (including this one)
                                "descendantfees" : n,                 (numeric) modified fees (see above) of in-mempool descendants (including this one) (DEPRECATED)
                                "ancestorcount" : n,                  (numeric) number of in-mempool ancestor transactions (including this one)
                                "ancestorsize" : n,                   (numeric) virtual transaction size of in-mempool ancestors (including this one)
                                "ancestorfees" : n,                   (numeric) modified fees (see above) of in-mempool ancestors (including this one) (DEPRECATED)
                                "wtxid" : "hex",                      (string) hash of serialized transaction, including witness data
                                "fees" : {                            (json object)
                                  "base" : n,                         (numeric) transaction fee in SOH
                                  "modified" : n,                     (numeric) transaction fee with fee deltas used for mining priority in SOH
                                  "ancestor" : n,                     (numeric) modified fees (see above) of in-mempool ancestors (including this one) in SOH
                                  "descendant" : n                    (numeric) modified fees (see above) of in-mempool descendants (including this one) in SOH
                                },
                                "depends" : [                         (json array) unconfirmed transactions used as inputs for this transaction
                                  "hex",                              (string) parent transaction id
                                  ...
                                ],
                                "spentby" : [                         (json array) unconfirmed transactions spending outputs from this transaction
                                  "hex",                              (string) child transaction id
                                  ...
                                ],
                                "bip125-replaceable" : true|false,    (boolean) Whether this transaction could be replaced due to BIP125 (replace-by-fee)
                                "unbroadcast" : true|false            (boolean) Whether this transaction is currently unbroadcast (initial broadcast not yet acknowledged by any peers)
                              },
                              ...
                            }
                            

    Result (for verbose = false and mempool_sequence = true)

    {                            (json object)
                              "txids" : [                (json array)
                                "hex",                   (string) The transaction id
                                ...
                              ],
                              "mempool_sequence" : n     (numeric) The mempool sequence value.
                            }
                            

    Examples

    stohncoin-cli getrawmempool true
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getrawmempool", "params": [true]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getrawtransaction

    getrawtransaction "txid" ( verbose "blockhash" )

    Return the raw transaction data.

    By default this function only works for mempool transactions. When called with a blockhash argument, getrawtransaction will return the transaction if the specified block is available and the transaction is found in that block. When called without a blockhash argument, getrawtransaction will return the transaction if it is in the mempool, or if -txindex is enabled and the transaction is in a block in the blockchain.

    Hint: Use gettransaction for wallet transactions.

    If verbose is ‘true’, returns an Object with information about ‘txid’.

    If verbose is ‘false’ or omitted, returns a string that is serialized, hex-encoded data for ‘txid’.

    Argument #1 - txid

    Type: string, required

    The transaction id

    Argument #2 - verbose

    Type: boolean, optional, default=false

    If false, return a string, otherwise return a json object

    Argument #3 - blockhash

    Type: string, optional

    The block in which to look for the transaction

    Result (if verbose is not set or set to false)

    Name

    Type

    Description

    str

    string

    The serialized, hex-encoded data for ‘txid’

    Result (if verbose is set to true)

    {                                    (json object)
                              "in_active_chain" : true|false,    (boolean) Whether specified block is in the active chain or not (only present with explicit "blockhash" argument)
                              "hex" : "hex",                     (string) The serialized, hex-encoded data for 'txid'
                              "txid" : "hex",                    (string) The transaction id (same as provided)
                              "hash" : "hex",                    (string) The transaction hash (differs from txid for witness transactions)
                              "size" : n,                        (numeric) The serialized transaction size
                              "vsize" : n,                       (numeric) The virtual transaction size (differs from size for witness transactions)
                              "weight" : n,                      (numeric) The transaction's weight (between vsize*4-3 and vsize*4)
                              "version" : n,                     (numeric) The version
                              "locktime" : xxx,                  (numeric) The lock time
                              "vin" : [                          (json array)
                                {                                (json object)
                                  "txid" : "hex",                (string) The transaction id
                                  "vout" : n,                    (numeric) The output number
                                  "scriptSig" : {                (json object) The script
                                    "asm" : "str",               (string) asm
                                    "hex" : "hex"                (string) hex
                                  },
                                  "sequence" : n,                (numeric) The script sequence number
                                  "txinwitness" : [              (json array)
                                    "hex",                       (string) hex-encoded witness data (if any)
                                    ...
                                  ]
                                },
                                ...
                              ],
                              "vout" : [                         (json array)
                                {                                (json object)
                                  "value" : n,                   (numeric) The value in SOH
                                  "n" : n,                       (numeric) index
                                  "scriptPubKey" : {             (json object)
                                    "asm" : "str",               (string) the asm
                                    "hex" : "str",               (string) the hex
                                    "reqSigs" : n,               (numeric) The required sigs
                                    "type" : "str",              (string) The type, eg 'pubkeyhash'
                                    "addresses" : [              (json array)
                                      "str",                     (string) stohncoin address
                                      ...
                                    ]
                                  }
                                },
                                ...
                              ],
                              "blockhash" : "hex",               (string) the block hash
                              "confirmations" : n,               (numeric) The confirmations
                              "blocktime" : xxx,                 (numeric) The block time expressed in UNIX epoch time
                              "time" : n                         (numeric) Same as "blocktime"
                            }
                            

    Examples

    stohncoin-cli getrawtransaction "mytxid"
                            
    stohncoin-cli getrawtransaction "mytxid" true
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getrawtransaction", "params": ["mytxid", true]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
    stohncoin-cli getrawtransaction "mytxid" false "myblockhash"
                            
    stohncoin-cli getrawtransaction "mytxid" true "myblockhash"
                            
  • getreceivedbyaddress

    getreceivedbyaddress "address" ( minconf )

    Returns the total amount received by the given address in transactions with at least minconf confirmations.

    Argument #1 - address

    Type: string, required

    The stohncoin address for transactions.

    Argument #2 - minconf

    Type: numeric, optional, default=1

    Only include transactions confirmed at least this many times.

    Result

    Name

    Type

    Description

    n

    numeric

    The total amount in SOH received at this address.

    Examples

    The amount from transactions with at least 1 confirmation:

    stohncoin-cli getreceivedbyaddress "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl"
                            

    The amount including unconfirmed transactions, zero confirmations:

    stohncoin-cli getreceivedbyaddress "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl" 0
                            

    The amount with at least 6 confirmations:

    stohncoin-cli getreceivedbyaddress "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl" 6
                            

    As a JSON-RPC call:

    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getreceivedbyaddress", "params": ["bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl", 6]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getrpcinfo

    getrpcinfo

    Returns details of the RPC server.

    Result

    {                          (json object)
                              "active_commands" : [    (json array) All active commands
                                {                      (json object) Information about an active command
                                  "method" : "str",    (string) The name of the RPC command
                                  "duration" : n       (numeric) The running time in microseconds
                                },
                                ...
                              ],
                              "logpath" : "str"        (string) The complete file path to the debug log
                            }
                            

    Examples

    stohncoin-cli getrpcinfo
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getrpcinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • gettransaction

    gettransaction "txid" ( include_watchonly verbose )

    Get detailed information about in-wallet transaction <txid>

    Argument #1 - txid

    Type: string, required

    The transaction id

    Argument #2 - include_watchonly

    Type: boolean, optional, default=true for watch-only wallets, otherwise false

    Whether to include watch-only addresses in balance calculation and details[]

    Argument #3 - verbose

    Type: boolean, optional, default=false

    Whether to include a decoded field containing the decoded transaction (equivalent to RPC decoderawtransaction)

    Result

    {                                          (json object)
                              "amount" : n,                            (numeric) The amount in SOH
                              "fee" : n,                               (numeric) The amount of the fee in SOH. This is negative and only available for the
                                                                       'send' category of transactions.
                              "confirmations" : n,                     (numeric) The number of confirmations for the transaction. Negative confirmations means the
                                                                       transaction conflicted that many blocks ago.
                              "generated" : true|false,                (boolean) Only present if transaction only input is a coinbase one.
                              "trusted" : true|false,                  (boolean) Only present if we consider transaction to be trusted and so safe to spend from.
                              "blockhash" : "hex",                     (string) The block hash containing the transaction.
                              "blockheight" : n,                       (numeric) The block height containing the transaction.
                              "blockindex" : n,                        (numeric) The index of the transaction in the block that includes it.
                              "blocktime" : xxx,                       (numeric) The block time expressed in UNIX epoch time.
                              "txid" : "hex",                          (string) The transaction id.
                              "walletconflicts" : [                    (json array) Conflicting transaction ids.
                                "hex",                                 (string) The transaction id.
                                ...
                              ],
                              "time" : xxx,                            (numeric) The transaction time expressed in UNIX epoch time.
                              "timereceived" : xxx,                    (numeric) The time received expressed in UNIX epoch time.
                              "comment" : "str",                       (string) If a comment is associated with the transaction, only present if not empty.
                              "bip125-replaceable" : "str",            (string) ("yes|no|unknown") Whether this transaction could be replaced due to BIP125 (replace-by-fee);
                                                                       may be unknown for unconfirmed transactions not in the mempool
                              "details" : [                            (json array)
                                {                                      (json object)
                                  "involvesWatchonly" : true|false,    (boolean) Only returns true if imported addresses were involved in transaction.
                                  "address" : "str",                   (string) The stohncoin address involved in the transaction.
                                  "category" : "str",                  (string) The transaction category.
                                                                       "send"                  Transactions sent.
                                                                       "receive"               Non-coinbase transactions received.
                                                                       "generate"              Coinbase transactions received with more than 100 confirmations.
                                                                       "immature"              Coinbase transactions received with 100 or fewer confirmations.
                                                                       "orphan"                Orphaned coinbase transactions received.
                                  "amount" : n,                        (numeric) The amount in SOH
                                  "label" : "str",                     (string) A comment for the address/transaction, if any
                                  "vout" : n,                          (numeric) the vout value
                                  "fee" : n,                           (numeric) The amount of the fee in SOH. This is negative and only available for the
                                                                       'send' category of transactions.
                                  "abandoned" : true|false             (boolean) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the
                                                                       'send' category of transactions.
                                },
                                ...
                              ],
                              "hex" : "hex",                           (string) Raw data for transaction
                              "decoded" : {                            (json object) Optional, the decoded transaction (only present when `verbose` is passed)
                                ...                                    Equivalent to the RPC decoderawtransaction method, or the RPC getrawtransaction method when `verbose` is passed.
                              }
                            }
                            

    Examples

    stohncoin-cli gettransaction "1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"
                            
    stohncoin-cli gettransaction "1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d" true
                            
    stohncoin-cli gettransaction "1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d" false true
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "gettransaction", "params": ["1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • gettxout

    gettxout "txid" n ( include_mempool )

    Returns details about an unspent transaction output.

    Argument #1 - txid

    Type: string, required

    The transaction id

    Argument #2 - n

    Type: numeric, required

    vout number

    Argument #3 - include_mempool

    Type: boolean, optional, default=true

    Whether to include the mempool. Note that an unspent output that is spent in the mempool won’t appear.

    Result

    {                             (json object)
                              "bestblock" : "hex",        (string) The hash of the block at the tip of the chain
                              "confirmations" : n,        (numeric) The number of confirmations
                              "value" : n,                (numeric) The transaction value in SOH
                              "scriptPubKey" : {          (json object)
                                "asm" : "hex",            (string)
                                "hex" : "hex",            (string)
                                "reqSigs" : n,            (numeric) Number of required signatures
                                "type" : "hex",           (string) The type, eg pubkeyhash
                                "addresses" : [           (json array) array of stohncoin addresses
                                  "str",                  (string) stohncoin address
                                  ...
                                ]
                              },
                              "coinbase" : true|false     (boolean) Coinbase or not
                            }
                            

    Examples

    Get unspent transactions:

    stohncoin-cli listunspent
                            

    View the details:

    stohncoin-cli gettxout "txid" 1
                            

    As a JSON-RPC call:

    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "gettxout", "params": ["txid", 1]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • gettxoutproof

    gettxoutproof ["txid",...] ( "blockhash" )

    Returns a hex-encoded proof that “txid” was included in a block.

    NOTE: By default this function only works sometimes. This is when there is an unspent output in the utxo for this transaction. To make it always work, you need to maintain a transaction index, using the -txindex command line option or specify the block in which the transaction is included manually (by blockhash).

    Argument #1 - txids

    Type: json array, required

    The txids to filter

    [
                              "txid",    (string) A transaction hash
                              ...
                            ]
                            

    Argument #2 - blockhash

    Type: string, optional

    If specified, looks for txid in the block with this hash

    Result

    Name

    Type

    Description

    str

    string

    A string that is a serialized, hex-encoded data for the proof.

  • gettxoutsetinfo

    gettxoutsetinfo ( "hash_type" )

    Returns statistics about the unspent transaction output set.

    Note this call may take some time.

    Argument #1 - hash_type

    Type: string, optional, default=hash_serialized_2

    Which UTXO set hash should be calculated. Options: ‘hash_serialized_2’ (the legacy algorithm), ‘none’.

    Result

    {                                 (json object)
                              "height" : n,                   (numeric) The current block height (index)
                              "bestblock" : "hex",            (string) The hash of the block at the tip of the chain
                              "transactions" : n,             (numeric) The number of transactions with unspent outputs
                              "txouts" : n,                   (numeric) The number of unspent transaction outputs
                              "bogosize" : n,                 (numeric) A meaningless metric for UTXO set size
                              "hash_serialized_2" : "hex",    (string) The serialized hash (only present if 'hash_serialized_2' hash_type is chosen)
                              "disk_size" : n,                (numeric) The estimated size of the chainstate on disk
                              "total_amount" : n              (numeric) The total amount
                            }
                            

    Examples

    stohncoin-cli gettxoutsetinfo
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "gettxoutsetinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • getunconfirmedbalance

    getunconfirmedbalance

    DEPRECATED Identical to getbalances().mine.untrusted_pending

    Result

    Name

    Type

    Description

    n

    numeric

    The balance

  • getwalletinfo

    getwalletinfo

    Returns an object containing various wallet state info.

    Result

    {                                         (json object)
                              "walletname" : "str",                   (string) the wallet name
                              "walletversion" : n,                    (numeric) the wallet version
                              "format" : "str",                       (string) the database format (bdb or sqlite)
                              "balance" : n,                          (numeric) DEPRECATED. Identical to getbalances().mine.trusted
                              "unconfirmed_balance" : n,              (numeric) DEPRECATED. Identical to getbalances().mine.untrusted_pending
                              "immature_balance" : n,                 (numeric) DEPRECATED. Identical to getbalances().mine.immature
                              "txcount" : n,                          (numeric) the total number of transactions in the wallet
                              "keypoololdest" : xxx,                  (numeric) the UNIX epoch time of the oldest pre-generated key in the key pool. Legacy wallets only.
                              "keypoolsize" : n,                      (numeric) how many new keys are pre-generated (only counts external keys)
                              "keypoolsize_hd_internal" : n,          (numeric) how many new keys are pre-generated for internal use (used for change outputs, only appears if the wallet is using this feature, otherwise external keys are used)
                              "unlocked_until" : xxx,                 (numeric, optional) the UNIX epoch time until which the wallet is unlocked for transfers, or 0 if the wallet is locked (only present for passphrase-encrypted wallets)
                              "paytxfee" : n,                         (numeric) the transaction fee configuration, set in SOH/kvB
                              "hdseedid" : "hex",                     (string, optional) the Hash160 of the HD seed (only present when HD is enabled)
                              "private_keys_enabled" : true|false,    (boolean) false if privatekeys are disabled for this wallet (enforced watch-only wallet)
                              "avoid_reuse" : true|false,             (boolean) whether this wallet tracks clean/dirty coins in terms of reuse
                              "scanning" : {                          (json object) current scanning details, or false if no scan is in progress
                                "duration" : n,                       (numeric) elapsed seconds since scan start
                                "progress" : n                        (numeric) scanning progress percentage [0.0, 1.0]
                              },
                              "descriptors" : true|false              (boolean) whether this wallet uses descriptors for scriptPubKey management
                            }
                            

    Examples

    stohncoin-cli getwalletinfo
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getwalletinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • importwallet

    importwallet

    importwallet "filename"

    Imports keys from a wallet dump file (see dumpwallet). Requires a new wallet backup to include imported keys.

    Note: Use “getwalletinfo” to query the scanning progress.

    Argument #1 - filename

    Type: string, required

    The wallet file

    Result

    null    (json null)
                            

    Examples

    Dump the wallet:

    stohncoin-cli dumpwallet "test"
                            

    Import the wallet:

    stohncoin-cli importwallet "test"
                            

    Import using the json rpc call:

    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "importwallet", "params": ["test"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • help

    help

    help ( "command" )

    List all commands, or get help for a specified command.

    Argument #1 - command

    Type: string, optional, default=all commands

    The command to get help on

    Result

    Name

    Type

    Description

    str

    string

    The help text

  • importaddress

    importaddress

    importaddress "address" ( "label" rescan p2sh )

    Adds an address or script (in hex) that can be watched as if it were in your wallet but cannot be used to spend. Requires a new wallet backup.

    Note: This call can take over an hour to complete if rescan is true, during that time, other rpc calls may report that the imported address exists but related transactions are still missing, leading to temporarily incorrect/bogus balances and unspent outputs until rescan completes.

    If you have the full public key, you should call importpubkey instead of this.

    Hint: use importmulti to import more than one address.

    Note: If you import a non-standard raw script in hex form, outputs sending to it will be treated as change, and not show up in many RPCs.

    Note: Use “getwalletinfo” to query the scanning progress.

    Argument #1 - address

    Type: string, required

    The Stohncoin address (or hex-encoded script)

    Argument #2 - label

    Type: string, optional, default=””

    An optional label

    Argument #3 - rescan

    Type: boolean, optional, default=true

    Rescan the wallet for transactions

    Argument #4 - p2sh

    Type: boolean, optional, default=false

    Add the P2SH version of the script as well

    Result

    null    (json null)
                            

    Examples

    Import an address with rescan:

    stohncoin-cli importaddress "myaddress"
                            

    Import using a label without rescan:

    stohncoin-cli importaddress "myaddress" "testing" false
                            

    As a JSON-RPC call:

    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "importaddress", "params": ["myaddress", "testing", false]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • importdescriptors

    importdescriptors

    importdescriptors "requests"

    Import descriptors. This will trigger a rescan of the blockchain based on the earliest timestamp of all descriptors being imported. Requires a new wallet backup.

    Note: This call can take over an hour to complete if using an early timestamp; during that time, other rpc calls may report that the imported keys, addresses or scripts exist but related transactions are still missing.

    Argument #1 - requests

    Type: json array, required

    Data to be imported

    [
                              {                                    (json object)
                                "desc": "str",                     (string, required) Descriptor to import.
                                "active": bool,                    (boolean, optional, default=false) Set this descriptor to be the active descriptor for the corresponding output type/externality
                                "range": n or [n,n],               (numeric or array) If a ranged descriptor is used, this specifies the end or the range (in the form [begin,end]) to import
                                "next_index": n,                   (numeric) If a ranged descriptor is set to active, this specifies the next index to generate addresses from
                                "timestamp": timestamp | "now",    (integer / string, required) Time from which to start rescanning the blockchain for this descriptor, in UNIX epoch time
                                                                   Use the string "now" to substitute the current synced blockchain time.
                                                                   "now" can be specified to bypass scanning, for outputs which are known to never have been used, and
                                                                   0 can be specified to scan the entire blockchain. Blocks up to 2 hours before the earliest timestamp
                                                                   of all descriptors being imported will be scanned.
                                "internal": bool,                  (boolean, optional, default=false) Whether matching outputs should be treated as not incoming payments (e.g. change)
                                "label": "str",                    (string, optional, default='') Label to assign to the address, only allowed with internal=false
                              },
                              ...
                            ]
                            

    Result

    [                              (json array) Response is an array with the same size as the input that has the execution result
                              {                            (json object)
                                "success" : true|false,    (boolean)
                                "warnings" : [             (json array, optional)
                                  "str",                   (string)
                                  ...
                                ],
                                "error" : {                (json object, optional)
                                  ...                      JSONRPC error
                                }
                              },
                              ...
                            ]
                            

    Examples

    stohncoin-cli importdescriptors '[{ "desc": "<my descriptor>", "timestamp":1455191478, "internal": true }, { "desc": "<my desccriptor 2>", "label": "example 2", "timestamp": 1455191480 }]'
                            
    stohncoin-cli importdescriptors '[{ "desc": "<my descriptor>", "timestamp":1455191478, "active": true, "range": [0,100], "label": "<my bech32 wallet>" }]'
                            
  • importmulti

    importmulti

    importmulti "requests" ( "options" )

    Import addresses/scripts (with private or public keys, redeem script (P2SH)), optionally rescanning the blockchain from the earliest creation time of the imported scripts. Requires a new wallet backup.

    If an address/script is imported without all of the private keys required to spend from that address, it will be watchonly. The ‘watchonly’ option must be set to true in this case or a warning will be returned.

    Conversely, if all the private keys are provided and the address/script is spendable, the watchonly option must be set to false, or a warning will be returned.

    Note: This call can take over an hour to complete if rescan is true, during that time, other rpc calls may report that the imported keys, addresses or scripts exist but related transactions are still missing.

    Note: Use “getwalletinfo” to query the scanning progress.

    Argument #1 - requests

    Type: json array, required

    Data to be imported

    “range”: n or [n,n], (numeric or array) If a ranged descriptor is used, this specifies the end or the range (in the form [begin,end]) to import “internal”: bool, (boolean, optional, default=false) Stating whether matching outputs should be treated as not incoming payments (also known as change) “watchonly”: bool, (boolean, optional, default=false) Stating whether matching outputs should be considered watchonly. “label”: “str”, (string, optional, default=’’) Label to assign to the address, only allowed with internal=false “keypool”: bool, (boolean, optional, default=false) Stating whether imported public keys should be added to the keypool for when users request new addresses. Only allowed when wallet private keys are disabled }, … ]

    [
                              {                                                            (json object)
                                "desc": "str",                                             (string) Descriptor to import. If using descriptor, do not also provide address/scriptPubKey, scripts, or pubkeys
                                "scriptPubKey": "<script>" | { "address":"<address>" },    (string / json, required) Type of scriptPubKey (string for script, json for address). Should not be provided if using a descriptor
                                "timestamp": timestamp | "now",                            (integer / string, required) Creation time of the key expressed in UNIX epoch time,
                                                                                           or the string "now" to substitute the current synced blockchain time. The timestamp of the oldest
                                                                                           key will determine how far back blockchain rescans need to begin for missing wallet transactions.
                                                                                           "now" can be specified to bypass scanning, for keys which are known to never have been used, and
                                                                                           0 can be specified to scan the entire blockchain. Blocks up to 2 hours before the earliest key
                                                                                           creation time of all keys being imported by the importmulti call will be scanned.
                                "redeemscript": "str",                                     (string) Allowed only if the scriptPubKey is a P2SH or P2SH-P2WSH address/scriptPubKey
                                "witnessscript": "str",                                    (string) Allowed only if the scriptPubKey is a P2SH-P2WSH or P2WSH address/scriptPubKey
                                "pubkeys": [                                               (json array, optional, default=empty array) Array of strings giving pubkeys to import. They must occur in P2PKH or P2WPKH scripts. They are not required when the private key is also provided (see the "keys" argument).
                                  "pubKey",                                                (string)
                                  ...
                                ],
                                "keys": [                                                  (json array, optional, default=empty array) Array of strings giving private keys to import. The corresponding public keys must occur in the output or redeemscript.
                                  "key",                                                   (string)
                                  ...
                                ],
                            

    Argument #2 - options

    Type: json object, optional

    {
                              "rescan": bool,                                              (boolean, optional, default=true) Stating if should rescan the blockchain after all imports
                            }
                            

    Result

    [                              (json array) Response is an array with the same size as the input that has the execution result
                              {                            (json object)
                                "success" : true|false,    (boolean)
                                "warnings" : [             (json array, optional)
                                  "str",                   (string)
                                  ...
                                ],
                                "error" : {                (json object, optional)
                                  ...                      JSONRPC error
                                }
                              },
                              ...
                            ]
                            

    Examples

    stohncoin-cli importmulti '[{ "scriptPubKey": { "address": "<my address>" }, "timestamp":1455191478 }, { "scriptPubKey": { "address": "<my 2nd address>" }, "label": "example 2", "timestamp": 1455191480 }]'
                            
    stohncoin-cli importmulti '[{ "scriptPubKey": { "address": "<my address>" }, "timestamp":1455191478 }]' '{ "rescan": false}'
                            
  • importprivkey

    importprivkey

    importprivkey "privkey" ( "label" rescan )

    Adds a private key (as returned by dumpprivkey) to your wallet. Requires a new wallet backup.

    Hint: use importmulti to import more than one private key.

    Note: This call can take over an hour to complete if rescan is true, during that time, other rpc calls may report that the imported key exists but related transactions are still missing, leading to temporarily incorrect/bogus balances and unspent outputs until rescan completes.

    Note: Use “getwalletinfo” to query the scanning progress.

    Argument #1 - privkey

    Type: string, required

    The private key (see dumpprivkey)

    Argument #2 - label

    Type: string, optional, default=current label if address exists, otherwise “”

    An optional label

    Argument #3 - rescan

    Type: boolean, optional, default=true

    Rescan the wallet for transactions

    Result

    null    (json null)
                            

    Examples

    Dump a private key:

    stohncoin-cli dumpprivkey "myaddress"
                            

    Import the private key with rescan:

    stohncoin-cli importprivkey "mykey"
                            

    Import using a label and without rescan:

    stohncoin-cli importprivkey "mykey" "testing" false
                            

    Import using default blank label and without rescan:

    stohncoin-cli importprivkey "mykey" "" false
                            

    As a JSON-RPC call:

    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "importprivkey", "params": ["mykey", "testing", false]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • importprunedfunds

    importprunedfunds

    importprunedfunds "rawtransaction" "txoutproof"

    Imports funds without rescan. Corresponding address or script must previously be included in wallet. Aimed towards pruned wallets. The end-user is responsible to import additional transactions that subsequently spend the imported outputs or rescan after the point in the blockchain the transaction is included.

    Argument #1 - rawtransaction

    Type: string, required

    A raw transaction in hex funding an already-existing address in wallet

    Argument #2 - txoutproof

    Type: string, required

    The hex output from gettxoutproof that contains the transaction

    Result

    null    (json null)
                            
  • importpubkey

    importpubkey

    importpubkey "pubkey" ( "label" rescan )

    Adds a public key (in hex) that can be watched as if it were in your wallet but cannot be used to spend. Requires a new wallet backup.

    Hint: use importmulti to import more than one public key.

    Note: This call can take over an hour to complete if rescan is true, during that time, other rpc calls may report that the imported pubkey exists but related transactions are still missing, leading to temporarily incorrect/bogus balances and unspent outputs until rescan completes.

    Note: Use “getwalletinfo” to query the scanning progress.

    Argument #1 - pubkey

    Type: string, required

    The hex-encoded public key

    Argument #2 - label

    Type: string, optional, default=””

    An optional label

    Argument #3 - rescan

    Type: boolean, optional, default=true

    Rescan the wallet for transactions

    Result

    null    (json null)
                            

    Examples

    Import a public key with rescan:

    stohncoin-cli importpubkey "mypubkey"
                            

    Import using a label without rescan:

    stohncoin-cli importpubkey "mypubkey" "testing" false
                            

    As a JSON-RPC call:

    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "importpubkey", "params": ["mypubkey", "testing", false]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • joinpbsts

    joinpsbts ["psbt",...]

    Joins multiple distinct PSBTs with different inputs and outputs into one PSBT with inputs and outputs from all of the PSBTs No input in any of the PSBTs can be in more than one of the PSBTs.

    Argument #1 - txs

    Type: json array, required

    The base64 strings of partially signed transactions

    [
                              "psbt",    (string, required) A base64 string of a PSBT
                              ...
                            ]
                            

    Result

    Name

    Type

    Description

    str

    string

    The base64-encoded partially signed transaction

    Examples

    stohncoin-cli joinpsbts "psbt"
                            
  • keypoolrefill

    keypoolrefill ( newsize )

    Fills the keypool.

    Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted.

    Argument #1 - newsize

    Type: numeric, optional, default=100

    The new keypool size

    Result

    null    (json null)
                            

    Examples

    stohncoin-cli keypoolrefill
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "keypoolrefill", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • listaddressgroupings

    listaddressgroupings

    Lists groups of addresses which have had their common ownership made public by common use as inputs or as the resulting change in past transactions

    Result

    [               (json array)
                              [             (json array)
                                [           (json array)
                                  "str",    (string) The stohncoin address
                                  n,        (numeric) The amount in SOH
                                  "str",    (string, optional) The label
                                  ...
                                ],
                                ...
                              ],
                              ...
                            ]
                            

    Examples

    stohncoin-cli listaddressgroupings
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "listaddressgroupings", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • listbanned

    listbanned

    List all manually banned IPs/Subnets.

    Result

    [
                              {
                              "address": <address>,             (string) The banned address.
                              "banned_until": <time>,           (numeric) The time (in seconds since Jan 1 1970 GMT) until the address is banned.
                              "ban_created": <time>,            (numeric) The time (in seconds since Jan 1 1970 GMT) when the ban was created.
                              }
                            ]
                            

    Examples

    stohncoin-cli listbanned
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "listbanned", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • listlabels

    listlabels ( "purpose" )

    Returns the list of all labels, or labels that are assigned to addresses with a specific purpose.

    Argument #1 - purpose

    Type: string, optional

    Address purpose to list labels for (‘send’,’receive’). An empty string is the same as not providing this argument.

    Result

    [           (json array)
                              "str",    (string) Label name
                              ...
                            ]
                            

    Examples

    List all labels:

    stohncoin-cli listlabels
                            

    List labels that have receiving addresses:

    stohncoin-cli listlabels receive
                            

    List labels that have sending addresses:

    stohncoin-cli listlabels send
                            

    As a JSON-RPC call:

    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "listlabels", "params": [receive]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • listlockunspent

    listlockunspent

    Returns list of temporarily unspendable outputs.

    See the lockunspent call to lock and unlock transactions for spending.

    Result

    [                      (json array)
                              {                    (json object)
                                "txid" : "hex",    (string) The transaction id locked
                                "vout" : n         (numeric) The vout value
                              },
                              ...
                            ]
                            

    Examples

    List the unspent transactions:

    stohncoin-cli listunspent
                            

    Lock an unspent transaction:

    stohncoin-cli lockunspent false "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"
                            

    List the locked transactions:

    stohncoin-cli listlockunspent
                            

    Unlock the transaction again:

    stohncoin-cli lockunspent true "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"
                            

    As a JSON-RPC call:

    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "listlockunspent", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • listreceivedbyaddress

    listreceivedbyaddress

    listreceivedbyaddress ( minconf include_empty include_watchonly "address_filter" )

    List balances by receiving address.

    Argument #1 - minconf

    Type: numeric, optional, default=1

    The minimum number of confirmations before payments are included.

    Argument #2 - include_empty

    Type: boolean, optional, default=false

    Whether to include addresses that haven’t received any payments.

    Argument #3 - include_watchonly

    Type: boolean, optional, default=true for watch-only wallets, otherwise false

    Whether to include watch-only addresses (see ‘importaddress’)

    Argument #4 - address_filter

    Type: string, optional

    If present, only return information on this address.

    Result

    [                                        (json array)
                              {                                      (json object)
                                "involvesWatchonly" : true|false,    (boolean) Only returns true if imported addresses were involved in transaction
                                "address" : "str",                   (string) The receiving address
                                "amount" : n,                        (numeric) The total amount in SOH received by the address
                                "confirmations" : n,                 (numeric) The number of confirmations of the most recent transaction included
                                "label" : "str",                     (string) The label of the receiving address. The default label is ""
                                "txids" : [                          (json array)
                                  "hex",                             (string) The ids of transactions received with the address
                                  ...
                                ]
                              },
                              ...
                            ]
                            

    Examples

    stohncoin-cli listreceivedbyaddress
                            
    stohncoin-cli listreceivedbyaddress 6 true
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "listreceivedbyaddress", "params": [6, true, true]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "listreceivedbyaddress", "params": [6, true, true, "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • listreceivedbylabel

    listreceivedbylabel ( minconf include_empty include_watchonly )

    List received transactions by label.

    Argument #1 - minconf

    Type: numeric, optional, default=1

    The minimum number of confirmations before payments are included.

    Argument #2 - include_empty

    Type: boolean, optional, default=false

    Whether to include labels that haven’t received any payments.

    Argument #3 - include_watchonly

    Type: boolean, optional, default=true for watch-only wallets, otherwise false

    Whether to include watch-only addresses (see ‘importaddress’)

    Result

    [                                        (json array)
                              {                                      (json object)
                                "involvesWatchonly" : true|false,    (boolean) Only returns true if imported addresses were involved in transaction
                                "amount" : n,                        (numeric) The total amount received by addresses with this label
                                "confirmations" : n,                 (numeric) The number of confirmations of the most recent transaction included
                                "label" : "str"                      (string) The label of the receiving address. The default label is ""
                              },
                              ...
                            ]
                            

    Examples

    stohncoin-cli listreceivedbylabel
                            
    stohncoin-cli listreceivedbylabel 6 true
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "listreceivedbylabel", "params": [6, true, true]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • listsinceblock

    listsinceblock ( "blockhash" target_confirmations include_watchonly include_removed )

    Get all transactions in blocks since block [blockhash], or all transactions if omitted.

    If “blockhash” is no longer a part of the main chain, transactions from the fork point onward are included.

    Additionally, if include_removed is set, transactions affecting the wallet which were removed are returned in the “removed” array.

    Argument #1 - blockhash

    Type: string, optional

    If set, the block hash to list transactions since, otherwise list all transactions.

    Argument #2 - target_confirmations

    Type: numeric, optional, default=1

    Return the nth block hash from the main chain. e.g. 1 would mean the best block hash. Note: this is not used as a filter, but only affects [lastblock] in the return value

    Argument #3 - include_watchonly

    Type: boolean, optional, default=true for watch-only wallets, otherwise false

    Include transactions to watch-only addresses (see ‘importaddress’)

    Argument #4 - include_removed

    Type: boolean, optional, default=true

    Show transactions that were removed due to a reorg in the “removed” array

    (not guaranteed to work on pruned nodes)

    Result

    {                                          (json object)
                              "transactions" : [                       (json array)
                                {                                      (json object)
                                  "involvesWatchonly" : true|false,    (boolean) Only returns true if imported addresses were involved in transaction.
                                  "address" : "str",                   (string) The stohncoin address of the transaction.
                                  "category" : "str",                  (string) The transaction category.
                                                                       "send"                  Transactions sent.
                                                                       "receive"               Non-coinbase transactions received.
                                                                       "generate"              Coinbase transactions received with more than 100 confirmations.
                                                                       "immature"              Coinbase transactions received with 100 or fewer confirmations.
                                                                       "orphan"                Orphaned coinbase transactions received.
                                  "amount" : n,                        (numeric) The amount in SOH. This is negative for the 'send' category, and is positive
                                                                       for all other categories
                                  "vout" : n,                          (numeric) the vout value
                                  "fee" : n,                           (numeric) The amount of the fee in SOH. This is negative and only available for the
                                                                       'send' category of transactions.
                                  "confirmations" : n,                 (numeric) The number of confirmations for the transaction. Negative confirmations means the
                                                                       transaction conflicted that many blocks ago.
                                  "generated" : true|false,            (boolean) Only present if transaction only input is a coinbase one.
                                  "trusted" : true|false,              (boolean) Only present if we consider transaction to be trusted and so safe to spend from.
                                  "blockhash" : "hex",                 (string) The block hash containing the transaction.
                                  "blockheight" : n,                   (numeric) The block height containing the transaction.
                                  "blockindex" : n,                    (numeric) The index of the transaction in the block that includes it.
                                  "blocktime" : xxx,                   (numeric) The block time expressed in UNIX epoch time.
                                  "txid" : "hex",                      (string) The transaction id.
                                  "walletconflicts" : [                (json array) Conflicting transaction ids.
                                    "hex",                             (string) The transaction id.
                                    ...
                                  ],
                                  "time" : xxx,                        (numeric) The transaction time expressed in UNIX epoch time.
                                  "timereceived" : xxx,                (numeric) The time received expressed in UNIX epoch time.
                                  "comment" : "str",                   (string) If a comment is associated with the transaction, only present if not empty.
                                  "bip125-replaceable" : "str",        (string) ("yes|no|unknown") Whether this transaction could be replaced due to BIP125 (replace-by-fee);
                                                                       may be unknown for unconfirmed transactions not in the mempool
                                  "abandoned" : true|false,            (boolean) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the
                                                                       'send' category of transactions.
                                  "label" : "str",                     (string) A comment for the address/transaction, if any
                                  "to" : "str"                         (string) If a comment to is associated with the transaction.
                                },
                                ...
                              ],
                              "removed" : [                            (json array) <structure is the same as "transactions" above, only present if include_removed=true>
                                                                       Note: transactions that were re-added in the active chain will appear as-is in this array, and may thus have a positive confirmation count.
                                ...
                              ],
                              "lastblock" : "hex"                      (string) The hash of the block (target_confirmations-1) from the best block on the main chain, or the genesis hash if the referenced block does not exist yet. This is typically used to feed back into listsinceblock the next time you call it. So you would generally use a target_confirmations of say 6, so you will be continually re-notified of transactions until they've reached 6 confirmations plus any new ones
                            }
                            

    Examples

    stohncoin-cli listsinceblock
                            
    stohncoin-cli listsinceblock "000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad" 6
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "listsinceblock", "params": ["000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad", 6]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • listtransactions

    listtransactions

    listtransactions ( "label" count skip include_watchonly )

    If a label name is provided, this will return only incoming transactions paying to addresses with the specified label.

    Returns up to ‘count’ most recent transactions skipping the first ‘from’ transactions.

    Argument #1 - label

    Type: string, optional

    If set, should be a valid label name to return only incoming transactions

    with the specified label, or “*” to disable filtering and return all transactions.

    Argument #2 - count

    Type: numeric, optional, default=10

    The number of transactions to return

    Argument #3 - skip

    Type: numeric, optional, default=0

    The number of transactions to skip

    Argument #4 - include_watchonly

    Type: boolean, optional, default=true for watch-only wallets, otherwise false

    Include transactions to watch-only addresses (see ‘importaddress’)

    Result

    [                                        (json array)
                              {                                      (json object)
                                "involvesWatchonly" : true|false,    (boolean) Only returns true if imported addresses were involved in transaction.
                                "address" : "str",                   (string) The stohncoin address of the transaction.
                                "category" : "str",                  (string) The transaction category.
                                                                     "send"                  Transactions sent.
                                                                     "receive"               Non-coinbase transactions received.
                                                                     "generate"              Coinbase transactions received with more than 100 confirmations.
                                                                     "immature"              Coinbase transactions received with 100 or fewer confirmations.
                                                                     "orphan"                Orphaned coinbase transactions received.
                                "amount" : n,                        (numeric) The amount in SOH. This is negative for the 'send' category, and is positive
                                                                     for all other categories
                                "label" : "str",                     (string) A comment for the address/transaction, if any
                                "vout" : n,                          (numeric) the vout value
                                "fee" : n,                           (numeric) The amount of the fee in SOH. This is negative and only available for the
                                                                     'send' category of transactions.
                                "confirmations" : n,                 (numeric) The number of confirmations for the transaction. Negative confirmations means the
                                                                     transaction conflicted that many blocks ago.
                                "generated" : true|false,            (boolean) Only present if transaction only input is a coinbase one.
                                "trusted" : true|false,              (boolean) Only present if we consider transaction to be trusted and so safe to spend from.
                                "blockhash" : "hex",                 (string) The block hash containing the transaction.
                                "blockheight" : n,                   (numeric) The block height containing the transaction.
                                "blockindex" : n,                    (numeric) The index of the transaction in the block that includes it.
                                "blocktime" : xxx,                   (numeric) The block time expressed in UNIX epoch time.
                                "txid" : "hex",                      (string) The transaction id.
                                "walletconflicts" : [                (json array) Conflicting transaction ids.
                                  "hex",                             (string) The transaction id.
                                  ...
                                ],
                                "time" : xxx,                        (numeric) The transaction time expressed in UNIX epoch time.
                                "timereceived" : xxx,                (numeric) The time received expressed in UNIX epoch time.
                                "comment" : "str",                   (string) If a comment is associated with the transaction, only present if not empty.
                                "bip125-replaceable" : "str",        (string) ("yes|no|unknown") Whether this transaction could be replaced due to BIP125 (replace-by-fee);
                                                                     may be unknown for unconfirmed transactions not in the mempool
                                "abandoned" : true|false             (boolean) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the
                                                                     'send' category of transactions.
                              },
                              ...
                            ]
                            

    Examples

    List the most recent 10 transactions in the systems:

    stohncoin-cli listtransactions
                            

    List transactions 100 to 120:

    stohncoin-cli listtransactions "*" 20 100
                            

    As a JSON-RPC call:

    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "listtransactions", "params": ["*", 20, 100]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • listunspent

    listunspent ( minconf maxconf ["address",...] include_unsafe query_options )

    Returns array of unspent transaction outputs with between minconf and maxconf (inclusive) confirmations.

    Optionally filter to only include txouts paid to specified addresses.

    Argument #1 - minconf

    Type: numeric, optional, default=1

    The minimum confirmations to filter

    Argument #2 - maxconf

    Type: numeric, optional, default=9999999

    The maximum confirmations to filter

    Argument #3 - addresses

    Type: json array, optional, default=empty array

    The stohncoin addresses to filter

    [
                              "address",                     (string) stohncoin address
                              ...
                            ]
                            

    Argument #4 - include_unsafe

    Type: boolean, optional, default=true

    Include outputs that are not safe to spend

    See description of “safe” attribute below.

    Argument #5 - query_options

    Type: json object, optional

    JSON with query options

    {
                              "minimumAmount": amount,       (numeric or string, optional, default=0) Minimum value of each UTXO in SOH
                              "maximumAmount": amount,       (numeric or string, optional, default=unlimited) Maximum value of each UTXO in SOH
                              "maximumCount": n,             (numeric, optional, default=unlimited) Maximum number of UTXOs
                              "minimumSumAmount": amount,    (numeric or string, optional, default=unlimited) Minimum sum value of all UTXOs in SOH
                            }
                            

    Result

    [                                (json array)
                              {                              (json object)
                                "txid" : "hex",              (string) the transaction id
                                "vout" : n,                  (numeric) the vout value
                                "address" : "str",           (string) the stohncoin address
                                "label" : "str",             (string) The associated label, or "" for the default label
                                "scriptPubKey" : "str",      (string) the script key
                                "amount" : n,                (numeric) the transaction output amount in SOH
                                "confirmations" : n,         (numeric) The number of confirmations
                                "redeemScript" : "hex",      (string) The redeemScript if scriptPubKey is P2SH
                                "witnessScript" : "str",     (string) witnessScript if the scriptPubKey is P2WSH or P2SH-P2WSH
                                "spendable" : true|false,    (boolean) Whether we have the private keys to spend this output
                                "solvable" : true|false,     (boolean) Whether we know how to spend this output, ignoring the lack of keys
                                "reused" : true|false,       (boolean) (only present if avoid_reuse is set) Whether this output is reused/dirty (sent to an address that was previously spent from)
                                "desc" : "str",              (string) (only when solvable) A descriptor for spending this output
                                "safe" : true|false          (boolean) Whether this output is considered safe to spend. Unconfirmed transactions
                                                             from outside keys and unconfirmed replacement transactions are considered unsafe
                                                             and are not eligible for spending by fundrawtransaction and sendtoaddress.
                              },
                              ...
                            ]
                            

    Examples

    stohncoin-cli listunspent
                            
    stohncoin-cli listunspent 6 9999999 "[\"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl\",\"bc1q02ad21edsxd23d32dfgqqsz4vv4nmtfzuklhy3\"]"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "listunspent", "params": [6, 9999999 "[\"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl\",\"bc1q02ad21edsxd23d32dfgqqsz4vv4nmtfzuklhy3\"]"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
    stohncoin-cli listunspent 6 9999999 '[]' true '{ "minimumAmount": 0.005 }'
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "listunspent", "params": [6, 9999999, [] , true, { "minimumAmount": 0.005 } ]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • listwalletdir

    listwalletdir

    Returns a list of wallets in the wallet directory.

    Result

    {                        (json object)
                              "wallets" : [          (json array)
                                {                    (json object)
                                  "name" : "str"     (string) The wallet name
                                },
                                ...
                              ]
                            }
                            

    Examples

    stohncoin-cli listwalletdir
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "listwalletdir", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • listwallets

    listwallets

    Returns a list of currently loaded wallets.

    For full information on the wallet, use “getwalletinfo”

    Result

    [           (json array)
                              "str",    (string) the wallet name
                              ...
                            ]
                            

    Examples

    stohncoin-cli listwallets
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "listwallets", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • loadwallet

    loadwallet "filename" ( load_on_startup )

    Loads a wallet from a wallet file or directory.

    Note that all wallet command-line options used when starting stohncoind will be applied to the new wallet (eg -rescan, etc).

    Argument #1 - filename

    Type: string, required

    The wallet directory or .dat file.

    Argument #2 - load_on_startup

    Type: boolean, optional, default=null

    Save wallet name to persistent settings and load on startup. True to add wallet to startup list, false to remove, null to leave unchanged.

    Result

    {                       (json object)
                              "name" : "str",       (string) The wallet name if loaded successfully.
                              "warning" : "str"     (string) Warning message if wallet was not loaded cleanly.
                            }
                            

    Examples

    stohncoin-cli loadwallet "test.dat"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "loadwallet", "params": ["test.dat"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • lockunspent

    lockunspent unlock ( [{"txid":"hex","vout":n},...] )

    Updates list of temporarily unspendable outputs.

    Temporarily lock (unlock=false) or unlock (unlock=true) specified transaction outputs.

    If no transaction outputs are specified when unlocking then all current locked transaction outputs are unlocked.

    A locked transaction output will not be chosen by automatic coin selection, when spending stohncoins.

    Manually selected coins are automatically unlocked.

    Locks are stored in memory only. Nodes start with zero locked outputs, and the locked output list is always cleared (by virtue of process exit) when a node stops or fails.

    Also see the listunspent call

    Argument #1 - unlock

    Type: boolean, required

    Whether to unlock (true) or lock (false) the specified transactions

    Argument #2 - transactions

    Type: json array, optional, default=empty array

    The transaction outputs and within each, the txid (string) vout (numeric).

    [
                              {                   (json object)
                                "txid": "hex",    (string, required) The transaction id
                                "vout": n,        (numeric, required) The output number
                              },
                              ...
                            ]
                            

    Result

    Name

    Type

    Description

    true|false

    boolean

    Whether the command was successful or not

    Examples

    List the unspent transactions:

    stohncoin-cli listunspent
                            

    Lock an unspent transaction:

    stohncoin-cli lockunspent false "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"
                            

    List the locked transactions:

    stohncoin-cli listlockunspent
                            

    Unlock the transaction again:

    stohncoin-cli lockunspent true "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"
                            

    As a JSON-RPC call:

    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "lockunspent", "params": [false, "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • logging

    logging ( ["include_category",...] ["exclude_category",...] )

    Gets and sets the logging configuration.

    When called without an argument, returns the list of categories with status that are currently being debug logged or not.

    When called with arguments, adds or removes categories from debug logging and return the lists above.

    The arguments are evaluated in order “include”, “exclude”.

    If an item is both included and excluded, it will thus end up being excluded.

    The valid logging categories are: net, tor, mempool, http, bench, zmq, walletdb, rpc, estimatefee, addrman, selectcoins, reindex, cmpctblock, rand, prune, proxy, mempoolrej, libevent, coindb, qt, leveldb, validation In addition, the following are available as category names with special meanings:

    • “all”, “1” : represent all logging categories.

    • “none”, “0” : even if other logging categories are specified, ignore all of them.

    Argument #1 - include

    Type: json array, optional

    The categories to add to debug logging

    [
                              "include_category",    (string) the valid logging category
                              ...
                            ]
                            

    Argument #2 - exclude

    Type: json array, optional

    The categories to remove from debug logging

    [
                              "exclude_category",    (string) the valid logging category
                              ...
                            ]
                            

    Result

    {                             (json object) keys are the logging categories, and values indicates its status
                              "category" : true|false,    (boolean) if being debug logged or not. false:inactive, true:active
                              ...
                            }
                            

    Examples

    stohncoin-cli logging "[\"all\"]" "[\"http\"]"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "logging", "params": [["all"], ["libevent"]]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • ping

    ping

    Requests that a ping be sent to all other nodes, to measure ping time.

    Results provided in getpeerinfo, pingtime and pingwait fields are decimal seconds.

    Ping command is handled in queue with all other commands, so it measures processing backlog, not just network ping.

    Result

    null    (json null)
                            

    Examples

    stohncoin-cli ping
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "ping", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • preciousblock

    preciousblock "blockhash"

    Treats a block as if it were received before others with the same work.

    A later preciousblock call can override the effect of an earlier one.

    The effects of preciousblock are not retained across restarts.

    Argument #1 - blockhash

    Type: string, required

    the hash of the block to mark as precious

    Result

    null    (json null)
                            

    Examples

    stohncoin-cli preciousblock "blockhash"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "preciousblock", "params": ["blockhash"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • prioritisetransaction

    prioritisetransaction "txid" ( dummy ) fee_delta

    Accepts the transaction into mined blocks at a higher (or lower) priority

    Argument #1 - txid

    Type: string, required

    The transaction id.

    Argument #2 - dummy

    Type: numeric, optional

    API-Compatibility for previous API. Must be zero or null.

    DEPRECATED. For forward compatibility use named arguments and omit this parameter.

    Argument #3 - fee_delta

    Type: numeric, required

    The fee value (in satoshis) to add (or subtract, if negative).

    Note, that this value is not a fee rate. It is a value to modify absolute fee of the TX. The fee is not actually paid, only the algorithm for selecting transactions into a block considers the transaction as it would have paid a higher (or lower) fee.

    Result

    Name

    Type

    Description

    true|false

    boolean

    Returns true

    Examples

    stohncoin-cli prioritisetransaction "txid" 0.0 10000
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "prioritisetransaction", "params": ["txid", 0.0, 10000]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • pruneblockchain

    pruneblockchain height

    Argument #1 - height

    Type: numeric, required

    The block height to prune up to. May be set to a discrete height, or to a UNIX epoch time

    to prune blocks whose block time is at least 2 hours older than the provided timestamp.

    Result

    Name

    Type

    Description

    n

    numeric

    Height of the last block pruned

    Examples

    stohncoin-cli pruneblockchain 1000
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "pruneblockchain", "params": [1000]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • psbtbumpfee

    psbtbumpfee "txid" ( options )

    Bumps the fee of an opt-in-RBF transaction T, replacing it with a new transaction B.

    Returns a PSBT instead of creating and signing a new transaction.

    An opt-in RBF transaction with the given txid must be in the wallet.

    The command will pay the additional fee by reducing change outputs or adding inputs when necessary.

    It may add a new change output if one does not already exist.

    All inputs in the original transaction will be included in the replacement transaction.

    The command will fail if the wallet or mempool contains a transaction that spends one of T’s outputs.

    By default, the new fee will be calculated automatically using the estimatesmartfee RPC.

    The user can specify a confirmation target for estimatesmartfee.

    Alternatively, the user can specify a fee rate in sat/vB for the new transaction.

    At a minimum, the new fee rate must be high enough to pay an additional new relay fee (incrementalfee returned by getnetworkinfo) to enter the node’s mempool.

    * WARNING: before version 0.21, fee_rate was in SOH/kvB. As of 0.21, fee_rate is in sat/vB. *

    Argument #1 - txid

    Type: string, required

    The txid to be bumped

    Argument #2 - options

    Type: json object, optional

    {
                              "conf_target": n,          (numeric, optional, default=wallet -txconfirmtarget) Confirmation target in blocks
    
                              "fee_rate": amount,        (numeric or string, optional, default=not set, fall back to wallet fee estimation)
                                                         Specify a fee rate in sat/vB instead of relying on the built-in fee estimator.
                                                         Must be at least 1.000 sat/vB higher than the current transaction fee rate.
                                                         WARNING: before version 0.21, fee_rate was in SOH/kvB. As of 0.21, fee_rate is in sat/vB.
    
                              "replaceable": bool,       (boolean, optional, default=true) Whether the new transaction should still be
                                                         marked bip-125 replaceable. If true, the sequence numbers in the transaction will
                                                         be left unchanged from the original. If false, any input sequence numbers in the
                                                         original transaction that were less than 0xfffffffe will be increased to 0xfffffffe
                                                         so the new transaction will not be explicitly bip-125 replaceable (though it may
                                                         still be replaceable in practice, for example if it has unconfirmed ancestors which
                                                         are replaceable).
    
                              "estimate_mode": "str",    (string, optional, default=unset) The fee estimate mode, must be one of (case insensitive):
                                                         "unset"
                                                         "economical"
                                                         "conservative"
                            }
                            

    Result

    {                    (json object)
                              "psbt" : "str",    (string) The base64-encoded unsigned PSBT of the new transaction.
                              "origfee" : n,     (numeric) The fee of the replaced transaction.
                              "fee" : n,         (numeric) The fee of the new transaction.
                              "errors" : [       (json array) Errors encountered during processing (may be empty).
                                "str",           (string)
                                ...
                              ]
                            }
                            

    Examples

    Bump the fee, get the new transaction’spsbt:

    stohncoin-cli psbtbumpfee <txid>
                            
  • removeprunedfunds

    removeprunedfunds "txid"

    Deletes the specified transaction from the wallet. Meant for use with pruned wallets and as a companion to importprunedfunds. This will affect wallet balances.

    Argument #1 - txid

    Type: string, required

    The hex-encoded id of the transaction you are deleting

    Result

    null    (json null)
                            

    Examples

    stohncoin-cli removeprunedfunds "a8d0c0184dde994a09ec054286f1ce581bebf46446a512166eae7628734ea0a5"
                            

    As a JSON-RPC call:

    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "removeprunedfunds", "params": ["a8d0c0184dde994a09ec054286f1ce581bebf46446a512166eae7628734ea0a5"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • rescanblockchain

    rescanblockchain ( start_height stop_height )

    Rescan the local blockchain for wallet related transactions.

    Note: Use “getwalletinfo” to query the scanning progress.

    Argument #1 - start_height

    Type: numeric, optional, default=0

    block height where the rescan should start

    Argument #2 - stop_height

    Type: numeric, optional

    the last block height that should be scanned. If none is provided it will rescan up to the tip at return time of this call.

    Result

    {                        (json object)
                              "start_height" : n,    (numeric) The block height where the rescan started (the requested height or 0)
                              "stop_height" : n      (numeric) The height of the last rescanned block. May be null in rare cases if there was a reorg and the call didn't scan any blocks because they were already scanned in the background.
                            }
                            

    Examples

    stohncoin-cli rescanblockchain 100000 120000
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "rescanblockchain", "params": [100000, 120000]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • savemempool

    savemempool

    Dumps the mempool to disk. It will fail until the previous dump is fully loaded.

    Result

    null    (json null)
                            

    Examples

    stohncoin-cli savemempool
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "savemempool", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • scantxoutset

    scantxoutset "action" ( [scanobjects,...] )

    EXPERIMENTAL warning: this call may be removed or changed in future releases.

    Scans the unspent transaction output set for entries that match certain output descriptors.

    Examples of output descriptors are:

    addr(<address>) Outputs whose scriptPubKey corresponds to the specified address (does not include P2PK) raw(<hex script>) Outputs whose scriptPubKey equals the specified hex scripts combo(<pubkey>) P2PK, P2PKH, P2WPKH, and P2SH-P2WPKH outputs for the given pubkey pkh(<pubkey>) P2PKH outputs for the given pubkey sh(multi(<n>,<pubkey>,<pubkey>,…)) P2SH-multisig outputs for the given threshold and pubkeys

    In the above, <pubkey> either refers to a fixed public key in hexadecimal notation, or to an xpub/xprv optionally followed by one or more path elements separated by “/”, and optionally ending in “/*” (unhardened), or “/*’” or “/*h” (hardened) to specify all unhardened or hardened child keys.

    In the latter case, a range needs to be specified by below if different from 1000.

    For more information on output descriptors, see the documentation in the doc/descriptors.md file.

    Argument #1 - action

    Type: string, required

    The action to execute

    “start” for starting a scan “abort” for aborting the current scan (returns true when abort was successful) “status” for progress report (in %) of the current scan

    Argument #2 - scanobjects

    Type: json array

    Array of scan objects. Required for “start” action

    Every scan object is either a string descriptor or an object:

    [
                              "descriptor",             (string) An output descriptor
                              {                         (json object) An object with output descriptor and metadata
                                "desc": "str",          (string, required) An output descriptor
                                "range": n or [n,n],    (numeric or array, optional, default=1000) The range of HD chain indexes to explore (either end or [begin,end])
                              },
                              ...
                            ]
                            

    Result

    {                                (json object)
                              "success" : true|false,        (boolean) Whether the scan was completed
                              "txouts" : n,                  (numeric) The number of unspent transaction outputs scanned
                              "height" : n,                  (numeric) The current block height (index)
                              "bestblock" : "hex",           (string) The hash of the block at the tip of the chain
                              "unspents" : [                 (json array)
                                {                            (json object)
                                  "txid" : "hex",            (string) The transaction id
                                  "vout" : n,                (numeric) The vout value
                                  "scriptPubKey" : "hex",    (string) The script key
                                  "desc" : "str",            (string) A specialized descriptor for the matched scriptPubKey
                                  "amount" : n,              (numeric) The total amount in SOH of the unspent output
                                  "height" : n               (numeric) Height of the unspent transaction output
                                },
                                ...
                              ],
                              "total_amount" : n             (numeric) The total amount of all found unspent outputs in SOH
                            }
                            
  • send

    send [{"address":amount},{"data":"hex"},...] ( conf_target "estimate_mode" fee_rate options )

    EXPERIMENTAL warning: this call may be changed in future releases.

    Send a transaction.

    Argument #1 - outputs

    Type: json array, required

    The outputs (key-value pairs), where none of the keys are duplicated.

    That is, each address can only appear once and there can only be one ‘data’ object. For convenience, a dictionary, which holds the key-value pairs directly, is also accepted.

    [
                              {                                 (json object)
                                "address": amount,              (numeric or string, required) A key-value pair. The key (string) is the stohncoin address, the value (float or string) is the amount in SOH
                              },
                              {                                 (json object)
                                "data": "hex",                  (string, required) A key-value pair. The key must be "data", the value is hex-encoded data
                              },
                              ...
                            ]
                            

    Argument #2 - conf_target

    Type: numeric, optional, default=wallet -txconfirmtarget

    Confirmation target in blocks

    Argument #3 - estimate_mode

    Type: string, optional, default=unset

    The fee estimate mode, must be one of (case insensitive):

    “unset” “economical” “conservative”

    Argument #4 - fee_rate

    Type: numeric or string, optional, default=not set, fall back to wallet fee estimation

    Specify a fee rate in sat/vB.

    Argument #5 - options

    Type: json object, optional

    “locktime”: n, (numeric, optional, default=0) Raw locktime. Non-0 value also locktime-activates inputs

    “lock_unspents”: bool, (boolean, optional, default=false) Lock selected unspent outputs “psbt”: bool, (boolean, optional, default=automatic) Always return a PSBT, implies add_to_wallet=false. “subtract_fee_from_outputs”: [ (json array, optional, default=empty array) Outputs to subtract the fee from, specified as integer indices. The fee will be equally deducted from the amount of each specified output. Those recipients will receive less stohncoins than you enter in their corresponding amount field. If no outputs are specified here, the sender pays the fee. vout_index, (numeric) The zero-based output index, before a change output is added. … ], “replaceable”: bool, (boolean, optional, default=wallet default) Marks this transaction as BIP125 replaceable. Allows this transaction to be replaced by a transaction with higher fees }

    {
                              "add_inputs": bool,               (boolean, optional, default=false) If inputs are specified, automatically include more if they are not enough.
                              "add_to_wallet": bool,            (boolean, optional, default=true) When false, returns a serialized transaction which will not be added to the wallet or broadcast
                              "change_address": "hex",          (string, optional, default=pool address) The stohncoin address to receive the change
                              "change_position": n,             (numeric, optional, default=random) The index of the change output
                              "change_type": "str",             (string, optional, default=set by -changetype) The output type to use. Only valid if change_address is not specified. Options are "legacy", "p2sh-segwit", and "bech32".
                              "conf_target": n,                 (numeric, optional, default=wallet -txconfirmtarget) Confirmation target in blocks
                              "estimate_mode": "str",           (string, optional, default=unset) The fee estimate mode, must be one of (case insensitive):
                                                                "unset"
                                                                "economical"
                                                                "conservative"
                              "fee_rate": amount,               (numeric or string, optional, default=not set, fall back to wallet fee estimation) Specify a fee rate in sat/vB.
                              "include_watching": bool,         (boolean, optional, default=true for watch-only wallets, otherwise false) Also select inputs which are watch only.
                                                                Only solvable inputs can be used. Watch-only destinations are solvable if the public key and/or output script was imported,
                                                                e.g. with 'importpubkey' or 'importmulti' with the 'pubkeys' or 'desc' field.
                              "inputs": [                       (json array, optional, default=empty array) Specify inputs instead of adding them automatically. A JSON array of JSON objects
                                "txid",                         (string, required) The transaction id
                                vout,                           (numeric, required) The output number
                                sequence,                       (numeric, required) The sequence number
                                ...
                              ],
                            

    Result

    {                             (json object)
                              "complete" : true|false,    (boolean) If the transaction has a complete set of signatures
                              "txid" : "hex",             (string) The transaction id for the send. Only 1 transaction is created regardless of the number of addresses.
                              "hex" : "hex",              (string) If add_to_wallet is false, the hex-encoded raw transaction with signature(s)
                              "psbt" : "str"              (string) If more signatures are needed, or if add_to_wallet is false, the base64-encoded (partially) signed transaction
                            }
                            

    Examples

    Send 0.1 SOH with a confirmation target of 6 blocks in economical fee estimate mode:

    stohncoin-cli send '{"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl": 0.1}' 6 economical
                            

    Send 0.2 SOH with a fee rate of 1.1 sat/vB using positional arguments:

    stohncoin-cli send '{"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl": 0.2}' null "unset" 1.1
                            

    Send 0.2 SOH with a fee rate of 1 sat/vB using the options argument:

    stohncoin-cli send '{"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl": 0.2}' null "unset" null '{"fee_rate": 1}'
                            

    Send 0.3 SOH with a fee rate of 25 sat/vB using named arguments:

    stohncoin-cli -named send outputs='{"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl": 0.3}' fee_rate=25
                            

    Create a transaction that should confirm the next block, with a specific input, and return result without adding to wallet or broadcasting to the network:

    stohncoin-cli send '{"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl": 0.1}' 1 economical '{"add_to_wallet": false, "inputs": [{"txid":"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0", "vout":1}]}'
                            
  • sendmany

    sendmany "" {"address":amount} ( minconf "comment" ["address",...] replaceable conf_target "estimate_mode" fee_rate verbose )

    Send multiple times. Amounts are double-precision floating point numbers.

    Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted.

    Argument #1 - dummy

    Type: string, required

    Must be set to “” for backwards compatibility.

    Argument #2 - amounts

    Type: json object, required

    The addresses and amounts

    {
                              "address": amount,    (numeric or string, required) The stohncoin address is the key, the numeric amount (can be string) in SOH is the value
                            }
                            

    Argument #3 - minconf

    Type: numeric, optional

    Ignored dummy value

    Argument #4 - comment

    Type: string, optional

    A comment

    Argument #5 - subtractfeefrom

    Type: json array, optional

    The addresses.

    The fee will be equally deducted from the amount of each selected address. Those recipients will receive less stohncoins than you enter in their corresponding amount field. If no addresses are specified here, the sender pays the fee.

    [
                              "address",            (string) Subtract fee from this address
                              ...
                            ]
                            

    Argument #6 - replaceable

    Type: boolean, optional, default=wallet default

    Allow this transaction to be replaced by a transaction with higher fees via BIP 125

    Argument #7 - conf_target

    Type: numeric, optional, default=wallet -txconfirmtarget

    Confirmation target in blocks

    Argument #8 - estimate_mode

    Type: string, optional, default=unset

    The fee estimate mode, must be one of (case insensitive):

    “unset” “economical” “conservative”

    Argument #9 - fee_rate

    Type: numeric or string, optional, default=not set, fall back to wallet fee estimation

    Specify a fee rate in sat/vB.

    Result (if verbose is not set or set to false)

    Name

    Type

    Description

    hex

    string

    The transaction id for the send. Only 1 transaction is created regardless of

    Result (if verbose is set to true)

    {                          (json object)
                              "txid" : "hex",          (string) The transaction id for the send. Only 1 transaction is created regardless of
                                                       the number of addresses.
                              "fee reason" : "str"     (string) The transaction fee reason.
                            }
                            

    Examples

    Send two amounts to two different addresses::

    stohncoin-cli sendmany "" "{\"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl\":0.01,\"bc1q02ad21edsxd23d32dfgqqsz4vv4nmtfzuklhy3\":0.02}"
                            

    Send two amounts to two different addresses setting the confirmation and comment::

    stohncoin-cli sendmany "" "{\"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl\":0.01,\"bc1q02ad21edsxd23d32dfgqqsz4vv4nmtfzuklhy3\":0.02}" 6 "testing"
                            

    Send two amounts to two different addresses, subtract fee from amount::

    stohncoin-cli sendmany "" "{\"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl\":0.01,\"bc1q02ad21edsxd23d32dfgqqsz4vv4nmtfzuklhy3\":0.02}" 1 "" "[\"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl\",\"bc1q02ad21edsxd23d32dfgqqsz4vv4nmtfzuklhy3\"]"
                            

    As a JSON-RPC call:

    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "sendmany", "params": ["", {"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl":0.01,"bc1q02ad21edsxd23d32dfgqqsz4vv4nmtfzuklhy3":0.02}, 6, "testing"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • sendrawtransaction

    sendrawtransaction "hexstring" ( maxfeerate )

    Submit a raw transaction (serialized, hex-encoded) to local node and network.

    Note that the transaction will be sent unconditionally to all peers, so using this for manual rebroadcast may degrade privacy by leaking the transaction’s origin, as nodes will normally not rebroadcast non-wallet transactions already in their mempool.

    Also see createrawtransaction and signrawtransactionwithkey calls.

    Argument #1 - hexstring

    Type: string, required

    The hex string of the raw transaction

    Argument #2 - maxfeerate

    Type: numeric or string, optional, default=0.10

    Reject transactions whose fee rate is higher than the specified value, expressed in SOH/kB.

    Set to 0 to accept any fee rate.

    Result

    Name

    Type

    Description

    hex

    string

    The transaction hash in hex

    Examples

    Create a transaction:

    stohncoin-cli createrawtransaction "[{\"txid\" : \"mytxid\",\"vout\":0}]" "{\"myaddress\":0.01}"
                            

    Sign the transaction, and get back the hex:

    stohncoin-cli signrawtransactionwithwallet "myhex"
                            

    Send the transaction (signed hex):

    stohncoin-cli sendrawtransaction "signedhex"
                            

    As a JSON-RPC call:

    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "sendrawtransaction", "params": ["signedhex"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • sendtoaddress

    sendtoaddress "address" amount ( "comment" "comment_to" subtractfeefromamount replaceable conf_target "estimate_mode" avoid_reuse fee_rate verbose )

    Send an amount to a given address.

    Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted.

    Argument #1 - address

    Type: string, required

    The stohncoin address to send to.

    Argument #2 - amount

    Type: numeric or string, required

    The amount in SOH to send. eg 0.1

    Argument #3 - comment

    Type: string, optional

    A comment used to store what the transaction is for.

    This is not part of the transaction, just kept in your wallet.

    Argument #4 - comment_to

    Type: string, optional

    A comment to store the name of the person or organization

    to which you’re sending the transaction. This is not part of the transaction, just kept in your wallet.

    Argument #5 - subtractfeefromamount

    Type: boolean, optional, default=false

    The fee will be deducted from the amount being sent.

    The recipient will receive less stohncoins than you enter in the amount field.

    Argument #6 - replaceable

    Type: boolean, optional, default=wallet default

    Allow this transaction to be replaced by a transaction with higher fees via BIP 125

    Argument #7 - conf_target

    Type: numeric, optional, default=wallet -txconfirmtarget

    Confirmation target in blocks

    Argument #8 - estimate_mode

    Type: string, optional, default=unset

    The fee estimate mode, must be one of (case insensitive):

    “unset” “economical” “conservative”

    Argument #9 - avoid_reuse

    Type: boolean, optional, default=true

    (only available if avoid_reuse wallet flag is set) Avoid spending from dirty addresses; addresses are considered

    dirty if they have previously been used in a transaction.

    Result (if verbose is not set or set to false)

    Name

    Type

    Description

    hex

    string

    The transaction id.

    Result (if verbose is set to true)

    {                          (json object)
                              "txid" : "hex",          (string) The transaction id.
                              "fee reason" : "str"     (string) The transaction fee reason.
                            }
                            

    Examples

    Send 0.1 SOH:

    stohncoin-cli sendtoaddress "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl" 0.1
                            

    Send 0.1 SOH with a confirmation target of 6 blocks in economical fee estimate mode using positional arguments:

    stohncoin-cli sendtoaddress "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl" 0.1 "donation" "sean's outpost" false true 6 economical
                            

    Send 0.1 SOH with a fee rate of 1.1 sat/vB, subtract fee from amount, BIP125-replaceable, using positional arguments:

    stohncoin-cli sendtoaddress "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl" 0.1 "drinks" "room77" true true null "unset" null 1.1
                            

    Send 0.2 SOH with a confirmation target of 6 blocks in economical fee estimate mode using named arguments:

    stohncoin-cli -named sendtoaddress address="bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl" amount=0.2 conf_target=6 estimate_mode="economical"
                            

    Send 0.5 SOH with a fee rate of 25 sat/vB using named arguments:

    stohncoin-cli -named sendtoaddress address="bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl" amount=0.5 fee_rate=25
                            
    stohncoin-cli -named sendtoaddress address="bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl" amount=0.5 fee_rate=25 subtractfeefromamount=false replaceable=true avoid_reuse=true comment="2 pizzas" comment_to="jeremy" verbose=true
                            
  • setban

    setban "subnet" "command" ( bantime absolute )

    Attempts to add or remove an IP/Subnet from the banned list.

    Argument #1 - subnet

    Type: string, required

    The IP/Subnet (see getpeerinfo for nodes IP) with an optional netmask (default is /32 = single IP)

    Argument #2 - command

    Type: string, required

    ‘add’ to add an IP/Subnet to the list, ‘remove’ to remove an IP/Subnet from the list

    Argument #3 - bantime

    Type: numeric, optional, default=0

    time in seconds how long (or until when if [absolute] is set) the IP is banned (0 or empty means using the default time of 24h which can also be overwritten by the -bantime startup argument)

    Argument #4 - absolute

    Type: boolean, optional, default=false

    If set, the bantime must be an absolute timestamp expressed in UNIX epoch time

    Result

    null    (json null)
                            

    Examples

    stohncoin-cli setban "192.168.0.6" "add" 86400
                            
    stohncoin-cli setban "192.168.0.0/24" "add"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "setban", "params": ["192.168.0.6", "add", 86400]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • sethdseed

    sethdseed ( newkeypool "seed" )

    Set or generate a new HD wallet seed. Non-HD wallets will not be upgraded to being a HD wallet. Wallets that are already HD will have a new HD seed set so that new keys added to the keypool will be derived from this new seed.

    Note that you will need to MAKE A NEW BACKUP of your wallet after setting the HD wallet seed.

    Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted.

    Argument #1 - newkeypool

    Type: boolean, optional, default=true

    Whether to flush old unused addresses, including change addresses, from the keypool and regenerate it.

    If true, the next address from getnewaddress and change address from getrawchangeaddress will be from this new seed. If false, addresses (including change addresses if the wallet already had HD Chain Split enabled) from the existing keypool will be used until it has been depleted.

    Argument #2 - seed

    Type: string, optional, default=random seed

    The WIF private key to use as the new HD seed.

    The seed value can be retrieved using the dumpwallet command. It is the private key marked hdseed=1

    Result

    null    (json null)
                            

    Examples

    stohncoin-cli sethdseed
                            
    stohncoin-cli sethdseed false
                            
    stohncoin-cli sethdseed true "wifkey"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "sethdseed", "params": [true, "wifkey"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • setlabel

    setlabel "address" "label"

    Sets the label associated with the given address.

    Argument #1 - address

    Type: string, required

    The stohncoin address to be associated with a label.

    Argument #2 - label

    Type: string, required

    The label to assign to the address.

    Result

    null    (json null)
                            

    Examples

    stohncoin-cli setlabel "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl" "tabby"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "setlabel", "params": ["bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl", "tabby"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • setnetworkactive

    setnetworkactive state

    Disable/enable all p2p network activity.

    Argument #1 - state

    Type: boolean, required

    true to enable networking, false to disable

    Result

    Name

    Type

    Description

    true|false

    boolean

    The value that was passed in

  • settxfee

    settxfee amount

    Set the transaction fee per kB for this wallet. Overrides the global -paytxfee command line parameter.

    Can be deactivated by passing 0 as the fee. In that case automatic fee selection will be used by default.

    Argument #1 - amount

    Type: numeric or string, required

    The transaction fee in SOH/kvB

    Result

    Name

    Type

    Description

    true|false

    boolean

    Returns true if successful

    Examples

    stohncoin-cli settxfee 0.00001
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "settxfee", "params": [0.00001]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • setwalletflag

    setwalletflag "flag" ( value )

    Change the state of the given wallet flag for a wallet.

    Argument #1 - flag

    Type: string, required

    The name of the flag to change. Current available flags: avoid_reuse

    Argument #2 - value

    Type: boolean, optional, default=true

    The new state.

    Result

    {                               (json object)
                              "flag_name" : "str",          (string) The name of the flag that was modified
                              "flag_state" : true|false,    (boolean) The new state of the flag
                              "warnings" : "str"            (string) Any warnings associated with the change
                            }
                            

    Examples

    stohncoin-cli setwalletflag avoid_reuse
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "setwalletflag", "params": ["avoid_reuse"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • signmessage

    signmessage "address" "message"

    Sign a message with the private key of an address Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted.

    Argument #1 - address

    Type: string, required

    The stohncoin address to use for the private key.

    Argument #2 - message

    Type: string, required

    The message to create a signature of.

    Result

    Name

    Type

    Description

    str

    string

    The signature of the message encoded in base 64

    Examples

    Unlock the wallet for 30 seconds:

    stohncoin-cli walletpassphrase "mypassphrase" 30
                            

    Create the signature:

    stohncoin-cli signmessage "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" "my message"
                            

    Verify the signature:

    stohncoin-cli verifymessage "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" "signature" "my message"
                            

    As a JSON-RPC call:

    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "signmessage", "params": ["1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX", "my message"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • signmessagewithprivkey

    signmessagewithprivkey "privkey" "message"

    Sign a message with the private key of an address

    Argument #1 - privkey

    Type: string, required

    The private key to sign the message with.

    Argument #2 - message

    Type: string, required

    The message to create a signature of.

    Result

    Name

    Type

    Description

    str

    string

    The signature of the message encoded in base 64

    Examples

    Create the signature:

    stohncoin-cli signmessagewithprivkey "privkey" "my message"
                            

    Verify the signature:

    stohncoin-cli verifymessage "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" "signature" "my message"
                            

    As a JSON-RPC call:

    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:8332/
                            
  • signrawtransactionwithkey

    signrawtransactionwithkey "hexstring" ["privatekey",...] ( [{"txid":"hex","vout":n,"scriptPubKey":"hex","redeemScript":"hex","witnessScript":"hex","amount":amount},...] "sighashtype" )

    Sign inputs for raw transaction (serialized, hex-encoded).

    The second argument is an array of base58-encoded private keys that will be the only keys used to sign the transaction.

    The third optional argument (may be null) is an array of previous transaction outputs that this transaction depends on but may not yet be in the block chain.

    Argument #1 - hexstring

    Type: string, required

    The transaction hex string

    Argument #2 - privkeys

    Type: json array, required

    The base58-encoded private keys for signing

    [
                              "privatekey",                (string) private key in base58-encoding
                              ...
                            ]
                            

    Argument #3 - prevtxs

    Type: json array, optional

    The previous dependent transaction outputs

    [
                              {                            (json object)
                                "txid": "hex",             (string, required) The transaction id
                                "vout": n,                 (numeric, required) The output number
                                "scriptPubKey": "hex",     (string, required) script key
                                "redeemScript": "hex",     (string) (required for P2SH) redeem script
                                "witnessScript": "hex",    (string) (required for P2WSH or P2SH-P2WSH) witness script
                                "amount": amount,          (numeric or string) (required for Segwit inputs) the amount spent
                              },
                              ...
                            ]
                            

    Argument #4 - sighashtype

    Type: string, optional, default=ALL

    The signature hash type. Must be one of:

    “ALL” “NONE” “SINGLE” “ALL|ANYONECANPAY” “NONE|ANYONECANPAY” “SINGLE|ANYONECANPAY”

    Result

    {                             (json object)
                              "hex" : "hex",              (string) The hex-encoded raw transaction with signature(s)
                              "complete" : true|false,    (boolean) If the transaction has a complete set of signatures
                              "errors" : [                (json array, optional) Script verification errors (if there are any)
                                {                         (json object)
                                  "txid" : "hex",         (string) The hash of the referenced, previous transaction
                                  "vout" : n,             (numeric) The index of the output to spent and used as input
                                  "scriptSig" : "hex",    (string) The hex-encoded signature script
                                  "sequence" : n,         (numeric) Script sequence number
                                  "error" : "str"         (string) Verification or signing error related to the input
                                },
                                ...
                              ]
                            }
                            

    Examples

    stohncoin-cli signrawtransactionwithkey "myhex" "[\"key1\",\"key2\"]"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "signrawtransactionwithkey", "params": ["myhex", "[\"key1\",\"key2\"]"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • signrawtransactionwithwallet

    signrawtransactionwithwallet "hexstring" ( [{"txid":"hex","vout":n,"scriptPubKey":"hex","redeemScript":"hex","witnessScript":"hex","amount":amount},...] "sighashtype" )

    Sign inputs for raw transaction (serialized, hex-encoded).

    The second optional argument (may be null) is an array of previous transaction outputs that this transaction depends on but may not yet be in the block chain.

    Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted.

    Argument #1 - hexstring

    Type: string, required

    The transaction hex string

    Argument #2 - prevtxs

    Type: json array, optional

    The previous dependent transaction outputs

    [
                              {                            (json object)
                                "txid": "hex",             (string, required) The transaction id
                                "vout": n,                 (numeric, required) The output number
                                "scriptPubKey": "hex",     (string, required) script key
                                "redeemScript": "hex",     (string) (required for P2SH) redeem script
                                "witnessScript": "hex",    (string) (required for P2WSH or P2SH-P2WSH) witness script
                                "amount": amount,          (numeric or string) (required for Segwit inputs) the amount spent
                              },
                              ...
                            ]
                            

    Argument #3 - sighashtype

    Type: string, optional, default=ALL

    The signature hash type. Must be one of

    “ALL” “NONE” “SINGLE” “ALL|ANYONECANPAY” “NONE|ANYONECANPAY” “SINGLE|ANYONECANPAY”

    Result

    {                             (json object)
                              "hex" : "hex",              (string) The hex-encoded raw transaction with signature(s)
                              "complete" : true|false,    (boolean) If the transaction has a complete set of signatures
                              "errors" : [                (json array, optional) Script verification errors (if there are any)
                                {                         (json object)
                                  "txid" : "hex",         (string) The hash of the referenced, previous transaction
                                  "vout" : n,             (numeric) The index of the output to spent and used as input
                                  "scriptSig" : "hex",    (string) The hex-encoded signature script
                                  "sequence" : n,         (numeric) Script sequence number
                                  "error" : "str"         (string) Verification or signing error related to the input
                                },
                                ...
                              ]
                            }
                            

    Examples

    stohncoin-cli signrawtransactionwithwallet "myhex"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "signrawtransactionwithwallet", "params": ["myhex"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • stop

    stop

    Request a graceful shutdown of Stohncoin Core.

    Result

    Name

    Type

    Description

    str

    string

    A string with the content ‘Stohncoin Core stopping’

  • submitblock

    submitblock "hexdata" ( "dummy" )

    Attempts to submit new block to network.

    See https://en.stohncoin.it/wiki/BIP_0022 for full specification.

    Argument #1 - hexdata

    Type: string, required

    the hex-encoded block data to submit

    Argument #2 - dummy

    Type: string, optional, default=ignored

    dummy value, for compatibility with BIP22. This value is ignored.

    Result

    Name

    Type

    Description

    null

    json null

    Returns JSON Null when valid, a string according to BIP22 otherwise

    Examples

    stohncoin-cli submitblock "mydata"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "submitblock", "params": ["mydata"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • submitheader

    submitheader "hexdata"

    Decode the given hexdata as a header and submit it as a candidate chain tip if valid.

    Throws when the header is invalid.

    Argument #1 - hexdata

    Type: string, required

    the hex-encoded block header data

    Result

    Name

    Type

    Description

    null

    json null

    None

    Examples

    stohncoin-cli submitheader "aabbcc"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "submitheader", "params": ["aabbcc"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • testmempoolaccept

    testmempoolaccept ["rawtx",...] ( maxfeerate )

    Returns result of mempool acceptance tests indicating if raw transaction (serialized, hex-encoded) would be accepted by mempool.

    This checks if the transaction violates the consensus or policy rules.

    See sendrawtransaction call.

    Argument #1 - rawtxs

    Type: json array, required

    An array of hex strings of raw transactions.

    Length must be one for now.

    [
                              "rawtx",    (string)
                              ...
                            ]
                            

    Argument #2 - maxfeerate

    Type: numeric or string, optional, default=0.10

    Reject transactions whose fee rate is higher than the specified value, expressed in SOH/kB

    Result

    [                               (json array) The result of the mempool acceptance test for each raw transaction in the input array.
                                                            Length is exactly one for now.
                              {                             (json object)
                                "txid" : "hex",             (string) The transaction hash in hex
                                "allowed" : true|false,     (boolean) If the mempool allows this tx to be inserted
                                "vsize" : n,                (numeric) Virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted (only present when 'allowed' is true)
                                "fees" : {                  (json object) Transaction fees (only present if 'allowed' is true)
                                  "base" : n                (numeric) transaction fee in SOH
                                },
                                "reject-reason" : "str"     (string) Rejection string (only present when 'allowed' is false)
                              },
                              ...
                            ]
                            

    Examples

    Create a transaction:

    stohncoin-cli createrawtransaction "[{\"txid\" : \"mytxid\",\"vout\":0}]" "{\"myaddress\":0.01}"
                            

    Sign the transaction, and get back the hex:

    stohncoin-cli signrawtransactionwithwallet "myhex"
                            

    Test acceptance of the transaction (signed hex):

    stohncoin-cli testmempoolaccept '["signedhex"]'
                            

    As a JSON-RPC call:

    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "testmempoolaccept", "params": [["signedhex"]]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • unloadwallet

    unloadwallet ( "wallet_name" load_on_startup )

    Unloads the wallet referenced by the request endpoint otherwise unloads the wallet specified in the argument.

    Specifying the wallet name on a wallet endpoint is invalid.

    Argument #1 - wallet_name

    Type: string, optional, default=the wallet name from the RPC endpoint

    The name of the wallet to unload. Must be provided in the RPC endpoint or this parameter (but not both).

    Argument #2 - load_on_startup

    Type: boolean, optional, default=null

    Save wallet name to persistent settings and load on startup. True to add wallet to startup list, false to remove, null to leave unchanged.

    Result

    {                       (json object)
                              "warning" : "str"     (string) Warning message if wallet was not unloaded cleanly.
                            }
                            

    Examples

    stohncoin-cli unloadwallet wallet_name
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "unloadwallet", "params": [wallet_name]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • upgradewallet

    upgradewallet ( version )

    Upgrade the wallet. Upgrades to the latest version if no version number is specified.

    New keys may be generated and a new wallet backup will need to be made.

    Argument #1 - version

    Type: numeric, optional, default=169900

    The version number to upgrade to. Default is the latest wallet version.

    Result

    {                            (json object)
                              "wallet_name" : "str",     (string) Name of wallet this operation was performed on
                              "previous_version" : n,    (numeric) Version of wallet before this operation
                              "current_version" : n,     (numeric) Version of wallet after this operation
                              "result" : "str",          (string, optional) Description of result, if no error
                              "error" : "str"            (string, optional) Error message (if there is one)
                            }
                            

    Examples

    stohncoin-cli upgradewallet 169900
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "upgradewallet", "params": [169900]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • uptime

    uptime

    Returns the total uptime of the server.

    Result

    Name

    Type

    Description

    n

    numeric

    The number of seconds that the server has been running

    Examples

    stohncoin-cli uptime
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "uptime", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • utxoupdatepsbt

    utxoupdatepsbt "psbt" ( ["",{"desc":"str","range":n or [n,n]},...] )

    Updates all segwit inputs and outputs in a PSBT with data from output descriptors, the UTXO set or the mempool.

    Argument #1 - psbt

    Type: string, required

    A base64 string of a PSBT

    Argument #2 - descriptors

    Type: json array, optional

    An array of either strings or objects

    [
                              "",                       (string) An output descriptor
                              {                         (json object) An object with an output descriptor and extra information
                                "desc": "str",          (string, required) An output descriptor
                                "range": n or [n,n],    (numeric or array, optional, default=1000) Up to what index HD chains should be explored (either end or [begin,end])
                              },
                              ...
                            ]
                            

    Result

    Name

    Type

    Description

    str

    string

    The base64-encoded partially signed transaction with inputs updated

    Examples

    stohncoin-cli utxoupdatepsbt "psbt"
                            
  • validateaddress

    validateaddress "address"

    Return information about the given stohncoin address.

    Argument #1 - address

    Type: string, required

    The stohncoin address to validate

    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 stohncoin address validated
                              "scriptPubKey" : "hex",       (string) The hex-encoded scriptPubKey generated by the address
                              "isscript" : true|false,      (boolean) If the key is a script
                              "iswitness" : true|false,     (boolean) If the address is a witness address
                              "witness_version" : n,        (numeric, optional) The version number of the witness program
                              "witness_program" : "hex"     (string, optional) The hex value of the witness program
                            }
                            

    Examples

    stohncoin-cli validateaddress "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "validateaddress", "params": ["bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • verifychain

    verifychain ( checklevel nblocks )

    Verifies blockchain database.

    Argument #1 - checklevel

    Type: numeric, optional, default=3, range=0-4

    How thorough the block verification is:
    • level 0 reads the blocks from disk

    • level 1 verifies block validity

    • level 2 verifies undo data

    • level 3 checks disconnection of tip blocks

    • level 4 tries to reconnect the blocks

    • each level includes the checks of the previous levels

    Argument #2 - nblocks

    Type: numeric, optional, default=6, 0=all

    The number of blocks to check.

    Result

    Name

    Type

    Description

    true|false

    boolean

    Verified or not

    Examples

    stohncoin-cli verifychain
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "verifychain", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • verifymessage

    verifymessage "address" "signature" "message"

    Verify a signed message

    Argument #1 - address

    Type: string, required

    The stohncoin address to use for the signature.

    Argument #2 - signature

    Type: string, required

    The signature provided by the signer in base 64 encoding (see signmessage).

    Argument #3 - message

    Type: string, required

    The message that was signed.

    Result

    Name

    Type

    Description

    true|false

    boolean

    If the signature is verified or not.

    Examples

    Unlock the wallet for 30 seconds:

    stohncoin-cli walletpassphrase "mypassphrase" 30
                            

    Create the signature:

    stohncoin-cli signmessage "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" "my message"
                            

    Verify the signature:

    stohncoin-cli verifymessage "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" "signature" "my message"
                            

    As a JSON-RPC call:

    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "verifymessage", "params": ["1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX", "signature", "my message"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • verifytxoutproof

    verifytxoutproof "proof"

    Verifies that a proof points to a transaction in a block, returning the transaction it commits to and throwing an RPC error if the block is not in our best chain

    Argument #1 - proof

    Type: string, required

    The hex-encoded proof generated by gettxoutproof

    Result

    [           (json array)
                              "hex",    (string) The txid(s) which the proof commits to, or empty array if the proof can not be validated.
                              ...
                            ]
                            
  • walletcreatefundedpsbt

    walletcreatefundedpsbt ( [{"txid":"hex","vout":n,"sequence":n},...] ) [{"address":amount},{"data":"hex"},...] ( locktime options bip32derivs )

    Creates and funds a transaction in the Partially Signed Transaction format.

    Implements the Creator and Updater roles.

    Argument #1 - inputs

    Type: json array, optional

    Leave empty to add inputs automatically. See add_inputs option.

    [
                              {                              (json object)
                                "txid": "hex",               (string, required) The transaction id
                                "vout": n,                   (numeric, required) The output number
                                "sequence": n,               (numeric, optional, default=depends on the value of the 'locktime' and 'options.replaceable' arguments) The sequence number
                              },
                              ...
                            ]
                            

    Argument #2 - outputs

    Type: json array, required

    The outputs (key-value pairs), where none of the keys are duplicated.

    That is, each address can only appear once and there can only be one ‘data’ object. For compatibility reasons, a dictionary, which holds the key-value pairs directly, is also accepted as second parameter.

    [
                              {                              (json object)
                                "address": amount,           (numeric or string, required) A key-value pair. The key (string) is the stohncoin address, the value (float or string) is the amount in SOH
                              },
                              {                              (json object)
                                "data": "hex",               (string, required) A key-value pair. The key must be "data", the value is hex-encoded data
                              },
                              ...
                            ]
                            

    Argument #3 - locktime

    Type: numeric, optional, default=0

    Raw locktime. Non-0 value also locktime-activates inputs

    Argument #4 - options

    Type: json object, optional

    “replaceable”: bool, (boolean, optional, default=wallet default) Marks this transaction as BIP125 replaceable.

    Allows this transaction to be replaced by a transaction with higher fees “conf_target”: n, (numeric, optional, default=wallet -txconfirmtarget) Confirmation target in blocks “estimate_mode”: “str”, (string, optional, default=unset) The fee estimate mode, must be one of (case insensitive): “unset” “economical” “conservative” }

    {
                              "add_inputs": bool,            (boolean, optional, default=false) If inputs are specified, automatically include more if they are not enough.
                              "changeAddress": "hex",        (string, optional, default=pool address) The stohncoin address to receive the change
                              "changePosition": n,           (numeric, optional, default=random) The index of the change output
                              "change_type": "str",          (string, optional, default=set by -changetype) The output type to use. Only valid if changeAddress is not specified. Options are "legacy", "p2sh-segwit", and "bech32".
                              "includeWatching": bool,       (boolean, optional, default=true for watch-only wallets, otherwise false) Also select inputs which are watch only
                              "lockUnspents": bool,          (boolean, optional, default=false) Lock selected unspent outputs
                              "fee_rate": amount,            (numeric or string, optional, default=not set, fall back to wallet fee estimation) Specify a fee rate in sat/vB.
                              "feeRate": amount,             (numeric or string, optional, default=not set, fall back to wallet fee estimation) Specify a fee rate in SOH/kvB.
                              "subtractFeeFromOutputs": [    (json array, optional, default=empty array) The outputs to subtract the fee from.
                                                             The fee will be equally deducted from the amount of each specified output.
                                                             Those recipients will receive less stohncoins than you enter in their corresponding amount field.
                                                             If no outputs are specified here, the sender pays the fee.
                                vout_index,                  (numeric) The zero-based output index, before a change output is added.
                                ...
                              ],
                            

    Argument #5 - bip32derivs

    Type: boolean, optional, default=true

    Include BIP 32 derivation paths for public keys if we know them

    Result

    {                     (json object)
                              "psbt" : "str",     (string) The resulting raw transaction (base64-encoded string)
                              "fee" : n,          (numeric) Fee in SOH the resulting transaction pays
                              "changepos" : n     (numeric) The position of the added change output, or -1
                            }
                            

    Examples

    Create a transaction with no inputs:

    stohncoin-cli walletcreatefundedpsbt "[{\"txid\":\"myid\",\"vout\":0}]" "[{\"data\":\"00010203\"}]"
                            
  • walletlock

    walletlock

    Removes the wallet encryption key from memory, locking the wallet.

    After calling this method, you will need to call walletpassphrase again before being able to call any methods which require the wallet to be unlocked.

    Result

    null    (json null)
                            

    Examples

    Set the passphrase for 2 minutes to perform a transaction:

    stohncoin-cli walletpassphrase "my pass phrase" 120
                            

    Perform a send (requires passphrase set):

    stohncoin-cli sendtoaddress "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl" 1.0
                            

    Clear the passphrase since we are done before 2 minutes is up:

    stohncoin-cli walletlock
                            

    As a JSON-RPC call:

    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "walletlock", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • walletpassphrase

    walletpassphrase "passphrase" timeout

    Stores the wallet decryption key in memory for ‘timeout’ seconds.

    This is needed prior to performing transactions related to private keys such as sending stohncoins Note:

    Issuing the walletpassphrase command while the wallet is already unlocked will set a new unlock time that overrides the old one.

    Argument #1 - passphrase

    Type: string, required

    The wallet passphrase

    Argument #2 - timeout

    Type: numeric, required

    The time to keep the decryption key in seconds; capped at 100000000 (~3 years).

    Result

    null    (json null)
                            

    Examples

    Unlock the wallet for 60 seconds:

    stohncoin-cli walletpassphrase "my pass phrase" 60
                            

    Lock the wallet again (before 60 seconds):

    stohncoin-cli walletlock
                            

    As a JSON-RPC call:

    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "walletpassphrase", "params": ["my pass phrase", 60]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • walletpassphrasechange

    walletpassphrasechange "oldpassphrase" "newpassphrase"

    Changes the wallet passphrase from ‘oldpassphrase’ to ‘newpassphrase’.

    Argument #1 - oldpassphrase

    Type: string, required

    The current passphrase

    Argument #2 - newpassphrase

    Type: string, required

    The new passphrase

    Result

    null    (json null)
                            

    Examples

    stohncoin-cli walletpassphrasechange "old one" "new one"
                            
    curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "walletpassphrasechange", "params": ["old one", "new one"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
                            
  • walletprocesspsbt

    walletprocesspsbt "psbt" ( sign "sighashtype" bip32derivs )

    Update a PSBT with input information from our wallet and then sign inputs that we can sign for.

    Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted.

    Argument #1 - psbt

    Type: string, required

    The transaction base64 string

    Argument #2 - sign

    Type: boolean, optional, default=true

    Also sign the transaction when updating

    Argument #3 - sighashtype

    Type: string, optional, default=ALL

    The signature hash type to sign with if not specified by the PSBT. Must be one of

    “ALL” “NONE” “SINGLE” “ALL|ANYONECANPAY” “NONE|ANYONECANPAY” “SINGLE|ANYONECANPAY”

    Argument #4 - bip32derivs

    Type: boolean, optional, default=true

    Include BIP 32 derivation paths for public keys if we know them

    Result

    {                             (json object)
                              "psbt" : "str",             (string) The base64-encoded partially signed transaction
                              "complete" : true|false     (boolean) If the transaction has a complete set of signatures
                            }
                            

    Examples

    stohncoin-cli walletprocesspsbt "psbt"