package
0.53.0-beta.2
Repository: https://github.com/cosmos/cosmos-sdk.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
Package errors provides a shared set of errors for use in the SDK, aliases functionality in the cosmossdk.io/errors module that used to be in this package, and provides some helpers for converting errors to ABCI response code.
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
No description provided by the author
Package tx is a reverse proxy.

# Functions

AccAddressFromBech32 creates an AccAddress from a Bech32 string.
AccAddressFromHexUnsafe creates an AccAddress from a HEX-encoded string.
AppendLengthPrefixedBytes combines the slices of bytes to one slice of bytes.
Bech32ifyAddressBytes returns a bech32 representation of address bytes.
BigEndianToUint64 returns an uint64 from big endian encoded bytes.
ChainAnteDecorators ChainDecorator chains AnteDecorators together with each AnteDecorator wrapping over the decorators further along chain and returns a single AnteHandler.
ChainPostDecorators chains PostDecorators together with each PostDecorator wrapping over the decorators further along chain and returns a single PostHandler.
ConsAddressFromBech32 creates a ConsAddress from a Bech32 string.
ConsAddressFromHex creates a ConsAddress from a hex string.
copy bytes.
EmptyEvents returns an empty slice of events.
FormatInvariant returns a standardized invariant message.
Formats a time.Time into a []byte that can be sorted.
Formats a time.Time into a string.
GetBech32PrefixAccPub returns the Bech32 prefix of an account's public key.
GetBech32PrefixConsAddr returns the Bech32 prefix of a consensus node address.
GetBech32PrefixConsPub returns the Bech32 prefix of a consensus node public key.
GetBech32PrefixValAddr returns the Bech32 prefix of a validator's operator address.
GetBech32PrefixValPub returns the Bech32 prefix of a validator's operator public key.
GetConfig returns the config instance for the SDK.
get ConsAddress from pubkey.
GetFromBech32 decodes a bytestring from a Bech32 encoded string.
GetFullBIP44Path returns the BIP44Prefix.
GetModuleNameFromTypeURL assumes that module name is the second element of the msg type URL e.g.
GetMsgFromTypeURL returns a `sdk.Msg` message type from a type URL.
GetSealedConfig returns the config instance for the SDK if/once it is sealed.
IsAddrCacheEnabled returns if the address caches are enabled.
No description provided by the author
Deprecated: LengthPrefixedAddressKey implements an SDK backwards compatible indexing key encoder for addresses.
MarkEventsToIndex returns the set of ABCI events, where each event's attribute has it's index value marked based on the provided set of events to index.
MatchDenom checks if the given string is a valid denomination.
MustAccAddressFromBech32 calls AccAddressFromBech32 and panics on error.
MustBech32ifyAddressBytes returns a bech32 representation of address bytes.
MustValAddressFromBech32 calls ValAddressFromBech32 and panics on error.
No description provided by the author
NewAttribute returns a new key/value Attribute object.
NewCoin returns a new coin with a denomination and amount.
NewCoins constructs a new coin set.
NewConfig returns a new Config with default values.
create a new context.
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 decimal values from DecCoins.
NewDecCoinsFromCoins constructs a new coin set with decimal values from regular Coins.
NewEvent creates a new Event object with a given type and slice of one or more attributes.
No description provided by the author
NewInt64Coin returns a new coin with a denomination and amount.
NewInt64DecCoin returns a new DecCoin with a denomination and amount.
No description provided by the author
NewResponseFormatBroadcastTx returns a TxResponse given a ResultBroadcastTx from tendermint.
NewResponseResultBlock returns a BlockResponse given a ResultBlock from CometBFT.
NewResponseResultTx returns a TxResponse given a ResultTx from tendermint.
No description provided by the author
No description provided by the author
NormalizeCoins normalize and truncate a list of decimal coins.
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 the smallest unit.
ParseDecAmount parses the given string into amount, denomination.
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.
ParseLengthPrefixedBytes panics when store key length is not equal to the given length.
Parses an encoded type using FormatTimeKey back into a time.Time.
Parses a []byte encoded using FormatTimeKey back into a time.Time.
ParseTypedEvent converts abci.Event back to a typed event.
RegisterInterfaces registers the sdk message type.
RegisterLegacyAminoCodec registers the sdk message type.
SetAddrCacheEnabled enables or disables accAddrCache, consAddrCache, and valAddrCache.
SetCoinDenomRegex allows for coin's custom validation by overriding the regular expression string used for denom validation.
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.
ToSDKCommitInfo takes comet commit info and returns sdk commit info.
ToSDKEvidence takes comet evidence and returns sdk evidence.
ToSDKExtendedCommitInfo takes comet extended commit info and returns sdk commit info.
TryUnwrapSDKContext attempts to retrieve a Context from a context.Context.
TypedEventToEvent takes typed event and converts to Event object.
Uint64ToBigEndian - marshals uint64 to a bigendian byte slice so it can be sorted.
UnwrapSDKContext retrieves a Context from a context.Context instance attached with WrapSDKContext.
ValAddressFromBech32 creates a ValAddress from a Bech32 string.
ValAddressFromHex creates a ValAddress from a hex string.
ValidateDenom is the default validation function for Coin.Denom.
WrapSDKContext returns a stdlib context.Context with the provided sdk.Context's internal context as a value.

