Documentation ¶
Index ¶
- Variables
- func AddTxFlags(set *pflag.FlagSet)
- type WalletHandler
- func (w *WalletHandler) AsymmetricDecrypt(toDecrypt string) ([]byte, error)
- func (w *WalletHandler) AsymmetricEncrypt(toEncrypt []byte, pubKey *ecies.PublicKey) (string, error)
- func (w *WalletHandler) FindPubKey(address string) (*ecies.PublicKey, error)
- func (w *WalletHandler) GetAddress() string
- func (w *WalletHandler) GetChainID() string
- func (w *WalletHandler) GetClientCtx() client.Context
- func (w *WalletHandler) GetECIESPubKey() *ecies.PublicKey
- func (w *WalletHandler) GetPubKey() types.PubKey
- func (w *WalletHandler) SendTokens(toAddress string, amount types.Coins) (*types.TxResponse, error)
- func (w *WalletHandler) SendTx(msg ...types.Msg) (*types.TxResponse, error)
- func (w *WalletHandler) WithGas(gas string) *WalletHandler
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 ¶
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 (*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
Click to show internal directories.
Click to hide internal directories.