chain

package
v1.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2025 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

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 Output

type Output struct {
	AssetID ids.ID
	Amount  uint64
	Owner   ids.ShortID
}

Output represents a transaction output

type Result

type Result struct {
	Success bool
	Error   error
	Outputs []Output
}

Result represents the result of transaction execution

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL