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
  • Create a Cluster
  • Cluster by ID
  • Cluster by Name
  • Cluster ID by address
  • Add wallets
  • Generate wallet
  • Update wallets
  • Remove wallets
  • Verify wallet
  1. Getting started
  2. Javascript

Clusters

Create a Cluster

Create a cluster

Name
Description

authToken

Example

const data = await clusters.createCluster(authToken);

Response

{
    "id": "0x000049d953f88ab10f1b2778275028894602c41bbe6ea42bf46695d4edc5b6d6",
}

Cluster by ID

Get the cluster from an id

Name
Description

id

ID of cluster

Example

const cluster = await clusters.getClusterById(id);

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 the cluster from a name

Name
Description

name

Cluster name

Example

const cluster = await clusters.getClusterByName(name);

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 the cluster from an id

Name
Description

address

Verified address of a cluster

Example

const data = await clusters.getClusterIdByAddress(address);

Response

{
  "clusterId": "0xa8d12b92b91fe0db3651ff2d45c1f47b1bb343054e9cd1e556c73f2330269224"
}

Add wallets

Add wallets to the cluster the authenticated wallet is in

Name
Description

wallets

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

authToken

Example

await clusters.addWallets(
    [{ address: '0x0000000000000000000000000000000000000011', name: 'new', isPrivate: true }],
    authToken,
 );

Response

{
    "success": true,
}

Generate wallet

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

Name
Description

wallets

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

authToken

Example

await clusters.generateWallet(
    [{ address: '0x0000000000000000000000000000000000000011', name: 'test', isPrivate: false }],
    authToken,
  );

Response

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

Update wallets

Update wallets in a cluster that the authenticated wallet is in

Name
Description

wallets

{ address: string, name: string }[]

authToken

Example

await clusters.updateWalletNames(
    [{ address: '0x0000000000000000000000000000000000000011', name: 'new2' }],
    authToken,
  );

Response

{
    "success": true,
}

Remove wallets

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

Name
Description

wallets

string[]

authToken

Example

await clusters.removeWallets(['0x0000000000000000000000000000000000000011'], authToken)

Response

{
    "success": true,
}

Verify wallet

Verify the authenticated wallet in a specific cluster

Name
Description

clusterId

The cluster id you want to verify the wallet in

authToken

Example

await clusters.verifyWallet(clusterId, authToken);

Response

{
    "success": true,
}
PreviousAuthenticationNextAddress → Cluster Name

Last updated 2 months ago

Authentication from wallet
Authentication from wallet
Authentication from wallet
Authentication from wallet
Authentication from wallet
Authentication from wallet