Skip to main content
A client calls the functions an app exposes. A function is exposed when it declares allow: [roles]. Without allow, it is internal, and no client can reach it. The references are typed from the app tree, so the paths, arguments, values and refusal codes are checked where you call them.
Every call answers a Result: a value, or a refusal with a code and a sentence the caller may read. Nothing throws for a refusal.

Choose an interface

References and frames

  • A reference. The generated app gives callable and label paths, such as app.notes.add.
  • A frame. client.under(label), .in(world) and .at(instant) return a client in that frame. See Frames and trials.
  • A credential. connect(url, { token }) takes an auth adapter or a fixed token. See Connect and authenticate.
A client holds no authority of its own. Each call is decided by the function’s allow, the frame’s grants, the labels it reads and writes, and the guards on its acts.

Keep values live

client.watch and useWatch keep a query’s value current: the host runs the query again when anything it read changes. See Realtime.