2024-07-01 06:05:28 +00:00
|
|
|
package module
|
|
|
|
|
|
|
|
import (
|
|
|
|
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
|
2024-07-03 11:38:48 +00:00
|
|
|
|
|
|
|
onboardingv1 "git.vdb.to/cerc-io/laconicd/api/cerc/onboarding/v1"
|
2024-07-01 06:05:28 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface.
|
|
|
|
func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
|
|
|
return &autocliv1.ModuleOptions{
|
2024-07-04 05:23:26 +00:00
|
|
|
Query: &autocliv1.ServiceCommandDescriptor{
|
|
|
|
Service: onboardingv1.Query_ServiceDesc.ServiceName,
|
|
|
|
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
|
|
|
{
|
|
|
|
RpcMethod: "Participants",
|
|
|
|
Use: "list",
|
|
|
|
Short: "List participants",
|
|
|
|
PositionalArgs: []*autocliv1.PositionalArgDescriptor{},
|
|
|
|
},
|
2024-07-29 10:28:30 +00:00
|
|
|
{
|
|
|
|
RpcMethod: "GetParticipantByAddress",
|
|
|
|
Use: "get-by-address [address]",
|
|
|
|
Short: "Get participant by address",
|
|
|
|
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
|
|
|
{ProtoField: "address"},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
RpcMethod: "GetParticipantByNitroAddress",
|
|
|
|
Use: "get-by-nitro-address [nitro_address]",
|
|
|
|
Short: "Get participant by nitro address",
|
|
|
|
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
|
|
|
{ProtoField: "nitro_address"},
|
|
|
|
},
|
|
|
|
},
|
2024-07-04 05:23:26 +00:00
|
|
|
},
|
|
|
|
},
|
2024-07-03 11:38:48 +00:00
|
|
|
// TODO: Use JSON file for input
|
|
|
|
Tx: &autocliv1.ServiceCommandDescriptor{
|
|
|
|
Service: onboardingv1.Msg_ServiceDesc.ServiceName,
|
|
|
|
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
|
|
|
{
|
|
|
|
RpcMethod: "OnboardParticipant",
|
2024-07-26 14:42:40 +00:00
|
|
|
Use: "enroll [eth_payload] [eth_signature] [role] [kyc_id]",
|
2024-07-03 11:38:48 +00:00
|
|
|
Short: "Enroll a testnet validator",
|
|
|
|
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
2024-07-04 05:23:26 +00:00
|
|
|
{ProtoField: "eth_payload"},
|
|
|
|
{ProtoField: "eth_signature"},
|
2024-07-26 14:42:40 +00:00
|
|
|
{ProtoField: "role"},
|
|
|
|
{ProtoField: "kyc_id"},
|
2024-07-03 11:38:48 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2024-07-01 06:05:28 +00:00
|
|
|
}
|
|
|
|
}
|