OSDN Git Service

fix commands
[bytom/shuttle.git] / vendor / github.com / bytom / protocol / bc / types / coinbase.go
diff --git a/vendor/github.com/bytom/protocol/bc/types/coinbase.go b/vendor/github.com/bytom/protocol/bc/types/coinbase.go
new file mode 100644 (file)
index 0000000..bf0797d
--- /dev/null
@@ -0,0 +1,17 @@
+package types
+
+// CoinbaseInput records the coinbase message
+type CoinbaseInput struct {
+       Arbitrary []byte
+}
+
+// NewCoinbaseInput creates a new coinbase input struct
+func NewCoinbaseInput(arbitrary []byte) *TxInput {
+       return &TxInput{
+               AssetVersion: 1,
+               TypedInput:   &CoinbaseInput{Arbitrary: arbitrary},
+       }
+}
+
+// InputType is the interface function for return the input type
+func (cb *CoinbaseInput) InputType() uint8 { return CoinbaseInputType }