github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/txs/payload/identify_tx.go (about) 1 package payload 2 3 import ( 4 "fmt" 5 6 "github.com/hyperledger/burrow/crypto" 7 "github.com/hyperledger/burrow/execution/registry" 8 ) 9 10 func NewIdentifyTx(address crypto.Address, node *registry.NodeIdentity) *IdentifyTx { 11 return &IdentifyTx{ 12 Inputs: []*TxInput{&TxInput{ 13 Address: address, 14 }}, 15 Node: node, 16 } 17 } 18 19 func (tx *IdentifyTx) Type() Type { 20 return TypeIdentify 21 } 22 23 func (tx *IdentifyTx) GetInputs() []*TxInput { 24 return tx.Inputs 25 } 26 27 func (tx *IdentifyTx) String() string { 28 return fmt.Sprintf("IdentifyTx{%v -> %v}", tx.Inputs, tx.Node.NetworkAddress) 29 } 30 31 func (tx *IdentifyTx) Any() *Any { 32 return &Any{ 33 IdentifyTx: tx, 34 } 35 }