Skip to main content

Create the client

Use devnet while testing. Move to mainnet-beta only after the API key is configured for production.

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.