Skip to content

Determine the current SVM cluster from an RPC endpoint.

License

Notifications You must be signed in to change notification settings

arrangedev/detect-cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Detect Cluster

Get the current SVM cluster name with an RPC endpoint.



Supported Clusters

  • Solana
    • Mainnet Beta
    • Testnet
    • Devnet
  • Eclipse
    • Mainnet Beta
    • Testnet
    • Devnet2

Installation

Install via your favorite package manager:

npm install @arrangedev/detect-cluster

Additionally, you can load the source code via unpkg:

https://unpkg.com/@joeymeere/dreamcast@latest

Usage

import { getClusterName } from "@arrangedev/detect-cluster";

const cluster = await getClusterName("https://api.mainnet-beta.solana.com");
console.log(cluster); // solana/mainnet-beta

About

Determine the current SVM cluster from an RPC endpoint.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published