@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/main.js CHANGED
@@ -121,10 +121,7 @@ function $56acd58307ebf8e6$export$363ea1acea6aebd6(block) {
121
121
  case "CARDANO":
122
122
  return block.block_identifier.index;
123
123
  case "COSMOS":
124
- {
125
- const typedBlock = block;
126
- return Number(typedBlock.block.header.height);
127
- }
124
+ return Number(block.block.header.height);
128
125
  case "EVM":
129
126
  return block.number;
130
127
  case "FILECOIN":
@@ -166,15 +163,12 @@ function $77809331c5210b08$export$eda46897866e27cc(block) {
166
163
  for (const tx of block.transactions || [])hashes.add(tx.hash);
167
164
  break;
168
165
  case "CARDANO":
169
- for (const tx of block.transactions || []){
170
- const typedTx = tx;
171
- hashes.add(typedTx.transaction_identifier?.hash);
172
- }
166
+ for (const tx of block.transactions || [])hashes.add(tx.transaction_identifier?.hash);
173
167
  break;
174
168
  case "COSMOS":
175
169
  {
176
- const typedBlock = block;
177
- for (const txRaw of typedBlock.block.data.txs || []){
170
+ const cosmosBlock = block;
171
+ for (const txRaw of cosmosBlock.block.data.txs || []){
178
172
  const txHash = (0, $8zHUo$viem.sha256)(new Uint8Array($77809331c5210b08$require$Buffer.from(txRaw, "base64")));
179
173
  hashes.add(txHash.slice(2).toUpperCase());
180
174
  }
@@ -185,8 +179,8 @@ function $77809331c5210b08$export$eda46897866e27cc(block) {
185
179
  break;
186
180
  case "FILECOIN":
187
181
  {
188
- const typedBlock = block;
189
- for (const msgGroup of typedBlock.messages){
182
+ const filecoinBlock = block;
183
+ for (const msgGroup of filecoinBlock.messages){
190
184
  const secpkMessages = msgGroup.blockMessages.SecpkMessages || [];
191
185
  for (const msg of secpkMessages)hashes.add(msg.CID["/"]);
192
186
  }
@@ -211,8 +205,11 @@ function $77809331c5210b08$export$eda46897866e27cc(block) {
211
205
  for (const tx of block.transactions || [])hashes.add(tx.transaction.signatures[0]);
212
206
  break;
213
207
  case "TON":
214
- for (const shard of block.shards || [])for (const tx of shard.transactions || [])hashes.add(tx.transacion_id.hash);
215
- break;
208
+ {
209
+ const tonBlock = block;
210
+ for (const shard of tonBlock.shards || [])for (const tx of shard.transactions || [])hashes.add(tx.transaction_id.hash);
211
+ break;
212
+ }
216
213
  case "UTXO":
217
214
  for (const tx of block.tx)hashes.add(tx.txid);
218
215
  break;
@@ -233,7 +230,10 @@ function $b8691f253b6baa6e$export$ec64f6024312bb14(block) {
233
230
  const vm = (0, $6bd2ca253e883278$export$ae001c77434c5340)(block);
234
231
  switch(vm){
235
232
  case "APTOS":
236
- return new Date(parseInt(block.transactions[0].timestamp, 10) / 1000);
233
+ {
234
+ const aptosBlock = block;
235
+ return new Date(parseInt(aptosBlock.transactions[0].timestamp, 10) / 1000);
236
+ }
237
237
  case "CARDANO":
238
238
  return new Date(block.timestamp);
239
239
  case "COSMOS":
@@ -247,10 +247,14 @@ function $b8691f253b6baa6e$export$ec64f6024312bb14(block) {
247
247
  case "STARKNET":
248
248
  return new Date(block.timestamp * 1000);
249
249
  case "STELLAR":
250
- return new Date(block.transactions[0].created_at);
250
+ {
251
+ const stellarBlock = block;
252
+ return new Date(stellarBlock.transactions[0].created_at);
253
+ }
251
254
  case "SUBSTRATE":
252
255
  {
253
- const timestampExtrinsic = block.extrinsics.find((ex)=>ex.method === "timestamp.set");
256
+ const substrateBlock = block;
257
+ const timestampExtrinsic = substrateBlock.extrinsics.find((ex)=>ex.method === "timestamp.set");
254
258
  return new Date(Number(timestampExtrinsic.args[0].toString().replace(/,/g, "")));
255
259
  }
256
260
  case "SUI":
@@ -258,7 +262,10 @@ function $b8691f253b6baa6e$export$ec64f6024312bb14(block) {
258
262
  case "SVM":
259
263
  return new Date(block.blockTime * 1000);
260
264
  case "TON":
261
- return new Date(block.shards?.[0]?.gen_utime * 1000);
265
+ {
266
+ const tonBlock = block;
267
+ return new Date(tonBlock.shards?.[0]?.gen_utime * 1000);
268
+ }
262
269
  case "UTXO":
263
270
  return new Date(block.time * 1000);
264
271
  }
@@ -671,7 +678,8 @@ const $25d5bdd23cba31eb$export$ace043a4f2efe476 = {
671
678
  match: (block)=>(0, $6bd2ca253e883278$export$ae001c77434c5340)(block) === "APTOS",
672
679
  transform (block) {
673
680
  let transfers = [];
674
- for (const tx of block.transactions || []){
681
+ const typedBlock = block;
682
+ for (const tx of typedBlock.transactions || []){
675
683
  if (!tx?.events || !Array.isArray(tx.events)) continue;
676
684
  const timestamp = tx.timestamp ? new Date(parseInt(tx.timestamp, 10) / 1000).toISOString() : null;
677
685
  const gasUsed = BigInt(tx.gas_used || "0");
@@ -690,7 +698,7 @@ const $25d5bdd23cba31eb$export$ace043a4f2efe476 = {
690
698
  if (!to || !tokenAddress || to === sender) continue;
691
699
  transfers.push({
692
700
  amount: BigInt(balance),
693
- blockNumber: parseInt(block.block_height, 10),
701
+ blockNumber: parseInt(typedBlock.block_height, 10),
694
702
  from: sender,
695
703
  to: to,
696
704
  timestamp: timestamp,
@@ -703,7 +711,7 @@ const $25d5bdd23cba31eb$export$ace043a4f2efe476 = {
703
711
  const payload = tx.payload;
704
712
  if (payload && payload.function === "0x1::aptos_account::transfer_coins") transfers.push({
705
713
  amount: BigInt(payload.arguments[1]),
706
- blockNumber: parseInt(block.block_height, 10),
714
+ blockNumber: parseInt(typedBlock.block_height, 10),
707
715
  from: sender,
708
716
  to: owner,
709
717
  timestamp: timestamp,
@@ -740,7 +748,7 @@ const $25d5bdd23cba31eb$export$ace043a4f2efe476 = {
740
748
  else finalToken = partial.tokenAddress?.toLowerCase();
741
749
  transfers.push({
742
750
  amount: BigInt(partial.amount || 0),
743
- blockNumber: parseInt(block.block_height, 10),
751
+ blockNumber: parseInt(typedBlock.block_height, 10),
744
752
  from: partial.from,
745
753
  to: partial.to,
746
754
  timestamp: timestamp,
@@ -886,9 +894,9 @@ const $60d24c82dc5feb2e$export$893111d8d332e195 = {
886
894
  match: (block)=>(0, $6bd2ca253e883278$export$ae001c77434c5340)(block) === "CARDANO",
887
895
  transform (block) {
888
896
  let transfers = [];
889
- const blockTimestamp = new Date(block.timestamp).toISOString();
890
- for (const tx of block.transactions || []){
891
- const typedTx = tx;
897
+ const typedBlock = block;
898
+ const blockTimestamp = new Date(typedBlock.timestamp).toISOString();
899
+ for (const typedTx of typedBlock.transactions || []){
892
900
  if (!Array.isArray(typedTx.operations)) continue;
893
901
  const transactionHash = typedTx.transaction_identifier?.hash || "";
894
902
  const inputs = typedTx.operations.filter((op)=>op.type === "input");
@@ -905,20 +913,41 @@ const $60d24c82dc5feb2e$export$893111d8d332e195 = {
905
913
  return acc + val;
906
914
  }, BigInt(0));
907
915
  const transactionFee = sumInputs + BigInt(sumOutputs);
916
+ const absFee = transactionFee < 0 ? -transactionFee : transactionFee;
917
+ const blockNumber = typedBlock.block_identifier.index;
908
918
  for (const out of outputs){
919
+ const toAddress = out.account?.address || "";
920
+ // ADA (native) transfer
909
921
  const rawValue = out.amount?.value || "0";
910
922
  const absoluteValue = BigInt(rawValue);
911
923
  transfers.push({
912
924
  amount: absoluteValue < 0 ? -absoluteValue : absoluteValue,
913
- blockNumber: block.block_identifier.index,
925
+ blockNumber: blockNumber,
914
926
  from: fromAddress,
915
927
  timestamp: blockTimestamp,
916
- to: out.account?.address || "",
928
+ to: toAddress,
917
929
  token: out.amount?.currency?.symbol?.toUpperCase() === "ADA" ? null : out.amount?.currency?.symbol,
918
930
  tokenType: out.amount?.currency?.symbol?.toUpperCase() === "ADA" ? "NATIVE" : "TOKEN",
919
- transactionGasFee: transactionFee < 0 ? -transactionFee : transactionFee,
931
+ transactionGasFee: absFee,
920
932
  transactionHash: transactionHash
921
933
  });
934
+ // Native tokens from tokenBundle metadata
935
+ if (out.metadata?.tokenBundle) {
936
+ for (const bundle of out.metadata.tokenBundle)for (const tkn of bundle.tokens){
937
+ const tokenValue = BigInt(tkn.value);
938
+ transfers.push({
939
+ amount: tokenValue < 0 ? -tokenValue : tokenValue,
940
+ blockNumber: blockNumber,
941
+ from: fromAddress,
942
+ timestamp: blockTimestamp,
943
+ to: toAddress,
944
+ token: `${bundle.policyId}.${tkn.currency.symbol}`,
945
+ tokenType: "TOKEN",
946
+ transactionGasFee: absFee,
947
+ transactionHash: transactionHash
948
+ });
949
+ }
950
+ }
922
951
  }
923
952
  }
924
953
  return transfers;
@@ -944,6 +973,59 @@ const $60d24c82dc5feb2e$export$893111d8d332e195 = {
944
973
  transactionHash: "261c42ba9124f55d8e169ebb692cd3759d796a54369acb316ee449b546e79309"
945
974
  }
946
975
  ]
976
+ },
977
+ {
978
+ params: {
979
+ network: "CARDANO",
980
+ transactionHash: "c807ee792e47b47178aea89c9e760020ea24ed80897f9de82a2cd23e05da4d18"
981
+ },
982
+ payload: "https://jiti.indexing.co/networks/cardano/13119492",
983
+ output: [
984
+ {
985
+ amount: 1159390n,
986
+ blockNumber: 13119492,
987
+ from: "addr1q9k660rwqcdsr8e4ema5jd9qahmfquf44n8uszvacvvfswlrzr27g03klu862usxqsru794d03gzkk8n86ta34n85z0s6j9ylh",
988
+ timestamp: "2026-03-05T09:34:59.000Z",
989
+ to: "addr1qxvhvz9860r2qzcmx0qz55gzdt58etren35hhn9etpe3j5yewcy2057x5q93kv7q9fgsy6hg0jk8n8rf00xtjkrnr9gq7mz2sz",
990
+ token: null,
991
+ tokenType: "NATIVE",
992
+ transactionGasFee: 178481n,
993
+ transactionHash: "c807ee792e47b47178aea89c9e760020ea24ed80897f9de82a2cd23e05da4d18"
994
+ },
995
+ {
996
+ amount: 100000000n,
997
+ blockNumber: 13119492,
998
+ from: "addr1q9k660rwqcdsr8e4ema5jd9qahmfquf44n8uszvacvvfswlrzr27g03klu862usxqsru794d03gzkk8n86ta34n85z0s6j9ylh",
999
+ timestamp: "2026-03-05T09:34:59.000Z",
1000
+ to: "addr1qxvhvz9860r2qzcmx0qz55gzdt58etren35hhn9etpe3j5yewcy2057x5q93kv7q9fgsy6hg0jk8n8rf00xtjkrnr9gq7mz2sz",
1001
+ token: "0691b2fecca1ac4f53cb6dfb00b7013e561d1f34403b957cbb5af1fa.4e49474854",
1002
+ tokenType: "TOKEN",
1003
+ transactionGasFee: 178481n,
1004
+ transactionHash: "c807ee792e47b47178aea89c9e760020ea24ed80897f9de82a2cd23e05da4d18"
1005
+ },
1006
+ {
1007
+ amount: 172823143n,
1008
+ blockNumber: 13119492,
1009
+ from: "addr1q9k660rwqcdsr8e4ema5jd9qahmfquf44n8uszvacvvfswlrzr27g03klu862usxqsru794d03gzkk8n86ta34n85z0s6j9ylh",
1010
+ timestamp: "2026-03-05T09:34:59.000Z",
1011
+ to: "addr1q8dusprx8fr89xkl88g3gq5kya46s9r4fcnwyx5yhdp3rx8rzr27g03klu862usxqsru794d03gzkk8n86ta34n85z0s8728d0",
1012
+ token: null,
1013
+ tokenType: "NATIVE",
1014
+ transactionGasFee: 178481n,
1015
+ transactionHash: "c807ee792e47b47178aea89c9e760020ea24ed80897f9de82a2cd23e05da4d18"
1016
+ },
1017
+ {
1018
+ amount: 204930000n,
1019
+ blockNumber: 13119492,
1020
+ from: "addr1q9k660rwqcdsr8e4ema5jd9qahmfquf44n8uszvacvvfswlrzr27g03klu862usxqsru794d03gzkk8n86ta34n85z0s6j9ylh",
1021
+ timestamp: "2026-03-05T09:34:59.000Z",
1022
+ to: "addr1q8dusprx8fr89xkl88g3gq5kya46s9r4fcnwyx5yhdp3rx8rzr27g03klu862usxqsru794d03gzkk8n86ta34n85z0s8728d0",
1023
+ token: "0691b2fecca1ac4f53cb6dfb00b7013e561d1f34403b957cbb5af1fa.4e49474854",
1024
+ tokenType: "TOKEN",
1025
+ transactionGasFee: 178481n,
1026
+ transactionHash: "c807ee792e47b47178aea89c9e760020ea24ed80897f9de82a2cd23e05da4d18"
1027
+ }
1028
+ ]
947
1029
  }
948
1030
  ]
949
1031
  };
@@ -1027,9 +1109,10 @@ const $8deaea1ef39b6485$export$5beebc5708fabf3c = {
1027
1109
  transform (block, _ctx) {
1028
1110
  const TOKEN_TYPES = _ctx.params.tokenTypes || [];
1029
1111
  let transfers = [];
1030
- for (const tx of block.transactions || []){
1112
+ const typedBlock = block;
1113
+ for (const tx of typedBlock.transactions || []){
1031
1114
  if (!tx.receipt) continue;
1032
- const timestamp = new Date(block.timestamp * 1000).toISOString();
1115
+ const timestamp = new Date(typedBlock.timestamp * 1000).toISOString();
1033
1116
  const transactionGasFee = BigInt(tx.receipt.gasUsed) * BigInt(tx.receipt.effectiveGasPrice);
1034
1117
  // track direct ETH transfers
1035
1118
  if (!TOKEN_TYPES.length || TOKEN_TYPES.includes("NATIVE")) {
@@ -1252,9 +1335,9 @@ const $2e46ec862e47c14f$export$400f08bfae9ee97f = {
1252
1335
  match: (block)=>(0, $6bd2ca253e883278$export$ae001c77434c5340)(block) === "RIPPLE",
1253
1336
  transform (block) {
1254
1337
  let transfers = [];
1255
- if (!Array.isArray(block.transactions)) return [];
1256
- for (const rawTx of block.transactions || []){
1257
- const typedTx = rawTx;
1338
+ const typedBlock = block;
1339
+ if (!Array.isArray(typedBlock.transactions)) return [];
1340
+ for (const typedTx of typedBlock.transactions || []){
1258
1341
  if (typedTx.TransactionType !== "Payment") continue;
1259
1342
  const deliveredOrAmount = typedTx.metaData?.delivered_amount ?? typedTx.Amount ?? "0";
1260
1343
  let tokenSymbol = "XRP";
@@ -1269,10 +1352,10 @@ const $2e46ec862e47c14f$export$400f08bfae9ee97f = {
1269
1352
  } else parsedAmount = BigInt(String(deliveredOrAmount));
1270
1353
  transfers.push({
1271
1354
  amount: parsedAmount,
1272
- blockNumber: parseInt(block.ledger_index, 10),
1355
+ blockNumber: parseInt(typedBlock.ledger_index, 10),
1273
1356
  from: typedTx.Account ?? "UNKNOWN",
1274
1357
  memo: typedTx.DestinationTag,
1275
- timestamp: block.close_time_iso ? block.close_time_iso : null,
1358
+ timestamp: typedBlock.close_time_iso || null,
1276
1359
  to: typedTx.Destination ?? "UNKNOWN",
1277
1360
  token: tokenSymbol,
1278
1361
  tokenType: tokenType,
@@ -1314,9 +1397,10 @@ const $3b9b8f5747dcca8e$export$722698bc663d0ac0 = {
1314
1397
  match: (block)=>(0, $6bd2ca253e883278$export$ae001c77434c5340)(block) === "SUI",
1315
1398
  transform (block) {
1316
1399
  let transfers = [];
1317
- const blockNumber = parseInt(block.sequence, 10);
1318
- const blockTimestamp = new Date(parseInt(block.timestamp, 10)).toISOString();
1319
- const transactions = block.transactions || [];
1400
+ const typedBlock = block;
1401
+ const blockNumber = parseInt(typedBlock.sequence, 10);
1402
+ const blockTimestamp = new Date(parseInt(typedBlock.timestamp, 10)).toISOString();
1403
+ const transactions = typedBlock.transactions || [];
1320
1404
  for (const tx of transactions){
1321
1405
  const transactionHash = tx.digest;
1322
1406
  let transactionGasFee = BigInt(0);
@@ -1426,11 +1510,11 @@ const $fc7ca671efecc378$export$a51565c56ceacb0a = {
1426
1510
  match: (block)=>(0, $6bd2ca253e883278$export$ae001c77434c5340)(block) === "SVM",
1427
1511
  transform (block) {
1428
1512
  let transfers = [];
1429
- for (const tx of block.transactions || []){
1513
+ const typedBlock = block;
1514
+ for (const svmTx of typedBlock.transactions || []){
1430
1515
  const txTransfers = [];
1431
- const svmTx = tx;
1432
1516
  const txHash = svmTx.transaction.signatures[0];
1433
- const timestamp = block.blockTime ? new Date(block.blockTime * 1000).toISOString() : null;
1517
+ const timestamp = typedBlock.blockTime ? new Date(typedBlock.blockTime * 1000).toISOString() : null;
1434
1518
  const allAccounts = svmTx.transaction.message.accountKeys.concat(svmTx.meta.loadedAddresses.writable).concat(svmTx.meta.loadedAddresses.readonly).map((a)=>typeof a === "string" ? a : a?.pubkey);
1435
1519
  let txFee = BigInt(svmTx.meta.fee);
1436
1520
  if (txFee < BigInt(10)) txFee = txFee * BigInt(Math.pow(10, 9));
@@ -1440,7 +1524,7 @@ const $fc7ca671efecc378$export$a51565c56ceacb0a = {
1440
1524
  // handle tx fee
1441
1525
  txTransfers.push({
1442
1526
  amount: txFee,
1443
- blockNumber: block.parentSlot + 1,
1527
+ blockNumber: typedBlock.parentSlot + 1,
1444
1528
  from: feePayer,
1445
1529
  index: "0",
1446
1530
  timestamp: timestamp,
@@ -1506,7 +1590,7 @@ const $fc7ca671efecc378$export$a51565c56ceacb0a = {
1506
1590
  if (!to) to = svmTx.meta.postTokenBalances.find((ptb)=>ptb.accountIndex === toIdx + 1)?.owner || allAccounts[toIdx] || signer;
1507
1591
  txTransfers.push({
1508
1592
  amount: amount,
1509
- blockNumber: block.parentSlot + 1,
1593
+ blockNumber: typedBlock.parentSlot + 1,
1510
1594
  from: from,
1511
1595
  fromTokenAccount: allAccounts[fromIdx],
1512
1596
  index: index,
@@ -1534,7 +1618,7 @@ const $fc7ca671efecc378$export$a51565c56ceacb0a = {
1534
1618
  }
1535
1619
  txTransfers.push({
1536
1620
  amount: solAmount,
1537
- blockNumber: block.parentSlot + 1,
1621
+ blockNumber: typedBlock.parentSlot + 1,
1538
1622
  from: from,
1539
1623
  index: index,
1540
1624
  timestamp: timestamp,
@@ -1549,7 +1633,7 @@ const $fc7ca671efecc378$export$a51565c56ceacb0a = {
1549
1633
  if (wSolAmount > BigInt(0)) {
1550
1634
  txTransfers.push({
1551
1635
  amount: wSolAmount,
1552
- blockNumber: block.parentSlot + 1,
1636
+ blockNumber: typedBlock.parentSlot + 1,
1553
1637
  from: from,
1554
1638
  index: `${index}-1`,
1555
1639
  timestamp: timestamp,
@@ -1561,7 +1645,7 @@ const $fc7ca671efecc378$export$a51565c56ceacb0a = {
1561
1645
  });
1562
1646
  txTransfers.push({
1563
1647
  amount: wSolAmount,
1564
- blockNumber: block.parentSlot + 1,
1648
+ blockNumber: typedBlock.parentSlot + 1,
1565
1649
  from: $fc7ca671efecc378$var$WSOL_MINT,
1566
1650
  index: `${index}-2`,
1567
1651
  timestamp: timestamp,
@@ -1575,7 +1659,7 @@ const $fc7ca671efecc378$export$a51565c56ceacb0a = {
1575
1659
  } else if (wSolAmount < BigInt(0)) {
1576
1660
  txTransfers.push({
1577
1661
  amount: wSolAmount * BigInt(-1),
1578
- blockNumber: block.parentSlot + 1,
1662
+ blockNumber: typedBlock.parentSlot + 1,
1579
1663
  from: $fc7ca671efecc378$var$WSOL_MINT,
1580
1664
  index: `${index}-1`,
1581
1665
  timestamp: timestamp,
@@ -1587,7 +1671,7 @@ const $fc7ca671efecc378$export$a51565c56ceacb0a = {
1587
1671
  });
1588
1672
  txTransfers.push({
1589
1673
  amount: wSolAmount * BigInt(-1),
1590
- blockNumber: block.parentSlot + 1,
1674
+ blockNumber: typedBlock.parentSlot + 1,
1591
1675
  from: to,
1592
1676
  index: `${index}-2`,
1593
1677
  timestamp: timestamp,
@@ -1613,7 +1697,7 @@ const $fc7ca671efecc378$export$a51565c56ceacb0a = {
1613
1697
  const amount = BigInt(amountData.readBigUInt64LE(0).toString());
1614
1698
  txTransfers.push({
1615
1699
  amount: amount,
1616
- blockNumber: block.parentSlot + 1,
1700
+ blockNumber: typedBlock.parentSlot + 1,
1617
1701
  from: matchingAccounts[0],
1618
1702
  index: index,
1619
1703
  timestamp: timestamp,
@@ -1628,7 +1712,7 @@ const $fc7ca671efecc378$export$a51565c56ceacb0a = {
1628
1712
  const amount = BigInt(amountData.readBigUInt64LE(0).toString());
1629
1713
  txTransfers.push({
1630
1714
  amount: amount,
1631
- blockNumber: block.parentSlot + 1,
1715
+ blockNumber: typedBlock.parentSlot + 1,
1632
1716
  from: matchingAccounts[0],
1633
1717
  index: index,
1634
1718
  timestamp: timestamp,
@@ -1653,7 +1737,7 @@ const $fc7ca671efecc378$export$a51565c56ceacb0a = {
1653
1737
  const amount = BigInt(amountData.readBigUInt64LE(0).toString());
1654
1738
  txTransfers.push({
1655
1739
  amount: amount,
1656
- blockNumber: block.parentSlot + 1,
1740
+ blockNumber: typedBlock.parentSlot + 1,
1657
1741
  from: matchingAccounts[0],
1658
1742
  index: index,
1659
1743
  timestamp: timestamp,
@@ -1692,7 +1776,7 @@ const $fc7ca671efecc378$export$a51565c56ceacb0a = {
1692
1776
  if (toReconcile[t.from] && toReconcile[t.to] && toReconcile[t.from] > 0 && toReconcile[t.from] <= toReconcile[t.to] * BigInt(-1)) {
1693
1777
  txTransfers.push({
1694
1778
  amount: toReconcile[t.from],
1695
- blockNumber: block.parentSlot + 1,
1779
+ blockNumber: typedBlock.parentSlot + 1,
1696
1780
  from: t.to,
1697
1781
  index: t.index + "-1",
1698
1782
  timestamp: timestamp,
@@ -1710,7 +1794,7 @@ const $fc7ca671efecc378$export$a51565c56ceacb0a = {
1710
1794
  if (toReconcile[t.fromTokenAccount]) {
1711
1795
  txTransfers.push({
1712
1796
  amount: t.amount,
1713
- blockNumber: block.parentSlot + 1,
1797
+ blockNumber: typedBlock.parentSlot + 1,
1714
1798
  from: t.fromTokenAccount,
1715
1799
  index: t.index + "-1",
1716
1800
  timestamp: timestamp,
@@ -1726,7 +1810,7 @@ const $fc7ca671efecc378$export$a51565c56ceacb0a = {
1726
1810
  if (toReconcile[t.toTokenAccount]) {
1727
1811
  txTransfers.push({
1728
1812
  amount: t.amount,
1729
- blockNumber: block.parentSlot + 1,
1813
+ blockNumber: typedBlock.parentSlot + 1,
1730
1814
  from: $fc7ca671efecc378$var$WSOL_MINT,
1731
1815
  index: t.index + "-2",
1732
1816
  timestamp: timestamp,
@@ -1746,7 +1830,7 @@ const $fc7ca671efecc378$export$a51565c56ceacb0a = {
1746
1830
  for(const j in toReconcile)if (k !== j && toReconcile[k] === toReconcile[j] * BigInt(-1)) {
1747
1831
  txTransfers.push({
1748
1832
  amount: toReconcile[j] < BigInt(0) ? toReconcile[j] * BigInt(-1) : toReconcile[j],
1749
- blockNumber: block.parentSlot + 1,
1833
+ blockNumber: typedBlock.parentSlot + 1,
1750
1834
  from: toReconcile[j] < BigInt(0) ? j : k,
1751
1835
  timestamp: // index,
1752
1836
  timestamp,
@@ -1777,7 +1861,7 @@ const $fc7ca671efecc378$export$a51565c56ceacb0a = {
1777
1861
  if (toReconcile[from] * BigInt(-1) < amount) amount = toReconcile[from] * BigInt(-1);
1778
1862
  txTransfers.push({
1779
1863
  amount: amount,
1780
- blockNumber: block.parentSlot + 1,
1864
+ blockNumber: typedBlock.parentSlot + 1,
1781
1865
  from: from,
1782
1866
  timestamp: // index,
1783
1867
  timestamp,
@@ -1821,7 +1905,7 @@ const $fc7ca671efecc378$export$a51565c56ceacb0a = {
1821
1905
  // try attributing to unwrapping wSOL
1822
1906
  if (amount > BigInt(0) && post.mint === $fc7ca671efecc378$var$WSOL_MINT) txTransfers.push({
1823
1907
  amount: amount,
1824
- blockNumber: block.parentSlot + 1,
1908
+ blockNumber: typedBlock.parentSlot + 1,
1825
1909
  from: $fc7ca671efecc378$var$WSOL_MINT,
1826
1910
  timestamp: // index,
1827
1911
  timestamp,
@@ -1833,7 +1917,7 @@ const $fc7ca671efecc378$export$a51565c56ceacb0a = {
1833
1917
  });
1834
1918
  else if (!pre && amount > BigInt(0)) txTransfers.push({
1835
1919
  amount: amount,
1836
- blockNumber: block.parentSlot + 1,
1920
+ blockNumber: typedBlock.parentSlot + 1,
1837
1921
  from: post.mint,
1838
1922
  timestamp: // index,
1839
1923
  timestamp,
@@ -2978,10 +3062,10 @@ const $fc745f3cb8eb3f52$export$36783fc9701281c6 = {
2978
3062
  match: (block)=>(0, $6bd2ca253e883278$export$ae001c77434c5340)(block) === "STARKNET",
2979
3063
  transform (block) {
2980
3064
  let transfers = [];
2981
- if (!Array.isArray(block.transactions)) return [];
2982
- for (const tx of block.transactions || []){
2983
- const typedTx = tx;
2984
- const timestamp = block.timestamp ? new Date(block.timestamp * 1000).toISOString() : null;
3065
+ const typedBlock = block;
3066
+ if (!Array.isArray(typedBlock.transactions)) return [];
3067
+ for (const typedTx of typedBlock.transactions || []){
3068
+ const timestamp = typedBlock.timestamp ? new Date(typedBlock.timestamp * 1000).toISOString() : null;
2985
3069
  let transactionGasFee = BigInt(0);
2986
3070
  if (typedTx?.receipt?.actual_fee?.amount) transactionGasFee = BigInt(typedTx.receipt.actual_fee.amount);
2987
3071
  const transactionHash = typedTx.transaction_hash;
@@ -2993,7 +3077,7 @@ const $fc745f3cb8eb3f52$export$36783fc9701281c6 = {
2993
3077
  const amount = BigInt(amountHex);
2994
3078
  transfers.push({
2995
3079
  amount: amount,
2996
- blockNumber: block.block_number,
3080
+ blockNumber: typedBlock.block_number,
2997
3081
  from: from,
2998
3082
  timestamp: timestamp,
2999
3083
  to: to,
@@ -3037,11 +3121,11 @@ const $3478cd776d185339$export$681f497010b17679 = {
3037
3121
  match: (block)=>(0, $6bd2ca253e883278$export$ae001c77434c5340)(block) === "STELLAR",
3038
3122
  transform (block) {
3039
3123
  let transfers = [];
3040
- for (const tx of block.transactions || []){
3041
- const typedTx = tx;
3124
+ const typedBlock = block;
3125
+ for (const typedTx of typedBlock.transactions || []){
3042
3126
  for (const op of typedTx.operations)if (op.type === "payment") transfers.push({
3043
3127
  amount: BigInt(op.amount.replace(".", "")),
3044
- blockNumber: block.sequence,
3128
+ blockNumber: typedBlock.sequence,
3045
3129
  from: op.from,
3046
3130
  memo: typedTx.memo,
3047
3131
  timestamp: typedTx.created_at,
@@ -3153,9 +3237,10 @@ const $cd430dd11c31e572$export$608f3f42810b9879 = {
3153
3237
  match: (block)=>(0, $6bd2ca253e883278$export$ae001c77434c5340)(block) === "TON",
3154
3238
  transform (block) {
3155
3239
  let transfers = [];
3156
- const blockNumber = block.seqno;
3157
- const blockTimestamp = new Date(block.shards?.[0]?.gen_utime * 1000).toISOString();
3158
- for (const shard of block.shards || [])for (const tx of shard.transactions || []){
3240
+ const typedBlock = block;
3241
+ const blockNumber = typedBlock.seqno;
3242
+ const blockTimestamp = new Date(typedBlock.shards?.[0]?.gen_utime * 1000).toISOString();
3243
+ for (const shard of typedBlock.shards || [])for (const tx of shard.transactions || []){
3159
3244
  const transactionLT = tx.transaction_id.lt;
3160
3245
  const transactionHash = tx.transaction_id.hash;
3161
3246
  const transactionFee = BigInt(tx.fee || "0");
@@ -3219,8 +3304,9 @@ const $990c4f660694d8bc$export$4f5322cf4718bd30 = {
3219
3304
  match: (block)=>(0, $6bd2ca253e883278$export$ae001c77434c5340)(block) === "UTXO",
3220
3305
  transform (block) {
3221
3306
  let transfers = [];
3222
- const timestamp = block.time ? new Date(block.time * 1000).toISOString() : null;
3223
- for (const tx of block.tx){
3307
+ const typedBlock = block;
3308
+ const timestamp = typedBlock.time ? new Date(typedBlock.time * 1000).toISOString() : null;
3309
+ for (const tx of typedBlock.tx){
3224
3310
  const vin = tx.vin[0];
3225
3311
  const vout = tx.vout;
3226
3312
  const fromVout = Math.min(vin?.vout || 1000, vout.length - 1);
@@ -3228,7 +3314,7 @@ const $990c4f660694d8bc$export$4f5322cf4718bd30 = {
3228
3314
  if (!fromAddress) continue;
3229
3315
  for (const v of vout)transfers.push({
3230
3316
  amount: BigInt(Math.round(v.value * Math.pow(10, 8))),
3231
- blockNumber: block.height,
3317
+ blockNumber: typedBlock.height,
3232
3318
  from: fromAddress,
3233
3319
  timestamp: timestamp,
3234
3320
  to: v.scriptPubKey.address || v.scriptPubKey.addresses?.[0],
@@ -11031,6 +11117,174 @@ var $59fb8e0333a5d25f$export$2e2bcd8739ae039 = $59fb8e0333a5d25f$var$rawTemplate
11031
11117
  var $faefaad95e5fcca0$exports = {};
11032
11118
 
11033
11119
 
11120
+ var $b4b970cc11bce2a5$exports = {};
11121
+ // Auto-generated by scripts/generate-block-types.ts
11122
+ var $63da2c7fbe36951e$exports = {};
11123
+ // Auto-generated by scripts/generate-block-types.ts
11124
+ // Generated: 2026-03-17
11125
+ // Sources:
11126
+ // https://jiti.indexing.co/networks/aptos/666725417
11127
+ // https://jiti.indexing.co/networks/aptos/666725317
11128
+ // https://jiti.indexing.co/networks/aptos/666724417
11129
+ // Samples: 3
11130
+
11131
+
11132
+ var $22f4303346c10465$exports = {};
11133
+ // Auto-generated by scripts/generate-block-types.ts
11134
+ // Generated: 2026-03-17
11135
+ // Sources:
11136
+ // https://jiti.indexing.co/networks/cardano/13169111
11137
+ // https://jiti.indexing.co/networks/cardano/13169011
11138
+ // https://jiti.indexing.co/networks/cardano/13168111
11139
+ // Samples: 3
11140
+
11141
+
11142
+ var $689707182a8e50d2$exports = {};
11143
+ // Auto-generated by scripts/generate-block-types.ts
11144
+ // Generated: 2026-03-17
11145
+ // Sources:
11146
+ // https://jiti.indexing.co/networks/cosmos/30234630
11147
+ // https://jiti.indexing.co/networks/cosmos/30234530
11148
+ // https://jiti.indexing.co/networks/cosmos/30233630
11149
+ // Samples: 3
11150
+
11151
+
11152
+ var $8e102df1b0c978b9$exports = {};
11153
+ // Auto-generated by scripts/generate-block-types.ts
11154
+ // Generated: 2026-03-17
11155
+ // Sources:
11156
+ // https://jiti.indexing.co/networks/ethereum/24674633
11157
+ // https://jiti.indexing.co/networks/ethereum/24674533
11158
+ // https://jiti.indexing.co/networks/ethereum/24673633
11159
+ // https://jiti.indexing.co/networks/base/43464980
11160
+ // https://jiti.indexing.co/networks/base/43464880
11161
+ // https://jiti.indexing.co/networks/base/43463980
11162
+ // https://jiti.indexing.co/networks/polygon/84299638
11163
+ // https://jiti.indexing.co/networks/polygon/84299538
11164
+ // https://jiti.indexing.co/networks/polygon/84298638
11165
+ // https://jiti.indexing.co/networks/arbitrum/442610729
11166
+ // https://jiti.indexing.co/networks/arbitrum/442610629
11167
+ // https://jiti.indexing.co/networks/arbitrum/442609729
11168
+ // Samples: 12
11169
+
11170
+
11171
+ var $250edd1588e3b00b$exports = {};
11172
+ // Auto-generated by scripts/generate-block-types.ts
11173
+ // Generated: 2026-03-17
11174
+ // Sources:
11175
+ // https://jiti.indexing.co/networks/filecoin/5847092
11176
+ // https://jiti.indexing.co/networks/filecoin/5846992
11177
+ // https://jiti.indexing.co/networks/filecoin/5846092
11178
+ // Samples: 3
11179
+
11180
+
11181
+ var $04dbaca71f47b258$exports = {};
11182
+ // Auto-generated by scripts/generate-block-types.ts
11183
+ // Generated: 2026-03-17
11184
+ // Sources:
11185
+ // https://jiti.indexing.co/networks/ripple/102922872
11186
+ // https://jiti.indexing.co/networks/ripple/102922772
11187
+ // https://jiti.indexing.co/networks/ripple/102921872
11188
+ // Samples: 3
11189
+
11190
+
11191
+ var $e97619bd856df190$exports = {};
11192
+ // Auto-generated by scripts/generate-block-types.ts
11193
+ // Generated: 2026-03-17
11194
+ // Sources:
11195
+ // https://jiti.indexing.co/networks/starknet/7797628
11196
+ // https://jiti.indexing.co/networks/starknet/7797528
11197
+ // https://jiti.indexing.co/networks/starknet/7796628
11198
+ // Samples: 3
11199
+
11200
+
11201
+ var $c8457e155c29716b$exports = {};
11202
+ // Auto-generated by scripts/generate-block-types.ts
11203
+ // Generated: 2026-03-17
11204
+ // Sources:
11205
+ // https://jiti.indexing.co/networks/stellar/61687568
11206
+ // https://jiti.indexing.co/networks/stellar/61687468
11207
+ // https://jiti.indexing.co/networks/stellar/61686568
11208
+ // Samples: 3
11209
+
11210
+
11211
+ var $2c47a7d2c09ba685$exports = {};
11212
+ // Auto-generated by scripts/generate-block-types.ts
11213
+ // Generated: 2026-03-17
11214
+ // Sources:
11215
+ // https://jiti.indexing.co/networks/bittensor/7762563
11216
+ // https://jiti.indexing.co/networks/bittensor/7762463
11217
+ // https://jiti.indexing.co/networks/bittensor/7761563
11218
+ // https://jiti.indexing.co/networks/polkadot/13494424
11219
+ // https://jiti.indexing.co/networks/polkadot/13494324
11220
+ // https://jiti.indexing.co/networks/polkadot/13493424
11221
+ // Samples: 6
11222
+
11223
+
11224
+ var $de65544ccdf7550c$exports = {};
11225
+ // Auto-generated by scripts/generate-block-types.ts
11226
+ // Generated: 2026-03-17
11227
+ // Sources:
11228
+ // https://jiti.indexing.co/networks/sui/255195515
11229
+ // https://jiti.indexing.co/networks/sui/255195415
11230
+ // https://jiti.indexing.co/networks/sui/255194515
11231
+ // Samples: 3
11232
+
11233
+
11234
+ var $bfa1637983c7bdd8$exports = {};
11235
+ // Auto-generated by scripts/generate-block-types.ts
11236
+ // Generated: 2026-03-17
11237
+ // Sources:
11238
+ // https://jiti.indexing.co/networks/solana/406934053
11239
+ // https://jiti.indexing.co/networks/solana/406933953
11240
+ // https://jiti.indexing.co/networks/solana/406933053
11241
+ // https://jiti.indexing.co/networks/eclipse/143074735
11242
+ // https://jiti.indexing.co/networks/eclipse/143074635
11243
+ // https://jiti.indexing.co/networks/eclipse/143073735
11244
+ // Samples: 6
11245
+
11246
+
11247
+ var $4828ba704a8a504f$exports = {};
11248
+ // Auto-generated by scripts/generate-block-types.ts
11249
+ // Generated: 2026-03-17
11250
+ // Sources:
11251
+ // https://jiti.indexing.co/networks/ton/58384846
11252
+ // https://jiti.indexing.co/networks/ton/58384746
11253
+ // https://jiti.indexing.co/networks/ton/58383846
11254
+ // Samples: 3
11255
+
11256
+
11257
+ var $4a8e5fd52443a474$exports = {};
11258
+ // Auto-generated by scripts/generate-block-types.ts
11259
+ // Generated: 2026-03-17
11260
+ // Sources:
11261
+ // https://jiti.indexing.co/networks/bitcoin/940963
11262
+ // https://jiti.indexing.co/networks/bitcoin/940863
11263
+ // https://jiti.indexing.co/networks/bitcoin/939963
11264
+ // https://jiti.indexing.co/networks/dogecoin/6126894
11265
+ // https://jiti.indexing.co/networks/dogecoin/6126794
11266
+ // https://jiti.indexing.co/networks/dogecoin/6125894
11267
+ // https://jiti.indexing.co/networks/zcash/3275181
11268
+ // https://jiti.indexing.co/networks/zcash/3275081
11269
+ // https://jiti.indexing.co/networks/zcash/3274181
11270
+ // Samples: 9
11271
+
11272
+
11273
+ $parcel$exportWildcard($b4b970cc11bce2a5$exports, $63da2c7fbe36951e$exports);
11274
+ $parcel$exportWildcard($b4b970cc11bce2a5$exports, $22f4303346c10465$exports);
11275
+ $parcel$exportWildcard($b4b970cc11bce2a5$exports, $689707182a8e50d2$exports);
11276
+ $parcel$exportWildcard($b4b970cc11bce2a5$exports, $8e102df1b0c978b9$exports);
11277
+ $parcel$exportWildcard($b4b970cc11bce2a5$exports, $250edd1588e3b00b$exports);
11278
+ $parcel$exportWildcard($b4b970cc11bce2a5$exports, $04dbaca71f47b258$exports);
11279
+ $parcel$exportWildcard($b4b970cc11bce2a5$exports, $e97619bd856df190$exports);
11280
+ $parcel$exportWildcard($b4b970cc11bce2a5$exports, $c8457e155c29716b$exports);
11281
+ $parcel$exportWildcard($b4b970cc11bce2a5$exports, $2c47a7d2c09ba685$exports);
11282
+ $parcel$exportWildcard($b4b970cc11bce2a5$exports, $de65544ccdf7550c$exports);
11283
+ $parcel$exportWildcard($b4b970cc11bce2a5$exports, $bfa1637983c7bdd8$exports);
11284
+ $parcel$exportWildcard($b4b970cc11bce2a5$exports, $4828ba704a8a504f$exports);
11285
+ $parcel$exportWildcard($b4b970cc11bce2a5$exports, $4a8e5fd52443a474$exports);
11286
+
11287
+
11034
11288
  const $882b6d93070905b3$export$eab97d15b1788b8d = {
11035
11289
  ...$d7167569386d0d4c$exports
11036
11290
  };
@@ -11044,6 +11298,7 @@ function $882b6d93070905b3$export$a07bfd14bbc36e4b(key) {
11044
11298
  return $882b6d93070905b3$export$a8fc3402335b0b04[key];
11045
11299
  }
11046
11300
  $parcel$exportWildcard(module.exports, $faefaad95e5fcca0$exports);
11301
+ $parcel$exportWildcard(module.exports, $b4b970cc11bce2a5$exports);
11047
11302
 
11048
11303
 
11049
11304
  //# sourceMappingURL=main.js.map