Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("not found")
)
Functions ¶
Types ¶
type HandlerDelegator ¶ added in v1.16.56
type HandlerDelegator[T any] struct { // contains filtered or unexported fields }
HandlerDelegator wraps a VM and delegates handler creation
func NewHandlerDelegator ¶ added in v1.16.56
func NewHandlerDelegator[T any](vm T) *HandlerDelegator[T]
NewHandlerDelegator creates a new handler delegator for a VM
func (*HandlerDelegator[T]) CreateHandlers ¶ added in v1.16.56
CreateHandlers delegates to the underlying VM's CreateHandlers method if it exists
func (*HandlerDelegator[T]) CreateStaticHandlers ¶ added in v1.16.56
func (h *HandlerDelegator[T]) CreateStaticHandlers(ctx context.Context) (map[string]http.Handler, error)
CreateStaticHandlers returns an empty map as a default implementation
type HandlerProvider ¶ added in v1.16.56
HandlerProvider is the interface that VMs must implement to provide HTTP handlers
type Manager ¶
type Manager interface {
ids.Aliaser
// Return a factory that can create new instances of the vm whose ID is
// [vmID]
GetFactory(vmID ids.ID) (Factory, error)
// Map [vmID] to [factory]. [factory] creates new instances of the vm whose
// ID is [vmID]
RegisterFactory(ctx context.Context, vmID ids.ID, factory Factory) error
// ListFactories returns all the IDs that have had factories registered.
ListFactories() ([]ids.ID, error)
// Versions returns the primary alias of the VM mapped to the reported
// version of the VM for all the registered VMs that reported versions.
Versions() (map[string]string, error)
}
Manager tracks a collection of VM factories, their aliases, and their versions. It has the following functionality:
- Register a VM factory. To register a VM is to associate its ID with a VMFactory which, when New() is called upon it, creates a new instance of that VM.
- Get a VM factory. Given the ID of a VM that has been registered, return the factory that the ID is associated with.
- Manage the aliases of VMs
- Manage the versions of VMs
Directories
¶
| Path | Synopsis |
|---|---|
|
Package aivm provides the AI Virtual Machine for the Lux network.
|
Package aivm provides the AI Virtual Machine for the Lux network. |
|
components
|
|
|
gas
The gas package implements dynamic gas pricing specified in LP-103: https://github.com/luxfi/LPs/tree/main/LPs/103-dynamic-fees
|
The gas package implements dynamic gas pricing specified in LP-103: https://github.com/luxfi/LPs/tree/main/LPs/103-dynamic-fees |
|
lux/luxmock
Package luxmock is a generated GoMock package.
|
Package luxmock is a generated GoMock package. |
|
luxmock
Package luxmock is a generated GoMock package.
|
Package luxmock is a generated GoMock package. |
|
verify
Package verify is a generated GoMock package.
|
Package verify is a generated GoMock package. |
|
verify/verifymock
Package verifymock is a generated GoMock package.
|
Package verifymock is a generated GoMock package. |
|
Package dexvm implements a high-performance decentralized exchange VM for the Lux blockchain network.
|
Package dexvm implements a high-performance decentralized exchange VM for the Lux blockchain network. |
|
api
Package api provides RPC and REST API handlers for the DEX VM.
|
Package api provides RPC and REST API handlers for the DEX VM. |
|
block
Package block implements block structure for the DEX VM.
|
Package block implements block structure for the DEX VM. |
|
config
Package config defines configuration types for the DEX VM.
|
Package config defines configuration types for the DEX VM. |
|
lending
Package lending provides a DeFi lending protocol for the DEX VM.
|
Package lending provides a DeFi lending protocol for the DEX VM. |
|
liquidity
Package liquidity implements AMM liquidity pools for the DEX VM.
|
Package liquidity implements AMM liquidity pools for the DEX VM. |
|
network
Package network provides peer-to-peer networking and Warp messaging for the DEX VM.
|
Package network provides peer-to-peer networking and Warp messaging for the DEX VM. |
|
orderbook
Package orderbook implements a high-performance order book for the DEX VM.
|
Package orderbook implements a high-performance order book for the DEX VM. |
|
state
Package state manages persistent state for the DEX VM.
|
Package state manages persistent state for the DEX VM. |
|
txs
Package txs defines transaction types for the DEX VM.
|
Package txs defines transaction types for the DEX VM. |
|
evm
|
|
|
lp176
LP176 implements the fee logic specified here: https://github.com/luxfi/lps/blob/main/LPs/176-dynamic-evm-gas-limit-and-price-discovery-updates/README.md
|
LP176 implements the fee logic specified here: https://github.com/luxfi/lps/blob/main/LPs/176-dynamic-evm-gas-limit-and-price-discovery-updates/README.md |
|
lp176/lp176
LP176 implements the fee logic specified here: https://github.com/luxfi/LPs/blob/main/LPs/176-dynamic-evm-gas-limit-and-price-discovery-updates/README.md
|
LP176 implements the fee logic specified here: https://github.com/luxfi/LPs/blob/main/LPs/176-dynamic-evm-gas-limit-and-price-discovery-updates/README.md |
|
lp226
LP-226 implements the dynamic minimum block delay mechanism specified here: https://github.com/luxfi/lps/blob/main/LPs/226-dynamic-minimum-block-times/README.md
|
LP-226 implements the dynamic minimum block delay mechanism specified here: https://github.com/luxfi/lps/blob/main/LPs/226-dynamic-minimum-block-times/README.md |
|
lp226/lp226
LP-226 implements the dynamic minimum block delay mechanism specified here: https://github.com/luxfi/LPs/blob/main/LPs/226-dynamic-minimum-block-times/README.md
|
LP-226 implements the dynamic minimum block delay mechanism specified here: https://github.com/luxfi/LPs/blob/main/LPs/226-dynamic-minimum-block-times/README.md |
|
example
|
|
|
xsvm/cmd/xsvm
command
|
|
|
block
Package block is a generated GoMock package.
|
Package block is a generated GoMock package. |
|
block/executor
Package executor is a generated GoMock package.
|
Package executor is a generated GoMock package. |
|
block/executor/executormock
Package executormock is a generated GoMock package.
|
Package executormock is a generated GoMock package. |
|
metrics/metricsmock
Package metricsmock is a generated GoMock package.
|
Package metricsmock is a generated GoMock package. |
|
state
Package state is a generated GoMock package.
|
Package state is a generated GoMock package. |
|
state/statemock
Package statemock is a generated GoMock package.
|
Package statemock is a generated GoMock package. |
|
txs
Package txs is a generated GoMock package.
|
Package txs is a generated GoMock package. |
|
txs/mempool
Package mempool is a generated GoMock package.
|
Package mempool is a generated GoMock package. |
|
txs/mempool/mempoolmock
Package mempoolmock is a generated GoMock package.
|
Package mempoolmock is a generated GoMock package. |
|
txs/txsmock
Package txsmock is a generated GoMock package.
|
Package txsmock is a generated GoMock package. |
|
Package kchainvm implements the K-Chain Virtual Machine for distributed key management using ML-KEM post-quantum cryptography and threshold sharing.
|
Package kchainvm implements the K-Chain Virtual Machine for distributed key management using ML-KEM post-quantum cryptography and threshold sharing. |
|
Package kmsvm implements the KMS Virtual Machine (K-Chain) for distributed key management using ML-KEM post-quantum cryptography and threshold sharing.
|
Package kmsvm implements the KMS Virtual Machine (K-Chain) for distributed key management using ML-KEM post-quantum cryptography and threshold sharing. |
|
block
Package block is a generated GoMock package.
|
Package block is a generated GoMock package. |
|
block/executor
Package executor is a generated GoMock package.
|
Package executor is a generated GoMock package. |
|
block/executor/executormock
Package executormock is a generated GoMock package.
|
Package executormock is a generated GoMock package. |
|
fx
Package fx is a generated GoMock package.
|
Package fx is a generated GoMock package. |
|
fx/fxmock
Package fxmock is a generated GoMock package.
|
Package fxmock is a generated GoMock package. |
|
signer/signermock
Package signermock is a generated GoMock package.
|
Package signermock is a generated GoMock package. |
|
state
Package state is a generated GoMock package.
|
Package state is a generated GoMock package. |
|
testcontext
Package testcontext provides a test context for platformvm tests
|
Package testcontext provides a test context for platformvm tests |
|
txs
Package txs is a generated GoMock package.
|
Package txs is a generated GoMock package. |
|
txs/builder
Package builder is a generated GoMock package.
|
Package builder is a generated GoMock package. |
|
txs/fee
TODO: Before Etna, address all TODOs in this package and ensure LP-103 compliance.
|
TODO: Before Etna, address all TODOs in this package and ensure LP-103 compliance. |
|
txs/mempool
Package mempool is a generated GoMock package.
|
Package mempool is a generated GoMock package. |
|
txs/mempool/mempoolmock
Package mempoolmock is a generated GoMock package.
|
Package mempoolmock is a generated GoMock package. |
|
txs/txsmock
Package txsmock is a generated GoMock package.
|
Package txsmock is a generated GoMock package. |
|
utxo
Package utxo is a generated GoMock package.
|
Package utxo is a generated GoMock package. |
|
utxo/utxomock
Package utxomock is a generated GoMock package.
|
Package utxomock is a generated GoMock package. |
|
Package proposervm is a generated GoMock package.
|
Package proposervm is a generated GoMock package. |
|
lp181
LP181 implements the epoch logic specified here: https://github.com/luxfi/LPs/blob/main/LPs/181-p-chain-epoched-views/README.md
|
LP181 implements the epoch logic specified here: https://github.com/luxfi/LPs/blob/main/LPs/181-p-chain-epoched-views/README.md |
|
proposer
Package proposer is a generated GoMock package.
|
Package proposer is a generated GoMock package. |
|
proposer/proposermock
Package proposermock is a generated GoMock package.
|
Package proposermock is a generated GoMock package. |
|
scheduler
Package scheduler is a generated GoMock package.
|
Package scheduler is a generated GoMock package. |
|
scheduler/schedulermock
Package schedulermock is a generated GoMock package.
|
Package schedulermock is a generated GoMock package. |
|
state
Package state is a generated GoMock package.
|
Package state is a generated GoMock package. |
|
state/statemock
Package statemock is a generated GoMock package.
|
Package statemock is a generated GoMock package. |
|
registrymock
Package registrymock is a generated GoMock package.
|
Package registrymock is a generated GoMock package. |
|
commonmock
Package commonmock is a generated GoMock package.
|
Package commonmock is a generated GoMock package. |
|
Package tvm implements the Threshold VM (T-Chain) - MPC as a service for all Lux chains
|
Package tvm implements the Threshold VM (T-Chain) - MPC as a service for all Lux chains |
|
txs
|
|
|
Package vmsmock is a generated GoMock package.
|
Package vmsmock is a generated GoMock package. |
|
accel
Package accel provides cross-platform hardware acceleration for Z-Chain ZK operations.
|
Package accel provides cross-platform hardware acceleration for Z-Chain ZK operations. |
Click to show internal directories.
Click to hide internal directories.