Use KNS in your DApp
If you are looking to implement KNS in your DApp frontend, we recommend you follow the UI/UX guidelines for name services explained here.
Examples of how to resolve names and addresses using various libraries can be found here.
Resolving KNS names
The simplest and most effective way to integrate KNS in your DApp is to let users enter KNS names wherever they can enter KCC addresses. This is the single easiest way to greatly improve the UX of your application through KNS.
By accepting KNS names you eliminate the need for users to copy, remember, or type in long and error-prone addresses.
Address reverse resolution
The second-best improvement that KNS can bring to your app is to show human-readable names wherever you currently are displaying addresses. You can learn how to do reverse resolution here. If no primary/canonical name was set by the user, your application should display the address instead.
By supporting address reverse resolution you give users the ability to identify people and resources by name.
Last updated