aeat.application.ledger._participation_read module

Read action: surface the modelo participations of one ledger transaction.

The inverse of the forward source_transaction_ids link. Loads the per-transaction TransactionRevisionParticipationIndex from encrypted storage and returns it for the CLI surface to project into a typed payload. The index records only finalized-revision participations (borrador inclusion is deferred), so the read is the audit-trail answer to “where was this transaction declared”.

get_transaction_participation(*, transaction_id, bucket_id=None, participation_index_repository=None)[source]

Return the finalized-revision participation index for one ledger transaction.

Returns an empty TransactionRevisionParticipationIndex (no participations) when the transaction has never contributed to a finalized revision, rather than raising — an auditable “no declarations” answer.

Parameters:
  • transaction_id (str) – The ledger transaction id to look up.

  • bucket_id (str | None) – Optional explicit profile bucket; resolves the active bucket when omitted.

  • participation_index_repository (TransactionParticipationIndexRepository | None) – Optional repository override (tests).

Return type:

TransactionRevisionParticipationIndex