/* tslint:disable */
/* eslint-disable */
/**
*/
export function main(): void;
/**
*/
export enum CertificationTestError {
  UnableToHashTree = 0,
  WitnessGenerationFailed = 1,
  ThresholdSigningFailed = 2,
  CertificateSerializationFailed = 3,
  TimestampLebEncodingFailed = 4,
  CanisterIdParsingFailed = 5,
  PublicKeyEncodingFailed = 6,
  CanisterParamsOrCustomTreeRequired = 7,
  BothCanisterParamsAndCustomTreeProvided = 8,
  WitnessMergingFailed = 9,
}
/**
*/
export class CertificateBuilder {
  free(): void;
/**
* @param {string} canister_id
* @param {Uint8Array} certified_data
*/
  constructor(canister_id: string, certified_data: Uint8Array);
/**
* @param {bigint} subnet_id
* @param {any[]} canister_id_ranges
* @returns {CertificateBuilder}
*/
  withDelegation(subnet_id: bigint, canister_id_ranges: any[]): CertificateBuilder;
/**
* @param {bigint} time
* @returns {CertificateBuilder}
*/
  withTime(time: bigint): CertificateBuilder;
/**
* @returns {CertificateBuilder}
*/
  withInvalidSignature(): CertificateBuilder;
/**
* @returns {CertificateData}
*/
  build(): CertificateData;
}
/**
*/
export class CertificateData {
/**
** Return copy of self without private attributes.
*/
  toJSON(): Object;
/**
* Return stringified version of self.
*/
  toString(): string;
  free(): void;
/**
*/
  cborEncodedCertificate: Uint8Array;
/**
*/
  certificate: any;
/**
*/
  rootKey: Uint8Array;
}

export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;

export interface InitOutput {
  readonly memory: WebAssembly.Memory;
  readonly __wbg_certificatedata_free: (a: number) => void;
  readonly __wbg_get_certificatedata_certificate: (a: number) => number;
  readonly __wbg_set_certificatedata_certificate: (a: number, b: number) => void;
  readonly __wbg_get_certificatedata_rootKey: (a: number, b: number) => void;
  readonly __wbg_set_certificatedata_rootKey: (a: number, b: number, c: number) => void;
  readonly __wbg_get_certificatedata_cborEncodedCertificate: (a: number, b: number) => void;
  readonly __wbg_set_certificatedata_cborEncodedCertificate: (a: number, b: number, c: number) => void;
  readonly __wbg_certificatebuilder_free: (a: number) => void;
  readonly certificatebuilder_new: (a: number, b: number, c: number, d: number, e: number) => void;
  readonly certificatebuilder_withDelegation: (a: number, b: number, c: number, d: number, e: number) => void;
  readonly certificatebuilder_withTime: (a: number, b: number) => number;
  readonly certificatebuilder_withInvalidSignature: (a: number) => number;
  readonly certificatebuilder_build: (a: number, b: number) => void;
  readonly main: () => void;
  readonly __wbindgen_malloc: (a: number, b: number) => number;
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
  readonly __wbindgen_exn_store: (a: number) => void;
  readonly __wbindgen_start: () => void;
}

export type SyncInitInput = BufferSource | WebAssembly.Module;
/**
* Instantiates the given `module`, which can either be bytes or
* a precompiled `WebAssembly.Module`.
*
* @param {SyncInitInput} module
*
* @returns {InitOutput}
*/
export function initSync(module: SyncInitInput): InitOutput;

/**
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
* for everything else, calls `WebAssembly.instantiate` directly.
*
* @param {InitInput | Promise<InitInput>} module_or_path
*
* @returns {Promise<InitOutput>}
*/
export default function __wbg_init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;
