Skip to main content
Use Openfort as the wallet layer for Unlink accounts. Openfort signs the user in, creates a passkey-secured embedded EOA, and Unlink derives a non-custodial unlink1... account from that wallet.
By the end, the browser has registered a private Unlink account, the backend has issued only short-lived authorization tokens, and no server has handled the user’s Unlink spending key.

Prerequisites

  • An Openfort project with an Openfort publishable key, Openfort secret key, and Shield publishable key.
  • An Unlink project for monad-testnet, with the backend-only UNLINK_API_KEY stored on your server.
  • Packages: @unlink-xyz/sdk@canary, @openfort/react, @openfort/openfort-node, wagmi, @wagmi/core, @wagmi/connectors, viem, and @tanstack/react-query.
  • A Monad testnet RPC URL. If you continue into deposits, faucet funding, or private payments, also copy the token address configured for your Unlink project.

Configure Openfort

Wrap your React app with Openfort and wagmi. For this flow, configure an embedded EOA on Monad testnet.
After Openfort connects the embedded EOA, pass its EIP-1193 provider to account.fromWallet. Keep appId and chainId stable for returning users.
Call the helper from a screen where Openfort has connected the embedded wallet.

Mount the backend routes

Keep the Unlink admin API key on your server. Validate the Openfort bearer token, then mount the Unlink auth routes.
Do not return true unconditionally from authorizeUnlinkAddress outside a local throwaway demo. Persist the Openfort user id to Unlink address mapping in onRegister, and only mint tokens for addresses owned by the authenticated Openfort user.

What you built

The browser now has a non-custodial Unlink account backed by an Openfort embedded EOA:
From here, use the same client for balances, faucet funding, deposits, transfers, withdrawals, and execute(). For a complete invoice-payment demo that builds on this account setup, see Openfort’s private payments recipe. For the security model behind these routes, see Custody models and Accounts and keys.