Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrEpochSubscriberHandlerWrongTypeAssertion = errors.New("epoch subscriber handler - wrong type assertion")
ErrEpochSubscriberHandlerWrongTypeAssertion signals that a type conversion to an epoch subscriber handler type failed
var ErrNilAPIBlockHandler = errors.New("nil api block handler")
ErrNilAPIBlockHandler signals that a nil api block handler has been provided
var ErrNilAPIInternalBlockHandler = errors.New("nil api internal block handler")
ErrNilAPIInternalBlockHandler signals that a nil api internal block handler has been provided
var ErrNilAPITransactionHandler = errors.New("nil api transaction handler")
ErrNilAPITransactionHandler signals that a nil api transaction handler has been provided
var ErrNilAccountsParser = errors.New("nil accounts parser")
ErrNilAccountsParser signals that a nil accounts parser has been provided
var ErrNilDelegatedListHandler = errors.New("nil delegated list handler")
ErrNilDelegatedListHandler signals that a nil delegated list handler has been provided
var ErrNilDirectStakeListHandler = errors.New("nil direct stake list handler")
ErrNilDirectStakeListHandler signals that a nil stake list handler has been provided
var ErrNilGasScheduler = errors.New("nil gas scheduler")
ErrNilGasScheduler signals that a nil gas scheduler has been provided
var ErrNilGenesisNodesSetupHandler = errors.New("nil genesis nodes setup handler")
ErrNilGenesisNodesSetupHandler signals that a nil genesis nodes setup handler has been provided
var ErrNilSCQueryService = errors.New("nil SC query service")
ErrNilSCQueryService signals that a nil SC query service has been provided
var ErrNilStatusMetrics = errors.New("nil status metrics handler")
ErrNilStatusMetrics signals that a nil status metrics was provided
var ErrNilTotalStakedValueHandler = errors.New("nil total staked value handler")
ErrNilTotalStakedValueHandler signals that a nil total staked value handler has been provided
var ErrNilTransactionCostHandler = errors.New("nil transaction cost handler")
ErrNilTransactionCostHandler signals that a nil transaction cost handler was provided
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 TxCostHandler TransactionCostHandler 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 }
ArgNodeApiResolver represents the DTO structure used in the NewNodeApiResolver constructor
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, 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 TransactionCostHandler ¶
type TransactionCostHandler interface { ComputeTransactionGasLimit(tx *transaction.Transaction) (*transaction.CostResponse, error) IsInterfaceNil() bool }
TransactionCostHandler defines the actions which should be handler by a transaction cost estimator