core: redeem badge codes and issue credentials

This commit is contained in:
shum
2026-08-27 10:28:26 +00:00
parent 05d4724d41
commit 89e9bf4be7
5 changed files with 598 additions and 119 deletions
+4 -1
View File
@@ -80,7 +80,10 @@ data LedgerEntryType = LECredit {credit :: LedgerCreditType} | LEDebit {debit ::
-- confirmed
data LedgerCreditType
= CTPayment {invoiceId :: Int64}
= -- | badge_ledger.payment_id TEXT REFERENCES payments -- the payment's own id, not the
-- invoice's: a code payment has no invoice at all, and an invoice-funded payment reaches
-- its invoice through payments.invoice_id.
CTPayment {paymentId :: Text}
| CTCharge {chargeId :: Int64}
| CTSupport
| CTTransferIn {fromPurchaseId :: Maybe Int64}