Communities

Currently only available on Sepolia and Holesky as we roll out the feature

Check availability

Check the availability of a single community cluster

GET /check/availability/:clusterName/:walletName

Example

Single check
curl https://api.clusters.xyz/v0.1/community/check/availability/mycommunity/foobar?testnet=true

Response

{
  "name": "mycommunity/foobar",
  "isAvailable": true
}

Check requirements

Check if the community requirements for a specific wallet has been met for registration

GET /check/requirements/:clusterName?walletAddress=:walletName

Example

curl https://api.clusters.xyz/v0.1/community/check/requirements/mycommunity?walletAddress=0x123?testnet=true

Response

{
  "clusterName": "mycommunity",
  "walletAddress": "0x123",
  "isRequirementsMet": true
}

Registration

POST /v0.1/community/register

Either registers a free community clusters OR returns transaction data for registrations that require payment.

Name
Description

HEADER (bearer) Authorization

clusterName

The cluster name of the community being registered

walletName

The wallet name being registered under the community

chainId (optional)

If the price of a community cluster is USDC, a chainId should be passed so that the correct contracts are used when returning transaction data. It will default to mainnet.

walletAddress (optional)

If the registration sign up's are restricted to community owners, a wallet address needs to be included to know who to register the name to.

Example

curl --request POST \
  --url 'https://api.clusters.xyz/v0.1/community/register?testnet=true' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer abc123' \
  --data '{
  "clusterName": "mycommunity",
  "walletName": "foobar"
}'

Response

{ 
   "clusterName": "mycommunity",
   "walletName": "foobar"
}

Transaction Status

Checks the status of a transaction

GET /v0.1/community/tx/:tx

Example

curl https://api.clusters.xyz/v0.1/community/tx/0x123?testnet=true

Response

type status = 'not_found' | 'pending' | 'bridging' | 'invalid' | 'lost_bid' | 'finalized'
{
  "tx": "0x123",
  "status": "not_found"
}

Last updated