accounts

package
v1.0.0-beta.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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 WithLatestSupportedProtocolVersionAndHash

func WithLatestSupportedProtocolVersionAndHash(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 {
	// contains filtered or unexported fields
}

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) BlockIssuerKeys

func (a *AccountData) BlockIssuerKeys() iotago.BlockIssuerKeys

func (*AccountData) Bytes

func (a *AccountData) Bytes() ([]byte, error)

func (*AccountData) Clone

func (a *AccountData) Clone() *AccountData

func (*AccountData) Credits

func (a *AccountData) Credits() *BlockIssuanceCredits

func (*AccountData) DelegationStake

func (a *AccountData) DelegationStake() iotago.BaseToken

func (*AccountData) ExpirySlot

func (a *AccountData) ExpirySlot() iotago.SlotIndex

func (*AccountData) FixedCost

func (a *AccountData) FixedCost() iotago.Mana

func (*AccountData) ID

func (a *AccountData) ID() iotago.AccountID

Getters.

func (*AccountData) LatestSupportedProtocolVersionAndHash

func (a *AccountData) LatestSupportedProtocolVersionAndHash() model.VersionAndHash

func (*AccountData) OutputID

func (a *AccountData) OutputID() iotago.OutputID

func (*AccountData) RemoveBlockIssuerKeys

func (a *AccountData) RemoveBlockIssuerKeys(blockIssuerKeys ...iotago.BlockIssuerKey)

func (*AccountData) SetBlockIssuerKeys

func (a *AccountData) SetBlockIssuerKeys(blockIssuerKeys iotago.BlockIssuerKeys)

func (*AccountData) SetCredits

func (a *AccountData) SetCredits(credits *BlockIssuanceCredits)

func (*AccountData) SetDelegationStake

func (a *AccountData) SetDelegationStake(delegationStake iotago.BaseToken)

func (*AccountData) SetExpirySlot

func (a *AccountData) SetExpirySlot(expirySlot iotago.SlotIndex)

func (*AccountData) SetFixedCost

func (a *AccountData) SetFixedCost(fixedCost iotago.Mana)

func (*AccountData) SetID

func (a *AccountData) SetID(id iotago.AccountID)

Setters.

func (*AccountData) SetLatestSupportedProtocolVersionAndHash

func (a *AccountData) SetLatestSupportedProtocolVersionAndHash(latestSupportedProtocolVersionAndHash model.VersionAndHash)

func (*AccountData) SetOutputID

func (a *AccountData) SetOutputID(outputID iotago.OutputID)

func (*AccountData) SetStakeEndEpoch

func (a *AccountData) SetStakeEndEpoch(stakeEndEpoch iotago.EpochIndex)

func (*AccountData) SetValidatorStake

func (a *AccountData) SetValidatorStake(validatorStake iotago.BaseToken)

func (*AccountData) StakeEndEpoch

func (a *AccountData) StakeEndEpoch() iotago.EpochIndex

func (*AccountData) String

func (a *AccountData) String() string

func (*AccountData) ValidatorStake

func (a *AccountData) ValidatorStake() iotago.BaseToken

type AccountsData

type AccountsData []*AccountData

type BlockIssuanceCredits

type BlockIssuanceCredits struct {
	// contains filtered or unexported fields
}

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) Clone

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.

func (*BlockIssuanceCredits) UpdateSlot

func (c *BlockIssuanceCredits) UpdateSlot() iotago.SlotIndex

func (*BlockIssuanceCredits) Value

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 NewMana

func NewMana(value iotago.Mana, excessBaseTokens iotago.BaseToken, updateTime iotago.SlotIndex) *Mana

func (*Mana) ExcessBaseTokens

func (m *Mana) ExcessBaseTokens() iotago.BaseToken

func (*Mana) String

func (m *Mana) String() string

func (*Mana) UpdateTime

func (m *Mana) UpdateTime() iotago.SlotIndex

func (*Mana) Value

func (m *Mana) Value() iotago.Mana

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL