NEWWatch an agent's payment get refused, and read the reason, in the live browser demo.Open the demo
AxorumAxorum
SDK language

Resources

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

idstring

The deterministic instance id (obl_…).

rulestring

The rule this instance was created from (rule_…).

actorstring

The actor the obligation binds (party_…).

actionobject

The obligated action. Performing it discharges this instance.

statestring

The lifecycle state: open, discharged, breached, or waived.

anchorinteger

The tick the instance was anchored at — its activation tick.

deadlineinteger | null

The tick after which the instance breaches, or null if it has none. Always present: a deadline-free obligation emits an explicit null.


GET/api/v1/obligationsList your party's obligations

Query parameters

actorstring | optional

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, answering 403 if 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

GET/api/v1/obligations
1use axorum_client::AxorumClient;
2
3let client = AxorumClient::builder("http://127.0.0.1:8080")
4 .attestation(attestation)
5 .build()?;
6
7// `None` → the party your attestation names. Pass `Some(party)` only to
8// assert who you are and be told `403` when you are wrong.
9let duties = client.obligations(None).await?;
10
11for duty in &duties.pending {
12 println!("{} — due at tick {:?}", duty.rule, duty.deadline);
13}
1{
2 "actor": "party_4h2mqx81g5bty927z2tj955css",
3 "pending": [
4 {
5 "id": "obl_8p3nry42h6cuz038a3uk066dtt",
6 "rule": "rule_settle_within_30d",
7 "actor": "party_4h2mqx81g5bty927z2tj955css",
8 "action": { "action": "settle", "bindings": {} },
9 "state": "Open",
10 "anchor": 4471,
11 "deadline": 7391
12 }
13 ]
14}
1{
2 "actor": "party_4h2mqx81g5bty927z2tj955css",
3 "pending": []
4}