@lightprotocol/stateless.js 0.20.0 → 0.20.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 +1 -1
- package/dist/cjs/browser/constants.d.ts +3 -0
- 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.d.ts +6 -0
- package/dist/cjs/browser/state/types.d.ts +15 -0
- package/dist/cjs/browser/test-helpers/test-rpc/get-parsed-events.d.ts +3 -1
- package/dist/cjs/node/constants.d.ts +3 -0
- 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.d.ts +6 -0
- package/dist/cjs/node/state/types.d.ts +15 -0
- package/dist/cjs/node/test-helpers/test-rpc/get-parsed-events.d.ts +3 -1
- package/dist/types/index.d.ts +46 -3
- package/package.json +6 -2
package/dist/cjs/node/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const logger: any;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { Buffer } from 'buffer';
|
|
2
2
|
import { PublicKey, AccountMeta } from '@solana/web3.js';
|
|
3
3
|
import { Layout } from '@coral-xyz/borsh';
|
|
4
|
-
import { InstructionDataInvoke, PublicTransactionEvent } from '../state';
|
|
4
|
+
import { InstructionDataInvoke, InstructionDataInvokeCpi, PublicTransactionEvent } from '../state';
|
|
5
5
|
export declare const CompressedAccountLayout: import("buffer-layout").Layout<unknown>;
|
|
6
6
|
export declare const MerkleContextLayout: import("buffer-layout").Layout<unknown>;
|
|
7
7
|
export declare const NewAddressParamsLayout: import("buffer-layout").Layout<unknown>;
|
|
8
8
|
export declare const InstructionDataInvokeLayout: Layout<InstructionDataInvoke>;
|
|
9
9
|
export declare function encodeInstructionDataInvoke(data: InstructionDataInvoke): Buffer;
|
|
10
|
+
export declare const InstructionDataInvokeCpiLayout: Layout<InstructionDataInvokeCpi>;
|
|
10
11
|
export declare function decodeInstructionDataInvoke(buffer: Buffer): InstructionDataInvoke;
|
|
12
|
+
export declare function decodeInstructionDataInvokeCpi(buffer: Buffer): InstructionDataInvokeCpi;
|
|
11
13
|
export type invokeAccountsLayoutParams = {
|
|
12
14
|
feePayer: PublicKey;
|
|
13
15
|
authority: PublicKey;
|
|
@@ -23,3 +25,17 @@ export declare const invokeAccountsLayout: (accounts: invokeAccountsLayoutParams
|
|
|
23
25
|
export declare const PublicTransactionEventLayout: Layout<PublicTransactionEvent>;
|
|
24
26
|
export declare function encodePublicTransactionEvent(data: PublicTransactionEvent): Buffer;
|
|
25
27
|
export declare function decodePublicTransactionEvent(buffer: Buffer): PublicTransactionEvent;
|
|
28
|
+
export declare const AppendNullifyCreateAddressInputsMetaLayout: import("buffer-layout").Layout<unknown>;
|
|
29
|
+
export declare const AppendLeavesInputLayout: import("buffer-layout").Layout<unknown>;
|
|
30
|
+
export declare const InsertNullifierInputLayout: import("buffer-layout").Layout<unknown>;
|
|
31
|
+
export declare const InsertAddressInputLayout: import("buffer-layout").Layout<unknown>;
|
|
32
|
+
export declare const MerkleTreeSequenceNumberLayout: import("buffer-layout").Layout<unknown>;
|
|
33
|
+
export declare function deserializeAppendNullifyCreateAddressInputsIndexer(buffer: Buffer): {
|
|
34
|
+
meta: unknown;
|
|
35
|
+
leaves: unknown[];
|
|
36
|
+
nullifiers: unknown[];
|
|
37
|
+
addresses: unknown[];
|
|
38
|
+
sequence_numbers: unknown[];
|
|
39
|
+
output_leaf_indices: number[];
|
|
40
|
+
};
|
|
41
|
+
export declare function convertToPublicTransactionEvent(decoded: any, remainingAccounts: PublicKey[], invokeData: InstructionDataInvoke): PublicTransactionEvent;
|
package/dist/cjs/node/rpc.d.ts
CHANGED
|
@@ -26,6 +26,12 @@ export declare function parseAccountData({ discriminator, data, dataHash, }: {
|
|
|
26
26
|
* @param connectionConfig Optional connection config
|
|
27
27
|
*/
|
|
28
28
|
export declare function createRpc(endpointOrWeb3JsConnection?: string | Connection, compressionApiEndpoint?: string, proverEndpoint?: string, config?: ConnectionConfig): Rpc;
|
|
29
|
+
/**
|
|
30
|
+
* Helper function to preprocess the response to wrap numbers as strings
|
|
31
|
+
* @param {string} text - The JSON string to preprocess
|
|
32
|
+
* @returns {string} - The preprocessed JSON string with numbers wrapped as strings
|
|
33
|
+
*/
|
|
34
|
+
export declare function wrapBigNumbersAsStrings(text: string): string;
|
|
29
35
|
/** @internal */
|
|
30
36
|
export declare const rpcRequest: (rpcEndpoint: string, method: string, params?: any, convertToCamelCase?: boolean, debug?: boolean) => Promise<any>;
|
|
31
37
|
/** @internal */
|
|
@@ -97,6 +97,21 @@ export interface InstructionDataInvoke {
|
|
|
97
97
|
compressOrDecompressLamports: BN | null;
|
|
98
98
|
isCompress: boolean;
|
|
99
99
|
}
|
|
100
|
+
export interface InstructionDataInvokeCpi {
|
|
101
|
+
proof: CompressedProof | null;
|
|
102
|
+
inputCompressedAccountsWithMerkleContext: PackedCompressedAccountWithMerkleContext[];
|
|
103
|
+
outputCompressedAccounts: OutputCompressedAccountWithPackedContext[];
|
|
104
|
+
relayFee: BN | null;
|
|
105
|
+
newAddressParams: NewAddressParamsPacked[];
|
|
106
|
+
compressOrDecompressLamports: BN | null;
|
|
107
|
+
isCompress: boolean;
|
|
108
|
+
compressedCpiContext: CompressedCpiContext | null;
|
|
109
|
+
}
|
|
110
|
+
export interface CompressedCpiContext {
|
|
111
|
+
set_context: boolean;
|
|
112
|
+
first_set_context: boolean;
|
|
113
|
+
cpi_context_account_index: number;
|
|
114
|
+
}
|
|
100
115
|
export interface CompressedProof {
|
|
101
116
|
a: number[];
|
|
102
117
|
b: number[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ParsedTransactionWithMeta } from '@solana/web3.js';
|
|
1
|
+
import { ParsedTransactionWithMeta, PublicKey } from '@solana/web3.js';
|
|
2
2
|
import { Rpc } from '../../rpc';
|
|
3
3
|
import { PublicTransactionEvent } from '../../state';
|
|
4
|
+
import { Buffer } from 'buffer';
|
|
4
5
|
type Deserializer<T> = (data: Buffer, tx: ParsedTransactionWithMeta) => T;
|
|
5
6
|
/**
|
|
6
7
|
* @internal
|
|
@@ -10,4 +11,5 @@ type Deserializer<T> = (data: Buffer, tx: ParsedTransactionWithMeta) => T;
|
|
|
10
11
|
export declare function getParsedEvents(rpc: Rpc): Promise<PublicTransactionEvent[]>;
|
|
11
12
|
export declare const parseEvents: <T>(indexerEventsTransactions: (ParsedTransactionWithMeta | null)[], deserializeFn: Deserializer<T>) => NonNullable<T>[];
|
|
12
13
|
export declare const parsePublicTransactionEventWithIdl: (data: Buffer) => PublicTransactionEvent | null;
|
|
14
|
+
export declare function parseLightTransaction(dataVec: Uint8Array[], accountKeys: PublicKey[][]): PublicTransactionEvent | null | undefined;
|
|
13
15
|
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -374,6 +374,21 @@ interface InstructionDataInvoke {
|
|
|
374
374
|
compressOrDecompressLamports: BN | null;
|
|
375
375
|
isCompress: boolean;
|
|
376
376
|
}
|
|
377
|
+
interface InstructionDataInvokeCpi {
|
|
378
|
+
proof: CompressedProof | null;
|
|
379
|
+
inputCompressedAccountsWithMerkleContext: PackedCompressedAccountWithMerkleContext[];
|
|
380
|
+
outputCompressedAccounts: OutputCompressedAccountWithPackedContext[];
|
|
381
|
+
relayFee: BN | null;
|
|
382
|
+
newAddressParams: NewAddressParamsPacked[];
|
|
383
|
+
compressOrDecompressLamports: BN | null;
|
|
384
|
+
isCompress: boolean;
|
|
385
|
+
compressedCpiContext: CompressedCpiContext | null;
|
|
386
|
+
}
|
|
387
|
+
interface CompressedCpiContext {
|
|
388
|
+
set_context: boolean;
|
|
389
|
+
first_set_context: boolean;
|
|
390
|
+
cpi_context_account_index: number;
|
|
391
|
+
}
|
|
377
392
|
interface CompressedProof {
|
|
378
393
|
a: number[];
|
|
379
394
|
b: number[];
|
|
@@ -2026,7 +2041,7 @@ declare class MerkleTree {
|
|
|
2026
2041
|
static deserialize(data: any, hashFunction: (left: string, right: string) => string): any;
|
|
2027
2042
|
}
|
|
2028
2043
|
|
|
2029
|
-
type Deserializer<T> = (data: Buffer, tx: ParsedTransactionWithMeta) => T;
|
|
2044
|
+
type Deserializer<T> = (data: Buffer$1, tx: ParsedTransactionWithMeta) => T;
|
|
2030
2045
|
/**
|
|
2031
2046
|
* @internal
|
|
2032
2047
|
* Returns newest first.
|
|
@@ -2034,7 +2049,8 @@ type Deserializer<T> = (data: Buffer, tx: ParsedTransactionWithMeta) => T;
|
|
|
2034
2049
|
* */
|
|
2035
2050
|
declare function getParsedEvents(rpc: Rpc): Promise<PublicTransactionEvent[]>;
|
|
2036
2051
|
declare const parseEvents: <T>(indexerEventsTransactions: (ParsedTransactionWithMeta | null)[], deserializeFn: Deserializer<T>) => NonNullable<T>[];
|
|
2037
|
-
declare const parsePublicTransactionEventWithIdl: (data: Buffer) => PublicTransactionEvent | null;
|
|
2052
|
+
declare const parsePublicTransactionEventWithIdl: (data: Buffer$1) => PublicTransactionEvent | null;
|
|
2053
|
+
declare function parseLightTransaction(dataVec: Uint8Array[], accountKeys: PublicKey[][]): PublicTransactionEvent | null | undefined;
|
|
2038
2054
|
|
|
2039
2055
|
type TokenData = {
|
|
2040
2056
|
mint: PublicKey;
|
|
@@ -2121,6 +2137,12 @@ declare function parseAccountData({ discriminator, data, dataHash, }: {
|
|
|
2121
2137
|
* @param connectionConfig Optional connection config
|
|
2122
2138
|
*/
|
|
2123
2139
|
declare function createRpc(endpointOrWeb3JsConnection?: string | Connection, compressionApiEndpoint?: string, proverEndpoint?: string, config?: ConnectionConfig): Rpc;
|
|
2140
|
+
/**
|
|
2141
|
+
* Helper function to preprocess the response to wrap numbers as strings
|
|
2142
|
+
* @param {string} text - The JSON string to preprocess
|
|
2143
|
+
* @returns {string} - The preprocessed JSON string with numbers wrapped as strings
|
|
2144
|
+
*/
|
|
2145
|
+
declare function wrapBigNumbersAsStrings(text: string): string;
|
|
2124
2146
|
/** @internal */
|
|
2125
2147
|
declare const rpcRequest: (rpcEndpoint: string, method: string, params?: any, convertToCamelCase?: boolean, debug?: boolean) => Promise<any>;
|
|
2126
2148
|
/** @internal */
|
|
@@ -2745,7 +2767,9 @@ declare const MerkleContextLayout: buffer_layout.Layout<unknown>;
|
|
|
2745
2767
|
declare const NewAddressParamsLayout: buffer_layout.Layout<unknown>;
|
|
2746
2768
|
declare const InstructionDataInvokeLayout: Layout<InstructionDataInvoke>;
|
|
2747
2769
|
declare function encodeInstructionDataInvoke(data: InstructionDataInvoke): Buffer$1;
|
|
2770
|
+
declare const InstructionDataInvokeCpiLayout: Layout<InstructionDataInvokeCpi>;
|
|
2748
2771
|
declare function decodeInstructionDataInvoke(buffer: Buffer$1): InstructionDataInvoke;
|
|
2772
|
+
declare function decodeInstructionDataInvokeCpi(buffer: Buffer$1): InstructionDataInvokeCpi;
|
|
2749
2773
|
type invokeAccountsLayoutParams = {
|
|
2750
2774
|
feePayer: PublicKey;
|
|
2751
2775
|
authority: PublicKey;
|
|
@@ -2761,10 +2785,27 @@ declare const invokeAccountsLayout: (accounts: invokeAccountsLayoutParams) => Ac
|
|
|
2761
2785
|
declare const PublicTransactionEventLayout: Layout<PublicTransactionEvent>;
|
|
2762
2786
|
declare function encodePublicTransactionEvent(data: PublicTransactionEvent): Buffer$1;
|
|
2763
2787
|
declare function decodePublicTransactionEvent(buffer: Buffer$1): PublicTransactionEvent;
|
|
2788
|
+
declare const AppendNullifyCreateAddressInputsMetaLayout: buffer_layout.Layout<unknown>;
|
|
2789
|
+
declare const AppendLeavesInputLayout: buffer_layout.Layout<unknown>;
|
|
2790
|
+
declare const InsertNullifierInputLayout: buffer_layout.Layout<unknown>;
|
|
2791
|
+
declare const InsertAddressInputLayout: buffer_layout.Layout<unknown>;
|
|
2792
|
+
declare const MerkleTreeSequenceNumberLayout: buffer_layout.Layout<unknown>;
|
|
2793
|
+
declare function deserializeAppendNullifyCreateAddressInputsIndexer(buffer: Buffer$1): {
|
|
2794
|
+
meta: unknown;
|
|
2795
|
+
leaves: unknown[];
|
|
2796
|
+
nullifiers: unknown[];
|
|
2797
|
+
addresses: unknown[];
|
|
2798
|
+
sequence_numbers: unknown[];
|
|
2799
|
+
output_leaf_indices: number[];
|
|
2800
|
+
};
|
|
2801
|
+
declare function convertToPublicTransactionEvent(decoded: any, remainingAccounts: PublicKey[], invokeData: InstructionDataInvoke): PublicTransactionEvent;
|
|
2764
2802
|
|
|
2765
2803
|
declare const FIELD_SIZE: BN;
|
|
2766
2804
|
declare const HIGHEST_ADDRESS_PLUS_ONE: BN;
|
|
2805
|
+
declare const COMPUTE_BUDGET_PATTERN: number[];
|
|
2767
2806
|
declare const INVOKE_DISCRIMINATOR: Buffer$1;
|
|
2807
|
+
declare const INVOKE_CPI_DISCRIMINATOR: Buffer$1;
|
|
2808
|
+
declare const INSERT_INTO_QUEUES_DISCRIMINATOR: Buffer$1;
|
|
2768
2809
|
declare const noopProgram = "noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV";
|
|
2769
2810
|
declare const lightProgram = "SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7";
|
|
2770
2811
|
declare const accountCompressionProgram = "compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq";
|
|
@@ -3957,4 +3998,6 @@ type LightSystemProgram = {
|
|
|
3957
3998
|
};
|
|
3958
3999
|
declare const IDL: LightSystemProgram;
|
|
3959
4000
|
|
|
3960
|
-
|
|
4001
|
+
declare const logger: any;
|
|
4002
|
+
|
|
4003
|
+
export { ADDRESS_QUEUE_ROLLOVER_FEE, ADDRESS_TREE_NETWORK_FEE, ALICE, AccountProofResult, type ActiveTreeBundle, type AddressWithTree, AppendLeavesInputLayout, AppendNullifyCreateAddressInputsMetaLayout, type BN254, BOB, BalanceResult, CHARLIE, COMPUTE_BUDGET_PATTERN, type ClientSubscriptionId, type CompressedAccount, type CompressedAccountData, CompressedAccountLayout, CompressedAccountResult, type CompressedAccountWithMerkleContext, CompressedAccountsByOwnerResult, type CompressedCpiContext, type CompressedMintTokenHolders, CompressedMintTokenHoldersResult, type CompressedProof, type CompressedProofWithContext, CompressedTokenAccountResult, CompressedTokenAccountsByOwnerOrDelegateResult, type CompressedTransaction, CompressedTransactionResult, type CompressionApiInterface, CreateUtxoError, CreateUtxoErrorCode, DAVE, DEFAULT_MERKLE_TREE_HEIGHT, DEFAULT_MERKLE_TREE_ROOTS, DEFAULT_ZERO, type EventWithParsedTokenTlvData, FIELD_SIZE, type GetCompressedAccountConfig, type GetCompressedAccountsByOwnerConfig, type GetCompressedAccountsConfig, type GetCompressedAccountsFilter, type GetCompressedTokenAccountsByOwnerOrDelegateOptions, HIGHEST_ADDRESS_PLUS_ONE, HashError, HashErrorCode, type HashWithTree, HealthResult, type HexBatchInputsForProver, type HexInputsForProver, IDL, INSERT_INTO_QUEUES_DISCRIMINATOR, INVOKE_CPI_DISCRIMINATOR, INVOKE_DISCRIMINATOR, IndexedArray, IndexedElement, IndexedElementBundle, type InputTokenDataWithContext, InsertAddressInputLayout, InsertNullifierInputLayout, type InstructionDataInvoke, type InstructionDataInvokeCpi, InstructionDataInvokeCpiLayout, InstructionDataInvokeLayout, type LatestNonVotingSignatures, type LatestNonVotingSignaturesPaginated, LatestNonVotingSignaturesResult, LatestNonVotingSignaturesResultPaginated, LightSystemProgram$1 as LightSystemProgram, type LightSystemProgram as LightSystemProgramIDL, type LightWasm, LookupTableError, LookupTableErrorCode, MerkeProofResult, type MerkleContext, MerkleContextLayout, type MerkleContextWithMerkleProof, type MerkleContextWithNewAddressProof, MerkleTree, MerkleTreeError, MerkleTreeErrorCode, type MerkleTreeSequenceNumber, MerkleTreeSequenceNumberLayout, MultipleCompressedAccountsResult, MultipleMerkleProofsResult, NativeBalanceResult, type NewAddressParams, NewAddressParamsLayout, type NewAddressParamsPacked, NewAddressProofResult, type NonInclusionJsonStruct, type NonInclusionMerkleProofInputs, type OutputCompressedAccountWithPackedContext, type PackedCompressedAccountWithMerkleContext, type PackedMerkleContext, type PaginatedOptions, type ParsedTokenAccount, ProofError, ProofErrorCode, type PublicTransactionEvent, PublicTransactionEventLayout, type QueueIndex, Rpc, RpcError, RpcErrorCode, type RpcResult, type RpcResultError, type RpcResultSuccess, STATE_MERKLE_TREE_NETWORK_FEE, STATE_MERKLE_TREE_ROLLOVER_FEE, SelectInUtxosError, SelectInUtxosErrorCode, SignatureListResult, SignatureListWithCursorResult, type SignatureWithMetadata, SlotResult, type StateTreeLUTPair, TRANSACTION_MERKLE_TREE_ROLLOVER_THRESHOLD, TestRpc, type TestRpcConfig, type TokenBalance, TokenBalanceListResult, TokenBalanceListResultV2, TokenBalanceResult, type TokenData$1 as TokenData, TokenDataLayout, TokenDataResult, TreeType, UTXO_MERGE_MAXIMUM, UTXO_MERGE_THRESHOLD, UtilsError, UtilsErrorCode, UtxoError, UtxoErrorCode, ValidityProofResult, type WithContext, type WithCursor, type WithRpcContext, accountCompressionProgram, addressQueue, addressTree, airdropSol, bn, bufToDecStr, buildAndSignTx, buildTx, byteArrayToKeypair, calculateComputeUnitPrice, checkValidityProofShape, compress, confirmConfig, confirmTransaction, confirmTx, convertMerkleProofsWithContextToHex, convertNonInclusionMerkleProofInputsToHex, convertToPublicTransactionEvent, cpiContext2Pubkey, cpiContextPubkey, createAccount, createAccountWithLamports, createBN254, createCompressedAccount, createCompressedAccountWithMerkleContext, createMerkleContext, createRpc, createRpcResult, createStateTreeLookupTable, decodeInstructionDataInvoke, decodeInstructionDataInvokeCpi, decodePublicTransactionEvent, decompress, dedupeSigner, deepEqual, defaultStateTreeLookupTables, defaultStaticAccounts, defaultStaticAccountsStruct, defaultTestStateTreeAccounts, defaultTestStateTreeAccounts2, deriveAddress, deriveAddressSeed, deserializeAppendNullifyCreateAddressInputsIndexer, encodeBN254toBase58, encodeInstructionDataInvoke, encodePublicTransactionEvent, extendStateTreeLookupTable, getAccountCompressionAuthority, getCompressedTokenAccountByHashTest, getCompressedTokenAccounts, getCompressedTokenAccountsByDelegateTest, getCompressedTokenAccountsByOwnerTest, getConnection, getIndexOrAdd, getLightStateTreeInfo, getParsedEvents, getPublicInputHash, getQueueForTree, getRegisteredProgramPda, getTestKeypair, getTestRpc, getTreeForQueue, hashToBn254FieldSizeBe, hashvToBn254FieldSizeBe, invokeAccountsLayout, type invokeAccountsLayoutParams, isLocalTest, jsonRpcResult, jsonRpcResultAndContext, lightProgram, localTestActiveStateTreeInfo, logger, merkleTree2Pubkey, merkletreePubkey, negateAndCompressProof, newAccountWithLamports, noopProgram, nullifiedStateTreeLookupTableDevnet, nullifiedStateTreeLookupTableMainnet, nullifierQueue2Pubkey, nullifierQueuePubkey, nullifyLookupTable, packCompressedAccounts, packNewAddressParams, padOutputStateMerkleTrees, parseAccountData, parseEvents, parseLightTransaction, parsePublicTransactionEventWithIdl, parseTokenLayoutWithIdl, pickRandomTreeAndQueue, pipe, placeholderValidityProof, proofFromJsonStruct, proverRequest, pushUniqueItems, rpcRequest, selectMinCompressedSolAccountsForTransfer, sendAndConfirmTx, sleep, stateTreeLookupTableDevnet, stateTreeLookupTableMainnet, sumUpLamports, toAccountMetas, toArray, toCamelCase, toHex, toUnixTimestamp, transfer, validateSameOwner, validateSufficientBalance, wrapBigNumbersAsStrings };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lightprotocol/stateless.js",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.2",
|
|
4
4
|
"description": "JavaScript API for Light & ZK Compression",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/node/index.cjs",
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@coral-xyz/anchor": "0.29.0",
|
|
52
|
+
"@coral-xyz/borsh": "^0.29.0",
|
|
52
53
|
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
|
53
54
|
"@lightprotocol/hasher.rs": "0.2.1",
|
|
54
55
|
"@playwright/test": "^1.47.1",
|
|
@@ -80,6 +81,7 @@
|
|
|
80
81
|
"tweetnacl": "1.0.3",
|
|
81
82
|
"typescript": "^5.6.2",
|
|
82
83
|
"vitest": "^2.1.1",
|
|
84
|
+
"winston": "^3.17.0",
|
|
83
85
|
"@lightprotocol/programs": "0.3.0"
|
|
84
86
|
},
|
|
85
87
|
"nx": {
|
|
@@ -97,6 +99,7 @@
|
|
|
97
99
|
"test": "pnpm test:unit:all && pnpm test:e2e:all",
|
|
98
100
|
"test-all": "vitest run",
|
|
99
101
|
"test:unit:all": "vitest run tests/unit --reporter=verbose",
|
|
102
|
+
"test:conversions": "vitest run tests/unit/utils/conversion.test.ts --reporter=verbose",
|
|
100
103
|
"test-validator": "./../../cli/test_bin/run test-validator --prover-run-mode rpc",
|
|
101
104
|
"test:e2e:transfer": "pnpm test-validator && vitest run tests/e2e/transfer.test.ts --reporter=verbose",
|
|
102
105
|
"test:e2e:compress": "pnpm test-validator && vitest run tests/e2e/compress.test.ts --reporter=verbose",
|
|
@@ -104,9 +107,10 @@
|
|
|
104
107
|
"test:e2e:rpc-interop": "pnpm test-validator && vitest run tests/e2e/rpc-interop.test.ts",
|
|
105
108
|
"test:e2e:rpc-multi-trees": "pnpm test-validator && vitest run tests/e2e/rpc-multi-trees.test.ts",
|
|
106
109
|
"test:e2e:browser": "pnpm playwright test",
|
|
107
|
-
"test:e2e:all": "pnpm test-validator && vitest run tests/e2e/test-rpc.test.ts && vitest run tests/e2e/compress.test.ts && vitest run tests/e2e/transfer.test.ts && vitest run tests/e2e/rpc-interop.test.ts && vitest run tests/e2e/rpc-multi-trees.test.ts && vitest run tests/e2e/layout.test.ts",
|
|
110
|
+
"test:e2e:all": "pnpm test-validator && vitest run tests/e2e/test-rpc.test.ts && vitest run tests/e2e/compress.test.ts && vitest run tests/e2e/transfer.test.ts && vitest run tests/e2e/rpc-interop.test.ts && vitest run tests/e2e/rpc-multi-trees.test.ts && vitest run tests/e2e/layout.test.ts && vitest run tests/e2e/safe-conversion.test.ts",
|
|
108
111
|
"test:index": "vitest run tests/e2e/program.test.ts",
|
|
109
112
|
"test:e2e:layout": "vitest run tests/e2e/layout.test.ts --reporter=verbose",
|
|
113
|
+
"test:e2e:safe-conversion": "vitest run tests/e2e/safe-conversion.test.ts --reporter=verbose",
|
|
110
114
|
"test:verbose": "vitest run --reporter=verbose",
|
|
111
115
|
"test:testnet": "vitest run tests/e2e/testnet.test.ts --reporter=verbose",
|
|
112
116
|
"pull-idls": "../../scripts/push-stateless-js-idls.sh && ../../scripts/push-compressed-token-idl.sh",
|