external

package
v1.5.14 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEpochSubscriberHandlerWrongTypeAssertion = errors.New("epoch subscriber handler - wrong type assertion")

ErrEpochSubscriberHandlerWrongTypeAssertion signals that a type conversion to an epoch subscriber handler type failed

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 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 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 ErrNilTransactionCostHandler = errors.New("nil transaction cost handler")

ErrNilTransactionCostHandler signals that a nil transaction cost handler was 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
	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 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, 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

Directories

Path Synopsis
fee

Jump to

Keyboard shortcuts

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