void_final_reply_queue

Durable handoff for final, postprocessed Stargazer VOID replies.

The chain writer consumes this stream directly. Holder-room pub/sub is only presentation fanout and is deliberately never an authority to spend funds.

exception void_final_reply_queue.VoidTriggerAuthorityError

Bases: RuntimeError

The durable trigger authority is malformed or conflicts with its log.

void_final_reply_queue.build_void_trigger_record(*, principal_id, wallet, soul, tx_hash, log_index, block_number, block_hash, log_source, identity_verified, requires_summon=True, egregore='', egregores=None, active_chart='')

Build the shared canonical authority record used by both ingest paths.

Return type:

dict[str, Any]

Parameters:
void_final_reply_queue.decode_void_trigger_record(raw, *, expected_trigger_id)

Decode a canonical trigger record, rejecting legacy/plain claims.

Return type:

dict[str, Any] | None

Parameters:
  • raw (Any)

  • expected_trigger_id (str)

async void_final_reply_queue.store_or_reconcile_void_trigger_record(redis, record, *, ttl_seconds=2592000, allow_placement_reconcile=False)

Create authority or atomically move it to a re-included log’s block.

A transaction hash and log index identify the same immutable event across a reorg. Only its canonical block placement may change. Existing routing and principal metadata therefore remain authoritative, while a compare- and-set prevents concurrent scanners from overwriting one another.

Return type:

tuple[dict[str, Any], str]

Parameters:
void_final_reply_queue.void_intent_key(tx_hash, wallet)

Return a poison-resistant key scoped to transaction hash and wallet.

Return type:

str

Parameters:
void_final_reply_queue.build_void_intent_record(*, tx_hash, wallet, principal_id, egregore, active_chart='', client_message_id='')

Build authenticated pre-receipt metadata for a browser VOID send.

Return type:

dict[str, Any]

Parameters:
  • tx_hash (str)

  • wallet (str)

  • principal_id (str)

  • egregore (str)

  • active_chart (str)

  • client_message_id (str)

void_final_reply_queue.decode_void_intent_record(raw, *, expected_tx_hash, expected_wallet, allowed_egregores)

Decode an intent only for its canonical transaction sender.

Return type:

dict[str, Any] | None

Parameters:
  • raw (Any)

  • expected_tx_hash (str)

  • expected_wallet (str)

  • allowed_egregores (set[str])

async void_final_reply_queue.enqueue_void_final_reply(redis, *, phase, trigger_id, principal_id, text, message_key)

Append one authoritative final reply job to the durable stream.

phase is intentionally mandatory. Any intermediate/status/error send that accidentally reaches this helper is rejected before touching Redis.

Return type:

dict[str, Any] | None

Parameters:
  • redis (Any)

  • phase (str)

  • trigger_id (str)

  • principal_id (str)

  • text (str)

  • message_key (str)

void_final_reply_queue.decode_void_final_reply(fields)

Decode and bound a Redis Stream field mapping.

Return type:

dict[str, str]

Parameters:

fields (dict[Any, Any])