createsignaturewithwallet - Particl RPC

createsignaturewithwallet "hexstring" "prevtx" "address" "sighashtype"

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


Arguments:
1. "hexstring"                      (string, required) The transaction hex string
2. "prevtx"                         (json, required) The prevtx signing for
    {
     "txid":"id",                   (string, required) The transaction id
     "vout":n,                      (numeric, required) The output number
     "scriptPubKey": "hex",         (string, required) script key
     "redeemScript": "hex",         (string, required for P2SH or P2WSH) redeem script
     "amount": value                (numeric, required) The amount spent
   }
3. "address"                        (string, required) The address of the private key to sign with
4. "sighashtype"                    (string, optional, default=ALL) The signature hash type. Must be one of
       "ALL"
       "NONE"
       "SINGLE"
       "ALL|ANYONECANPAY"
       "NONE|ANYONECANPAY"
       "SINGLE|ANYONECANPAY"

Result:
The hex encoded signature.

Examples:
> particl-cli createsignaturewithwallet "myhex" 0 "myaddress"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "createsignaturewithwallet", "params": ["myhex", 0, "myaddress"] }' -H 'content-type: text/plain;' http://127.0.0.1:51935/


This is a website, created out of frustration with uncomplete and outdated Particl Core RPC documentation online.

Particl version: 0.16.0.1

Note that the RPC is from a regtest node (for completeness), so it includes some additional calls that a regular node doesn't have.


Anon






Mnemonic