4 "github.com/vapor/protocol/bc"
8 // ClaimInput satisfies the TypedInput interface and represents a spend transaction.
9 type ClaimInput struct {
10 SpendCommitmentSuffix []byte // The unconsumed suffix of the output commitment
11 Arguments [][]byte // Witness
15 // NewClaimInput create a new SpendInput struct.
16 func NewClaimInput(arguments [][]byte, sourceID bc.Hash, assetID bc.AssetID, amount, sourcePos uint64, controlProgram []byte) *TxInput {
18 sc := SpendCommitment{
19 AssetAmount: bc.AssetAmount{
24 SourcePosition: sourcePos,
26 ControlProgram: controlProgram,
31 TypedInput: &ClaimInput{
38 // InputType is the interface function for return the input type.
39 func (si *ClaimInput) InputType() uint8 { return ClainPeginInputType }