2024-02-15 07:08:32 +00:00
|
|
|
package module
|
|
|
|
|
|
|
|
import (
|
|
|
|
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
|
|
|
|
"cosmossdk.io/client/v2/autocli"
|
2024-02-16 06:40:42 +00:00
|
|
|
|
|
|
|
registryv1 "git.vdb.to/cerc-io/laconic2d/api/cerc/registry/v1"
|
2024-02-15 07:08:32 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
var _ autocli.HasAutoCLIConfig = AppModule{}
|
|
|
|
|
|
|
|
// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface.
|
|
|
|
func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
|
|
|
return &autocliv1.ModuleOptions{
|
2024-02-16 06:40:42 +00:00
|
|
|
Query: &autocliv1.ServiceCommandDescriptor{
|
|
|
|
Service: registryv1.Query_ServiceDesc.ServiceName,
|
|
|
|
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
|
|
|
{
|
|
|
|
RpcMethod: "Params",
|
|
|
|
Use: "params",
|
|
|
|
Short: "Get the current registry parameters",
|
|
|
|
PositionalArgs: []*autocliv1.PositionalArgDescriptor{},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
RpcMethod: "Records",
|
|
|
|
Use: "list",
|
|
|
|
Short: "List records",
|
|
|
|
PositionalArgs: []*autocliv1.PositionalArgDescriptor{},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
RpcMethod: "GetRecord",
|
|
|
|
Use: "get [record-id]",
|
|
|
|
Short: "Get record info by record id",
|
|
|
|
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
|
|
|
{ProtoField: "id"},
|
|
|
|
},
|
|
|
|
},
|
2024-02-16 06:48:43 +00:00
|
|
|
{
|
|
|
|
RpcMethod: "GetRecordsByBondId",
|
|
|
|
Use: "get-records-by-bond-id [bond-id]",
|
|
|
|
Short: "Get records by bond id",
|
|
|
|
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
|
|
|
{ProtoField: "id"},
|
|
|
|
},
|
|
|
|
},
|
2024-02-16 09:32:52 +00:00
|
|
|
{
|
|
|
|
RpcMethod: "Whois",
|
|
|
|
Use: "whois [name]",
|
|
|
|
Short: "Get name authority info",
|
|
|
|
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
|
|
|
{ProtoField: "name"},
|
|
|
|
},
|
|
|
|
},
|
2024-02-16 06:40:42 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
Tx: &autocliv1.ServiceCommandDescriptor{
|
2024-02-16 09:32:52 +00:00
|
|
|
Service: registryv1.Msg_ServiceDesc.ServiceName,
|
|
|
|
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
|
|
|
{
|
|
|
|
RpcMethod: "ReserveName",
|
|
|
|
Use: "reserve-name [name] [owner]",
|
|
|
|
Short: "Reserve name",
|
|
|
|
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
|
|
|
{ProtoField: "name"},
|
|
|
|
{ProtoField: "owner"},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2024-02-16 06:40:42 +00:00
|
|
|
EnhanceCustomCommand: true, // Allow additional manual commands
|
|
|
|
},
|
2024-02-15 07:08:32 +00:00
|
|
|
}
|
|
|
|
}
|