signrawtransactionwithkey - Dash
Example code for the signrawtransactionwithkey json-rpc method. Сomplete guide on how to use signrawtransactionwithkey json-rpc in GetBlock.io Web3 documentation.
Parameters
Transaction
- string (hex)
The transaction to sign as a serialized transaction.
Private Keys
- array
An array holding private keys. If any keys are provided, only they will be used to sign the transaction (even if the wallet has other matching keys).
If this array is empty or not used, and wallet support is enabled, keys from the wallet will be used.
Dependencies
- array
Optional.
The previous outputs being spent by this transaction.
[ { "txid":"id", (string, required) - The TXID of the transaction the output appeared in. The TXID must be encoded in hex in RPC byte order. "vout":n (numeric, required) - The index number of the output (vout) as it appeared in its transaction, with the first output being 0. "scriptPubKey":"key" (string, required) - The output's pubkey script encoded as hex. "redeemScript":"script" (string, required) - If the pubkey script was a script hash, this must be the corresponding redeem script. "amount":n (numeric, required) - The amount of Dash spent. } ,... ]
SigHash
- string
Optional.
The type of signature hash to use for all of the signatures performed.
You must use separate calls to the signrawtransaction RPC if you want to use different signature hash types for different signatures. The allowed values are: ALL, NONE, SINGLE
Request
Response
Last updated