Documentation ¶
Index ¶
- Constants
- func WithBlockIssuerKeys(blockIssuerKeys ...iotago.BlockIssuerKey) options.Option[AccountData]
- func WithCredits(credits *BlockIssuanceCredits) options.Option[AccountData]
- func WithDelegationStake(delegationStake iotago.BaseToken) options.Option[AccountData]
- func WithExpirySlot(expirySlot iotago.SlotIndex) options.Option[AccountData]
- func WithFixedCost(fixedCost iotago.Mana) options.Option[AccountData]
- func WithLatestSupportedProtocolVersion(versionAndHash model.VersionAndHash) options.Option[AccountData]
- func WithOutputID(outputID iotago.OutputID) options.Option[AccountData]
- func WithStakeEndEpoch(stakeEndEpoch iotago.EpochIndex) options.Option[AccountData]
- func WithValidatorStake(validatorStake iotago.BaseToken) options.Option[AccountData]
- type AccountData
- type AccountsData
- type BlockIssuanceCredits
- type Mana
Constants ¶
View Source
const BlockIssuanceCreditsBytesLength = serializer.Int64ByteSize + iotago.SlotIndexLength
Variables ¶
This section is empty.
Functions ¶
func WithBlockIssuerKeys ¶
func WithBlockIssuerKeys(blockIssuerKeys ...iotago.BlockIssuerKey) options.Option[AccountData]
func WithCredits ¶
func WithCredits(credits *BlockIssuanceCredits) options.Option[AccountData]
func WithDelegationStake ¶
func WithDelegationStake(delegationStake iotago.BaseToken) options.Option[AccountData]
func WithExpirySlot ¶
func WithExpirySlot(expirySlot iotago.SlotIndex) options.Option[AccountData]
func WithFixedCost ¶
func WithFixedCost(fixedCost iotago.Mana) options.Option[AccountData]
func WithLatestSupportedProtocolVersion ¶
func WithLatestSupportedProtocolVersion(versionAndHash model.VersionAndHash) options.Option[AccountData]
func WithOutputID ¶
func WithOutputID(outputID iotago.OutputID) options.Option[AccountData]
func WithStakeEndEpoch ¶
func WithStakeEndEpoch(stakeEndEpoch iotago.EpochIndex) options.Option[AccountData]
func WithValidatorStake ¶
func WithValidatorStake(validatorStake iotago.BaseToken) options.Option[AccountData]
Types ¶
type AccountData ¶
type AccountData struct { ID iotago.AccountID Credits *BlockIssuanceCredits ExpirySlot iotago.SlotIndex OutputID iotago.OutputID BlockIssuerKeys iotago.BlockIssuerKeys ValidatorStake iotago.BaseToken DelegationStake iotago.BaseToken FixedCost iotago.Mana StakeEndEpoch iotago.EpochIndex LatestSupportedProtocolVersionAndHash model.VersionAndHash }
func AccountDataFromBytes ¶
func AccountDataFromBytes(b []byte) (*AccountData, int, error)
func AccountDataFromReader ¶
func AccountDataFromReader(reader io.ReadSeeker) (*AccountData, error)
func NewAccountData ¶
func NewAccountData(id iotago.AccountID, opts ...options.Option[AccountData]) *AccountData
func (*AccountData) AddBlockIssuerKeys ¶
func (a *AccountData) AddBlockIssuerKeys(blockIssuerKeys ...iotago.BlockIssuerKey)
func (*AccountData) Bytes ¶
func (a *AccountData) Bytes() ([]byte, error)
func (*AccountData) Clone ¶
func (a *AccountData) Clone() *AccountData
func (*AccountData) RemoveBlockIssuerKey ¶
func (a *AccountData) RemoveBlockIssuerKey(blockIssuerKeys ...iotago.BlockIssuerKey)
func (*AccountData) String ¶
func (a *AccountData) String() string
type AccountsData ¶
type AccountsData []*AccountData
type BlockIssuanceCredits ¶
type BlockIssuanceCredits struct { Value iotago.BlockIssuanceCredits UpdateSlot iotago.SlotIndex }
BlockIssuanceCredits is a weight annotated with the slot it was last updated in.
func BlockIssuanceCreditsFromBytes ¶
func BlockIssuanceCreditsFromBytes(bytes []byte) (*BlockIssuanceCredits, int, error)
func NewBlockIssuanceCredits ¶
func NewBlockIssuanceCredits(value iotago.BlockIssuanceCredits, updateTime iotago.SlotIndex) (newCredits *BlockIssuanceCredits)
NewBlockIssuanceCredits creates a new Credits instance.
func (*BlockIssuanceCredits) Bytes ¶
func (c *BlockIssuanceCredits) Bytes() ([]byte, error)
Bytes returns a serialized version of the Credits.
func (*BlockIssuanceCredits) String ¶
func (c *BlockIssuanceCredits) String() string
func (*BlockIssuanceCredits) Update ¶
func (c *BlockIssuanceCredits) Update(change iotago.BlockIssuanceCredits, updateSlot ...iotago.SlotIndex)
Update updates the Credits increasing Value and updateTime.
type Mana ¶
type Mana struct {
// contains filtered or unexported fields
}
Mana is the stored and potential mana value of an account collected on the UTXO layer - used by the Scheduler.
func (*Mana) ExcessBaseTokens ¶
func (*Mana) UpdateTime ¶
Click to show internal directories.
Click to hide internal directories.