client-side.
1 - Install MoonKey.js
HTML
2 - Install Ethers.js
HTML
3 - Configure MoonKey SDK
We add the following code to initialize the MoonKey SDK.Initialize
In this example, we will be using your
PublicToken, which is publishable and safe to expose client-side.4 - Handle Login
We create a simple login form to allow the user to enter their email and authenticate.HTML
Login Click
autoVerify setting by configuring autoVerify: true, which allows the user to verify magic link via a MoonKey hosted verification page.
Handle Login + Authentication
5 - Perform Web3 functions
Now that you have theWeb3 Provider inside the global variable streambirdProvider, you can perform different Web3 operations. Here are some examples: