@lightprotocol/stateless.js 0.20.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 +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-interface.d.ts +2 -2
- 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-interface.d.ts +2 -2
- 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 +42 -5
- package/package.json +7 -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;
|
|
@@ -656,8 +656,8 @@ export declare const NewAddressProofResult: Struct<{
|
|
|
656
656
|
export declare const ValidityProofResult: Struct<{
|
|
657
657
|
compressedProof: {
|
|
658
658
|
a: number[];
|
|
659
|
-
b: number[];
|
|
660
659
|
c: number[];
|
|
660
|
+
b: number[];
|
|
661
661
|
};
|
|
662
662
|
leafIndices: number[];
|
|
663
663
|
leaves: BN[];
|
|
@@ -667,8 +667,8 @@ export declare const ValidityProofResult: Struct<{
|
|
|
667
667
|
}, {
|
|
668
668
|
compressedProof: Struct<{
|
|
669
669
|
a: number[];
|
|
670
|
-
b: number[];
|
|
671
670
|
c: number[];
|
|
671
|
+
b: number[];
|
|
672
672
|
}, {
|
|
673
673
|
a: Struct<number[], Struct<number, null>>;
|
|
674
674
|
b: Struct<number[], Struct<number, null>>;
|
|
@@ -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[];
|
|
@@ -1077,9 +1092,9 @@ declare const NewAddressProofResult: Struct<{
|
|
|
1077
1092
|
*/
|
|
1078
1093
|
declare const ValidityProofResult: Struct<{
|
|
1079
1094
|
compressedProof: {
|
|
1095
|
+
c: number[];
|
|
1080
1096
|
a: number[];
|
|
1081
1097
|
b: number[];
|
|
1082
|
-
c: number[];
|
|
1083
1098
|
};
|
|
1084
1099
|
leafIndices: number[];
|
|
1085
1100
|
leaves: BN[];
|
|
@@ -1088,9 +1103,9 @@ declare const ValidityProofResult: Struct<{
|
|
|
1088
1103
|
merkleTrees: PublicKey[];
|
|
1089
1104
|
}, {
|
|
1090
1105
|
compressedProof: Struct<{
|
|
1106
|
+
c: number[];
|
|
1091
1107
|
a: number[];
|
|
1092
1108
|
b: number[];
|
|
1093
|
-
c: number[];
|
|
1094
1109
|
}, {
|
|
1095
1110
|
a: Struct<number[], Struct<number, null>>;
|
|
1096
1111
|
b: Struct<number[], Struct<number, null>>;
|
|
@@ -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;
|
|
@@ -2745,7 +2761,9 @@ declare const MerkleContextLayout: buffer_layout.Layout<unknown>;
|
|
|
2745
2761
|
declare const NewAddressParamsLayout: buffer_layout.Layout<unknown>;
|
|
2746
2762
|
declare const InstructionDataInvokeLayout: Layout<InstructionDataInvoke>;
|
|
2747
2763
|
declare function encodeInstructionDataInvoke(data: InstructionDataInvoke): Buffer$1;
|
|
2764
|
+
declare const InstructionDataInvokeCpiLayout: Layout<InstructionDataInvokeCpi>;
|
|
2748
2765
|
declare function decodeInstructionDataInvoke(buffer: Buffer$1): InstructionDataInvoke;
|
|
2766
|
+
declare function decodeInstructionDataInvokeCpi(buffer: Buffer$1): InstructionDataInvokeCpi;
|
|
2749
2767
|
type invokeAccountsLayoutParams = {
|
|
2750
2768
|
feePayer: PublicKey;
|
|
2751
2769
|
authority: PublicKey;
|
|
@@ -2761,10 +2779,27 @@ declare const invokeAccountsLayout: (accounts: invokeAccountsLayoutParams) => Ac
|
|
|
2761
2779
|
declare const PublicTransactionEventLayout: Layout<PublicTransactionEvent>;
|
|
2762
2780
|
declare function encodePublicTransactionEvent(data: PublicTransactionEvent): Buffer$1;
|
|
2763
2781
|
declare function decodePublicTransactionEvent(buffer: Buffer$1): PublicTransactionEvent;
|
|
2782
|
+
declare const AppendNullifyCreateAddressInputsMetaLayout: buffer_layout.Layout<unknown>;
|
|
2783
|
+
declare const AppendLeavesInputLayout: buffer_layout.Layout<unknown>;
|
|
2784
|
+
declare const InsertNullifierInputLayout: buffer_layout.Layout<unknown>;
|
|
2785
|
+
declare const InsertAddressInputLayout: buffer_layout.Layout<unknown>;
|
|
2786
|
+
declare const MerkleTreeSequenceNumberLayout: buffer_layout.Layout<unknown>;
|
|
2787
|
+
declare function deserializeAppendNullifyCreateAddressInputsIndexer(buffer: Buffer$1): {
|
|
2788
|
+
meta: unknown;
|
|
2789
|
+
leaves: unknown[];
|
|
2790
|
+
nullifiers: unknown[];
|
|
2791
|
+
addresses: unknown[];
|
|
2792
|
+
sequence_numbers: unknown[];
|
|
2793
|
+
output_leaf_indices: number[];
|
|
2794
|
+
};
|
|
2795
|
+
declare function convertToPublicTransactionEvent(decoded: any, remainingAccounts: PublicKey[], invokeData: InstructionDataInvoke): PublicTransactionEvent;
|
|
2764
2796
|
|
|
2765
2797
|
declare const FIELD_SIZE: BN;
|
|
2766
2798
|
declare const HIGHEST_ADDRESS_PLUS_ONE: BN;
|
|
2799
|
+
declare const COMPUTE_BUDGET_PATTERN: number[];
|
|
2767
2800
|
declare const INVOKE_DISCRIMINATOR: Buffer$1;
|
|
2801
|
+
declare const INVOKE_CPI_DISCRIMINATOR: Buffer$1;
|
|
2802
|
+
declare const INSERT_INTO_QUEUES_DISCRIMINATOR: Buffer$1;
|
|
2768
2803
|
declare const noopProgram = "noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV";
|
|
2769
2804
|
declare const lightProgram = "SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7";
|
|
2770
2805
|
declare const accountCompressionProgram = "compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq";
|
|
@@ -3957,4 +3992,6 @@ type LightSystemProgram = {
|
|
|
3957
3992
|
};
|
|
3958
3993
|
declare const IDL: LightSystemProgram;
|
|
3959
3994
|
|
|
3960
|
-
|
|
3995
|
+
declare const logger: any;
|
|
3996
|
+
|
|
3997
|
+
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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lightprotocol/stateless.js",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.1",
|
|
4
4
|
"description": "JavaScript API for Light & ZK Compression",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/node/index.cjs",
|
|
@@ -45,10 +45,12 @@
|
|
|
45
45
|
"buffer": "6.0.3",
|
|
46
46
|
"buffer-layout": "^1.2.2",
|
|
47
47
|
"camelcase": "^8.0.0",
|
|
48
|
+
"json-bigint": "^1.0.0",
|
|
48
49
|
"superstruct": "2.0.2"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
51
52
|
"@coral-xyz/anchor": "0.29.0",
|
|
53
|
+
"@coral-xyz/borsh": "^0.29.0",
|
|
52
54
|
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
|
53
55
|
"@lightprotocol/hasher.rs": "0.2.1",
|
|
54
56
|
"@playwright/test": "^1.47.1",
|
|
@@ -80,6 +82,7 @@
|
|
|
80
82
|
"tweetnacl": "1.0.3",
|
|
81
83
|
"typescript": "^5.6.2",
|
|
82
84
|
"vitest": "^2.1.1",
|
|
85
|
+
"winston": "^3.17.0",
|
|
83
86
|
"@lightprotocol/programs": "0.3.0"
|
|
84
87
|
},
|
|
85
88
|
"nx": {
|
|
@@ -97,6 +100,7 @@
|
|
|
97
100
|
"test": "pnpm test:unit:all && pnpm test:e2e:all",
|
|
98
101
|
"test-all": "vitest run",
|
|
99
102
|
"test:unit:all": "vitest run tests/unit --reporter=verbose",
|
|
103
|
+
"test:conversions": "vitest run tests/unit/utils/conversion.test.ts --reporter=verbose",
|
|
100
104
|
"test-validator": "./../../cli/test_bin/run test-validator --prover-run-mode rpc",
|
|
101
105
|
"test:e2e:transfer": "pnpm test-validator && vitest run tests/e2e/transfer.test.ts --reporter=verbose",
|
|
102
106
|
"test:e2e:compress": "pnpm test-validator && vitest run tests/e2e/compress.test.ts --reporter=verbose",
|
|
@@ -104,9 +108,10 @@
|
|
|
104
108
|
"test:e2e:rpc-interop": "pnpm test-validator && vitest run tests/e2e/rpc-interop.test.ts",
|
|
105
109
|
"test:e2e:rpc-multi-trees": "pnpm test-validator && vitest run tests/e2e/rpc-multi-trees.test.ts",
|
|
106
110
|
"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",
|
|
111
|
+
"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
112
|
"test:index": "vitest run tests/e2e/program.test.ts",
|
|
109
113
|
"test:e2e:layout": "vitest run tests/e2e/layout.test.ts --reporter=verbose",
|
|
114
|
+
"test:e2e:safe-conversion": "vitest run tests/e2e/safe-conversion.test.ts --reporter=verbose",
|
|
110
115
|
"test:verbose": "vitest run --reporter=verbose",
|
|
111
116
|
"test:testnet": "vitest run tests/e2e/testnet.test.ts --reporter=verbose",
|
|
112
117
|
"pull-idls": "../../scripts/push-stateless-js-idls.sh && ../../scripts/push-compressed-token-idl.sh",
|