Documentation
¶
Index ¶
- Constants
- type Commitment
- type ID
- func (b ID) Alias() (alias string)
- func (b ID) Base58() (base58Encoded string)
- func (b ID) Bytes() (serialized []byte, err error)
- func (b ID) CompareTo(other ID) int
- func (b *ID) DecodeJSON(val any) error
- func (b ID) EncodeJSON() (any, error)
- func (b *ID) FromBase58(base58EncodedString string) (err error)
- func (b *ID) FromBytes(serialized []byte) (consumedBytes int, err error)
- func (b *ID) FromRandomness(optionalSlot ...slot.Index) (err error)
- func (b ID) Index() slot.Index
- func (b ID) Length() int
- func (b ID) RegisterAlias(alias string)
- func (b ID) String() (humanReadable string)
- func (b ID) UnregisterAlias()
- type Roots
- func (r *Roots) ActivityRoot() (activityRoot types.Identifier)
- func (r *Roots) ID() (id types.Identifier)
- func (r *Roots) ManaRoot() (manaRoot types.Identifier)
- func (r *Roots) MeshRoot() (meshRoot types.Identifier)
- func (r *Roots) StateMutationRoot() (stateMutationRoot types.Identifier)
- func (r *Roots) StateRoot() (stateRoot types.Identifier)
Constants ¶
View Source
const Size = unsafe.Sizeof(commitment{})
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Commitment ¶
type Commitment struct { model.Immutable[Commitment, *Commitment, commitment] `serix:"0"` }
func New ¶
func New(index slot.Index, prevID ID, rootsID types.Identifier, cumulativeWeight int64) (newCommitment *Commitment)
func NewEmptyCommitment ¶
func NewEmptyCommitment() (newCommitment *Commitment)
func (*Commitment) CumulativeWeight ¶
func (c *Commitment) CumulativeWeight() (cumulativeWeight int64)
func (*Commitment) Equals ¶
func (c *Commitment) Equals(other *Commitment) bool
func (*Commitment) ID ¶
func (c *Commitment) ID() (id ID)
func (*Commitment) Index ¶
func (c *Commitment) Index() (index slot.Index)
func (*Commitment) PrevID ¶
func (c *Commitment) PrevID() (prevID ID)
func (*Commitment) RootsID ¶
func (c *Commitment) RootsID() (rootsID types.Identifier)
type ID ¶
type ID struct { SlotIndex slot.Index `serix:"0"` Identifier types.Identifier `serix:"1"` }
func (ID) Alias ¶
Alias returns the human-readable alias of the ID (or the base58 encoded bytes if no alias was set).
func (ID) CompareTo ¶
CompareTo does a lexicographical comparison to another blockID. Returns 0 if equal, -1 if smaller, or 1 if larger than other. Passing nil as other will result in a panic.
func (*ID) DecodeJSON ¶
func (ID) EncodeJSON ¶
func (*ID) FromBase58 ¶
FromBase58 un-serializes a ID from a base58 encoded string.
func (*ID) FromRandomness ¶
FromRandomness generates a random ID.
func (ID) RegisterAlias ¶
RegisterAlias allows to register a human-readable alias for the ID which will be used as a replacement for the String method.
func (ID) UnregisterAlias ¶
func (b ID) UnregisterAlias()
UnregisterAlias allows to unregister a previously registered alias.
type Roots ¶
func NewRoots ¶
func NewRoots(meshRoot, stateMutationRoot, activityRoot, stateRoot, manaRoot types.Identifier) (newRoots *Roots)
func (*Roots) ActivityRoot ¶
func (r *Roots) ActivityRoot() (activityRoot types.Identifier)
func (*Roots) ID ¶
func (r *Roots) ID() (id types.Identifier)
func (*Roots) ManaRoot ¶
func (r *Roots) ManaRoot() (manaRoot types.Identifier)
func (*Roots) MeshRoot ¶
func (r *Roots) MeshRoot() (meshRoot types.Identifier)
func (*Roots) StateMutationRoot ¶
func (r *Roots) StateMutationRoot() (stateMutationRoot types.Identifier)
func (*Roots) StateRoot ¶
func (r *Roots) StateRoot() (stateRoot types.Identifier)
Click to show internal directories.
Click to hide internal directories.