Skip to main content

Create the client

The API key is the only required runtime value. The selected cluster comes from the API key’s Altude configuration, so callers should not supply devnet, testnet, or mainnet-beta manually.

Initialize runtime configuration

init() requests GET /api/transaction/config with your API key. The response supplies: The SDK caches valid configuration and refreshes it near token expiration.
The API response is authoritative. Do not replace RpcUrl, Token, or FeePayer with public endpoints or hard-coded values.

Provide a signer

Transaction-building methods accept a GaslessTransactionSigner. The signer exposes its Solana address and signs transaction message bytes locally:
Adapt the method body to your wallet library. Private key material should never be sent to Altude.

Custom API base URL

Use baseUrl only when Altude provides a non-default API environment:

Mock mode

Constructing the client without an API key enables local mock responses for selected HTTP methods. Live RPC operations require an API key and reject with RPC_ERROR when configuration cannot be resolved.