cosmos

package
v1.105.1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: MIT Imports: 15 Imported by: 0

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
	// nolint
	GetPubKeyFromBech32 = legacybech32.UnmarshalPubKey
	// nolint
	Bech32ifyPubKey         = legacybech32.MarshalPubKey
	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

func SignerCreds() (string, string)

Types

type AccAddress

type AccAddress = sdk.AccAddress

type Account

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

type Int = sdk.Int

type Iterator

type Iterator = sdk.Iterator

type KeybaseStore

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

KeybaseStore to store keys

func GetKeybase

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

type Route = sdk.Route

type StoreKey

type StoreKey = sdk.StoreKey

type TxResponse

type TxResponse = sdk.TxResponse

type Uint

type Uint = sdk.Uint

func RoundToDecimal

func RoundToDecimal(amt Uint, dec int64) Uint

RoundToDecimal round the given amt to the desire decimals

Jump to

Keyboard shortcuts

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