Run NodesReferencevmsplatformvm

txs

Package txs is a generated GoMock package.

import "github.com/luxfi/node/vms/platformvm/txs"

Package txs is a generated GoMock package.

Functions

BoundedBy

func BoundedBy(stakerStart, stakerEnd, lowerBound, upperBound time.Time) bool

BoundedBy returns true iff staker start and end are a (non-strict) subset of the provided time bound

MarshalOwner

func MarshalOwner(o any) ([]byte, error)

MarshalOwner is the ONE canonical byte encoding of an owner — same layout as the owner embedded in every tx, lifted to a standalone buffer. Used wherever a stable owner identity is needed off the tx wire (e.g. lock-owner hash keys in utxo verification, the L1-validator balance/deactivation owner blobs stored in P-Chain state). Takes any to match the fx.Owned.Owners() surface it serves. One encoding everywhere; no codec.

UnmarshalOwner

func UnmarshalOwner(b []byte) (*secp256k1fx.OutputOwners, error)

UnmarshalOwner is the exact inverse of MarshalOwner — it parses the canonical standalone owner buffer back into *secp256k1fx.OutputOwners. Same layout, no codec; the marshal/unmarshal pair is the one owner byte codec every consumer (executor, service, state-owner blobs) shares.

Types

AddChainValidatorTx

AddChainValidatorTx is the legacy per-chain validator registration tx. The struct IS the wire: it holds the zap buffer and reads its fields by offset. No codec, no marshal.

Wire: zap header + object{ [email protected], Validator@77, Chain@121, ChainAuth@153 }.

Deprecated: Use AddValidatorTx. Retained for one release cycle for wire/codec compat with pre-LP-018 binaries.

func NewAddChainValidatorTx(base *lux.BaseTx, validator Validator, chain ids.ID, chainAuth verify.Verifiable) (*AddChainValidatorTx, error)
func (t AddChainValidatorTx) BlockchainID() ids.ID
func (t AddChainValidatorTx) Bytes() []byte
func (tx *AddChainValidatorTx) Chain() ids.ID
func (tx *AddChainValidatorTx) ChainAuth() verify.Verifiable
func (tx *AddChainValidatorTx) ChainID() ids.ID
func (*AddChainValidatorTx) CurrentPriority() Priority
func (tx *AddChainValidatorTx) EndTime() time.Time
func (AddChainValidatorTx) InitRuntime(*runtime.Runtime)
func (tx *AddChainValidatorTx) Initialize(ctx context.Context) error
func (t AddChainValidatorTx) InputIDs() set.Set[ids.ID]
func (t AddChainValidatorTx) Inputs() []*lux.TransferableInput
func (t AddChainValidatorTx) Memo() []byte
func (t AddChainValidatorTx) NetworkID() uint32
func (tx *AddChainValidatorTx) NodeID() ids.NodeID
func (t AddChainValidatorTx) Outputs() []*lux.TransferableOutput
func (*AddChainValidatorTx) PendingPriority() Priority
func (*AddChainValidatorTx) PublicKey() (*bls.PublicKey, bool, error)
func (t *AddChainValidatorTx) SetBytes(b []byte)
func (tx *AddChainValidatorTx) StartTime() time.Time
func (tx *AddChainValidatorTx) SyntacticVerify(rt *runtime.Runtime) error
func (tx *AddChainValidatorTx) Validator() Validator
func (tx *AddChainValidatorTx) Visit(visitor Visitor) error
func (tx *AddChainValidatorTx) Weight() uint64

AddDelegatorTx

AddDelegatorTx is an unsigned addDelegatorTx. The struct IS the wire: it holds the zap buffer and reads its fields by offset. No codec, no marshal.

Wire: zap header + object{ [email protected], Validator@77, StakeOuts@121, DelegationRewardsOwner@137 }.

func NewAddDelegatorTx(base *lux.BaseTx, validator Validator, stakeOuts []*lux.TransferableOutput, delegationRewardsOwner fx.Owner) (*AddDelegatorTx, error)
func (t AddDelegatorTx) BlockchainID() ids.ID
func (t AddDelegatorTx) Bytes() []byte
func (*AddDelegatorTx) ChainID() ids.ID
func (*AddDelegatorTx) CurrentPriority() Priority
func (tx *AddDelegatorTx) DelegationRewardsOwner() fx.Owner
func (tx *AddDelegatorTx) EndTime() time.Time
func (AddDelegatorTx) InitRuntime(*runtime.Runtime)
func (tx *AddDelegatorTx) Initialize(ctx context.Context) error
func (t AddDelegatorTx) InputIDs() set.Set[ids.ID]
func (t AddDelegatorTx) Inputs() []*lux.TransferableInput
func (t AddDelegatorTx) Memo() []byte
func (t AddDelegatorTx) NetworkID() uint32
func (tx *AddDelegatorTx) NodeID() ids.NodeID
func (t AddDelegatorTx) Outputs() []*lux.TransferableOutput
func (*AddDelegatorTx) PendingPriority() Priority
func (*AddDelegatorTx) PublicKey() (*bls.PublicKey, bool, error)
func (tx *AddDelegatorTx) RewardsOwner() fx.Owner
func (t *AddDelegatorTx) SetBytes(b []byte)
func (tx *AddDelegatorTx) Stake() []*lux.TransferableOutput
func (tx *AddDelegatorTx) StakeOuts() []*lux.TransferableOutput
func (tx *AddDelegatorTx) StartTime() time.Time
func (tx *AddDelegatorTx) SyntacticVerify(rt *runtime.Runtime) error
func (tx *AddDelegatorTx) Validator() Validator
func (tx *AddDelegatorTx) Visit(visitor Visitor) error
func (tx *AddDelegatorTx) Weight() uint64

AddPermissionlessDelegatorTx

AddPermissionlessDelegatorTx is an unsigned addPermissionlessDelegatorTx. The struct IS the wire: it holds the zap buffer and reads its fields by offset. No codec, no marshal.

Wire: zap header + object{ [email protected], Validator@77, Chain@121, StakeOuts@153, DelegationRewardsOwner@169 }.

func NewAddPermissionlessDelegatorTx(base *lux.BaseTx, validator Validator, chain ids.ID, stakeOuts []*lux.TransferableOutput, delegationRewardsOwner fx.Owner) (*AddPermissionlessDelegatorTx, error)
func (t AddPermissionlessDelegatorTx) BlockchainID() ids.ID
func (t AddPermissionlessDelegatorTx) Bytes() []byte
func (tx *AddPermissionlessDelegatorTx) Chain() ids.ID
func (tx *AddPermissionlessDelegatorTx) ChainID() ids.ID
func (tx *AddPermissionlessDelegatorTx) CurrentPriority() Priority
func (tx *AddPermissionlessDelegatorTx) DelegationRewardsOwner() fx.Owner
func (tx *AddPermissionlessDelegatorTx) EndTime() time.Time
func (AddPermissionlessDelegatorTx) InitRuntime(*runtime.Runtime)
func (tx *AddPermissionlessDelegatorTx) Initialize(ctx context.Context) error
func (t AddPermissionlessDelegatorTx) InputIDs() set.Set[ids.ID]
func (t AddPermissionlessDelegatorTx) Inputs() []*lux.TransferableInput
func (t AddPermissionlessDelegatorTx) Memo() []byte
func (t AddPermissionlessDelegatorTx) NetworkID() uint32
func (tx *AddPermissionlessDelegatorTx) NodeID() ids.NodeID
func (t AddPermissionlessDelegatorTx) Outputs() []*lux.TransferableOutput
func (tx *AddPermissionlessDelegatorTx) PendingPriority() Priority
func (*AddPermissionlessDelegatorTx) PublicKey() (*bls.PublicKey, bool, error)
func (tx *AddPermissionlessDelegatorTx) RewardsOwner() fx.Owner
func (t *AddPermissionlessDelegatorTx) SetBytes(b []byte)
func (tx *AddPermissionlessDelegatorTx) Stake() []*lux.TransferableOutput
func (tx *AddPermissionlessDelegatorTx) StakeOuts() []*lux.TransferableOutput
func (tx *AddPermissionlessDelegatorTx) StartTime() time.Time
func (tx *AddPermissionlessDelegatorTx) SyntacticVerify(rt *runtime.Runtime) error
func (tx *AddPermissionlessDelegatorTx) Validator() Validator
func (tx *AddPermissionlessDelegatorTx) Visit(visitor Visitor) error
func (tx *AddPermissionlessDelegatorTx) Weight() uint64

AddPermissionlessValidatorTx

AddPermissionlessValidatorTx is an unsigned addPermissionlessValidatorTx. The struct IS the wire: it holds the zap buffer and reads its fields by offset. No codec, no marshal.

Wire: zap header + object{ [email protected], Validator@77, Chain@121, Signer@153, StakeOuts@298, ValidatorRewardsOwner@314, DelegatorRewardsOwner@334, DelegationShares@354 }.

func NewAddPermissionlessValidatorTx(base *lux.BaseTx, validator Validator, chain ids.ID, sig signer.Signer, stakeOuts []*lux.TransferableOutput, validatorRewardsOwner fx.Owner, delegatorRewardsOwner fx.Owner, delegationShares uint32) (*AddPermissionlessValidatorTx, error)
func (t AddPermissionlessValidatorTx) BlockchainID() ids.ID
func (t AddPermissionlessValidatorTx) Bytes() []byte
func (tx *AddPermissionlessValidatorTx) Chain() ids.ID
func (tx *AddPermissionlessValidatorTx) ChainID() ids.ID
func (tx *AddPermissionlessValidatorTx) CurrentPriority() Priority
func (tx *AddPermissionlessValidatorTx) DelegationRewardsOwner() fx.Owner
func (tx *AddPermissionlessValidatorTx) DelegationShares() uint32
func (tx *AddPermissionlessValidatorTx) DelegatorRewardsOwner() fx.Owner
func (tx *AddPermissionlessValidatorTx) EndTime() time.Time
func (AddPermissionlessValidatorTx) InitRuntime(*runtime.Runtime)
func (tx *AddPermissionlessValidatorTx) Initialize(ctx context.Context) error
func (t AddPermissionlessValidatorTx) InputIDs() set.Set[ids.ID]
func (t AddPermissionlessValidatorTx) Inputs() []*lux.TransferableInput
func (t AddPermissionlessValidatorTx) Memo() []byte
func (t AddPermissionlessValidatorTx) NetworkID() uint32
func (tx *AddPermissionlessValidatorTx) NodeID() ids.NodeID
func (t AddPermissionlessValidatorTx) Outputs() []*lux.TransferableOutput
func (tx *AddPermissionlessValidatorTx) PendingPriority() Priority
func (tx *AddPermissionlessValidatorTx) PublicKey() (*bls.PublicKey, bool, error)
func (t *AddPermissionlessValidatorTx) SetBytes(b []byte)
func (tx *AddPermissionlessValidatorTx) Shares() uint32
func (tx *AddPermissionlessValidatorTx) Signer() signer.Signer
func (tx *AddPermissionlessValidatorTx) Stake() []*lux.TransferableOutput
func (tx *AddPermissionlessValidatorTx) StakeOuts() []*lux.TransferableOutput
func (tx *AddPermissionlessValidatorTx) StartTime() time.Time
func (tx *AddPermissionlessValidatorTx) SyntacticVerify(rt *runtime.Runtime) error
func (tx *AddPermissionlessValidatorTx) ValidationRewardsOwner() fx.Owner
func (tx *AddPermissionlessValidatorTx) Validator() Validator
func (tx *AddPermissionlessValidatorTx) ValidatorRewardsOwner() fx.Owner
func (tx *AddPermissionlessValidatorTx) Visit(visitor Visitor) error
func (tx *AddPermissionlessValidatorTx) Weight() uint64

