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

# React Native and Hermes

> Use altude-js in React Native without Node.js Buffer or WebSocket polyfills.

`@altude/core` and `@altude/gasstation` publish dedicated `react-native` entrypoints. Metro selects them through the package export condition.

## Install

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

Use the same public imports as other runtimes:

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

const gasStation = new AltudeGasStation({
  apiKey: runtimeConfig.altudeApiKey,
})

await gasStation.init()
```

The API key is the only required runtime input. `init()` resolves the cluster,
RPC URL, JWT, and fee payer from Altude's config API for that key.

## Compatibility behavior

* HTTP RPC clients initialize without Node.js `Buffer`
* Transaction-building paths avoid `DOMException` assumptions
* Gill's React Native entrypoint is selected instead of its Node/WebSocket build
* RPC subscriptions initialize only when a subscription-dependent property is accessed

> [!WARNING]
>
> Do not add a Metro `extraNodeModules` alias that forces the Node.js Gill package. Doing so can reintroduce `ws`, `Buffer`, and other Node-only dependencies.

## Subscriptions

HTTP methods work with the React Native entrypoint. Accessing `rpcSubscriptions` still requires WebSocket capabilities from the target runtime.

```typescript theme={null}
const rpcClient = await gasStation.getRpcClient()

// Only access this when the runtime provides the WebSocket support Gill expects.
const subscriptions = rpcClient.rpcSubscriptions
```

## See it in a payment app

> [card] [React Native payment app demo](https://docs.altude.so/SDKs/solana/typescript/react-native-pay-demo.md)
>
> Explore a complete USDC payment flow with local signing, sponsored fees, confirmation states, receipts, activity, and QR payment building blocks.

> [!NOTE]
>
> The demo is a Devnet reference implementation. Review its security warning before reusing its wallet storage or credential setup.


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