history

package
v0.2.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var APIConstructors = map[string]APIConstructor{

	"damask": damaskAPIConstructor,
	"cobalt": cobaltAPIConstructor,
	"eden":   edenAPIConstructor,

	"2022-03-03": damaskAPIConstructor,
	"2023-10-12": edenAPIConstructor,
}

APIConstructors map each (nexus-internal) archive name to the API constructor that can talk to that archive. The namespace of archive names is shared between mainnet and testnet for simplicity. The supported archive names come from `config.DefaultChains`. If you want to use a custom set of archives (`custom_chain` in the yaml config), you must reuse a suitable archive name.

Functions

This section is empty.

Types

type APIConstructor

type APIConstructor func(ctx context.Context, chainContext string, archiveConfig *config.ArchiveConfig, fastStartup bool) (nodeapi.ConsensusApiLite, error)

type HistoryConsensusApiLite

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

func NewHistoryConsensusApiLite

func NewHistoryConsensusApiLite(ctx context.Context, history *config.History, nodes map[string]*config.ArchiveConfig, fastStartup bool) (*HistoryConsensusApiLite, error)

func (*HistoryConsensusApiLite) APIForChainContext

func (c *HistoryConsensusApiLite) APIForChainContext(chainContext string) (nodeapi.ConsensusApiLite, error)

func (*HistoryConsensusApiLite) APIForHeight

func (c *HistoryConsensusApiLite) APIForHeight(height int64) (nodeapi.ConsensusApiLite, error)

func (*HistoryConsensusApiLite) Close

func (c *HistoryConsensusApiLite) Close() error

func (*HistoryConsensusApiLite) GetBlock

func (c *HistoryConsensusApiLite) GetBlock(ctx context.Context, height int64) (*consensus.Block, error)

func (*HistoryConsensusApiLite) GetCommittees

func (c *HistoryConsensusApiLite) GetCommittees(ctx context.Context, height int64, runtimeID common.Namespace) ([]nodeapi.Committee, error)

func (*HistoryConsensusApiLite) GetEpoch

func (c *HistoryConsensusApiLite) GetEpoch(ctx context.Context, height int64) (beacon.EpochTime, error)

func (*HistoryConsensusApiLite) GetGenesisDocument

func (c *HistoryConsensusApiLite) GetGenesisDocument(ctx context.Context, chainContext string) (*genesis.Document, error)

func (*HistoryConsensusApiLite) GetNodes added in v0.1.16

func (c *HistoryConsensusApiLite) GetNodes(ctx context.Context, height int64) ([]nodeapi.Node, error)

func (*HistoryConsensusApiLite) GetProposal

func (c *HistoryConsensusApiLite) GetProposal(ctx context.Context, height int64, proposalID uint64) (*nodeapi.Proposal, error)

func (*HistoryConsensusApiLite) GetTransactionsWithResults

func (c *HistoryConsensusApiLite) GetTransactionsWithResults(ctx context.Context, height int64) ([]nodeapi.TransactionWithResults, error)

func (*HistoryConsensusApiLite) GetValidators

func (c *HistoryConsensusApiLite) GetValidators(ctx context.Context, height int64) ([]nodeapi.Validator, error)

func (*HistoryConsensusApiLite) GovernanceEvents

func (c *HistoryConsensusApiLite) GovernanceEvents(ctx context.Context, height int64) ([]nodeapi.Event, error)

func (*HistoryConsensusApiLite) GrpcConn added in v0.1.22

func (*HistoryConsensusApiLite) RegistryEvents

func (c *HistoryConsensusApiLite) RegistryEvents(ctx context.Context, height int64) ([]nodeapi.Event, error)

func (*HistoryConsensusApiLite) RoothashEvents

func (c *HistoryConsensusApiLite) RoothashEvents(ctx context.Context, height int64) ([]nodeapi.Event, error)

func (*HistoryConsensusApiLite) StakingEvents

func (c *HistoryConsensusApiLite) StakingEvents(ctx context.Context, height int64) ([]nodeapi.Event, error)

func (*HistoryConsensusApiLite) StateToGenesis

func (c *HistoryConsensusApiLite) StateToGenesis(ctx context.Context, height int64) (*genesis.Document, error)

type HistoryRuntimeApiLite

type HistoryRuntimeApiLite struct {
	Runtime common.Runtime
	History *config.History
	APIs    map[string]nodeapi.RuntimeApiLite
}

func NewHistoryRuntimeApiLite

func NewHistoryRuntimeApiLite(ctx context.Context, history *config.History, sdkPT *sdkConfig.ParaTime, nodes map[string]*config.ArchiveConfig, fastStartup bool, runtime common.Runtime) (*HistoryRuntimeApiLite, error)

func (*HistoryRuntimeApiLite) APIForRound

func (rc *HistoryRuntimeApiLite) APIForRound(round uint64) (nodeapi.RuntimeApiLite, error)

func (*HistoryRuntimeApiLite) Close

func (rc *HistoryRuntimeApiLite) Close() error

func (*HistoryRuntimeApiLite) EVMGetCode

func (rc *HistoryRuntimeApiLite) EVMGetCode(ctx context.Context, round uint64, address []byte) ([]byte, error)

func (*HistoryRuntimeApiLite) EVMSimulateCall

func (rc *HistoryRuntimeApiLite) EVMSimulateCall(ctx context.Context, round uint64, gasPrice []byte, gasLimit uint64, caller []byte, address []byte, value []byte, data []byte) (*nodeapi.FallibleResponse, error)

func (*HistoryRuntimeApiLite) GetBlockHeader

func (rc *HistoryRuntimeApiLite) GetBlockHeader(ctx context.Context, round uint64) (*nodeapi.RuntimeBlockHeader, error)

func (*HistoryRuntimeApiLite) GetEventsRaw

func (rc *HistoryRuntimeApiLite) GetEventsRaw(ctx context.Context, round uint64) ([]nodeapi.RuntimeEvent, error)

func (*HistoryRuntimeApiLite) GetNativeBalance

func (rc *HistoryRuntimeApiLite) GetNativeBalance(ctx context.Context, round uint64, addr nodeapi.Address) (*common.BigInt, error)

func (*HistoryRuntimeApiLite) GetTransactionsWithResults

func (rc *HistoryRuntimeApiLite) GetTransactionsWithResults(ctx context.Context, round uint64) ([]nodeapi.RuntimeTransactionWithResults, error)

Jump to

Keyboard shortcuts

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