AddValidatorTx

AddValidatorTx is an unsigned addValidatorTx. The struct IS the wire: it holds the zap buffer and reads its fields by offset. No codec, no marshal.

Wire: zap header + object{ [email protected], Validator@77, StakeOuts@121, RewardsOwner@137, DelegationShares@157 }.

func NewAddValidatorTx(base *lux.BaseTx, validator Validator, stakeOuts []*lux.TransferableOutput, rewardsOwner fx.Owner, delegationShares uint32) (*AddValidatorTx, error)
func (t AddValidatorTx) BlockchainID() ids.ID
func (t AddValidatorTx) Bytes() []byte
func (*AddValidatorTx) ChainID() ids.ID
func (*AddValidatorTx) CurrentPriority() Priority
func (tx *AddValidatorTx) DelegationRewardsOwner() fx.Owner
func (tx *AddValidatorTx) DelegationShares() uint32
func (tx *AddValidatorTx) EndTime() time.Time
func (AddValidatorTx) InitRuntime(*runtime.Runtime)
func (tx *AddValidatorTx) Initialize(ctx context.Context) error
func (t AddValidatorTx) InputIDs() set.Set[ids.ID]
func (t AddValidatorTx) Inputs() []*lux.TransferableInput
func (t AddValidatorTx) Memo() []byte
func (t AddValidatorTx) NetworkID() uint32
func (tx *AddValidatorTx) NodeID() ids.NodeID
func (t AddValidatorTx) Outputs() []*lux.TransferableOutput
func (*AddValidatorTx) PendingPriority() Priority
func (*AddValidatorTx) PublicKey() (*bls.PublicKey, bool, error)
func (tx *AddValidatorTx) RewardsOwner() fx.Owner
func (t *AddValidatorTx) SetBytes(b []byte)
func (tx *AddValidatorTx) Shares() uint32
func (tx *AddValidatorTx) Stake() []*lux.TransferableOutput
func (tx *AddValidatorTx) StakeOuts() []*lux.TransferableOutput
func (tx *AddValidatorTx) StartTime() time.Time
func (tx *AddValidatorTx) SyntacticVerify(rt *runtime.Runtime) error
func (tx *AddValidatorTx) ValidationRewardsOwner() fx.Owner
func (tx *AddValidatorTx) Validator() Validator
func (tx *AddValidatorTx) Visit(visitor Visitor) error
func (tx *AddValidatorTx) Weight() uint64

BaseTx

BaseTx is the bare spending envelope: kind + NetworkID/BlockchainID/Outs/ Ins/Memo, no delta fields. The struct IS the wire — it embeds spendingTx, which holds the zap buffer and serves the whole envelope surface (Bytes/ NetworkID/Outputs/InputIDs/Memo/...). Delta-carrying tx types embed spendingTx the same way and add their own field accessors.

Wire: zap header + object{ [email protected] } (kind=kindBase).

func NewBaseTx(base *lux.BaseTx) (*BaseTx, error)
func (t BaseTx) BlockchainID() ids.ID
func (t BaseTx) Bytes() []byte
func (BaseTx) InitRuntime(*runtime.Runtime)
func (tx *BaseTx) Initialize(context.Context) error
func (t BaseTx) InputIDs() set.Set[ids.ID]
func (t BaseTx) Inputs() []*lux.TransferableInput
func (t BaseTx) Memo() []byte
func (t BaseTx) NetworkID() uint32
func (t BaseTx) Outputs() []*lux.TransferableOutput
func (t *BaseTx) SetBytes(b []byte)
func (tx *BaseTx) SyntacticVerify(rt *runtime.Runtime) error
func (tx *BaseTx) Visit(visitor Visitor) error

ChainValidator

ChainValidator is the legacy per-chain validator descriptor used by AddChainValidatorTx. The Chain field is the network ID this validator registers under (pre-LP-018: L1 ID).

Deprecated: Use Validator with AddValidatorTx. Under LP-018 sovereign-L1, validators validate networks — not chains. Chains live on networks (created via CreateChainTx); validators no longer register per-chain. Retained for one release cycle for wire/codec compat with pre-LP-018 binaries.

func (v *ChainValidator) ChainID() ids.ID
func (v *ChainValidator) Verify() error

