Obligations
The normative half of the ledger. A commit can post and open a duty; a later commit can discharge it. This endpoint answers what your party owes right now — whose duties these are is decided by your attestation, not by an argument.
The obligation instance
- Name
id- Type
- string
- Description
The deterministic instance id (
obl_…).
- Name
rule- Type
- string
- Description
The rule this instance was created from (
rule_…).
- Name
actor- Type
- string
- Description
The actor the obligation binds (
party_…).
- Name
action- Type
- object
- Description
The obligated action. Performing it discharges this instance.
- Name
state- Type
- string
- Description
The lifecycle state: open, discharged, breached, or waived.
- Name
anchor- Type
- integer
- Description
The tick the instance was anchored at — its activation tick.
- Name
deadline- Type
- integer | null
- Description
The tick after which the instance breaches, or
nullif it has none. Always present: a deadline-free obligation emits an explicitnull.
List your party's obligations
Query parameters
- Name
actor- Type
- string | optional
- Description
Optional, and an assertion the service checks rather than a selector it obeys. Omit it and you are answered for the party your attestation names. Pass a party id (
party_…) or a DSL party name and the service confirms it resolves to that same party, answering403if it does not. It lets a caller be explicit about who it believes it is; it can no longer be used to ask about anyone else.
This is a party-scoped read: the client presents its attestation, and a client that holds none fails locally before a request is sent. A duty-free party is not an error — it answers 200 with an empty pending list. "Your party owes nothing" is a fact worth returning plainly.
The response echoes an actor alongside the duties. Omit the query parameter and it reports the party id the token resolved to (party_…); pass one and it echoes your string back verbatim. Either way the pending duties are the same — your party's.
The same list arrives unprompted on every intent outcome, as obligations_pending — so an agent that acts on its own duties rarely needs to call this at all.
List obligations
use axorum_client::AxorumClient;
let client = AxorumClient::builder("http://127.0.0.1:8080")
.attestation(attestation)
.build()?;
// `None` → the party your attestation names. Pass `Some(party)` only to
// assert who you are and be told `403` when you are wrong.
let duties = client.obligations(None).await?;
for duty in &duties.pending {
println!("{} — due at tick {:?}", duty.rule, duty.deadline);
}
Response
{
"actor": "party_4h2mqx81g5bty927z2tj955css",
"pending": [
{
"id": "obl_8p3nry42h6cuz038a3uk066dtt",
"rule": "rule_settle_within_30d",
"actor": "party_4h2mqx81g5bty927z2tj955css",
"action": { "action": "settle", "bindings": {} },
"state": "Open",
"anchor": 4471,
"deadline": 7391
}
]
}
Response — owes nothing
{
"actor": "party_4h2mqx81g5bty927z2tj955css",
"pending": []
}