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"`
Signature string `msg:"signature" json:"signature"`
Nonce uint32 `msg:"nonce" json:"nonce"`
Data []byte `msg:"data" json:"data"`
}
func New ¶
func New(t TransactionType, 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" TransitionAdd TransactionType = "add-transition" ConversionAdd TransactionType = "add-conversion" )
Click to show internal directories.
Click to hide internal directories.