Wallets created through Privy can either be used directly from a user’s device or from a server. To allow your server to transact on users wallets follow the guide below.

This guide assumes your application has already configured session signers in the Dashboard.

To provision server-side access for user’s wallets, use the addSessionSigners method from the useSessionSigners hook:

addSessionSigners: async ({address: string, signers: {signerId: string, overridePolicyIds: string[]}[]}) => Promise<{user: User}>

Usage

import {useSessionSigners} from '@privy-io/react-auth';
const {addSessionSigners} = useSessionSigners();

Parameters

The addSessionSigners method accepts a params object with the following fields:

address
string
required

Address of the embedded wallet to add a session signer to.

signers
object[]
required