send

Back to wallet

Changed params/results since v30.2 Wallet

Summary

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

Description

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

Send a transaction.

Change Buckets

  • Changed params/results since v30.2

Arguments

  • outputs (ARR, required): The outputs specified as key-value pairs. Each key may only appear once, i.e. there can only be one 'data' output, and no address may be duplicated. At least one output of either type must be specified. For convenience, a dictionary, which holds the key-value pairs directly, is also accepted.
  • value (OBJ_USER_KEYS): No description.
    • address (AMOUNT, required): A key-value pair. The key (string) is the qbit address, the value (float or string) is the amount in QBT
  • value (OBJ): No description.
    • data (STR_HEX, required): A key-value pair. The key must be "data", the value is hex-encoded data that becomes a part of an OP_RETURN output
  • conf_target (NUM): Confirmation target in blocks
  • estimate_mode (STR): The fee estimate mode, must be one of (case insensitive): unset, economical, conservative unset means no mode set (economical mode is used if the transaction is replaceable; otherwise, conservative mode is used). economical estimates use a shorter time horizon, making them more responsive to short-term drops in the prevailing fee market. This mode potentially returns a lower fee rate estimate. conservative estimates use a longer time horizon, making them less responsive to short-term drops in the prevailing fee market. This mode potentially returns a higher fee rate estimate.

  • fee_rate (AMOUNT): Specify a fee rate in sat/vB.

  • options (OBJ_NAMED_PARAMS): No description.
  • add_inputs (BOOL): Automatically include coins from the wallet to cover the target amount.

  • include_unsafe (BOOL): Include inputs that are not safe to spend (unconfirmed transactions from outside keys and unconfirmed replacement transactions). Warning: the resulting transaction may become invalid if one of the unsafe inputs disappears. If that happens, you will need to fund the transaction with different inputs and republish it.

  • minconf (NUM): If add_inputs is specified, require inputs with at least this many confirmations.
  • maxconf (NUM): If add_inputs is specified, require inputs with at most this many confirmations.
  • add_to_wallet (BOOL): When false, returns a serialized transaction which will not be added to the wallet or broadcast
  • change_address (STR): The qbit address to receive the change
  • change_position (NUM): The index of the change output
  • change_type (STR): The output type to use. Only valid if change_address is not specified. Options are "p2mr" on launch chains; unrestricted regtest also accepts "legacy", "p2sh-segwit", "bech32", "bech32m", "p2mr".
  • fee_rate (AMOUNT): Specify a fee rate in sat/vB.
  • include_watching (BOOL): (DEPRECATED) No longer used
  • inputs (ARR): Specify inputs instead of adding them automatically.
    • value (OBJ): No description.
    • txid (STR_HEX, required): The transaction id
    • vout (NUM, required): The output number
    • sequence (NUM): The sequence number
    • weight (NUM): The maximum weight for this input, including the weight of the outpoint and sequence number. Note that signature sizes are not guaranteed to be consistent, so the maximum DER signatures size of 73 bytes should be used when considering ECDSA signatures.Remember to convert serialized sizes to weight units when necessary.
  • locktime (NUM): Raw locktime. Non-0 value also locktime-activates inputs
  • lock_unspents (BOOL): Lock selected unspent outputs
  • psbt (BOOL): Always return a PSBT, implies add_to_wallet=false.
  • subtract_fee_from_outputs (ARR): 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 QBT than you enter in their corresponding amount field. If no outputs are specified here, the sender pays the fee.
    • vout_index (NUM): The zero-based output index, before a change output is added.
  • max_tx_weight (NUM): The maximum acceptable transaction weight. Transaction building will fail if this can not be satisfied.
  • conf_target (NUM): Confirmation target in blocks
  • estimate_mode (STR): The fee estimate mode, must be one of (case insensitive): unset, economical, conservative unset means no mode set (economical mode is used if the transaction is replaceable; otherwise, conservative mode is used). economical estimates use a shorter time horizon, making them more responsive to short-term drops in the prevailing fee market. This mode potentially returns a lower fee rate estimate. conservative estimates use a longer time horizon, making them less responsive to short-term drops in the prevailing fee market. This mode potentially returns a higher fee rate estimate.

  • replaceable (BOOL): Marks this transaction as BIP125-replaceable. Allows this transaction to be replaced by a transaction with higher fees

  • solving_data (OBJ): Keys and scripts needed for producing a final transaction with a dummy signature. Used for fee estimation during coin selection.
    • pubkeys (ARR): Public keys involved in this transaction.
    • pubkey (STR_HEX): A public key
    • scripts (ARR): Scripts involved in this transaction.
    • script (STR_HEX): A script
    • descriptors (ARR): Descriptors that provide solving data for this transaction.
    • descriptor (STR): A descriptor
  • version (NUM): Transaction version

