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 Pretty() string 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 FilterQuery ¶ added in v1.4.2
type FilterQuery struct { BlockHash []byte // return logs only from block with this hash FromBlock core.OptionalUint64 // beginning of the queried range, no value set means genesis block ToBlock core.OptionalUint64 // end of the range, no value set means latest block Addresses []string // restricts matches to events created by specific contracts ShardID core.OptionalUint32 // identifies the shard to query // The Topic list restricts matches to particular event topics. Each event has a list // of topics. Topics matches a prefix of that list. An empty element slice matches any // topic. Non-empty elements represent an alternative that matches any of the // contained topics. // // Events are only returned if they match all topics. The order of the topics is not important. Topics [][]byte // Topics is a slice of arrays of 32 bytes each }
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" )