rpc_client

package
v0.0.0-...-80b2b3e Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GranadaBlocksInCycle  int64 = 4096 * 2
	GranadaCycle                = 388
	BlocksPerRollSnapshot       = 256 * 2
	EndorsementNum              = 256
)

Variables

This section is empty.

Functions

func ToDoubleOperationEvidence

func ToDoubleOperationEvidence(op tzblock.Operations) (dee models.DoubleOperationEvidence, err error)

Types

type Contents

type Contents struct {
	Parameters Parameters `json:"parameters`
	Kind       string     `json:"kind"`
	Metadata   Metadata   `json:"metadata"`
	Source     string     `json:"source"`
}

type InternalOperationResults

type InternalOperationResults struct {
	Parameters Parameters `json:"parameters`
}

type Metadata

type Metadata struct {
	InternalOperationResults []InternalOperationResults `json:"internal_operation_results"`
}

type Operation

type Operation struct {
	Hash     string      `json:"hash"`
	Contents []*Contents `json:"contents"`
}

type Parameters

type Parameters struct {
	Entrypoint string      `json:"entrypoint"`
	Value      script.Prim `json:"value"`
}

Todo move models somewhere Block parse

type Tezos

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

func New

func New(cfg client.TransportConfig, network string, isTestNetwork bool) *Tezos

func (*Tezos) BlocksInCycle

func (t *Tezos) BlocksInCycle(cycle int64) int64

func (*Tezos) CyclesBlocksCount

func (t *Tezos) CyclesBlocksCount(cycle int64) int64

Blocks count till cycle end

func (*Tezos) DoubleOperationEvidence

func (t *Tezos) DoubleOperationEvidence(ctx context.Context, blockLevel int, operationHash string) (dee models.DoubleOperationEvidence, err error)

func (*Tezos) EndorsementRightsFor

func (t *Tezos) EndorsementRightsFor(ctx context.Context, blockFrom, blockTo, currentHead int64) ([]models.EndorsementRight, error)

func (*Tezos) Operation

func (t *Tezos) Operation(ctx context.Context, blockHash, transactionHash string) (op Operation, err error)

func (*Tezos) RightsFor

func (t *Tezos) RightsFor(ctx context.Context, blockFrom, blockTo, currentHead int64) ([]models.FutureBakingRight, error)

func (*Tezos) RollsForBlock

func (t *Tezos) RollsForBlock(ctx context.Context, blockLevel int64) (roll []models.Roll, err error)

func (*Tezos) Script

func (t *Tezos) Script(ctx context.Context, contractHash string) (bm michelson.BigMap, err error)

func (*Tezos) SnapshotForCycle

func (t *Tezos) SnapshotForCycle(ctx context.Context, cycle int64, useHead bool) (snap models.Snapshot, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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