ConvertNetworkTx

ConvertNetworkTx PROMOTES an existing network: it changes the network's security from inherited (restaked from parent) to sovereign (its own validator set + on-chain manager) and re-anchors its Parent. This is the endomorphism Network → Network — distinct from CreateNetworkTx (the ∅ → Network constructor). Examples: an L2 (parent = an L1, inherited) converts to an L1 (parent = Primary, sovereign); an L3 promotes to L1.

Requires the existing network owner's authorization (Auth). The genesis validator set is established here (shared NetworkValidator component); the manager lives on an existing chain (ManagerChainID) of the network.

func NewConvertNetworkTx(
	base *lux.BaseTx,
	network, parent, managerChainID ids.ID,
	sec security.Mode,
	managerAddress []byte,
	validators []*NetworkValidator,
	auth verify.Verifiable,
) (*ConvertNetworkTx, error)
func (tx *ConvertNetworkTx) Auth() verify.Verifiable
func (t ConvertNetworkTx) BlockchainID() ids.ID
func (t ConvertNetworkTx) Bytes() []byte
func (ConvertNetworkTx) InitRuntime(*runtime.Runtime)
func (t ConvertNetworkTx) InputIDs() set.Set[ids.ID]
func (t ConvertNetworkTx) Inputs() []*lux.TransferableInput
func (tx *ConvertNetworkTx) ManagerAddress() []byte
func (tx *ConvertNetworkTx) ManagerChainID() ids.ID
func (t ConvertNetworkTx) Memo() []byte
func (tx *ConvertNetworkTx) Network() ids.ID
func (t ConvertNetworkTx) NetworkID() uint32
func (t ConvertNetworkTx) Outputs() []*lux.TransferableOutput
func (tx *ConvertNetworkTx) Parent() ids.ID
func (tx *ConvertNetworkTx) Security() security.Mode
func (t *ConvertNetworkTx) SetBytes(b []byte)
func (tx *ConvertNetworkTx) Sovereign() bool
func (tx *ConvertNetworkTx) SyntacticVerify(rt *runtime.Runtime) error
func (tx *ConvertNetworkTx) Validators() []*NetworkValidator
func (tx *ConvertNetworkTx) Visit(visitor Visitor) error

CreateChainTx

CreateChainTx creates a blockchain on a chain. The struct IS the wire: it embeds the spending envelope and reads its delta fields by offset.

Delta layout (fixed section, after the 77-byte spending envelope):

ChainID 32B @ 77 (id: chain that validates this blockchain) VMID 32B @ 109 (id: VM running on the new blockchain) BlockchainName 8B @ 141 (text ptr: human readable name) FxIDs 8B @ 149 (id list ptr: feature extensions) GenesisData 8B @ 157 (bytes ptr: genesis state) ChainAuth 8B @ 165 (auth ptr: sig-index list)

func NewCreateChainTx(base *lux.BaseTx, chainID ids.ID, blockchainName string, vmID ids.ID, fxIDs []ids.ID, genesisData []byte, chainAuth verify.Verifiable) (*CreateChainTx, error)
func (t CreateChainTx) BlockchainID() ids.ID
func (tx *CreateChainTx) BlockchainName() string
func (t CreateChainTx) Bytes() []byte
func (tx *CreateChainTx) ChainAuth() verify.Verifiable
func (tx *CreateChainTx) ChainID() ids.ID
func (tx *CreateChainTx) FxIDs() []ids.ID
func (tx *CreateChainTx) GenesisData() []byte
func (CreateChainTx) InitRuntime(*runtime.Runtime)
func (tx *CreateChainTx) Initialize(ctx context.Context) error
func (t CreateChainTx) InputIDs() set.Set[ids.ID]
func (t CreateChainTx) Inputs() []*lux.TransferableInput
func (t CreateChainTx) Memo() []byte
func (t CreateChainTx) NetworkID() uint32
func (t CreateChainTx) Outputs() []*lux.TransferableOutput
func (t *CreateChainTx) SetBytes(b []byte)
func (tx *CreateChainTx) SyntacticVerify(rt *runtime.Runtime) error
func (tx *CreateChainTx) VMID() ids.ID
func (tx *CreateChainTx) Visit(visitor Visitor) error

CreateNetworkTx

func NewCreateNetworkTx(
	base *lux.BaseTx,
	parent ids.ID,
	owner fx.Owner,
	sec security.Mode,
	validators []*NetworkValidator,
	managerChainID ids.ID,
	managerAddress []byte,
) (*CreateNetworkTx, error)
func (t CreateNetworkTx) BlockchainID() ids.ID
func (t CreateNetworkTx) Bytes() []byte
func (CreateNetworkTx) InitRuntime(*runtime.Runtime)
func (t CreateNetworkTx) InputIDs() set.Set[ids.ID]
func (t CreateNetworkTx) Inputs() []*lux.TransferableInput
func (tx *CreateNetworkTx) ManagerAddress() []byte
func (tx *CreateNetworkTx) ManagerChainID() ids.ID
func (t CreateNetworkTx) Memo() []byte
func (t CreateNetworkTx) NetworkID() uint32
func (t CreateNetworkTx) Outputs() []*lux.TransferableOutput
func (tx *CreateNetworkTx) Owner() fx.Owner
func (tx *CreateNetworkTx) Parent() ids.ID
func (tx *CreateNetworkTx) Security() security.Mode
func (t *CreateNetworkTx) SetBytes(b []byte)
func (tx *CreateNetworkTx) Sovereign() bool
func (tx *CreateNetworkTx) SyntacticVerify(rt *runtime.Runtime) error
func (tx *CreateNetworkTx) Validators() []*NetworkValidator
func (tx *CreateNetworkTx) Visit(visitor Visitor) error

