@indexing/jiti 0.0.77 → 0.1.1

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/module.js CHANGED
@@ -112,10 +112,7 @@ function $82293038337e7b3f$export$363ea1acea6aebd6(block) {
112
112
  case "CARDANO":
113
113
  return block.block_identifier.index;
114
114
  case "COSMOS":
115
- {
116
- const typedBlock = block;
117
- return Number(typedBlock.block.header.height);
118
- }
115
+ return Number(block.block.header.height);
119
116
  case "EVM":
120
117
  return block.number;
121
118
  case "FILECOIN":
@@ -157,15 +154,12 @@ function $e23c2d0dc0ca1317$export$eda46897866e27cc(block) {
157
154
  for (const tx of block.transactions || [])hashes.add(tx.hash);
158
155
  break;
159
156
  case "CARDANO":
160
- for (const tx of block.transactions || []){
161
- const typedTx = tx;
162
- hashes.add(typedTx.transaction_identifier?.hash);
163
- }
157
+ for (const tx of block.transactions || [])hashes.add(tx.transaction_identifier?.hash);
164
158
  break;
165
159
  case "COSMOS":
166
160
  {
167
- const typedBlock = block;
168
- for (const txRaw of typedBlock.block.data.txs || []){
161
+ const cosmosBlock = block;
162
+ for (const txRaw of cosmosBlock.block.data.txs || []){
169
163
  const txHash = (0, $hgUW1$sha256)(new Uint8Array($e23c2d0dc0ca1317$require$Buffer.from(txRaw, "base64")));
170
164
  hashes.add(txHash.slice(2).toUpperCase());
171
165
  }
@@ -176,8 +170,8 @@ function $e23c2d0dc0ca1317$export$eda46897866e27cc(block) {
176
170
  break;
177
171
  case "FILECOIN":
178
172
  {
179
- const typedBlock = block;
180
- for (const msgGroup of typedBlock.messages){
173
+ const filecoinBlock = block;
174
+ for (const msgGroup of filecoinBlock.messages){
181
175
  const secpkMessages = msgGroup.blockMessages.SecpkMessages || [];
182
176
  for (const msg of secpkMessages)hashes.add(msg.CID["/"]);
183
177
  }
@@ -202,8 +196,11 @@ function $e23c2d0dc0ca1317$export$eda46897866e27cc(block) {
202
196
  for (const tx of block.transactions || [])hashes.add(tx.transaction.signatures[0]);
203
197
  break;
204
198
  case "TON":
205
- for (const shard of block.shards || [])for (const tx of shard.transactions || [])hashes.add(tx.transacion_id.hash);
206
- break;
199
+ {
200
+ const tonBlock = block;
201
+ for (const shard of tonBlock.shards || [])for (const tx of shard.transactions || [])hashes.add(tx.transaction_id.hash);
202
+ break;
203
+ }
207
204
  case "UTXO":
208
205
  for (const tx of block.tx)hashes.add(tx.txid);
209
206
  break;
@@ -224,7 +221,10 @@ function $cc5213c20a6615f3$export$ec64f6024312bb14(block) {
224
221
  const vm = (0, $09654dffcb68affa$export$ae001c77434c5340)(block);
225
222
  switch(vm){
226
223
  case "APTOS":
227
- return new Date(parseInt(block.transactions[0].timestamp, 10) / 1000);
224
+ {
225
+ const aptosBlock = block;
226
+ return new Date(parseInt(aptosBlock.transactions[0].timestamp, 10) / 1000);
227
+ }
228
228
  case "CARDANO":
229
229
  return new Date(block.timestamp);
230
230
  case "COSMOS":
@@ -238,10 +238,14 @@ function $cc5213c20a6615f3$export$ec64f6024312bb14(block) {
238
238
  case "STARKNET":
239
239
  return new Date(block.timestamp * 1000);
240
240
  case "STELLAR":
241
- return new Date(block.transactions[0].created_at);
241
+ {
242
+ const stellarBlock = block;
243
+ return new Date(stellarBlock.transactions[0].created_at);
244
+ }
242
245
  case "SUBSTRATE":
243
246
  {
244
- const timestampExtrinsic = block.extrinsics.find((ex)=>ex.method === "timestamp.set");
247
+ const substrateBlock = block;
248
+ const timestampExtrinsic = substrateBlock.extrinsics.find((ex)=>ex.method === "timestamp.set");
245
249
  return new Date(Number(timestampExtrinsic.args[0].toString().replace(/,/g, "")));
246
250
  }
247
251
  case "SUI":
@@ -249,7 +253,10 @@ function $cc5213c20a6615f3$export$ec64f6024312bb14(block) {
249
253
  case "SVM":
250
254
  return new Date(block.blockTime * 1000);
251
255
  case "TON":
252
- return new Date(block.shards?.[0]?.gen_utime * 1000);
256
+ {
257
+ const tonBlock = block;
258
+ return new Date(tonBlock.shards?.[0]?.gen_utime * 1000);
259
+ }
253
260
  case "UTXO":
254
261
  return new Date(block.time * 1000);
255
262
  }
@@ -662,7 +669,8 @@ const $bea1ed486f96b980$export$ace043a4f2efe476 = {
662
669
  match: (block)=>(0, $09654dffcb68affa$export$ae001c77434c5340)(block) === "APTOS",
663
670
  transform (block) {
664
671
  let transfers = [];
665
- for (const tx of block.transactions || []){
672
+ const typedBlock = block;
673
+ for (const tx of typedBlock.transactions || []){
666
674
  if (!tx?.events || !Array.isArray(tx.events)) continue;
667
675
  const timestamp = tx.timestamp ? new Date(parseInt(tx.timestamp, 10) / 1000).toISOString() : null;
668
676
  const gasUsed = BigInt(tx.gas_used || "0");
@@ -681,7 +689,7 @@ const $bea1ed486f96b980$export$ace043a4f2efe476 = {
681
689
  if (!to || !tokenAddress || to === sender) continue;
682
690
  transfers.push({
683
691
  amount: BigInt(balance),
684
- blockNumber: parseInt(block.block_height, 10),
692
+ blockNumber: parseInt(typedBlock.block_height, 10),
685
693
  from: sender,
686
694
  to: to,
687
695
  timestamp: timestamp,
@@ -694,7 +702,7 @@ const $bea1ed486f96b980$export$ace043a4f2efe476 = {
694
702
  const payload = tx.payload;
695
703
  if (payload && payload.function === "0x1::aptos_account::transfer_coins") transfers.push({
696
704
  amount: BigInt(payload.arguments[1]),
697
- blockNumber: parseInt(block.block_height, 10),
705
+ blockNumber: parseInt(typedBlock.block_height, 10),
698
706
  from: sender,
699
707
  to: owner,
700
708
  timestamp: timestamp,
@@ -731,7 +739,7 @@ const $bea1ed486f96b980$export$ace043a4f2efe476 = {
731
739
  else finalToken = partial.tokenAddress?.toLowerCase();
732
740
  transfers.push({
733
741
  amount: BigInt(partial.amount || 0),
734
- blockNumber: parseInt(block.block_height, 10),
742
+ blockNumber: parseInt(typedBlock.block_height, 10),
735
743
  from: partial.from,
736
744
  to: partial.to,
737
745
  timestamp: timestamp,
@@ -877,9 +885,9 @@ const $8860a67278817de8$export$893111d8d332e195 = {
877
885
  match: (block)=>(0, $09654dffcb68affa$export$ae001c77434c5340)(block) === "CARDANO",
878
886
  transform (block) {
879
887
  let transfers = [];
880
- const blockTimestamp = new Date(block.timestamp).toISOString();
881
- for (const tx of block.transactions || []){
882
- const typedTx = tx;
888
+ const typedBlock = block;
889
+ const blockTimestamp = new Date(typedBlock.timestamp).toISOString();
890
+ for (const typedTx of typedBlock.transactions || []){
883
891
  if (!Array.isArray(typedTx.operations)) continue;
884
892
  const transactionHash = typedTx.transaction_identifier?.hash || "";
885
893
  const inputs = typedTx.operations.filter((op)=>op.type === "input");
@@ -896,20 +904,41 @@ const $8860a67278817de8$export$893111d8d332e195 = {
896
904
  return acc + val;
897
905
  }, BigInt(0));
898
906
  const transactionFee = sumInputs + BigInt(sumOutputs);
907
+ const absFee = transactionFee < 0 ? -transactionFee : transactionFee;
908
+ const blockNumber = typedBlock.block_identifier.index;
899
909
  for (const out of outputs){
910
+ const toAddress = out.account?.address || "";
911
+ // ADA (native) transfer
900
912
  const rawValue = out.amount?.value || "0";
901
913
  const absoluteValue = BigInt(rawValue);
902
914
  transfers.push({
903
915
  amount: absoluteValue < 0 ? -absoluteValue : absoluteValue,
904
- blockNumber: block.block_identifier.index,
916
+ blockNumber: blockNumber,
905
917
  from: fromAddress,
906
918
  timestamp: blockTimestamp,
907
- to: out.account?.address || "",
919
+ to: toAddress,
908
920
  token: out.amount?.currency?.symbol?.toUpperCase() === "ADA" ? null : out.amount?.currency?.symbol,
909
921
  tokenType: out.amount?.currency?.symbol?.toUpperCase() === "ADA" ? "NATIVE" : "TOKEN",
910
- transactionGasFee: transactionFee < 0 ? -transactionFee : transactionFee,
922
+ transactionGasFee: absFee,
911
923
  transactionHash: transactionHash
912
924
  });
925
+ // Native tokens from tokenBundle metadata
926
+ if (out.metadata?.tokenBundle) {
927
+ for (const bundle of out.metadata.tokenBundle)for (const tkn of bundle.tokens){
928
+ const tokenValue = BigInt(tkn.value);
929
+ transfers.push({
930
+ amount: tokenValue < 0 ? -tokenValue : tokenValue,
931
+ blockNumber: blockNumber,
932
+ from: fromAddress,
933
+ timestamp: blockTimestamp,
934
+ to: toAddress,
935
+ token: `${bundle.policyId}.${tkn.currency.symbol}`,
936
+ tokenType: "TOKEN",
937
+ transactionGasFee: absFee,
938
+ transactionHash: transactionHash
939
+ });
940
+ }
941
+ }
913
942
  }
914
943
  }
915
944
  return transfers;
@@ -935,6 +964,59 @@ const $8860a67278817de8$export$893111d8d332e195 = {
935
964
  transactionHash: "261c42ba9124f55d8e169ebb692cd3759d796a54369acb316ee449b546e79309"
936
965
  }
937
966
  ]
967
+ },
968
+ {
969
+ params: {
970
+ network: "CARDANO",
971
+ transactionHash: "c807ee792e47b47178aea89c9e760020ea24ed80897f9de82a2cd23e05da4d18"
972
+ },
973
+ payload: "https://jiti.indexing.co/networks/cardano/13119492",
974
+ output: [
975
+ {
976
+ amount: 1159390n,
977
+ blockNumber: 13119492,
978
+ from: "addr1q9k660rwqcdsr8e4ema5jd9qahmfquf44n8uszvacvvfswlrzr27g03klu862usxqsru794d03gzkk8n86ta34n85z0s6j9ylh",
979
+ timestamp: "2026-03-05T09:34:59.000Z",
980
+ to: "addr1qxvhvz9860r2qzcmx0qz55gzdt58etren35hhn9etpe3j5yewcy2057x5q93kv7q9fgsy6hg0jk8n8rf00xtjkrnr9gq7mz2sz",
981
+ token: null,
982
+ tokenType: "NATIVE",
983
+ transactionGasFee: 178481n,
984
+ transactionHash: "c807ee792e47b47178aea89c9e760020ea24ed80897f9de82a2cd23e05da4d18"
985
+ },
986
+ {
987
+ amount: 100000000n,
988
+ blockNumber: 13119492,
989
+ from: "addr1q9k660rwqcdsr8e4ema5jd9qahmfquf44n8uszvacvvfswlrzr27g03klu862usxqsru794d03gzkk8n86ta34n85z0s6j9ylh",
990
+ timestamp: "2026-03-05T09:34:59.000Z",
991
+ to: "addr1qxvhvz9860r2qzcmx0qz55gzdt58etren35hhn9etpe3j5yewcy2057x5q93kv7q9fgsy6hg0jk8n8rf00xtjkrnr9gq7mz2sz",
992
+ token: "0691b2fecca1ac4f53cb6dfb00b7013e561d1f34403b957cbb5af1fa.4e49474854",
993
+ tokenType: "TOKEN",
994
+ transactionGasFee: 178481n,
995
+ transactionHash: "c807ee792e47b47178aea89c9e760020ea24ed80897f9de82a2cd23e05da4d18"
996
+ },
997
+ {
998
+ amount: 172823143n,
999
+ blockNumber: 13119492,
1000
+ from: "addr1q9k660rwqcdsr8e4ema5jd9qahmfquf44n8uszvacvvfswlrzr27g03klu862usxqsru794d03gzkk8n86ta34n85z0s6j9ylh",
1001
+ timestamp: "2026-03-05T09:34:59.000Z",
1002
+ to: "addr1q8dusprx8fr89xkl88g3gq5kya46s9r4fcnwyx5yhdp3rx8rzr27g03klu862usxqsru794d03gzkk8n86ta34n85z0s8728d0",
1003
+ token: null,
1004
+ tokenType: "NATIVE",
1005
+ transactionGasFee: 178481n,
1006
+ transactionHash: "c807ee792e47b47178aea89c9e760020ea24ed80897f9de82a2cd23e05da4d18"
1007
+ },
1008
+ {
1009
+ amount: 204930000n,
1010
+ blockNumber: 13119492,
1011
+ from: "addr1q9k660rwqcdsr8e4ema5jd9qahmfquf44n8uszvacvvfswlrzr27g03klu862usxqsru794d03gzkk8n86ta34n85z0s6j9ylh",
1012
+ timestamp: "2026-03-05T09:34:59.000Z",
1013
+ to: "addr1q8dusprx8fr89xkl88g3gq5kya46s9r4fcnwyx5yhdp3rx8rzr27g03klu862usxqsru794d03gzkk8n86ta34n85z0s8728d0",
1014
+ token: "0691b2fecca1ac4f53cb6dfb00b7013e561d1f34403b957cbb5af1fa.4e49474854",
1015
+ tokenType: "TOKEN",
1016
+ transactionGasFee: 178481n,
1017
+ transactionHash: "c807ee792e47b47178aea89c9e760020ea24ed80897f9de82a2cd23e05da4d18"
1018
+ }
1019
+ ]
938
1020
  }
939
1021
  ]
940
1022
  };
@@ -1018,9 +1100,10 @@ const $5ec62a2088d070a8$export$5beebc5708fabf3c = {
1018
1100
  transform (block, _ctx) {
1019
1101
  const TOKEN_TYPES = _ctx.params.tokenTypes || [];
1020
1102
  let transfers = [];
1021
- for (const tx of block.transactions || []){
1103
+ const typedBlock = block;
1104
+ for (const tx of typedBlock.transactions || []){
1022
1105
  if (!tx.receipt) continue;
1023
- const timestamp = new Date(block.timestamp * 1000).toISOString();
1106
+ const timestamp = new Date(typedBlock.timestamp * 1000).toISOString();
1024
1107
  const transactionGasFee = BigInt(tx.receipt.gasUsed) * BigInt(tx.receipt.effectiveGasPrice);
1025
1108
  // track direct ETH transfers
1026
1109
  if (!TOKEN_TYPES.length || TOKEN_TYPES.includes("NATIVE")) {
@@ -1243,9 +1326,9 @@ const $07b3982e2fc4c8b2$export$400f08bfae9ee97f = {
1243
1326
  match: (block)=>(0, $09654dffcb68affa$export$ae001c77434c5340)(block) === "RIPPLE",
1244
1327
  transform (block) {
1245
1328
  let transfers = [];
1246
- if (!Array.isArray(block.transactions)) return [];
1247
- for (const rawTx of block.transactions || []){
1248
- const typedTx = rawTx;
1329
+ const typedBlock = block;
1330
+ if (!Array.isArray(typedBlock.transactions)) return [];
1331
+ for (const typedTx of typedBlock.transactions || []){
1249
1332
  if (typedTx.TransactionType !== "Payment") continue;
1250
1333
  const deliveredOrAmount = typedTx.metaData?.delivered_amount ?? typedTx.Amount ?? "0";
1251
1334
  let tokenSymbol = "XRP";
@@ -1260,10 +1343,10 @@ const $07b3982e2fc4c8b2$export$400f08bfae9ee97f = {
1260
1343
  } else parsedAmount = BigInt(String(deliveredOrAmount));
1261
1344
  transfers.push({
1262
1345
  amount: parsedAmount,
1263
- blockNumber: parseInt(block.ledger_index, 10),
1346
+ blockNumber: parseInt(typedBlock.ledger_index, 10),
1264
1347
  from: typedTx.Account ?? "UNKNOWN",
1265
1348
  memo: typedTx.DestinationTag,
1266
- timestamp: block.close_time_iso ? block.close_time_iso : null,
1349
+ timestamp: typedBlock.close_time_iso || null,
1267
1350
  to: typedTx.Destination ?? "UNKNOWN",
1268
1351
  token: tokenSymbol,
1269
1352
  tokenType: tokenType,
@@ -1305,9 +1388,10 @@ const $f9f6601c9222cc8e$export$722698bc663d0ac0 = {
1305
1388
  match: (block)=>(0, $09654dffcb68affa$export$ae001c77434c5340)(block) === "SUI",
1306
1389
  transform (block) {
1307
1390
  let transfers = [];
1308
- const blockNumber = parseInt(block.sequence, 10);
1309
- const blockTimestamp = new Date(parseInt(block.timestamp, 10)).toISOString();
1310
- const transactions = block.transactions || [];
1391
+ const typedBlock = block;
1392
+ const blockNumber = parseInt(typedBlock.sequence, 10);
1393
+ const blockTimestamp = new Date(parseInt(typedBlock.timestamp, 10)).toISOString();
1394
+ const transactions = typedBlock.transactions || [];
1311
1395
  for (const tx of transactions){
1312
1396
  const transactionHash = tx.digest;
1313
1397
  let transactionGasFee = BigInt(0);
@@ -1417,11 +1501,11 @@ const $64e1e522540ffc4e$export$a51565c56ceacb0a = {
1417
1501
  match: (block)=>(0, $09654dffcb68affa$export$ae001c77434c5340)(block) === "SVM",
1418
1502
  transform (block) {
1419
1503
  let transfers = [];
1420
- for (const tx of block.transactions || []){
1504
+ const typedBlock = block;
1505
+ for (const svmTx of typedBlock.transactions || []){
1421
1506
  const txTransfers = [];
1422
- const svmTx = tx;
1423
1507
  const txHash = svmTx.transaction.signatures[0];
1424
- const timestamp = block.blockTime ? new Date(block.blockTime * 1000).toISOString() : null;
1508
+ const timestamp = typedBlock.blockTime ? new Date(typedBlock.blockTime * 1000).toISOString() : null;
1425
1509
  const allAccounts = svmTx.transaction.message.accountKeys.concat(svmTx.meta.loadedAddresses.writable).concat(svmTx.meta.loadedAddresses.readonly).map((a)=>typeof a === "string" ? a : a?.pubkey);
1426
1510
  let txFee = BigInt(svmTx.meta.fee);
1427
1511
  if (txFee < BigInt(10)) txFee = txFee * BigInt(Math.pow(10, 9));
@@ -1431,7 +1515,7 @@ const $64e1e522540ffc4e$export$a51565c56ceacb0a = {
1431
1515
  // handle tx fee
1432
1516
  txTransfers.push({
1433
1517
  amount: txFee,
1434
- blockNumber: block.parentSlot + 1,
1518
+ blockNumber: typedBlock.parentSlot + 1,
1435
1519
  from: feePayer,
1436
1520
  index: "0",
1437
1521
  timestamp: timestamp,
@@ -1497,7 +1581,7 @@ const $64e1e522540ffc4e$export$a51565c56ceacb0a = {
1497
1581
  if (!to) to = svmTx.meta.postTokenBalances.find((ptb)=>ptb.accountIndex === toIdx + 1)?.owner || allAccounts[toIdx] || signer;
1498
1582
  txTransfers.push({
1499
1583
  amount: amount,
1500
- blockNumber: block.parentSlot + 1,
1584
+ blockNumber: typedBlock.parentSlot + 1,
1501
1585
  from: from,
1502
1586
  fromTokenAccount: allAccounts[fromIdx],
1503
1587
  index: index,
@@ -1525,7 +1609,7 @@ const $64e1e522540ffc4e$export$a51565c56ceacb0a = {
1525
1609
  }
1526
1610
  txTransfers.push({
1527
1611
  amount: solAmount,
1528
- blockNumber: block.parentSlot + 1,
1612
+ blockNumber: typedBlock.parentSlot + 1,
1529
1613
  from: from,
1530
1614
  index: index,
1531
1615
  timestamp: timestamp,
@@ -1540,7 +1624,7 @@ const $64e1e522540ffc4e$export$a51565c56ceacb0a = {
1540
1624
  if (wSolAmount > BigInt(0)) {
1541
1625
  txTransfers.push({
1542
1626
  amount: wSolAmount,
1543
- blockNumber: block.parentSlot + 1,
1627
+ blockNumber: typedBlock.parentSlot + 1,
1544
1628
  from: from,
1545
1629
  index: `${index}-1`,
1546
1630
  timestamp: timestamp,
@@ -1552,7 +1636,7 @@ const $64e1e522540ffc4e$export$a51565c56ceacb0a = {
1552
1636
  });
1553
1637
  txTransfers.push({
1554
1638
  amount: wSolAmount,
1555
- blockNumber: block.parentSlot + 1,
1639
+ blockNumber: typedBlock.parentSlot + 1,
1556
1640
  from: $64e1e522540ffc4e$var$WSOL_MINT,
1557
1641
  index: `${index}-2`,
1558
1642
  timestamp: timestamp,
@@ -1566,7 +1650,7 @@ const $64e1e522540ffc4e$export$a51565c56ceacb0a = {
1566
1650
  } else if (wSolAmount < BigInt(0)) {
1567
1651
  txTransfers.push({
1568
1652
  amount: wSolAmount * BigInt(-1),
1569
- blockNumber: block.parentSlot + 1,
1653
+ blockNumber: typedBlock.parentSlot + 1,
1570
1654
  from: $64e1e522540ffc4e$var$WSOL_MINT,
1571
1655
  index: `${index}-1`,
1572
1656
  timestamp: timestamp,
@@ -1578,7 +1662,7 @@ const $64e1e522540ffc4e$export$a51565c56ceacb0a = {
1578
1662
  });
1579
1663
  txTransfers.push({
1580
1664
  amount: wSolAmount * BigInt(-1),
1581
- blockNumber: block.parentSlot + 1,
1665
+ blockNumber: typedBlock.parentSlot + 1,
1582
1666
  from: to,
1583
1667
  index: `${index}-2`,
1584
1668
  timestamp: timestamp,
@@ -1604,7 +1688,7 @@ const $64e1e522540ffc4e$export$a51565c56ceacb0a = {
1604
1688
  const amount = BigInt(amountData.readBigUInt64LE(0).toString());
1605
1689
  txTransfers.push({
1606
1690
  amount: amount,
1607
- blockNumber: block.parentSlot + 1,
1691
+ blockNumber: typedBlock.parentSlot + 1,
1608
1692
  from: matchingAccounts[0],
1609
1693
  index: index,
1610
1694
  timestamp: timestamp,
@@ -1619,7 +1703,7 @@ const $64e1e522540ffc4e$export$a51565c56ceacb0a = {
1619
1703
  const amount = BigInt(amountData.readBigUInt64LE(0).toString());
1620
1704
  txTransfers.push({
1621
1705
  amount: amount,
1622
- blockNumber: block.parentSlot + 1,
1706
+ blockNumber: typedBlock.parentSlot + 1,
1623
1707
  from: matchingAccounts[0],
1624
1708
  index: index,
1625
1709
  timestamp: timestamp,
@@ -1644,7 +1728,7 @@ const $64e1e522540ffc4e$export$a51565c56ceacb0a = {
1644
1728
  const amount = BigInt(amountData.readBigUInt64LE(0).toString());
1645
1729
  txTransfers.push({
1646
1730
  amount: amount,
1647
- blockNumber: block.parentSlot + 1,
1731
+ blockNumber: typedBlock.parentSlot + 1,
1648
1732
  from: matchingAccounts[0],
1649
1733
  index: index,
1650
1734
  timestamp: timestamp,
@@ -1683,7 +1767,7 @@ const $64e1e522540ffc4e$export$a51565c56ceacb0a = {
1683
1767
  if (toReconcile[t.from] && toReconcile[t.to] && toReconcile[t.from] > 0 && toReconcile[t.from] <= toReconcile[t.to] * BigInt(-1)) {
1684
1768
  txTransfers.push({
1685
1769
  amount: toReconcile[t.from],
1686
- blockNumber: block.parentSlot + 1,
1770
+ blockNumber: typedBlock.parentSlot + 1,
1687
1771
  from: t.to,
1688
1772
  index: t.index + "-1",
1689
1773
  timestamp: timestamp,
@@ -1701,7 +1785,7 @@ const $64e1e522540ffc4e$export$a51565c56ceacb0a = {
1701
1785
  if (toReconcile[t.fromTokenAccount]) {
1702
1786
  txTransfers.push({
1703
1787
  amount: t.amount,
1704
- blockNumber: block.parentSlot + 1,
1788
+ blockNumber: typedBlock.parentSlot + 1,
1705
1789
  from: t.fromTokenAccount,
1706
1790
  index: t.index + "-1",
1707
1791
  timestamp: timestamp,
@@ -1717,7 +1801,7 @@ const $64e1e522540ffc4e$export$a51565c56ceacb0a = {
1717
1801
  if (toReconcile[t.toTokenAccount]) {
1718
1802
  txTransfers.push({
1719
1803
  amount: t.amount,
1720
- blockNumber: block.parentSlot + 1,
1804
+ blockNumber: typedBlock.parentSlot + 1,
1721
1805
  from: $64e1e522540ffc4e$var$WSOL_MINT,
1722
1806
  index: t.index + "-2",
1723
1807
  timestamp: timestamp,
@@ -1737,7 +1821,7 @@ const $64e1e522540ffc4e$export$a51565c56ceacb0a = {
1737
1821
  for(const j in toReconcile)if (k !== j && toReconcile[k] === toReconcile[j] * BigInt(-1)) {
1738
1822
  txTransfers.push({
1739
1823
  amount: toReconcile[j] < BigInt(0) ? toReconcile[j] * BigInt(-1) : toReconcile[j],
1740
- blockNumber: block.parentSlot + 1,
1824
+ blockNumber: typedBlock.parentSlot + 1,
1741
1825
  from: toReconcile[j] < BigInt(0) ? j : k,
1742
1826
  timestamp: // index,
1743
1827
  timestamp,
@@ -1768,7 +1852,7 @@ const $64e1e522540ffc4e$export$a51565c56ceacb0a = {
1768
1852
  if (toReconcile[from] * BigInt(-1) < amount) amount = toReconcile[from] * BigInt(-1);
1769
1853
  txTransfers.push({
1770
1854
  amount: amount,
1771
- blockNumber: block.parentSlot + 1,
1855
+ blockNumber: typedBlock.parentSlot + 1,
1772
1856
  from: from,
1773
1857
  timestamp: // index,
1774
1858
  timestamp,
@@ -1812,7 +1896,7 @@ const $64e1e522540ffc4e$export$a51565c56ceacb0a = {
1812
1896
  // try attributing to unwrapping wSOL
1813
1897
  if (amount > BigInt(0) && post.mint === $64e1e522540ffc4e$var$WSOL_MINT) txTransfers.push({
1814
1898
  amount: amount,
1815
- blockNumber: block.parentSlot + 1,
1899
+ blockNumber: typedBlock.parentSlot + 1,
1816
1900
  from: $64e1e522540ffc4e$var$WSOL_MINT,
1817
1901
  timestamp: // index,
1818
1902
  timestamp,
@@ -1824,7 +1908,7 @@ const $64e1e522540ffc4e$export$a51565c56ceacb0a = {
1824
1908
  });
1825
1909
  else if (!pre && amount > BigInt(0)) txTransfers.push({
1826
1910
  amount: amount,
1827
- blockNumber: block.parentSlot + 1,
1911
+ blockNumber: typedBlock.parentSlot + 1,
1828
1912
  from: post.mint,
1829
1913
  timestamp: // index,
1830
1914
  timestamp,
@@ -2969,10 +3053,10 @@ const $f7da547a9d6b4fc0$export$36783fc9701281c6 = {
2969
3053
  match: (block)=>(0, $09654dffcb68affa$export$ae001c77434c5340)(block) === "STARKNET",
2970
3054
  transform (block) {
2971
3055
  let transfers = [];
2972
- if (!Array.isArray(block.transactions)) return [];
2973
- for (const tx of block.transactions || []){
2974
- const typedTx = tx;
2975
- const timestamp = block.timestamp ? new Date(block.timestamp * 1000).toISOString() : null;
3056
+ const typedBlock = block;
3057
+ if (!Array.isArray(typedBlock.transactions)) return [];
3058
+ for (const typedTx of typedBlock.transactions || []){
3059
+ const timestamp = typedBlock.timestamp ? new Date(typedBlock.timestamp * 1000).toISOString() : null;
2976
3060
  let transactionGasFee = BigInt(0);
2977
3061
  if (typedTx?.receipt?.actual_fee?.amount) transactionGasFee = BigInt(typedTx.receipt.actual_fee.amount);
2978
3062
  const transactionHash = typedTx.transaction_hash;
@@ -2984,7 +3068,7 @@ const $f7da547a9d6b4fc0$export$36783fc9701281c6 = {
2984
3068
  const amount = BigInt(amountHex);
2985
3069
  transfers.push({
2986
3070
  amount: amount,
2987
- blockNumber: block.block_number,
3071
+ blockNumber: typedBlock.block_number,
2988
3072
  from: from,
2989
3073
  timestamp: timestamp,
2990
3074
  to: to,
@@ -3028,11 +3112,11 @@ const $725699ccb951d76d$export$681f497010b17679 = {
3028
3112
  match: (block)=>(0, $09654dffcb68affa$export$ae001c77434c5340)(block) === "STELLAR",
3029
3113
  transform (block) {
3030
3114
  let transfers = [];
3031
- for (const tx of block.transactions || []){
3032
- const typedTx = tx;
3115
+ const typedBlock = block;
3116
+ for (const typedTx of typedBlock.transactions || []){
3033
3117
  for (const op of typedTx.operations)if (op.type === "payment") transfers.push({
3034
3118
  amount: BigInt(op.amount.replace(".", "")),
3035
- blockNumber: block.sequence,
3119
+ blockNumber: typedBlock.sequence,
3036
3120
  from: op.from,
3037
3121
  memo: typedTx.memo,
3038
3122
  timestamp: typedTx.created_at,
@@ -3144,9 +3228,10 @@ const $e97546fe39f2692a$export$608f3f42810b9879 = {
3144
3228
  match: (block)=>(0, $09654dffcb68affa$export$ae001c77434c5340)(block) === "TON",
3145
3229
  transform (block) {
3146
3230
  let transfers = [];
3147
- const blockNumber = block.seqno;
3148
- const blockTimestamp = new Date(block.shards?.[0]?.gen_utime * 1000).toISOString();
3149
- for (const shard of block.shards || [])for (const tx of shard.transactions || []){
3231
+ const typedBlock = block;
3232
+ const blockNumber = typedBlock.seqno;
3233
+ const blockTimestamp = new Date(typedBlock.shards?.[0]?.gen_utime * 1000).toISOString();
3234
+ for (const shard of typedBlock.shards || [])for (const tx of shard.transactions || []){
3150
3235
  const transactionLT = tx.transaction_id.lt;
3151
3236
  const transactionHash = tx.transaction_id.hash;
3152
3237
  const transactionFee = BigInt(tx.fee || "0");
@@ -3210,8 +3295,9 @@ const $532fac82d96b89f2$export$4f5322cf4718bd30 = {
3210
3295
  match: (block)=>(0, $09654dffcb68affa$export$ae001c77434c5340)(block) === "UTXO",
3211
3296
  transform (block) {
3212
3297
  let transfers = [];
3213
- const timestamp = block.time ? new Date(block.time * 1000).toISOString() : null;
3214
- for (const tx of block.tx){
3298
+ const typedBlock = block;
3299
+ const timestamp = typedBlock.time ? new Date(typedBlock.time * 1000).toISOString() : null;
3300
+ for (const tx of typedBlock.tx){
3215
3301
  const vin = tx.vin[0];
3216
3302
  const vout = tx.vout;
3217
3303
  const fromVout = Math.min(vin?.vout || 1000, vout.length - 1);
@@ -3219,7 +3305,7 @@ const $532fac82d96b89f2$export$4f5322cf4718bd30 = {
3219
3305
  if (!fromAddress) continue;
3220
3306
  for (const v of vout)transfers.push({
3221
3307
  amount: BigInt(Math.round(v.value * Math.pow(10, 8))),
3222
- blockNumber: block.height,
3308
+ blockNumber: typedBlock.height,
3223
3309
  from: fromAddress,
3224
3310
  timestamp: timestamp,
3225
3311
  to: v.scriptPubKey.address || v.scriptPubKey.addresses?.[0],
@@ -11022,6 +11108,174 @@ var $a4b307b872b01f44$export$2e2bcd8739ae039 = $a4b307b872b01f44$var$rawTemplate
11022
11108
  var $81c1b644006d48ec$exports = {};
11023
11109
 
11024
11110
 
11111
+ var $a4e0e4b4a62175c4$exports = {};
11112
+ // Auto-generated by scripts/generate-block-types.ts
11113
+ var $cdaccca5755c2b25$exports = {};
11114
+ // Auto-generated by scripts/generate-block-types.ts
11115
+ // Generated: 2026-03-17
11116
+ // Sources:
11117
+ // https://jiti.indexing.co/networks/aptos/666725417
11118
+ // https://jiti.indexing.co/networks/aptos/666725317
11119
+ // https://jiti.indexing.co/networks/aptos/666724417
11120
+ // Samples: 3
11121
+
11122
+
11123
+ var $ac91e39aa31e7121$exports = {};
11124
+ // Auto-generated by scripts/generate-block-types.ts
11125
+ // Generated: 2026-03-17
11126
+ // Sources:
11127
+ // https://jiti.indexing.co/networks/cardano/13169111
11128
+ // https://jiti.indexing.co/networks/cardano/13169011
11129
+ // https://jiti.indexing.co/networks/cardano/13168111
11130
+ // Samples: 3
11131
+
11132
+
11133
+ var $fbc7264686ecdc8f$exports = {};
11134
+ // Auto-generated by scripts/generate-block-types.ts
11135
+ // Generated: 2026-03-17
11136
+ // Sources:
11137
+ // https://jiti.indexing.co/networks/cosmos/30234630
11138
+ // https://jiti.indexing.co/networks/cosmos/30234530
11139
+ // https://jiti.indexing.co/networks/cosmos/30233630
11140
+ // Samples: 3
11141
+
11142
+
11143
+ var $a024eb8aae4121fc$exports = {};
11144
+ // Auto-generated by scripts/generate-block-types.ts
11145
+ // Generated: 2026-03-17
11146
+ // Sources:
11147
+ // https://jiti.indexing.co/networks/ethereum/24674633
11148
+ // https://jiti.indexing.co/networks/ethereum/24674533
11149
+ // https://jiti.indexing.co/networks/ethereum/24673633
11150
+ // https://jiti.indexing.co/networks/base/43464980
11151
+ // https://jiti.indexing.co/networks/base/43464880
11152
+ // https://jiti.indexing.co/networks/base/43463980
11153
+ // https://jiti.indexing.co/networks/polygon/84299638
11154
+ // https://jiti.indexing.co/networks/polygon/84299538
11155
+ // https://jiti.indexing.co/networks/polygon/84298638
11156
+ // https://jiti.indexing.co/networks/arbitrum/442610729
11157
+ // https://jiti.indexing.co/networks/arbitrum/442610629
11158
+ // https://jiti.indexing.co/networks/arbitrum/442609729
11159
+ // Samples: 12
11160
+
11161
+
11162
+ var $3b641f1d93f8e861$exports = {};
11163
+ // Auto-generated by scripts/generate-block-types.ts
11164
+ // Generated: 2026-03-17
11165
+ // Sources:
11166
+ // https://jiti.indexing.co/networks/filecoin/5847092
11167
+ // https://jiti.indexing.co/networks/filecoin/5846992
11168
+ // https://jiti.indexing.co/networks/filecoin/5846092
11169
+ // Samples: 3
11170
+
11171
+
11172
+ var $a507a65ae307f974$exports = {};
11173
+ // Auto-generated by scripts/generate-block-types.ts
11174
+ // Generated: 2026-03-17
11175
+ // Sources:
11176
+ // https://jiti.indexing.co/networks/ripple/102922872
11177
+ // https://jiti.indexing.co/networks/ripple/102922772
11178
+ // https://jiti.indexing.co/networks/ripple/102921872
11179
+ // Samples: 3
11180
+
11181
+
11182
+ var $615e314153e52bad$exports = {};
11183
+ // Auto-generated by scripts/generate-block-types.ts
11184
+ // Generated: 2026-03-17
11185
+ // Sources:
11186
+ // https://jiti.indexing.co/networks/starknet/7797628
11187
+ // https://jiti.indexing.co/networks/starknet/7797528
11188
+ // https://jiti.indexing.co/networks/starknet/7796628
11189
+ // Samples: 3
11190
+
11191
+
11192
+ var $e5041b0a92b41052$exports = {};
11193
+ // Auto-generated by scripts/generate-block-types.ts
11194
+ // Generated: 2026-03-17
11195
+ // Sources:
11196
+ // https://jiti.indexing.co/networks/stellar/61687568
11197
+ // https://jiti.indexing.co/networks/stellar/61687468
11198
+ // https://jiti.indexing.co/networks/stellar/61686568
11199
+ // Samples: 3
11200
+
11201
+
11202
+ var $e964f2aee2d00bfe$exports = {};
11203
+ // Auto-generated by scripts/generate-block-types.ts
11204
+ // Generated: 2026-03-17
11205
+ // Sources:
11206
+ // https://jiti.indexing.co/networks/bittensor/7762563
11207
+ // https://jiti.indexing.co/networks/bittensor/7762463
11208
+ // https://jiti.indexing.co/networks/bittensor/7761563
11209
+ // https://jiti.indexing.co/networks/polkadot/13494424
11210
+ // https://jiti.indexing.co/networks/polkadot/13494324
11211
+ // https://jiti.indexing.co/networks/polkadot/13493424
11212
+ // Samples: 6
11213
+
11214
+
11215
+ var $bb1ffb53a3b14860$exports = {};
11216
+ // Auto-generated by scripts/generate-block-types.ts
11217
+ // Generated: 2026-03-17
11218
+ // Sources:
11219
+ // https://jiti.indexing.co/networks/sui/255195515
11220
+ // https://jiti.indexing.co/networks/sui/255195415
11221
+ // https://jiti.indexing.co/networks/sui/255194515
11222
+ // Samples: 3
11223
+
11224
+
11225
+ var $480b559416e5cd89$exports = {};
11226
+ // Auto-generated by scripts/generate-block-types.ts
11227
+ // Generated: 2026-03-17
11228
+ // Sources:
11229
+ // https://jiti.indexing.co/networks/solana/406934053
11230
+ // https://jiti.indexing.co/networks/solana/406933953
11231
+ // https://jiti.indexing.co/networks/solana/406933053
11232
+ // https://jiti.indexing.co/networks/eclipse/143074735
11233
+ // https://jiti.indexing.co/networks/eclipse/143074635
11234
+ // https://jiti.indexing.co/networks/eclipse/143073735
11235
+ // Samples: 6
11236
+
11237
+
11238
+ var $f3761421850600fb$exports = {};
11239
+ // Auto-generated by scripts/generate-block-types.ts
11240
+ // Generated: 2026-03-17
11241
+ // Sources:
11242
+ // https://jiti.indexing.co/networks/ton/58384846
11243
+ // https://jiti.indexing.co/networks/ton/58384746
11244
+ // https://jiti.indexing.co/networks/ton/58383846
11245
+ // Samples: 3
11246
+
11247
+
11248
+ var $e64a550a52a9d690$exports = {};
11249
+ // Auto-generated by scripts/generate-block-types.ts
11250
+ // Generated: 2026-03-17
11251
+ // Sources:
11252
+ // https://jiti.indexing.co/networks/bitcoin/940963
11253
+ // https://jiti.indexing.co/networks/bitcoin/940863
11254
+ // https://jiti.indexing.co/networks/bitcoin/939963
11255
+ // https://jiti.indexing.co/networks/dogecoin/6126894
11256
+ // https://jiti.indexing.co/networks/dogecoin/6126794
11257
+ // https://jiti.indexing.co/networks/dogecoin/6125894
11258
+ // https://jiti.indexing.co/networks/zcash/3275181
11259
+ // https://jiti.indexing.co/networks/zcash/3275081
11260
+ // https://jiti.indexing.co/networks/zcash/3274181
11261
+ // Samples: 9
11262
+
11263
+
11264
+ $parcel$exportWildcard($a4e0e4b4a62175c4$exports, $cdaccca5755c2b25$exports);
11265
+ $parcel$exportWildcard($a4e0e4b4a62175c4$exports, $ac91e39aa31e7121$exports);
11266
+ $parcel$exportWildcard($a4e0e4b4a62175c4$exports, $fbc7264686ecdc8f$exports);
11267
+ $parcel$exportWildcard($a4e0e4b4a62175c4$exports, $a024eb8aae4121fc$exports);
11268
+ $parcel$exportWildcard($a4e0e4b4a62175c4$exports, $3b641f1d93f8e861$exports);
11269
+ $parcel$exportWildcard($a4e0e4b4a62175c4$exports, $a507a65ae307f974$exports);
11270
+ $parcel$exportWildcard($a4e0e4b4a62175c4$exports, $615e314153e52bad$exports);
11271
+ $parcel$exportWildcard($a4e0e4b4a62175c4$exports, $e5041b0a92b41052$exports);
11272
+ $parcel$exportWildcard($a4e0e4b4a62175c4$exports, $e964f2aee2d00bfe$exports);
11273
+ $parcel$exportWildcard($a4e0e4b4a62175c4$exports, $bb1ffb53a3b14860$exports);
11274
+ $parcel$exportWildcard($a4e0e4b4a62175c4$exports, $480b559416e5cd89$exports);
11275
+ $parcel$exportWildcard($a4e0e4b4a62175c4$exports, $f3761421850600fb$exports);
11276
+ $parcel$exportWildcard($a4e0e4b4a62175c4$exports, $e64a550a52a9d690$exports);
11277
+
11278
+
11025
11279
  const $149c1bd638913645$export$eab97d15b1788b8d = {
11026
11280
  ...$fde9406d76ec24a9$exports
11027
11281
  };