Versions in this module Expand all Collapse all v1 v1.999.0 Nov 17, 2022 Changes in this version + func RespondWith(c *gin.Context, status int, dataField interface{}, errMessage string, ...) + func RespondWithInternalError(c *gin.Context, err error, innerErr error) + func RespondWithSuccess(c *gin.Context, data interface{}) + func RespondWithValidationError(c *gin.Context, err error, innerErr error) + type AdditionalMiddleware struct + Middleware gin.HandlerFunc + Position MiddlewarePosition + type ApiFacadeHandler interface + IsInterfaceNil func() bool + PprofEnabled func() bool + RestAPIServerDebugMode func() bool + RestApiInterface func() string + type EndpointHandlerData struct + AdditionalMiddlewares []AdditionalMiddleware + Handler gin.HandlerFunc + Method string + Path string + type FacadeHandler interface + ComputeTransactionGasLimit func(tx *transaction.Transaction) (*transaction.CostResponse, error) + CreateTransaction func(nonce uint64, value string, receiver string, receiverUsername []byte, ...) (*transaction.Transaction, []byte, error) + DecodeAddressPubkey func(pk string) ([]byte, error) + EncodeAddressPubkey func(pk []byte) (string, error) + ExecuteSCQuery func(*process.SCQuery) (*vm.VMOutputApi, error) + GetAccount func(address string, options api.AccountQueryOptions) (api.AccountResponse, api.BlockInfo, error) + GetAllESDTTokens func(address string, options api.AccountQueryOptions) (map[string]*esdt.ESDigitalToken, api.BlockInfo, error) + GetAllIssuedESDTs func(tokenType string) ([]string, error) + GetBalance func(address string, options api.AccountQueryOptions) (*big.Int, api.BlockInfo, 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() ([]*api.Delegator, error) + GetDirectStakedList func() ([]*api.DirectStakedValue, error) + GetESDTData func(address string, key string, nonce uint64, options api.AccountQueryOptions) (*esdt.ESDigitalToken, api.BlockInfo, error) + GetESDTsRoles func(address string, options api.AccountQueryOptions) (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) + GetGasConfigs func() (map[string]map[string]uint64, error) + GetGenesisBalances func() ([]*common.InitialAccountAPI, error) + GetGenesisNodesPubKeys func() (map[uint32][]string, map[uint32][]string, error) + GetHeartbeats func() ([]data.PubKeyHeartbeat, error) + 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) + GetInternalMiniBlockByHash func(format common.ApiOutputFormat, hash 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) + GetKeyValuePairs func(address string, options api.AccountQueryOptions) (map[string]string, api.BlockInfo, error) + GetLastPoolNonceForSender func(sender string) (uint64, error) + GetNFTTokenIDsRegisteredByAddress func(address string, options api.AccountQueryOptions) ([]string, api.BlockInfo, error) + GetPeerInfo func(pid string) ([]core.QueryP2PPeerInfo, error) + GetProof func(rootHash string, address string) (*common.GetProofResponse, error) + GetProofCurrentRootHash func(address string) (*common.GetProofResponse, error) + GetProofDataTrie func(rootHash string, address string, key string) (*common.GetProofResponse, *common.GetProofResponse, error) + GetQueryHandler func(name string) (debug.QueryHandler, error) + GetThrottlerForEndpoint func(endpoint string) (core.Throttler, bool) + GetTokenSupply func(token string) (*api.ESDTSupply, error) + GetTotalStakedValue func() (*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) + 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 + PprofEnabled func() bool + RestAPIServerDebugMode func() bool + RestApiInterface func() string + SendBulkTransactions func([]*transaction.Transaction) (uint64, error) + SimulateTransactionExecution func(tx *transaction.Transaction) (*txSimData.SimulationResults, error) + StatusMetrics func() external.StatusMetricsHandler + Trigger func(epoch uint32, withEarlyEndOfEpoch bool) 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 GenericAPIResponse struct + Code ReturnCode + Data interface{} + Error string + type GroupHandler interface + IsInterfaceNil func() bool + RegisterRoutes func(ws *gin.RouterGroup, apiConfig config.ApiRoutesConfig) + UpdateFacade func(newFacade interface{}) error + type HttpServerCloser interface + Close func() error + IsInterfaceNil func() bool + Start func() + type MiddlewarePosition bool + const After + const Before + type MiddlewareProcessor interface + IsInterfaceNil func() bool + MiddlewareHandlerFunc func() gin.HandlerFunc + type ReturnCode string + const ReturnCodeInternalError + const ReturnCodeRequestError + const ReturnCodeSuccess + const ReturnCodeSystemBusy + type UpgradeableHttpServerHandler interface + Close func() error + IsInterfaceNil func() bool + StartHttpServer func() error + UpdateFacade func(facade FacadeHandler) error