Use session signers
Once your user’s have session signers on their wallets, your app can take actions on their behalf. This is done by sending requests to the Privy API to sign transactions with the user’s wallet. Follow the guide below to get started with signing transactions on behalf of users.
Requesting signatures
Wallets provisioned for session signers can be used to transact and sign messages on behalf of a user from your server.
To get started, configure the NodeJS SDK or the REST API. This is how your application will make requests to the Privy API to sign transactions on behalf of users.
Once you have configured the NodeJS SDK or REST API, your application can send both Ethereum and Solana transactions from a users wallet. Follow the NodeJS or REST API guides in the Using wallets
section to learn more about signing requests with wallets.
Getting wallets
From your server, you can query Privy to determine what wallets have been provisioned session signers by a given user to allow your app to take actions on their behalf.
Use the Privy client’s getUser
method to get the user object for your user. As a parameter to this method, pass the user’s DID as a string
:
To get a list of the user’s wallets with session signers, first find all of the user’s embedded wallets from the user’s linked accounts. Filter the user.linkedAccounts
array for wallet entries with type: 'wallet'
and delegated: true
:
This constitutes the user’s wallets with session signers. Wallets with session signers will always have the delegated
flag set to true
.
For wallets included in this array, your app may make requests to Privy to execute actions on Solana or EVM networks on behalf of the user.
Use the Privy client’s getUser
method to get the user object for your user. As a parameter to this method, pass the user’s DID as a string
:
To get a list of the user’s wallets with session signers, first find all of the user’s embedded wallets from the user’s linked accounts. Filter the user.linkedAccounts
array for wallet entries with type: 'wallet'
and delegated: true
:
This constitutes the user’s wallets with session signers. Wallets with session signers will always have the delegated
flag set to true
.
For wallets included in this array, your app may make requests to Privy to execute actions on Solana or EVM networks on behalf of the user.
Make a GET
request to:
Replace <did>
with your desired Privy DID. It should have the format did:privy:XXXXXX
.
Below is a sample cURL command for this request:
Then, to get a list of the user’s delegated wallets, inspect the linked_accounts
field of the response body for all entries with the fields type: 'wallet'
and delegated: true
.