cmds

package
v2.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: GPL-3.0 Imports: 59 Imported by: 0

Documentation

Overview

Package cmds provides command line tools.

Index

Constants

View Source
const (
	ProcessNameDigestAPI      = "digest_api"
	ProcessNameStartDigestAPI = "start_digest_api"
	HookNameSetLocalChannel   = "set_local_channel"
)
View Source
const (
	PNameDigester            = ps.Name("digester")
	PNameStartDigester       = ps.Name("start_digester")
	HookNameDigesterFollowUp = ps.Name("followup_digester")
)
View Source
const ProcessNameDigestDatabase = "digest_database"

Variables

View Source
var (
	ContextValueDigestDesign   util.ContextKey = "digest_design"
	ContextValueDigestDatabase util.ContextKey = "digest_database"
	ContextValueDigestNetwork  util.ContextKey = "digest_network"
	ContextValueDigester       util.ContextKey = "digester"
	ContextValueLocalNetwork   util.ContextKey = "local_network"
)
View Source
var (
	DefaultDigestAPICache *url.URL
	DefaultDigestAPIBind  string
	DefaultDigestAPIURL   string
)
View Source
var (
	DefaultDigestURL  = "https://localhost:4430"
	DefaultDigestBind = "https://0.0.0.0:4430"
)
View Source
var (
	PNameDigest           = ps.Name("digest")
	PNameDigestStart      = ps.Name("digest_star")
	PNameMongoDBsDataBase = ps.Name("mongodb_database")
	PNameDigestDataBase   = ps.Name("digest_database")
)
View Source
var (
	PNameDigestDesign           = ps.Name("digest-design")
	PNameOperationProcessorsMap = ps.Name("mitum-currency-operation-processors-map")
	PNameGenerateGenesis        = ps.Name("mitum-currency-generate-genesis")
	PNameDigestAPIHandlers      = ps.Name("mitum-currency-digest-api-handlers")
	PNameDigesterFollowUp       = ps.Name("mitum-currency-followup_digester")
	BEncoderContextKey          = util.ContextKey("bencoder")
)
View Source
var KeyAddressVars = kong.Vars{
	"create_account_threshold": "100",
}
View Source
var SupportedProposalOperationFactHinters []encoder.DecodeDetail

Functions

func DefaultINITPS

func DefaultINITPS() *ps.PS

func DefaultRunPS

func DefaultRunPS() *ps.PS

func GenerateED25519Privatekey

func GenerateED25519Privatekey() (ed25519.PrivateKey, error)

func GenerateTLSCerts

func GenerateTLSCerts(host string, key ed25519.PrivateKey) ([]tls.Certificate, error)

func GenerateTLSCertsPair

func GenerateTLSCertsPair(host string, key ed25519.PrivateKey) (*pem.Block, *pem.Block, error)

func IsSupportedProposalOperationFactHintFunc

func IsSupportedProposalOperationFactHintFunc() func(hint.Hint) bool

func LoadFromStdInput

func LoadFromStdInput() ([]byte, error)

func LoadHinters

func LoadHinters(enc encoder.Encoder) error

func NewSendHandler

func NewSendHandler(
	priv base.Privatekey,
	networkID base.NetworkID,
	f func() (*isaacnetwork.QuicstreamClient, *quicmemberlist.Memberlist, error),
) func(interface{}) (base.Operation, error)

func NewbaseCommand

func NewbaseCommand() *baseCommand

func PAddHinters

func PAddHinters(ctx context.Context) (context.Context, error)

func PEncoder

func PEncoder(ctx context.Context) (context.Context, error)

func PGenerateGenesis

func PGenerateGenesis(ctx context.Context) (context.Context, error)

func PLoadDigestDesign

func PLoadDigestDesign(ctx context.Context) (context.Context, error)

func PNetworkHandlers

func PNetworkHandlers(pctx context.Context) (context.Context, error)

func POperationProcessorsMap

func POperationProcessorsMap(ctx context.Context) (context.Context, error)

