Generating a new wallet
shell
POST: {{endpoint}}/wallet/generateHeaders
| Key | Type | Value | Description |
|---|---|---|---|
| x-api-key | string | key_xxxxxxxxxxxxxxxxxxxx | API Key string |
| x-signature | string | SHA256 | The HMAC SHA256 signature. |
| x-timestamp | string | 1730998051892 | Timestamp of the request |
Request Body
| Key | Type | Description |
|---|---|---|
| chain | string | the chain-id |
| raw_user_meta | object | (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 Typeschain: the blockchain network-idaddress: the public address of the walletnetwork: the network environment, e.g. testnet or mainnetunique_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"
}