@indexing/jiti 0.1.10 → 0.1.12

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
@@ -60,11 +60,6 @@ const $6bd2ca253e883278$var$PARTIAL_VM_TO_NETWORK_MAP = {
60
60
  RIPPLE: [
61
61
  "RIPPLE"
62
62
  ],
63
- SNAPCHAIN: [
64
- "CAST_PROTOCOL",
65
- "FARCASTER",
66
- "SNAPCHAIN"
67
- ],
68
63
  STARKNET: [
69
64
  "STARKNET"
70
65
  ],
@@ -76,6 +71,7 @@ const $6bd2ca253e883278$var$PARTIAL_VM_TO_NETWORK_MAP = {
76
71
  "BITTENSOR",
77
72
  "ENJIN",
78
73
  "KUSAMA",
74
+ "MIDNIGHT",
79
75
  "POLKADOT"
80
76
  ],
81
77
  SUI: [
@@ -560,104 +556,6 @@ function $414c83047563e72e$export$685b7dc2197cd06c(rawBlock) {
560
556
  }
561
557
 
562
558
 
563
- var $7fd98ef3967673b0$exports = {};
564
-
565
- $parcel$export($7fd98ef3967673b0$exports, "snapchainTimestampFromMsg", () => $7fd98ef3967673b0$export$f69db31cc49f73fd);
566
- $parcel$export($7fd98ef3967673b0$exports, "snapchainParseEvent", () => $7fd98ef3967673b0$export$146821f89c094be4);
567
-
568
- var $7fd98ef3967673b0$require$Buffer = $8zHUo$buffer.Buffer;
569
- function $7fd98ef3967673b0$var$getValueFromObject(obj, path) {
570
- if (!obj || !path || !path.length) return undefined;
571
- const parts = path.replace(/\.\./g, ".__dot__").split(".");
572
- if (parts[0].startsWith("__dot__")) parts[0] = parts[0].replace(/__dot__/, ".");
573
- if (parts.length === 1) return obj[parts[0]];
574
- return $7fd98ef3967673b0$var$getValueFromObject(obj[parts[0]], parts.slice(1).join("."));
575
- }
576
- function $7fd98ef3967673b0$export$f69db31cc49f73fd(msg) {
577
- return new Date(parseInt(msg.timestamp || msg.data?.timestamp) * 1000 + 1609459200000);
578
- }
579
- function $7fd98ef3967673b0$export$146821f89c094be4(evt) {
580
- if (!evt?.data?.type) return null;
581
- const data = evt.data;
582
- const processed = {
583
- fid: data.fid,
584
- signer: evt.signer,
585
- timestamp: $7fd98ef3967673b0$export$f69db31cc49f73fd(data).toISOString()
586
- };
587
- switch(data.type){
588
- case "MESSAGE_TYPE_CAST_ADD":
589
- processed._dataType = "cast";
590
- processed.hash = evt.hash;
591
- processed.embeds = $7fd98ef3967673b0$var$getValueFromObject(data, "cast_add_body.embeds");
592
- processed.parentCastUrl = $7fd98ef3967673b0$var$getValueFromObject(data, "cast_add_body.parent_url");
593
- processed.parentCastFid = $7fd98ef3967673b0$var$getValueFromObject(data, "cast_add_body.parent_cast_id.fid");
594
- processed.parentCastHash = $7fd98ef3967673b0$var$getValueFromObject(data, "cast_add_body.parent_cast_id.hash");
595
- processed.text = $7fd98ef3967673b0$var$getValueFromObject(data, "cast_add_body.text");
596
- processed.mentions = $7fd98ef3967673b0$var$getValueFromObject(data, "cast_add_body.mentions");
597
- processed.mentionsPositions = $7fd98ef3967673b0$var$getValueFromObject(data, "cast_add_body.mentions_positions");
598
- processed.deletedAt = "";
599
- break;
600
- case "MESSAGE_TYPE_CAST_REMOVE":
601
- processed._dataType = "cast";
602
- processed.hash = $7fd98ef3967673b0$var$getValueFromObject(data, "cast_remove_body.target_hash");
603
- if (typeof processed.hash === "string" && !processed.hash?.startsWith("0x")) processed.hash = "0x" + $7fd98ef3967673b0$require$Buffer.from(processed.hash, "base64").toString("hex");
604
- processed.deletedAt = processed.timestamp;
605
- break;
606
- case "MESSAGE_TYPE_REACTION_ADD":
607
- case "MESSAGE_TYPE_REACTION_REMOVE":
608
- processed._dataType = "reaction";
609
- processed.targetCastFid = $7fd98ef3967673b0$var$getValueFromObject(data, "reaction_body.target_cast_id.fid");
610
- processed.targetCastHash = $7fd98ef3967673b0$var$getValueFromObject(data, "reaction_body.target_cast_id.hash");
611
- processed.type = $7fd98ef3967673b0$var$getValueFromObject(data, "reaction_body.type")?.split("_TYPE_").pop().toLowerCase();
612
- if (data.type === "MESSAGE_TYPE_REACTION_REMOVE") processed.deletedAt = processed.timestamp;
613
- else processed.deletedAt = "";
614
- break;
615
- case "MESSAGE_TYPE_LINK_ADD":
616
- case "MESSAGE_TYPE_LINK_REMOVE":
617
- processed._dataType = "link";
618
- processed.target_fid = $7fd98ef3967673b0$var$getValueFromObject(data, "link_body.target_fid");
619
- processed.type = $7fd98ef3967673b0$var$getValueFromObject(data, "link_body.type");
620
- if (data.type === "MESSAGE_TYPE_LINK_REMOVE") processed.deletedAt = processed.timestamp;
621
- else processed.deletedAt = "";
622
- break;
623
- case "MESSAGE_TYPE_VERIFICATION_ADD_ETH_ADDRESS":
624
- processed._dataType = "verification";
625
- processed.address = $7fd98ef3967673b0$var$getValueFromObject(data, "verification_add_address_body.address");
626
- if (processed.address?.startsWith("0x")) processed.address = processed.address.toLowerCase();
627
- processed.deletedAt = "";
628
- break;
629
- case "MESSAGE_TYPE_VERIFICATION_REMOVE":
630
- processed._dataType = "verification";
631
- processed.address = $7fd98ef3967673b0$var$getValueFromObject(data, "verification_remove_body.address");
632
- if (processed.address?.startsWith("0x")) processed.address = processed.address.toLowerCase();
633
- processed.deletedAt = processed.timestamp;
634
- break;
635
- case "MESSAGE_TYPE_USER_DATA_ADD":
636
- {
637
- processed._dataType = "user_data";
638
- let key = $7fd98ef3967673b0$var$getValueFromObject(data, "user_data_body.type");
639
- if (typeof key === "string") {
640
- key = key.trim().split("_").pop().toLowerCase();
641
- processed.data = {
642
- [key]: $7fd98ef3967673b0$var$getValueFromObject(data, "user_data_body.value")
643
- };
644
- }
645
- break;
646
- }
647
- case "MESSAGE_TYPE_USERNAME_PROOF":
648
- return null;
649
- default:
650
- return null;
651
- }
652
- for(const k in processed){
653
- if (processed[k] === null || processed[k] === undefined) delete processed[k];
654
- if (k === "deletedAt" && processed[k] === "") processed[k] = null;
655
- if ((k.endsWith("Hash") || k === "hash") && processed[k] && !processed[k].startsWith("0x")) processed[k] = "0x" + $7fd98ef3967673b0$require$Buffer.from(processed[k], "base64").toString("hex");
656
- }
657
- return processed;
658
- }
659
-
660
-
661
559
  $parcel$exportWildcard($d7167569386d0d4c$exports, $56acd58307ebf8e6$exports);
662
560
  $parcel$exportWildcard($d7167569386d0d4c$exports, $77809331c5210b08$exports);
663
561
  $parcel$exportWildcard($d7167569386d0d4c$exports, $b8691f253b6baa6e$exports);
@@ -667,7 +565,6 @@ $parcel$exportWildcard($d7167569386d0d4c$exports, $e5566e47593dc3e2$exports);
667
565
  $parcel$exportWildcard($d7167569386d0d4c$exports, $da55be3e40667945$exports);
668
566
  $parcel$exportWildcard($d7167569386d0d4c$exports, $f7a3fb164436c9c3$exports);
669
567
  $parcel$exportWildcard($d7167569386d0d4c$exports, $414c83047563e72e$exports);
670
- $parcel$exportWildcard($d7167569386d0d4c$exports, $7fd98ef3967673b0$exports);
671
568
 
672
569
 
673
570
  var $48f9879a44dd1195$exports = {};
@@ -3867,7 +3764,6 @@ const $7dd402f6ad0dab6a$var$tokenTransfersTemplate = {
3867
3764
  var $7dd402f6ad0dab6a$export$2e2bcd8739ae039 = $7dd402f6ad0dab6a$var$tokenTransfersTemplate;
3868
3765
 
3869
3766
 
3870
-
3871
3767
  const $9af31dbb692f94e3$var$NULL_ADDRESS = "0x0000000000000000000000000000000000000000";
3872
3768
  const $9af31dbb692f94e3$var$filterValuesTemplate = {
3873
3769
  key: "filter_values",
@@ -3953,24 +3849,6 @@ const $9af31dbb692f94e3$var$filterValuesTemplate = {
3953
3849
  for(const key in tx)if (tx[key]?.issuer) finalValues.add(tx[key]?.issuer);
3954
3850
  }
3955
3851
  break;
3956
- case "SNAPCHAIN":
3957
- {
3958
- const typedBlock = block;
3959
- let parsed = [];
3960
- if (typedBlock.processed?.length) parsed = typedBlock.processed;
3961
- else {
3962
- const shards = typedBlock.shards ? typedBlock.shards : [
3963
- block
3964
- ];
3965
- const messages = shards.map((s)=>s.transactions?.map((t)=>t.user_messages || []).flat()).flat();
3966
- parsed = messages.map((0, $7fd98ef3967673b0$export$146821f89c094be4));
3967
- }
3968
- for (const p of parsed){
3969
- if (!p) continue;
3970
- finalValues.add(`${p.fid}`);
3971
- }
3972
- break;
3973
- }
3974
3852
  case "STARKNET":
3975
3853
  for (const tx of block.transactions || []){
3976
3854
  const from = tx.send_address?.toLowerCase() || $9af31dbb692f94e3$var$NULL_ADDRESS;
@@ -11342,58 +11220,6 @@ const $9af31dbb692f94e3$var$filterValuesTemplate = {
11342
11220
  "0xe7f571ba7d04d6bc88f519289bc4f94a54fb25634128b3f9884d64904db32c12"
11343
11221
  ]
11344
11222
  },
11345
- {
11346
- params: {},
11347
- payload: "https://jiti.indexing.co/networks/farcaster/2442805",
11348
- output: [
11349
- "1053494",
11350
- "1066546",
11351
- "1090343",
11352
- "1131909",
11353
- "1134046",
11354
- "1134910",
11355
- "1135798",
11356
- "1139813",
11357
- "1146560",
11358
- "1148283",
11359
- "1163463",
11360
- "1164305",
11361
- "1167631",
11362
- "1167984",
11363
- "1181162",
11364
- "1182140",
11365
- "1186458",
11366
- "1198272",
11367
- "1230161",
11368
- "1275123",
11369
- "1278167",
11370
- "12938",
11371
- "1322761",
11372
- "1332557",
11373
- "1334507",
11374
- "1337870",
11375
- "1337940",
11376
- "310644",
11377
- "319554",
11378
- "377148",
11379
- "430267",
11380
- "432992",
11381
- "448300",
11382
- "455743",
11383
- "467181",
11384
- "474644",
11385
- "511842",
11386
- "541835",
11387
- "618593",
11388
- "789371",
11389
- "864838",
11390
- "897445",
11391
- "902685",
11392
- "905676",
11393
- "957928",
11394
- "969084"
11395
- ]
11396
- },
11397
11223
  {
11398
11224
  params: {},
11399
11225
  payload: "https://jiti.indexing.co/networks/hyper_core/8248362",