OSDN Git Service

Merge pull request #201 from Bytom/v0.1
[bytom/vapor.git] / protocol / bc / types / claim_pegin.go
diff --git a/protocol/bc/types/claim_pegin.go b/protocol/bc/types/claim_pegin.go
deleted file mode 100644 (file)
index b013205..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-package types
-
-import (
-       "github.com/vapor/protocol/bc"
-)
-
-
-// ClaimInput satisfies the TypedInput interface and represents a spend transaction.
-type ClaimInput struct {
-       SpendCommitmentSuffix []byte   // The unconsumed suffix of the output commitment
-       Arguments             [][]byte // Witness
-       SpendCommitment
-}
-
-// NewClaimInput create a new SpendInput struct.
-func NewClaimInput(arguments [][]byte, sourceID bc.Hash, assetID bc.AssetID, amount, sourcePos uint64, controlProgram []byte) *TxInput {
-
-       sc := SpendCommitment{
-               AssetAmount: bc.AssetAmount{
-                       AssetId: &assetID,
-                       Amount:  amount,
-               },
-               SourceID:       sourceID,
-               SourcePosition: sourcePos,
-               VMVersion:      1,
-               ControlProgram: controlProgram,
-       }
-
-       return &TxInput{
-               AssetVersion: 1,
-               TypedInput: &ClaimInput{
-                       SpendCommitment: sc,
-                       Arguments:       arguments,
-               },
-       }
-}
-
-// InputType is the interface function for return the input type.
-func (si *ClaimInput) InputType() uint8 { return ClainPeginInputType }