Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address [20]byte
Address represents a 20-byte address
func AddressFromString ¶
AddressFromString converts a hex string to Address
type Block ¶
type Block struct { Height uint64 PreviousHash Hash Timestamp time.Time Transactions []Transaction StateRoot Hash ValidatorSet []ValidatorAddress Signature []byte TxRoot Hash ValidatorRoot Hash }
Block represents a block in the chain
type Hash ¶
type Hash [32]byte
Hash represents a 32-byte hash
func HashFromString ¶
HashFromString converts a hex string to Hash
type Transaction ¶
type Transaction struct { Version uint32 SourceChain string DestinationChain string Sender Address Receiver Address Amount uint64 Nonce uint64 Timestamp time.Time Data []byte Gas uint64 GasPrice uint64 Signature []byte ValidatorSignatures map[Address][]byte AssetSymbol string }
Transaction represents a cross-chain transaction
type ValidatorAddress ¶
type ValidatorAddress [20]byte
ValidatorAddress represents a validator's address
func ValidatorAddressFromString ¶
func ValidatorAddressFromString(s string) (ValidatorAddress, error)
ValidatorAddressFromString converts a hex string to ValidatorAddress
Click to show internal directories.
Click to hide internal directories.