Documentation
¶
Overview ¶
Dedicated to my love, Lexi.
Index ¶
- Constants
- Variables
- func BroadcastHandler(cfg *BroadcastCfg) (*ctypes.ResultBroadcastTxCommit, error)
- func ExecSignAndBroadcast(cfg *MakeTxCfg, args []string, tx std.Tx, io commands.IO) error
- func GenerateMnemonic(entropySize int) (string, error)
- func GenerateMnemonicWithCustomEntropy(io commands.IO, masked bool) (string, error)
- func NewAddBech32Cmd(rootCfg *AddCfg, io commands.IO) *commands.Command
- func NewAddCmd(rootCfg *BaseCfg, io commands.IO) *commands.Command
- func NewAddLedgerCmd(cfg *AddCfg, io commands.IO) *commands.Command
- func NewAddMultisigCmd(rootCfg *AddCfg, io commands.IO) *commands.Command
- func NewBroadcastCmd(rootCfg *BaseCfg, io commands.IO) *commands.Command
- func NewDeleteCmd(rootCfg *BaseCfg, io commands.IO) *commands.Command
- func NewExportCmd(rootCfg *BaseCfg, io commands.IO) *commands.Command
- func NewGenerateCmd(rootCfg *BaseCfg, io commands.IO) *commands.Command
- func NewImportCmd(rootCfg *BaseCfg, io commands.IO) *commands.Command
- func NewListCmd(rootCfg *BaseCfg, io commands.IO) *commands.Command
- func NewMakeSendCmd(rootCfg *MakeTxCfg, io commands.IO) *commands.Command
- func NewMakeTxCmd(rootCfg *BaseCfg, io commands.IO) *commands.Command
- func NewMultisignCmd(rootCfg *BaseCfg, io commands.IO) *commands.Command
- func NewQueryCmd(rootCfg *BaseCfg, io commands.IO) *commands.Command
- func NewRootCmdWithBaseConfig(io commands.IO, base BaseOptions) *commands.Command
- func NewRotateCmd(rootCfg *BaseCfg, io commands.IO) *commands.Command
- func NewSignCmd(rootCfg *BaseCfg, io commands.IO) *commands.Command
- func NewVerifyCmd(rootCfg *BaseCfg, io commands.IO) *commands.Command
- func NewVersionCmd(rootCfg *BaseCfg, io commands.IO) *commands.Command
- func QueryHandler(cfg *QueryCfg) (*ctypes.ResultABCIQuery, error)
- func SignAndBroadcastHandler(cfg *MakeTxCfg, nameOrBech32 string, tx std.Tx, pass string) (*types.ResultBroadcastTxCommit, error)
- func SimulateTx(cli client.ABCIClient, tx []byte) (*ctypes.ResultBroadcastTxCommit, error)
- type AddBech32Cfg
- type AddCfg
- type AddMultisigCfg
- type BaseCfg
- type BaseOptions
- type BroadcastCfg
- type DeleteCfg
- type ExportCfg
- type GenerateCfg
- type ImportCfg
- type MakeSendCfg
- type MakeTxCfg
- type MultisignCfg
- type QueryCfg
- type RotateCfg
- type SignCfg
- type VerifyCfg
Constants ¶
View Source
const ( SimulateTest = "test" SimulateSkip = "skip" SimulateOnly = "only" )
These are the valid options for MakeTxConfig.Simulate.
View Source
const ( // MinEntropyChars is the minimum number of characters required for custom entropy // Calculated as: ceil(180 / log2(10+24)) = 36 // This ensures at least 180 bits of entropy when using alphanumeric characters MinEntropyChars = 36 )
Variables ¶
View Source
var DefaultBaseOptions = BaseOptions{ Home: "", Remote: "127.0.0.1:26657", Quiet: false, InsecurePasswordStdin: false, Config: "", }
Functions ¶
func BroadcastHandler ¶
func BroadcastHandler(cfg *BroadcastCfg) (*ctypes.ResultBroadcastTxCommit, error)
func ExecSignAndBroadcast ¶
func GenerateMnemonic ¶
GenerateMnemonic generates a new BIP39 mnemonic using the provided entropy size
func GenerateMnemonicWithCustomEntropy ¶
GenerateMnemonicWithCustomEntropy generates a BIP39 mnemonic using user-provided entropy instead of computer PRNG
func NewAddBech32Cmd ¶
NewAddBech32Cmd creates a gnokey add bech32 command
func NewAddLedgerCmd ¶
NewAddLedgerCmd creates a gnokey add ledger command
func NewAddMultisigCmd ¶
NewAddMultisigCmd creates a gnokey add multisig command
func NewRootCmdWithBaseConfig ¶
func NewRootCmdWithBaseConfig(io commands.IO, base BaseOptions) *commands.Command
func QueryHandler ¶
func QueryHandler(cfg *QueryCfg) (*ctypes.ResultABCIQuery, error)
func SignAndBroadcastHandler ¶
func SimulateTx ¶
func SimulateTx(cli client.ABCIClient, tx []byte) (*ctypes.ResultBroadcastTxCommit, error)
Types ¶
type AddBech32Cfg ¶
func (*AddBech32Cfg) RegisterFlags ¶
func (c *AddBech32Cfg) RegisterFlags(fs *flag.FlagSet)
type AddCfg ¶
type AddCfg struct {
RootCfg *BaseCfg
Recover bool
NoBackup bool
Account uint64
Index uint64
Entropy bool
Masked bool
DerivationPath commands.StringArr
}
func (*AddCfg) RegisterFlags ¶
type AddMultisigCfg ¶
type AddMultisigCfg struct {
RootCfg *AddCfg
NoSort bool
Multisig commands.StringArr
MultisigThreshold int
}
func (*AddMultisigCfg) RegisterFlags ¶
func (c *AddMultisigCfg) RegisterFlags(fs *flag.FlagSet)
type BaseOptions ¶
type BaseOptions struct {
Home string
Remote string
Quiet bool
InsecurePasswordStdin bool
Config string
// OnTxSuccess is called when the transaction tx succeeds. It can, for example,
// print info in the result. If OnTxSuccess is nil, print basic info.
OnTxSuccess func(tx std.Tx, res *ctypes.ResultBroadcastTxCommit)
}
type BroadcastCfg ¶
func (*BroadcastCfg) RegisterFlags ¶
func (c *BroadcastCfg) RegisterFlags(fs *flag.FlagSet)
type DeleteCfg ¶
func (*DeleteCfg) RegisterFlags ¶
type ExportCfg ¶
func (*ExportCfg) RegisterFlags ¶
type GenerateCfg ¶
func (*GenerateCfg) RegisterFlags ¶
func (c *GenerateCfg) RegisterFlags(fs *flag.FlagSet)
type ImportCfg ¶
func (*ImportCfg) RegisterFlags ¶
type MakeSendCfg ¶
func (*MakeSendCfg) RegisterFlags ¶
func (c *MakeSendCfg) RegisterFlags(fs *flag.FlagSet)
type MakeTxCfg ¶
type MakeTxCfg struct {
RootCfg *BaseCfg
GasWanted int64
GasFee string
Memo string
Broadcast bool
// Valid options are SimulateTest, SimulateSkip or SimulateOnly.
Simulate string
ChainID string
}
func (*MakeTxCfg) RegisterFlags ¶
type MultisignCfg ¶
func (*MultisignCfg) RegisterFlags ¶
func (c *MultisignCfg) RegisterFlags(fs *flag.FlagSet)
type QueryCfg ¶
func (*QueryCfg) RegisterFlags ¶
type RotateCfg ¶
func (*RotateCfg) RegisterFlags ¶
type SignCfg ¶
type SignCfg struct {
RootCfg *BaseCfg
TxPath string
ChainID string
AccountNumber uint64
Sequence uint64
NameOrBech32 string
OutputDocument string
}
func (*SignCfg) RegisterFlags ¶
type VerifyCfg ¶
type VerifyCfg struct {
RootCfg *BaseCfg
SigPath string
TxPath string
ChainID string
AccountNumber commands.Uint64Flag
AccountSequence commands.Uint64Flag
}
func (*VerifyCfg) RegisterFlags ¶
Click to show internal directories.
Click to hide internal directories.