## Usage

### API Init  

Use *getApiCreator(nodeSpec: "Eq" | "EqNext" | "Genshiro")* factory from __@equilab/api__ package  
```typescript
import { getApiCreator } from "@equilab/api";  

(async () => { // async/await usage
  /*
   * nodeSpec can be either 
   * "Eq" for mainnet node,
   * or "EqNext" for testnet node,
   * or "Gens" for genshiro nodes
   */

  // Connect to mainnet node with websocket
  const api = await getApiCreator("Eq")("wss://node.equilibrium.io");
  // do the interaction below
  const balance = await api.getBalance("YOUR_ADDRESS", "EQ"); // get EQ tokens
  console.log(balance.toJSON());
})();

createApi("wss://tge.equilibrium.io:9944")
  .then(api => api.getBalance("YOUR_ADDRESS", "EQ"))
  .then(balance => console.log(balance.toJSON())); // Promise usage
```  
