Documentation ¶
Index ¶
- Variables
- func VerifyHash(data []byte, hash uint64) error
- type Block
- type Buffer
- type DataFrame
- func (n DataFrame) Bytes() []uint8
- func (n DataFrame) GetHash() (uint64, bool)
- func (n DataFrame) GetIndex() (int, bool)
- func (n DataFrame) GetNext() (List__Link, bool)
- func (n DataFrame) GetTotal() (int, bool)
- func (n DataFrame) HasHash() bool
- func (n DataFrame) HasIndex() bool
- func (n DataFrame) HasNext() bool
- func (n DataFrame) HasTotal() bool
- func (n DataFrame) MarshalJSON() ([]byte, error)
- func (n *DataFrame) UnmarshalJSON(data []byte) error
- type Entry
- type Epoch
- type Hash
- type List__Link
- type List__Shredding
- type Rewards
- type Shredding
- type SlotMeta
- type Subset
- type Transaction
- func (n Transaction) GetPositionIndex() (int, bool)
- func (decoded Transaction) GetSolanaTransaction() (*solana.Transaction, error)
- func (n Transaction) HasIndex() bool
- func (decoded Transaction) Signature() (solana.Signature, error)
- func (decoded Transaction) Signatures() ([]solana.Signature, error)
Constants ¶
This section is empty.
Variables ¶
var DisableHashVerification bool
var Prototypes schemaSlab
Functions ¶
func VerifyHash ¶
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 `json:"kind" yaml:"kind"` Slot int `json:"slot" yaml:"slot"` Shredding List__Shredding `json:"shredding" yaml:"shredding"` Entries List__Link `json:"entries" yaml:"entries"` Meta SlotMeta `json:"meta" yaml:"meta"` Rewards datamodel.Link `json:"rewards" yaml:"rewards"` }
func (Block) GetBlockHeight ¶
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
func (*Buffer) FromString ¶
func (Buffer) MarshalJSON ¶
Buffer.MarshalJSON() returns the JSON representation of the Buffer in base64.
func (*Buffer) UnmarshalJSON ¶
Buffer.UnmarshalJSON() decodes the JSON representation of the Buffer in base64.
type DataFrame ¶
type DataFrame struct { Kind int `json:"kind" yaml:"kind"` Hash **int `json:"hash" yaml:"hash"` Index **int `json:"index" yaml:"index"` Total **int `json:"total" yaml:"total"` Data Buffer `json:"data" yaml:"data"` Next **List__Link `json:"next" yaml:"next"` }
func (DataFrame) Bytes ¶
GetData returns the value of the 'Data' field and a flag indicating whether the field has a value.
func (DataFrame) GetHash ¶
GetHash returns the value of the 'Hash' field and a flag indicating whether the field has a value.
func (DataFrame) GetIndex ¶
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 ¶
GetTotal returns the value of the 'Total' field and a flag indicating whether the field has a value.
func (DataFrame) MarshalJSON ¶
DataFrame.MarshalJSON implements the json.Marshaler interface.
func (*DataFrame) UnmarshalJSON ¶
DataFrame.UnmarshalJSON implements the json.Unmarshaler interface.
type Entry ¶
type Entry struct { Kind int `json:"kind" yaml:"kind"` NumHashes int `json:"num_hashes" yaml:"num_hashes"` Hash Hash `json:"hash" yaml:"hash"` Transactions List__Link `json:"transactions" yaml:"transactions"` }
type Epoch ¶
type Epoch struct { Kind int `json:"kind" yaml:"kind"` Epoch int `json:"epoch" yaml:"epoch"` Subsets List__Link `json:"subsets" yaml:"subsets"` }
type Hash ¶
type Hash []uint8
func (Hash) MarshalJSON ¶
Hash.MarshalJSON() returns the JSON representation of the Hash in hex.
func (*Hash) UnmarshalJSON ¶
Hash.UnmarshalJSON() decodes the JSON representation of the Hash in hex.
type List__Link ¶
type List__Shredding ¶
type List__Shredding []Shredding
type Subset ¶
type Subset struct { Kind int `json:"kind" yaml:"kind"` First int `json:"first" yaml:"first"` Last int `json:"last" yaml:"last"` Blocks List__Link `json:"blocks" yaml:"blocks"` }
type Transaction ¶
type Transaction struct { Kind int `json:"kind" yaml:"kind"` Data DataFrame `json:"data" yaml:"data"` Metadata DataFrame `json:"metadata" yaml:"metadata"` Slot int `json:"slot" yaml:"slot"` Index **int `json:"index" yaml:"index"` }
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) GetSolanaTransaction ¶ added in v0.4.0
func (decoded Transaction) GetSolanaTransaction() (*solana.Transaction, error)
func (Transaction) HasIndex ¶
func (n Transaction) HasIndex() bool
Transaction.HasIndex returns whether the 'Index' field is present.
func (Transaction) Signature ¶ added in v0.4.0
func (decoded Transaction) Signature() (solana.Signature, error)
func (Transaction) Signatures ¶ added in v0.4.0
func (decoded Transaction) Signatures() ([]solana.Signature, error)