open-index/open-npm huggingface dataset:
npm package: @panoraexchange/swap-sdk
Description: Panora Swap SDK
Author: team@panora.exchange
Latest version: 1.3.1

## Panora SDK

SDK for swaps, balances, token lists, and prices

## Installation

### Using npm

```
npm install @panoraexchange/swap-sdk
```

### Using yarn

```
yarn add @panoraexchange/swap-sdk
```

### Using pnpm

```
pnpm add @panoraexchange/swap-sdk
```

### For all parameters and SDK usage, refer https://docs.panora.exchange

## Usage

### Initialize Panora SDK

```typescript
import Panora, { PanoraConfig } from "@panoraexchange/swap-sdk"

const config: PanoraConfig = {
  panoraApiKey: "PANORA_API_KEY", // Optional. Default is Panora's public api key
  geomiApiKey: "GEOMI_API_KEY", // Optional. Default is no api key. Takes higher priority over rpcUrl
  rpcUrl: "CUSTOM_RPC_URL", // Optional
}

const panora = new Panora(config)
```

### Fetch a Swap Quote & Execute in One Step

```typescript
const response = await panora.swap({ params: SwapParams, privateKey })
```

### Fetch a Swap Quote Only

```typescript
const response = await panora.getQuote({ params: QuoteParams })
```

### Execute a Pre-fetched Swap Quote

```typescript
const response = await panora.executeQuote({ quote: SwapQuote, privateKey })
```

### Fetch Wallet Balances

```typescript
const response = await panora.getBalances({ walletAddress })
```

### Fetch Panora's Aptos Token List

```typescript
const response = await panora.getTokenList()
```

### Fetch Token Prices

```typescript
const response = await panora.getPrices({ tokenAddress })
```

### Attribution:

Kindly include proper attribution when using the SDK in projects or presentations. Mention “Powered by Panora” wherever applicable.