From my server
Privy enables your app to easily create server-side wallets on any EVM network or Solana.
If the wallet is for a user, use wallet pregeneration instead to associate the wallet with user’s login methods.
To create a wallet with the NodeJS SDK, use the create
method from the Privy client’s walletApi
class:
Usage
Parameters
The create
method accepts as a parameter an input
object with the following fields:
Chain type of the wallet to create.
List of authorization key IDs that should be allowed to approve transactions for the wallet.
Number of authorization key signatures required to approve a transaction. This number must be less than or equal to the number of length of authorization_key_ids
. If not specified, all keys in the authorization_key_ids
list are required.
List of policy IDs for policies that should be enforced on the wallet. Currently, only one policy is supported per wallet.
Idempotency key to identify a unique request.
Returns
Unique ID of the created wallet. This will be the primary identifier when using the wallet in the future.
Chain type of the created wallet.
Address of the created wallet.
List of policy IDs for policies that are enforced on the wallet.
Your app can provision a smart account with the wallet as a signer by following this guide.
Was this page helpful?