package
1.0.15
Repository: https://github.com/netcloth/netcloth-chain.git
Documentation: pkg.go.dev

# Packages

Package module contains application module patterns and associated "manager" functionality.
Package rest provides HTTP types and primitives for REST requests validation and responses handling.

# Functions

AccAddressFromBech32 creates an AccAddress from a Bech32 string.
AccAddressFromHex creates an AccAddress from a hex string.
appends a message to the head of the given error.
Bech32ifyAccPub returns a Bech32 encoded string containing the Bech32PrefixAccPub prefix for a given account PubKey.
Bech32ifyConsPub returns a Bech32 encoded string containing the Bech32PrefixConsPub prefixfor a given consensus node's PubKey.
Bech32ifyValPub returns a Bech32 encoded string containing the Bech32PrefixValPub prefix for a given validator operator's PubKey.
BigToAddress returns Address with byte values of b.
BigToHash sets byte representation of b to hash.
BytesToAddress returns Address with value b.
for VM module BytesToHash sets b to hash.
NOTE: Don't stringer this, we'll put better messages in later.
ConsAddressFromBech32 creates a ConsAddress from a Bech32 string.
ConsAddressFromHex creates a ConsAddress from a hex string.
ConvertCoin attempts to convert a coin to a given denomination.
copy bytes.
intended to be used with require/assert: require.True(DecEq(...)).
test if two decimal arrays are equal.
Compare two KVstores, return either the first key/value pair at which they differ and whether or not they are equal, skipping value comparison for a set of provided prefixes.
EmptyEvents returns an empty slice of events.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
nolint.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
FormatInvariant returns a standardized invariant message.
Formats a time.Time into a []byte that can be sorted.
No description provided by the author
GetAccPubKeyBech32 creates a PubKey for an account with a given public key string using the Bech32 Bech32PrefixAccPub prefix.
GetConfig returns the config instance for the SDK.
get ConsAddress from pubkey.
GetConsPubKeyBech32 creates a PubKey for a consensus node with a given public key string using the Bech32 Bech32PrefixConsPub prefix.
GetDenomUnit returns a unit for a given denomination if it exists.
GetFromBech32 decodes a bytestring from a Bech32 encoded string.
GetValPubKeyBech32 creates a PubKey for a validator's operator with a given public key string using the Bech32 Bech32PrefixValPub prefix.
HexToAddress returns Address with byte values of s.
HexToHash sets byte representation of s to hash.
InclusiveEndBytes returns the []byte that would end a range query such that the input would be included.
intended to be used with require/assert: require.True(IntEq(...)).
Iterator over all the keys with a certain prefix in ascending order.
Iterator over all the keys with a certain prefix in descending order.
maximum decimal between two.
MaxInt returns the maximum between two integers.
Return the maximum of the Uints.
minimum decimal between two.
return the minimum of the ints.
Return the minimum of the Uints.
MustBech32ifyAccPub returns the result of Bech32ifyAccPub panicing on failure.
MustBech32ifyConsPub returns the result of Bech32ifyConsPub panicing on failure.
MustBech32ifyValPub returns the result of Bech32ifyValPub panicing on failure.
MustGetAccPubKeyBech32 returns the result of GetAccPubKeyBech32 panicing on failure.
MustGetConsPubKeyBech32 returns the result of GetConsPubKeyBech32 panicing on failure.
MustGetValPubKeyBech32 returns the result of GetValPubKeyBech32 panicing on failure.
Decimal from string, panic on error.
MustSortJSON is like SortJSON but panic if an error occurs, e.g., if the passed JSON isn't valid.
NewAttribute returns a new key/value Attribute object.
NewCoin returns a new coin with a denomination and amount.
NewCoins constructs a new coin set.
create a new context.
create a new Dec from integer assuming whole number.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
create a new Dec from big integer assuming whole numbers CONTRACT: prec <= Precision.
create a new Dec from big integer assuming whole numbers CONTRACT: prec <= Precision.
create a new Dec from big integer assuming whole numbers CONTRACT: prec <= Precision.
create a new Dec from big integer with decimal place at prec CONTRACT: prec <= Precision.
create a decimal from an input decimal string.
create a new Dec from integer with decimal place at prec CONTRACT: prec <= Precision.
NewError - create an error.
NewEvent creates a new Event object with a given type and slice of one or more attributes.
No description provided by the author
nolint - reexport.
nolint - reexport.
NewInt constructs Int from int64.
NewInt64Coin returns a new coin with a denomination and amount.
NewInt64DecCoin returns a new DecCoin with a denomination and amount.
NewIntFromBigInt constructs Int from big.Int.
NewIntFromString constructs Int from string.
NewIntWithDecimal constructs Int with decimal Result value is n*10^dec.
NewKVStoreKey returns a new pointer to a KVStoreKey.
NewKVStoreKeys returns a map of new pointers to KVStoreKey's.
NewLevelDB instantiate a new LevelDB instance according to DBBackend.
NewResponseFormatBroadcastTx returns a TxResponse given a ResultBroadcastTx from tendermint.
NewResponseFormatBroadcastTxCommit returns a TxResponse given a ResultBroadcastTxCommit from tendermint.
NewResponseResultTx returns a TxResponse given a ResultTx from tendermint.
No description provided by the author
No description provided by the author
Constructs new TransientStoreKey Must return a pointer according to the ocap principle.
NewTransientStoreKeys constructs a new map of TransientStoreKey's Must return pointers according to the ocap principle.
NewUint constructs Uint from int64.
NewUintFromBigUint constructs Uint from big.Uint.
NewUintFromString constructs Uint from string.
No description provided by the author
OneInt returns Int value with one.
OneUint returns Uint value with one.
ParseABCILogs attempts to parse a stringified ABCI tx log into a slice of ABCIMessageLog types.
ParseCoin parses a cli input for one coin type, returning errors if invalid.
ParseCoins will parse out a list of coins separated by commas.
ParseDecCoin parses a decimal coin from a string, returning an error if invalid.
ParseDecCoins will parse out a list of decimal coins separated by commas.
Parses a []byte encoded using FormatTimeKey back into a time.Time.
ParseUint reads a string-encoded Uint value and return a Uint.
PrefixEndBytes returns the []byte that would end a range query for all []byte with a certain prefix Deals with last byte of prefix being FF without overflowing.
Register the sdk message type.
RegisterDenom registers a denomination with a corresponding unit.
No description provided by the author
SortedJSON takes any JSON and returns it sorted by keys.
StringifyEvent converts an Event object to a StringEvent object.
StringifyEvents converts a slice of Event objects into a slice of StringEvent objects.
TokensFromConsensusPower - convert input power to tokens.
TokensToConsensusPower - convert input tokens to potential consensus-engine power.
Uint64ToBigEndian - marshals uint64 to a bigendian byte slice so it can be sorted.
UintOverflow returns true if a given unsigned integer overflows and false otherwise.
ValAddressFromBech32 creates a ValAddress from a Bech32 string.
ValAddressFromHex creates a ValAddress from a hex string.
No description provided by the author
VerifyAddressFormat verifies that the provided bytes form a valid address according to the default address rules or a custom address verifier set by GetConfig().SetAddressVerifier().
nolint - common values.
ZeroInt returns Int value with zero.
ZeroUint returns unsigned zero.

