Command Line Client
Using the AutoCLI, you will easily set up the CLI client for transactions and queries.
Query
Update the autocli to allow someone to get the name of a wallet account.
x/nameservice/autocli.go
Query: &autocliv1.ServiceCommandDescriptor{
Service: modulev1.Query_ServiceDesc.ServiceName,
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
{
RpcMethod: "ResolveName",
Use: "resolve [wallet]",
Short: "Resolve the name of a wallet address",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
{ProtoField: "wallet"},
},
},
{
RpcMethod: "Params",
Use: "params",
Short: "Query the current module parameters",
},
},
},
AutoCLI Query
Transaction
Also add interaction in x/nameservice/autocli.go
to set the name of a wallet account.
x/nameservice/autocli.go
Tx: &autocliv1.ServiceCommandDescriptor{
Service: modulev1.Msg_ServiceDesc.ServiceName,
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
{
RpcMethod: "SetServiceName",
Use: "set [name]",
Short: "Set the mapping to your wallet address",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
{ProtoField: "name"},
},
},
{
// NOTE: this is already included in the current source
RpcMethod: "UpdateParams",
Skip: false,
},
},
},