DelegatorTx

DisableL1ValidatorTx

DisableL1ValidatorTx disables an L1 validator, proving authorization with a credential. The struct IS the wire: it embeds spendingTx (the envelope) and adds the validation id plus an auth sig-index list.

Wire: zap header + object{ [email protected], ValidationID:32B@77, DisableAuth:listptr@109 } (kind=kindDisableL1Validator).

func NewDisableL1ValidatorTx(base *lux.BaseTx, validationID ids.ID, disableAuth verify.Verifiable) (*DisableL1ValidatorTx, error)
func (t DisableL1ValidatorTx) BlockchainID() ids.ID
func (t DisableL1ValidatorTx) Bytes() []byte
func (tx *DisableL1ValidatorTx) DisableAuth() verify.Verifiable
func (DisableL1ValidatorTx) InitRuntime(*runtime.Runtime)
func (t DisableL1ValidatorTx) InputIDs() set.Set[ids.ID]
func (t DisableL1ValidatorTx) Inputs() []*lux.TransferableInput
func (t DisableL1ValidatorTx) Memo() []byte
func (t DisableL1ValidatorTx) NetworkID() uint32
func (t DisableL1ValidatorTx) Outputs() []*lux.TransferableOutput
func (t *DisableL1ValidatorTx) SetBytes(b []byte)
func (tx *DisableL1ValidatorTx) SyntacticVerify(rt *runtime.Runtime) error
func (tx *DisableL1ValidatorTx) ValidationID() ids.ID
func (tx *DisableL1ValidatorTx) Visit(visitor Visitor) error

ExportTx

ExportTx sends funds to another chain. The struct IS the wire: it embeds the spending envelope and reads its delta fields by offset.

Delta layout (fixed section, after the 77-byte spending envelope):

DestinationChain 32B @ 77 (id: chain to send the funds to) ExportedOutputs 8B @ 109 (output list ptr) OwnerAddrs 8B @ 117 (shared owner-address array ptr)

func NewExportTx(base *lux.BaseTx, destinationChain ids.ID, exportedOutputs []*lux.TransferableOutput) (*ExportTx, error)
func (t ExportTx) BlockchainID() ids.ID
func (t ExportTx) Bytes() []byte
func (tx *ExportTx) DestinationChain() ids.ID
func (tx *ExportTx) ExportedOutputs() []*lux.TransferableOutput
func (ExportTx) InitRuntime(*runtime.Runtime)
func (tx *ExportTx) Initialize(ctx context.Context) error
func (t ExportTx) InputIDs() set.Set[ids.ID]
func (t ExportTx) Inputs() []*lux.TransferableInput
func (t ExportTx) Memo() []byte
func (t ExportTx) NetworkID() uint32
func (t ExportTx) Outputs() []*lux.TransferableOutput
func (t *ExportTx) SetBytes(b []byte)
func (tx *ExportTx) SyntacticVerify(rt *runtime.Runtime) error
func (tx *ExportTx) Visit(visitor Visitor) error

ImportTx

ImportTx consumes funds produced on another chain. The struct IS the wire: it embeds the spending envelope and reads its delta fields by offset.

Delta layout (fixed section, after the 77-byte spending envelope):

SourceChain 32B @ 77 (id: chain to consume the funds from) ImportedInputs 8B @ 109 (input list ptr) SigIndices 8B @ 117 (shared input sig-index array ptr)

func NewImportTx(base *lux.BaseTx, sourceChain ids.ID, importedInputs []*lux.TransferableInput) (*ImportTx, error)
func (t ImportTx) BlockchainID() ids.ID
func (t ImportTx) Bytes() []byte
func (tx *ImportTx) ImportedInputs() []*lux.TransferableInput
func (ImportTx) InitRuntime(*runtime.Runtime)
func (tx *ImportTx) Initialize(ctx context.Context) error
func (tx *ImportTx) InputIDs() set.Set[ids.ID]
func (tx *ImportTx) InputUTXOs() set.Set[ids.ID]
func (t ImportTx) Inputs() []*lux.TransferableInput
func (t ImportTx) Memo() []byte
func (t ImportTx) NetworkID() uint32
func (t ImportTx) Outputs() []*lux.TransferableOutput
func (t *ImportTx) SetBytes(b []byte)
func (tx *ImportTx) SourceChain() ids.ID
func (tx *ImportTx) SyntacticVerify(rt *runtime.Runtime) error
func (tx *ImportTx) Visit(visitor Visitor) error

IncreaseL1ValidatorBalanceTx

IncreaseL1ValidatorBalanceTx tops up an L1 validator's continuous-fee balance. The struct IS the wire: it embeds spendingTx (the envelope) and adds two delta fields read by offset.

Wire: zap header + object{ [email protected], ValidationID:32B@77, Balance:u64@109 } (kind=kindIncreaseL1ValidatorBalance).

