4 "github.com/vapor/protocol/bc"
7 type ClaimCommitment struct {
13 // ClaimInput satisfies the TypedInput interface and represents a spend transaction.
14 type ClaimInput struct {
15 SpendCommitmentSuffix []byte // The unconsumed suffix of the output commitment
16 Arguments [][]byte // Witness
20 // NewClaimInputInput create a new SpendInput struct.
21 func NewClaimInputInput(arguments [][]byte, sourceID bc.Hash, assetID bc.AssetID, amount, sourcePos uint64, controlProgram []byte) *TxInput {
23 sc := SpendCommitment{
24 AssetAmount: bc.AssetAmount{
29 SourcePosition: sourcePos,
31 ControlProgram: controlProgram,
36 TypedInput: &ClaimInput{
43 // InputType is the interface function for return the input type.
44 func (si *ClaimInput) InputType() uint8 { return ClainPeginInputType }