@lightprotocol/zk-compression-cli 0.27.1-alpha.4 → 0.27.1-alpha.5

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.
Binary file
@@ -123,7 +123,10 @@ async function initTestEnv({ additionalPrograms, skipSystemAccounts, indexer = t
123
123
  const config = (0, utils_1.getConfig)();
124
124
  config.indexerUrl = `http://127.0.0.1:${indexerPort}`;
125
125
  (0, utils_1.setConfig)(config);
126
- await (0, processPhotonIndexer_1.startIndexer)(`http://127.0.0.1:${rpcPort}`, indexerPort, checkPhotonVersion, photonDatabaseUrl);
126
+ const proverUrlForIndexer = prover
127
+ ? `http://127.0.0.1:${proverPort}`
128
+ : undefined;
129
+ await (0, processPhotonIndexer_1.startIndexer)(`http://127.0.0.1:${rpcPort}`, indexerPort, checkPhotonVersion, photonDatabaseUrl, proverUrlForIndexer);
127
130
  }
128
131
  if (prover) {
129
132
  const config = (0, utils_1.getConfig)();
@@ -1,2 +1,2 @@
1
- export declare function startIndexer(rpcUrl: string, indexerPort: number, checkPhotonVersion?: boolean, photonDatabaseUrl?: string): Promise<undefined>;
1
+ export declare function startIndexer(rpcUrl: string, indexerPort: number, checkPhotonVersion?: boolean, photonDatabaseUrl?: string, proverUrl?: string): Promise<undefined>;
2
2
  export declare function killIndexer(): Promise<void>;
@@ -32,7 +32,7 @@ function getPhotonInstallMessage() {
32
32
  return `\nPhoton indexer ${constants_1.PHOTON_VERSION} not found. Please install it by running: "cargo install photon-indexer --version ${constants_1.PHOTON_VERSION} --locked --force"`;
33
33
  }
34
34
  }
35
- async function startIndexer(rpcUrl, indexerPort, checkPhotonVersion = true, photonDatabaseUrl) {
35
+ async function startIndexer(rpcUrl, indexerPort, checkPhotonVersion = true, photonDatabaseUrl, proverUrl) {
36
36
  await killIndexer();
37
37
  const resolvedOrNull = which_1.default.sync("photon", { nothrow: true });
38
38
  if (resolvedOrNull === null ||
@@ -51,6 +51,9 @@ async function startIndexer(rpcUrl, indexerPort, checkPhotonVersion = true, phot
51
51
  if (photonDatabaseUrl) {
52
52
  args.push("--db-url", photonDatabaseUrl);
53
53
  }
54
+ if (proverUrl) {
55
+ args.push("--prover-url", proverUrl);
56
+ }
54
57
  (0, process_1.spawnBinary)(constants_1.INDEXER_PROCESS_NAME, args);
55
58
  await (0, process_1.waitForServers)([{ port: indexerPort, path: "/getIndexerHealth" }]);
56
59
  console.log("Indexer started successfully!");
@@ -76,7 +76,7 @@ async function startProver(proverPort, redisUrl) {
76
76
  await killProver();
77
77
  await (0, process_1.killProcessByPort)(proverPort);
78
78
  const args = ["start"];
79
- args.push("--keys-dir", KEYS_DIR);
79
+ args.push("--keys-dir", KEYS_DIR + "/");
80
80
  args.push("--prover-address", `0.0.0.0:${proverPort}`);
81
81
  args.push("--auto-download", "true");
82
82
  if (redisUrl) {
@@ -584,104 +584,6 @@
584
584
  "index.js"
585
585
  ]
586
586
  },
587
- "token-balance": {
588
- "aliases": [],
589
- "args": {},
590
- "examples": [
591
- "$ light token-balance --mint=<ADDRESS> --owner=<ADDRESS>"
592
- ],
593
- "flags": {
594
- "owner": {
595
- "description": "Address of the compressed token owner.",
596
- "name": "owner",
597
- "required": true,
598
- "hasDynamicHelp": false,
599
- "multiple": false,
600
- "type": "option"
601
- },
602
- "mint": {
603
- "description": "Mint address of the compressed token account.",
604
- "name": "mint",
605
- "required": true,
606
- "hasDynamicHelp": false,
607
- "multiple": false,
608
- "type": "option"
609
- }
610
- },
611
- "hasDynamicHelp": false,
612
- "hiddenAliases": [],
613
- "id": "token-balance",
614
- "pluginAlias": "@lightprotocol/zk-compression-cli",
615
- "pluginName": "@lightprotocol/zk-compression-cli",
616
- "pluginType": "core",
617
- "strict": true,
618
- "summary": "Get balance",
619
- "enableJsonFlag": false,
620
- "isESM": false,
621
- "relativePath": [
622
- "dist",
623
- "commands",
624
- "token-balance",
625
- "index.js"
626
- ]
627
- },
628
- "transfer": {
629
- "aliases": [],
630
- "args": {},
631
- "examples": [
632
- "$ light transfer --mint PublicKey --to PublicKey --amount 1000"
633
- ],
634
- "flags": {
635
- "mint": {
636
- "description": "Mint to transfer",
637
- "name": "mint",
638
- "required": true,
639
- "hasDynamicHelp": false,
640
- "multiple": false,
641
- "type": "option"
642
- },
643
- "to": {
644
- "description": "Recipient address",
645
- "name": "to",
646
- "required": true,
647
- "hasDynamicHelp": false,
648
- "multiple": false,
649
- "type": "option"
650
- },
651
- "amount": {
652
- "description": "Amount to send, in tokens",
653
- "name": "amount",
654
- "required": true,
655
- "hasDynamicHelp": false,
656
- "multiple": false,
657
- "type": "option"
658
- },
659
- "fee-payer": {
660
- "description": "Specify the fee-payer account. Defaults to the client keypair.",
661
- "name": "fee-payer",
662
- "required": false,
663
- "hasDynamicHelp": false,
664
- "multiple": false,
665
- "type": "option"
666
- }
667
- },
668
- "hasDynamicHelp": false,
669
- "hiddenAliases": [],
670
- "id": "transfer",
671
- "pluginAlias": "@lightprotocol/zk-compression-cli",
672
- "pluginName": "@lightprotocol/zk-compression-cli",
673
- "pluginType": "core",
674
- "strict": true,
675
- "summary": "Transfer tokens from one account to another.",
676
- "enableJsonFlag": false,
677
- "isESM": false,
678
- "relativePath": [
679
- "dist",
680
- "commands",
681
- "transfer",
682
- "index.js"
683
- ]
684
- },
685
587
  "start-prover": {
686
588
  "aliases": [],
687
589
  "args": {},
@@ -906,7 +808,105 @@
906
808
  "test-validator",
907
809
  "index.js"
908
810
  ]
811
+ },
812
+ "token-balance": {
813
+ "aliases": [],
814
+ "args": {},
815
+ "examples": [
816
+ "$ light token-balance --mint=<ADDRESS> --owner=<ADDRESS>"
817
+ ],
818
+ "flags": {
819
+ "owner": {
820
+ "description": "Address of the compressed token owner.",
821
+ "name": "owner",
822
+ "required": true,
823
+ "hasDynamicHelp": false,
824
+ "multiple": false,
825
+ "type": "option"
826
+ },
827
+ "mint": {
828
+ "description": "Mint address of the compressed token account.",
829
+ "name": "mint",
830
+ "required": true,
831
+ "hasDynamicHelp": false,
832
+ "multiple": false,
833
+ "type": "option"
834
+ }
835
+ },
836
+ "hasDynamicHelp": false,
837
+ "hiddenAliases": [],
838
+ "id": "token-balance",
839
+ "pluginAlias": "@lightprotocol/zk-compression-cli",
840
+ "pluginName": "@lightprotocol/zk-compression-cli",
841
+ "pluginType": "core",
842
+ "strict": true,
843
+ "summary": "Get balance",
844
+ "enableJsonFlag": false,
845
+ "isESM": false,
846
+ "relativePath": [
847
+ "dist",
848
+ "commands",
849
+ "token-balance",
850
+ "index.js"
851
+ ]
852
+ },
853
+ "transfer": {
854
+ "aliases": [],
855
+ "args": {},
856
+ "examples": [
857
+ "$ light transfer --mint PublicKey --to PublicKey --amount 1000"
858
+ ],
859
+ "flags": {
860
+ "mint": {
861
+ "description": "Mint to transfer",
862
+ "name": "mint",
863
+ "required": true,
864
+ "hasDynamicHelp": false,
865
+ "multiple": false,
866
+ "type": "option"
867
+ },
868
+ "to": {
869
+ "description": "Recipient address",
870
+ "name": "to",
871
+ "required": true,
872
+ "hasDynamicHelp": false,
873
+ "multiple": false,
874
+ "type": "option"
875
+ },
876
+ "amount": {
877
+ "description": "Amount to send, in tokens",
878
+ "name": "amount",
879
+ "required": true,
880
+ "hasDynamicHelp": false,
881
+ "multiple": false,
882
+ "type": "option"
883
+ },
884
+ "fee-payer": {
885
+ "description": "Specify the fee-payer account. Defaults to the client keypair.",
886
+ "name": "fee-payer",
887
+ "required": false,
888
+ "hasDynamicHelp": false,
889
+ "multiple": false,
890
+ "type": "option"
891
+ }
892
+ },
893
+ "hasDynamicHelp": false,
894
+ "hiddenAliases": [],
895
+ "id": "transfer",
896
+ "pluginAlias": "@lightprotocol/zk-compression-cli",
897
+ "pluginName": "@lightprotocol/zk-compression-cli",
898
+ "pluginType": "core",
899
+ "strict": true,
900
+ "summary": "Transfer tokens from one account to another.",
901
+ "enableJsonFlag": false,
902
+ "isESM": false,
903
+ "relativePath": [
904
+ "dist",
905
+ "commands",
906
+ "transfer",
907
+ "index.js"
908
+ ]
909
909
  }
910
910
  },
911
- "version": "0.27.1-alpha.4"
911
+ "version": "0.27.1-alpha.5"
912
912
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightprotocol/zk-compression-cli",
3
- "version": "0.27.1-alpha.4",
3
+ "version": "0.27.1-alpha.5",
4
4
  "description": "ZK Compression: Secure Scaling on Solana",
5
5
  "maintainers": [
6
6
  {
@@ -49,8 +49,8 @@
49
49
  "tweetnacl": "^1.0.3",
50
50
  "wait-on": "^7.2.0",
51
51
  "which": "^5.0.0",
52
- "@lightprotocol/compressed-token": "0.22.1-alpha.2",
53
- "@lightprotocol/stateless.js": "0.22.1-alpha.1"
52
+ "@lightprotocol/compressed-token": "0.22.1-alpha.3",
53
+ "@lightprotocol/stateless.js": "0.22.1-alpha.2"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@eslint/js": "9.36.0",