func NewIncreaseL1ValidatorBalanceTx(base *lux.BaseTx, validationID ids.ID, balance uint64) (*IncreaseL1ValidatorBalanceTx, error)
func (tx *IncreaseL1ValidatorBalanceTx) Balance() uint64
func (t IncreaseL1ValidatorBalanceTx) BlockchainID() ids.ID
func (t IncreaseL1ValidatorBalanceTx) Bytes() []byte
func (IncreaseL1ValidatorBalanceTx) InitRuntime(*runtime.Runtime)
func (t IncreaseL1ValidatorBalanceTx) InputIDs() set.Set[ids.ID]
func (t IncreaseL1ValidatorBalanceTx) Inputs() []*lux.TransferableInput
func (t IncreaseL1ValidatorBalanceTx) Memo() []byte
func (t IncreaseL1ValidatorBalanceTx) NetworkID() uint32
func (t IncreaseL1ValidatorBalanceTx) Outputs() []*lux.TransferableOutput
func (t *IncreaseL1ValidatorBalanceTx) SetBytes(b []byte)
func (tx *IncreaseL1ValidatorBalanceTx) SyntacticVerify(rt *runtime.Runtime) error
func (tx *IncreaseL1ValidatorBalanceTx) ValidationID() ids.ID
func (tx *IncreaseL1ValidatorBalanceTx) Visit(visitor Visitor) error

MockScheduledStaker

MockScheduledStaker is a mock of ScheduledStaker interface.

func NewMockScheduledStaker(ctrl *gomock.Controller) *MockScheduledStaker
func (m *MockScheduledStaker) ChainID() ids.ID
func (m *MockScheduledStaker) CurrentPriority() Priority
func (m *MockScheduledStaker) EXPECT() *MockScheduledStakerMockRecorder
func (m *MockScheduledStaker) EndTime() time.Time
func (m *MockScheduledStaker) NodeID() ids.NodeID
func (m *MockScheduledStaker) PendingPriority() Priority
func (m *MockScheduledStaker) PublicKey() (*bls.PublicKey, bool, error)
func (m *MockScheduledStaker) StartTime() time.Time
func (m *MockScheduledStaker) Weight() uint64

MockScheduledStakerMockRecorder

MockScheduledStakerMockRecorder is the mock recorder for MockScheduledStaker.

func (mr *MockScheduledStakerMockRecorder) ChainID() *gomock.Call
func (mr *MockScheduledStakerMockRecorder) CurrentPriority() *gomock.Call
func (mr *MockScheduledStakerMockRecorder) EndTime() *gomock.Call
func (mr *MockScheduledStakerMockRecorder) NodeID() *gomock.Call
func (mr *MockScheduledStakerMockRecorder) PendingPriority() *gomock.Call
func (mr *MockScheduledStakerMockRecorder) PublicKey() *gomock.Call
func (mr *MockScheduledStakerMockRecorder) StartTime() *gomock.Call
func (mr *MockScheduledStakerMockRecorder) Weight() *gomock.Call

NetworkValidator

NetworkValidator is a genesis validator value (shared component; encoded into / decoded from the tx buffer).

func (v *NetworkValidator) Compare(o *NetworkValidator) int
func (v *NetworkValidator) Verify() error

PermissionlessStaker

Priority

func (p Priority) IsCurrentDelegator() bool
func (p Priority) IsCurrentValidator() bool
func (p Priority) IsPendingDelegator() bool
func (p Priority) IsPendingValidator() bool
func (p Priority) IsPermissionedValidator() bool
func (p Priority) IsValidator() bool

RegisterL1ValidatorTx

RegisterL1ValidatorTx registers an L1 validator. The struct IS the wire: it embeds the spending envelope and reads its delta fields by offset.

Delta layout (fixed section, after the 77-byte spending envelope):

Balance u64 @ 77 (Balance <= sum($LUX inputs) - sum($LUX outputs) - TxFee) ProofOfPossession 96B @ 85 (fixed, BLS PoP of the key in the Message) Message 8B @ 181 (bytes ptr: signed Warp AddressedCall payload)

func NewRegisterL1ValidatorTx(base *lux.BaseTx, balance uint64, proofOfPossession [bls.SignatureLen]byte, message []byte) (*RegisterL1ValidatorTx, error)
func (tx *RegisterL1ValidatorTx) Balance() uint64
func (t RegisterL1ValidatorTx) BlockchainID() ids.ID
func (t RegisterL1ValidatorTx) Bytes() []byte
func (RegisterL1ValidatorTx) InitRuntime(*runtime.Runtime)
func (t RegisterL1ValidatorTx) InputIDs() set.Set[ids.ID]
func (t RegisterL1ValidatorTx) Inputs() []*lux.TransferableInput
func (t RegisterL1ValidatorTx) Memo() []byte
func (tx *RegisterL1ValidatorTx) Message() []byte
func (t RegisterL1ValidatorTx) NetworkID() uint32
func (t RegisterL1ValidatorTx) Outputs() []*lux.TransferableOutput
func (tx *RegisterL1ValidatorTx) ProofOfPossession() [bls.SignatureLen]byte
func (t *RegisterL1ValidatorTx) SetBytes(b []byte)
func (tx *RegisterL1ValidatorTx) SyntacticVerify(rt *runtime.Runtime) error
func (tx *RegisterL1ValidatorTx) Visit(visitor Visitor) error

RemoveChainValidatorTx

RemoveChainValidatorTx removes a validator from a chain. The struct IS the wire: it embeds spendingTx (the envelope) and adds the node id, chain id, and an auth sig-index list.

Wire: zap header + object{ [email protected], NodeID:20B@77, Chain:32B@97, ChainAuth:listptr@129 } (kind=kindRemoveChainValidator).

func NewRemoveChainValidatorTx(base *lux.BaseTx, nodeID ids.NodeID, chain ids.ID, chainAuth verify.Verifiable) (*RemoveChainValidatorTx, error)
func (t RemoveChainValidatorTx) BlockchainID() ids.ID
func (t RemoveChainValidatorTx) Bytes() []byte
func (tx *RemoveChainValidatorTx) Chain() ids.ID
func (tx *RemoveChainValidatorTx) ChainAuth() verify.Verifiable
func (RemoveChainValidatorTx) InitRuntime(*runtime.Runtime)
func (tx *RemoveChainValidatorTx) Initialize(context.Context) error
func (t RemoveChainValidatorTx) InputIDs() set.Set[ids.ID]
func (t RemoveChainValidatorTx) Inputs() []*lux.TransferableInput
func (t RemoveChainValidatorTx) Memo() []byte
func (t RemoveChainValidatorTx) NetworkID() uint32
func (tx *RemoveChainValidatorTx) NodeID() ids.NodeID
func (t RemoveChainValidatorTx) Outputs() []*lux.TransferableOutput
func (t *RemoveChainValidatorTx) SetBytes(b []byte)
func (tx *RemoveChainValidatorTx) SyntacticVerify(rt *runtime.Runtime) error
func (tx *RemoveChainValidatorTx) Visit(visitor Visitor) error

RewardValidatorTx

RewardValidatorTx is a transaction that represents a proposal to remove a validator that is currently validating from the validator set.

If this transaction is accepted and the next block accepted is a Commit block, the validator is removed and the address that the validator specified receives the staked LUX as well as a validating reward.

If this transaction is accepted and the next block accepted is an Abort block, the validator is removed and the address that the validator specified receives the staked LUX but no reward.

The struct IS the wire: it holds the zap buffer and reads its field by offset. No codec, no marshal.

Wire: zap header + object{ kind:u8@0, TxID:32B@1 }.

func NewRewardValidatorTx(txID ids.ID) *RewardValidatorTx
func (tx *RewardValidatorTx) Bytes() []byte
func (*RewardValidatorTx) InitRuntime(*runtime.Runtime)
func (tx *RewardValidatorTx) Initialize(context.Context) error
func (*RewardValidatorTx) InputIDs() set.Set[ids.ID]
func (*RewardValidatorTx) Outputs() []*lux.TransferableOutput
func (tx *RewardValidatorTx) SetBytes(b []byte)
func (*RewardValidatorTx) SyntacticVerify(*runtime.Runtime) error
func (tx *RewardValidatorTx) TxID() ids.ID
func (tx *RewardValidatorTx) Visit(visitor Visitor) error

RuntimeInitializable

RuntimeInitializable defines the interface for initializing context

ScheduledStaker

SetL1ValidatorWeightTx

SetL1ValidatorWeightTx carries a signed Warp message that sets an L1 validator's weight. The struct IS the wire: it embeds spendingTx (the envelope) and adds the Warp Message as a variable-length bytes tail.

Wire: zap header + object{ [email protected], Message:bytesptr@77 } (kind=kindSetL1ValidatorWeight).

func NewSetL1ValidatorWeightTx(base *lux.BaseTx, message []byte) (*SetL1ValidatorWeightTx, error)
func (t SetL1ValidatorWeightTx) BlockchainID() ids.ID
func (t SetL1ValidatorWeightTx) Bytes() []byte
func (SetL1ValidatorWeightTx) InitRuntime(*runtime.Runtime)
func (t SetL1ValidatorWeightTx) InputIDs() set.Set[ids.ID]
func (t SetL1ValidatorWeightTx) Inputs() []*lux.TransferableInput
func (t SetL1ValidatorWeightTx) Memo() []byte
func (tx *SetL1ValidatorWeightTx) Message() []byte
func (t SetL1ValidatorWeightTx) NetworkID() uint32
func (t SetL1ValidatorWeightTx) Outputs() []*lux.TransferableOutput
func (t *SetL1ValidatorWeightTx) SetBytes(b []byte)
func (tx *SetL1ValidatorWeightTx) SyntacticVerify(rt *runtime.Runtime) error
func (tx *SetL1ValidatorWeightTx) Visit(visitor Visitor) error

Staker

StakerTx

TransferChainOwnershipTx

TransferChainOwnershipTx re-owns a chain. The struct IS the wire: it embeds the spending envelope and reads its delta fields by offset.

Delta layout (fixed section, after the 77-byte spending envelope):

Chain 32B @ 77 (id) ChainAuth 8B @ 109 (auth ptr: sig-index list) Owner.Threshold u32 @ 117 Owner.Locktime u64 @ 121 Owner.Addrs 8B @ 129 (addr list ptr)

