Versions in this module Expand all Collapse all v0 v0.0.1 Nov 7, 2024 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 ErrNilStatusMetrics = errors.New("nil status metrics handler") + var ErrNilTransactionSimulatorProcessor = errors.New("nil transaction simulator processor") + var ErrNoApiRoutesConfig = errors.New("no configuration found for API routes") + var ErrTooManyAddressesInBulk = errors.New("too many addresses in the bulk request") + 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, common.BlockInfo, error) + GetAlteredAccountsForBlock func(options api.GetAlteredAccountsForBlockOptions) ([]*alteredAccount.AlteredAccount, 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) + GetEligibleManagedKeys func() ([]string, 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) + GetInternalStartOfEpochValidatorsInfo func(epoch uint32) ([]*state.ShardValidatorInfo, error) + GetLastPoolNonceForSender func(sender string) (uint64, error) + GetLoadedKeys func() []string + GetManagedKeys func() []string + GetManagedKeysCount func() int + 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, senderAccountNonce uint64) (*common.TransactionsPoolNonceGapsForSenderApiResponse, error) + GetWaitingEpochsLeftForPublicKey func(publicKey string) (uint32, error) + GetWaitingManagedKeys func() ([]string, error) + IsInterfaceNil func() bool + SimulateTransactionExecution func(tx *transaction.Transaction) (*txSimData.SimulationResultsWithVMOutput, error) + 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 + WsAntifloodConfig config.WebServerAntifloodConfig + type HardforkTrigger interface + IsInterfaceNil func() bool + IsSelfTrigger func() bool + Trigger func(epoch uint32, withEarlyEndOfEpoch bool) error + type NodeHandler interface + AuctionListApi func() ([]*common.AuctionListValidatorAPIResponse, error) + CreateTransaction func(txArgs *external.ArgsCreateTransaction) (*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) + GetAccountWithKeys func(address string, options api.AccountQueryOptions, ctx context.Context) (api.AccountResponse, api.BlockInfo, error) + GetAllDCDTTokens func(address string, options api.AccountQueryOptions, ctx context.Context) (map[string]*dcdt.DCDigitalToken, api.BlockInfo, error) + GetAllIssuedDCDTs 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) + GetCodeHash func(address string, options api.AccountQueryOptions) ([]byte, api.BlockInfo, error) + GetConnectedPeersRatingsOnMainNetwork func() (string, error) + GetDCDTData func(address, tokenID string, nonce uint64, options api.AccountQueryOptions) (*dcdt.DCDigitalToken, api.BlockInfo, error) + GetDCDTsRoles func(address string, options api.AccountQueryOptions, ctx context.Context) (map[string][]string, api.BlockInfo, error) + GetDCDTsWithRole func(address string, role string, options api.AccountQueryOptions, ...) ([]string, api.BlockInfo, error) + GetEpochStartDataAPI func(epoch uint32) (*common.EpochStartDataAPI, error) + GetGuardianData func(address string, options api.AccountQueryOptions) (api.GuardianData, api.BlockInfo, 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.DCDTSupply, 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) + IsDataTrieMigrated func(address string, options api.AccountQueryOptions) (bool, 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]*validator.ValidatorStatistics, error) + VerifyProof func(rootHash string, address string, proof [][]byte) (bool, error) + type TransactionSimulatorProcessor interface + IsInterfaceNil func() bool + ProcessTx func(tx *transaction.Transaction, currentHeader coreData.HeaderHandler) (*txSimData.SimulationResultsWithVMOutput, error)