@lightprotocol/stateless.js 0.19.0 → 0.20.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/README.md +1 -1
- package/dist/cjs/browser/constants.d.ts +33 -16
- package/dist/cjs/browser/index.cjs +1 -1
- package/dist/cjs/browser/index.cjs.map +1 -1
- package/dist/cjs/browser/index.d.ts +1 -0
- package/dist/cjs/browser/logger.d.ts +1 -0
- package/dist/cjs/browser/programs/layout.d.ts +17 -1
- package/dist/cjs/browser/rpc-interface.d.ts +109 -109
- package/dist/cjs/browser/rpc.d.ts +8 -9
- package/dist/cjs/browser/state/types.d.ts +39 -0
- package/dist/cjs/browser/test-helpers/test-rpc/get-parsed-events.d.ts +3 -1
- package/dist/cjs/browser/test-helpers/test-rpc/test-rpc.d.ts +5 -6
- package/dist/cjs/browser/utils/get-light-state-tree-info.d.ts +11 -9
- package/dist/cjs/node/constants.d.ts +33 -16
- package/dist/cjs/node/index.cjs +1 -1
- package/dist/cjs/node/index.cjs.map +1 -1
- package/dist/cjs/node/index.d.ts +1 -0
- package/dist/cjs/node/logger.d.ts +1 -0
- package/dist/cjs/node/programs/layout.d.ts +17 -1
- package/dist/cjs/node/rpc-interface.d.ts +109 -109
- package/dist/cjs/node/rpc.d.ts +8 -9
- package/dist/cjs/node/state/types.d.ts +39 -0
- package/dist/cjs/node/test-helpers/test-rpc/get-parsed-events.d.ts +3 -1
- package/dist/cjs/node/test-helpers/test-rpc/test-rpc.d.ts +5 -6
- package/dist/cjs/node/utils/get-light-state-tree-info.d.ts +11 -9
- package/dist/types/index.d.ts +116 -43
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -58,7 +58,7 @@ We provide `index.js.map` for debugging. Exclude in production:
|
|
|
58
58
|
Light and ZK Compression are open source protocols and very much welcome contributions. If you have a contribution, do not hesitate to send a PR to the respective repository or discuss in the linked developer Discord servers.
|
|
59
59
|
|
|
60
60
|
- 🐞 For bugs or feature requests, please open an
|
|
61
|
-
[issue](https://github.com/lightprotocol/
|
|
61
|
+
[issue](https://github.com/lightprotocol/light-protocol/issues/new).
|
|
62
62
|
- 🔒 For security vulnerabilities, please follow the [security policy](https://github.com/Lightprotocol/light-protocol/blob/main/SECURITY.md).
|
|
63
63
|
|
|
64
64
|
## Additional Resources
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import BN from 'bn.js';
|
|
2
2
|
import { Buffer } from 'buffer';
|
|
3
3
|
import { ConfirmOptions, PublicKey } from '@solana/web3.js';
|
|
4
|
+
import { ActiveTreeBundle } from './state/types';
|
|
4
5
|
export declare const FIELD_SIZE: BN;
|
|
5
6
|
export declare const HIGHEST_ADDRESS_PLUS_ONE: BN;
|
|
7
|
+
export declare const COMPUTE_BUDGET_PATTERN: number[];
|
|
6
8
|
export declare const INVOKE_DISCRIMINATOR: Buffer;
|
|
9
|
+
export declare const INVOKE_CPI_DISCRIMINATOR: Buffer;
|
|
10
|
+
export declare const INSERT_INTO_QUEUES_DISCRIMINATOR: Buffer;
|
|
7
11
|
export declare const noopProgram = "noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV";
|
|
8
12
|
export declare const lightProgram = "SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7";
|
|
9
13
|
export declare const accountCompressionProgram = "compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq";
|
|
@@ -17,21 +21,29 @@ export declare const defaultStaticAccountsStruct: () => {
|
|
|
17
21
|
accountCompressionAuthority: PublicKey;
|
|
18
22
|
cpiSignatureAccount: null;
|
|
19
23
|
};
|
|
24
|
+
export type StateTreeLUTPair = {
|
|
25
|
+
stateTreeLookupTable: PublicKey;
|
|
26
|
+
nullifyTable: PublicKey;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Returns the Default Public State Tree LUTs for Devnet and Mainnet-Beta.
|
|
30
|
+
*/
|
|
20
31
|
export declare const defaultStateTreeLookupTables: () => {
|
|
21
|
-
mainnet:
|
|
22
|
-
|
|
23
|
-
nullifyTable: PublicKey;
|
|
24
|
-
};
|
|
25
|
-
devnet: {
|
|
26
|
-
stateTreeLookupTable: PublicKey;
|
|
27
|
-
nullifyTable: PublicKey;
|
|
28
|
-
};
|
|
32
|
+
mainnet: StateTreeLUTPair[];
|
|
33
|
+
devnet: StateTreeLUTPair[];
|
|
29
34
|
};
|
|
35
|
+
/**
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
30
38
|
export declare const isLocalTest: (url: string) => boolean;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
39
|
+
/**
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
export declare const localTestActiveStateTreeInfo: () => ActiveTreeBundle[];
|
|
43
|
+
/**
|
|
44
|
+
* Use only with Localnet testing.
|
|
45
|
+
* For public networks, fetch via {@link defaultStateTreeLookupTables} and {@link getLightStateTreeInfo}.
|
|
46
|
+
*/
|
|
35
47
|
export declare const defaultTestStateTreeAccounts: () => {
|
|
36
48
|
nullifierQueue: PublicKey;
|
|
37
49
|
merkleTree: PublicKey;
|
|
@@ -39,20 +51,25 @@ export declare const defaultTestStateTreeAccounts: () => {
|
|
|
39
51
|
addressTree: PublicKey;
|
|
40
52
|
addressQueue: PublicKey;
|
|
41
53
|
};
|
|
54
|
+
/**
|
|
55
|
+
* @internal testing only
|
|
56
|
+
*/
|
|
42
57
|
export declare const defaultTestStateTreeAccounts2: () => {
|
|
43
58
|
nullifierQueue2: PublicKey;
|
|
44
59
|
merkleTree2: PublicKey;
|
|
45
60
|
};
|
|
46
|
-
export declare const stateTreeLookupTableMainnet = "
|
|
47
|
-
export declare const nullifiedStateTreeLookupTableMainnet = "
|
|
48
|
-
export declare const stateTreeLookupTableDevnet = "
|
|
49
|
-
export declare const nullifiedStateTreeLookupTableDevnet = "
|
|
61
|
+
export declare const stateTreeLookupTableMainnet = "7i86eQs3GSqHjN47WdWLTCGMW6gde1q96G2EVnUyK2st";
|
|
62
|
+
export declare const nullifiedStateTreeLookupTableMainnet = "H9QD4u1fG7KmkAzn2tDXhheushxFe1EcrjGGyEFXeMqT";
|
|
63
|
+
export declare const stateTreeLookupTableDevnet = "8n8rH2bFRVA6cSGNDpgqcKHCndbFCT1bXxAQG89ejVsh";
|
|
64
|
+
export declare const nullifiedStateTreeLookupTableDevnet = "5dhaJLBjnVBQFErr8oiCJmcVsx3Zj6xDekGB2zULPsnP";
|
|
50
65
|
export declare const nullifierQueuePubkey = "nfq1NvQDJ2GEgnS8zt9prAe8rjjpAW1zFkrvZoBR148";
|
|
66
|
+
export declare const cpiContextPubkey = "cpi1uHzrEhBG733DoEJNgHCyRS3XmmyVNZx5fonubE4";
|
|
51
67
|
export declare const merkletreePubkey = "smt1NamzXdq4AMqS2fS2F1i5KTYPZRhoHgWx38d8WsT";
|
|
52
68
|
export declare const addressTree = "amt1Ayt45jfbdw5YSo7iz6WZxUmnZsQTYXy82hVwyC2";
|
|
53
69
|
export declare const addressQueue = "aq1S9z4reTSQAdgWHGD2zDaS39sjGrAxbR31vxJ2F4F";
|
|
54
70
|
export declare const merkleTree2Pubkey = "smt2rJAFdyJJupwMKAqTNAJwvjhmiZ4JYGZmbVRw1Ho";
|
|
55
71
|
export declare const nullifierQueue2Pubkey = "nfq2hgS7NYemXsFaFUCe3EMXSDSfnZnAe27jC6aPP1X";
|
|
72
|
+
export declare const cpiContext2Pubkey = "cpi2cdhkH5roePvcudTgUL8ppEBfTay1desGh8G8QxK";
|
|
56
73
|
export declare const confirmConfig: ConfirmOptions;
|
|
57
74
|
export declare const DEFAULT_MERKLE_TREE_HEIGHT = 26;
|
|
58
75
|
export declare const DEFAULT_MERKLE_TREE_ROOTS = 2800;
|