func PdigesterFollowUp

func PdigesterFollowUp(ctx context.Context) (context.Context, error)

func PrettyPrint

func PrettyPrint(out io.Writer, i interface{})

func ProcessDatabase

func ProcessDatabase(ctx context.Context) (context.Context, error)

func ProcessDigestAPI

func ProcessDigestAPI(ctx context.Context) (context.Context, error)

func ProcessDigestDatabase

func ProcessDigestDatabase(ctx context.Context) (context.Context, error)

func ProcessDigester

func ProcessDigester(ctx context.Context) (context.Context, error)

func ProcessStartDigestAPI

func ProcessStartDigestAPI(ctx context.Context) (context.Context, error)

func ProcessStartDigester

func ProcessStartDigester(ctx context.Context) (context.Context, error)

func Readlines

func Readlines(r io.Reader, callback func([]byte) error) error

func SendOperationFilterFunc

func SendOperationFilterFunc(ctx context.Context) (
	func(base.Operation) (bool, error),
	error,
)

func Writeline

func Writeline(w io.Writer, get func() ([]byte, error)) error

Types

type AccountKeysDesign

type AccountKeysDesign struct {
	Threshold  uint
	KeysDesign []*KeyDesign             `yaml:"keys"`
	Keys       currency.BaseAccountKeys `yaml:"-"`
	Address    currency.Address         `yaml:"-"`
}

func (*AccountKeysDesign) IsValid

func (akd *AccountKeysDesign) IsValid([]byte) error

type AddressFlag

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

func (*AddressFlag) Encode

func (v *AddressFlag) Encode(enc encoder.Encoder) (base.Address, error)

func (*AddressFlag) String

func (v *AddressFlag) String() string

func (*AddressFlag) UnmarshalText

func (v *AddressFlag) UnmarshalText(b []byte) error

type BigFlag

type BigFlag struct {
	currency.Big
}

func (*BigFlag) UnmarshalText

func (v *BigFlag) UnmarshalText(b []byte) error

type CreateAccountCommand

type CreateAccountCommand struct {
	OperationFlags
	Sender      AddressFlag          `arg:"" name:"sender" help:"sender address" required:"true"`
	Threshold   uint                 `help:"threshold for keys (default: ${create_account_threshold})" default:"${create_account_threshold}"` // nolint
	Keys        []KeyFlag            `name:"key" help:"key for new account (ex: \"<public key>,<weight>\")" sep:"@"`
	Amounts     []CurrencyAmountFlag `arg:"" name:"currency-amount" help:"amount (ex: \"<currency>,<amount>\")"`
	AddressType string               `help:"address type for new account select mitum or ether" default:"mitum"`
	// contains filtered or unexported fields
}

func NewCreateAccountCommand

func NewCreateAccountCommand() CreateAccountCommand

func (*CreateAccountCommand) Run

func (cmd *CreateAccountCommand) Run(pctx context.Context) error

type CurrencyAmountFlag

type CurrencyAmountFlag struct {
	CID currency.CurrencyID
	Big currency.Big
}

func (*CurrencyAmountFlag) String

func (v *CurrencyAmountFlag) String() string

func (*CurrencyAmountFlag) UnmarshalText

func (v *CurrencyAmountFlag) UnmarshalText(b []byte) error

type CurrencyDesign

type CurrencyDesign struct {
	CurrencyString             *string         `yaml:"currency"`
	BalanceString              *string         `yaml:"balance"`
	NewAccountMinBalanceString *string         `yaml:"new-account-min-balance"`
	Feeer                      *FeeerDesign    `yaml:"feeer"`
	Balance                    currency.Amount `yaml:"-"`
	NewAccountMinBalance       currency.Big    `yaml:"-"`
}

func (*CurrencyDesign) IsValid

func (de *CurrencyDesign) IsValid([]byte) error

type CurrencyDesignFlags