# Constants

AddrLen defines a valid address length.
Bech32PrefixAccAddr defines the Bech32 prefix of an account's address.
Bech32PrefixAccAddr defines the Bech32 prefix of an account's address.
Bech32PrefixAccPub defines the Bech32 prefix of an account's public key.
Bech32PrefixConsAddr defines the Bech32 prefix of a consensus node address.
Bech32PrefixConsPub defines the Bech32 prefix of a consensus node public key.
Bech32PrefixValAddr defines the Bech32 prefix of a validator's operator address.
Bech32PrefixValPub defines the Bech32 prefix of a validator's operator public key.
staking constants.
staking constants.
staking constants.
staking constants.
SDK error codes.
SDK error codes.
SDK error codes.
SDK error codes.
SDK error codes.
SDK error codes.
SDK error codes.
SDK error codes.
SDK error codes.
SDK error codes.
SDK error codes.
Base error codes.
SDK error codes.
SDK error codes.
CodespaceRoot is a codespace for error codes in this file only.
SDK error codes.
SDK error codes.
SDK error codes.
SDK error codes.
SDK error codes.
Atom in https://github.com/satoshilabs/slips/blob/master/slip-0044.md.
bytes required to represent the above precision Ceiling[Log2[999 999 999 999 999 999]].
default bond denomination.
BIP44Prefix is the parts of the BIP44 HD path that are fixed by what we used during the fundraiser.
HashLength is the expected length of the hash.
No description provided by the author
unit: 1 nch = 10^12 pico-nch.
number of decimal places.
PrefixAccount is the prefix for account keys.
PrefixAddress is the prefix for addresses.
PrefixConsensus is the prefix for consensus keys.
PrefixOperator is the prefix for operator keys.
PrefixPublic is the prefix for public keys.
PrefixValidator is the prefix for validator keys.
Slight modification of the RFC3339Nano but it right pads all zeros and drops the time zone info.
nolint - reexport.
nolint - reexport.
nolint - reexport.
nolint - reexport.
staking constants.
staking constants.
Delay, in blocks, between when validator updates are returned to the consensus-engine and when they are applied.

