Appearance
Beginner Map
This section is for developers who are new to SAGE, new to Solana, or both.
The short version: the TypeScript packages let you read and build instructions for Star Atlas programs on Solana. SAGE C4 is browser strategy gameplay where fleets, resources, crafting, territory, and faction identity settle into on-chain state. Before you send anything, learn the nouns.
The big picture
txt
Wallet
signs transactions
Player Profile
stores Star Atlas identity and permissions
Profile Faction
stores the faction chosen by a profile
SAGE
stores and changes gameplay stateA wallet is the key that can sign. A profile is the Star Atlas identity. A faction account says which side that profile belongs to. SAGE accounts describe the game world: fleets, starbases, cargo, crafting, movement, combat, and other gameplay systems.
Words you will see everywhere
RPC
An RPC endpoint is the URL your code talks to when it reads Solana account data or sends transactions.
For SAGE C4 PTR, use:
txt
https://testnet-rpc.z.inkProgram
A Solana program is on-chain code. In these docs, the important programs are SAGE, Player Profile, and Profile Faction.
Account
A Solana account stores data. A SAGE fleet, a player profile, and a profile's faction are all accounts.
Address
An address identifies a program or account. It looks like a long base58 string.
PDA
A PDA is a Program Derived Address. It is an account address calculated from known inputs, called seeds.
For example, a profile's faction account can be derived from the profile address. You do not have to search the whole chain if you already know the profile.
Fetch helper
The generated packages include functions like fetchMaybeProfile and fetchMaybeFleet. These read and decode accounts for you.
Prefer fetchMaybe... while exploring because missing accounts become a normal exists: false result instead of an exception.
Instruction
An instruction asks a Solana program to do something. Reading an account is harmless. Sending an instruction can change game state, move assets, spend tokens, or require a wallet signature.
These docs start with read-only examples first.
First path through the docs
Read these pages in order:
After that, the reference-style pages will make much more sense.
Safety rule
Reading is fine. Signing is serious.
Before an example asks a wallet to sign, it should explain:
- which program is being called
- which account will change
- which wallet or profile authority is required
- whether assets, cargo, tokens, or fleet state can move
- how to simulate before sending
