Wallets

Create a wallet for logged user

POST /api/v1/users/wallets

Headers

Body

Example

{
    "address": "0x45ro3efn3efe300f3e0f3efe0feifffe30fi",
    "name": "Ton Space wallet"
}

Response

{
    "result": true,
    "message": "Wallet added or created",
    "wallet": {
        "id": "5755aebf-cc56-4893-b334-fbb8e774457e",
        "created_at": "2024-07-13T14:01:47.953Z",
        "updated_at": "2024-07-13T14:32:02.670Z",
        "deleted_at": null,
        "name": "Ton Space wallet",
        "address": "0x45ro3efn3efe300f3e0f3efe0feifffe30fi",
        "owner_id": 11
    }
}

Wallets list

GET /api/v1/users/wallets

Headers

Response

{
    "result": true,
    "message": "Wallets belonged to user",
    "wallets": [
        {
            "id": "914a9adf-5a51-456f-8502-4f9b8247035d",
            "created_at": "2024-07-13T14:33:55.375Z",
            "updated_at": "2024-07-13T14:33:55.402Z",
            "deleted_at": null,
            "name": "Ton Space wallet",
            "address": "0x45ro3efn3efe300f3e0f3efe0feifffe30fid",
            "owner_id": 11
        },
        {
            "id": "5755aebf-cc56-4893-b334-fbb8e774457e",
            "created_at": "2024-07-13T14:01:47.953Z",
            "updated_at": "2024-07-13T14:33:49.398Z",
            "deleted_at": null,
            "name": "Ton Space wallet",
            "address": "0x45ro3efn3efe300f3e0f3efe0feifffe30fi",
            "owner_id": 11
        },
        {
            "id": "ad1f56f6-6a01-421b-b293-7ea41b147e19",
            "created_at": "2024-07-13T13:43:47.080Z",
            "updated_at": "2024-07-13T13:57:04.836Z",
            "deleted_at": null,
            "name": "___erf",
            "address": "___wdf",
            "owner_id": 11
        },
        {
            "id": "9d7b6f41-f510-4cbe-a9ea-23af0bfaf97a",
            "created_at": "2024-07-13T13:41:45.456Z",
            "updated_at": "2024-07-13T13:43:34.449Z",
            "deleted_at": null,
            "name": "wallet_name",
            "address": "wallet_address0",
            "owner_id": 11
        },
        {
            "id": "6fd4c352-c677-40f4-affc-34287c04baa4",
            "created_at": "2024-07-13T13:41:29.428Z",
            "updated_at": "2024-07-13T13:41:33.170Z",
            "deleted_at": null,
            "name": "wallet_name",
            "address": "wallet_address3",
            "owner_id": 11
        },
        {
            "id": "c9080346-dd64-4eb4-8868-48c9e190aaa9",
            "created_at": "2024-07-13T13:34:22.771Z",
            "updated_at": "2024-07-13T13:36:55.434Z",
            "deleted_at": null,
            "name": "wallet_name2",
            "address": "wallet_address222",
            "owner_id": 11
        }
    ]
}

Delete a wallet

DELETE /api/v1/users/wallets

Headers

Body

Example

{
    "id": "5755aebf-cc56-4893-b334-fbb8e774457e"
}

Response


{
    "result": true,
    "message": "Wallets has been deleted"
}

Last updated