---
url: /index.md
description: >-
  Community-maintained developer documentation for Star Atlas SAGE C4 and its
  generated TypeScript bindings on the z.ink PTR.
---

## Where the bindings fit

The packages documented here are generated TypeScript **bindings**: typed
adapters between your application and the Star Atlas programs running on
z.ink. They know how to decode program accounts, derive addresses when the
seeds are known, and build transaction instructions.

They are not a wallet, indexer, game server, or safety layer. Your application
still decides which accounts to discover, what an action means to the player,
which signer is allowed to authorize it, and whether a transaction should be
sent.

```mermaid
flowchart LR
  app["Your app or agent"]
  bindings["Generated Star Atlas bindings"]
  kit["@solana/kit"]
  rpc["z.ink RPC"]
  programs["Star Atlas programs"]
  accounts["Program-owned accounts"]

  app --> bindings --> kit --> rpc --> programs --> accounts
  accounts --> rpc --> kit --> bindings --> app
```

Start with the [Beginner Map](/sage-c4-bindings/beginner-map) for the account
hierarchy, or use the runnable check below to prove that your code is connected
to the correct deployment.

## Quick start

```ts
import { address, createSolanaRpc } from '@solana/kit';

export const sagePtrCluster = {
	http: 'https://testnet-rpc.z.ink',
	ws: 'wss://testnet-rpc.z.ink',
	explorer: 'https://explorer.z.ink',
	commitment: 'confirmed'
} as const;

const rpc = createSolanaRpc(sagePtrCluster.http);
const game = address('EKEj47SzaCjPM3m4T4vRXrrsVtkEmiNgPMMFye3AkXj4');
const sageProgram = address('C4SAgeKLgb3pTLWhVr6NRwWyYFuTR7ZeSXFrzoLwfMzF');

const { value: account } = await rpc.getAccountInfo(game, {
	commitment: sagePtrCluster.commitment,
	encoding: 'base64',
	dataSlice: { offset: 0, length: 0 }
}).send();

if (!account || account.owner !== sageProgram) {
	throw new Error('C4 Game account not found on this cluster');
}
```

This confirms that the known C4 Game account exists on z.ink and belongs to the
expected SAGE program without downloading its roughly 2.5 MB data buffer. Continue
with [Reading Live Game State](/sage-c4-bindings/reading-game-state) to discover
and decode gameplay accounts.
