/* tslint:disable */
/* eslint-disable */
/**
* @returns {number}
*/
export function getMinVerificationVersion(): number;
/**
* @returns {number}
*/
export function getMaxVerificationVersion(): number;
/**
*/
export function main(): void;
/**
* The primary entry point for verifying a request and response pair. This will verify the response
* with respect to the request, according the [Response Verification Spec]().
* @param {Request} request
* @param {Response} response
* @param {Uint8Array} canister_id
* @param {bigint} current_time_ns
* @param {bigint} max_cert_time_offset_ns
* @param {Uint8Array} ic_public_key
* @param {number} min_requested_verification_version
* @returns {VerificationInfo}
*/
export function verifyRequestResponsePair(request: Request, response: Response, canister_id: Uint8Array, current_time_ns: bigint, max_cert_time_offset_ns: bigint, ic_public_key: Uint8Array, min_requested_verification_version: number): VerificationInfo;
/**
* JS Representation of the ResponseVerificationError code
*/
export enum ResponseVerificationErrorCode {
/**
* The URL was malformed and could not be parsed correctly
*/
  MalformedUrl = 0,
/**
* The hash tree was malformed and could not be parsed correctly
*/
  MalformedHashTree = 1,
/**
* The certificate was malformed and could not be parsed correctly
*/
  MalformedCertificate = 2,
/**
* The certificate was expected to have a "time" path, but it was missing
*/
  MissingTimePathInTree = 3,
/**
* Error converting UTF-8 string
*/
  IoError = 4,
/**
* The certificate's time was too far in the future
*/
  CertificateTimeTooFarInTheFuture = 5,
/**
* The certificate's time was too far in the past
*/
  CertificateTimeTooFarInThePast = 6,
/**
* The CBOR was malformed and could not be parsed correctly
*/
  MalformedCbor = 7,
/**
* The Cbor parser expected a node of a certain type but found a different type
*/
  UnexpectedCborNodeType = 8,
/**
* The hash tree pruned data was not the correct length
*/
  IncorrectPrunedDataLength = 9,
/**
* Encountered an overflow error while decoding leb encoded timestamp
*/
  LebDecodingOverflow = 10,
/**
* Error converting UTF-8 string
*/
  Utf8ConversionError = 11,
/**
* An unsupported verification version was requested
*/
  UnsupportedVerificationVersion = 12,
/**
* Mismatch between the minimum requested version and the actual requested version
*/
  RequestedVerificationVersionMismatch = 13,
/**
* Error parsing CEL expression
*/
  CelError = 14,
/**
* Unexpected public key length
*/
  DerKeyLengthMismatch = 15,
/**
* Unexpected public key prefix
*/
  DerPrefixMismatch = 16,
/**
* Failed to verify the certificate
*/
  CertificateVerificationFailed = 17,
/**
* Certificate is for a different canister
*/
  CertificatePrincipalOutOfRange = 18,
/**
* Certificate delegation is missing the required public key
*/
  CertificateSubnetPublicKeyNotFound = 19,
/**
* Certificate delegation is missing the required canister range
*/
  CertificateSubnetCanisterRangesNotFound = 20,
/**
* Certificate delegation canister range was not correctly CBOR encoded
*/
  MalformedCborCanisterRanges = 21,
/**
* Error decoding base64
*/
  Base64DecodingError = 22,
/**
* Error parsing int
*/
  ParseIntError = 23,
/**
* The tree has different root hash from the expected value in the certified variables
*/
  InvalidTree = 24,
/**
* The CEL expression path is invalid
*/
  InvalidExpressionPath = 25,
/**
* The response body was a mismatch from the expected values in the tree
*/
  InvalidResponseBody = 26,
/**
* The response hashes were a mismatch from the expected values in the tree
*/
  InvalidResponseHashes = 27,
/**
* The certificate was missing from the certification header
*/
  MissingCertificate = 28,
/**
* The tree was missing from the certification header
*/
  MissingTree = 29,
/**
* The certificate expression path was missing from the certification header
*/
  MissingCertificateExpressionPath = 30,
/**
* The certificate expression was missing from the response headers
*/
  MissingCertificateExpression = 31,
/**
* The certification values could not be found in the response headers
*/
  MissingCertification = 32,
}

interface Request {
    method: String;
    url: String;
    headers: [string, string][];
    body: Uint8Array;
}



interface Response {
    statusCode: number;
    headers: [string, string][];
    body: Uint8Array;
}



type VerificationInfo = {
  response?: VerifiedResponse;
  verificationVersion: number;
}



interface VerifiedResponse {
    statusCode?: number;
    headers: [string, string][];
    body: Uint8Array;
}


/**
* JS Representation of the ResponseVerificationError
*/
export class ResponseVerificationError {
/**
** Return copy of self without private attributes.
*/
  toJSON(): Object;
/**
* Return stringified version of self.
*/
  toString(): string;
  free(): void;
/**
* Error code as an enum
*/
  readonly code: number;
/**
* Stringified error message
*/
  readonly message: string;
}
