open-index/open-npm huggingface dataset:
npm package: @orbiter-finance/abi
Description: This library was generated with [Nx](https://nx.dev).
Latest version: 0.0.1

# abi

This library was generated with [Nx](https://nx.dev).

## Building

Run `nx build abi` to build the library.

## Running unit tests

Run `nx test abi` to execute the unit tests via [Jest](https://jestjs.io).
npm package: @orbiter-finance/balances
Description: This library was generated with [Nx](https://nx.dev).
Latest version: 0.0.24

# balances

This library was generated with [Nx](https://nx.dev).

## Building

Run `nx build balances` to build the library.

## Running unit tests

Run `nx test balances` to execute the unit tests via [Jest](https://jestjs.io).
npm package: @orbiter-finance/mcp-server
Description: An MCP (Model Context Protocol) server that exposes Orbiter Finance tools over stdio.
Latest version: 0.1.6

# Orbiter Finance MCP Server

An MCP (Model Context Protocol) server that exposes Orbiter Finance tools over stdio.

## Build and Run

```bash
pnpm -C .. install
pnpm -C . run build
pnpm -C . run dev
```

## Environment Variables
- `ORBITER_API_BASE_URL` (optional, default `https://openapi.orbiter.finance`)
- `ORBITER_API_KEY` (optional)

## Tools
- `orbiter_chains`
- `orbiter_tokens`
- `orbiter_bridge_quote`
- `orbiter_bridge_tx`
- `orbiter_bridge_flow`
- `orbiter_sign_template`
- `orbiter_sign_broadcast`
- `orbiter_transaction`
- `orbiter_wallet_portfolio`
- `orbiter_tx_simulate`
- `orbiter_tx_broadcast`
- `orbiter_rpc_health`

## Notes
- `orbiter_bridge_flow` can optionally auto-approve when `autoApprove` and `privateKey` are provided.

## MCP Inspector

`inspector.json` is provided for stdio mode:

```json
{
  "command": "tsx",
  "args": ["src/server.ts"],
  "env": {
    "ORBITER_API_BASE_URL": "https://openapi.orbiter.finance",
    "ORBITER_API_KEY": "demo"
  }
}
```

## Publish

```bash
pnpm --filter @orbiter-finance/mcp-server publish --access public
```
npm package: @orbiter-finance/nestjs-consul
Description: This library was generated with [Nx](https://nx.dev).
Latest version: 0.0.4

# nestjs-consul

This library was generated with [Nx](https://nx.dev).

## Building

Run `nx build nestjs-consul` to build the library.

## Running unit tests

Run `nx test nestjs-consul` to execute the unit tests via [Jest](https://jestjs.io).
npm package: @orbiter-finance/orbiter-api
Description: A TypeScript SDK for Orbiter Finance OpenAPI and supporting RPC helpers.
Latest version: 0.1.6

# Orbiter Finance API SDK

A TypeScript SDK for Orbiter Finance OpenAPI and supporting RPC helpers.

## Install (Workspace)

```bash
pnpm -C .. install
```

## Usage

```ts
import { OrbiterClient } from "@orbiter-finance/orbiter-api";

const client = new OrbiterClient({
  baseUrl: "https://openapi.orbiter.finance",
  apiKey: process.env.ORBITER_API_KEY
});

const chains = await client.chains();
const tokens = await client.tokens({ chainId: "42161", addressOrPrefix: "ETH" });
```

## RPC Helpers

The SDK also exports RPC helpers used by CLI and MCP:
- `rpcEstimateGas`
- `rpcCallContract`
- `rpcSendRawTransaction`
- `rpcChainId`
- `rpcClientVersion`
- `rpcGetTransactionCount`
- `rpcGasPrice`
- `rpcMaxPriorityFeePerGas`
- `rpcFeeHistory`

## Publish

```bash
pnpm --filter @orbiter-finance/orbiter-api publish --access public
```
npm package: @orbiter-finance/utils
Description: This library was generated with [Nx](https://nx.dev).
Latest version: 0.0.2

# util

This library was generated with [Nx](https://nx.dev).

## Building

Run `nx build util` to build the library.

## Running unit tests

Run `nx test util` to execute the unit tests via [Jest](https://jestjs.io).
npm package: @orbiter-finance/wallet-balance
Description: JavaScript library for Orbiter Finance Wallet Balance
Latest version: 0.0.13

# BalanceQueryService

`BalanceQueryService` is a utility class for querying native and token balances across multiple blockchain networks. It utilizes the `ExploreLinkProvider` from the `@orbiter-finance/explore-link` package to interact with different blockchain endpoints.

## Features

- Cache mechanism for reusing instances of `BalanceQueryService`.
- Asynchronous initialization with timeout handling.
- Chain information retrieval with error handling.
- Retry mechanism for fetching balances using multiple RPC URLs.

## Installation

To install the package, use npm or yarn:

```bash
npm install @orbiter-finance/wallet-balance
```

or

```bash
yarn add @orbiter-finance/wallet-balance
```

## Usage

### Import the Service

```javascript
import BalanceQueryService from './BalanceQueryService';
```

### Initialize the Service

You need to initialize the service before making any balance queries.

```javascript
const service = await BalanceQueryService.initializeService();
or 
const service = new BalanceQueryService(new ExploreLinkProvider());// yarn install @orbiter-finance/explore-link

```

### Get Native Token Balance

To retrieve the native balance of a specific address on a specified chain:

```javascript
const balance = await service.getNativeBalance(chainId, address);
console.log(`Native Balance: ${balance}`);
```

### Get Token Balance

To retrieve the balance of a specific token for a given address:

```javascript
const tokenBalance = await service.getTokenBalance(chainId, address, tokenAddress);
console.log(`Token Balance: ${tokenBalance}`);
```

### Error Handling

Make sure to handle potential errors when using the service:

```javascript
try {
    const balance = await service.getNativeBalance(chainId, address);
    console.log(`Native Balance: ${balance}`);
} catch (error) {
    console.error(`Error fetching balance: ${error.message}`);
}
```

## License

JavaScript library for Orbiter Finance Wallet Balance