Optionaloptions: CallOptionsconst receipt = await handleWebhook(ports.store, ports, {
provider: 'steam',
eventId: 'evt_8123',
userId: 'u_42',
amount: toAmount('CREDIT', 12_000n), // a $100 credit pack
source: 'steam',
});
// receipt.status is 'accepted' now, 'duplicate' on any redelivery of evt_8123
Maps a verified callback to the operation it applies (via toOperation), persists that to the inbox in one transaction, and returns. It does NOT post to the ledger inline; the apply worker (
drainInbox) submits the stored Operation later, so invariants and idempotency apply there.