Documentation ¶
Index ¶
- type CrossChainData
- type Transaction
- func (tx *Transaction) Decode(data []byte) error
- func (tx *Transaction) Encode() ([]byte, error)
- func (tx *Transaction) GasCost() uint64
- func (tx *Transaction) Hash() types.Hash
- func (tx *Transaction) Sign(privateKey []byte) error
- func (tx *Transaction) TotalCost() uint64
- func (tx *Transaction) Verify() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CrossChainData ¶
type Transaction ¶
type Transaction struct { Version uint32 SourceChain string DestChain string Nonce uint64 From types.Address To types.Address Amount uint64 Gas uint64 GasPrice uint64 Data []byte Timestamp time.Time Signature []byte }
func NewTransaction ¶
func NewTransaction( from types.Address, to types.Address, amount uint64, nonce uint64, sourceChain string, destChain string, ) *Transaction
func (*Transaction) Decode ¶
func (tx *Transaction) Decode(data []byte) error
func (*Transaction) Encode ¶
func (tx *Transaction) Encode() ([]byte, error)
func (*Transaction) GasCost ¶
func (tx *Transaction) GasCost() uint64
func (*Transaction) Hash ¶
func (tx *Transaction) Hash() types.Hash
func (*Transaction) Sign ¶
func (tx *Transaction) Sign(privateKey []byte) error
func (*Transaction) TotalCost ¶
func (tx *Transaction) TotalCost() uint64
func (*Transaction) Verify ¶
func (tx *Transaction) Verify() error
Click to show internal directories.
Click to hide internal directories.