Setup

To create user wallets that integrate directly with your JWT-based authentication system, first configure your app’s JWT-based authentication settings in the dashboard. The User Signer API uses this configuration to verify the legitimacy of user JWTs.

Create a wallet with a user signer

Once you have configured your custom JWT authentication in the dashboard, your application can create a user wallet by calling the /v1/wallets_with_recovery endpoint with your user’s JWT subject ID. This endpoint will create a wallet that can be accessed using the associated user JWT.

Request

The request to /v1/wallets_with_recovery contains the following parameters.

primary_signer
object
required
wallet
object
required
recovery_user
object
required

Response

The response from the endpoint will contain the following fields.

wallets
object[]
required

The wallet that was created.

recovery_user_id
string
required

The ID of the created user.

Example

An example request to /v1/wallets_with_recovery may have the following parameters.

{
  signer: {
    subject_id: <jwt-subject-id>
  }
  linked_accounts: [{
    type: 'email',
    address: <user-recovery-email>
  }]
  wallet: {
    policy_id: <policy-id>
  }
}

A successful response will look like the following.

{
  "wallets": [
    {
      "id": "<wallet-id>",
      "chain_type": "ethereum",
      "wallet_address": "0x1234567890abcdef1234567890abcdef12345678"
    }
  ],
  "recovery_user_id": "<recovery-user-id>"
}