mirror of
https://github.com/luxfi/node.git
synced 2026-10-30 15:24:05 +00:00
63 lines
1.3 KiB
Go
63 lines
1.3 KiB
Go
// Copyright (C) 2019-2025, Lux Industries Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package txs
|
|
|
|
//go:generate go run go.uber.org/mock/mockgen -package=$GOPACKAGE -destination=mock_scheduled_staker.go . ScheduledStaker
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/luxfi/crypto/bls"
|
|
"github.com/luxfi/ids"
|
|
"github.com/luxfi/node/vms/platformvm/fx"
|
|
lux "github.com/luxfi/utxo"
|
|
)
|
|
|
|
// ValidatorTx defines the interface for a validator transaction that supports
|
|
// delegation.
|
|
type ValidatorTx interface {
|
|
UnsignedTx
|
|
PermissionlessStaker
|
|
|
|
ValidationRewardsOwner() fx.Owner
|
|
DelegationRewardsOwner() fx.Owner
|
|
Shares() uint32
|
|
}
|
|
|
|
type DelegatorTx interface {
|
|
UnsignedTx
|
|
PermissionlessStaker
|
|
|
|
RewardsOwner() fx.Owner
|
|
}
|
|
|
|
type StakerTx interface {
|
|
UnsignedTx
|
|
Staker
|
|
}
|
|
|
|
type PermissionlessStaker interface {
|
|
Staker
|
|
|
|
Outputs() []*lux.TransferableOutput
|
|
Stake() []*lux.TransferableOutput
|
|
}
|
|
|
|
type Staker interface {
|
|
ChainID() ids.ID
|
|
NodeID() ids.NodeID
|
|
// PublicKey returns the BLS public key registered by this transaction. If
|
|
// there was no key registered by this transaction, it will return false.
|
|
PublicKey() (*bls.PublicKey, bool, error)
|
|
EndTime() time.Time
|
|
Weight() uint64
|
|
CurrentPriority() Priority
|
|
}
|
|
|
|
type ScheduledStaker interface {
|
|
Staker
|
|
StartTime() time.Time
|
|
PendingPriority() Priority
|
|
}
|