github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/txs/payload/unbond_tx.go (about) 1 package payload 2 3 import ( 4 "fmt" 5 6 "github.com/hyperledger/burrow/crypto" 7 ) 8 9 func NewUnbondTx(address crypto.Address, amount uint64) *UnbondTx { 10 return &UnbondTx{ 11 Input: &TxInput{ 12 Address: address, 13 }, 14 Output: &TxOutput{ 15 Address: address, 16 Amount: amount, 17 }, 18 } 19 } 20 21 func (tx *UnbondTx) Type() Type { 22 return TypeUnbond 23 } 24 25 func (tx *UnbondTx) GetInputs() []*TxInput { 26 return []*TxInput{tx.Input} 27 } 28 29 func (tx *UnbondTx) String() string { 30 return fmt.Sprintf("UnbondTx{%v}", tx.Input.Address) 31 } 32 33 func (tx *UnbondTx) Any() *Any { 34 return &Any{ 35 UnbondTx: tx, 36 } 37 }