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.
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
- Name
txn_id- Type
- string
- Description
The transaction id (
txn_…) the client minted. A malformed id is a400 invalid_transaction_id; an unknown one is a404 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
use axorum_client::AxorumClient;
// A transaction lookup is party-scoped: the client presents its attestation,
// and the record comes back only to the party that proposed it.
let client = AxorumClient::builder("http://127.0.0.1:8080")
.attestation(attestation)
.build()?;
let record = client.transaction(&transaction).await?;
Response — opaque, but posted is guaranteed
{
"transaction": "txn_7w5b4trnc7b2ja027jyyb64395",
"posted": false,
"tick": 4472
}
Response — unknown (404)
{
"error": "unknown_transaction",
"message": "No transaction with that id has been recorded."
}