Clusters

Create a Cluster

POST /v1/clusters

Create a cluster

Name
Description

HEADER Authorization: Bearer {AUTHKEY}

Example

curl --request POST \
  --url https://api.clusters.xyz/v1/clusters \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer AUTHKEY'

Response

{
    "id": "0x000049d953f88ab10f1b2778275028894602c41bbe6ea42bf46695d4edc5b6d6",
}

Cluster by ID

GET /v1/clusters/id/:id

Get the cluster from an id

Name
Description

id

ID of cluster

Example

curl --request GET \
  --url https://api.clusters.xyz/v1/clusters/id/0xa8d12b92b91fe0db3651ff2d45c1f47b1bb343054e9cd1e556c73f2330269224

Response

{
  "id": "0xa8d12b92b91fe0db3651ff2d45c1f47b1bb343054e9cd1e556c73f2330269224",
  "createdBy": "0x5cff9c1362a71247da33887be2a44ac36a8724bb",
  "createdAt": "2024-02-14 21:39:05+00",
  "wallets": [
    {
      "address": "0x5cff9c1362a71247da33887be2a44ac36a8724bb",
      "name": "main",
      "isVerified": true,
      "isPrivate": false,
      "isBackedUp": false,
      "updatedAt": "2024-02-09 15:21:22+00",
      "updatedBy": "0x5cff9c1362a71247da33887be2a44ac36a8724bb",
      "createdAt": "2024-02-09 15:21:22+00"
    }
  ],
  "isTestnet": false
}

Cluster by Name

GET /v1/clusters/name/:name

Get the cluster from a name

Name
Description

name

Cluster name

Example

curl --request GET \
  --url https://api.clusters.xyz/v1/clusters/name/clusters

Response

{
  "id": "0xa8d12b92b91fe0db3651ff2d45c1f47b1bb343054e9cd1e556c73f2330269224",
  "createdBy": "0x5cff9c1362a71247da33887be2a44ac36a8724bb",
  "createdAt": "2024-02-14 21:39:05+00",
  "wallets": [
    {
      "address": "0x5cff9c1362a71247da33887be2a44ac36a8724bb",
      "name": "main",
      "isVerified": true,
      "isPrivate": false,
      "isBackedUp": false,
      "updatedAt": "2024-02-09 15:21:22+00",
      "updatedBy": "0x5cff9c1362a71247da33887be2a44ac36a8724bb",
      "createdAt": "2024-02-09 15:21:22+00"
    }
  ],
  "isTestnet": false
}

Cluster ID by address

GET /v1/clusters/address/:address

Get the cluster from an id

Name
Description

address

Verified address of a cluster

Example

curl --request GET \
  --url https://api.clusters.xyz/v1/clusters/address/0x5cff9c1362a71247da33887be2a44ac36a8724bb

Response

{
  "clusterId": "0xa8d12b92b91fe0db3651ff2d45c1f47b1bb343054e9cd1e556c73f2330269224"
}

Add wallets

POST /v1/clusters/wallets

Add wallets to the cluster the authenticated wallet is in

Name
Description

HEADER Authorization: Bearer {AUTHKEY}

body

{ address: string, name: string, isPrivate: boolean }[]

Example

curl --request POST \
  --url 'https://api.clusters.xyz/v1/clusters/wallets' \
  --header 'Authorization: Bearer AUTHKEY' \
  --header 'Content-Type: application/json' \
  --data '[{
  "address": "0x0000000000000000000000000000000000000011",
  "name": "new",
  "isPrivate": false
}]'

Response

{
    "success": true,
}

Generate wallet

POST /v1/clusters/generate/wallet

Generate a wallet in a cluster that the authenticated wallet is in

Name
Description

HEADER Authorization: Bearer {AUTHKEY}

body

{ address: string, name: string, isPrivate: boolean }[]

Example

curl --request POST \
  --url 'https://api.clusters.xyz/v1/clusters/generate/wallet' \
  --header 'Authorization: Bearer AUTHKEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "solana",
  "name": "test",
  "isPrivate": false
}'

Response

{
  type: "evm",
  address: "0x9D212340B4E5F3a38B171b2971D678B95083d928",
  name: "test",
  share: "0xdb87682d04e71c99bf8964e51cf5ec4843f2c588946bf749324819df0ba9ee1fb66e67bc21b440817310724abd1fb41676f6e2b30923819cf647bcb94a097c2b148257c58f38280682419af6c1fdab21cb94827bab4c0c4fa1d6ce153635b591a8b5c706f2db8307d08bc54022d381599a661c11dc5ab39fd0fbc167aac81ed48b211e98192cb0b6344232a4c577a7754339be",
}

Update wallets

PUT /v1/clusters/wallets/names

Update wallets in a cluster that the authenticated wallet is in

Name
Description

HEADER Authorization: Bearer {AUTHKEY}

body

{ address: string, name: string }[]

Example

curl --request PUT \
  --url 'https://api.clusters.xyz/v1/clusters/wallets/names' \
  --header 'Authorization: Bearer AUTHKEY' \
  --header 'Content-Type: application/json' \
  --data '[{
  "address": "0x0000000000000000000000000000000000000011",
  "name": "new"
}]'

Response

{
    "success": true,
}

Remove wallets

DELETE /v1/clusters/wallets

Remove an array of addresses from the cluster of the authenticated wallet

Name
Description

HEADER Authorization: Bearer {AUTHKEY}

body

string[]

Example

curl --request DELETE \
  --url 'https://api.clusters.xyz/v1/clusters/wallets' \
  --header 'Authorization: Bearer AUTHKEY' \
  --header 'Content-Type: application/json' \
  --data '["0x0000000000000000000000000000000000000011"]
}]'

Response

{
    "success": true,
}

Verify wallet

POST /v1/clusters/verify/:clusterId

Verify the authenticated wallet in a specific cluster

Name
Description

HEADER Authorization: Bearer {AUTHKEY}

clusterId

The cluster id you want to verify the wallet in

Example

curl --request POST \
  --url https://api.clusters.xyz/v1/clusters/verify/0x0 \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer AUTHKEY' \
}'

Response

{
    "success": true,
}

Last updated