Versions in this module Expand all Collapse all v1 v1.999.0 Nov 17, 2022 Changes in this version + const DefaultRestInterface + const DefaultRestPortOff + var ErrEmptyGasConfigs = errors.New("empty gas configs") + var ErrEmptyRootHash = errors.New("empty current root hash") + var ErrHeartbeatsNotActive = errors.New("heartbeat system not active") + var ErrInvalidValue = errors.New("invalid value") + var ErrNilAccountState = errors.New("nil account state") + var ErrNilApiResolver = errors.New("nil api resolver") + var ErrNilBlockchain = errors.New("nil blockchain") + var ErrNilGenesisBalances = errors.New("nil genesis balances slice") + var ErrNilGenesisNodes = errors.New("nil genesis nodes") + var ErrNilNode = errors.New("nil node") + var ErrNilPeerState = errors.New("nil peer state") + var ErrNilTransactionSimulatorProcessor = errors.New("nil transaction simulator processor") + var ErrNoApiRoutesConfig = errors.New("no configuration found for API routes") + func NewNodeFacade(arg ArgNodeFacade) (*nodeFacade, error) + type ApiResolver interface + Close func() error + ComputeTransactionGasLimit func(tx *transaction.Transaction) (*transaction.CostResponse, error) + ExecuteSCQuery func(query *process.SCQuery) (*vmcommon.VMOutput, error) + GetBlockByHash func(hash string, options api.BlockQueryOptions) (*api.Block, error) + GetBlockByNonce func(nonce uint64, options api.BlockQueryOptions) (*api.Block, error) + GetBlockByRound func(round uint64, options api.BlockQueryOptions) (*api.Block, error) + GetDelegatorsList func(ctx context.Context) ([]*api.Delegator, error) + GetDirectStakedList func(ctx context.Context) ([]*api.DirectStakedValue, error) + GetGasConfigs func() map[string]map[string]uint64 + GetGenesisBalances func() ([]*common.InitialAccountAPI, error) + GetGenesisNodesPubKeys func() (map[uint32][]string, map[uint32][]string) + GetInternalMetaBlockByHash func(format common.ApiOutputFormat, hash string) (interface{}, error) + GetInternalMetaBlockByNonce func(format common.ApiOutputFormat, nonce uint64) (interface{}, error) + GetInternalMetaBlockByRound func(format common.ApiOutputFormat, round uint64) (interface{}, error) + GetInternalMiniBlock func(format common.ApiOutputFormat, txHash string, epoch uint32) (interface{}, error) + GetInternalShardBlockByHash func(format common.ApiOutputFormat, hash string) (interface{}, error) + GetInternalShardBlockByNonce func(format common.ApiOutputFormat, nonce uint64) (interface{}, error) + GetInternalShardBlockByRound func(format common.ApiOutputFormat, round uint64) (interface{}, error) + GetInternalStartOfEpochMetaBlock func(format common.ApiOutputFormat, epoch uint32) (interface{}, error) + GetLastPoolNonceForSender func(sender string) (uint64, error) + GetTotalStakedValue func(ctx context.Context) (*api.StakeValues, error) + GetTransaction func(hash string, withResults bool) (*transaction.ApiTransactionResult, error) + GetTransactionsPool func(fields string) (*common.TransactionsPoolAPIResponse, error) + GetTransactionsPoolForSender func(sender, fields string) (*common.TransactionsPoolForSenderApiResponse, error) + GetTransactionsPoolNonceGapsForSender func(sender string) (*common.TransactionsPoolNonceGapsForSenderApiResponse, error) + IsInterfaceNil func() bool + StatusMetrics func() external.StatusMetricsHandler + type ArgNodeFacade struct + AccountsState state.AccountsAdapter + ApiResolver ApiResolver + ApiRoutesConfig config.ApiRoutesConfig + Blockchain chainData.ChainHandler + FacadeConfig config.FacadeConfig + Node NodeHandler + PeerState state.AccountsAdapter + RestAPIServerDebugMode bool + TxSimulatorProcessor TransactionSimulatorProcessor + WsAntifloodConfig config.WebServerAntifloodConfig + type HardforkTrigger interface + IsInterfaceNil func() bool + IsSelfTrigger func() bool + Trigger func(epoch uint32, withEarlyEndOfEpoch bool) error + type NodeHandler interface + CreateTransaction func(nonce uint64, value string, receiver string, receiverUsername []byte, ...) (*transaction.Transaction, []byte, error) + DecodeAddressPubkey func(pk string) ([]byte, error) + DirectTrigger func(epoch uint32, withEarlyEndOfEpoch bool) error + EncodeAddressPubkey func(pk []byte) (string, error) + GetAccount func(address string, options api.AccountQueryOptions) (api.AccountResponse, api.BlockInfo, error) + GetAllESDTTokens func(address string, options api.AccountQueryOptions, ctx context.Context) (map[string]*esdt.ESDigitalToken, api.BlockInfo, error) + GetAllIssuedESDTs func(tokenType string, ctx context.Context) ([]string, error) + GetBalance func(address string, options api.AccountQueryOptions) (*big.Int, api.BlockInfo, error) + GetCode func(codeHash []byte, options api.AccountQueryOptions) ([]byte, api.BlockInfo) + GetESDTData func(address, tokenID string, nonce uint64, options api.AccountQueryOptions) (*esdt.ESDigitalToken, api.BlockInfo, error) + GetESDTsRoles func(address string, options api.AccountQueryOptions, ctx context.Context) (map[string][]string, api.BlockInfo, error) + GetESDTsWithRole func(address string, role string, options api.AccountQueryOptions, ...) ([]string, api.BlockInfo, error) + GetEpochStartDataAPI func(epoch uint32) (*common.EpochStartDataAPI, error) + GetHeartbeats func() []data.PubKeyHeartbeat + GetKeyValuePairs func(address string, options api.AccountQueryOptions, ctx context.Context) (map[string]string, api.BlockInfo, error) + GetNFTTokenIDsRegisteredByAddress func(address string, options api.AccountQueryOptions, ctx context.Context) ([]string, api.BlockInfo, error) + GetPeerInfo func(pid string) ([]core.QueryP2PPeerInfo, error) + GetProof func(rootHash string, key string) (*common.GetProofResponse, error) + GetProofDataTrie func(rootHash string, address string, key string) (*common.GetProofResponse, *common.GetProofResponse, error) + GetQueryHandler func(name string) (debug.QueryHandler, error) + GetTokenSupply func(token string) (*api.ESDTSupply, error) + GetUsername func(address string, options api.AccountQueryOptions) (string, api.BlockInfo, error) + GetValueForKey func(address string, key string, options api.AccountQueryOptions) (string, api.BlockInfo, error) + IsInterfaceNil func() bool + IsSelfTrigger func() bool + SendBulkTransactions func(txs []*transaction.Transaction) (uint64, error) + ValidateTransaction func(tx *transaction.Transaction) error + ValidateTransactionForSimulation func(tx *transaction.Transaction, checkSignature bool) error + ValidatorStatisticsApi func() (map[string]*state.ValidatorApiResponse, error) + VerifyProof func(rootHash string, address string, proof [][]byte) (bool, error) + type TransactionSimulatorProcessor interface + IsInterfaceNil func() bool + ProcessTx func(tx *transaction.Transaction) (*txSimData.SimulationResults, error)