Registering an essence can be implemented in just a few easy steps. What registering an essence essentially means is that the user will deploy an NFT contract by calling a couple of APIs.
First, data should be presented to the user in a readable format when signing from the wallet. To do that you’ll need to call the
createRegisterEssenceTypedDataAPI that takes care of this.
If you’re unfamiliar with typed data, you can read more about it here.
Second, once you received data in a readable format, you’ll need to get the user’s signature (
eth_signTypedData_v4) for it. Basically, you’ll need to write a function and pass it a
messageas a param and return the
signaturethat it’s necessary for the next step.
Third, you’ll have to call the
relayAPI that will broadcast the transaction and mint the essence NFT.
You can now verify the transaction by looking up the
txHash from the response on etherscan.io. That’s it! You’re all done!
Experiment in Sandbox
We’ve created an example that incorporates all the steps for Register Essence. Feel free to experiment with our code in the sandbox below. This covers a couple of steps
- Login with wallet
- Register Essence