Add session signers
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:
Usage
Parameters
The addSessionSigners
method accepts a params
object with the following fields:
Address of the embedded wallet to add a session signer to.
Some wallets require the signers
array to be empty, in which case the signer added to the wallet will automatically be the key created when “Require signed requests” is turned on in the dashboard.
If the interface does not take any specified signers and the “Require signed requests” setting is not turned on in the dashboard, no signature will be required to make request on the wallet. If your wallets do not support setting signers via this interface, then we highly recommend toggling on “Require signed requests” for enhanced security.
To provision server-side access for user’s wallets, use the addSessionSigners
method from the useSessionSigners
hook:
Usage
Parameters
The addSessionSigners
method accepts a params
object with the following fields:
Address of the embedded wallet to add a session signer to.
Some wallets require the signers
array to be empty, in which case the signer added to the wallet will automatically be the key created when “Require signed requests” is turned on in the dashboard.
If the interface does not take any specified signers and the “Require signed requests” setting is not turned on in the dashboard, no signature will be required to make request on the wallet. If your wallets do not support setting signers via this interface, then we highly recommend toggling on “Require signed requests” for enhanced security.
To provision server-side access for a user’s wallets, use the delegateWallet
method from the useHeadlessDelegatedActions
hook:
Usage
Parameters
The delegateWallet
method accepts a params
object with the following fields:
Address of the embedded wallet to delegate.
Chain type of the embedded wallet to delegate.