Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add consolidate cmd and response framework to the JSON RPC #59

Merged
merged 1 commit into from
Mar 4, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions dcrjson/dcrwalletextcmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@

package dcrjson

// ConsolidateCmd is a type handling custom marshaling and
// unmarshaling of consolidate JSON wallet extension
// commands.
type ConsolidateCmd struct {
Inputs int `json:"inputs"`
Account *string
}

// NewConsolidateCmd creates a new ConsolidateCmd.
func NewConsolidateCmd(inputs int, acct *string) *ConsolidateCmd {
return &ConsolidateCmd{Inputs: inputs, Account: acct}
}

// SStxInput represents the inputs to an SStx transaction. Specifically a
// transactionsha and output number pair, along with the output amounts.
type SStxInput struct {
Expand Down Expand Up @@ -469,6 +482,7 @@ func init() {
// server.
flags := UFWalletOnly

MustRegisterCmd("consolidate", (*ConsolidateCmd)(nil), flags)
MustRegisterCmd("createrawsstx", (*CreateRawSStxCmd)(nil), flags)
MustRegisterCmd("createrawssgentx", (*CreateRawSSGenTxCmd)(nil), flags)
MustRegisterCmd("createrawssrtx", (*CreateRawSSRtxCmd)(nil), flags)
Expand Down