Documentation
¶
Overview ¶
Package chain provides blockchain transaction and block types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action interface {
// TypeID returns the type ID of the action
TypeID() uint8
// Execute executes the action
Execute() error
}
Action represents an action within a transaction
type Block ¶
type Block struct {
Height uint64
ID ids.ID
ParentID ids.ID
Timestamp int64
Transactions []Transaction
}
Block represents a blockchain block
type Transaction ¶
type Transaction interface {
// ID returns the transaction ID
ID() ids.ID
// Bytes returns the serialized transaction
Bytes() []byte
// Sign signs the transaction with the given signers
Sign(signers []ids.ShortID) error
// Verify verifies the transaction signatures
Verify() error
}
Transaction represents a blockchain transaction
Click to show internal directories.
Click to hide internal directories.