package
0.0.0-20200713213332-2984094c852f
Repository: https://github.com/pokt-network/posmint.git
Documentation: pkg.go.dev

# Packages

Package module contains application module patterns and associated "manager" functionality.

# Functions

AddressFromHex creates an Address from a hex string.
appends a message to the head of the given error.
NOTE: Don't stringer this, we'll put better messages in later.
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
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
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.
get Address from pubkey.
GetConfig returns the config instance for the SDK.
GetDenomUnit returns a unit for a given denomination if it exists.
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.
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.
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.
create a new context.
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 decimal values from regular Coins.
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.
Constructs new table.
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
NewSubspace constructs a store with namestore.
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.
No description provided by the author
nolint - common values.
ZeroInt returns Int value with zero.
ZeroUint returns unsigned zero.

# Constants

No description provided by the author
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.
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.
bytes required to represent the above precision Ceiling[Log2[999 999 999 999 999 999]].
default stake denomination.
number of decimal places.
Slight modification of the RFC3339Nano but it right pads all zeros and drops the time zone info.
staking constants.
staking constants.
staking constants.
staking constants.
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.
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
Coin hold some amount of one currency.
TmConfig is the structure that holds the SDK configuration parameters.
No description provided by the author
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.
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.
KeyTable subspaces appropriate type for each parameter key.
Used for associating paramsubspace key and field of param structs.
Wrapper of Subspace, provides immutable functions only.
Result is the union of ResponseFormat and ResponseCheckTx.
SearchTxsResult defines a structure for querying txs pageable.
No description provided by the author
Individual parameter store for each keeper Transient store persists for a block, so we use it for recording whether the parameter has been changed or not.
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.
No description provided by the author
sdk Error type.
expected interface for registering invariants.
Transactions messages must fulfill the Msg.
Interface for structs containing parameters for a module.
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.
Address a wrapper around bytes meant to represent an 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.
nolint - reexport.
nolint - reexport.
nolint - reexport.
nolint - reexport.
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.
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.
nolint - reexport.
nolint - reexport.
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.
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.
Slice of KeyFieldPair.
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.
StakeStatus is the status of a validator.
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.