type CurrencyDesignFlags struct {
	Currency                CurrencyIDFlag `arg:"" name:"currency-id" help:"currency id" required:"true"`
	GenesisAmount           BigFlag        `arg:"" name:"genesis-amount" help:"genesis amount" required:"true"`
	GenesisAccount          AddressFlag    `arg:"" name:"genesis-account" help:"genesis-account address for genesis balance" required:"true"` // nolint lll
	CurrencyPolicyFlags     `prefix:"policy-" help:"currency policy" required:"true"`
	FeeerString             string `name:"feeer" help:"feeer type, {nil, fixed, ratio}" required:"true"`
	CurrencyFixedFeeerFlags `prefix:"feeer-fixed-" help:"fixed feeer"`
	CurrencyRatioFeeerFlags `prefix:"feeer-ratio-" help:"ratio feeer"`
	// contains filtered or unexported fields
}

func (*CurrencyDesignFlags) IsValid

func (fl *CurrencyDesignFlags) IsValid([]byte) error

type CurrencyFixedFeeerFlags

type CurrencyFixedFeeerFlags struct {
	Receiver AddressFlag `name:"receiver" help:"fee receiver account address"`
	Amount   BigFlag     `name:"amount" help:"fee amount"`
	// contains filtered or unexported fields
}

func (*CurrencyFixedFeeerFlags) IsValid

func (fl *CurrencyFixedFeeerFlags) IsValid([]byte) error

type CurrencyIDFlag

type CurrencyIDFlag struct {
	CID currency.CurrencyID
}

func (*CurrencyIDFlag) String

func (v *CurrencyIDFlag) String() string

func (*CurrencyIDFlag) UnmarshalText

func (v *CurrencyIDFlag) UnmarshalText(b []byte) error

type CurrencyPolicyFlags

type CurrencyPolicyFlags struct {
	NewAccountMinBalance BigFlag `name:"new-account-min-balance" help:"minimum balance for new account"` // nolint lll
}

func (*CurrencyPolicyFlags) IsValid

func (*CurrencyPolicyFlags) IsValid([]byte) error

type CurrencyPolicyUpdaterCommand

type CurrencyPolicyUpdaterCommand struct {
	OperationFlags
	Currency                CurrencyIDFlag `arg:"" name:"currency-id" help:"currency id" required:"true"`
	CurrencyPolicyFlags     `prefix:"policy-" help:"currency policy" required:"true"`
	FeeerString             string `name:"feeer" help:"feeer type, {nil, fixed, ratio}" required:"true"`
	CurrencyFixedFeeerFlags `prefix:"feeer-fixed-" help:"fixed feeer"`
	CurrencyRatioFeeerFlags `prefix:"feeer-ratio-" help:"ratio feeer"`
	Node                    AddressFlag `arg:"" name:"node" help:"node address" required:"true"`
	// contains filtered or unexported fields
}

func NewCurrencyPolicyUpdaterCommand

func NewCurrencyPolicyUpdaterCommand() CurrencyPolicyUpdaterCommand

func (*CurrencyPolicyUpdaterCommand) Run

type CurrencyRatioFeeerFlags

type CurrencyRatioFeeerFlags struct {
	Receiver AddressFlag `name:"receiver" help:"fee receiver account address"`
	Ratio    float64     `name:"ratio" help:"fee ratio, multifly by operation amount"`
	Min      BigFlag     `name:"min" help:"minimum fee"`
	Max      BigFlag     `name:"max" help:"maximum fee"`
	// contains filtered or unexported fields
}

func (*CurrencyRatioFeeerFlags) IsValid

func (fl *CurrencyRatioFeeerFlags) IsValid([]byte) error

type CurrencyRegisterCommand

type CurrencyRegisterCommand struct {
	OperationFlags
	CurrencyDesignFlags
	Node AddressFlag `arg:"" name:"node" help:"node address" required:"true"`
	// contains filtered or unexported fields
}

func NewCurrencyRegisterCommand

func NewCurrencyRegisterCommand() CurrencyRegisterCommand

func (*CurrencyRegisterCommand) Run

