> ## Documentation Index
> Fetch the complete documentation index at: https://docs.altude.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Make your first sponsored Solana transaction in under five minutes.

## Prerequisites

* An Altude API key — [sign up at altude.so](https://altude.so) to get one.
* Node.js 18 or newer.

## Install the SDK

```bash theme={null}
npm install @altude/gasstation
```

## Initialize the client

```typescript theme={null}
import { AltudeGasStation } from '@altude/gasstation'

const gasStation = new AltudeGasStation({
  apiKey: process.env.ALTUDE_API_KEY!,
})

const config = await gasStation.init()

console.log('Cluster:', config.RpcEnvironment)
console.log('Fee payer:', config.FeePayer)
```

`init()` calls `GET /api/transaction/config` with your API key. The response provides the RPC endpoint, short-lived JWT, fee payer address, and selected cluster. The SDK uses only these values — it never falls back to a public Solana RPC.

The only runtime value you supply is the API key. Do not prompt users to enter
a network, RPC URL, JWT, or fee payer address manually; those are determined by
the configuration attached to the API key.

## Check a balance

```typescript theme={null}
const balance = await gasStation.getBalance({
  account: 'YOUR_WALLET_ADDRESS',
})

console.log('SOL (lamports):', balance.lamports)
console.log('Display amount:', balance.uiAmount)
```

For an SPL token balance, pass the mint address:

```typescript theme={null}
const usdcBalance = await gasStation.getBalance({
  account: 'YOUR_WALLET_ADDRESS',
  token: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v', // USDC
})
```

## Send a sponsored transaction

Provide a local signer and call `send()`. Altude attaches the fee payer and relays the transaction — your user's wallet is never charged for gas.

```typescript theme={null}
import type { GaslessTransactionSigner } from '@altude/gasstation'

const signer: GaslessTransactionSigner = {
  address: wallet.publicKey,
  async signTransactionMessage(messageBytes) {
    return wallet.signTransactionMessage(messageBytes)
  },
}

const result = await gasStation.send({
  sourceSigner: signer,
  toAddress: 'RECIPIENT_ADDRESS',
  amount: 1_000_000, // lamports
  commitment: 'finalized',
})

console.log('Signature:', result.Signature)
```

> [!WARNING]
>
> Do not commit API keys, wallet secrets, mnemonics, or private keys to source control. Use environment variables or a secrets manager.

## Next steps

> [card] [TypeScript SDK overview](https://docs.altude.so/SDKs/solana/typescript/overview.md)
>
> Full guide: installation, client setup, and all available operations.

> [card] [API reference](https://docs.altude.so/api-reference/introduction.md)
>
> Direct REST API documentation for all Gas Station endpoints.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.