@indexing/jiti 0.1.5 → 0.1.6
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/dist/main.js +98 -0
- package/dist/main.js.map +1 -1
- package/dist/module.js +98 -0
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/fixtures/stellar/61961851.json +3 -0
- package/package.json +1 -1
package/dist/module.js
CHANGED
|
@@ -1458,6 +1458,23 @@ const $07b3982e2fc4c8b2$export$400f08bfae9ee97f = {
|
|
|
1458
1458
|
if (!Array.isArray(typedBlock.transactions)) return [];
|
|
1459
1459
|
for (const typedTx of typedBlock.transactions || []){
|
|
1460
1460
|
if (typedTx.TransactionType !== "Payment") continue;
|
|
1461
|
+
// Failed XRPL payments still burn Fee. Emit a fee-only transfer (to: null) so
|
|
1462
|
+
// callers account for the gas, and skip the payment amount that never landed.
|
|
1463
|
+
if (typedTx.metaData?.TransactionResult && typedTx.metaData.TransactionResult !== "tesSUCCESS") {
|
|
1464
|
+
transfers.push({
|
|
1465
|
+
amount: BigInt(typedTx.Fee ?? "0"),
|
|
1466
|
+
blockNumber: parseInt(typedBlock.ledger_index, 10),
|
|
1467
|
+
from: typedTx.Account ?? "UNKNOWN",
|
|
1468
|
+
memo: typedTx.DestinationTag,
|
|
1469
|
+
timestamp: typedBlock.close_time_iso || null,
|
|
1470
|
+
to: null,
|
|
1471
|
+
token: "XRP",
|
|
1472
|
+
tokenType: "NATIVE",
|
|
1473
|
+
transactionGasFee: BigInt(typedTx.Fee ?? "0"),
|
|
1474
|
+
transactionHash: typedTx.hash ?? ""
|
|
1475
|
+
});
|
|
1476
|
+
continue;
|
|
1477
|
+
}
|
|
1461
1478
|
const deliveredOrAmount = typedTx.metaData?.delivered_amount ?? typedTx.Amount ?? "0";
|
|
1462
1479
|
let tokenSymbol = "XRP";
|
|
1463
1480
|
let tokenType = "NATIVE";
|
|
@@ -1506,6 +1523,45 @@ const $07b3982e2fc4c8b2$export$400f08bfae9ee97f = {
|
|
|
1506
1523
|
transactionHash: "B32A6A5455777283212407FBD8CCA701505C654E5F4ADFFBE9D4D22F00889D87"
|
|
1507
1524
|
}
|
|
1508
1525
|
]
|
|
1526
|
+
},
|
|
1527
|
+
// Failed XRPL payments emit ONLY a fee transfer (to: null) — the payment Amount
|
|
1528
|
+
// never reached the Destination, but the Fee was still burned.
|
|
1529
|
+
{
|
|
1530
|
+
params: {
|
|
1531
|
+
network: "RIPPLE"
|
|
1532
|
+
},
|
|
1533
|
+
payload: {
|
|
1534
|
+
_network: "RIPPLE",
|
|
1535
|
+
ledger_index: "100000000",
|
|
1536
|
+
close_time_iso: "2026-04-04T08:02:44Z",
|
|
1537
|
+
transactions: [
|
|
1538
|
+
{
|
|
1539
|
+
TransactionType: "Payment",
|
|
1540
|
+
Account: "rFAILFROMxxxxxxxxxxxxxxxxxxxxxxxxx",
|
|
1541
|
+
Destination: "rFAILTOxxxxxxxxxxxxxxxxxxxxxxxxxx",
|
|
1542
|
+
Amount: "1000000",
|
|
1543
|
+
Fee: "10",
|
|
1544
|
+
hash: "FAILEDXRPLTXHASH",
|
|
1545
|
+
metaData: {
|
|
1546
|
+
TransactionResult: "tecPATH_DRY"
|
|
1547
|
+
}
|
|
1548
|
+
}
|
|
1549
|
+
]
|
|
1550
|
+
},
|
|
1551
|
+
output: [
|
|
1552
|
+
{
|
|
1553
|
+
amount: 10n,
|
|
1554
|
+
blockNumber: 100000000,
|
|
1555
|
+
from: "rFAILFROMxxxxxxxxxxxxxxxxxxxxxxxxx",
|
|
1556
|
+
memo: undefined,
|
|
1557
|
+
timestamp: "2026-04-04T08:02:44Z",
|
|
1558
|
+
to: null,
|
|
1559
|
+
token: "XRP",
|
|
1560
|
+
tokenType: "NATIVE",
|
|
1561
|
+
transactionGasFee: 10n,
|
|
1562
|
+
transactionHash: "FAILEDXRPLTXHASH"
|
|
1563
|
+
}
|
|
1564
|
+
]
|
|
1509
1565
|
}
|
|
1510
1566
|
]
|
|
1511
1567
|
};
|
|
@@ -3242,6 +3298,23 @@ const $725699ccb951d76d$export$681f497010b17679 = {
|
|
|
3242
3298
|
let transfers = [];
|
|
3243
3299
|
const typedBlock = block;
|
|
3244
3300
|
for (const typedTx of typedBlock.transactions || []){
|
|
3301
|
+
// Failed txs still burn fee_charged — emit a fee transfer (to: null) so callers
|
|
3302
|
+
// can account for the gas, but skip the payment ops that never actually moved funds.
|
|
3303
|
+
if (!typedTx.successful) {
|
|
3304
|
+
transfers.push({
|
|
3305
|
+
amount: BigInt(typedTx.fee_charged),
|
|
3306
|
+
blockNumber: typedBlock.sequence,
|
|
3307
|
+
from: typedTx.source_account,
|
|
3308
|
+
memo: typedTx.memo,
|
|
3309
|
+
timestamp: typedTx.created_at,
|
|
3310
|
+
to: null,
|
|
3311
|
+
token: null,
|
|
3312
|
+
tokenType: "NATIVE",
|
|
3313
|
+
transactionGasFee: BigInt(typedTx.fee_charged),
|
|
3314
|
+
transactionHash: typedTx.hash
|
|
3315
|
+
});
|
|
3316
|
+
continue;
|
|
3317
|
+
}
|
|
3245
3318
|
for (const op of typedTx.operations)if (op.type === "payment") transfers.push({
|
|
3246
3319
|
amount: BigInt(op.amount.replace(".", "")),
|
|
3247
3320
|
blockNumber: typedBlock.sequence,
|
|
@@ -3290,6 +3363,31 @@ const $725699ccb951d76d$export$681f497010b17679 = {
|
|
|
3290
3363
|
transactionHash: "c554aed41145304e03c0877c9de526cdcb8a8255c9bf156ff0dec202ab12e20d"
|
|
3291
3364
|
}
|
|
3292
3365
|
]
|
|
3366
|
+
},
|
|
3367
|
+
// Failed Stellar txs emit ONLY a fee transfer (to: null), never the failed payment
|
|
3368
|
+
// operations. Ledger 61961851 / tx 9024ba4b... is the Mesh incident — the source
|
|
3369
|
+
// tried to send 1_000_000_000 stroops to GAGLH6..., the tx reverted, and the only
|
|
3370
|
+
// on-chain effect was the 100-stroop fee being charged.
|
|
3371
|
+
{
|
|
3372
|
+
params: {
|
|
3373
|
+
network: "STELLAR",
|
|
3374
|
+
transactionHash: "9024ba4b558b09042cb02afd1d46eea72597891691801375acee332273c5c26d"
|
|
3375
|
+
},
|
|
3376
|
+
payload: "https://jiti.indexing.co/networks/stellar/61961851",
|
|
3377
|
+
output: [
|
|
3378
|
+
{
|
|
3379
|
+
amount: 100n,
|
|
3380
|
+
blockNumber: 61961851,
|
|
3381
|
+
from: "GCP7I54JXTOZ4SJG4UARWJOMJ25JQXRHSHXQWDSV4TRVRJFDG67VUEXP",
|
|
3382
|
+
memo: undefined,
|
|
3383
|
+
timestamp: "2026-04-04T08:02:44Z",
|
|
3384
|
+
to: null,
|
|
3385
|
+
token: null,
|
|
3386
|
+
tokenType: "NATIVE",
|
|
3387
|
+
transactionGasFee: 100n,
|
|
3388
|
+
transactionHash: "9024ba4b558b09042cb02afd1d46eea72597891691801375acee332273c5c26d"
|
|
3389
|
+
}
|
|
3390
|
+
]
|
|
3293
3391
|
}
|
|
3294
3392
|
]
|
|
3295
3393
|
};
|