type DesignYAMLUnmarshaler

type DesignYAMLUnmarshaler struct {
	NetworkYAML  map[string]interface{} `yaml:"network"`
	CacheYAML    *string                `yaml:"cache"`
	DatabaseYAML map[string]interface{} `yaml:"database"`
}

type DigestDesign

type DigestDesign struct {
	NetworkYAML  *LocalNetwork        `yaml:"network,omitempty"`
	CacheYAML    *string              `yaml:"cache,omitempty"`
	DatabaseYAML *config.DatabaseYAML `yaml:"database"`
	// contains filtered or unexported fields
}

func DigestDesignFromFile

func DigestDesignFromFile(f string, enc *jsonenc.Encoder) (d DigestDesign, _ []byte, _ error)

func (*DigestDesign) Cache

func (no *DigestDesign) Cache() *url.URL

func (*DigestDesign) Database

func (no *DigestDesign) Database() config.BaseDatabase

func (*DigestDesign) DecodeYAML

func (d *DigestDesign) DecodeYAML(b []byte, enc *jsonenc.Encoder) error

func (DigestDesign) MarshalZerologObject

func (d DigestDesign) MarshalZerologObject(e *zerolog.Event)

func (*DigestDesign) Network

func (no *DigestDesign) Network() config.LocalNetwork

func (*DigestDesign) Set

type DigestYAMLUnmarshaler

type DigestYAMLUnmarshaler struct {
	Design DesignYAMLUnmarshaler `yaml:"digest"`
}

type FeeerDesign

type FeeerDesign struct {
	Type   string
	Extras map[string]interface{} `yaml:",inline"`
}

FeeerDesign is used for genesis currencies and naturally it's receiver is genesis account

func (*FeeerDesign) IsValid

func (no *FeeerDesign) IsValid([]byte) error

type GenesisBlockGenerator

type GenesisBlockGenerator struct {
	*logging.Logging
	// contains filtered or unexported fields
}

func NewGenesisBlockGenerator

func NewGenesisBlockGenerator(
	local base.LocalNode,
	networkID base.NetworkID,
	enc encoder.Encoder,
	db isaac.Database,
	dataroot string,
	facts []base.Fact,
) *GenesisBlockGenerator

func (*GenesisBlockGenerator) Generate

func (g *GenesisBlockGenerator) Generate() (base.BlockMap, error)

type GenesisCurrenciesDesign

type GenesisCurrenciesDesign struct {
	AccountKeys *AccountKeysDesign `yaml:"account-keys"`
	Currencies  []*CurrencyDesign  `yaml:"currencies"`
}

func (*GenesisCurrenciesDesign) IsValid

func (de *GenesisCurrenciesDesign) IsValid([]byte) error

type INITCommand

type INITCommand struct {
	GenesisDesign string `arg:"" name:"genesis design" help:"genesis design" type:"filepath"`
	Vault         string `name:"vault" help:"privatekey path of vault"`
	launch.DesignFlag
	launch.DevFlags `embed:"" prefix:"dev."`
}

func NewINITCommand

func NewINITCommand() INITCommand

func (*INITCommand) Run

func (cmd *INITCommand) Run(pctx context.Context) error

type ImportCommand

type ImportCommand struct {
	launch.DesignFlag
	From  string `arg:"" name:"from directory" help:"block data directory to import" type:"existingdir"`
	Vault string `name:"vault" help:"privatekey path of vault"`

	launch.DevFlags `embed:"" prefix:"dev."`
	// contains filtered or unexported fields
}

func NewImportCommand

func NewImportCommand() ImportCommand

func (*ImportCommand) Run

func (cmd *ImportCommand) Run(pctx context.Context) error

type KeyAddressCommand

type KeyAddressCommand struct {
	Threshold uint `` // nolint
	/* 126-byte string literal not displayed */
	Keys        []KeyFlag `arg:"" name:"key" help:"key for address (ex: \"<public key>,<weight>\")" sep:"@" optional:""`
	AddressType string    `help:"key type for address. select btc or ether" default:"btc"`
	// contains filtered or unexported fields
}

