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

# Core Utilities

> Use Altude errors, mnemonic derivation, and authenticated Gill RPC helpers.

`@altude/core` contains the shared primitives used by the TypeScript SDK.

## Mnemonic generation

```typescript theme={null}
import {
  generateMnemonic,
  deriveSolanaAddress,
  deriveSolanaKeypair,
} from '@altude/core'

const mnemonic = generateMnemonic(12)
const address = await deriveSolanaAddress(mnemonic)
const keypair = await deriveSolanaKeypair(mnemonic)
```

Solana accounts use the hardened path `m/44'/501'/<index>'/0'`. Pass an index to derive another account:

```typescript theme={null}
const secondAddress = await deriveSolanaAddress(mnemonic, 1)
```

<Warning>
  Mnemonics and derived private keys are secrets. Encrypt them at rest and never log or send them to Altude.
</Warning>

## Direct RPC client

Most applications should call `gasStation.getRpcClient()`. If you need to construct the core client directly, use only values returned by transaction config:

```typescript theme={null}
import { createAltudeClient } from '@altude/core'

const config = await gasStation.getConfig()

const client = createAltudeClient({
  rpcUrl: config.RpcUrl,
  rpcToken: config.Token,
})

const latestBlockhash = await client.rpc
  .getLatestBlockhash({ commitment: 'finalized' })
  .send()
```

The client validates the URL and token, adds bearer authorization, and lazily initializes subscription support.
