api

package
v0.2.10-beta.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2021 License: MIT Imports: 5 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 {
	UpdatePoETServer(context.Context, string) error
}

ActivationAPI is an API for activation module.

type GenesisTimeAPI

type GenesisTimeAPI interface {
	GetGenesisTime() time.Time
	GetCurrentLayer() 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 MempoolAPI added in v0.1.16

type MempoolAPI interface {
	Get(types.TransactionID) (*types.Transaction, error)
	GetTxsByAddress(types.Address) []*types.Transaction
	GetProjection(types.Address, uint64, uint64) (uint64, uint64)
}

MempoolAPI is an API for reading mempool data that's useful for API services.

type PeerCounter

type PeerCounter interface {
	PeerCount() uint64
}

PeerCounter is an api to get amount of connected peers.

type PostSetupAPI

type PostSetupAPI = activation.PostSetupProvider

PostSetupAPI is an alias to PostSetupProvider.

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.

type TxAPI

type TxAPI interface {
	AddressExists(types.Address) bool
	ValidateNonceAndBalance(*types.Transaction) error
	GetATXs(context.Context, []types.ATXID) (map[types.ATXID]*types.ActivationTx, []types.ATXID)
	GetLayer(types.LayerID) (*types.Layer, error)
	GetRewards(types.Address) ([]types.Reward, error)
	GetTransactions([]types.TransactionID) ([]*types.Transaction, map[types.TransactionID]struct{})
	GetMeshTransactions([]types.TransactionID) ([]*types.MeshTransaction, map[types.TransactionID]struct{})
	GetTransactionsByDestination(types.LayerID, types.Address) ([]types.TransactionID, error)
	GetTransactionsByOrigin(types.LayerID, types.Address) ([]types.TransactionID, error)
	LatestLayer() types.LayerID
	GetLayerApplied(types.TransactionID) *types.LayerID
	GetMeshTransaction(types.TransactionID) (*types.MeshTransaction, error)
	GetProjection(types.Address, uint64, uint64) (uint64, uint64, error)
	LatestLayerInState() types.LayerID
	ProcessedLayer() types.LayerID
	GetStateRoot() types.Hash32
	GetLayerStateRoot(types.LayerID) (types.Hash32, error)
	GetBalance(types.Address) uint64
	GetNonce(types.Address) uint64
	GetAllAccounts() (*types.MultipleAccountsState, error)
	GetRewardsBySmesherID(types.NodeID) ([]types.Reward, error)
}

TxAPI is an api for getting transaction status.

Directories

Path Synopsis
Package config provides configuration for GRPC and HTTP api servers
Package config provides configuration for GRPC and HTTP api servers

Jump to

Keyboard shortcuts

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