@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/main.js
CHANGED
|
@@ -1467,6 +1467,23 @@ const $2e46ec862e47c14f$export$400f08bfae9ee97f = {
|
|
|
1467
1467
|
if (!Array.isArray(typedBlock.transactions)) return [];
|
|
1468
1468
|
for (const typedTx of typedBlock.transactions || []){
|
|
1469
1469
|
if (typedTx.TransactionType !== "Payment") continue;
|
|
1470
|
+
// Failed XRPL payments still burn Fee. Emit a fee-only transfer (to: null) so
|
|
1471
|
+
// callers account for the gas, and skip the payment amount that never landed.
|
|
1472
|
+
if (typedTx.metaData?.TransactionResult && typedTx.metaData.TransactionResult !== "tesSUCCESS") {
|
|
1473
|
+
transfers.push({
|
|
1474
|
+
amount: BigInt(typedTx.Fee ?? "0"),
|
|
1475
|
+
blockNumber: parseInt(typedBlock.ledger_index, 10),
|
|
1476
|
+
from: typedTx.Account ?? "UNKNOWN",
|
|
1477
|
+
memo: typedTx.DestinationTag,
|
|
1478
|
+
timestamp: typedBlock.close_time_iso || null,
|
|
1479
|
+
to: null,
|
|
1480
|
+
token: "XRP",
|
|
1481
|
+
tokenType: "NATIVE",
|
|
1482
|
+
transactionGasFee: BigInt(typedTx.Fee ?? "0"),
|
|
1483
|
+
transactionHash: typedTx.hash ?? ""
|
|
1484
|
+
});
|
|
1485
|
+
continue;
|
|
1486
|
+
}
|
|
1470
1487
|
const deliveredOrAmount = typedTx.metaData?.delivered_amount ?? typedTx.Amount ?? "0";
|
|
1471
1488
|
let tokenSymbol = "XRP";
|
|
1472
1489
|
let tokenType = "NATIVE";
|
|
@@ -1515,6 +1532,45 @@ const $2e46ec862e47c14f$export$400f08bfae9ee97f = {
|
|
|
1515
1532
|
transactionHash: "B32A6A5455777283212407FBD8CCA701505C654E5F4ADFFBE9D4D22F00889D87"
|
|
1516
1533
|
}
|
|
1517
1534
|
]
|
|
1535
|
+
},
|
|
1536
|
+
// Failed XRPL payments emit ONLY a fee transfer (to: null) — the payment Amount
|
|
1537
|
+
// never reached the Destination, but the Fee was still burned.
|
|
1538
|
+
{
|
|
1539
|
+
params: {
|
|
1540
|
+
network: "RIPPLE"
|
|
1541
|
+
},
|
|
1542
|
+
payload: {
|
|
1543
|
+
_network: "RIPPLE",
|
|
1544
|
+
ledger_index: "100000000",
|
|
1545
|
+
close_time_iso: "2026-04-04T08:02:44Z",
|
|
1546
|
+
transactions: [
|
|
1547
|
+
{
|
|
1548
|
+
TransactionType: "Payment",
|
|
1549
|
+
Account: "rFAILFROMxxxxxxxxxxxxxxxxxxxxxxxxx",
|
|
1550
|
+
Destination: "rFAILTOxxxxxxxxxxxxxxxxxxxxxxxxxx",
|
|
1551
|
+
Amount: "1000000",
|
|
1552
|
+
Fee: "10",
|
|
1553
|
+
hash: "FAILEDXRPLTXHASH",
|
|
1554
|
+
metaData: {
|
|
1555
|
+
TransactionResult: "tecPATH_DRY"
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
]
|
|
1559
|
+
},
|
|
1560
|
+
output: [
|
|
1561
|
+
{
|
|
1562
|
+
amount: 10n,
|
|
1563
|
+
blockNumber: 100000000,
|
|
1564
|
+
from: "rFAILFROMxxxxxxxxxxxxxxxxxxxxxxxxx",
|
|
1565
|
+
memo: undefined,
|
|
1566
|
+
timestamp: "2026-04-04T08:02:44Z",
|
|
1567
|
+
to: null,
|
|
1568
|
+
token: "XRP",
|
|
1569
|
+
tokenType: "NATIVE",
|
|
1570
|
+
transactionGasFee: 10n,
|
|
1571
|
+
transactionHash: "FAILEDXRPLTXHASH"
|
|
1572
|
+
}
|
|
1573
|
+
]
|
|
1518
1574
|
}
|
|
1519
1575
|
]
|
|
1520
1576
|
};
|
|
@@ -3251,6 +3307,23 @@ const $3478cd776d185339$export$681f497010b17679 = {
|
|
|
3251
3307
|
let transfers = [];
|
|
3252
3308
|
const typedBlock = block;
|
|
3253
3309
|
for (const typedTx of typedBlock.transactions || []){
|
|
3310
|
+
// Failed txs still burn fee_charged — emit a fee transfer (to: null) so callers
|
|
3311
|
+
// can account for the gas, but skip the payment ops that never actually moved funds.
|
|
3312
|
+
if (!typedTx.successful) {
|
|
3313
|
+
transfers.push({
|
|
3314
|
+
amount: BigInt(typedTx.fee_charged),
|
|
3315
|
+
blockNumber: typedBlock.sequence,
|
|
3316
|
+
from: typedTx.source_account,
|
|
3317
|
+
memo: typedTx.memo,
|
|
3318
|
+
timestamp: typedTx.created_at,
|
|
3319
|
+
to: null,
|
|
3320
|
+
token: null,
|
|
3321
|
+
tokenType: "NATIVE",
|
|
3322
|
+
transactionGasFee: BigInt(typedTx.fee_charged),
|
|
3323
|
+
transactionHash: typedTx.hash
|
|
3324
|
+
});
|
|
3325
|
+
continue;
|
|
3326
|
+
}
|
|
3254
3327
|
for (const op of typedTx.operations)if (op.type === "payment") transfers.push({
|
|
3255
3328
|
amount: BigInt(op.amount.replace(".", "")),
|
|
3256
3329
|
blockNumber: typedBlock.sequence,
|
|
@@ -3299,6 +3372,31 @@ const $3478cd776d185339$export$681f497010b17679 = {
|
|
|
3299
3372
|
transactionHash: "c554aed41145304e03c0877c9de526cdcb8a8255c9bf156ff0dec202ab12e20d"
|
|
3300
3373
|
}
|
|
3301
3374
|
]
|
|
3375
|
+
},
|
|
3376
|
+
// Failed Stellar txs emit ONLY a fee transfer (to: null), never the failed payment
|
|
3377
|
+
// operations. Ledger 61961851 / tx 9024ba4b... is the Mesh incident — the source
|
|
3378
|
+
// tried to send 1_000_000_000 stroops to GAGLH6..., the tx reverted, and the only
|
|
3379
|
+
// on-chain effect was the 100-stroop fee being charged.
|
|
3380
|
+
{
|
|
3381
|
+
params: {
|
|
3382
|
+
network: "STELLAR",
|
|
3383
|
+
transactionHash: "9024ba4b558b09042cb02afd1d46eea72597891691801375acee332273c5c26d"
|
|
3384
|
+
},
|
|
3385
|
+
payload: "https://jiti.indexing.co/networks/stellar/61961851",
|
|
3386
|
+
output: [
|
|
3387
|
+
{
|
|
3388
|
+
amount: 100n,
|
|
3389
|
+
blockNumber: 61961851,
|
|
3390
|
+
from: "GCP7I54JXTOZ4SJG4UARWJOMJ25JQXRHSHXQWDSV4TRVRJFDG67VUEXP",
|
|
3391
|
+
memo: undefined,
|
|
3392
|
+
timestamp: "2026-04-04T08:02:44Z",
|
|
3393
|
+
to: null,
|
|
3394
|
+
token: null,
|
|
3395
|
+
tokenType: "NATIVE",
|
|
3396
|
+
transactionGasFee: 100n,
|
|
3397
|
+
transactionHash: "9024ba4b558b09042cb02afd1d46eea72597891691801375acee332273c5c26d"
|
|
3398
|
+
}
|
|
3399
|
+
]
|
|
3302
3400
|
}
|
|
3303
3401
|
]
|
|
3304
3402
|
};
|