func NewKeyAddressCommand

func NewKeyAddressCommand() KeyAddressCommand

func (*KeyAddressCommand) Run

func (cmd *KeyAddressCommand) Run(pctx context.Context) error

type KeyCommand

type KeyCommand struct {
	New     KeyNewCommand     `cmd:"" help:"generate new key"`
	Address KeyAddressCommand `cmd:"" help:"generate address from key"`
	Load    KeyLoadCommand    `cmd:"" help:"load key"`
	Sign    KeySignCommand    `cmd:"" help:"sign"`
}

func NewKeyCommand

func NewKeyCommand() KeyCommand

type KeyDesign

type KeyDesign struct {
	PublickeyString string `yaml:"publickey"`
	Weight          uint
	Key             currency.BaseAccountKey `yaml:"-"`
}

func (*KeyDesign) IsValid

func (kd *KeyDesign) IsValid([]byte) error

type KeyFlag

type KeyFlag struct {
	Key currency.BaseAccountKey
}

func (*KeyFlag) UnmarshalText

func (v *KeyFlag) UnmarshalText(b []byte) error

type KeyLoadCommand

type KeyLoadCommand struct {
	KeyString string `arg:"" name:"key string" help:"key string"`
	// contains filtered or unexported fields
}

func NewKeyLoadCommand

func NewKeyLoadCommand() KeyLoadCommand

func (*KeyLoadCommand) Run

func (cmd *KeyLoadCommand) Run(pctx context.Context) error

type KeyNewCommand

type KeyNewCommand struct {
	Seed    string `arg:"" name:"seed" optional:"" help:"seed for generating key"`
	KeyType string `help:"select btc or ether" default:"btc"`
	// contains filtered or unexported fields
}

func NewKeyNewCommand

func NewKeyNewCommand() KeyNewCommand

func (*KeyNewCommand) Run

func (cmd *KeyNewCommand) Run(pctx context.Context) error

type KeySignCommand

type KeySignCommand struct {
	KeyString string             `arg:"" name:"privatekey" help:"privatekey string"`
	NetworkID string             `arg:"" name:"network-id" help:"network-id"`
	Body      *os.File           `arg:"" help:"body"`
	Node      launch.AddressFlag `help:"node address"`
	Token     string             `help:"set fact token"`
	// contains filtered or unexported fields
}

func NewKeySignCommand

func NewKeySignCommand() KeySignCommand

func (*KeySignCommand) Run

func (cmd *KeySignCommand) Run(pctx context.Context) error

type KeyUpdaterCommand

type KeyUpdaterCommand struct {
	OperationFlags
	Target    AddressFlag    `arg:"" name:"target" help:"target address" required:"true"`
	Threshold uint           `help:"threshold for keys (default: ${create_account_threshold})" default:"${create_account_threshold}"` // nolint
	Keys      []KeyFlag      `name:"key" help:"key for new account (ex: \"<public key>,<weight>\")" sep:"@"`
	Currency  CurrencyIDFlag `arg:"" name:"currency-id" help:"currency id" required:"true"`
	// contains filtered or unexported fields
}

func NewKeyUpdaterCommand

func NewKeyUpdaterCommand() KeyUpdaterCommand

func (*KeyUpdaterCommand) Run

func (cmd *KeyUpdaterCommand) Run(pctx context.Context) error

type LocalNetwork

type LocalNetwork struct {
	Bind        *string `yaml:"bind"`
	URL         *string `yaml:"url"`
	CertKeyFile *string `yaml:"cert-key,omitempty"`
	CertFile    *string `yaml:"cert,omitempty"`
	Cache       *string `yaml:",omitempty"`
	SealCache   *string `yaml:"seal-cache,omitempty"`
}

func (LocalNetwork) Set

type NetworkClientCommand

