wallet_handler

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MIT Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Bech32Prefix = "jkl"
	// Bech32PrefixAccAddr defines the Bech32 prefix of an account's address
	Bech32PrefixAccAddr = Bech32Prefix
	// Bech32PrefixAccPub defines the Bech32 prefix of an account's public key
	Bech32PrefixAccPub = Bech32Prefix + sdk.PrefixPublic
	// Bech32PrefixValAddr defines the Bech32 prefix of a validator's operator address
	Bech32PrefixValAddr = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator
	// Bech32PrefixValPub defines the Bech32 prefix of a validator's operator public key
	Bech32PrefixValPub = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator + sdk.PrefixPublic
	// Bech32PrefixConsAddr defines the Bech32 prefix of a consensus node address
	Bech32PrefixConsAddr = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus
	// Bech32PrefixConsPub defines the Bech32 prefix of a consensus node public key
	Bech32PrefixConsPub = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus + sdk.PrefixPublic
)

Functions

func AddTxFlags

func AddTxFlags(set *pflag.FlagSet)

AddTxFlags adds common flags to a module tx command.

Types

type WalletHandler

type WalletHandler struct {
	// contains filtered or unexported fields
}

func DefaultWalletHandler

func DefaultWalletHandler(seedPhrase string) (*WalletHandler, error)

func NewWalletHandler

func NewWalletHandler(seedPhrase string, rpc string, chainId string) (*WalletHandler, error)

func (*WalletHandler) AsymmetricDecrypt

func (w *WalletHandler) AsymmetricDecrypt(toDecrypt string) ([]byte, error)

func (*WalletHandler) AsymmetricEncrypt

func (w *WalletHandler) AsymmetricEncrypt(toEncrypt []byte, pubKey *ecies.PublicKey) (string, error)

func (*WalletHandler) FindPubKey

func (w *WalletHandler) FindPubKey(address string) (*ecies.PublicKey, error)

func (*WalletHandler) GetAddress

func (w *WalletHandler) GetAddress() string

func (*WalletHandler) GetChainID

func (w *WalletHandler) GetChainID() string

func (*WalletHandler) GetClientCtx

func (w *WalletHandler) GetClientCtx() client.Context

func (*WalletHandler) GetECIESPubKey

func (w *WalletHandler) GetECIESPubKey() *ecies.PublicKey

func (*WalletHandler) GetPubKey

func (w *WalletHandler) GetPubKey() types.PubKey

func (*WalletHandler) SendTokens

func (w *WalletHandler) SendTokens(toAddress string, amount types.Coins) (*types.TxResponse, error)

func (*WalletHandler) SendTx

func (w *WalletHandler) SendTx(msg ...types.Msg) (*types.TxResponse, error)

func (*WalletHandler) WithGas

func (w *WalletHandler) WithGas(gas string) *WalletHandler

Jump to

Keyboard shortcuts

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