Skip to content

Commit 697c7e1

Browse files
author
Z User
committed
fix: correct rawSign API signature
Remove invalid user_jwts parameter from rawSign call. The official @privy-io/node SDK signature is: privy.wallets().rawSign(walletId, { params: { hash } }) Authorization for user-owned wallets is handled via PrivyClient initialization (appSecret), not through rawSign parameters. Fixes CodeRabbit review feedback on PR keep-starknet-strange#63.
1 parent f0ab079 commit 697c7e1

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

  • examples/privy-nextjs/app/api/wallet/sign

examples/privy-nextjs/app/api/wallet/sign/route.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,12 @@ export async function POST(request: NextRequest) {
6161
);
6262
}
6363

64-
// Call Privy's rawSign API with user authorization context
65-
// The user JWT is required for user-owned wallets
66-
const result = await privy.wallets().rawSign(
67-
walletId,
68-
{ user_jwts: [token] },
69-
{ params: { hash } }
70-
);
64+
// Call Privy's rawSign API
65+
// Note: Authorization for user-owned wallets is handled via PrivyClient initialization
66+
// The appSecret provides the necessary authorization context for server-side operations
67+
const result = await privy.wallets().rawSign(walletId, {
68+
params: { hash },
69+
});
7170

7271
return NextResponse.json({ signature: result.signature });
7372
} catch (error) {

0 commit comments

Comments
 (0)