Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: w3n query #261

Merged
merged 5 commits into from
Jul 19, 2023
Merged

doc: w3n query #261

merged 5 commits into from
Jul 19, 2023

Conversation

weichweich
Copy link
Contributor

fixes https://github.com/KILTprotocol/ticket/issues/2780

  • add query DID by w3n snipped
  • improve w3n release guide (hopefully)

🤖

@weichweich weichweich requested a review from ntn-x2 July 18, 2023 07:28
@aws-amplify-eu-central-1
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-261.d3oeht7cvddn19.amplifyapp.com

docs/develop/01_sdk/02_cookbook/02_web3names/03_release.md Outdated Show resolved Hide resolved
* **submitterAccount**: The keyring pair of the submitter.
* **signCallback**: The sign extrinsic callback function. This function is used to sign the extrinsic, read more that in [the SignCallback section](../07_signCallback.md).

The function `releaseWeb3Name` uses the KILT SDK to create a *web3name release transaction* using `api.tx.web3Names.releaseByOwner`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the right direction to go? We would not be able to catch any of these inconsistencies if the naming changes, at some point. What about adding comments to the code snippet directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think adding comments to the code make it less readable. e.g. hard to spot what is actually going on, finding the function calls in between all the comments.
Yes this can get outdated, but I would hope that not only the code example is checked when there is an error, but also the guide where the code is used. 😓

</TsJsBlock>

In the code example above, the `queryDidDocument` function takes a web3Name parameter, which represents the web3name to be resolved.
It internally uses the `api.call.did.queryByWeb3Name` method to query the information of the provided web3name from the blockchain.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

@weichweich weichweich merged commit a5fd437 into master Jul 19, 2023
6 checks passed
@weichweich weichweich deleted the aw-w3n-query branch July 19, 2023 07:47
Dudleyneedham pushed a commit that referenced this pull request Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants