@lightprotocol/stateless.js 0.22.1-alpha.0 → 0.22.1-alpha.2
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 +4 -1
- package/dist/cjs/browser/constants.d.ts +41 -7
- package/dist/cjs/browser/index.cjs +1 -1
- package/dist/cjs/browser/index.cjs.map +1 -1
- package/dist/cjs/browser/index.d.ts +0 -1
- package/dist/cjs/browser/programs/system/pack.d.ts +10 -79
- package/dist/cjs/browser/rpc-interface.d.ts +371 -277
- package/dist/cjs/browser/rpc.d.ts +79 -12
- package/dist/cjs/browser/test-helpers/test-rpc/get-compressed-token-accounts.d.ts +0 -2
- package/dist/cjs/browser/test-helpers/test-rpc/test-rpc.d.ts +12 -6
- package/dist/cjs/browser/utils/address.d.ts +7 -19
- package/dist/cjs/browser/utils/conversion.d.ts +1 -1
- package/dist/cjs/browser/utils/get-state-tree-infos.d.ts +15 -0
- package/dist/cjs/browser/utils/index.d.ts +2 -1
- package/dist/cjs/browser/utils/instruction.d.ts +35 -0
- package/dist/cjs/browser/utils/pack-decompress.d.ts +31 -0
- package/dist/cjs/node/constants.d.ts +41 -7
- package/dist/cjs/node/index.cjs +1 -1
- package/dist/cjs/node/index.cjs.map +1 -1
- package/dist/cjs/node/index.d.ts +0 -1
- package/dist/cjs/node/programs/system/pack.d.ts +10 -79
- package/dist/cjs/node/rpc-interface.d.ts +371 -277
- package/dist/cjs/node/rpc.d.ts +79 -12
- package/dist/cjs/node/test-helpers/test-rpc/get-compressed-token-accounts.d.ts +0 -2
- package/dist/cjs/node/test-helpers/test-rpc/test-rpc.d.ts +12 -6
- package/dist/cjs/node/utils/address.d.ts +7 -19
- package/dist/cjs/node/utils/conversion.d.ts +1 -1
- package/dist/cjs/node/utils/get-state-tree-infos.d.ts +15 -0
- package/dist/cjs/node/utils/index.d.ts +2 -1
- package/dist/cjs/node/utils/instruction.d.ts +35 -0
- package/dist/cjs/node/utils/pack-decompress.d.ts +31 -0
- package/dist/es/browser/actions/compress.d.ts +18 -0
- package/dist/es/browser/actions/create-account.d.ts +38 -0
- package/dist/es/browser/actions/decompress.d.ts +15 -0
- package/dist/es/browser/actions/index.d.ts +5 -0
- package/dist/es/browser/actions/transfer.d.ts +16 -0
- package/dist/es/browser/constants.d.ts +176 -0
- package/dist/es/browser/errors.d.ts +74 -0
- package/dist/es/browser/index.d.ts +9 -0
- package/dist/es/browser/index.js +2 -0
- package/dist/es/browser/index.js.map +1 -0
- package/dist/es/browser/programs/index.d.ts +1 -0
- package/dist/es/browser/programs/system/idl.d.ts +997 -0
- package/dist/es/browser/programs/system/index.d.ts +5 -0
- package/dist/es/browser/programs/system/layout.d.ts +77 -0
- package/dist/es/browser/programs/system/pack.d.ts +74 -0
- package/dist/es/browser/programs/system/program.d.ts +175 -0
- package/dist/es/browser/programs/system/select-compressed-accounts.d.ts +10 -0
- package/dist/es/browser/rpc-interface.d.ts +2873 -0
- package/dist/es/browser/rpc.d.ts +361 -0
- package/dist/es/browser/state/BN254.d.ts +13 -0
- package/dist/es/browser/state/bn.d.ts +3 -0
- package/dist/es/browser/state/compressed-account.d.ts +205 -0
- package/dist/es/browser/state/index.d.ts +4 -0
- package/dist/es/browser/state/types.d.ts +449 -0
- package/dist/es/browser/test-helpers/index.d.ts +3 -0
- package/dist/es/browser/test-helpers/merkle-tree/index.d.ts +2 -0
- package/dist/es/browser/test-helpers/merkle-tree/indexed-array.d.ts +85 -0
- package/dist/es/browser/test-helpers/merkle-tree/merkle-tree.d.ts +92 -0
- package/dist/es/browser/test-helpers/test-rpc/get-compressed-accounts.d.ts +7 -0
- package/dist/es/browser/test-helpers/test-rpc/get-compressed-token-accounts.d.ts +38 -0
- package/dist/es/browser/test-helpers/test-rpc/get-parsed-events.d.ts +15 -0
- package/dist/es/browser/test-helpers/test-rpc/index.d.ts +3 -0
- package/dist/es/browser/test-helpers/test-rpc/test-rpc.d.ts +245 -0
- package/dist/es/browser/test-helpers/test-utils.d.ts +31 -0
- package/dist/es/browser/utils/address.d.ts +64 -0
- package/dist/es/browser/utils/airdrop.d.ts +7 -0
- package/dist/es/browser/utils/calculate-compute-unit-price.d.ts +7 -0
- package/dist/es/browser/utils/conversion.d.ts +36 -0
- package/dist/es/browser/utils/dedupe-signer.d.ts +3 -0
- package/dist/es/browser/utils/get-state-tree-infos.d.ts +63 -0
- package/dist/es/browser/utils/index.d.ts +14 -0
- package/dist/es/browser/utils/instruction.d.ts +35 -0
- package/dist/es/browser/utils/pack-decompress.d.ts +31 -0
- package/dist/es/browser/utils/parse-validity-proof.d.ts +20 -0
- package/dist/es/browser/utils/pipe.d.ts +2 -0
- package/dist/es/browser/utils/send-and-confirm.d.ts +52 -0
- package/dist/es/browser/utils/sleep.d.ts +1 -0
- package/dist/es/browser/utils/state-tree-lookup-table.d.ts +68 -0
- package/dist/es/browser/utils/validation.d.ts +8 -0
- package/dist/types/index.d.ts +340 -661
- package/package.json +18 -10
- package/dist/cjs/browser/compressible/action.d.ts +0 -77
- package/dist/cjs/browser/compressible/index.d.ts +0 -13
- package/dist/cjs/browser/compressible/instruction.d.ts +0 -177
- package/dist/cjs/browser/compressible/layout.d.ts +0 -47
- package/dist/cjs/browser/compressible/types.d.ts +0 -112
- package/dist/cjs/browser/compressible/utils.d.ts +0 -16
- package/dist/cjs/browser/utils/packed-accounts.d.ts +0 -161
- package/dist/cjs/node/compressible/action.d.ts +0 -77
- package/dist/cjs/node/compressible/index.d.ts +0 -13
- package/dist/cjs/node/compressible/instruction.d.ts +0 -177
- package/dist/cjs/node/compressible/layout.d.ts +0 -47
- package/dist/cjs/node/compressible/types.d.ts +0 -112
- package/dist/cjs/node/compressible/utils.d.ts +0 -16
- package/dist/cjs/node/utils/packed-accounts.d.ts +0 -161
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
|
|
|
@@ -61,10 +61,24 @@ export declare const isLocalTest: (url: string) => boolean;
|
|
|
61
61
|
* @internal
|
|
62
62
|
*/
|
|
63
63
|
export declare const localTestActiveStateTreeInfos: () => TreeInfo[];
|
|
64
|
+
export declare const getDefaultAddressSpace: () => {
|
|
65
|
+
tree: PublicKey;
|
|
66
|
+
queue: PublicKey;
|
|
67
|
+
cpiContext: undefined;
|
|
68
|
+
treeType: TreeType;
|
|
69
|
+
nextTreeInfo: null;
|
|
70
|
+
};
|
|
64
71
|
export declare const getDefaultAddressTreeInfo: () => {
|
|
65
72
|
tree: PublicKey;
|
|
66
73
|
queue: PublicKey;
|
|
67
|
-
cpiContext:
|
|
74
|
+
cpiContext: undefined;
|
|
75
|
+
treeType: TreeType;
|
|
76
|
+
nextTreeInfo: null;
|
|
77
|
+
};
|
|
78
|
+
export declare const getBatchAddressTreeInfo: () => {
|
|
79
|
+
tree: PublicKey;
|
|
80
|
+
queue: PublicKey;
|
|
81
|
+
cpiContext: undefined;
|
|
68
82
|
treeType: TreeType;
|
|
69
83
|
nextTreeInfo: null;
|
|
70
84
|
};
|
|
@@ -89,6 +103,7 @@ export declare const defaultTestStateTreeAccounts2: () => {
|
|
|
89
103
|
merkleTree2: PublicKey;
|
|
90
104
|
};
|
|
91
105
|
export declare const COMPRESSED_TOKEN_PROGRAM_ID: PublicKey;
|
|
106
|
+
export declare const CTOKEN_PROGRAM_ID: PublicKey;
|
|
92
107
|
export declare const stateTreeLookupTableMainnet = "7i86eQs3GSqHjN47WdWLTCGMW6gde1q96G2EVnUyK2st";
|
|
93
108
|
export declare const nullifiedStateTreeLookupTableMainnet = "H9QD4u1fG7KmkAzn2tDXhheushxFe1EcrjGGyEFXeMqT";
|
|
94
109
|
export declare const stateTreeLookupTableDevnet = "Dk9mNkbiZXJZ4By8DfSP6HEE4ojZzRvucwpawLeuwq8q";
|
|
@@ -98,13 +113,28 @@ export declare const cpiContextPubkey = "cpi1uHzrEhBG733DoEJNgHCyRS3XmmyVNZx5fon
|
|
|
98
113
|
export declare const merkletreePubkey = "smt1NamzXdq4AMqS2fS2F1i5KTYPZRhoHgWx38d8WsT";
|
|
99
114
|
export declare const addressTree = "amt1Ayt45jfbdw5YSo7iz6WZxUmnZsQTYXy82hVwyC2";
|
|
100
115
|
export declare const addressQueue = "aq1S9z4reTSQAdgWHGD2zDaS39sjGrAxbR31vxJ2F4F";
|
|
101
|
-
export declare const addressTreeV2: PublicKey;
|
|
102
116
|
export declare const merkleTree2Pubkey = "smt2rJAFdyJJupwMKAqTNAJwvjhmiZ4JYGZmbVRw1Ho";
|
|
103
117
|
export declare const nullifierQueue2Pubkey = "nfq2hgS7NYemXsFaFUCe3EMXSDSfnZnAe27jC6aPP1X";
|
|
104
118
|
export declare const cpiContext2Pubkey = "cpi2cdhkH5roePvcudTgUL8ppEBfTay1desGh8G8QxK";
|
|
105
|
-
export declare const
|
|
106
|
-
export declare const
|
|
107
|
-
export declare const
|
|
119
|
+
export declare const batchMerkleTree1 = "bmt1LryLZUMmF7ZtqESaw7wifBXLfXHQYoE4GAmrahU";
|
|
120
|
+
export declare const batchQueue1 = "oq1na8gojfdUhsfCpyjNt6h4JaDWtHf1yQj4koBWfto";
|
|
121
|
+
export declare const batchCpiContext1 = "cpi15BoVPKgEPw5o8wc2T816GE7b378nMXnhH3Xbq4y";
|
|
122
|
+
export declare const batchMerkleTree2 = "bmt2UxoBxB9xWev4BkLvkGdapsz6sZGkzViPNph7VFi";
|
|
123
|
+
export declare const batchQueue2 = "oq2UkeMsJLfXt2QHzim242SUi3nvjJs8Pn7Eac9H9vg";
|
|
124
|
+
export declare const batchCpiContext2 = "cpi2yGapXUR3As5SjnHBAVvmApNiLsbeZpF3euWnW6B";
|
|
125
|
+
export declare const batchMerkleTree3 = "bmt3ccLd4bqSVZVeCJnH1F6C8jNygAhaDfxDwePyyGb";
|
|
126
|
+
export declare const batchQueue3 = "oq3AxjekBWgo64gpauB6QtuZNesuv19xrhaC1ZM1THQ";
|
|
127
|
+
export declare const batchCpiContext3 = "cpi3mbwMpSX8FAGMZVP85AwxqCaQMfEk9Em1v8QK9Rf";
|
|
128
|
+
export declare const batchMerkleTree4 = "bmt4d3p1a4YQgk9PeZv5s4DBUmbF5NxqYpk9HGjQsd8";
|
|
129
|
+
export declare const batchQueue4 = "oq4ypwvVGzCUMoiKKHWh4S1SgZJ9vCvKpcz6RT6A8dq";
|
|
130
|
+
export declare const batchCpiContext4 = "cpi4yyPDc4bCgHAnsenunGA8Y77j3XEDyjgfyCKgcoc";
|
|
131
|
+
export declare const batchMerkleTree5 = "bmt5yU97jC88YXTuSukYHa8Z5Bi2ZDUtmzfkDTA2mG2";
|
|
132
|
+
export declare const batchQueue5 = "oq5oh5ZR3yGomuQgFduNDzjtGvVWfDRGLuDVjv9a96P";
|
|
133
|
+
export declare const batchCpiContext5 = "cpi5ZTjdgYpZ1Xr7B1cMLLUE81oTtJbNNAyKary2nV6";
|
|
134
|
+
export declare const batchAddressTree = "amt2kaJA14v3urZbZvnc5v2np8jqvc4Z8zDep5wbtzx";
|
|
135
|
+
export declare const testBatchAddressTree = "EzKE84aVTkCUhDHLELqyJaq1Y7UVVmqxXqZjVHwHY3rK";
|
|
136
|
+
export declare const batchMerkleTree = "bmt1LryLZUMmF7ZtqESaw7wifBXLfXHQYoE4GAmrahU";
|
|
137
|
+
export declare const batchQueue = "oq1na8gojfdUhsfCpyjNt6h4JaDWtHf1yQj4koBWfto";
|
|
108
138
|
export declare const confirmConfig: ConfirmOptions;
|
|
109
139
|
export declare const DEFAULT_MERKLE_TREE_HEIGHT = 26;
|
|
110
140
|
export declare const DEFAULT_MERKLE_TREE_ROOTS = 2800;
|
|
@@ -137,6 +167,10 @@ export declare const ADDRESS_QUEUE_ROLLOVER_FEE: BN;
|
|
|
137
167
|
*/
|
|
138
168
|
export declare const STATE_MERKLE_TREE_NETWORK_FEE: BN;
|
|
139
169
|
/**
|
|
140
|
-
* Is charged
|
|
170
|
+
* Is charged per address the transaction creates.
|
|
171
|
+
*/
|
|
172
|
+
export declare const ADDRESS_TREE_NETWORK_FEE_V1: BN;
|
|
173
|
+
/**
|
|
174
|
+
* Is charged per address the transaction creates.
|
|
141
175
|
*/
|
|
142
|
-
export declare const
|
|
176
|
+
export declare const ADDRESS_TREE_NETWORK_FEE_V2: BN;
|