Include restriction in name query results in CLI #806
Labels
CLI
Command line interface feature
enhancement
New feature or request
good first issue
Good for newcomers
name
Name Module
nice-to-have
Features not required in upcoming milestone
Milestone
Summary
The name service includes the attribute restricted on each NameRecord. When querying for a name from the name services using the CLI, this restricted attribute is not returned.
Command:
provenanced query name lookup <address name(s) bound to>
Current Result:
name:
- pb
- io
- pio
- provenance
pagination:
next_key: null
total: "0"
Problem Definition
The NameRecord.restricted boolean controls if this name can be extended and used as a parent name by any account or if it can just be extended using the name owner's account. As a Provenance SDK client, when creating a name it is important that I choose a parent/root name that that I am allowed to extend. Because the CLI does not provide the restricted attribute in the query results, it is only by trial and error creating and executing a transaction with a MsgBindNameRequest with desired root names as parent names until I did not receive a message similar to this:
UNKNOWN: failed to execute message; message index: 0: parent name is restricted and does not resolve to the provided parent address: invalid request: invalid request
Proposal
When using the CLI to query a name from the name service ("query name lookup"), include "restricted: " on each name returned.
For Admin Use
The text was updated successfully, but these errors were encountered: