@lightprotocol/stateless.js 0.22.1-alpha.1 → 0.22.1-alpha.3

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.
Files changed (33) hide show
  1. package/README.md +4 -1
  2. package/dist/cjs/browser/constants.d.ts +29 -8
  3. package/dist/cjs/browser/index.cjs +1 -1
  4. package/dist/cjs/browser/index.cjs.map +1 -1
  5. package/dist/cjs/browser/rpc-interface.d.ts +96 -2
  6. package/dist/cjs/browser/rpc.d.ts +81 -3
  7. package/dist/cjs/browser/test-helpers/test-rpc/get-compressed-token-accounts.d.ts +0 -2
  8. package/dist/cjs/browser/test-helpers/test-rpc/test-rpc.d.ts +6 -0
  9. package/dist/cjs/browser/utils/get-state-tree-infos.d.ts +15 -0
  10. package/dist/cjs/browser/utils/index.d.ts +1 -0
  11. package/dist/cjs/browser/utils/pack-decompress.d.ts +31 -0
  12. package/dist/cjs/node/constants.d.ts +29 -8
  13. package/dist/cjs/node/index.cjs +1 -1
  14. package/dist/cjs/node/index.cjs.map +1 -1
  15. package/dist/cjs/node/rpc-interface.d.ts +96 -2
  16. package/dist/cjs/node/rpc.d.ts +81 -3
  17. package/dist/cjs/node/test-helpers/test-rpc/get-compressed-token-accounts.d.ts +0 -2
  18. package/dist/cjs/node/test-helpers/test-rpc/test-rpc.d.ts +6 -0
  19. package/dist/cjs/node/utils/get-state-tree-infos.d.ts +15 -0
  20. package/dist/cjs/node/utils/index.d.ts +1 -0
  21. package/dist/cjs/node/utils/pack-decompress.d.ts +31 -0
  22. package/dist/es/browser/constants.d.ts +29 -8
  23. package/dist/es/browser/index.js +1 -1
  24. package/dist/es/browser/index.js.map +1 -1
  25. package/dist/es/browser/rpc-interface.d.ts +96 -2
  26. package/dist/es/browser/rpc.d.ts +81 -3
  27. package/dist/es/browser/test-helpers/test-rpc/get-compressed-token-accounts.d.ts +0 -2
  28. package/dist/es/browser/test-helpers/test-rpc/test-rpc.d.ts +6 -0
  29. package/dist/es/browser/utils/get-state-tree-infos.d.ts +15 -0
  30. package/dist/es/browser/utils/index.d.ts +1 -0
  31. package/dist/es/browser/utils/pack-decompress.d.ts +31 -0
  32. package/dist/types/index.d.ts +251 -11
  33. package/package.json +5 -5
package/README.md CHANGED
@@ -14,6 +14,9 @@
14
14
  </a>
15
15
  <img src="https://img.shields.io/npm/l/%40lightprotocol%2Fstateless.js" alt="package license" height="18">
16
16
  <img src="https://img.shields.io/npm/dw/%40lightprotocol%2Fstateless.js" alt="package weekly downloads" height="18" />
17
+ <a href="https://deepwiki.com/Lightprotocol/light-protocol/3.1-javascripttypescript-sdks">
18
+ <img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki" height="18" />
19
+ </a>
17
20
  </p>
18
21
 
19
22
  ## Usage
@@ -33,8 +36,8 @@ For a more detailed documentation on usage, please check [the respective section
33
36
  For example implementations, including web and Node, refer to the respective repositories:
34
37
 
35
38
  - [Web application example implementation](https://github.com/Lightprotocol/example-web-client)
36
-
37
39
  - [Node server example implementation](https://github.com/Lightprotocol/example-nodejs-client)
40
+ - [Other Libraries](https://lightprotocol.github.io/light-protocol/)
38
41
 
39
42
  ## Troubleshooting
40
43
 
@@ -57,14 +57,24 @@ export declare const defaultStateTreeLookupTables: () => {
57
57
  * @internal
58
58
  */
59
59
  export declare const isLocalTest: (url: string) => boolean;
60
- /**
61
- * @internal
62
- */
63
- export declare const localTestActiveStateTreeInfos: () => TreeInfo[];
60
+ export declare const getDefaultAddressSpace: () => {
61
+ tree: PublicKey;
62
+ queue: PublicKey;
63
+ cpiContext: undefined;
64
+ treeType: TreeType;
65
+ nextTreeInfo: null;
66
+ };
64
67
  export declare const getDefaultAddressTreeInfo: () => {
65
68
  tree: PublicKey;
66
69
  queue: PublicKey;
67
- cpiContext: null;
70
+ cpiContext: undefined;
71
+ treeType: TreeType;
72
+ nextTreeInfo: null;
73
+ };
74
+ export declare const getBatchAddressTreeInfo: () => {
75
+ tree: PublicKey;
76
+ queue: PublicKey;
77
+ cpiContext: undefined;
68
78
  treeType: TreeType;
69
79
  nextTreeInfo: null;
70
80
  };
@@ -89,6 +99,7 @@ export declare const defaultTestStateTreeAccounts2: () => {
89
99
  merkleTree2: PublicKey;
90
100
  };
91
101
  export declare const COMPRESSED_TOKEN_PROGRAM_ID: PublicKey;
102
+ export declare const CTOKEN_PROGRAM_ID: PublicKey;
92
103
  export declare const stateTreeLookupTableMainnet = "7i86eQs3GSqHjN47WdWLTCGMW6gde1q96G2EVnUyK2st";
93
104
  export declare const nullifiedStateTreeLookupTableMainnet = "H9QD4u1fG7KmkAzn2tDXhheushxFe1EcrjGGyEFXeMqT";
94
105
  export declare const stateTreeLookupTableDevnet = "Dk9mNkbiZXJZ4By8DfSP6HEE4ojZzRvucwpawLeuwq8q";
@@ -117,9 +128,15 @@ export declare const batchMerkleTree5 = "bmt5yU97jC88YXTuSukYHa8Z5Bi2ZDUtmzfkDTA
117
128
  export declare const batchQueue5 = "oq5oh5ZR3yGomuQgFduNDzjtGvVWfDRGLuDVjv9a96P";
118
129
  export declare const batchCpiContext5 = "cpi5ZTjdgYpZ1Xr7B1cMLLUE81oTtJbNNAyKary2nV6";
119
130
  export declare const batchAddressTree = "amt2kaJA14v3urZbZvnc5v2np8jqvc4Z8zDep5wbtzx";
120
- export declare const testBatchAddressTree = "EzKE84aVTkCUhDHLELqyJaq1Y7UVVmqxXqZjVHwHY3rK";
121
131
  export declare const batchMerkleTree = "bmt1LryLZUMmF7ZtqESaw7wifBXLfXHQYoE4GAmrahU";
122
132
  export declare const batchQueue = "oq1na8gojfdUhsfCpyjNt6h4JaDWtHf1yQj4koBWfto";
133
+ /**
134
+ * @internal
135
+ * Returns local test tree infos.
136
+ * V1: 2 state trees (smt/nfq/cpi pairs)
137
+ * V2: 5 batched state trees (bmt/oq/cpi triplets) + 1 address tree (amt2)
138
+ */
139
+ export declare const localTestActiveStateTreeInfos: () => TreeInfo[];
123
140
  export declare const confirmConfig: ConfirmOptions;
124
141
  export declare const DEFAULT_MERKLE_TREE_HEIGHT = 26;
125
142
  export declare const DEFAULT_MERKLE_TREE_ROOTS = 2800;
@@ -152,6 +169,10 @@ export declare const ADDRESS_QUEUE_ROLLOVER_FEE: BN;
152
169
  */
153
170
  export declare const STATE_MERKLE_TREE_NETWORK_FEE: BN;
154
171
  /**
155
- * Is charged if the transaction creates at least one address.
172
+ * Is charged per address the transaction creates.
173
+ */
174
+ export declare const ADDRESS_TREE_NETWORK_FEE_V1: BN;
175
+ /**
176
+ * Is charged per address the transaction creates.
156
177
  */
157
- export declare const ADDRESS_TREE_NETWORK_FEE: BN;
178
+ export declare const ADDRESS_TREE_NETWORK_FEE_V2: BN;