type NetworkClientCommand struct {
	Header    string              `arg:"" help:"request header; 'example' will print example headers"`
	NetworkID string              `arg:"" name:"network-id" help:"network-id" default:""`
	Remote    launch.ConnInfoFlag `arg:"" help:"remote node conn info" placeholder:"ConnInfo" default:"localhost:4321"`
	Timeout   time.Duration       `help:"timeout" placeholder:"duration" default:"10s"`
	Body      *os.File            `help:"body"`
	DryRun    bool                `name:"dry-run" help:"don't send"`
	// contains filtered or unexported fields
}

func NewNetworkClientCommand

func NewNetworkClientCommand() NetworkClientCommand

func (*NetworkClientCommand) Run

func (cmd *NetworkClientCommand) Run(pctx context.Context) error

type NetworkCommand

type NetworkCommand struct {
	Client NetworkClientCommand `cmd:"" help:"network client"`
}

func NewNetworkCommand

func NewNetworkCommand() NetworkCommand

type NetworkIDFlag

type NetworkIDFlag []byte

func (NetworkIDFlag) NetworkID

func (v NetworkIDFlag) NetworkID() base.NetworkID

func (*NetworkIDFlag) UnmarshalText

func (v *NetworkIDFlag) UnmarshalText(b []byte) error

type NilReadCloser

type NilReadCloser struct {
	io.Reader
}

func NewNilReadCloser

func NewNilReadCloser(r io.Reader) NilReadCloser

func (NilReadCloser) Close

func (NilReadCloser) Close() error

type OperationCommand

type OperationCommand struct {
	CreateAccount         CreateAccountCommand         `cmd:"" name:"create-account" help:"create new account"`
	KeyUpdater            KeyUpdaterCommand            `cmd:"" name:"key-updater" help:"update account keys"`
	Transfer              TransferCommand              `cmd:"" name:"transfer" help:"transfer"`
	CurrencyRegister      CurrencyRegisterCommand      `cmd:"" name:"currency-register" help:"register new currency"`
	CurrencyPolicyUpdater CurrencyPolicyUpdaterCommand `cmd:"" name:"currency-policy-updater" help:"update currency policy"`
	SuffrageInflation     SuffrageInflationCommand     `cmd:"" name:"suffrage-inflation" help:"suffrage inflation operation"`
	SuffrageCandidate     SuffrageCandidateCommand     `cmd:"" name:"suffrage-candidate" help:"suffrage candidate operation"`
	SuffrageJoin          SuffrageJoinCommand          `cmd:"" name:"suffrage-join" help:"suffrage join operation"`
	SuffrageDisjoin       SuffrageDisjoinCommand       `cmd:"" name:"suffrage-disjoin" help:"suffrage disjoin operation"` // revive:disable-line:line-length-limit
}

func NewOperationCommand

func NewOperationCommand() OperationCommand

type OperationFlags

type OperationFlags struct {
	Privatekey PrivatekeyFlag `arg:"" name:"privatekey" help:"privatekey to sign operation" required:"true"`
	Token      string         `help:"token for operation" optional:""`
	NetworkID  NetworkIDFlag  `name:"network-id" help:"network-id" required:"true"`
	Pretty     bool           `name:"pretty" help:"pretty format"`
}

func (*OperationFlags) IsValid

func (op *OperationFlags) IsValid([]byte) error

type PrivatekeyFlag

type PrivatekeyFlag struct {
	base.Privatekey
	// contains filtered or unexported fields
}

func (PrivatekeyFlag) Empty

func (v PrivatekeyFlag) Empty() bool

func (*PrivatekeyFlag) UnmarshalText

func (v *PrivatekeyFlag) UnmarshalText(b []byte) error

type PublickeyFlag

type PublickeyFlag struct {
	base.Publickey
	// contains filtered or unexported fields
}

func (PublickeyFlag) Empty

func (v PublickeyFlag) Empty() bool

func (*PublickeyFlag) UnmarshalText

func (v *PublickeyFlag) UnmarshalText(b []byte) error

type RunCommand

