Documentation
¶
Overview ¶
Package cmds provides command line tools.
Index ¶
- Constants
- Variables
- func DefaultImportPS() *ps.PS
- func IsSupportedProposalOperationFactHintFunc() func(hint.Hint) bool
- func LoadHinters(encs *encoder.Encoders) error
- func PAddHinters(pctx context.Context) (context.Context, error)
- func POperationProcessorsMap(pctx context.Context) (context.Context, error)
- func PdigesterFollowUp(ctx context.Context) (context.Context, error)
- func ProcessDigester(ctx context.Context) (context.Context, error)
- func ProcessStartDigester(ctx context.Context) (context.Context, error)
- type BaseCommand
- type BaseNetworkClientCommand
- type CallContractCommand
- type ImportCommand
- type NetworkClientCommand
- type NetworkClientSendOperationCommand
- type NewOperationProcessorInternalWithProposalFunc
- type OperationFlags
- type RegisterContractCommand
- type RunCommand
- type SmartContractCommand
- type Storage
- type ValidateBlocksCommand
Constants ¶
View Source
const ( PNameDigester = ps.Name("digester") PNameStartDigester = ps.Name("start_digester") )
Variables ¶
View Source
var AddedHinters = []encoder.DecodeDetail{ {Hint: contract.RegisterContractHint, Instance: contract.RegisterContract{}}, {Hint: contract.CallContractHint, Instance: contract.CallContract{}}, {Hint: contract.CallContractItemHint, Instance: contract.CallContractItem{}}, {Hint: ptypes.DesignHint, Instance: ptypes.Design{}}, {Hint: pstate.DesignStateValueHint, Instance: pstate.DesignStateValue{}}, {Hint: pstate.RuntimeStateValueHint, Instance: pstate.RuntimeStateValue{}}, {Hint: pstate.SnapshotStateValueHint, Instance: pstate.SnapshotStateValue{}}, }
View Source
var AddedSupportedHinters = []encoder.DecodeDetail{ {Hint: contract.RegisterContractFactHint, Instance: contract.RegisterContractFact{}}, {Hint: contract.CallContractFactHint, Instance: contract.CallContractFact{}}, }
View Source
var Hinters []encoder.DecodeDetail
View Source
var PNameOperationProcessorsMap = ps.Name("mitum-smart-contract-operation-processors-map")
View Source
var PNameValidateBlocks = ps.Name("validate-blocks")
View Source
var SupportedProposalOperationFactHinters []encoder.DecodeDetail
Functions ¶
func DefaultImportPS ¶
func LoadHinters ¶
func POperationProcessorsMap ¶
Types ¶
type BaseCommand ¶
type BaseNetworkClientCommand ¶
type BaseNetworkClientCommand struct {
BaseCommand
launchcmd.BaseNetworkClientNodeInfoFlags
Client *isaacnetwork.BaseClient `kong:"-"`
ClientID string `name:"client-id" help:"client id"`
}
type CallContractCommand ¶
type CallContractCommand struct {
BaseCommand
OperationFlags
Sender ccmds.AddressFlag `arg:"" name:"sender" help:"sender address" required:"true"`
Contract ccmds.AddressFlag `arg:"" name:"contract" help:"contract account to register policy" required:"true"`
CallData *string `name:"calldata" help:"legacy single call data JSON object"`
Items *string `name:"items" help:"batch call items JSON array"`
ItemsFile *string `name:"items-file" help:"path to batch call items JSON array file" type:"filepath"`
Currency ccmds.CurrencyIDFlag `arg:"" name:"currency" help:"currency id" required:"true"`
// contains filtered or unexported fields
}
type ImportCommand ¶
type ImportCommand struct {
// revive:disable:line-length-limit
launch.DesignFlag
Source string `arg:"" name:"source directory" help:"block data directory to import" type:"existingdir"`
HeightRange launch.RangeFlag `name:"range" help:"<from>-<to>" default:""`
launch.PrivatekeyFlags
Do bool `name:"do" help:"really do import"`
CacheDirectory string `name:"cache-directory" help:"directory for remote block item file"`
launch.DevFlags `embed:"" prefix:"dev."`
// contains filtered or unexported fields
}
type NetworkClientCommand ¶
type NetworkClientCommand struct {
//revive:disable:line-length-limit
//revive:disable:nested-structs
NodeInfo launchcmd.NetworkClientNodeInfoCommand `cmd:"" name:"node-info" help:"remote node info"`
SendOperation NetworkClientSendOperationCommand `cmd:"" name:"send-operation" help:"send operation"`
State launchcmd.NetworkClientStateCommand `cmd:"" name:"state" help:"get state"`
LastBlockMap launchcmd.NetworkClientLastBlockMapCommand `cmd:"" name:"last-blockmap" help:"get last blockmap"`
Node struct {
Read launchcmd.NetworkClientReadNodeCommand `cmd:"" name:"read" help:"read node value"`
Write launchcmd.NetworkClientWriteNodeCommand `cmd:"" name:"write" help:"write node value"`
} `cmd:"" name:"node" help:""`
Event launchcmd.NetworkClientEventLoggingCommand `cmd:"" name:"event" help:"event log"`
}
type NetworkClientSendOperationCommand ¶
type NetworkClientSendOperationCommand struct {
BaseNetworkClientCommand
Input string `arg:"" name:"input" help:"input; default is stdin" default:"-"`
IsString bool `name:"input.is-string" help:"input is string, not file"`
}
type NewOperationProcessorInternalWithProposalFunc ¶
type NewOperationProcessorInternalWithProposalFunc func(base.Height, base.ProposalSignFact, base.GetStateFunc) (base.OperationProcessor, error)
type OperationFlags ¶
type OperationFlags struct {
Privatekey ccmds.PrivatekeyFlag `arg:"" name:"privatekey" help:"privatekey to sign operation" required:"true"`
Token string `help:"token for operation" optional:""`
NetworkID ccmds.NetworkIDFlag `name:"network-id" help:"network-id" required:"true" default:"${network_id}"`
Pretty bool `name:"pretty" help:"pretty format"`
}
func (*OperationFlags) IsValid ¶
func (op *OperationFlags) IsValid([]byte) error
type RegisterContractCommand ¶
type RegisterContractCommand struct {
BaseCommand
OperationFlags
Sender ccmds.AddressFlag `arg:"" name:"sender" help:"sender address" required:"true"`
Contract ccmds.AddressFlag `arg:"" name:"contract" help:"contract account to register policy" required:"true"`
Code string `arg:"" name:"contract-code" help:"contract code" type:"filepath"`
CallData string `name:"calldata" help:"call data" required:"true"`
Currency ccmds.CurrencyIDFlag `arg:"" name:"currency" help:"currency id" required:"true"`
// contains filtered or unexported fields
}
type RunCommand ¶
type RunCommand struct {
//revive:disable:line-length-limit
launch.DesignFlag
launch.DevFlags `embed:"" prefix:"dev."`
launch.PrivatekeyFlags
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"`
launch.ACLFlags
// contains filtered or unexported fields
}
type SmartContractCommand ¶
type SmartContractCommand struct {
RegisterContractCommand RegisterContractCommand `cmd:"" name:"register-contract" help:"register contract"`
CallContractCommand CallContractCommand `cmd:"" name:"call-contract" help:"call contract"`
}
type Storage ¶
type Storage struct {
Import ImportCommand `cmd:"" help:"import block data files"`
Clean launchcmd.CleanCommand `cmd:"" help:"clean storage"`
ValidateBlocks ValidateBlocksCommand `cmd:"" help:"validate blocks in storage"`
Status launchcmd.StorageStatusCommand `cmd:"" help:"storage status"`
Database launchcmd.DatabaseCommand `cmd:"" help:""`
}
type ValidateBlocksCommand ¶
type ValidateBlocksCommand struct {
launch.DesignFlag
launch.PrivatekeyFlags
HeightRange launch.RangeFlag `name:"range" help:"<from>-<to>" default:""`
launch.DevFlags `embed:"" prefix:"dev."`
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.