btcjson: Add signrawtransactionwithwallet command
This commit is contained in:
parent
ef4a45f8e2
commit
acbc059f70
2 changed files with 27 additions and 0 deletions
|
@ -600,6 +600,24 @@ type SignRawTransactionCmd struct {
|
|||
Flags *string `jsonrpcdefault:"\"ALL\""`
|
||||
}
|
||||
|
||||
// NewSignRawTransactionWithWalletCmd returns a new instance which can be used to issue a
|
||||
// signrawtransaction JSON-RPC command.
|
||||
//
|
||||
// The parameters which are pointers indicate they are optional. Passing nil
|
||||
// for optional parameters will use the default value.
|
||||
func NewSignRawTransactionWithWalletCmd(hexEncodedTx string, inputs *[]RawTxInput) *SignRawTransactionWithWalletCmd {
|
||||
return &SignRawTransactionWithWalletCmd{
|
||||
RawTx: hexEncodedTx,
|
||||
Inputs: inputs,
|
||||
}
|
||||
}
|
||||
|
||||
// SignRawTransactionWithWalletCmd defines the signrawtransactionwithwallet JSON-RPC command.
|
||||
type SignRawTransactionWithWalletCmd struct {
|
||||
RawTx string
|
||||
Inputs *[]RawTxInput
|
||||
}
|
||||
|
||||
// NewSignRawTransactionCmd returns a new instance which can be used to issue a
|
||||
// signrawtransaction JSON-RPC command.
|
||||
//
|
||||
|
@ -693,6 +711,7 @@ func init() {
|
|||
MustRegisterCmd("settxfee", (*SetTxFeeCmd)(nil), flags)
|
||||
MustRegisterCmd("signmessage", (*SignMessageCmd)(nil), flags)
|
||||
MustRegisterCmd("signrawtransaction", (*SignRawTransactionCmd)(nil), flags)
|
||||
MustRegisterCmd("signrawtransactionwithwallet", (*SignRawTransactionWithWalletCmd)(nil), flags)
|
||||
MustRegisterCmd("walletlock", (*WalletLockCmd)(nil), flags)
|
||||
MustRegisterCmd("walletpassphrase", (*WalletPassphraseCmd)(nil), flags)
|
||||
MustRegisterCmd("walletpassphrasechange", (*WalletPassphraseChangeCmd)(nil), flags)
|
||||
|
|
|
@ -137,6 +137,14 @@ type SignRawTransactionResult struct {
|
|||
Errors []SignRawTransactionError `json:"errors,omitempty"`
|
||||
}
|
||||
|
||||
// SignRawTransactionWithWalletResult models the data from the
|
||||
// signrawtransactionwithwallet command.
|
||||
type SignRawTransactionWithWalletResult struct {
|
||||
Hex string `json:"hex"`
|
||||
Complete bool `json:"complete"`
|
||||
Errors []SignRawTransactionError `json:"errors,omitempty"`
|
||||
}
|
||||
|
||||
// ValidateAddressWalletResult models the data returned by the wallet server
|
||||
// validateaddress command.
|
||||
type ValidateAddressWalletResult struct {
|
||||
|
|
Loading…
Reference in a new issue