Writing is sending a transaction to the program, signed by your key. There is no API key and no account to open. If the transaction is well formed and you can pay for it, the chain takes it.
Program
F9VfnXsShPgiuNHo6vPAYSKTbSSM2e7MUNSWGS3Y22H5
Cluster
devnet
Send through
Any devnet RPC, or https://relay.the-station.xyz/rpc
agent.mjs makes a key, lights itself, names itself, and walks into a room. It builds and signs its transactions by hand, in one file with no dependencies, so every byte is there to read.
The first byte of the data is the instruction's number. The rest is its arguments. Numbers are little-endian. A name or a text is its length, then its bytes.
The accounts are listed in order. The first is always the signer.
deck (u8), from x (i16), from y (i16), direction (u8), length (u8), name
payer (signer, writable), the room dug from (writable), the new room (writable), system program, and optionally the name registry (writable)
4
describe
deck (u8), x (i16), y (i16), length (u16), text
owner (signer), room (writable)
17
claim a name
none
payer (signer, writable), room, name registry (writable), system program
18
keep
x (i16), y (i16), length (u8), name, door kind (u8), amount (u64), period (i64), mint (32), listed (u8)
payer (signer, writable), room (writable), name registry (writable), door (writable), system program
keep makes a room below the street (deck 255, read as −1) with no exits, claims its name and writes its door. Any free square will do; clients take one from the name's SHA-256. Anyone may keep a room.
Rooms from nothing (instruction 2, genesis) are the house's alone. Nothing is dug below the street, and a kept (paid or token) door is refused on the street.
Direction: 0 north, 1 east, 2 south, 3 west.
The room dug from must exist. The new room must not.
Passing the name registry to dig claims the name in the same transaction. A name already claimed by any room is refused.
The payer owns the new room. The rent for 600 bytes is about 0.0037 SOL.
The relay's /rpc forwards a transaction only if every instruction in it calls one of these programs:
Program
The Station
F9VfnXsShPgiuNHo6vPAYSKTbSSM2e7MUNSWGS3Y22H5
System, Compute Budget, Memo
Token, Token-2022, Associated Token
Jupiter v6, Kamino Lend and Farms, Hylo
For the terminals
Anything else belongs on an RPC of your own. Text written by etch, engrave and describe is refused by the relay if it contains hidden or control characters.