type RunCommand struct {
	launch.DesignFlag
	launch.DevFlags `embed:"" prefix:"dev."`
	Vault           string                `name:"vault" help:"privatekey path of vault"`
	Discovery       []launch.ConnInfoFlag `help:"member discovery" placeholder:"ConnInfo"`
	Hold            launch.HeightFlag     `help:"hold consensus states"`
	HTTPState       string                `name:"http-state" help:"runtime statistics thru https" placeholder:"bind address"`
	// contains filtered or unexported fields
}

func NewRunCommand

func NewRunCommand() RunCommand

func (*RunCommand) Run

func (cmd *RunCommand) Run(pctx context.Context) error

type StringLoad

type StringLoad []byte

func (StringLoad) Bytes

func (v StringLoad) Bytes() []byte

func (StringLoad) String

func (v StringLoad) String() string

func (*StringLoad) UnmarshalText

func (v *StringLoad) UnmarshalText(b []byte) error

type SuffrageCandidateCommand

type SuffrageCandidateCommand struct {
	OperationFlags
	Node      AddressFlag   `arg:"" name:"node" help:"node address" required:"true"`
	PublicKey PublickeyFlag `arg:"" name:"public-key" help:"public key" required:"true"`
	// contains filtered or unexported fields
}

func NewSuffrageCandidateCommand

func NewSuffrageCandidateCommand() SuffrageCandidateCommand

func (*SuffrageCandidateCommand) Run

type SuffrageDisjoinCommand

type SuffrageDisjoinCommand struct {
	OperationFlags
	Node  AddressFlag `arg:"" name:"node" help:"node address" required:"true"`
	Start base.Height `arg:"" name:"height" help:"block height" required:"true"`
	// contains filtered or unexported fields
}

func NewSuffrageDisjoinCommand

func NewSuffrageDisjoinCommand() SuffrageDisjoinCommand

func (*SuffrageDisjoinCommand) Run

type SuffrageInflationCommand

type SuffrageInflationCommand struct {
	OperationFlags
	Node AddressFlag `arg:"" name:"node" help:"node address" required:"true"`

	Items []SuffrageInflationItemFlag `arg:"" name:"inflation item" help:"ex: \"<receiver address>,<currency>,<amount>\""`
	// contains filtered or unexported fields
}

func NewSuffrageInflationCommand

func NewSuffrageInflationCommand() SuffrageInflationCommand

func (*SuffrageInflationCommand) Run

type SuffrageInflationItemFlag

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

func (*SuffrageInflationItemFlag) IsValid

func (v *SuffrageInflationItemFlag) IsValid([]byte) error

func (*SuffrageInflationItemFlag) String

func (v *SuffrageInflationItemFlag) String() string

func (*SuffrageInflationItemFlag) UnmarshalText

func (v *SuffrageInflationItemFlag) UnmarshalText(b []byte) error

type SuffrageJoinCommand

type SuffrageJoinCommand struct {
	OperationFlags
	Node  AddressFlag `arg:"" name:"node" help:"node address" required:"true"`
	Start base.Height `arg:"" name:"height" help:"block height" required:"true"`
	// contains filtered or unexported fields
}

func NewSuffrageJoinCommand

func NewSuffrageJoinCommand() SuffrageJoinCommand

func (*SuffrageJoinCommand) Run

func (cmd *SuffrageJoinCommand) Run(pctx context.Context) error

type TransferCommand

type TransferCommand struct {
	OperationFlags
	Sender   AddressFlag          `arg:"" name:"sender" help:"sender address" required:"true"`
	Receiver AddressFlag          `arg:"" name:"receiver" help:"receiver address" required:"true"`
	Amounts  []CurrencyAmountFlag `arg:"" name:"currency-amount" help:"amount (ex: \"<currency>,<amount>\")"`
	// contains filtered or unexported fields
}

func NewTransferCommand

func NewTransferCommand() TransferCommand

func (*TransferCommand) Run

func (cmd *TransferCommand) Run(pctx context.Context) error

Jump to

Keyboard shortcuts

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