Widget Views

We provide several UI components out-of-the-box with our SDK that allow for the quickest integration and functionality.

Authentication Widget

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.

Checkout Widget

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.

Wallet Widget

To give your users a wallet to interact with, see tokens, NFTs, transaction history, etc. use the following code:

await peaze.getWallet();
View token balances, buy/sell, swap, etc.

View token balances, buy/sell, swap, etc.

View NFTs

View NFTs

View transaction history

View transaction history