cosmos

package
v1.132.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2024 License: MIT Imports: 16 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DefaultCoinDecimals = 8

	EnvSignerName     = "SIGNER_NAME"
	EnvSignerPassword = "SIGNER_PASSWD"
	EnvChainHome      = "CHAIN_HOME_FOLDER"
)

Variables

View Source
var (
	KeyringServiceName           = sdk.KeyringServiceName
	NewRoute                     = sdk.NewRoute
	NewKVStoreKeys               = sdk.NewKVStoreKeys
	NewUint                      = sdk.NewUint
	ParseUint                    = sdk.ParseUint
	NewInt                       = sdk.NewInt
	NewDec                       = sdk.NewDec
	ZeroInt                      = sdk.ZeroInt
	ZeroUint                     = sdk.ZeroUint
	ZeroDec                      = sdk.ZeroDec
	OneUint                      = sdk.OneUint
	NewCoin                      = sdk.NewCoin
	NewCoins                     = sdk.NewCoins
	ParseCoins                   = sdk.ParseCoinsNormalized
	NewDecWithPrec               = sdk.NewDecWithPrec
	NewDecFromBigInt             = sdk.NewDecFromBigInt
	NewIntFromBigInt             = sdk.NewIntFromBigInt
	NewUintFromBigInt            = sdk.NewUintFromBigInt
	AccAddressFromBech32         = sdk.AccAddressFromBech32
	VerifyAddressFormat          = sdk.VerifyAddressFormat
	GetFromBech32                = sdk.GetFromBech32
	NewAttribute                 = sdk.NewAttribute
	NewDecFromStr                = sdk.NewDecFromStr
	GetConfig                    = sdk.GetConfig
	NewEvent                     = sdk.NewEvent
	RegisterCodec                = sdk.RegisterLegacyAminoCodec
	NewEventManager              = sdk.NewEventManager
	EventTypeMessage             = sdk.EventTypeMessage
	AttributeKeyModule           = sdk.AttributeKeyModule
	KVStorePrefixIterator        = sdk.KVStorePrefixIterator
	KVStoreReversePrefixIterator = sdk.KVStoreReversePrefixIterator
	NewKVStoreKey                = sdk.NewKVStoreKey
	NewTransientStoreKey         = sdk.NewTransientStoreKey
	StoreTypeTransient           = sdk.StoreTypeTransient
	StoreTypeIAVL                = sdk.StoreTypeIAVL
	NewContext                   = sdk.NewContext
	NewUintFromString            = sdk.NewUintFromString

	GetPubKeyFromBech32     = legacybech32.UnmarshalPubKey // nolint SA1019 deprecated
	Bech32ifyPubKey         = legacybech32.MarshalPubKey   // nolint SA1019 deprecated
	Bech32PubKeyTypeConsPub = legacybech32.ConsPK
	Bech32PubKeyTypeAccPub  = legacybech32.AccPK
	Wrapf                   = se.Wrapf
	MustSortJSON            = sdk.MustSortJSON
	CodeUnauthorized        = uint32(4)
	CodeInsufficientFunds   = uint32(5)
)

Functions

func ErrInsufficientCoins

func ErrInsufficientCoins(err error, msg string) error

func ErrInvalidAddress

func ErrInvalidAddress(addr string) error

func ErrInvalidCoins

func ErrInvalidCoins(msg string) error

func ErrUnauthorized

func ErrUnauthorized(msg string) error

func ErrUnknownRequest

func ErrUnknownRequest(msg string) error

func SignerCreds added in v0.41.0

func SignerCreds() (string, string)

Types

type AccAddress

type AccAddress = sdk.AccAddress

type Account added in v0.41.0

type Account = authtypes.AccountI

type Attribute

type Attribute = sdk.Attribute

type Coin

type Coin = sdk.Coin

type Coins

type Coins = sdk.Coins

type Context

type Context = sdk.Context

type Dec

type Dec = sdk.Dec

type Event

type Event = sdk.Event

type Events

type Events = sdk.Events

type Handler

type Handler = sdk.Handler

type Int added in v1.95.0

type Int = sdk.Int

type Iterator

type Iterator = sdk.Iterator

type KeybaseStore added in v0.41.0

type KeybaseStore struct {
	Keybase      ckeys.Keyring
	SignerName   string
	SignerPasswd string
}

KeybaseStore to store keys

func GetKeybase added in v0.41.0

func GetKeybase(thorchainHome string) (KeybaseStore, error)

GetKeybase will create an instance of Keybase

type Msg

type Msg = sdk.Msg

type Querier

type Querier = sdk.Querier

type Result

type Result = sdk.Result

type Route added in v0.41.0

type Route = sdk.Route

type StoreKey

type StoreKey = sdk.StoreKey

type TxResponse

type TxResponse = sdk.TxResponse

type Uint

type Uint = sdk.Uint

func MinUint added in v1.125.0

func MinUint(u1, u2 Uint) Uint

MinUint returns the minimum of two Uints.

func RoundToDecimal added in v0.41.0

func RoundToDecimal(amt Uint, dec int64) Uint

RoundToDecimal round the given amt to the desire decimals

func SafeUintFromInt64 added in v1.114.0

func SafeUintFromInt64(i int64) Uint

SafeUintFromInt64 create a new Uint from an int64. It is expected that the int64 is positive - if not, we log an error and return zero to prevent overflow errors.

func Sum added in v1.132.0

func Sum(u []Uint) Uint

Sum returns the sum of all the Uints in the slice.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL