Skip to content

Generating a new wallet

shell
POST: {{endpoint}}/wallet/generate

Headers

KeyTypeValueDescription
x-api-keystringkey_xxxxxxxxxxxxxxxxxxxxAPI Key string
x-signaturestringSHA256The HMAC SHA256 signature.
x-timestampstring1730998051892Timestamp of the request

Request Body

KeyTypeDescription
chainstringthe chain-id
raw_user_metaobject(Optional) any additional data to be stored with the wallet
Example Request
JSON
// Body: raw (json)
{
  "chain": "bsc",
  "raw_user_meta": {}
}

Response Body

The final response in the stream also includes additional data about the generation:

  • wallet_type: the type of wallet generated, Wallet Types
  • chain: the blockchain network-id
  • address: the public address of the wallet
  • network: the network environment, e.g. testnet or mainnet
  • unique_hash: a unique hash for the wallet, uniuqe key for the wallet
Example Response
json
{
  "data": {
    "id": "6e8ebe97-880a-4beb-b2a3-6964f8971799",
    "wallet_type": "RECEIPT",
    "chain": "bsc",
    "address": "0x849c4b408df9a63ab8543360e397f5d524483011",
    "network": "testnet",
    "unique_hash": "98f022100a2633712ee90f668bd9f202f7431a0c6ddf395afdbd2324ef032865",
    "hdkey_id": "bsc-testnet",
    "index": 1000,
    "subscribe_id": null,
    "raw_user_meta": {},
    "is_activated": false,
    "created_at": "2024-11-03T08:05:06.360Z",
    "owned_by_group": "8e393308-28a9-4a6e-a689-0d7760483c7e",
    "agent_id": "aacc3472-f3c3-49bb-9040-d5a6aff283bf"
  }
}
json
{
  "error": "Error message"
}
json
{
  "error": "Forbidden"
}