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