Portal Deposit Addresses
Give a user a reusable, public, exchange-style deposit address that credits into their shielded balance. See Portal Deposit Addresses for the concept and trust model.usePortal
usePortal() wraps the sdk.portal resource. It loads every portal of the
account, paging through listPage for you, and exposes each action with the
shared { loading, error } contract. Portals are bound to the chain the root
SDK was configured for, so the hook always reads the root client and does not
follow the provider’s active client.
The listing needs the keys in memory, not just a signed-in session: every portal
is re-derived from the account’s keys rather than trusted from the server. A
returning user who signs in comes back locked, so portals stays empty, with no
error, until the first write or an explicit unlock. Offer the unlock on the
portal screen; the hook loads the list as soon as the keys are back:
listPage, depositsPage, status, sweep, reclaim
and withdraw. See
usePortal() for the full return shape.
Reading the minimum deposit
CallsweepRequirements() from usePortal() when preparing the deposit
display. Added in 1.3.0. It needs a connected
wallet and a valid read session, including a locked but readable session, and
does not unlock or request a signature.
Reaching the resource directly
usePrivacyBoost() returns the underlying TypeScript SDK instance, whose
sdk.portal resource is what the hook delegates to. Use it when you want to
drive paging yourself rather than hold the whole list in state. The full method
surface and types are documented in the
TypeScript Portal Deposits guide.
Next steps
- TypeScript Portal Deposits guide: full API
- Portal Deposits concept
usePortal(): the hook’s return shape