core

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2024 License: GPL-3.0 Imports: 7 Imported by: 16

Documentation

Index

Constants

View Source
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"
)
View Source
const AddressBytesLen = 32

AddressBytesLen represents the number of bytes of an address

View Source
const MinAllowedDeltaToFinal = 1

MinAllowedDeltaToFinal is the minimum value between nonces allowed when checking finality on a shard

View Source
const WebServerOffString = "off"

WebServerOffString represents the constant used to switch off the web server

Variables

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 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"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL