Documentation ¶
Index ¶
Constants ¶
const ( // UrlParameterOnFinalBlock represents the name of a URL parameter UrlParameterOnFinalBlock = "onFinalBlock" // UrlParameterOnStartOfEpoch represents the name of a URL parameter UrlParameterOnStartOfEpoch = "onStartOfEpoch" // UrlParameterBlockNonce represents the name of a URL parameter UrlParameterBlockNonce = "blockNonce" // UrlParameterBlockHash represents the name of an URL parameter UrlParameterBlockHash = "blockHash" // UrlParameterBlockRootHash represents the name of an URL parameter UrlParameterBlockRootHash = "blockRootHash" // UrlParameterHintEpoch represents the name of an URL parameter UrlParameterHintEpoch = "hintEpoch" )
const AddressBytesLen = 32
AddressBytesLen represents the number of bytes of an address
const MinAllowedDeltaToFinal = 1
MinAllowedDeltaToFinal is the minimum value between nonces allowed when checking finality on a shard
const WebServerOffString = "off"
WebServerOffString represents the constant used to switch off the web server
Variables ¶
var AddressPublicKeyConverter, _ = pubkeyConverter.NewBech32PubkeyConverter(AddressBytesLen, core.DefaultAddressPrefix)
AddressPublicKeyConverter represents the default address public key converter
Functions ¶
func BuildUrlWithAccountQueryOptions ¶ added in v1.3.5
func BuildUrlWithAccountQueryOptions(path string, options api.AccountQueryOptions) string
BuildUrlWithAccountQueryOptions builds an URL with block query parameters TODO: move this to mx-chain-core-go & remove also from mx-chain-proxy-go common/options.go
Types ¶
type AddressHandler ¶
type AddressHandler interface { AddressAsBech32String() (string, error) AddressBytes() []byte AddressSlice() [32]byte IsValid() bool IsInterfaceNil() bool }
AddressHandler will handle different implementations of an address
type CryptoComponentsHolder ¶
type CryptoComponentsHolder interface { GetPublicKey() crypto.PublicKey GetPrivateKey() crypto.PrivateKey GetBech32() string GetAddressHandler() AddressHandler IsInterfaceNil() bool }
CryptoComponentsHolder is able to holder and provide all the crypto components
type RestAPIEntityType ¶
type RestAPIEntityType string
RestAPIEntityType defines the entity that can resolve REST API requests
const ( // ObserverNode the entity queried is an observer ObserverNode RestAPIEntityType = "observer" // Proxy the entity queried is a proxy Proxy RestAPIEntityType = "proxy" )