gnablib
Version:
A lean, zero dependency library to provide a useful base for your project.
29 lines (28 loc) • 938 B
TypeScript
/*! Copyright 2024-2025 the gnablib contributors MPL-1.1 */
import { IUint } from '../interfaces/IUint.js';
import { AInt } from './_AInt.js';
export declare class U256 extends AInt implements IUint<U256> {
protected constructor(arr: Uint32Array, pos: number, name?: string);
static fromInt(i52: number): U256;
static fromI32s(...ns: number[]): U256;
static fromBytesBE(src: Uint8Array, pos?: number): U256;
static mount(arr: Uint32Array, pos?: number): U256;
clone(): U256;
lShift(by: number): U256;
rShift(by: number): U256;
lRot(by: number): U256;
rRot(by: number): U256;
xor(o: U256): U256;
or(o: U256): U256;
and(o: U256): U256;
not(): U256;
add(o: U256): U256;
sub(o: U256): U256;
mul(o: U256): U256;
eq(o: U256): boolean;
gt(o: U256): boolean;
gte(o: U256): boolean;
lt(o: U256): boolean;
lte(o: U256): boolean;
static get zero(): U256;
}