Results

  • value (OBJ): No description.
  • complete (BOOL): If the transaction has a complete set of signatures
  • txid (STR_HEX, optional): The transaction id for the send. Only 1 transaction is created regardless of the number of addresses.
  • hex (STR_HEX, optional): If add_to_wallet is false, the hex-encoded raw transaction with signature(s)
  • psbt (STR, optional): If more signatures are needed, or if add_to_wallet is false, the base64-encoded (partially) signed transaction
  • pqc_key_states (ARR, optional): PQC usage state for local wallet keys that participated in this response.
    • value (OBJ): No description.
    • pubkey (STR_HEX): The hex-encoded PQC public key.
    • pqc_signature_count (NUM): The number of signatures used by this PQC key.
    • pqc_signature_limit (NUM): The hard signature limit for this PQC key.
    • pqc_signatures_remaining (NUM): The remaining signature budget for this PQC key.
    • pqc_limit_state (STR): The PQC usage state. One of normal, warning, critical, or exhausted.
  • pqc_overall_limit_state (STR, optional): The maximum PQC usage severity across pqc_key_states.
  • pqc_signature_count (NUM, optional): The number of signatures used by the single local PQC key associated with this response.
  • pqc_signature_limit (NUM, optional): The hard signature limit for the single local PQC key associated with this response.
  • pqc_signatures_remaining (NUM, optional): The remaining signature budget for the single local PQC key associated with this response.
  • pqc_limit_state (STR, optional): The PQC usage state for the single local PQC key associated with this response.
  • warnings (ARR, optional): Human-readable warning lines emitted when PQC threshold transitions or reminder buckets fire.
    • warning (STR): No description.

Examples

Send 0.1 QBT with a confirmation target of 6 blocks in economical fee estimate mode
qbit-cli send '{"qb1zqqqsyqcyq5rqwzqfpg9scrgwpugpzysnzs23v9ccrydpk8qarc0sjq57mw": 0.1}' 6 economical
Send 0.2 QBT with a fee rate of 1.1 sat/vB using positional arguments
qbit-cli send '{"qb1zqqqsyqcyq5rqwzqfpg9scrgwpugpzysnzs23v9ccrydpk8qarc0sjq57mw": 0.2}' null "unset" 1.1
Send 0.2 QBT with a fee rate of 1 sat/vB using the options argument
qbit-cli send '{"qb1zqqqsyqcyq5rqwzqfpg9scrgwpugpzysnzs23v9ccrydpk8qarc0sjq57mw": 0.2}' null "unset" null '{"fee_rate": 1}'
Send 0.3 QBT with a fee rate of 25 sat/vB using named arguments
qbit-cli -named send outputs='{"qb1zqqqsyqcyq5rqwzqfpg9scrgwpugpzysnzs23v9ccrydpk8qarc0sjq57mw": 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
qbit-cli send '{"qb1zqqqsyqcyq5rqwzqfpg9scrgwpugpzysnzs23v9ccrydpk8qarc0sjq57mw": 0.1}' 1 economical '{"add_to_wallet": false, "inputs": [{"txid":"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0", "vout":1}]}'