Clusters
  • Introduction
    • Overview
    • Concepts
      • Cluster Name
      • Wallet Name
    • Features
      • Communities
      • Multichain
      • Wallet Bundles
      • Antisquatting
      • Wallet Generation
      • Selective Wallet Sharing
  • Getting started
    • Javascript
      • Authentication
      • Clusters
      • Address → Cluster Name
      • Cluster Name → Address
      • Registration
        • Communities
      • Event Indexing
    • API
      • v1
        • Authentication
        • Clusters
        • Address → Cluster Name
        • Cluster Name → Address
        • Registration
          • Communities
        • Event Indexing
      • v0.1 (Deprecated)
        • Address → Cluster
        • Cluster → Address
        • Cluster → Metadata
        • Registration
        • Managing Wallets
  • Resources
    • Smart Contracts
    • Address Types
    • Using Clusters for ETH->SOL Airdrops
  • Integration Guides
    • Convert hex address to clusters name
    • Registering a name
      • Ethereum Networks
      • Solana
    • Whitelabel Communities Registration Flow
Powered by GitBook
On this page
  • Check availability
  • Registration data
  • Trasaction Status
  1. Getting started
  2. API
  3. v1

Registration

Check availability

Check the availability of one or more clusters

POST /v1/names/register/check

Name
Description

BODY

string[] - an array of names to check

Example

curl --request POST \
  --url https://api.clusters.xyz/v1/names/register/check \
  --header 'Content-Type: application/json' \
  --data '["foobar", "namethatdoesntexist"]'

Response

[
  {
    "name": "foobar",
    "isAvailable": false
  },
  {
    "name": "namethatdoesntexist",
    "isAvailable": true
  }
]

Registration data

POST /v1/names/register/evm

POST /v1/names/register/solana

Get the transaction data for registering a cluster so that a user can sign it

Name
Description

network

sender

The sender's address

names

{ name: string; amountWei?: string }[] bidAmountWei (optional) is always in ETH and defaults to 0.01 ETH

referralClusterId (optional)

The cluster id that is referring this registration

Example

curl --request POST \
  --url https://api.clusters.xyz/v1/names/register/evm \
  --header 'Content-Type: application/json' \
  --data '{
  "network": "1",
  "sender": "0x0000000000000000000000000000000000000001",
  "names": [
    { "name": "namethatdoesntexist1" },
    { "name": "namethatdoesntexist2" }
  ]
}'

Response

{
  "type": "evm",
  "gasToken": {
    "symbol": "ETH",
    "decimals": 18
  },
  "transactionData": {
    "to": "0x00000000000e1a99dddd5610111884278bdbda1d",
    "data": "0x40bee835000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000000000000000000000000000002386f26fc1000000000000000000000000000000000000000000000000000000000000000000026e616d6574686174646f65736e746578697374310000000000000000000000006e616d6574686174646f65736e74657869737432000000000000000000000000",
    "value": "20000000000000000"
  },
  "registrationFee": "20000000000000000",
  "bridgeFee": "0",
  "names": [
    {
      "name": "namethatdoesntexist1",
      "amountWei": "10000000000000000",
      "amount": "10000000000000000"
    },
    {
      "name": "namethatdoesntexist2",
      "amountWei": "10000000000000000",
      "amount": "10000000000000000"
    }
  ]
}

Names unavailable

{
  "status": 400,
  "message": "1 or more names are unavailable"
}

Bridge Failure

{
  "status": 400,
  "message": "lz quote failed. most likely caused by wallets having insufficient balances"
}

Example

curl --request POST \
  --url https://api.clusters.xyz/v1/names/register/solana \
  --header 'Content-Type: application/json' \
  --data '{
  "network": "solana",
  "sender": "1nc1nerator11111111111111111111111111111111",
  "names": [
    { "name": "namethatdoesntexist1" },
    { "name": "namethatdoesntexist2" }
  ]
}'

Response

Notice when using solana, transactionData is an array of transactions instead of a single object on other networks. This is because only one name is supported per transaction at the moment when using solana.

