Overview
An investor can hold their own key in an embedded wallet managed by Privy. Your front end embeds the Privy SDK, signs the investor into Privy with a DALP-issued JWT, and calls the Platform API to link the wallet, create the identity, deploy the smart wallet, and submit transfers. DALP prepares and broadcasts transactions but never holds the key.
Because Privy authenticates the investor from the DALP token, your front end needs no separate Privy login. Protect DALP sign-in with the same security posture as the wallet itself.
This guide covers the embedded-wallet path when an investor joins an organisation. See Onboard an investor through the API for managed custody and Let an investor choose custody for custody selection and browser wallets.
When the organisation's gas payer is a paymaster, transfers are sponsored and the smart wallet needs no native gas token. Otherwise the smart wallet pays its own gas, and preparing a transfer from an unfunded wallet returns DALP-14034 with shortfallWei. Fiat on-ramps and off-ramps stay inside Privy in your front end.
The sequence at a glance
Steps 1 and 2 happen before any wallet exists, and steps 3 to 5 repeat only until the investor is set up.
Embed the Privy SDK
Embed @privy-io/react-auth (the DALP Investor portal pins version 3.51.4). Wrap your application in PrivyProvider with these options:
appId(and optionalclientId): read dynamically from DALP in step 1, owned by either the deployment operator or the organisation.external:Wallets. disable All External Wallets true, so investors sign only with their embedded wallet.embedded:Wallets. ethereum. create On Login "off". Create the wallet explicitly when the investor reaches that step.supportedChainsanddefaultChain: set fromchainIdreturned byGET /api/.v2/ organizations/ {organization Id}/ joinable- participants
Set up Privy to trust DALP
Enable custom JWT-based authentication in the Privy dashboard:
<platform URL> must be publicly reachable so Privy can fetch the JWKS. The token's sub claim holds the investor's DALP user id.
Step 1: read the offered providers
Call GET /api/. It returns data (designated default or null) and options (every configuration offered to investors on the request's network, default first). Render options directly without applying local defaults or filters.
A Privy entry carries clientConfiguration with kind: "privy", tenant, appId, and optional clientId. If no option offers Privy, omit Privy from the UI (Which provider is offered).
Step 2: sign the investor in to Privy
With the investor's DALP session, call GET /api/, which returns {"token": "<jwt>"}. Pass a getter calling this route to use as getExternalJwt alongside isAuthenticated and isLoading. Privy verifies the JWT against GET /api/ and refreshes it by calling getExternalJwt again on expiry.
Once Privy reports the investor as authenticated, create the embedded Ethereum wallet. Use its address as signingAddress in step 3.
Step 3: create the participant and prove the key
Run these calls in order using the investor's DALP session:
GET /api/readsv2/ organizations/ {organization Id}/ joinable- participants chainId,aaEnabled, and any reusable participants.POST /api/withv2/ participants organizationId,providerConfigurationId, andwalletVerificationcreates a pending participant (skip if resuming one).GET /api/withv2/ users/ me/ custody- accounts participantIdlists existing accounts so you can reuse one already linked to Privy on this network.POST /api/withv2/ users/ me/ custody- account- control- preparations providerConfigurationId,participantId, andsigningAddressreturnsmessage,binding, andaccount.- Have the investor sign
messageas a personal message in Privy. POST /api/withv2/ users/ me/ custody- accounts/ lifecycles proof(binding,account, and JSON-encodedartifact:{"kind":"evm-),self- custody- control","signature":"<signature>"} walletVerification, andX-Step-Up-Challenge(fromPOST /api/, fetched automatically by the SDK) returnsv2/ step- up- challenges requestId. Prompt for a fresh code if step 2 consumed a single-use factor.- Poll
GET /api/(or appendv2/ users/ me/ custody- account- requests/ {request Id} /stream) untilstatereachessucceeded.
The account is ready once GET /api/ reports both accountLifecycle and contextLifecycle as active. See Step 3b of Let an investor choose custody for full request and response payloads.
Step 4: create the identity
Call GET /api/ with X-Participant, X-Custody-Account-Id, and X-Chain-Id. Treat both 200 (status: "NOT_) and 404 (IDENTITY_SCOPE_NOT_FOUND) as no identity.
If missing, call POST /api/ with wallet and walletVerification (prompting for a fresh code unless using a transaction PIN). The first call returns 409 (DALP-12389) carrying data.. Sign it with eth_signTypedData_v4 in Privy, resend with external, and wait for settlement (Idempotency and async settlement). Continue registration and KYC in Onboard an investor through the API from step 3.
Step 5: deploy the smart wallet
Skip this step when aaEnabled is false. Otherwise call POST /api/ with {}. Sign data. from the 409 response with Privy, then resend with external to receive the smart wallet address. No native gas token is required.
Step 6: send a sponsored transfer
A transfer runs in three calls:
- Prepare: Call
POST /api/withv2/ transaction- preparations custodyAccountId,execution,Mode: "prefer- aa" summary, andoperation(kind,contractAddress,callData, optionalvalue). The response returnspreparedUserOperation(userOperationHashandpreviewData). When paymaster sponsorship is active,previewDatacarriespaymasterandpaymasterData(valid for 300 seconds by default). - Sign: Build EIP-712 typed data from
previewDataforpreview(for example with viem'sData. entry Point Address get), confirm its hash matchesUser Operation Typed Data userOperationHash, and sign witheth_signTypedData_v4in Privy (plain message signing fails). - Finalise: Call
POST /api/with:v2/ transaction- preparations/ {preparation Id}/ transitions
{
"action": "finalize",
"artifact": {
"_tag": "Eip4337UserOperationAuthorization",
"kind": "eip-4337-user-operation",
"userOperationHash": "0x8a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f9",
"signature": "0x4c1d8f2a9b3e41c7a2f08d6e1b5c9a3f7d2e8b4a1c6f0d9e2a5b8c3d7f1e4a9b2c6d0e3f4a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a41c"
}
}Follow the returned transactionRequestId on GET /api/ until it reaches a terminal state.
Which provider is offered
The deployment controls which provider kinds exist via custody.. Each organisation chooses which enabled configurations investors see via offeredToInvestors, and designates one default via investorProvider. Offering Privy requires configuration only, with no code changes.
Errors
Steps 3 to 5 also return the refusals listed in The refusals each step returns.
See DALP error index and Read and handle DALP errors for full envelope details.
Next steps
- Onboard an investor through the API registers the identity and verifies the investor.
- Idempotency and async settlement covers headers and status polling.
- Custody Provider explains what each provider holds.