Summary
The OnboardStrategy.Privy integration is missing a practical end-to-end example. The OnboardPrivyOptions.privy.resolve function requires returning { walletId, publicKey, rawSign? }, but there's no documentation on how to implement rawSign with Privy v3's server auth SDK (@privy-io/server-auth).
Problem
When building with Privy v3 (@privy-io/react-auth v3.x), the client-side wallet API differs significantly from earlier versions. Specifically:
- How to obtain
walletId from a Privy embedded Starknet wallet using v3 client SDK
- How to implement
rawSign(walletId, messageHash) using PrivyClient.walletApi.rpc with caip2: "starknet:SN_SEPOLIA"
- How to bridge the Privy auth token from client → server for signing
Suggested Fix
Add a complete Next.js App Router example showing:
// pages/api/sign.ts (server-side Privy signing proxy)
import { PrivyClient } from "@privy-io/server-auth";
const privy = new PrivyClient(appId, appSecret);
// rawSign implementation for StarkZap OnboardStrategy.Privy
async function rawSign(walletId: string, hash: string): Promise<string> {
const { data } = await (privy.walletApi.rpc as any)({
walletId,
method: "starknet_signMessage",
params: { message: hash },
caip2: "starknet:SN_SEPOLIA",
});
return data.signature;
}
Environment
starkzap v1.0.0
@privy-io/react-auth v3.15.0
@privy-io/server-auth v1.32.5
- Next.js 16 App Router
- Starknet Sepolia
Reference
Built this integration in StarkFolio (hackathon project): https://github.com/nagavaishak/StarkFolio
Summary
The
OnboardStrategy.Privyintegration is missing a practical end-to-end example. TheOnboardPrivyOptions.privy.resolvefunction requires returning{ walletId, publicKey, rawSign? }, but there's no documentation on how to implementrawSignwith Privy v3's server auth SDK (@privy-io/server-auth).Problem
When building with Privy v3 (
@privy-io/react-authv3.x), the client-side wallet API differs significantly from earlier versions. Specifically:walletIdfrom a Privy embedded Starknet wallet using v3 client SDKrawSign(walletId, messageHash)usingPrivyClient.walletApi.rpcwithcaip2: "starknet:SN_SEPOLIA"Suggested Fix
Add a complete Next.js App Router example showing:
Environment
starkzapv1.0.0@privy-io/react-authv3.15.0@privy-io/server-authv1.32.5Reference
Built this integration in StarkFolio (hackathon project): https://github.com/nagavaishak/StarkFolio