Create Wallet

The "Create Wallet" endpoints allows for the creation of a Xerial Wallet to a specified user in the xerial database.

Overview

Endpoint

  • Method: POST

  • URL: /wallet/{userId}

Body

{
     "type": "evm"
}
  • Field: Authorization

  • Value: Bearer + (Access token)

Responses

Success (Code 200)

{
    {
      "id": "656ab9db6a378b91ab1871be",
      "address": "0x8e9DD3c1Db3254d968967CbC367542C343273629",
      "smartAccount": "0x8e9DD3c1Db3254d968967CbC367542C343273629",
      "custodial": true,
      "user": "5ebac534954b54139806c112"
      "type":"evm"
    }
}
  • Media Type: application/json

  • Example Value: An object containing the all information about the wallet.

Usage

  1. Send a POST request to the /wallet/{userId}endpoint to create a wallet for the user.

  2. Handle the response accordingly based on success, unauthorized access or internal server error.

Note: Ensure the user is authenticated before making the request.

Last updated