Versions in this module Expand all Collapse all v0 v0.0.2 Nov 6, 2024 v0.0.1 Nov 5, 2024 Changes in this version + const AllShardId + const AutoBalanceEnabledString + const BaseOperationCostString + const BuiltInCostString + const BuiltInFunctionChangeOwnerAddress + const BuiltInFunctionClaimDeveloperRewards + const BuiltInFunctionDCDTBurn + const BuiltInFunctionDCDTFreeze + const BuiltInFunctionDCDTLocalBurn + const BuiltInFunctionDCDTLocalMint + const BuiltInFunctionDCDTNFTAddQuantity + const BuiltInFunctionDCDTNFTAddURI + const BuiltInFunctionDCDTNFTBurn + const BuiltInFunctionDCDTNFTCreate + const BuiltInFunctionDCDTNFTCreateRoleTransfer + const BuiltInFunctionDCDTNFTTransfer + const BuiltInFunctionDCDTNFTUpdateAttributes + const BuiltInFunctionDCDTPause + const BuiltInFunctionDCDTSetLimitedTransfer + const BuiltInFunctionDCDTTransfer + const BuiltInFunctionDCDTUnFreeze + const BuiltInFunctionDCDTUnPause + const BuiltInFunctionDCDTUnSetLimitedTransfer + const BuiltInFunctionDCDTWipe + const BuiltInFunctionGuardAccount + const BuiltInFunctionMigrateDataTrie + const BuiltInFunctionMultiDCDTNFTTransfer + const BuiltInFunctionSaveKeyValue + const BuiltInFunctionSetDCDTRole + const BuiltInFunctionSetGuardian + const BuiltInFunctionSetUserName + const BuiltInFunctionUnGuardAccount + const BuiltInFunctionUnSetDCDTRole + const CompletedTxEventIdentifier + const DCDTKeyIdentifier + const DCDTNFTLatestNonceIdentifier + const DCDTRoleIdentifier + const DCDTRoleLocalBurn + const DCDTRoleLocalMint + const DCDTRoleNFTAddQuantity + const DCDTRoleNFTAddURI + const DCDTRoleNFTBurn + const DCDTRoleNFTCreate + const DCDTRoleNFTCreateMultiShard + const DCDTRoleNFTUpdateAttributes + const DCDTRoleTransfer + const DefaultAddressPrefix + const DelegationSystemSCKey + const FileModeReadWrite + const FileModeUserReadWrite + const FungibleDCDT + const GasRefundForRelayerMessage + const GetNodeFromDBErrorString + const GuardiansKeyIdentifier + const InitialVersionOfTransaction + const InternalVMErrorsOperation + const MaxBufferSizeToSendTrieNodes + const MaxLeafSize + const MaxLenForDCDTIssueMint + const MaxMachineIDLen + const MaxNumShards + const MaxRoyalty + const MaxUserNameLength + const MeasurementsLoggerFormat + const MegabyteSize + const MetachainShardId + const MinLenArgumentsDCDTNFTTransfer + const MinLenArgumentsDCDTTransfer + const MinMetaTxExtraGasCost + const NonFungibleDCDT + const NotSpecifiedString + const NumInitCharactersForScAddress + const ProtectedKeyPrefix + const RelayedTransaction + const RelayedTransactionV2 + const SCDeployIdentifier + const SCDeployInitFunctionName + const SCUpgradeIdentifier + const SemiFungibleDCDT + const ShardIdentiferLen + const SignalErrorOperation + const TopicRequestSuffix + const VMTypeLen + const WriteLogIdentifier + var DCDTSCAddress = []byte + var ErrAdditionOverflow = errors.New("uint64 addition overflowed") + var ErrContextClosing = errors.New("context closing") + var ErrDBIsClosed = errors.New("DB is closed") + var ErrEmptyFile = errors.New("empty file provided") + var ErrFileLoggingProcessIsClosed = errors.New("file logging process is closed") + var ErrInvalidEnableEpochsHandler = errors.New("invalid enable epochs handler") + var ErrInvalidGasScheduleConfig = errors.New("invalid gas schedule config") + var ErrInvalidIdentifierForEpochStartBlockRequest = errors.New("invalid identifier for epoch start block request") + var ErrInvalidIndex = errors.New("invalid private key index") + var ErrInvalidLogFileMinLifeSpan = errors.New("minimum log file life span is invalid") + var ErrInvalidPollingInterval = errors.New("invalid polling interval ") + var ErrInvalidTransactionVersion = errors.New("invalid transaction version") + var ErrInvalidValue = errors.New("invalid value provided") + var ErrMajorVersionMismatch = errors.New("major version mismatch") + var ErrMinorVersionMismatch = errors.New("minor version mismatch") + var ErrNilAppStatusHandler = errors.New("appStatusHandler is nil") + var ErrNilEnableEpochsHandler = errors.New("nil enable epochs handler") + var ErrNilEpochStartNotifier = errors.New("nil epoch start notifier") + var ErrNilFile = errors.New("nil file provided") + var ErrNilGoRoutineProcessor = errors.New("nil go routine processor") + var ErrNilHasher = errors.New("nil hasher provided") + var ErrNilInputData = errors.New("nil input data") + var ErrNilLogger = errors.New("nil logger") + var ErrNilMarshalizer = errors.New("nil marshalizer provided") + var ErrNilNodesCoordinator = errors.New("nil nodes coordinator") + var ErrNilPemBLock = errors.New("nil pem block") + var ErrNilPubkeyConverter = errors.New("nil pubkey converter") + var ErrNilShardCoordinator = errors.New("nil shard coordinator") + var ErrNilSignalChan = errors.New("nil signal channel") + var ErrNilStatusTagProvider = errors.New("nil status tag provider") + var ErrNilStore = errors.New("nil data storage service") + var ErrNilTransactionFeeCalculator = errors.New("nil transaction fee calculator") + var ErrNilUrl = errors.New("url is empty") + var ErrNotPositiveValue = errors.New("the provided value is not positive") + var ErrPemFileIsInvalid = errors.New("pem file is invalid") + var ErrReleaseVersionMismatch = errors.New("release version mismatch") + var ErrSubtractionOverflow = errors.New("uint64 subtraction overflowed") + var ErrSuffixNotPresentOrInIncorrectPosition = errors.New("suffix is not present or the position is incorrect") + var ErrVersionNumComponents = errors.New("invalid version while checking number of components") + var SystemAccountAddress = bytes.Repeat([]byte{ ... }, 32) + func AbsDuration(duration time.Duration) time.Duration + func CalculateHash(marshalizer marshal.Marshalizer, hasher hashing.Hasher, object interface{}) ([]byte, error) + func CheckHandlerCompatibility(handler EnableEpochsHandler, requiredFlags []EnableEpochFlag) error + func CommunicationIdentifierBetweenShards(shardId1 uint32, shardId2 uint32) string + func ConvertBytes(bytes uint64) string + func ConvertShardIDToUint32(shardIDStr string) (uint32, error) + func ConvertToEvenHex(value int) string + func ConvertToEvenHexBigInt(value *big.Int) string + func CreateFile(arg ArgCreateFileArgument) (*os.File, error) + func DumpGoRoutinesToLog(goRoutinesNumberStart int, log Logger) + func EmptyChannel(ch chan bool) int + func EpochStartIdentifier(epoch uint32) string + func FileExists(path string) bool + func GetAnonymizedMachineID(appID string) string + func GetApproximatePercentageOfValue(value *big.Int, percentage float64) *big.Int + func GetIntTrimmedPercentageOfValue(value *big.Int, percentage float64) *big.Int + func GetPBFTFallbackThreshold(consensusSize int) int + func GetPBFTThreshold(consensusSize int) int + func GetRunningGoRoutines(log Logger) *bytes.Buffer + func GetShardIDString(shardID uint32) string + func GetTrimmedPk(pk string) string + func IsClosingError(err error) bool + func IsEmptyAddress(address []byte) bool + func IsGetNodeFromDBError(err error) bool + func IsInRangeInclusive(value, min, max *big.Int) bool + func IsInRangeInclusiveFloat64(value, min, max float64) bool + func IsMetachainIdentifier(identifier []byte) bool + func IsSmartContractAddress(rcvAddress []byte) bool + func IsSmartContractOnMetachain(identifier []byte, rcvAddress []byte) bool + func IsSystemAccountAddress(address []byte) bool + func IsUnknownEpochIdentifier(identifier []byte) (bool, error) + func IsValidDCDTRole(role string) bool + func LoadAllKeysFromPemFile(relativePath string) ([][]byte, []string, error) + func LoadJsonFile(dest interface{}, relativePath string) error + func LoadSkPkFromPemFile(relativePath string, skIndex int) ([]byte, string, error) + func LoadTomlFile(dest interface{}, relativePath string) error + func LoadTomlFileToMap(relativePath string) (map[string]interface{}, error) + func MaxFloat64(a float64, b float64) float64 + func MaxInt(a int, b int) int + func MaxInt32(a int32, b int32) int32 + func MaxInt64(a int64, b int64) int64 + func MaxUint32(a uint32, b uint32) uint32 + func MaxUint64(a uint64, b uint64) uint64 + func MinInt(a int, b int) int + func MinInt32(a int32, b int32) int32 + func MinInt64(a int64, b int64) int64 + func MinUint32(a uint32, b uint32) uint32 + func MinUint64(a uint64, b uint64) uint64 + func NewGetNodeFromDBErrWithKey(key []byte, err error, id string) *getNodeFromDBErrWithKey + func NewKeyLoader() *keyLoader + func NewTrieNodeVersionVerifier(enableEpochsHandler EnableEpochsHandler) (*trieNodeVersionVerifier, error) + func OpenFile(relativePath string) (*os.File, error) + func SafeAddUint64(a, b uint64) (uint64, error) + func SafeMul(a uint64, b uint64) *big.Int + func SafeSubUint64(a, b uint64) (uint64, error) + func SaveSkToPemFile(file *os.File, identifier string, skBytes []byte) error + func SaveTomlFile(src interface{}, relativePath string) error + func SecondsToHourMinSec(input int) string + func ShardIdToString(shardId uint32) string + func UniqueIdentifier() string + type Accumulator interface + AddData func(data interface{}) + Close func() error + IsInterfaceNil func() bool + OutputChannel func() <-chan []interface{} + type AppStatusHandler interface + AddUint64 func(key string, val uint64) + Close func() + Decrement func(key string) + Increment func(key string) + IsInterfaceNil func() bool + SetInt64Value func(key string, value int64) + SetStringValue func(key string, value string) + SetUInt64Value func(key string, value uint64) + type ArgCreateFileArgument struct + Directory string + FileExtension string + Prefix string + type ConnectedAddressesHandler interface + ConnectedAddresses func() []string + type DCDTType uint32 + const Fungible + const NonFungible + type EnableEpochFlag string + type EnableEpochsHandler interface + GetActivationEpoch func(flag EnableEpochFlag) uint32 + IsFlagDefined func(flag EnableEpochFlag) bool + IsFlagEnabled func(flag EnableEpochFlag) bool + IsFlagEnabledInEpoch func(flag EnableEpochFlag, epoch uint32) bool + IsInterfaceNil func() bool + type EpochNotifier interface + IsInterfaceNil func() bool + RegisterNotifyHandler func(handler EpochSubscriberHandler) + type EpochSubscriberHandler interface + EpochConfirmed func(epoch uint32, timestamp uint64) + IsInterfaceNil func() bool + type GasScheduleNotifier interface + IsInterfaceNil func() bool + LatestGasSchedule func() map[string]map[string]uint64 + RegisterNotifyHandler func(handler GasScheduleSubscribeHandler) + UnRegisterAll func() + type GasScheduleSubscribeHandler interface + GasScheduleChange func(gasSchedule map[string]map[string]uint64) + IsInterfaceNil func() bool + type GetNodeFromDbErrHandler interface + Error func() string + GetIdentifier func() string + GetKey func() []byte + IsInterfaceNil func() bool + func UnwrapGetNodeFromDBErr(wrappedErr error) GetNodeFromDbErrHandler + type HeaderType string + const MetaHeader + const ShardHeaderV1 + const ShardHeaderV2 + func GetHeaderType(header data.HeaderHandler) HeaderType + type KeyValueHolder interface + Key func() []byte + Value func() []byte + type Logger interface + Debug func(message string, args ...interface{}) + Error func(message string, args ...interface{}) + Info func(message string, args ...interface{}) + IsInterfaceNil func() bool + LogIfError func(err error, args ...interface{}) + Trace func(message string, args ...interface{}) + Warn func(message string, args ...interface{}) + type NodeType string + const NodeTypeObserver + const NodeTypeValidator + type NodeTypeProviderHandler interface + GetType func() NodeType + IsInterfaceNil func() bool + SetType func(nodeType NodeType) + type OptionalUint32 struct + HasValue bool + Value uint32 + type OptionalUint64 struct + HasValue bool + Value uint64 + type P2PPeerInfo struct + PeerSubType P2PPeerSubType + PeerType P2PPeerType + PkBytes []byte + ShardID uint32 + type P2PPeerSubType uint32 + const FullHistoryObserver + const RegularPeer + func (pst P2PPeerSubType) String() string + type P2PPeerType int + const ObserverPeer + const UnknownPeer + const ValidatorPeer + func (pt P2PPeerType) String() string + type PeerID string + func NewPeerID(input string) (PeerID, error) + func (pid PeerID) Bytes() []byte + func (pid PeerID) Pretty() string + type PeerTopicType string + const CrossShardPeer + const FullHistoryPeer + const IntraShardPeer + func (pt PeerTopicType) String() string + type PubkeyConverter interface + Decode func(humanReadable string) ([]byte, error) + Encode func(pkBytes []byte) (string, error) + EncodeSlice func(pkBytesSlice [][]byte) ([]string, error) + IsInterfaceNil func() bool + Len func() int + SilentEncode func(pkBytes []byte, log Logger) string + type QueryP2PPeerInfo struct + Addresses []string + IsBlacklisted bool + PeerSubType string + PeerType string + Pid string + Pk string + type Queue interface + Add func(hash []byte) []byte + type SafeCloser interface + ChanClose func() <-chan struct{} + Close func() + IsInterfaceNil func() bool + type StopWatch struct + func NewStopWatch() *StopWatch + func (sw *StopWatch) Add(src *StopWatch) + func (sw *StopWatch) GetMeasurement(identifier string) time.Duration + func (sw *StopWatch) GetMeasurements() []interface{} + func (sw *StopWatch) GetMeasurementsMap() map[string]float64 + func (sw *StopWatch) Start(identifier string) + func (sw *StopWatch) Stop(identifier string) + type Throttler interface + CanProcess func() bool + EndProcessing func() + IsInterfaceNil func() bool + StartProcessing func() + type TimersScheduler interface + Add func(callback func(alarmID string), duration time.Duration, alarmID string) + Cancel func(alarmID string) + Close func() + IsInterfaceNil func() bool + Reset func(alarmID string) + type TrieData struct + Key []byte + Value []byte + Version TrieNodeVersion + type TrieNodeVersion uint8 + const AutoBalanceEnabled + const NotSpecified + func GetVersionForNewData(handler EnableEpochsHandler) TrieNodeVersion + func (version TrieNodeVersion) String() string + type TrieNodeVersionVerifier interface + IsInterfaceNil func() bool + IsValidVersion func(version TrieNodeVersion) bool + type WatchdogTimer interface + IsInterfaceNil func() bool + Reset func(alarmID string) + Set func(callback func(alarmID string), duration time.Duration, alarmID string) + SetDefault func(duration time.Duration, alarmID string) + Stop func(alarmID string)