import { ethers } from 'ethers'; import { bigNumberToNumber } from './CBR'; export { bigNumberToNumber, }; declare type BigNumber = ethers.BigNumber; export declare type num = BigNumber | number; export declare type MaybeRep = ['Some', A] | ['None', null]; export declare const asMaybe: (v: A | undefined) => MaybeRep; export declare const fromSome: (mo: MaybeRep, da: A) => A; export interface AnyBackendTy { name: string; canonicalize: (x: any) => any; } declare type AssertInfo = unknown | undefined | string | { who?: string; msg?: string | null; at?: string; fs?: [string]; }; export declare const formatAssertInfo: (ai: AssertInfo) => string; export declare const assert: (d: any, ai?: any) => void; export declare const checkedBigNumberify: (at: string, m: BigNumber, x: any) => BigNumber; export declare function protect(ctc: AnyBackendTy, v: unknown, ai?: unknown): any; export declare const hexlify: typeof ethers.utils.hexlify; export declare const isHex: typeof ethers.utils.isHexString; export declare const stringToHex: (x: string) => string; export declare const bytesEq: (x: any, y: any) => boolean; export declare const bytesConcat: (x: string, y: string) => string; export declare const eq: (a: num, b: num) => boolean; export declare const ge: (a: num, b: num) => boolean; export declare const gt: (a: num, b: num) => boolean; export declare const le: (a: num, b: num) => boolean; export declare const lt: (a: num, b: num) => boolean; export declare const eq256: (a: num, b: num) => boolean; export declare const ge256: (a: num, b: num) => boolean; export declare const gt256: (a: num, b: num) => boolean; export declare const le256: (a: num, b: num) => boolean; export declare const lt256: (a: num, b: num) => boolean; export declare const digest_xor: (xd: string, yd: string) => string; export declare const bytes_xor: (x: string, y: string) => string; export declare const btoiLast8: (b: string) => BigNumber; export declare function Array_set(arr: Array, idx: number, elem: T): Array; export declare type MapRefT = (f: string) => Promise>; export interface MapOpts { ctc: { apiMapRef: (i: number, ty: unknown) => MapRefT; }; ty: unknown; isAPI: boolean; idx: number; } export interface LinearMap { ref: MapRefT; set: (f: string, v: A | undefined) => Promise; } export declare const newMap: (opts: MapOpts) => LinearMap; export declare const mapSet: (m: LinearMap, f: string, v: A | undefined) => Promise; export declare const mapRef: (m: LinearMap, f: string) => Promise>; export declare const Array_asyncMap: (as: any[][], f: (x: any[], i: number) => Promise) => Promise; export declare const Array_asyncReduce: (as: any[][], b: B, f: (xs: any[], y: B, i: number) => Promise) => Promise; export declare const simMapDupe: (sim_r: any, mapi: number, mapo: LinearMap) => void; export declare const simMapRef: (sim_r: any, mapi: number, f: string) => Promise>; export declare const simMapSet: (sim_r: any, mapi: number, f: string, nv: A) => Promise; export declare const simTokenNew: (sim_r: any, n: any, s: any, u: any, m: any, p: any, d: any, ctr: any) => any; export declare const simTokenBurn: (sim_r: any, tok: any, amt: any) => void; export declare const simTokenDestroy: (sim_r: any, tok: any) => void; //# sourceMappingURL=shared_backend.d.ts.map