Skip to main content

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.
Preview feature — pending external audit, and enabled per deployment. The React SDK does not yet expose dedicated portal hooks; use the underlying SDK via usePrivacyBoost(). Dedicated hooks are planned.

Accessing the portal API

usePrivacyBoost() returns the underlying TypeScript SDK instance, which exposes the high-level sdk.portal resource (create, list, deposits, status, sweep, reclaim, withdraw, delegateAddress). The full method surface, types, and launch limitations are documented in the TypeScript Portal Deposits guide.
import { usePrivacyBoost } from '@sunnyside-io/privacy-boost-react';

function CreatePortalButton() {
  const sdk = usePrivacyBoost();

  const createPortal = async () => {
    if (!sdk) return;
    if (!sdk.portal.delegateAddress()) {
      throw new Error('This server does not support portal deposits.');
    }
    const portal = await sdk.portal.create();
    console.log('Deposit address:', portal.address); // share this publicly
  };

  return <button onClick={createPortal}>Create portal</button>;
}
List portals and deposits the same way — sdk.portal.list(), sdk.portal.deposits(address), sdk.portal.status(address) — from a hook or handler. See the TypeScript guide for every method and the launch limitations.

Next steps