import { ethers } from 'ethers';
import { bigNumberToNumber } from './CBR';
import { apiStateMismatchError, MapRefT, GetKeyT, IContractCompiledMaps } from './shared_impl';
export { bigNumberToNumber, apiStateMismatchError, };
type BigNumber = ethers.BigNumber;
export type num = BigNumber | number;
export 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;
}
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 function bytesFromHex(v: any): Uint8Array;
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 stringDynConcat: (s1: string, s2: string) => string;
export declare const uintToStringDyn: (n1: num) => string;
export declare const uintToStringDyn256: (n1: num) => string;
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 interface MapOpts {
ctc: IContractCompiledMaps;
isAPI: boolean;
idx: number;
}
export interface LinearMap {
getKey: GetKeyT;
ref: MapRefT;
set: (kt: ConnectorTy, k: K, vt: ConnectorTy, v: A | undefined) => Promise;
}
export declare const copyMap: (orig: LinearMap) => LinearMap;
export declare const newMap: (opts: MapOpts) => LinearMap;
export declare const mapSet: (m: LinearMap, kt: Ty, k: K, vt: Ty, v: A | undefined) => Promise;
export declare const mapRef: (m: LinearMap, kt: Ty, k: K, vt: Ty) => 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;
//# sourceMappingURL=shared_backend.d.ts.map