> ## 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!,
  network: 'devnet',
})

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.

## 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.
</Warning>

## Next steps

<CardGroup cols={2}>
  <Card title="TypeScript SDK overview" icon="js" href="/SDKs/solana/typescript/overview">
    Full guide: installation, client setup, and all available operations.
  </Card>

  <Card title="API reference" icon="book" href="/api-reference/introduction">
    Direct REST API documentation for all Gas Station endpoints.
  </Card>
</CardGroup>
