signrawtransactionwithwallet

Back to wallet

Changed params/results since v30.2 Wallet

Summary

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

Description

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.

Change Buckets

  • Changed params/results since v30.2

Arguments

  • hexstring (STR, required): The transaction hex string
  • prevtxs (ARR): The previous dependent transaction outputs
  • value (OBJ): No description.
    • txid (STR_HEX, required): The transaction id
    • vout (NUM, required): The output number
    • scriptPubKey (STR_HEX, required): The output script
    • redeemScript (STR_HEX): (required for P2SH) redeem script
    • witnessScript (STR_HEX): (required for P2WSH or P2SH-P2WSH) witness script
    • amount (AMOUNT): (required for Segwit inputs) the amount spent
  • sighashtype (STR): The signature hash type. Must be one of "DEFAULT" "ALL" "NONE" "SINGLE" "ALL|ANYONECANPAY" "NONE|ANYONECANPAY" "SINGLE|ANYONECANPAY"

Results

  • value (OBJ): No description.
  • hex (STR_HEX): The hex-encoded raw transaction with signature(s)
  • complete (BOOL): If the transaction has a complete set of signatures
  • errors (ARR, optional): Script verification errors (if there are any)
    • value (OBJ): No description.
    • txid (STR_HEX): The hash of the referenced, previous transaction
    • vout (NUM): The index of the output to spent and used as input
    • witness (ARR): No description.
      • witness (STR_HEX): No description.
    • scriptSig (STR_HEX): The hex-encoded signature script
    • sequence (NUM): Script sequence number
    • error (STR): Verification or signing error related to the input
  • 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

qbit-cli signrawtransactionwithwallet "myhex"
curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "signrawtransactionwithwallet", "params": ["myhex"]}' -H 'content-type: application/json' http://127.0.0.1:8352/