Versions in this module Expand all Collapse all v0 v0.23.1 Jul 27, 2018 Changes in this version + const ABCICodeOK + const AddrLen + const Bech32PrefixAccAddr + const Bech32PrefixAccPub + const Bech32PrefixValAddr + const Bech32PrefixValPub + const CodeInsufficientCoins + const CodeInsufficientFunds + const CodeInternal + const CodeInvalidAddress + const CodeInvalidCoins + const CodeInvalidPubKey + const CodeInvalidSequence + const CodeMemoTooLarge + const CodeOK + const CodeOutOfGas + const CodeTxDecode + const CodeUnauthorized + const CodeUnknownAddress + const CodeUnknownRequest + const CodespaceRoot + const CodespaceUndefined + const MaximumCodespace + var TagAction = "action" + var TagDelegator = "delegator" + var TagDstValidator = "destination-validator" + var TagSrcValidator = "source-validator" + func ABCIValidator(v Validator) abci.Validator + func Bech32ifyAccPub(pub crypto.PubKey) (string, error) + func Bech32ifyValPub(pub crypto.PubKey) (string, error) + func BondStatusToString(b BondStatus) string + func CodeToDefaultMsg(code CodeType) string + func GetAccPubKeyBech32(address string) (pk crypto.PubKey, err error) + func GetFromBech32(bech32str, prefix string) ([]byte, error) + func GetValPubKeyBech32(pubkey string) (pk crypto.PubKey, err error) + func MustBech32ifyAccPub(pub crypto.PubKey) string + func MustBech32ifyValPub(pub crypto.PubKey) string + func MustGetAccPubKeyBech32(address string) (pk crypto.PubKey) + func MustGetValPubKeyBech32(address string) (pk crypto.PubKey) + func MustSortJSON(toSortJSON []byte) []byte + func NewRatFromDecimal(decimalStr string, prec int) (f Rat, err Error) + func PrefixEndBytes(prefix []byte) []byte + func RatEq(t *testing.T, exp, got Rat) (*testing.T, bool, string, Rat, Rat) + func RatsEqual(r1s, r2s []Rat) bool + func RegisterWire(cdc *wire.Codec) + func SortJSON(toSortJSON []byte) ([]byte, error) + type ABCICodeType uint32 + func ToABCICode(space CodespaceType, code CodeType) ABCICodeType + func (code ABCICodeType) IsOK() bool + type AccAddress []byte + func AccAddressFromBech32(address string) (addr AccAddress, err error) + func AccAddressFromHex(address string) (addr AccAddress, err error) + func (bz *AccAddress) Unmarshal(data []byte) error + func (bz *AccAddress) UnmarshalJSON(data []byte) error + func (bz AccAddress) Bytes() []byte + func (bz AccAddress) Format(s fmt.State, verb rune) + func (bz AccAddress) Marshal() ([]byte, error) + func (bz AccAddress) MarshalJSON() ([]byte, error) + func (bz AccAddress) String() string + type AnteHandler func(ctx Context, tx Tx) (newCtx Context, result Result, abort bool) + type BeginBlocker func(ctx Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock + type BondStatus byte + const Bonded + const Unbonded + const Unbonding + func (b BondStatus) Equal(b2 BondStatus) bool + type CacheKVStore interface + Write func() + type CacheMultiStore interface + Write func() + type CacheWrap interface + CacheWrap func() CacheWrap + CacheWrapWithTrace func(w io.Writer, tc TraceContext) CacheWrap + Write func() + type CacheWrapper interface + CacheWrap func() CacheWrap + CacheWrapWithTrace func(w io.Writer, tc TraceContext) CacheWrap + type CodeType uint16 + type CodespaceType uint16 + type Codespacer struct + func NewCodespacer() *Codespacer + func (c *Codespacer) RegisterNext(codespace CodespaceType) CodespaceType + func (c *Codespacer) RegisterOrPanic(codespace CodespaceType) + type Coin struct + Amount Int + Denom string + func NewCoin(denom string, amount int64) Coin + func ParseCoin(coinStr string) (coin Coin, err error) + func (coin Coin) IsEqual(other Coin) bool + func (coin Coin) IsGTE(other Coin) bool + func (coin Coin) IsNotNegative() bool + func (coin Coin) IsPositive() bool + func (coin Coin) IsZero() bool + func (coin Coin) Minus(coinB Coin) Coin + func (coin Coin) Plus(coinB Coin) Coin + func (coin Coin) SameDenomAs(other Coin) bool + func (coin Coin) String() string + type Coins []Coin + func ParseCoins(coinsStr string) (coins Coins, err error) + func (coins Coins) AmountOf(denom string) Int + func (coins Coins) IsEqual(coinsB Coins) bool + func (coins Coins) IsGTE(coinsB Coins) bool + func (coins Coins) IsNotNegative() bool + func (coins Coins) IsPositive() bool + func (coins Coins) IsValid() bool + func (coins Coins) IsZero() bool + func (coins Coins) Len() int + func (coins Coins) Less(i, j int) bool + func (coins Coins) Minus(coinsB Coins) Coins + func (coins Coins) Negative() Coins + func (coins Coins) Plus(coinsB Coins) Coins + func (coins Coins) Sort() Coins + func (coins Coins) String() string + func (coins Coins) Swap(i, j int) + type CommitID struct + Hash []byte + Version int64 + func (cid CommitID) IsZero() bool + func (cid CommitID) String() string + type CommitKVStore interface + type CommitMultiStore interface + GetCommitKVStore func(key StoreKey) CommitKVStore + GetCommitStore func(key StoreKey) CommitStore + LoadLatestVersion func() error + LoadVersion func(ver int64) error + MountStoreWithDB func(key StoreKey, typ StoreType, db dbm.DB) + type CommitStore interface + type Committer interface + Commit func() CommitID + LastCommitID func() CommitID + SetPruning func(PruningStrategy) + type Context struct + func NewContext(ms MultiStore, header abci.Header, isCheckTx bool, logger log.Logger) Context + func (c Context) BlockHeader() abci.Header + func (c Context) BlockHeight() int64 + func (c Context) CacheContext() (cc Context, writeCache func()) + func (c Context) ChainID() string + func (c Context) GasMeter() GasMeter + func (c Context) GetOp(ver int64) (Op, bool) + func (c Context) IsCheckTx() bool + func (c Context) IsZero() bool + func (c Context) KVStore(key StoreKey) KVStore + func (c Context) Logger() log.Logger + func (c Context) SigningValidators() []abci.SigningValidator + func (c Context) TxBytes() []byte + func (c Context) Value(key interface{}) interface{} + func (c Context) WithBlockHeader(header abci.Header) Context + func (c Context) WithBlockHeight(height int64) Context + func (c Context) WithCacheWrapper(key interface{}, value CacheWrapper) Context + func (c Context) WithChainID(chainID string) Context + func (c Context) WithCloner(key interface{}, value cloner) Context + func (c Context) WithGasMeter(meter GasMeter) Context + func (c Context) WithInt32(key interface{}, value int32) Context + func (c Context) WithIsCheckTx(isCheckTx bool) Context + func (c Context) WithLogger(logger log.Logger) Context + func (c Context) WithMultiStore(ms MultiStore) Context + func (c Context) WithProtoMsg(key interface{}, value proto.Message) Context + func (c Context) WithSigningValidators(SigningValidators []abci.SigningValidator) Context + func (c Context) WithString(key interface{}, value string) Context + func (c Context) WithTxBytes(txBytes []byte) Context + func (c Context) WithUint32(key interface{}, value uint32) Context + func (c Context) WithUint64(key interface{}, value uint64) Context + func (c Context) WithValue(key interface{}, value interface{}) Context + type Delegation interface + GetBondShares func() Rat + GetDelegator func() AccAddress + GetValidator func() AccAddress + type DelegationSet interface + GetValidatorSet func() ValidatorSet + IterateDelegations func(ctx Context, delegator AccAddress, ...) + type EndBlocker func(ctx Context, req abci.RequestEndBlock) abci.ResponseEndBlock + type Error interface + ABCICode func() ABCICodeType + ABCILog func() string + Code func() CodeType + Codespace func() CodespaceType + QueryResult func() abci.ResponseQuery + Result func() Result + TraceSDK func(format string, args ...interface{}) Error + WithDefaultCodespace func(CodespaceType) Error + func ErrInsufficientCoins(msg string) Error + func ErrInsufficientFunds(msg string) Error + func ErrInternal(msg string) Error + func ErrInvalidAddress(msg string) Error + func ErrInvalidCoins(msg string) Error + func ErrInvalidPubKey(msg string) Error + func ErrInvalidSequence(msg string) Error + func ErrMemoTooLarge(msg string) Error + func ErrOutOfGas(msg string) Error + func ErrTxDecode(msg string) Error + func ErrUnauthorized(msg string) Error + func ErrUnknownAddress(msg string) Error + func ErrUnknownRequest(msg string) Error + func NewError(codespace CodespaceType, code CodeType, format string, args ...interface{}) Error + type ErrorOutOfGas struct + Descriptor string + type Gas = int64 + type GasMeter interface + ConsumeGas func(amount Gas, descriptor string) + GasConsumed func() Gas + func NewGasMeter(limit Gas) GasMeter + func NewInfiniteGasMeter() GasMeter + type Handler func(ctx Context, msg Msg) Result + type InitChainer func(ctx Context, req abci.RequestInitChain) abci.ResponseInitChain + type Int struct + func MinInt(i1, i2 Int) Int + func NewInt(n int64) Int + func NewIntFromBigInt(i *big.Int) Int + func NewIntFromString(s string) (res Int, ok bool) + func NewIntWithDecimal(n int64, dec int) Int + func OneInt() Int + func ZeroInt() Int + func (i *Int) UnmarshalAmino(text string) error + func (i *Int) UnmarshalJSON(bz []byte) error + func (i Int) Add(i2 Int) (res Int) + func (i Int) AddRaw(i2 int64) Int + func (i Int) BigInt() *big.Int + func (i Int) Div(i2 Int) (res Int) + func (i Int) DivRaw(i2 int64) Int + func (i Int) Equal(i2 Int) bool + func (i Int) GT(i2 Int) bool + func (i Int) Int64() int64 + func (i Int) IsZero() bool + func (i Int) LT(i2 Int) bool + func (i Int) MarshalAmino() (string, error) + func (i Int) MarshalJSON() ([]byte, error) + func (i Int) Mul(i2 Int) (res Int) + func (i Int) MulRaw(i2 int64) Int + func (i Int) Neg() (res Int) + func (i Int) Sign() int + func (i Int) String() string + func (i Int) Sub(i2 Int) (res Int) + func (i Int) SubRaw(i2 int64) Int + type Iterator = dbm.Iterator + func KVStorePrefixIterator(kvs KVStore, prefix []byte) Iterator + func KVStoreReversePrefixIterator(kvs KVStore, prefix []byte) Iterator + type KVPair cmn.KVPair + type KVStore interface + Delete func(key []byte) + Get func(key []byte) []byte + Has func(key []byte) bool + Iterator func(start, end []byte) Iterator + Prefix func(prefix []byte) KVStore + ReverseIterator func(start, end []byte) Iterator + Set func(key, value []byte) + type KVStoreGetter interface + KVStore func(Context) KVStore + type KVStoreKey struct + func NewKVStoreKey(name string) *KVStoreKey + func (key *KVStoreKey) KVStore(ctx Context) KVStore + func (key *KVStoreKey) Name() string + func (key *KVStoreKey) String() string + type Msg interface + GetSignBytes func() []byte + GetSigners func() []AccAddress + Type func() string + ValidateBasic func() Error + type MultiStore interface + CacheMultiStore func() CacheMultiStore + GetKVStore func(StoreKey) KVStore + GetKVStoreWithGas func(GasMeter, StoreKey) KVStore + GetStore func(StoreKey) Store + ResetTraceContext func() MultiStore + TracingEnabled func() bool + WithTracer func(w io.Writer) MultiStore + WithTracingContext func(TraceContext) MultiStore + type Op struct + type PeerFilter func(info string) abci.ResponseQuery + type PrefixStoreGetter struct + func NewPrefixStoreGetter(key StoreKey, prefix []byte) PrefixStoreGetter + func (getter PrefixStoreGetter) KVStore(ctx Context) KVStore + type PruningStrategy uint8 + const PruneEverything + const PruneNothing + const PruneSyncable + type Queryable interface + Query func(abci.RequestQuery) abci.ResponseQuery + type Rat struct + func MinRat(r1, r2 Rat) Rat + func NewRat(Numerator int64, Denominator ...int64) Rat + func NewRatFromBigInt(num *big.Int, denom ...*big.Int) Rat + func NewRatFromInt(num Int, denom ...Int) Rat + func OneRat() Rat + func ZeroRat() Rat + func (r *Rat) UnmarshalAmino(text string) (err error) + func (r Rat) Add(r2 Rat) Rat + func (r Rat) Denom() Int + func (r Rat) Equal(r2 Rat) bool + func (r Rat) EvaluateBig() *big.Int + func (r Rat) FloatString() string + func (r Rat) GT(r2 Rat) bool + func (r Rat) GTE(r2 Rat) bool + func (r Rat) IsZero() bool + func (r Rat) LT(r2 Rat) bool + func (r Rat) LTE(r2 Rat) bool + func (r Rat) MarshalAmino() (string, error) + func (r Rat) Mul(r2 Rat) Rat + func (r Rat) Num() Int + func (r Rat) Quo(r2 Rat) Rat + func (r Rat) Round(precisionFactor int64) Rat + func (r Rat) RoundInt() Int + func (r Rat) RoundInt64() int64 + func (r Rat) String() string + func (r Rat) Sub(r2 Rat) Rat + func (r Rat) ToLeftPadded(totalDigits int8) string + type Result struct + Code ABCICodeType + Data []byte + FeeAmount int64 + FeeDenom string + GasUsed int64 + GasWanted int64 + Log string + Tags Tags + func (res Result) IsOK() bool + type Store interface + GetStoreType func() StoreType + type StoreKey interface + Name func() string + String func() string + type StoreType int + const StoreTypeDB + const StoreTypeIAVL + const StoreTypeMulti + const StoreTypePrefix + type Tag = cmn.KVPair + func MakeTag(k string, v []byte) Tag + type Tags cmn.KVPairs + func EmptyTags() Tags + func NewTags(tags ...interface{}) Tags + func (t Tags) AppendTag(k string, v []byte) Tags + func (t Tags) AppendTags(tags Tags) Tags + func (t Tags) ToKVPairs() []cmn.KVPair + type TestMsg struct + func NewTestMsg(addrs ...AccAddress) *TestMsg + func (msg *TestMsg) GetSignBytes() []byte + func (msg *TestMsg) GetSigners() []AccAddress + func (msg *TestMsg) Type() string + func (msg *TestMsg) ValidateBasic() Error + type TraceContext map[string]interface + type Tx interface + GetMsgs func() []Msg + type TxDecoder func(txBytes []byte) (Tx, Error) + type Uint struct + func MinUint(i1, i2 Uint) Uint + func NewUint(n uint64) Uint + func NewUintFromBigInt(i *big.Int) Uint + func NewUintFromString(s string) (res Uint, ok bool) + func NewUintWithDecimal(n int64, dec int) Uint + func OneUint() Uint + func ZeroUint() Uint + func (i *Uint) UnmarshalAmino(text string) error + func (i *Uint) UnmarshalJSON(bz []byte) error + func (i Uint) Add(i2 Uint) (res Uint) + func (i Uint) AddRaw(i2 uint64) Uint + func (i Uint) BigInt() *big.Int + func (i Uint) Div(i2 Uint) (res Uint) + func (i Uint) DivRaw(i2 uint64) Uint + func (i Uint) Equal(i2 Uint) bool + func (i Uint) GT(i2 Uint) bool + func (i Uint) IsZero() bool + func (i Uint) LT(i2 Uint) bool + func (i Uint) MarshalAmino() (string, error) + func (i Uint) MarshalJSON() ([]byte, error) + func (i Uint) Mul(i2 Uint) (res Uint) + func (i Uint) MulRaw(i2 uint64) Uint + func (i Uint) Sign() int + func (i Uint) Sub(i2 Uint) (res Uint) + func (i Uint) SubRaw(i2 uint64) Uint + func (i Uint) Uint64() uint64 + type ValAddress []byte + func ValAddressFromBech32(address string) (addr ValAddress, err error) + func ValAddressFromHex(address string) (addr ValAddress, err error) + func (bz *ValAddress) Unmarshal(data []byte) error + func (bz *ValAddress) UnmarshalJSON(data []byte) error + func (bz ValAddress) Bytes() []byte + func (bz ValAddress) Format(s fmt.State, verb rune) + func (bz ValAddress) Marshal() ([]byte, error) + func (bz ValAddress) MarshalJSON() ([]byte, error) + func (bz ValAddress) String() string + type Validator interface + GetBondHeight func() int64 + GetDelegatorShares func() Rat + GetMoniker func() string + GetOwner func() AccAddress + GetPower func() Rat + GetPubKey func() crypto.PubKey + GetRevoked func() bool + GetStatus func() BondStatus + type ValidatorSet interface + IterateValidators func(Context, func(index int64, validator Validator) (stop bool)) + IterateValidatorsBonded func(Context, func(index int64, validator Validator) (stop bool)) + Revoke func(Context, crypto.PubKey) + Slash func(Context, crypto.PubKey, int64, int64, Rat) + TotalPower func(Context) Rat + Unrevoke func(Context, crypto.PubKey) + Validator func(Context, AccAddress) Validator + ValidatorByPubKey func(Context, crypto.PubKey) Validator