-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #860 from EYBlockchain/wallet/updates
Backport recent core-nightfall changes into wallet
- Loading branch information
Showing
43 changed files
with
1,336 additions
and
1,129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
declare module 'general-number' { | ||
// export interface GeneralNumber { | ||
// hex: string | ||
// } | ||
export function generalise<T>(gn: Record<T>[]) : Record<GeneralNumber>[] | ||
export function generalise<T>(gn: T[]) : GeneralNumber[] | ||
export function generalise<T>(gn: Record<T>) : Record<GeneralNumber> | ||
export function generalise<T>(gn: T) : GeneralNumber | ||
// export function generalise<T>(gn: Array<T>) : Array<GeneralNumber> | ||
class GeneralNumber { | ||
get binary(): string | ||
|
||
get binaryArray(): string[] | ||
|
||
get bytes(): number[] | ||
|
||
// returns the decimal representation, as a String type. Synonymous with `integer()`. | ||
get decimal(): string | ||
|
||
// returns the decimal representation, as a String type. Synonymous with `decimal()`. | ||
get integer(): string | ||
|
||
// returns the decimal representation, as a Number type (if less than javascript's MAX_SAFE_INTEGER). (Otherwise it will throw). | ||
get number(): number | ||
|
||
get bigInt(): bigint | ||
|
||
get boolean(): bigint | ||
|
||
get ascii(): string | ||
|
||
get utf8(): string | ||
|
||
// Safe fallback for accidentally calling '.all' on a GeneralNumber (rather than a GeneralObject, which actuallty supports this property) | ||
get all(): GeneralNumber | ||
|
||
limbs(limbBitLength: number,numberOfLimbs: undefined | number, returnType?: string, throwErrors?: boolean): string[]; | ||
hex(byteLength: number, butTruncateValueToByteLength?: number): string; | ||
field(modulus: bigint, noOverflow?: boolean): string | ||
} | ||
export function stitchLimbs(_limbs: number[], _limbBits? : number) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// globals.d.ts | ||
declare module globalThis { | ||
var config = { | ||
BN128_GROUP_ORDER: bigint, | ||
BABYJUBJUB: { | ||
JUBJUBA: bigint, | ||
JUBJUBD: bigint, | ||
INFINITY: [bigint,bigint], | ||
GENERATOR: [bigint, bigint], | ||
JUBJUBE: bigint, | ||
JUBJUBC: bigint, | ||
MONTA: bigint, | ||
MONTB: bigint, | ||
}, | ||
COMMITMENTS_DB: string, | ||
TIMBER_COLLECTION: string, | ||
SUBMITTED_BLOCKS_COLLECTION: string, | ||
TRANSACTIONS_COLLECTION: string, | ||
COMMITMENTS_COLLECTION: string, | ||
KEYS_COLLECTION: string, | ||
CIRCUIT_COLLECTION: string, | ||
} | ||
} |
Oops, something went wrong.