Account and wallet operations

A Platform may need to remove a wallet address from the Allowlist for various reasons. This guide outlines how teams can update permissions to remove a wallet address and/or Account from the Allowlist.

Below are methods to use from most flexible to least flexible.

Remove a wallet

Remove a wallet from an Account, use the wallet remove endpoint. This will perform a soft delete from the Account object.

Use this endpoint if you want to keep the Account active but you don't want the wallet to have access to mint or redeem through the Liquid Collective protocol.

For most use cases this is the recommended option.

Below is a sample request and response:

Request

curl -X 'POST' \
  'https://api.staging.alluvial.finance/v0/platform/accounts/b79ec01f-06ed-45eb-b59b-97ae0e4941dd/wallets/0x66ea25081b371a7f57820e3da6f48d68fe806e2a/remove' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer eyJhbGci…CVm5g' \
  -H 'Content-Type: application/json' \
  -d '{
  "key": "FO123"
}'

Response

{
    "id": "b79ec01f-06ed-45eb-b59b-97ae0e4941dd",
    "key": "test-id-1211",
    "org_id": "org_was",
    "status": "ACTIVE",
    "created_at": "2023-11-21T16:18:33.735873Z",
    "wallets": [
        {
            "id": "d5eb3303-e788-4211-b4a6-a42cc2ef6cc5",
            "type": "ETH",
            "address": "0xb9de69e4c85bdc9ee010d20261a5cc1eb553ac3c",
            "status": "REMOVED",
            "created_at": "2023-11-21T16:21:57.029667Z"
        },
        {
            "id": "4bf1d82f-7c69-40b9-92b1-fd7c02e28271",
            "type": "ETH",
            "address": "0x66ea25081b371a7f57820e3da6f48d68fe806e2a",
            "status": "PENDING_REMOVAL",
            "created_at": "2023-11-21T16:36:50.797534Z"
        }
    ]
}

Pausing an Account

For some use cases pausing an Account is the best path forward. When pausing an Account all wallets associated with an Account will also be paused.

In order to pause an Account object, call the Accounts API. The benefit of pausing an Account is that the Account can be reactivated at any time via the /PATCH /v0/platform/accounts/{idOrKey}/reactivate endpoint.

Request

curl -X 'POST' \
  'https://api.staging.alluvial.finance/v0/platform/accounts/b79ec01f-06ed-45eb-b59b-97ae0e4941dd/pause' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer eyJhbGci…CVm5g' \
  -H 'Content-Type: application/json' \
  -d '{
  "key": "FO123"
}'

Response

{
    "id": "b79ec01f-06ed-45eb-b59b-97ae0e4941dd",
    "key": "test-id-1211",
    "org_id": "org_was",
    "status": "PAUSED",
    "created_at": "2023-11-21T16:18:33.735873Z",
    "wallets": [
        {
            "id": "d5eb3303-e788-4211-b4a6-a42cc2ef6cc5",
            "type": "ETH",
            "address": "0xb9de69e4c85bdc9ee010d20261a5cc1eb553ac3c",
            "status": "PAUSED",
            "created_at": "2023-11-21T16:21:57.029667Z"
        },
        {
            "id": "4bf1d82f-7c69-40b9-92b1-fd7c02e28271",
            "type": "ETH",
            "address": "0x66ea25081b371a7f57820e3da6f48d68fe806e2a",
            "status": "PAUSED",
            "created_at": "2023-11-21T16:36:50.797534Z"
        }
    ]
}

Removing an Account

Removing an Account will have the same functional impact as pausing, however once an Account has been removed, that same Account (via the unique key) can't be used again.

Request

curl -X 'POST' \
  'https://api.staging.alluvial.finance/v0/platform/accounts/3f44a167-1e13-40c9-98ac-2a9e1e866733/remove' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer eyJhbGci…CVm5g' \
  -H 'Content-Type: application/json' \
  -d '{
  "key": "FO123"
}'

Response

{
    "id": "3f44a167-1e13-40c9-98ac-2a9e1e866733",
    "key": "demo-depositor",
    "org_id": "org_WaYHN06ay6WoTjcz",
    "status": "REMOVED",
    "created_at": "2023-04-14T21:21:52.112595Z",
    "wallets": []
}

Last updated