We provide several UI components out-of-the-box with our SDK that allow for the quickest integration and functionality.
To authenticate your user and obtain a signer, use the following code:
const [signer, setSigner] = useState(); const signer = await peaze.getSigner(); setSigner(signer);
This will trigger the following UI to pop up:
Your logo and title will be in place of the Peaze logo and "Peaze Demo" title. You will also have the ability to configure the color of the call-to-action sign in button.
Note that we currently only support email authentication.
Once the user authenticates, you will have an ethers Signer object to use in your dapp.
When you make a write transaction request that interacts with the Peaze Signer object and has a non-zero value, the following UI will pop up:
Your logo and title will be in place of the Peaze logo. You will also have the ability to configure the color of the call-to-action pay button.
Once the user confirms, the on-ramp process will begin to fund the transaction (value and gas), and broadcast the signature to the blockchain.
To give your users a wallet to interact with, see tokens, NFTs, transaction history, etc. use the following code:
Updated 1 day ago