mtok-verify 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/onchain.js +2 -2
- package/package.json +1 -1
package/onchain.js
CHANGED
|
@@ -277,9 +277,9 @@ export function createOnchainVerifier({ rpcUrl, rpcUrls, usdcAddress, expectedCh
|
|
|
277
277
|
// Once redemption records expire, verified payment age is the replay boundary.
|
|
278
278
|
// An unreadable timestamp is retryable uncertainty, never permission to spend.
|
|
279
279
|
const maxAge = Number(maxPaidAgeMs);
|
|
280
|
+
let paidAtMs = null;
|
|
280
281
|
if (Number.isFinite(maxAge) && maxAge > 0) {
|
|
281
282
|
const bn = matchedLog?.blockNumber ?? got.receipt.blockNumber;
|
|
282
|
-
let paidAtMs = null;
|
|
283
283
|
if (bn != null) {
|
|
284
284
|
for (let i = 0; i <= receiptRetries; i++) {
|
|
285
285
|
try {
|
|
@@ -317,7 +317,7 @@ export function createOnchainVerifier({ rpcUrl, rpcUrls, usdcAddress, expectedCh
|
|
|
317
317
|
if (!feeTransfer.ok) return { ok: false, reason: 'fee_transfer_' + feeTransfer.reason };
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
-
return { ok: true, event, from: sellerTransfer?.from ?? feeTransfer?.from ?? null };
|
|
320
|
+
return { ok: true, event, paidAtMs, from: sellerTransfer?.from ?? feeTransfer?.from ?? null };
|
|
321
321
|
},
|
|
322
322
|
};
|
|
323
323
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mtok-verify",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "The on-chain verify core for mtok.market sellers: decode + verify a MtokDripLedger DrawPaid receipt (and its USDC transfer legs) against a paid draw, with the canonical DrawPaid topic set. Dependency-free, runs anywhere fetch runs (node, a CF Worker). The SSOT the platform + reference relay + house seller all share.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|