ipldbindcode

package
v0.2.3-rc18 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Prototypes schemaSlab

Functions

func VerifyHash

func VerifyHash(data []byte, hash int) error

VerifyHash verifies that the provided data matches the provided hash. In case of DataFrames, the hash is stored in the 'Hash' field, and it is the hash of the concatenated 'Data' fields of all the DataFrames.

Types

type Block

type Block struct {
	Kind      int
	Slot      int
	Shredding List__Shredding
	Entries   List__Link
	Meta      SlotMeta
	Rewards   datamodel.Link
}

func (Block) GetBlockHeight

func (n Block) GetBlockHeight() (uint64, bool)

GetBlockHeight returns the 'block_height' field, which indicates the height of the block, and a flag indicating whether the field has a value.

type Buffer

type Buffer []uint8

type DataFrame

type DataFrame struct {
	Kind  int
	Hash  **int
	Index **int
	Total **int
	Data  []uint8
	Next  **List__Link
}

func (DataFrame) Bytes

func (n DataFrame) Bytes() []uint8

GetData returns the value of the 'Data' field and a flag indicating whether the field has a value.

func (DataFrame) GetHash

func (n DataFrame) GetHash() (int, bool)

GetHash returns the value of the 'Hash' field and a flag indicating whether the field has a value.

func (DataFrame) GetIndex

func (n DataFrame) GetIndex() (int, bool)

GetIndex returns the value of the 'Index' field and a flag indicating whether the field has a value.

func (DataFrame) GetNext

func (n DataFrame) GetNext() (List__Link, bool)

GetNext returns the value of the 'Next' field and a flag indicating whether the field has a value.

func (DataFrame) GetTotal

func (n DataFrame) GetTotal() (int, bool)

GetTotal returns the value of the 'Total' field and a flag indicating whether the field has a value.

func (DataFrame) HasHash

func (n DataFrame) HasHash() bool

DataFrame.HasHash returns whether the 'Hash' field is present.

func (DataFrame) HasIndex

func (n DataFrame) HasIndex() bool

HasIndex returns whether the 'Index' field is present.

func (DataFrame) HasNext

func (n DataFrame) HasNext() bool

HasNext returns whether the 'Next' field is present and non-empty.

func (DataFrame) HasTotal

func (n DataFrame) HasTotal() bool

HasTotal returns whether the 'Total' field is present.

type Entry

type Entry struct {
	Kind         int
	NumHashes    int
	Hash         []uint8
	Transactions List__Link
}

type Epoch

type Epoch struct {
	Kind    int
	Epoch   int
	Subsets List__Link
}

type Hash

type Hash []uint8
type List__Link []datamodel.Link

type List__Shredding

type List__Shredding []Shredding

type Rewards

type Rewards struct {
	Kind int
	Slot int
	Data DataFrame
}

type Shredding

type Shredding struct {
	EntryEndIdx int
	ShredEndIdx int
}

type SlotMeta

type SlotMeta struct {
	Parent_slot  int
	Blocktime    int
	Block_height **int
}

type Subset

type Subset struct {
	Kind   int
	First  int
	Last   int
	Blocks List__Link
}

type Transaction

type Transaction struct {
	Kind     int
	Data     DataFrame
	Metadata DataFrame
	Slot     int
	Index    **int
}

func (Transaction) GetPositionIndex

func (n Transaction) GetPositionIndex() (int, bool)

GetPositionIndex returns the 'Index' field, which indicates the index of the transaction in the block (0-based), and a flag indicating whether the field has a value.

func (Transaction) HasIndex

func (n Transaction) HasIndex() bool

Transaction.HasIndex returns whether the 'Index' field is present.

Jump to

Keyboard shortcuts

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