Portal
, you can add logic to create web3 wallets.
The onReady hook
ThePortal
class dynamically loads a number of resources behind the scenes to enable MPC directly in the browser. For this reason, some functionality is not immediately available after initialization.
We have include an onReady
function to enable you to write your application logic in a more linear manner without having to explicitly poll the ready
state of your Portal
instance.
Wallet Creation
ThecreateWallet
function initiates the MPC process to create a set of shares. The user’s share and the wallet address is automatically stored in the browser’s local storage, but hidden from the main browser context of your web application.
Be sure to use a Production API key when creating clients for production. Read more details about going to production here.