> For the complete documentation index, see [llms.txt](https://superbeam.gitbook.io/superbeam/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://superbeam.gitbook.io/superbeam/getting-started/quickstart.md).

# Quickstart

This guide will enable you to install superbeam sdk in your local machine and get started with few lines of code

Superbeam uses viem internally. You can get started with the installation in a single command

{% code fullWidth="false" %}

```sh
npm i superbeam
```

{% endcode %}

### Import and Initialize

```javascript
import {superSDK} from "superbeam"
const superbeam = new superSDK();
```

### Fetch Balance across all the superchains

`getBalance`  api lets you fetch Balance of any asset across superchain interop enabled chains\
\
It accepts two arguments \
a) `address : Address`  Your wallet address\
b)  `tokenAddress ? (optional) : Address`  Token Address you want to find the balance for. \
( It will fetch the balance of the native token - (ETH) if not provided ) \
\
Code example :-&#x20;

```javascript
import { superSDK } from "superbeam";
const superbeam = new superSDK();
const balance = await superbeam
    .getBalance("0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266")
// to fetch ETH Balance - tokenAddress field is empty
console.log(balance);  
```

```sh
{
total: 19999999831999998824000n,
breakdown: {
supersim0: '9999.999936999999559',
supersim1: '9999.999894999999265'
},
asset: 'ETH'
}
```

> **Info:** Currently, Superbeam is live on Supersim and Devnets. You can choose a specific environment by initializing the sdk with the respective fields.
