external

package
v1.6.5 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNilAPIBlockHandler = errors.New("nil api block handler")

ErrNilAPIBlockHandler signals that a nil api block handler has been provided

View Source
var ErrNilAPIInternalBlockHandler = errors.New("nil api internal block handler")

ErrNilAPIInternalBlockHandler signals that a nil api internal block handler has been provided

View Source
var ErrNilAPITransactionEvaluator = errors.New("nil api transaction evaluator")

ErrNilAPITransactionEvaluator signals that a nil api transaction evaluator was provided

View Source
var ErrNilAPITransactionHandler = errors.New("nil api transaction handler")

ErrNilAPITransactionHandler signals that a nil api transaction handler has been provided

View Source
var ErrNilAccountsParser = errors.New("nil accounts parser")

ErrNilAccountsParser signals that a nil accounts parser has been provided

View Source
var ErrNilDelegatedListHandler = errors.New("nil delegated list handler")

ErrNilDelegatedListHandler signals that a nil delegated list handler has been provided

View Source
var ErrNilDirectStakeListHandler = errors.New("nil direct stake list handler")

ErrNilDirectStakeListHandler signals that a nil stake list handler has been provided

View Source
var ErrNilGasScheduler = errors.New("nil gas scheduler")

ErrNilGasScheduler signals that a nil gas scheduler has been provided

View Source
var ErrNilGenesisNodesSetupHandler = errors.New("nil genesis nodes setup handler")

ErrNilGenesisNodesSetupHandler signals that a nil genesis nodes setup handler has been provided

View Source
var ErrNilManagedPeersMonitor = errors.New("nil managed peers monitor")

ErrNilManagedPeersMonitor signals that a nil managed peers monitor has been provided

View Source
var ErrNilSCQueryService = errors.New("nil SC query service")

ErrNilSCQueryService signals that a nil SC query service has been provided

View Source
var ErrNilStatusMetrics = errors.New("nil status metrics handler")

ErrNilStatusMetrics signals that a nil status metrics was provided

View Source
var ErrNilTotalStakedValueHandler = errors.New("nil total staked value handler")

ErrNilTotalStakedValueHandler signals that a nil total staked value handler has been provided

View Source
var ErrNilValidatorPubKeyConverter = errors.New("nil validator public key converter")

ErrNilValidatorPubKeyConverter signals that a nil validator pubkey converter has been provided

Functions

func NewNodeApiResolver

func NewNodeApiResolver(arg ArgNodeApiResolver) (*nodeApiResolver, error)

NewNodeApiResolver creates a new nodeApiResolver instance

Types

type APITransactionHandler

type APITransactionHandler interface {
	GetTransaction(txHash string, withResults bool) (*transaction.ApiTransactionResult, error)
	GetTransactionsPool(fields string) (*common.TransactionsPoolAPIResponse, error)
	GetTransactionsPoolForSender(sender, fields string) (*common.TransactionsPoolForSenderApiResponse, error)
	GetLastPoolNonceForSender(sender string) (uint64, error)
	GetTransactionsPoolNonceGapsForSender(sender string, senderAccountNonce uint64) (*common.TransactionsPoolNonceGapsForSenderApiResponse, error)
	UnmarshalTransaction(txBytes []byte, txType transaction.TxType) (*transaction.ApiTransactionResult, error)
	PopulateComputedFields(tx *transaction.ApiTransactionResult)
	UnmarshalReceipt(receiptBytes []byte) (*transaction.ApiReceipt, error)
	IsInterfaceNil() bool
}

APITransactionHandler defines what an API transaction handler should be able to do

type ArgNodeApiResolver

type ArgNodeApiResolver struct {
	SCQueryService           SCQueryService
	StatusMetricsHandler     StatusMetricsHandler
	APITransactionEvaluator  TransactionEvaluator
	TotalStakedValueHandler  TotalStakedValueHandler
	DirectStakedListHandler  DirectStakedListHandler
	DelegatedListHandler     DelegatedListHandler
	APITransactionHandler    APITransactionHandler
	APIBlockHandler          blockAPI.APIBlockHandler
	APIInternalBlockHandler  blockAPI.APIInternalBlockHandler
	GenesisNodesSetupHandler sharding.GenesisNodesSetupHandler
	ValidatorPubKeyConverter core.PubkeyConverter
	AccountsParser           genesis.AccountsParser
	GasScheduleNotifier      common.GasScheduleNotifierAPI
	ManagedPeersMonitor      common.ManagedPeersMonitor
}

ArgNodeApiResolver represents the DTO structure used in the NewNodeApiResolver constructor

type ArgsCreateTransaction added in v1.5.0

type ArgsCreateTransaction struct {
	Nonce            uint64
	Value            string
	Receiver         string
	ReceiverUsername []byte
	Sender           string
	SenderUsername   []byte
	GasPrice         uint64
	GasLimit         uint64
	DataField        []byte
	SignatureHex     string
	ChainID          string
	Version          uint32
	Options          uint32
	Guardian         string
	GuardianSigHex   string
}

ArgsCreateTransaction defines arguments for creating a transaction

type DelegatedListHandler

type DelegatedListHandler interface {
	GetDelegatorsList(ctx context.Context) ([]*api.Delegator, error)
	IsInterfaceNil() bool
}

DelegatedListHandler defines the behavior of a component able to return the complete delegated list

type DirectStakedListHandler

type DirectStakedListHandler interface {
	GetDirectStakedList(ctx context.Context) ([]*api.DirectStakedValue, error)
	IsInterfaceNil() bool
}

DirectStakedListHandler defines the behavior of a component able to return the direct stake list

type SCQueryService

type SCQueryService interface {
	ExecuteQuery(query *process.SCQuery) (*vmcommon.VMOutput, common.BlockInfo, error)
	ComputeScCallGasLimit(tx *transaction.Transaction) (uint64, error)
	Close() error
	IsInterfaceNil() bool
}

SCQueryService defines how data should be get from a SC account

type StatusMetricsHandler

type StatusMetricsHandler interface {
	StatusMetricsMapWithoutP2P() (map[string]interface{}, error)
	StatusP2pMetricsMap() (map[string]interface{}, error)
	StatusMetricsWithoutP2PPrometheusString() (string, error)
	EconomicsMetrics() (map[string]interface{}, error)
	ConfigMetrics() (map[string]interface{}, error)
	EnableEpochsMetrics() (map[string]interface{}, error)
	NetworkMetrics() (map[string]interface{}, error)
	RatingsMetrics() (map[string]interface{}, error)
	BootstrapMetrics() (map[string]interface{}, error)
	IsInterfaceNil() bool
}

StatusMetricsHandler is the interface that defines what a node details handler/provider should do

type TotalStakedValueHandler

type TotalStakedValueHandler interface {
	GetTotalStakedValue(ctx context.Context) (*api.StakeValues, error)
	IsInterfaceNil() bool
}

TotalStakedValueHandler defines the behavior of a component able to return total staked value

type TransactionEvaluator added in v1.6.0

type TransactionEvaluator interface {
	SimulateTransactionExecution(tx *transaction.Transaction) (*txSimData.SimulationResultsWithVMOutput, error)
	ComputeTransactionGasLimit(tx *transaction.Transaction) (*transaction.CostResponse, error)
	IsInterfaceNil() bool
}

TransactionEvaluator defines the actions which should be handler by a transaction evaluator

Directories

Path Synopsis
fee

Jump to

Keyboard shortcuts

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