# Packages
Package errors implements custom error interfaces for cosmos-sdk.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package module contains application module patterns and associated "manager" functionality.
No description provided by the author
No description provided by the author
Package rest provides HTTP types and primitives for REST requests validation and responses handling.
Package tx is a reverse proxy.
No description provided by the author
# Functions
AccAddressFromBech32 creates an AccAddress from a Bech32 string.
AccAddressFromBech32ByPrefix create an AccAddress from a Bech32 string by address prefix.
AccAddressFromHex creates an AccAddress from a hex string.
No description provided by the author
appends a message to the head of the given error.
Bech32ifyPubKey returns a Bech32 encoded string containing the appropriate prefix based on the key type provided for a given PublicKey.
BigEndianToUint64 returns an uint64 from big endian encoded bytes.
ChainDecorator chains AnteDecorators together with each AnteDecorator wrapping over the decorators further along chain and returns a single AnteHandler.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
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.
ConvertDecCoin attempts to convert a decimal coin to a given denomination.
No description provided by the author
copy bytes.
intended to be used with require/assert: require.True(DecEq(...)).
test if two decimal arrays are equal.
DefaultCoinDenomRegex returns the default regex string.
DefaultCoinDenomRegex returns the default regex string.
Derive derives a new address from the main `address` and a derivation `key`.
DiffKVStores compares two KVstores and returns all the key/value pairs that differ from one another.
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
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
No description provided by the author
FormatInvariant returns a standardized invariant message.
Formats a time.Time into a []byte that can be sorted.
GetBaseDenom returns the denom of smallest unit registered.
GetConfig returns the config instance for the SDK.
get ConsAddress from pubkey.
GetDenomUnit returns a unit for a given denomination if it exists.
GetFromBech32 decodes a bytestring from a Bech32 encoded string.
No description provided by the author
GetPubKeyFromBech32 returns a PublicKey from a bech32-encoded PublicKey with a given key type.
GetReusableInfiniteGasMeter returns a ReusableGasMeter from the pool.
GetSealedConfig returns the config instance for the SDK if/once it is sealed.
No description provided by the author
Hash creates a new address from address type and key.
No description provided by the author
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(...)).
No description provided by the author
No description provided by the author
No description provided by the author
Iterator over all the keys with a certain prefix in ascending order.
KVStorePrefixIteratorPaginated returns iterator over items in the selected page.
Iterator over all the keys with a certain prefix in descending order.
KVStoreReversePrefixIteratorPaginated returns iterator over items in the selected page.
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.
MsgTypeURL returns the TypeURL of a `sdk.Msg`.
MustAccAddressFromBech32 calls AccAddressFromBech32 and panics on error.
MustBech32ifyAccPub returns the result of Bech32ifyAccPub panicing on failure.
MustBech32ifyPubKey calls Bech32ifyPubKey except it panics on error.
MustGetPubKeyFromBech32 calls GetPubKeyFromBech32 except it panics on error.
Decimal from string, panic on error.
No description provided by the author
MustSortJSON is like SortJSON but panic if an error occurs, e.g., if the passed JSON isn't valid.
MustWasmAddressFromBech32 calls WasmAddressFromBech32 and panics on error.
No description provided by the author
NewAttribute returns a new key/value Attribute object.
No description provided by the author
NewCoin returns a new coin with a denomination and amount.
NewCoins constructs a new coin set.
New returns a new Config with default values.
NewContext create a new context.
NewDB instantiate a new DB instance according to db_backend.
create a new Dec from integer assuming whole number.
NewDecCoin creates a new DecCoin instance from an Int.
NewDecCoinFromCoin creates a new DecCoin from a Coin.
NewDecCoinFromDec creates a new DecCoin instance from a Dec.
NewDecCoins constructs a new coin set with with decimal values from DecCoins.
NewDecCoinsFromCoin constructs a new coin set with decimal values from regular Coins.
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.
NewDecWithBigIntAndPrec create a new Dec from big integer assuming whole numbers CONTRACT: prec <= Precision The new Dec takes ownership of i, and the caller should not use i after this call.
No description provided by the author
create a new Dec from integer with decimal place at prec CONTRACT: prec <= Precision.
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.
No description provided by the author
NewCoins constructs a new coin set.
No description provided by the author
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.
NewIntFromUint64 constructs an Int from a uint64.
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.
NewMemoryStoreKeys constructs a new map matching store key names to their respective MemoryStoreKey references.
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.
NewRoute returns an instance of Route.
No description provided by the author
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.
NormalizeCoin try to convert a coin to the smallest unit registered, returns original one if failed.
NormalizeCoins normalize and truncate a list of decimal coins.
NormalizeDecCoin try to convert a decimal coin to the smallest unit registered, returns original one if failed.
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.
ParseCoinNormalized parses and normalize a cli input for one coin type, returning errors if invalid or on an empty string as well.
ParseCoinsNormalized will parse out a list of coins separated by commas, and normalize them by converting to smallest unit.
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.
RelativePow raises x to the power of n, where x (and the result, z) are scaled by factor b for example, RelativePow(210, 2, 100) = 441 (2.1^2 = 4.41).
No description provided by the author
SetCoinDenomRegex allows for coin's custom validation by overriding the regular expression string used for denom validation.
No description provided by the author
No description provided by the author
SortableDecBytes returns a byte slice representation of a Dec that can be sorted.
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.
UnsafeBytesToStr is meant to make a zero allocation conversion from []byte -> string to speed up operations, it is not meant to be used generally, but for a specific pattern to delete keys from a map.
UnsafeStrToBytes uses unsafe to convert string into byte array.
UnwrapSDKContext retrieves a Context from a context.Context instance attached with WrapSDKContext.
No description provided by the author
ValAddressFromBech32 creates a ValAddress from a Bech32 string.
ValAddressFromHex creates a ValAddress from a hex string.
ValidateDenom validates a denomination string returning an error if it is invalid.
No description provided by the author
ValidSortableDec ensures that a Dec is within the sortable bounds, a Dec can't have a precision of less than 10^-18.
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().
WasmAddressFromBech32 creates an WasmAddress from a Bech32 string.
WasmAddressFromBech32ByPrefix create an WasmAddress from a Bech32 string by address prefix.
WasmAddressFromHex creates an WasmAddress from a hex string.
No description provided by the author
No description provided by the author
WrapSDKContext returns a stdlib context.Context with the provided sdk.Context's internal context as a value.
WrapServiceResult wraps a result from a protobuf RPC service method call in a Result object or error.
No description provided by the author
No description provided by the author
ZeroInt returns Int value with zero.
ZeroUint returns unsigned zero.
# Constants
AddrLen defines a valid address length.
No description provided by the author
Bech32MainPrefix defines the main SDK 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.
Bech32 conversion constants.
Bech32 conversion constants.
Bech32 conversion constants.
staking constants.
staking constants.
staking constants.
staking constants.
No description provided by the author
No description provided by the author
No description provided by the author
CoinType is the ATOM coin type as defined in SLIP44 (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.
No description provided by the author
No description provided by the author
DefaultIbcWei for ibc transfer default brc10 min unit.
DefaultKeyringServiceName defines a default service name for the keyring.
No description provided by the author
No description provided by the author
No description provided by the author
FullFundraiserPath is the parts of the BIP44 HD path that are fixed by what we used during the ATOM fundraiser.
No description provided by the author
LongAddrLen defines a valid wasm contract address length.
MsgInterfaceProtoName defines the protobuf name of the cosmos Msg interface.
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.
SdkContextKey is the key in the context.Context which holds the sdk.Context.
Slight modification of the RFC3339Nano but it right pads all zeros and drops the time zone info.
No description provided by the author
nolint - reexport.
nolint - reexport.
nolint - reexport.
nolint - reexport.
nolint - reexport.
nolint - reexport.
staking constants.
staking constants.
No description provided by the author
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.
Common event types and attribute keys.
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
No description provided by the author
No description provided by the author
No description provided by the author
Decimal errors.
No description provided by the author
Decimal errors.
Decimal errors.
No description provided by the author
No description provided by the author
Common event types and attribute keys.
IsAlpha defines regular expression to check if the string has alphabetic characters only.
IsAlphaLower defines regular expression to check if the string has lowercase alphabetic characters only.
IsAlphaNumeric defines a regular expression for matching against alpha-numeric values.
IsAlphaUpper defines regular expression to check if the string has uppercase alphabetic characters only.
IsNumeric defines regular expression to check if the string has numeric characters only.
MaxSortableDec is the largest Dec that can be passed into SortableDecBytes() Its negative form is the least Dec that can be passed in.
No description provided by the author
No description provided by the author
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
No description provided by the author
No description provided by the author
No description provided by the author
CoinAdapter defines a token with a denomination and an amount.
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.
DecCoin defines a coin which can have additional decimal points.
DecCoinAdapter defines a token with a denomination and a decimal amount.
DecProtoAdapter defines a Protobuf wrapper around a Dec object.
No description provided by the author
No description provided by the author
No description provided by the author
EventManager implements a simple wrapper around a slice of Event objects that can be emitted from.
GasInfo defines tx execution gas context.
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.
IntProtoAdapter defines a Protobuf wrapper around an Int object.
No description provided by the author
No description provided by the author
Result is the union of ResponseFormat and ResponseCheckTx.
No description provided by the author
SearchTxsResult defines a structure for querying txs pageable.
ServiceMsg is the struct into which an Any whose typeUrl matches a service method format (ex.
No description provided by the author
SimulationResponse defines the response generated when a transaction is successfully simulated by the Baseapp.
No description provided by the author
Terminator AnteDecorator will get added to the chain to simplify decorator code Don't need to check if next == nil further up the chain
______ <((((((\\\ / .
TestMsg is msg type for testing.
No description provided by the author
TxResponse defines a structure containing relevant tx data and metadata.
No description provided by the author
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
No description provided by the author
Address is a common interface for different types of addresses used by the SDK.
AnteDecorator wraps the next AnteHandler to perform custom pre- and post-processing.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
expected interface for registering invariants.
No description provided by the author
No description provided by the author
Transactions messages must fulfill the Msg.
No description provided by the author
No description provided by the author
MsgRequest is the interface a transaction message, defined as a proto service method, must fulfill.
QueryRouter provides queryables for each query path.
Router provides handlers for each transaction type.
Transactions objects must fulfill the Tx.
No description provided by the author
No description provided by the author
# Type aliases
ABCIMessageLogs represents a slice of ABCIMessageLog.
AccAddress a wrapper around bytes meant to represent an account address.
No description provided by the author
AnteHandler authenticates transactions, before their internal messages are handled.
Bech32PubKeyType defines a string type alias for a Bech32 public key type.
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.
No description provided by the author
No description provided by the author
No description provided by the author
nolint - reexport.
nolint - reexport.
nolint - reexport.
nolint - reexport.
nolint - reexport.
ConsAddress defines a wrapper around bytes meant to present a consensus node.
ContextKey defines a type alias for a stdlib Context key.
No description provided by the author
DecCoins defines a slice of coins with decimal values.
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.
No description provided by the author
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.
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
Handler defines the core of the state transition function of an application.
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.
No description provided by the author
nolint - reexport.
No description provided by the author
nolint - reexport.
nolint - reexport.
PeerFilter responds to p2p filtering queries from Tendermint.
No description provided by the author
nolint - reexport.
Querier defines a function type that a module querier must implement to handle custom client queries.
nolint - reexport.
Proposed rename, not done to avoid API breakage.
nolint - reexport.
nolint - reexport.
StoreDecoderRegistry defines each of the modules store decoders.
nolint - reexport.
nolint - reexport.
No description provided by the author
No description provided by the author
No description provided by the author
TraceContext contains TraceKVStore context data.
No description provided by the author
nolint - reexport.
__________________________________________________________ TxDecoder unmarshals transaction bytes.
TxEncoder marshals transaction to bytes.
No description provided by the author
No description provided by the author
No description provided by the author
ValAddress defines a wrapper around bytes meant to present a validator's operator.
WasmAddress a wrapper around bytes meant to represent an account address.