# Variables

Common event types and attribute keys.
Common event types and attribute keys.
Common event types and attribute keys.
Common event types and attribute keys.
This is set at compile time.
Common event types and attribute keys.
IsAlphaNumeric defines a regular expression for matching against alpha-numeric values.
PowerReduction is the amount of staking tokens required for 1 unit of consensus-engine power.

# Structs

ABCIMessageLog defines a structure containing an indexed tx ABCI message log.
No description provided by the author
Coin hold some amount of one currency.
Config is the structure that holds the SDK configuration parameters.
Context is an immutable object contains all information needed to process a request.
NOTE: never use new(Dec) or else we will panic unmarshalling into the nil embedded big.Int.
Coins which can have additional decimal points.
EventManager implements a simple wrapper around a slice of Event objects that can be emitted from.
Int wraps integer with 256 bit range bound Checks overflow, underflow and division by zero Exists in range from -(2^maxBitLen-1) to 2^maxBitLen-1.
Result is the union of ResponseFormat and ResponseCheckTx.
SearchTxsResult defines a structure for querying txs pageable.
No description provided by the author
msg type for testing.
TxResponse defines a structure containing relevant tx data and metadata.
Uint wraps integer with 256 bit range bound Checks overflow, underflow and division by zero Exists in range from 0 to 2^256-1.

# Interfaces

Address is a common interface for different types of addresses used by the SDK.
sdk Error type.
expected interface for registering invariants.
Transactions messages must fulfill the Msg.
QueryRouter provides queryables for each query path.
Router provides handlers for each transaction type.
Transactions objects must fulfill the Tx.

# Type aliases

ABCIMessageLogs represents a slice of ABCIMessageLog.
AccAddress a wrapper around bytes meant to represent an account address.
AnteHandler authenticates transactions, before their internal messages are handled.
BeginBlocker runs code before the transactions in a block Note: applications which set create_empty_blocks=false will not have regular block timing and should use e.g.
BondStatus is the status of a validator.
nolint - reexport.
nolint - reexport.
nolint - reexport.
nolint - reexport.
Code & Storage.
CodespaceType - codespace identifier.
CodeType - ABCI code identifier within codespace.
Coins is a set of Coin, one per currency.
nolint - reexport.
nolint - reexport.
nolint - reexport.
nolint - reexport.
nolint - reexport.
ConsAddress defines a wrapper around bytes meant to present a consensus node.
coins with decimal.
EndBlocker runs code after the transactions in a block and return updates to the validator set Note: applications which set create_empty_blocks=false will not have regular block timing and should use e.g.
nolint - reexport.
nolint - reexport.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
nolint - reexport.
nolint - reexport.
nolint - reexport.
Handler defines the core of the state transition function of an application.
sha256 hash for contract.
InitChainer initializes application state at genesis.
An Invariant is a function which tests a particular invariant.
Invariants defines a group of invariants.
nolint - reexport.
key-value result for iterator queries.
nolint - reexport.
nolint - reexport.
nolint - reexport.
PeerFilter responds to p2p filtering queries from Tendermint.
nolint - reexport.
Type for querier functions on keepers to implement to handle custom queries.
nolint - reexport.
Proposed rename, not done to avoid API breakage.
Code & Storage.
nolint - reexport.
nolint - reexport.
nolint - reexport.
No description provided by the author
TraceContext contains TraceKVStore context data.
nolint - reexport.
TxDecoder unmarshals transaction bytes.
TxEncoder marshals transaction to bytes.
UnprefixedHash allows marshaling a Hash without 0x prefix.
ValAddress defines a wrapper around bytes meant to present a validator's operator.