func NewTransferChainOwnershipTx(base *lux.BaseTx, chain ids.ID, chainAuth verify.Verifiable, owner fx.Owner) (*TransferChainOwnershipTx, error)
func (t TransferChainOwnershipTx) BlockchainID() ids.ID
func (t TransferChainOwnershipTx) Bytes() []byte
func (tx *TransferChainOwnershipTx) Chain() ids.ID
func (tx *TransferChainOwnershipTx) ChainAuth() verify.Verifiable
func (TransferChainOwnershipTx) InitRuntime(*runtime.Runtime)
func (tx *TransferChainOwnershipTx) Initialize(ctx context.Context) error
func (t TransferChainOwnershipTx) InputIDs() set.Set[ids.ID]
func (t TransferChainOwnershipTx) Inputs() []*lux.TransferableInput
func (t TransferChainOwnershipTx) Memo() []byte
func (t TransferChainOwnershipTx) NetworkID() uint32
func (t TransferChainOwnershipTx) Outputs() []*lux.TransferableOutput
func (tx *TransferChainOwnershipTx) Owner() fx.Owner
func (t *TransferChainOwnershipTx) SetBytes(b []byte)
func (tx *TransferChainOwnershipTx) SyntacticVerify(rt *runtime.Runtime) error
func (tx *TransferChainOwnershipTx) Visit(visitor Visitor) error

TransformChainTx

TransformChainTx transforms a chain into a permissionless one. The struct IS the wire: it embeds the spending envelope and reads its delta fields by offset.

Delta layout (fixed section, after the 77-byte spending envelope):

Chain 32B @ 77 AssetID 32B @ 109 InitialSupply u64 @ 141 MaximumSupply u64 @ 149 MinConsumptionRate u64 @ 157 MaxConsumptionRate u64 @ 165 MinValidatorStake u64 @ 173 MaxValidatorStake u64 @ 181 MinStakeDuration u32 @ 189 MaxStakeDuration u32 @ 193 MinDelegationFee u32 @ 197 MinDelegatorStake u64 @ 201 MaxValidatorWeightFactor u8 @ 209 UptimeRequirement u32 @ 210 ChainAuth 8B @ 214 (auth ptr: sig-index list)

func NewTransformChainTx(
	base *lux.BaseTx,
	chain ids.ID,
	assetID ids.ID,
	initialSupply uint64,
	maximumSupply uint64,
	minConsumptionRate uint64,
	maxConsumptionRate uint64,
	minValidatorStake uint64,
	maxValidatorStake uint64,
	minStakeDuration uint32,
	maxStakeDuration uint32,
	minDelegationFee uint32,
	minDelegatorStake uint64,
	maxValidatorWeightFactor byte,
	uptimeRequirement uint32,
	chainAuth verify.Verifiable,
) (*TransformChainTx, error)
func (tx *TransformChainTx) AssetID() ids.ID
func (t TransformChainTx) BlockchainID() ids.ID
func (t TransformChainTx) Bytes() []byte
func (tx *TransformChainTx) Chain() ids.ID
func (tx *TransformChainTx) ChainAuth() verify.Verifiable
func (TransformChainTx) InitRuntime(*runtime.Runtime)
func (tx *TransformChainTx) InitialSupply() uint64
func (tx *TransformChainTx) Initialize(ctx context.Context) error
func (t TransformChainTx) InputIDs() set.Set[ids.ID]
func (t TransformChainTx) Inputs() []*lux.TransferableInput
func (tx *TransformChainTx) MaxConsumptionRate() uint64
func (tx *TransformChainTx) MaxStakeDuration() uint32
func (tx *TransformChainTx) MaxValidatorStake() uint64
func (tx *TransformChainTx) MaxValidatorWeightFactor() byte
func (tx *TransformChainTx) MaximumSupply() uint64
func (t TransformChainTx) Memo() []byte
func (tx *TransformChainTx) MinConsumptionRate() uint64
func (tx *TransformChainTx) MinDelegationFee() uint32
func (tx *TransformChainTx) MinDelegatorStake() uint64
func (tx *TransformChainTx) MinStakeDuration() uint32
func (tx *TransformChainTx) MinValidatorStake() uint64
func (t TransformChainTx) NetworkID() uint32
func (t TransformChainTx) Outputs() []*lux.TransferableOutput
func (t *TransformChainTx) SetBytes(b []byte)
func (tx *TransformChainTx) SyntacticVerify(rt *runtime.Runtime) error
func (tx *TransformChainTx) UptimeRequirement() uint32
func (tx *TransformChainTx) Visit(visitor Visitor) error

Tx

Tx is a signed transaction: an unsigned tx (itself a zap buffer) plus its credentials. The signed bytes are unsigned ‖ creds; there is no codec.

func NewSigned(unsigned UnsignedTx, signers [][]*secp256k1.PrivateKey) (*Tx, error)
func Parse(signedBytes []byte) (*Tx, error)
func (tx *Tx) Bytes() []byte
func (tx *Tx) GossipID() ids.ID
func (tx *Tx) ID() ids.ID
func (tx *Tx) Initialize() error
func (tx *Tx) InputIDs() set.Set[ids.ID]
func (tx *Tx) SetBytes(signedBytes []byte)
func (tx *Tx) Sign(signers [][]*secp256k1.PrivateKey) error
func (tx *Tx) Size() int
func (tx *Tx) SyntacticVerify(rt *runtime.Runtime) error
func (tx *Tx) UTXOs() []*lux.UTXO

UnsignedTx

UnsignedTx is an unsigned transaction

Validator

Validator is a validator.

func (v *Validator) EndTime() time.Time
func (v *Validator) StartTime() time.Time
func (v *Validator) Verify() error
func (v *Validator) Weight() uint64

ValidatorTx

ValidatorTx defines the interface for a validator transaction that supports delegation.

Visitor

Allow vm to execute custom logic against the underlying transaction types.