client

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0, UNKNOWN, UNKNOWN not legal advice Imports: 0 Imported by: 0

Documentation

Overview

Dedicated to my love, Lexi.

Index

Constants

View Source
const (
	SimulateTest = "test"
	SimulateSkip = "skip"
	SimulateOnly = "only"
)

These are the valid options for MakeTxConfig.Simulate.

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 ExecSignAndBroadcast(
	cfg *MakeTxCfg,
	args []string,
	tx std.Tx,
	io commands.IO,
) error

func GenerateMnemonic

func GenerateMnemonic(entropySize int) (string, error)

GenerateMnemonic generates a new BIP39 mnemonic using the provided entropy size

func NewAddBech32Cmd

func NewAddBech32Cmd(rootCfg *AddCfg, io commands.IO) *commands.Command

NewAddBech32Cmd creates a gnokey add bech32 command

func NewAddCmd

func NewAddCmd(rootCfg *BaseCfg, io commands.IO) *commands.Command

func NewAddLedgerCmd

func NewAddLedgerCmd(cfg *AddCfg, io commands.IO) *commands.Command

NewAddLedgerCmd creates a gnokey add ledger command

func NewAddMultisigCmd

func NewAddMultisigCmd(rootCfg *AddCfg, io commands.IO) *commands.Command

NewAddMultisigCmd creates a gnokey add multisig command

func NewBroadcastCmd

func NewBroadcastCmd(rootCfg *BaseCfg, io commands.IO) *commands.Command

func NewDeleteCmd

func NewDeleteCmd(rootCfg *BaseCfg, io commands.IO) *commands.Command

func NewExportCmd

func NewExportCmd(rootCfg *BaseCfg, io commands.IO) *commands.Command

func NewGenerateCmd

func NewGenerateCmd(rootCfg *BaseCfg, io commands.IO) *commands.Command

func NewImportCmd

func NewImportCmd(rootCfg *BaseCfg, io commands.IO) *commands.Command

func NewListCmd

func NewListCmd(rootCfg *BaseCfg, io commands.IO) *commands.Command

func NewMakeSendCmd

func NewMakeSendCmd(rootCfg *MakeTxCfg, io commands.IO) *commands.Command

func NewMakeTxCmd

func NewMakeTxCmd(rootCfg *BaseCfg, io commands.IO) *commands.Command

func NewQueryCmd

func NewQueryCmd(rootCfg *BaseCfg, io commands.IO) *commands.Command

func NewRootCmdWithBaseConfig

func NewRootCmdWithBaseConfig(io commands.IO, base BaseOptions) *commands.Command

func NewRotateCmd

func NewRotateCmd(rootCfg *BaseCfg, io commands.IO) *commands.Command

func NewSignCmd

func NewSignCmd(rootCfg *BaseCfg, io commands.IO) *commands.Command

func NewVerifyCmd

func NewVerifyCmd(rootCfg *BaseCfg, io commands.IO) *commands.Command

func QueryHandler

func QueryHandler(cfg *QueryCfg) (*ctypes.ResultABCIQuery, error)

func SignAndBroadcastHandler

func SignAndBroadcastHandler(
	cfg *MakeTxCfg,
	nameOrBech32 string,
	tx std.Tx,
	pass string,
) (*types.ResultBroadcastTxCommit, error)

func SimulateTx

func SimulateTx(cli client.ABCIClient, tx []byte) (*ctypes.ResultBroadcastTxCommit, error)

Types

type AddBech32Cfg

type AddBech32Cfg struct {
	RootCfg *AddCfg

	PublicKey string
}

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

	DerivationPath commands.StringArr
}

func (*AddCfg) RegisterFlags

func (c *AddCfg) RegisterFlags(fs *flag.FlagSet)

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 BaseCfg

type BaseCfg struct {
	BaseOptions
}

func (*BaseCfg) RegisterFlags

func (c *BaseCfg) RegisterFlags(fs *flag.FlagSet)

type BaseOptions

type BaseOptions struct {
	Home                  string
	Remote                string
	Quiet                 bool
	InsecurePasswordStdin bool
	Config                string
}

type BroadcastCfg

type BroadcastCfg struct {
	RootCfg *BaseCfg

	DryRun bool
	// contains filtered or unexported fields
}

func (*BroadcastCfg) RegisterFlags

func (c *BroadcastCfg) RegisterFlags(fs *flag.FlagSet)

type DeleteCfg

type DeleteCfg struct {
	RootCfg *BaseCfg

	Yes   bool
	Force bool
}

func (*DeleteCfg) RegisterFlags

func (c *DeleteCfg) RegisterFlags(fs *flag.FlagSet)

type ExportCfg

type ExportCfg struct {
	RootCfg *BaseCfg

	NameOrBech32 string
	OutputPath   string
	Unsafe       bool
}

func (*ExportCfg) RegisterFlags

func (c *ExportCfg) RegisterFlags(fs *flag.FlagSet)

type GenerateCfg

type GenerateCfg struct {
	RootCfg *BaseCfg

	CustomEntropy bool
}

func (*GenerateCfg) RegisterFlags

func (c *GenerateCfg) RegisterFlags(fs *flag.FlagSet)

type ImportCfg

type ImportCfg struct {
	RootCfg *BaseCfg

	KeyName   string
	ArmorPath string
	Unsafe    bool
}

func (*ImportCfg) RegisterFlags

func (c *ImportCfg) RegisterFlags(fs *flag.FlagSet)

type MakeSendCfg

type MakeSendCfg struct {
	RootCfg *MakeTxCfg

	Send string
	To   string
}

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

func (c *MakeTxCfg) RegisterFlags(fs *flag.FlagSet)

func (*MakeTxCfg) Validate

func (c *MakeTxCfg) Validate() error

type QueryCfg

type QueryCfg struct {
	RootCfg *BaseCfg

	Data string
	Path string
}

func (*QueryCfg) RegisterFlags

func (c *QueryCfg) RegisterFlags(fs *flag.FlagSet)

type RotateCfg

type RotateCfg struct {
	RootCfg *BaseCfg

	Force bool
}

func (*RotateCfg) RegisterFlags

func (c *RotateCfg) RegisterFlags(fs *flag.FlagSet)

type SignCfg

type SignCfg struct {
	RootCfg *BaseCfg

	TxPath        string
	ChainID       string
	AccountNumber uint64
	Sequence      uint64
	NameOrBech32  string
}

func (*SignCfg) RegisterFlags

func (c *SignCfg) RegisterFlags(fs *flag.FlagSet)

type VerifyCfg

type VerifyCfg struct {
	RootCfg *BaseCfg

	DocPath string
}

func (*VerifyCfg) RegisterFlags

func (c *VerifyCfg) RegisterFlags(fs *flag.FlagSet)

Jump to

Keyboard shortcuts

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