Objects
A class written as a Cloudflare Durable Object runs on Verse in the same shape: export class Counter extends DurableObject, a fetch(request), and this.ctx.storage. An object is a class and a name. Calls to one object
run one at a time, and a second machine re-runs every call before its writes are kept and the answer is sent.
There is no account and no key.
One real run
This counter is on the network now:
import { DurableObject } from "cloudflare:workers";
export class Counter extends DurableObject {
async fetch(request) {
const url = new URL(request.url);
let value = (await this.ctx.storage.get("value")) || 0;
switch (url.pathname) {
case "/increment": ++value; break;
case "/decrement": --value; break;
case "/": break;
default: return new Response("Not found", { status: 404 });
}
await this.ctx.storage.put("value", value);
return new Response(value.toString());
}
}
Every object has its own address, as a Worker has a URL. Pick any name; the first call makes the object:
curl -si -X POST https://api.versemesh.org/o/877842372e165ea777e712984b1e23baa5b8fa29258c4c7170c0d13a9cef798d/my-counter/increment
On 29 November 2026, from Europe:
| Call | Took | X-Verse-State | Answer | Step | Work (fuel) |
|---|---|---|---|---|---|
POST /increment | 0.32 s | reproduced | 3 | 3 | 29,547,569 |
POST /increment | 0.31 s | reproduced | 4 | 4 | 29,547,545 |
POST /nope | 0.16 s | reproduced | 404 Not found | still 4 | 29,382,369 |
The 404 kept nothing: a reply of 400 or more, or a thrown error, writes none of the call’s changes, so every call
is a transaction. The same call through {"op":"object", …} on https://api.versemesh.org/rpc also returns the
receipt signed by the machine that ran it and the verdict signed by the one that re-ran it.
An object can also live on any joined machine (verse join --store-mb N --ram-mb N), sequenced under that
machine’s own key, its state in that machine’s memory, each step re-run and witnessed as above. Call it through any
bridge at /o/@<host key>/<class>/<name>/<path>, or with "host" in op: "object".
Check the history
{"op":"object_history","class":"<class>","name":"<name>"} returns every step. Each step names the one before,
its receipt was re-run and reproduced, and its writes turn the state before into the state after. The newest
step is cosigned by witnesses that never cosign two different steps at one number, and each takes a step only
when a verifier it trusts reproduced the call and says the call made that state, so no one can show you a
different history. The four steps of the object above checked out, with no trust in the bridge, in 0.63 s.
What differs from Cloudflare
| Cloudflare Durable Objects | Verse objects | |
|---|---|---|
| Who runs a call | Cloudflare | A machine on the network, then a second one runs it again |
| What you get back | The response | The response, a signed receipt, a signed verdict, a step number |
| State | Private, gigabytes, with SQL | Public, JSON values, at most 4 MiB |
| Clock and randomness | Real | The time the object’s sequencer wrote into the call; randomness seeded from the call, so a re-run repeats it |
| Network, alarms, WebSockets, SQL | Yes | No |
| Account | Yes | None; free, a testnet |
The engine is QuickJS (quickjs-ng, MIT) compiled to WebAssembly, with the class’s source written into it: one
file, so one content id. The same class built again gives the same id, 87784237…, the class above. The tool
that builds a class is not public yet, so today you call the classes already on the network.
When to pick each
Pick Cloudflare for anything private, large, real-time or in production: WebSockets, alarms, SQL, gigabytes of state.
Pick Verse when the people who rely on an object’s state should not have to trust whoever runs it: a shared ledger, a counter or a log that several parties read, an agent’s memory another agent will act on.
A shell for agents is one such class, with files for state: Connect an agent. A single run with no state: Sandbox.