# Constants

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.
Common event types and attribute keys.
Common event types and attribute keys.
Common event types and attribute keys.
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.
BONDED defines a validator that is bonded.
CoinType is the ATOM coin type as defined in SLIP44 (https://github.com/satoshilabs/slips/blob/master/slip-0044.md).
DefaultKeyringServiceName defines a default service name for the keyring.
Common event types and attribute keys.
Common event types and attribute keys.
All possible execution modes.
All possible execution modes.
All possible execution modes.
All possible execution modes.
All possible execution modes.
All possible execution modes.
All possible execution modes.
All possible execution modes.
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
No description provided by the author
MsgInterfaceProtoName defines the protobuf name of the cosmos Msg interface.
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.
Purpose is the ATOM purpose as defined in SLIP44 (https://github.com/satoshilabs/slips/blob/master/slip-0044.md).
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
UNBONDED defines a validator that is not bonded.
UNBONDING defines a validator that is unbonding.
UNSPECIFIED defines an invalid validator status.
Delay, in blocks, between when validator updates are returned to the consensus-engine and when they are applied.

# Variables

AccAddressKey follows the same semantics of collections.BytesKey.
ConsAddressKey follows the same semantics as ConsAddressKey.
DefaultBondDenom is the default bondable coin denomination (defaults to stake) Overwriting this value has the side effect of changing the default denomination in genesis.
DefaultPowerReduction is the default amount of staking tokens required for 1 unit of consensus-engine power.
sentinel errors.
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
IntValue represents a collections.ValueCodec to work with Int.
IsAlphaNumeric defines a regular expression for matching against alphanumeric values.
LegacyDecValue represents a collections.ValueCodec to work with LegacyDec.
LengthPrefixedBytesKey is a collections KeyCodec to work with []byte.
LEUint64Key is a collections KeyCodec that encodes uint64 using little endian.
MsgTypeURL returns the TypeURL of a `sdk.Msg`.
PubKeyEd25519Type is ed25519 for type the consensus params validator pub_key_types params.
TimeKey represents a collections.KeyCodec to work with time.Time Deprecated: exists only for state compatibility reasons, should not be used for new storage keys using time.
UintValue represents a collections.ValueCodec to work with Uint.
ValAddressKey follows the same semantics as AccAddressKey.

# Structs

ABCIMessageLog defines a structure containing an indexed tx ABCI message log.
Attribute defines an attribute wrapper where the key and value are strings instead of raw bytes.
BeginBlock defines a type which contains beginBlock events.
Coin 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.
DecCoin defines a token with a denomination and a decimal amount.
DecProto defines a Protobuf wrapper around a Dec object.
EndBlock defines a type which contains endblock events and validator set updates.
EventManager implements a simple wrapper around a slice of Event objects that can be emitted from.
GasInfo defines tx execution gas context.
GenesisValidator is an initial validator.
IntProto defines a Protobuf wrapper around an Int object.
MsgData defines the data returned in a Result object during message execution.
Result is the union of ResponseFormat and ResponseCheckTx.
SearchBlocksResult defines a structure for querying blocks pageable.
SearchTxsResult defines a structure for querying txs pageable.
SimulationResponse defines the response generated when a transaction is successfully simulated.
StringEvent defines en Event object wrapper where all the attributes contain key/value pairs that are strings instead of raw bytes.
Terminator AnteDecorator will get added to the chain to simplify decorator code Don't need to check if next == nil further up the chain ______ <((((((\\\ / .
TxMsgData defines a list of MsgData.
TxResponse defines a structure containing relevant tx data and metadata.

# Interfaces

AccountI is an interface used to store coins at a given address within state.
Address is a common interface for different types of addresses used by the SDK.
AnteDecorator wraps the next AnteHandler to perform custom pre-processing.
CustomProtobufType defines the interface custom gogo proto types must implement in order to be used as a "customtype" extension.
DelegationI delegation bond for a delegated proof of stake system.
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
expected interface for registering invariants Deprecated: to be removed in the next SDK version.
No description provided by the author
ModuleAccountI defines an account interface for modules that hold tokens in an escrow.
PostDecorator wraps the next PostHandler to perform custom 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
No description provided by the author
No description provided by the author
ValidatorI expected validator functions.

# 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 executed.
BeginBlocker defines a function type alias for executing application business logic before transactions are executed.
BondStatus is the status of a validator.
CheckTxHandler defines a function type alias for executing logic before transactions are executed.
Coins is a set of Coin, one per currency.
ConsAddress defines a wrapper around bytes meant to present a consensus node.
ContextKey defines a type alias for a stdlib Context key.
DecCoins defines a slice of coins with decimal values.
EndBlocker defines a function type alias for executing application business logic after transactions are executed but before committing.
No description provided by the author
No description provided by the author
ExecMode defines the execution mode which can be set on a Context.
ExtendVoteHandler defines a function type alias for extending a pre-commit vote.
InitChainer initializes application state at genesis.
An Invariant is a function which tests a particular invariant.
Invariants defines a group of invariants Deprecated: to be removed in the next SDK version.
map coins is a map representation of sdk.Coins intended solely for use in bulk additions.
No description provided by the author
PeerFilter responds to p2p filtering queries from Tendermint.
PostHandler like AnteHandler but it executes after RunMsgs.
PreBlocker runs code before the `BeginBlocker` and defines a function type alias for executing logic right before FinalizeBlock is called (but after its context has been set up).
Precommiter runs code during commit immediately before the `deliverState` is written to the `rootMultiStore`.
PrepareCheckStater runs code during commit after the block has been committed, and the `checkState` has been branched for the new block.
PrepareProposalHandler defines a function type alias for preparing a proposal.
ProcessProposalHandler defines a function type alias for processing a proposer.
Proposed rename, not done to avoid API breakage.
No description provided by the author
TxDecoder unmarshals transaction bytes.
TxEncoder marshals transaction to bytes.
ValAddress defines a wrapper around bytes meant to present a validator's operator.
VerifyVoteExtensionHandler defines a function type alias for verifying a pre-commit vote extension.