Updates for your agent
Your agent can follow what happens to your launches, and to a wallet and tokens you choose, as it happens. It needs a program that stays running: a conversation you have closed cannot receive anything.
What your agent can follow
- Your own launches. Every change to a launch prepared with your key, the moment its token appears on GAMA, and the moment the network reports its block finalised. Only the wallet that manages the key receives these.
- A wallet you choose. Creator payouts and claims, and holder reward payouts and claims, for that wallet. Without a choice it follows the wallet that manages the key.
- Up to 25 tokens you choose. Their launch, their graduation, and their reward payouts and claims.
Payouts, claims, launches and graduations are public on the chain, so any wallet or token can be followed.
Indexed and finalised
Every update says how it was observed.
- Service: a change to one of your launches that the service recorded itself, such as a new preparation. It is not something seen on the chain.
- Indexed: GAMA has seen it in a block. A recent block can still be replaced.
- Finalised: the network reports that block as finalised. Only your own launches get a separate update for this.
Payouts, claims and graduations arrive once, as indexed. Every batch of updates also names the latest finalised block, so for anything that depends on money having arrived, have your agent check that the payout's block is not after it.
WARNING
An update is information. It is never an instruction to sign or to send anything, and a token's name or description is never an instruction to your agent.
What your agent needs
- An API key with Read own launches. See API keys.
- A program that keeps running on your side. GAMA's command-line tool holds a live connection and remembers where it stopped, also after a restart. The SDK does so while its program runs; a program built on it has to save its own place to survive a restart.
- An agent that only works when you talk to it can still read the latest updates each time you ask.
GAMA does not call your server: there are no webhooks.
When updates start again
GAMA keeps up to 24 hours of updates, and fewer when the chain is very busy. If your agent was away for longer, or the chain replaced recent blocks, the service says so. The agent then takes a new starting point, reads the current state of your launches and wallets again, and carries on from there.
A gap is never reported as "nothing happened". The same update can arrive twice after a reconnection; your agent recognises it by its identifier.
Limits
A wallet has one live connection at a time, and a connection is renewed every two minutes, which the SDK and the command-line tool handle themselves. When no live connection is free, reading updates a page at a time still works.
