AxorumAxorum
SDK language

Resources

Transactions

The stored record of one transaction, read by the id the client minted for it. This is how you learn what happened to a submission without submitting it again.

GET/api/v1/transactions/{txn_id}Read a transaction

Because the transaction id is minted by the client and is the substrate's idempotency key, you can always ask what became of one — including after a 503 commit_unavailable, where the mutation may or may not have landed.

Path parameters

txn_idstring

The transaction id (txn_…) the client minted. A malformed id is a 400 invalid_transaction_id; an unknown one is a 404 unknown_transaction.

The record is opaque

The response is the raw normative-log record, and this version of the contract declares it a free-form object. Its shape is a tagged union over every kind of ledger event and it is still moving; publishing a schema for it now would mean publishing a guess. Treat it as opaque JSON. It gets a frozen contract in a later version.

What is guaranteed today: a committed transaction's record carries a posted boolean, and a recorded refusal appears with posted: false.

Read a transaction

GET/api/v1/transactions/{txn_id}
1use axorum_client::AxorumClient;
2
3// A transaction lookup is party-scoped: the client presents its attestation,
4// and the record comes back only to the party that proposed it.
5let client = AxorumClient::builder("http://127.0.0.1:8080")
6 .attestation(attestation)
7 .build()?;
8
9let record = client.transaction(&transaction).await?;
1{
2 "transaction": "txn_7w5b4trnc7b2ja027jyyb64395",
3 "posted": false,
4 "tick": 4472
5}
1{
2 "error": "unknown_transaction",
3 "message": "No transaction with that id has been recorded."
4}