4 "github.com/vapor/protocol/bc"
7 // UnvoteInput satisfies the TypedInput interface and represents a unvote transaction.
8 type UnvoteInput struct {
9 UnvoteCommitmentSuffix []byte // The unconsumed suffix of the output commitment
10 Arguments [][]byte // Witness
11 Vote []byte // voter xpub
15 // NewUnvoteInput create a new UnvoteInput struct.
16 func NewUnvoteInput(arguments [][]byte, sourceID bc.Hash, assetID bc.AssetID, amount, sourcePos uint64, controlProgram []byte, vote []byte) *TxInput {
17 sc := SpendCommitment{
18 AssetAmount: bc.AssetAmount{
23 SourcePosition: sourcePos,
25 ControlProgram: controlProgram,
29 TypedInput: &UnvoteInput{
37 // InputType is the interface function for return the input type.
38 func (ui *UnvoteInput) InputType() uint8 { return SpendInputType }