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.
Reading every address
The per-chain getters above cover EVM, Solana and TRON. To get every address Portal has for the client — including Bitcoin, Stellar and XRP Ledger — useportal.getAddresses(). Like those getters, it requires an initialized Portal session, so call it once Portal is ready.
getAddresses reference for the full response shape.
getAddresses() types the XRP Ledger address (xrpl) starting from SDK version 4.1.0. Version 4.0.x already returns it at runtime but doesn’t type it, so read it there with the cast shown under AddressesByNamespace. The SDK only reads this address: signing on the XRP Ledger isn’t supported, even when this device holds the client’s SECP256K1 shares.
That’s it! You now have an MPC Wallet built into your web application.