api

package
v0.2.24-beta.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivationAPI

type ActivationAPI interface {
	UpdatePoETServers(ctx context.Context, endpoints []string) error
}

ActivationAPI is an API for activation module.

type AtxProvider

type AtxProvider interface {
	GetFullAtx(id types.ATXID) (*types.VerifiedActivationTx, error)
}

AtxProvider is used by ActivationService to get ATXes.

type ChallengeVerifier

type ChallengeVerifier = activation.ChallengeVerifier

type ConservativeState

type ConservativeState interface {
	GetStateRoot() (types.Hash32, error)
	GetLayerStateRoot(types.LayerID) (types.Hash32, error)
	GetLayerApplied(types.TransactionID) (types.LayerID, error)
	GetAllAccounts() ([]*types.Account, error)
	GetBalance(types.Address) (uint64, error)
	GetNonce(types.Address) (types.Nonce, error)
	GetProjection(types.Address) (uint64, uint64)
	GetMeshTransaction(types.TransactionID) (*types.MeshTransaction, error)
	GetMeshTransactions([]types.TransactionID) ([]*types.MeshTransaction, map[types.TransactionID]struct{})
	GetTransactionsByAddress(types.LayerID, types.LayerID, types.Address) ([]*types.MeshTransaction, error)
}

ConservativeState is an API for reading state and transaction/mempool data.

type GenesisTimeAPI

type GenesisTimeAPI interface {
	GenesisTime() time.Time
	CurrentLayer() types.LayerID
}

GenesisTimeAPI is an API to get genesis time and current layer of the system.

type LoggingAPI

type LoggingAPI interface {
	SetLogLevel(loggerName, severity string) error
}

LoggingAPI is an API to system loggers.

type MeshAPI

type MeshAPI interface {
	GetATXs(context.Context, []types.ATXID) (map[types.ATXID]*types.VerifiedActivationTx, []types.ATXID)
	GetLayer(types.LayerID) (*types.Layer, error)
	GetRewards(types.Address) ([]*types.Reward, error)
	LatestLayer() types.LayerID
	LatestLayerInState() types.LayerID
	ProcessedLayer() types.LayerID
	MeshHash(types.LayerID) (types.Hash32, error)
}

MeshAPI is an api for getting mesh status about layers/blocks/rewards.

type NetworkIdentity

type NetworkIdentity interface {
	ID() p2p.Peer
}

NetworkIdentity interface.

type PeerCounter

type PeerCounter interface {
	PeerCount() uint64
}

PeerCounter is an api to get amount of connected peers.

type PostSetupProvider

type PostSetupProvider interface {
	Status() *activation.PostSetupStatus
	ComputeProviders() []activation.PostSetupComputeProvider
	Benchmark(p activation.PostSetupComputeProvider) (int, error)
	Config() activation.PostConfig
}

type Publisher

type Publisher = pubsub.Publisher

Publisher interface for publishing messages.

type SmeshingAPI

type SmeshingAPI = activation.SmeshingProvider

SmeshingAPI is an alias to SmeshingProvider.

type Syncer

type Syncer interface {
	IsSynced(context.Context) bool
	Start(context.Context)
}

Syncer is the API to get sync status and to start sync.

Directories

Path Synopsis
Package config provides configuration for GRPC and HTTP api servers
Package config provides configuration for GRPC and HTTP api servers
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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