import { Field, Bool } from '../snarky.js'; import { CircuitValue } from './circuit_value.js'; import { Types } from '../snarky/types.js'; import { HashInput } from './hash.js'; export { UInt32, UInt64, Int64, Sign }; declare class UInt64 extends CircuitValue { value: Field; static NUM_BITS: number; static get zero(): UInt64; static get one(): UInt64; toString(): string; toBigInt(): bigint; static check(x: UInt64): void; static toInput(x: UInt64): HashInput; static toJSON(x: UInt64): string; private static checkConstant; static from(x: UInt64 | UInt32 | Field | number | string | bigint): UInt64; static MAXINT(): UInt64; divMod(y: UInt64 | number | string): { quotient: UInt64; rest: UInt64; }; /** * Integer division. * * `x.div(y)` returns the floor of `x / y`, that is, the greatest * `z` such that `x * y <= x`. * */ div(y: UInt64 | number): UInt64; /** * Integer remainder. * * `x.mod(y)` returns the value `z` such that `0 <= z < y` and * `x - z` is divisble by `y`. */ mod(y: UInt64 | number): UInt64; /** * Multiplication with overflow checking. */ mul(y: UInt64 | number): UInt64; /** * Addition with overflow checking. */ add(y: UInt64 | number): UInt64; /** * Subtraction with underflow checking. */ sub(y: UInt64 | number): UInt64; lte(y: UInt64): Bool; assertLte(y: UInt64, message?: string): void; lt(y: UInt64): Bool; assertLt(y: UInt64, message?: string): void; gt(y: UInt64): Bool; assertGt(y: UInt64, message?: string): void; gte(y: UInt64): Bool; assertGte(y: UInt64, message?: string): void; } declare class UInt32 extends CircuitValue { value: Field; static NUM_BITS: number; static get zero(): UInt32; static get one(): UInt32; toString(): string; toBigint(): bigint; toUInt64(): UInt64; static check(x: UInt32): void; static toInput(x: UInt32): HashInput; static toJSON(x: UInt32): string; private static checkConstant; static from(x: UInt32 | Field | number | string | bigint): UInt32; static MAXINT(): UInt32; divMod(y: UInt32 | number | string): { quotient: UInt32; rest: UInt32; }; div(y: UInt32 | number): UInt32; mod(y: UInt32 | number): UInt32; mul(y: UInt32 | number): UInt32; add(y: UInt32 | number): UInt32; sub(y: UInt32 | number): UInt32; lte(y: UInt32): Bool; assertLte(y: UInt32, message?: string): void; lt(y: UInt32): Bool; assertLt(y: UInt32, message?: string): void; gt(y: UInt32): Bool; assertGt(y: UInt32, message?: string): void; gte(y: UInt32): Bool; assertGte(y: UInt32, message?: string): void; } declare class Sign extends CircuitValue { value: Field; static get one(): Sign; static get minusOne(): Sign; static check(x: Sign): void; static toInput(x: Sign): HashInput; static toJSON(x: Sign): "Positive" | "Negative"; neg(): Sign; mul(y: Sign): Sign; isPositive(): Bool; toString(): string; } declare type BalanceChange = Types.AccountUpdate['body']['balanceChange']; declare class Int64 extends CircuitValue implements BalanceChange { magnitude: UInt64; sgn: Sign; constructor(magnitude: UInt64, sgn?: Sign); private static fromFieldUnchecked; static fromUnsigned(x: UInt64 | UInt32): Int64; static from(x: Int64 | UInt32 | UInt64 | Field | number | string | bigint): Int64; toString(): string; isConstant(): boolean; static get zero(): Int64; static get one(): Int64; static get minusOne(): Int64; toField(): Field; static fromField(x: Field): Int64; neg(): Int64; add(y: Int64 | number | string | bigint | UInt64 | UInt32): Int64; sub(y: Int64 | number | string | bigint | UInt64 | UInt32): Int64; mul(y: Int64 | number | string | bigint | UInt64 | UInt32): Int64; div(y: Int64 | number | string | bigint | UInt64 | UInt32): Int64; mod(y: UInt64 | number | string | bigint | UInt32): Int64; equals(y: Int64 | number | string | bigint | UInt64 | UInt32): Bool; assertEquals(y: Int64 | number | string | bigint | UInt64 | UInt32, message?: string): void; isPositive(): Bool; }