@lightprotocol/stateless.js 0.20.2 → 0.20.4
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/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/rpc-interface.d.ts +2 -2
- package/dist/cjs/browser/utils/conversion.d.ts +3 -1
- package/dist/cjs/browser/utils/validation.d.ts +4 -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 +0 -1
- package/dist/cjs/node/rpc-interface.d.ts +2 -2
- package/dist/cjs/node/utils/conversion.d.ts +3 -1
- package/dist/cjs/node/utils/validation.d.ts +4 -0
- package/dist/types/index.d.ts +8 -4
- package/package.json +2 -2
- package/dist/cjs/browser/logger.d.ts +0 -1
- package/dist/cjs/node/logger.d.ts +0 -1
|
@@ -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>>;
|
|
@@ -9,6 +9,9 @@ export declare function byteArrayToKeypair(byteArray: number[]): Keypair;
|
|
|
9
9
|
export declare function toHex(bn: BN): string;
|
|
10
10
|
export declare const toArray: <T>(value: T | T[]) => T[];
|
|
11
11
|
export declare const bufToDecStr: (buf: Buffer) => string;
|
|
12
|
+
export declare function isSmallerThanBn254FieldSizeBe(bytes: Buffer): boolean;
|
|
13
|
+
export declare const toCamelCase: (object: any) => any;
|
|
14
|
+
/**
|
|
12
15
|
/**
|
|
13
16
|
* Hash the provided `bytes` with Keccak256 and ensure the result fits in the
|
|
14
17
|
* BN254 prime field by repeatedly hashing the inputs with various "bump seeds"
|
|
@@ -28,4 +31,3 @@ export declare function hashToBn254FieldSizeBe(bytes: Buffer): [Buffer, number]
|
|
|
28
31
|
export declare function hashvToBn254FieldSizeBe(bytes: Uint8Array[]): Uint8Array;
|
|
29
32
|
/** Mutates array in place */
|
|
30
33
|
export declare function pushUniqueItems<T>(items: T[], map: T[]): void;
|
|
31
|
-
export declare function toCamelCase(obj: Array<any> | unknown | any): Array<any> | unknown | any;
|
|
@@ -2,3 +2,7 @@ import BN from 'bn.js';
|
|
|
2
2
|
import { CompressedAccount, CompressedAccountWithMerkleContext } from '../state';
|
|
3
3
|
export declare const validateSufficientBalance: (balance: BN) => void;
|
|
4
4
|
export declare const validateSameOwner: (compressedAccounts: CompressedAccount[] | CompressedAccountWithMerkleContext[]) => void;
|
|
5
|
+
export declare const validateNumbersForProof: (hashesLength: number, newAddressesLength: number) => void;
|
|
6
|
+
export declare const validateNumbersForInclusionProof: (hashesLength: number) => void;
|
|
7
|
+
export declare const validateNumbersForNonInclusionProof: (newAddressesLength: number) => void;
|
|
8
|
+
export declare const validateNumbers: (length: number, allowedNumbers: number[], type: string) => void;
|