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) boolBoundedBy 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.IDfunc (t AddChainValidatorTx) Bytes() []bytefunc (tx *AddChainValidatorTx) Chain() ids.IDfunc (tx *AddChainValidatorTx) ChainAuth() verify.Verifiablefunc (tx *AddChainValidatorTx) ChainID() ids.IDfunc (*AddChainValidatorTx) CurrentPriority() Priorityfunc (tx *AddChainValidatorTx) EndTime() time.Timefunc (AddChainValidatorTx) InitRuntime(*runtime.Runtime)func (tx *AddChainValidatorTx) Initialize(ctx context.Context) errorfunc (t AddChainValidatorTx) InputIDs() set.Set[ids.ID]func (t AddChainValidatorTx) Inputs() []*lux.TransferableInputfunc (t AddChainValidatorTx) Memo() []bytefunc (t AddChainValidatorTx) NetworkID() uint32func (tx *AddChainValidatorTx) NodeID() ids.NodeIDfunc (t AddChainValidatorTx) Outputs() []*lux.TransferableOutputfunc (*AddChainValidatorTx) PendingPriority() Priorityfunc (*AddChainValidatorTx) PublicKey() (*bls.PublicKey, bool, error)func (t *AddChainValidatorTx) SetBytes(b []byte)func (tx *AddChainValidatorTx) StartTime() time.Timefunc (tx *AddChainValidatorTx) SyntacticVerify(rt *runtime.Runtime) errorfunc (tx *AddChainValidatorTx) Validator() Validatorfunc (tx *AddChainValidatorTx) Visit(visitor Visitor) errorfunc (tx *AddChainValidatorTx) Weight() uint64AddDelegatorTx
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.IDfunc (t AddDelegatorTx) Bytes() []bytefunc (*AddDelegatorTx) ChainID() ids.IDfunc (*AddDelegatorTx) CurrentPriority() Priorityfunc (tx *AddDelegatorTx) DelegationRewardsOwner() fx.Ownerfunc (tx *AddDelegatorTx) EndTime() time.Timefunc (AddDelegatorTx) InitRuntime(*runtime.Runtime)func (tx *AddDelegatorTx) Initialize(ctx context.Context) errorfunc (t AddDelegatorTx) InputIDs() set.Set[ids.ID]func (t AddDelegatorTx) Inputs() []*lux.TransferableInputfunc (t AddDelegatorTx) Memo() []bytefunc (t AddDelegatorTx) NetworkID() uint32func (tx *AddDelegatorTx) NodeID() ids.NodeIDfunc (t AddDelegatorTx) Outputs() []*lux.TransferableOutputfunc (*AddDelegatorTx) PendingPriority() Priorityfunc (*AddDelegatorTx) PublicKey() (*bls.PublicKey, bool, error)func (tx *AddDelegatorTx) RewardsOwner() fx.Ownerfunc (t *AddDelegatorTx) SetBytes(b []byte)func (tx *AddDelegatorTx) Stake() []*lux.TransferableOutputfunc (tx *AddDelegatorTx) StakeOuts() []*lux.TransferableOutputfunc (tx *AddDelegatorTx) StartTime() time.Timefunc (tx *AddDelegatorTx) SyntacticVerify(rt *runtime.Runtime) errorfunc (tx *AddDelegatorTx) Validator() Validatorfunc (tx *AddDelegatorTx) Visit(visitor Visitor) errorfunc (tx *AddDelegatorTx) Weight() uint64AddPermissionlessDelegatorTx
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.IDfunc (t AddPermissionlessDelegatorTx) Bytes() []bytefunc (tx *AddPermissionlessDelegatorTx) Chain() ids.IDfunc (tx *AddPermissionlessDelegatorTx) ChainID() ids.IDfunc (tx *AddPermissionlessDelegatorTx) CurrentPriority() Priorityfunc (tx *AddPermissionlessDelegatorTx) DelegationRewardsOwner() fx.Ownerfunc (tx *AddPermissionlessDelegatorTx) EndTime() time.Timefunc (AddPermissionlessDelegatorTx) InitRuntime(*runtime.Runtime)func (tx *AddPermissionlessDelegatorTx) Initialize(ctx context.Context) errorfunc (t AddPermissionlessDelegatorTx) InputIDs() set.Set[ids.ID]func (t AddPermissionlessDelegatorTx) Inputs() []*lux.TransferableInputfunc (t AddPermissionlessDelegatorTx) Memo() []bytefunc (t AddPermissionlessDelegatorTx) NetworkID() uint32func (tx *AddPermissionlessDelegatorTx) NodeID() ids.NodeIDfunc (t AddPermissionlessDelegatorTx) Outputs() []*lux.TransferableOutputfunc (tx *AddPermissionlessDelegatorTx) PendingPriority() Priorityfunc (*AddPermissionlessDelegatorTx) PublicKey() (*bls.PublicKey, bool, error)func (tx *AddPermissionlessDelegatorTx) RewardsOwner() fx.Ownerfunc (t *AddPermissionlessDelegatorTx) SetBytes(b []byte)func (tx *AddPermissionlessDelegatorTx) Stake() []*lux.TransferableOutputfunc (tx *AddPermissionlessDelegatorTx) StakeOuts() []*lux.TransferableOutputfunc (tx *AddPermissionlessDelegatorTx) StartTime() time.Timefunc (tx *AddPermissionlessDelegatorTx) SyntacticVerify(rt *runtime.Runtime) errorfunc (tx *AddPermissionlessDelegatorTx) Validator() Validatorfunc (tx *AddPermissionlessDelegatorTx) Visit(visitor Visitor) errorfunc (tx *AddPermissionlessDelegatorTx) Weight() uint64AddPermissionlessValidatorTx
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.IDfunc (t AddPermissionlessValidatorTx) Bytes() []bytefunc (tx *AddPermissionlessValidatorTx) Chain() ids.IDfunc (tx *AddPermissionlessValidatorTx) ChainID() ids.IDfunc (tx *AddPermissionlessValidatorTx) CurrentPriority() Priorityfunc (tx *AddPermissionlessValidatorTx) DelegationRewardsOwner() fx.Ownerfunc (tx *AddPermissionlessValidatorTx) DelegationShares() uint32func (tx *AddPermissionlessValidatorTx) DelegatorRewardsOwner() fx.Ownerfunc (tx *AddPermissionlessValidatorTx) EndTime() time.Timefunc (AddPermissionlessValidatorTx) InitRuntime(*runtime.Runtime)func (tx *AddPermissionlessValidatorTx) Initialize(ctx context.Context) errorfunc (t AddPermissionlessValidatorTx) InputIDs() set.Set[ids.ID]func (t AddPermissionlessValidatorTx) Inputs() []*lux.TransferableInputfunc (t AddPermissionlessValidatorTx) Memo() []bytefunc (t AddPermissionlessValidatorTx) NetworkID() uint32func (tx *AddPermissionlessValidatorTx) NodeID() ids.NodeIDfunc (t AddPermissionlessValidatorTx) Outputs() []*lux.TransferableOutputfunc (tx *AddPermissionlessValidatorTx) PendingPriority() Priorityfunc (tx *AddPermissionlessValidatorTx) PublicKey() (*bls.PublicKey, bool, error)func (t *AddPermissionlessValidatorTx) SetBytes(b []byte)func (tx *AddPermissionlessValidatorTx) Shares() uint32func (tx *AddPermissionlessValidatorTx) Signer() signer.Signerfunc (tx *AddPermissionlessValidatorTx) Stake() []*lux.TransferableOutputfunc (tx *AddPermissionlessValidatorTx) StakeOuts() []*lux.TransferableOutputfunc (tx *AddPermissionlessValidatorTx) StartTime() time.Timefunc (tx *AddPermissionlessValidatorTx) SyntacticVerify(rt *runtime.Runtime) errorfunc (tx *AddPermissionlessValidatorTx) ValidationRewardsOwner() fx.Ownerfunc (tx *AddPermissionlessValidatorTx) Validator() Validatorfunc (tx *AddPermissionlessValidatorTx) ValidatorRewardsOwner() fx.Ownerfunc (tx *AddPermissionlessValidatorTx) Visit(visitor Visitor) errorfunc (tx *AddPermissionlessValidatorTx) Weight() uint64AddValidatorTx
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.IDfunc (t AddValidatorTx) Bytes() []bytefunc (*AddValidatorTx) ChainID() ids.IDfunc (*AddValidatorTx) CurrentPriority() Priorityfunc (tx *AddValidatorTx) DelegationRewardsOwner() fx.Ownerfunc (tx *AddValidatorTx) DelegationShares() uint32func (tx *AddValidatorTx) EndTime() time.Timefunc (AddValidatorTx) InitRuntime(*runtime.Runtime)func (tx *AddValidatorTx) Initialize(ctx context.Context) errorfunc (t AddValidatorTx) InputIDs() set.Set[ids.ID]func (t AddValidatorTx) Inputs() []*lux.TransferableInputfunc (t AddValidatorTx) Memo() []bytefunc (t AddValidatorTx) NetworkID() uint32func (tx *AddValidatorTx) NodeID() ids.NodeIDfunc (t AddValidatorTx) Outputs() []*lux.TransferableOutputfunc (*AddValidatorTx) PendingPriority() Priorityfunc (*AddValidatorTx) PublicKey() (*bls.PublicKey, bool, error)func (tx *AddValidatorTx) RewardsOwner() fx.Ownerfunc (t *AddValidatorTx) SetBytes(b []byte)func (tx *AddValidatorTx) Shares() uint32func (tx *AddValidatorTx) Stake() []*lux.TransferableOutputfunc (tx *AddValidatorTx) StakeOuts() []*lux.TransferableOutputfunc (tx *AddValidatorTx) StartTime() time.Timefunc (tx *AddValidatorTx) SyntacticVerify(rt *runtime.Runtime) errorfunc (tx *AddValidatorTx) ValidationRewardsOwner() fx.Ownerfunc (tx *AddValidatorTx) Validator() Validatorfunc (tx *AddValidatorTx) Visit(visitor Visitor) errorfunc (tx *AddValidatorTx) Weight() uint64BaseTx
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.IDfunc (t BaseTx) Bytes() []bytefunc (BaseTx) InitRuntime(*runtime.Runtime)func (tx *BaseTx) Initialize(context.Context) errorfunc (t BaseTx) InputIDs() set.Set[ids.ID]func (t BaseTx) Inputs() []*lux.TransferableInputfunc (t BaseTx) Memo() []bytefunc (t BaseTx) NetworkID() uint32func (t BaseTx) Outputs() []*lux.TransferableOutputfunc (t *BaseTx) SetBytes(b []byte)func (tx *BaseTx) SyntacticVerify(rt *runtime.Runtime) errorfunc (tx *BaseTx) Visit(visitor Visitor) errorChainValidator
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.IDfunc (v *ChainValidator) Verify() errorConvertNetworkTx
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.Verifiablefunc (t ConvertNetworkTx) BlockchainID() ids.IDfunc (t ConvertNetworkTx) Bytes() []bytefunc (ConvertNetworkTx) InitRuntime(*runtime.Runtime)func (t ConvertNetworkTx) InputIDs() set.Set[ids.ID]func (t ConvertNetworkTx) Inputs() []*lux.TransferableInputfunc (tx *ConvertNetworkTx) ManagerAddress() []bytefunc (tx *ConvertNetworkTx) ManagerChainID() ids.IDfunc (t ConvertNetworkTx) Memo() []bytefunc (tx *ConvertNetworkTx) Network() ids.IDfunc (t ConvertNetworkTx) NetworkID() uint32func (t ConvertNetworkTx) Outputs() []*lux.TransferableOutputfunc (tx *ConvertNetworkTx) Parent() ids.IDfunc (tx *ConvertNetworkTx) Security() security.Modefunc (t *ConvertNetworkTx) SetBytes(b []byte)func (tx *ConvertNetworkTx) Sovereign() boolfunc (tx *ConvertNetworkTx) SyntacticVerify(rt *runtime.Runtime) errorfunc (tx *ConvertNetworkTx) Validators() []*NetworkValidatorfunc (tx *ConvertNetworkTx) Visit(visitor Visitor) errorCreateChainTx
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.IDfunc (tx *CreateChainTx) BlockchainName() stringfunc (t CreateChainTx) Bytes() []bytefunc (tx *CreateChainTx) ChainAuth() verify.Verifiablefunc (tx *CreateChainTx) ChainID() ids.IDfunc (tx *CreateChainTx) FxIDs() []ids.IDfunc (tx *CreateChainTx) GenesisData() []bytefunc (CreateChainTx) InitRuntime(*runtime.Runtime)func (tx *CreateChainTx) Initialize(ctx context.Context) errorfunc (t CreateChainTx) InputIDs() set.Set[ids.ID]func (t CreateChainTx) Inputs() []*lux.TransferableInputfunc (t CreateChainTx) Memo() []bytefunc (t CreateChainTx) NetworkID() uint32func (t CreateChainTx) Outputs() []*lux.TransferableOutputfunc (t *CreateChainTx) SetBytes(b []byte)func (tx *CreateChainTx) SyntacticVerify(rt *runtime.Runtime) errorfunc (tx *CreateChainTx) VMID() ids.IDfunc (tx *CreateChainTx) Visit(visitor Visitor) errorCreateNetworkTx
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.IDfunc (t CreateNetworkTx) Bytes() []bytefunc (CreateNetworkTx) InitRuntime(*runtime.Runtime)func (t CreateNetworkTx) InputIDs() set.Set[ids.ID]func (t CreateNetworkTx) Inputs() []*lux.TransferableInputfunc (tx *CreateNetworkTx) ManagerAddress() []bytefunc (tx *CreateNetworkTx) ManagerChainID() ids.IDfunc (t CreateNetworkTx) Memo() []bytefunc (t CreateNetworkTx) NetworkID() uint32func (t CreateNetworkTx) Outputs() []*lux.TransferableOutputfunc (tx *CreateNetworkTx) Owner() fx.Ownerfunc (tx *CreateNetworkTx) Parent() ids.IDfunc (tx *CreateNetworkTx) Security() security.Modefunc (t *CreateNetworkTx) SetBytes(b []byte)func (tx *CreateNetworkTx) Sovereign() boolfunc (tx *CreateNetworkTx) SyntacticVerify(rt *runtime.Runtime) errorfunc (tx *CreateNetworkTx) Validators() []*NetworkValidatorfunc (tx *CreateNetworkTx) Visit(visitor Visitor) errorDelegatorTx
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.IDfunc (t DisableL1ValidatorTx) Bytes() []bytefunc (tx *DisableL1ValidatorTx) DisableAuth() verify.Verifiablefunc (DisableL1ValidatorTx) InitRuntime(*runtime.Runtime)func (t DisableL1ValidatorTx) InputIDs() set.Set[ids.ID]func (t DisableL1ValidatorTx) Inputs() []*lux.TransferableInputfunc (t DisableL1ValidatorTx) Memo() []bytefunc (t DisableL1ValidatorTx) NetworkID() uint32func (t DisableL1ValidatorTx) Outputs() []*lux.TransferableOutputfunc (t *DisableL1ValidatorTx) SetBytes(b []byte)func (tx *DisableL1ValidatorTx) SyntacticVerify(rt *runtime.Runtime) errorfunc (tx *DisableL1ValidatorTx) ValidationID() ids.IDfunc (tx *DisableL1ValidatorTx) Visit(visitor Visitor) errorExportTx
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.IDfunc (t ExportTx) Bytes() []bytefunc (tx *ExportTx) DestinationChain() ids.IDfunc (tx *ExportTx) ExportedOutputs() []*lux.TransferableOutputfunc (ExportTx) InitRuntime(*runtime.Runtime)func (tx *ExportTx) Initialize(ctx context.Context) errorfunc (t ExportTx) InputIDs() set.Set[ids.ID]func (t ExportTx) Inputs() []*lux.TransferableInputfunc (t ExportTx) Memo() []bytefunc (t ExportTx) NetworkID() uint32func (t ExportTx) Outputs() []*lux.TransferableOutputfunc (t *ExportTx) SetBytes(b []byte)func (tx *ExportTx) SyntacticVerify(rt *runtime.Runtime) errorfunc (tx *ExportTx) Visit(visitor Visitor) errorImportTx
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.IDfunc (t ImportTx) Bytes() []bytefunc (tx *ImportTx) ImportedInputs() []*lux.TransferableInputfunc (ImportTx) InitRuntime(*runtime.Runtime)func (tx *ImportTx) Initialize(ctx context.Context) errorfunc (tx *ImportTx) InputIDs() set.Set[ids.ID]func (tx *ImportTx) InputUTXOs() set.Set[ids.ID]func (t ImportTx) Inputs() []*lux.TransferableInputfunc (t ImportTx) Memo() []bytefunc (t ImportTx) NetworkID() uint32func (t ImportTx) Outputs() []*lux.TransferableOutputfunc (t *ImportTx) SetBytes(b []byte)func (tx *ImportTx) SourceChain() ids.IDfunc (tx *ImportTx) SyntacticVerify(rt *runtime.Runtime) errorfunc (tx *ImportTx) Visit(visitor Visitor) errorIncreaseL1ValidatorBalanceTx
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() uint64func (t IncreaseL1ValidatorBalanceTx) BlockchainID() ids.IDfunc (t IncreaseL1ValidatorBalanceTx) Bytes() []bytefunc (IncreaseL1ValidatorBalanceTx) InitRuntime(*runtime.Runtime)func (t IncreaseL1ValidatorBalanceTx) InputIDs() set.Set[ids.ID]func (t IncreaseL1ValidatorBalanceTx) Inputs() []*lux.TransferableInputfunc (t IncreaseL1ValidatorBalanceTx) Memo() []bytefunc (t IncreaseL1ValidatorBalanceTx) NetworkID() uint32func (t IncreaseL1ValidatorBalanceTx) Outputs() []*lux.TransferableOutputfunc (t *IncreaseL1ValidatorBalanceTx) SetBytes(b []byte)func (tx *IncreaseL1ValidatorBalanceTx) SyntacticVerify(rt *runtime.Runtime) errorfunc (tx *IncreaseL1ValidatorBalanceTx) ValidationID() ids.IDfunc (tx *IncreaseL1ValidatorBalanceTx) Visit(visitor Visitor) errorMockScheduledStaker
MockScheduledStaker is a mock of ScheduledStaker interface.
func NewMockScheduledStaker(ctrl *gomock.Controller) *MockScheduledStakerfunc (m *MockScheduledStaker) ChainID() ids.IDfunc (m *MockScheduledStaker) CurrentPriority() Priorityfunc (m *MockScheduledStaker) EXPECT() *MockScheduledStakerMockRecorderfunc (m *MockScheduledStaker) EndTime() time.Timefunc (m *MockScheduledStaker) NodeID() ids.NodeIDfunc (m *MockScheduledStaker) PendingPriority() Priorityfunc (m *MockScheduledStaker) PublicKey() (*bls.PublicKey, bool, error)func (m *MockScheduledStaker) StartTime() time.Timefunc (m *MockScheduledStaker) Weight() uint64MockScheduledStakerMockRecorder
MockScheduledStakerMockRecorder is the mock recorder for MockScheduledStaker.
func (mr *MockScheduledStakerMockRecorder) ChainID() *gomock.Callfunc (mr *MockScheduledStakerMockRecorder) CurrentPriority() *gomock.Callfunc (mr *MockScheduledStakerMockRecorder) EndTime() *gomock.Callfunc (mr *MockScheduledStakerMockRecorder) NodeID() *gomock.Callfunc (mr *MockScheduledStakerMockRecorder) PendingPriority() *gomock.Callfunc (mr *MockScheduledStakerMockRecorder) PublicKey() *gomock.Callfunc (mr *MockScheduledStakerMockRecorder) StartTime() *gomock.Callfunc (mr *MockScheduledStakerMockRecorder) Weight() *gomock.CallNetworkValidator
NetworkValidator is a genesis validator value (shared component; encoded into / decoded from the tx buffer).
func (v *NetworkValidator) Compare(o *NetworkValidator) intfunc (v *NetworkValidator) Verify() errorPermissionlessStaker
Priority
func (p Priority) IsCurrentDelegator() boolfunc (p Priority) IsCurrentValidator() boolfunc (p Priority) IsPendingDelegator() boolfunc (p Priority) IsPendingValidator() boolfunc (p Priority) IsPermissionedValidator() boolfunc (p Priority) IsValidator() boolRegisterL1ValidatorTx
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() uint64func (t RegisterL1ValidatorTx) BlockchainID() ids.IDfunc (t RegisterL1ValidatorTx) Bytes() []bytefunc (RegisterL1ValidatorTx) InitRuntime(*runtime.Runtime)func (t RegisterL1ValidatorTx) InputIDs() set.Set[ids.ID]func (t RegisterL1ValidatorTx) Inputs() []*lux.TransferableInputfunc (t RegisterL1ValidatorTx) Memo() []bytefunc (tx *RegisterL1ValidatorTx) Message() []bytefunc (t RegisterL1ValidatorTx) NetworkID() uint32func (t RegisterL1ValidatorTx) Outputs() []*lux.TransferableOutputfunc (tx *RegisterL1ValidatorTx) ProofOfPossession() [bls.SignatureLen]bytefunc (t *RegisterL1ValidatorTx) SetBytes(b []byte)func (tx *RegisterL1ValidatorTx) SyntacticVerify(rt *runtime.Runtime) errorfunc (tx *RegisterL1ValidatorTx) Visit(visitor Visitor) errorRemoveChainValidatorTx
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.IDfunc (t RemoveChainValidatorTx) Bytes() []bytefunc (tx *RemoveChainValidatorTx) Chain() ids.IDfunc (tx *RemoveChainValidatorTx) ChainAuth() verify.Verifiablefunc (RemoveChainValidatorTx) InitRuntime(*runtime.Runtime)func (tx *RemoveChainValidatorTx) Initialize(context.Context) errorfunc (t RemoveChainValidatorTx) InputIDs() set.Set[ids.ID]func (t RemoveChainValidatorTx) Inputs() []*lux.TransferableInputfunc (t RemoveChainValidatorTx) Memo() []bytefunc (t RemoveChainValidatorTx) NetworkID() uint32func (tx *RemoveChainValidatorTx) NodeID() ids.NodeIDfunc (t RemoveChainValidatorTx) Outputs() []*lux.TransferableOutputfunc (t *RemoveChainValidatorTx) SetBytes(b []byte)func (tx *RemoveChainValidatorTx) SyntacticVerify(rt *runtime.Runtime) errorfunc (tx *RemoveChainValidatorTx) Visit(visitor Visitor) errorRewardValidatorTx
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) *RewardValidatorTxfunc (tx *RewardValidatorTx) Bytes() []bytefunc (*RewardValidatorTx) InitRuntime(*runtime.Runtime)func (tx *RewardValidatorTx) Initialize(context.Context) errorfunc (*RewardValidatorTx) InputIDs() set.Set[ids.ID]func (*RewardValidatorTx) Outputs() []*lux.TransferableOutputfunc (tx *RewardValidatorTx) SetBytes(b []byte)func (*RewardValidatorTx) SyntacticVerify(*runtime.Runtime) errorfunc (tx *RewardValidatorTx) TxID() ids.IDfunc (tx *RewardValidatorTx) Visit(visitor Visitor) errorRuntimeInitializable
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.IDfunc (t SetL1ValidatorWeightTx) Bytes() []bytefunc (SetL1ValidatorWeightTx) InitRuntime(*runtime.Runtime)func (t SetL1ValidatorWeightTx) InputIDs() set.Set[ids.ID]func (t SetL1ValidatorWeightTx) Inputs() []*lux.TransferableInputfunc (t SetL1ValidatorWeightTx) Memo() []bytefunc (tx *SetL1ValidatorWeightTx) Message() []bytefunc (t SetL1ValidatorWeightTx) NetworkID() uint32func (t SetL1ValidatorWeightTx) Outputs() []*lux.TransferableOutputfunc (t *SetL1ValidatorWeightTx) SetBytes(b []byte)func (tx *SetL1ValidatorWeightTx) SyntacticVerify(rt *runtime.Runtime) errorfunc (tx *SetL1ValidatorWeightTx) Visit(visitor Visitor) errorStaker
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.IDfunc (t TransferChainOwnershipTx) Bytes() []bytefunc (tx *TransferChainOwnershipTx) Chain() ids.IDfunc (tx *TransferChainOwnershipTx) ChainAuth() verify.Verifiablefunc (TransferChainOwnershipTx) InitRuntime(*runtime.Runtime)func (tx *TransferChainOwnershipTx) Initialize(ctx context.Context) errorfunc (t TransferChainOwnershipTx) InputIDs() set.Set[ids.ID]func (t TransferChainOwnershipTx) Inputs() []*lux.TransferableInputfunc (t TransferChainOwnershipTx) Memo() []bytefunc (t TransferChainOwnershipTx) NetworkID() uint32func (t TransferChainOwnershipTx) Outputs() []*lux.TransferableOutputfunc (tx *TransferChainOwnershipTx) Owner() fx.Ownerfunc (t *TransferChainOwnershipTx) SetBytes(b []byte)func (tx *TransferChainOwnershipTx) SyntacticVerify(rt *runtime.Runtime) errorfunc (tx *TransferChainOwnershipTx) Visit(visitor Visitor) errorTransformChainTx
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.IDfunc (t TransformChainTx) BlockchainID() ids.IDfunc (t TransformChainTx) Bytes() []bytefunc (tx *TransformChainTx) Chain() ids.IDfunc (tx *TransformChainTx) ChainAuth() verify.Verifiablefunc (TransformChainTx) InitRuntime(*runtime.Runtime)func (tx *TransformChainTx) InitialSupply() uint64func (tx *TransformChainTx) Initialize(ctx context.Context) errorfunc (t TransformChainTx) InputIDs() set.Set[ids.ID]func (t TransformChainTx) Inputs() []*lux.TransferableInputfunc (tx *TransformChainTx) MaxConsumptionRate() uint64func (tx *TransformChainTx) MaxStakeDuration() uint32func (tx *TransformChainTx) MaxValidatorStake() uint64func (tx *TransformChainTx) MaxValidatorWeightFactor() bytefunc (tx *TransformChainTx) MaximumSupply() uint64func (t TransformChainTx) Memo() []bytefunc (tx *TransformChainTx) MinConsumptionRate() uint64func (tx *TransformChainTx) MinDelegationFee() uint32func (tx *TransformChainTx) MinDelegatorStake() uint64func (tx *TransformChainTx) MinStakeDuration() uint32func (tx *TransformChainTx) MinValidatorStake() uint64func (t TransformChainTx) NetworkID() uint32func (t TransformChainTx) Outputs() []*lux.TransferableOutputfunc (t *TransformChainTx) SetBytes(b []byte)func (tx *TransformChainTx) SyntacticVerify(rt *runtime.Runtime) errorfunc (tx *TransformChainTx) UptimeRequirement() uint32func (tx *TransformChainTx) Visit(visitor Visitor) errorTx
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() []bytefunc (tx *Tx) GossipID() ids.IDfunc (tx *Tx) ID() ids.IDfunc (tx *Tx) Initialize() errorfunc (tx *Tx) InputIDs() set.Set[ids.ID]func (tx *Tx) SetBytes(signedBytes []byte)func (tx *Tx) Sign(signers [][]*secp256k1.PrivateKey) errorfunc (tx *Tx) Size() intfunc (tx *Tx) SyntacticVerify(rt *runtime.Runtime) errorfunc (tx *Tx) UTXOs() []*lux.UTXOUnsignedTx
UnsignedTx is an unsigned transaction
Validator
Validator is a validator.
func (v *Validator) EndTime() time.Timefunc (v *Validator) StartTime() time.Timefunc (v *Validator) Verify() errorfunc (v *Validator) Weight() uint64ValidatorTx
ValidatorTx defines the interface for a validator transaction that supports delegation.
Visitor
Allow vm to execute custom logic against the underlying transaction types.