{
  "type": "solana",
  "gasToken": {
    "symbol": "SOL"
  },
  "transactionData": [
    "gAEAAgQAM5ByjTQRYHm9yRG//wDb1E0uzcz3nKbhADjhAAAAAC/u4TnLEmhvVrNvLTdpdpVdJLegH99q7vYkM2iDi+hFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFSlNamSkhBk0k6HFg2jh8fDW13bySu4HkH6hAQQVEjZdvwyMMJHbJTNyHX/nuAnbanfNbTqWDof5avLEj3/dwAgICAAEMAgAAAFR9jwgAAAAAAwEAqgF7InR5cGUiOiJiaWQiLCJuYW1lIjoibmFtZXRoYXRkb2VzbnRleGlzdDEiLCJ3ZWkiOjEwMDAwMDAwMDAwMDAwMDAwLCJ0aW1lc3RhbXAiOjE3NDMwMDgwOTcsInNpZ25hdHVyZSI6ImViM2NhNjBkMDE5OWQwNWVkMzVkNGJjNGFhNTI1Yzk4MmVlYzI1M2I4MjIyMzE0MjBhNzNlZGQ1NzAzOWVmYmMifQA=",
    "gAEAAgQAM5ByjTQRYHm9yRG//wDb1E0uzcz3nKbhADjhAAAAAC/u4TnLEmhvVrNvLTdpdpVdJLegH99q7vYkM2iDi+hFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFSlNamSkhBk0k6HFg2jh8fDW13bySu4HkH6hAQQVEjZdvwyMMJHbJTNyHX/nuAnbanfNbTqWDof5avLEj3/dwAgICAAEMAgAAAFR9jwgAAAAAAwEAqgF7InR5cGUiOiJiaWQiLCJuYW1lIjoibmFtZXRoYXRkb2VzbnRleGlzdDIiLCJ3ZWkiOjEwMDAwMDAwMDAwMDAwMDAwLCJ0aW1lc3RhbXAiOjE3NDMwMDgwOTcsInNpZ25hdHVyZSI6ImViM2NhNjBkMDE5OWQwNWVkMzVkNGJjNGFhNTI1Yzk4MmVlYzI1M2I4MjIyMzE0MjBhNzNlZGQ1NzAzOWVmYmMifQA="
  ],
  "registrationFee": "287242920",
  "bridgeFee": "0",
  "names": [
    {
      "name": "namethatdoesntexist1",
      "amountWei": "10000000000000000",
      "amount": "143621460"
    },
    {
      "name": "namethatdoesntexist2",
      "amountWei": "10000000000000000",
      "amount": "143621460"
    }
  ]
}

Names unavailable

{
  "status": 500,
  "error": "names_unavailable",
  "message": "1 or more names are unavailable"
}

Bridge Failure

{
  "status": 500,
  "error": "lz_quote_fail",
  "message": "lz quote failed. most likely caused by wallets having insufficient balances"
}

Using transaction data

for (const transaction of data.transactionData) {
   const deserializedMessage = web3.VersionedMessage.deserialize(
      Buffer.from(transaction, 'base64')
   );
   const newTransaction = new web3.VersionedTransaction(deserializedMessage);
   
   const signedTransaction = await $Wallet.solanaProvider.signTransaction(newTransaction);
   await connection.sendTransaction(signedTransaction);
}

Trasaction Status

Checks the status of a transaction

GET /v1/names/register/tx/:tx

For now, if you registered more than one name in a transaction, it'll only give you the status of the first name. To enable testnet querying on Sepolia, add ?testnet=true to the end of the URL

Example

curl https://api.clusters.xyz/v1/names/register/tx/0xffea3b29c64016772b7d3194b3c3899a62191e654990b6e3393b410667102284

Response

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

PreviousCluster Name → AddressNextCommunities

Last updated 4 days ago

"1"
"10"
"56"
"137"
"8453"
"81457"
"17000"
"42161"
"43114"
"11155111"
"solana"