Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Transaction ¶
type Transaction struct { Type TransactionType `msg:"type" json:"type"` Timestamp int64 `msg:"timestamp" json:"timestamp"` Signer string `msg:"signer" json:"signer"` Signature string `msg:"signature" json:"signature"` Nonce uint32 `msg:"nonce" json:"nonce"` Data []byte `msg:"data" json:"data"` }
func New ¶
func New(t TransactionType, signer string, data []byte) *Transaction
func (*Transaction) FromBytes ¶
func (t *Transaction) FromBytes(bs []byte) error
func (*Transaction) Hash ¶
func (t *Transaction) Hash() []byte
func (*Transaction) ToBytes ¶
func (t *Transaction) ToBytes() ([]byte, error)
type TransactionType ¶
type TransactionType string
const ( AccountAdd TransactionType = "add-account" PayloadAdd TransactionType = "add-payload" )
Click to show internal directories.
Click to hide internal directories.