/* tslint:disable */
/* eslint-disable */
export interface Endpoints {
    witness_jwt: Url | null;
    witness_ld: Url | null;
    statement: Url;
    instructions: Url;
    verify: Url | null;
}

export interface Client {
    endpoints: Endpoints;
    resolver_opts?: ResolverOpts;
}

export interface DelegatedAttestationPreConfig {
    service_key: string;
    session_config: SessionConfig;
    siwe_recap_message: string;
}

export interface DelegatedAttestationConfig {
    service_key: string;
    session_config: SessionConfig;
    siwe_recap_message: string;
    siwe_recap_signature: string;
}

export interface WitnessErr {
    error: string;
}

export type FlowType = "DnsVerification" | "EmailVerification" | "GitHubVerification" | "NftOwnershipVerification" | "PoapOwnershipVerification" | "RedditVerification" | "SameControllerAssertion" | "SoundCloudVerification" | "TwitterVerification" | "Attestation" | "DelegatedAttestation";

export type Contents = { DnsVerification: DnsVerificationContent } | { EmailVerification: EmailVerificationContent } | { GitHubVerification: GitHubVerificationContent } | { NftOwnershipVerification: NftOwnershipVerificationContent } | { PoapOwnershipVerification: PoapOwnershipVerificationContent } | { RedditVerification: RedditVerificationContent } | { SameControllerAssertion: SameControllerAssertionContent } | { SoundCloudVerification: SoundCloudVerificationContent } | { TwitterVerification: TwitterVerificationContent } | { Attestation: AttestationContent } | { DelegatedAttestation: DelegatedAttestationContent };

export type Statements = { DnsVerification: DnsVerificationStatement } | { EmailVerification: EmailVerificationStatement } | { GitHubVerification: GitHubVerificationStatement } | { NftOwnershipVerification: NftOwnershipVerificationStatement } | { PoapOwnershipVerification: PoapOwnershipVerificationStatement } | { RedditVerification: RedditVerificationStatement } | { SameControllerAssertion: SameControllerAssertionStatement } | { SoundCloudVerification: SoundCloudVerificationStatement } | { TwitterVerification: TwitterVerificationStatement } | { Attestation: AttestationStatement };

export type Proofs = { DnsVerification: DnsVerificationStatement } | { EmailVerification: EmailVerificationProof } | { GitHubVerification: GitHubVerificationProof } | { NftOwnershipVerification: NftOwnershipVerificationProof } | { PoapOwnershipVerification: PoapOwnershipVerificationProof } | { RedditVerification: RedditVerificationStatement } | { SameControllerAssertion: SameControllerAssertionProof } | { SoundCloudVerification: SoundCloudVerificationStatement } | { TwitterVerification: TwitterVerificationProof } | { Attestation: AttestationProof } | { DelegatedAttestation: DelegatedAttestationProof };

export interface InstructionsReq {
    type: FlowType;
}

export interface JWTWrapper {
    jwt: string;
}

export interface CredentialWrapper {
    credential: Credential;
}

export type VCWrapper = CredentialWrapper | JWTWrapper;

export interface VerifyRes {
    success: boolean;
}

export interface BookReviewAttestationContent {
    id: string;
    link: Url;
    rating: number;
    review: string;
    signature: string;
    title: string;
}

export interface PoapOwnershipVerificationContent {
    event_id: string;
    subject: Subjects;
    statement: string;
    signature: string;
}

export interface BasicImageAttestationProof {
    statement: BasicImageAttestationStatement;
    signature: string;
}

export interface BasicImageAttestationStatement {
    subject: Subjects;
    src: string;
}

export interface FollowAttestationStatement {
    subject: Subjects;
    target: Url;
}

export interface NftOwnershipVerificationStatement {
    contract_address: string;
    subject: Subjects;
    network: AlchemyNetworks;
    issued_at: string;
}

export interface DelegatedBasicPostAttestationContent {
    id: string;
    body: string;
    title: string;
    reply_to: string | null;
    delegate: string;
}

export interface DelegatedDappPreferencesAttestationContent {
    id: string;
    dark_mode: boolean;
    delegate: string;
}

export interface GitHubVerificationContent {
    gist_id: string;
    handle: string;
    subject: Subjects;
    statement: string;
    signature: string;
}

export interface SoundCloudVerificationContent {
    subject: Subjects;
    statement: string;
    signature: string;
    permalink: string;
}

export interface BasicProfileAttestationProof {
    statement: BasicProfileAttestationStatement;
    signature: string;
}

export interface Eip155 {
    address: string;
    chain_id: string;
}

export interface SessionConfig {
    address: number[];
    chainId: number;
    domain: Authority;
    issuedAt: TimeStamp;
    notBefore?: TimeStamp | null;
    expirationTime: TimeStamp;
    parents?: Cid[] | null;
    jwk?: JWK | null;
}

export interface ResolverOpts {
    did_onion_proxy_url: string | null;
    did_ion_api_url: string | null;
}

export interface Instructions {
    statement: string;
    signature: string;
    witness: string;
    statement_schema: RootSchema;
    witness_schema: RootSchema;
}

export interface StatementResponse {
    statement: string;
    delimiter: string | null;
}

export type AlchemyNetworks = "eth-mainnet" | "polygon-mainnet";

export type AttestationContent = { BasicImageAttestation: BasicImageAttestationContent } | { BasicPostAttestation: BasicPostAttestationContent } | { BasicProfileAttestation: BasicProfileAttestationContent } | { BasicTagAttestation: BasicTagAttestationContent } | { BookReviewAttestation: BookReviewAttestationContent } | { DappPreferencesAttestation: DappPreferencesAttestationContent } | { FollowAttestation: FollowAttestationContent } | { LikeAttestation: LikeAttestationContent } | { ProgressBookLinkAttestation: ProgressBookLinkAttestationContent };

export interface DelegatedAttestationFlow {
    service_key: string;
}

export interface SameControllerAssertionFlow {}

export interface DelegatedAttestationProof {
    attestation: AttestationStatement;
    attestation_signature: string;
    service_key: string;
    siwe_message: string;
    siwe_signature: string;
}

export interface ParsedReCap {
    delegate: string;
    subject: Subjects;
    types: AttestationTypes[];
}

export interface HexRecap {
    att: Map<string, Value>;
}

export interface DappPreferencesAttestationStatement {
    subject: Subjects;
    dark_mode: boolean;
}

export interface EmailVerificationStatement {
    email: string;
    subject: Subjects;
}

export type AttestationTypes = "BasicImageAttestation" | "BasicPostAttestation" | "BasicProfileAttestation" | "BasicTagAttestation" | "BookReviewAttestation" | "DappPreferencesAttestation" | "FollowAttestation" | "LikeAttestation" | "ProgressBookLinkAttestation";

export interface BasicProfileAttestationContent {
    description: string | null;
    image: string | null;
    id: string;
    username: string;
    website: Url | null;
    signature: string;
}

export interface LikeAttestationContent {
    id: string;
    target: Url;
    signature: string;
}

export interface DelegatedBasicImageAttestationContent {
    id: string;
    src: string;
    delegate: string;
}

export interface DelegatedBookReviewAttestationContent {
    id: string;
    link: Url;
    rating: number;
    review: string;
    delegate: string;
    title: string;
}

export interface DelegatedFollowAttestationContent {
    id: string;
    target: Url;
    delegate: string;
}

export interface DnsVerificationContent {
    domain: string;
    subject: Subjects;
}

export interface RedditVerificationContent {
    handle: string;
    subject: Subjects;
    statement: string;
    signature: string;
}

export interface TwitterVerificationContent {
    handle: string;
    subject: Subjects;
    tweet_url: string;
    statement: string;
    signature: string;
}

export type NftOwnershipVerificationFlow = Alchemy;

export interface Alchemy {
    api_key: string;
    challenge_delimiter: string;
    max_elapsed_minutes: number;
}

export interface PoapOwnershipVerificationFlow {
    api_key: string;
    challenge_delimiter: string;
    max_elapsed_minutes: number;
}

export interface RedditVerificationFlow {
    user_agent: string;
}

export interface TwitterVerificationFlow {
    api_key: string;
    delimiter: string;
}

export type AttestationProof = { BasicImageAttestation: BasicImageAttestationProof } | { BasicPostAttestation: BasicPostAttestationProof } | { BasicProfileAttestation: BasicProfileAttestationProof } | { BasicTagAttestation: BasicTagAttestationProof } | { BookReviewAttestation: BookReviewAttestationProof } | { DappPreferencesAttestation: DappPreferencesAttestationProof } | { FollowAttestation: FollowAttestationProof } | { LikeAttestation: LikeAttestationProof } | { ProgressBookLinkAttestation: ProgressBookLinkAttestationProof };

export interface EmailVerificationProof {
    challenge: string;
    signature: string;
    statement: Stmt;
}

export interface PoapOwnershipVerificationStatement {
    event_id: number;
    issued_at: string;
    subject: Subjects;
}

export interface BasicImageAttestationContent {
    id: string;
    src: string;
    signature: string;
}

export interface BasicPostAttestationContent {
    id: string;
    body: string;
    title: string;
    reply_to: string | null;
    signature: string;
}

export interface BasicTagAttestationContent {
    id: string;
    post: string;
    users: string[];
    signature: string;
}

export interface DappPreferencesAttestationContent {
    id: string;
    dark_mode: boolean;
    signature: string;
}

export interface FollowAttestationContent {
    id: string;
    target: Url;
    signature: string;
}

export interface ProgressBookLinkAttestationContent {
    id: string;
    link: Url;
    progress: number;
    signature: string;
}

export interface SoundCloudVerificationFlow {
    client_id: string;
    limit: number;
    max_offset: number;
}

export interface NftOwnershipVerificationProof {
    signature: string;
    statement: Stmt;
}

export interface TwitterVerificationProof {
    statement: Stmt;
    tweet_url: string;
}

export interface BasicPostAttestationStatement {
    subject: Subjects;
    body: string;
    title: string;
    reply_to: string | null;
}

export interface did_web {
    did: string;
    key_name: string;
}

export interface SameControllerAssertionContent {
    id1: Subjects;
    id2: Subjects;
    statement: string;
    signature1: string;
    signature2: string;
}

export interface SameControllerAssertionProof {
    statement: Stmt;
    signature1: string;
    signature2: string;
}

export interface BasicProfileAttestationStatement {
    description: string | null;
    image: string | null;
    subject: Subjects;
    username: string;
    website: Url | null;
}

export interface BookReviewAttestationStatement {
    subject: Subjects;
    link: Url;
    rating: number;
    review: string;
    title: string;
}

export interface SameControllerAssertionStatement {
    id1: Subjects;
    id2: Subjects;
}

export type Subjects = { pkh: Pkh } | { web: Web };

export type Pkh = { eip155: Eip155 } | { solana: Solana };

export type Web = { ed25519: Ed25519 };

export type DelegatedAttestationContent = { BasicImageAttestation: DelegatedBasicImageAttestationContent } | { BasicPostAttestation: DelegatedBasicPostAttestationContent } | { BasicProfileAttestation: DelegatedBasicProfileAttestationContent } | { BasicTagAttestation: DelegatedBasicTagAttestationContent } | { BookReviewAttestation: DelegatedBookReviewAttestationContent } | { DappPreferencesAttestation: DelegatedDappPreferencesAttestationContent } | { FollowAttestation: DelegatedFollowAttestationContent } | { LikeAttestation: DelegatedLikeAttestationContent } | { ProgressBookLinkAttestation: DelegatedProgressBookLinkAttestationContent };

export interface DelegatedLikeAttestationContent {
    id: string;
    target: Url;
    delegate: string;
}

export interface EmailVerificationContent {
    subject: Subjects;
    statement: string;
    signature: string;
    email: string;
}

export interface DnsVerificationFlow {}

export interface GitHubVerificationFlow {
    user_agent: string;
    delimiter: string;
}

export interface LikeAttestationStatement {
    subject: Subjects;
    target: Url;
}

export type AttestationStatement = { BasicImageAttestation: BasicImageAttestationStatement } | { BasicPostAttestation: BasicPostAttestationStatement } | { BasicProfileAttestation: BasicProfileAttestationStatement } | { BasicTagAttestation: BasicTagAttestationStatement } | { BookReviewAttestation: BookReviewAttestationStatement } | { DappPreferencesAttestation: DappPreferencesAttestationStatement } | { FollowAttestation: FollowAttestationStatement } | { LikeAttestation: LikeAttestationStatement } | { ProgressBookLinkAttestation: ProgressBookLinkAttestationStatement };

export interface BasicTagAttestationStatement {
    subject: Subjects;
    post: string;
    users: string[];
}

export interface ProgressBookLinkAttestationStatement {
    subject: Subjects;
    link: Url;
    progress: number;
}

export interface DelegatedBasicProfileAttestationContent {
    description: string | null;
    image: string | null;
    id: string;
    username: string;
    website: Url | null;
    delegate: string;
}

export interface DelegatedBasicTagAttestationContent {
    id: string;
    post: string;
    users: string[];
    delegate: string;
}

export interface DelegatedProgressBookLinkAttestationContent {
    id: string;
    link: Url;
    progress: number;
    delegate: string;
}

export interface BasicPostAttestationProof {
    statement: BasicPostAttestationStatement;
    signature: string;
}

export interface BookReviewAttestationProof {
    statement: BookReviewAttestationStatement;
    signature: string;
}

export interface FollowAttestationProof {
    statement: FollowAttestationStatement;
    signature: string;
}

export interface LikeAttestationProof {
    statement: LikeAttestationStatement;
    signature: string;
}

export interface ProgressBookLinkAttestationProof {
    statement: ProgressBookLinkAttestationStatement;
    signature: string;
}

export interface GitHubVerificationProof {
    gist_id: string;
    statement: Stmt;
}

export interface GitHubVerificationStatement {
    handle: string;
    subject: Subjects;
}

export interface TwitterVerificationStatement {
    handle: string;
    subject: Subjects;
}

export interface NftOwnershipVerificationContent {
    contract_address: string;
    subject: Subjects;
    statement: string;
    signature: string;
}

export interface BasicTagAttestationProof {
    statement: BasicTagAttestationStatement;
    signature: string;
}

export interface DappPreferencesAttestationProof {
    statement: DappPreferencesAttestationStatement;
    signature: string;
}

export interface PoapOwnershipVerificationProof {
    signature: string;
    statement: Stmt;
}

export interface RedditVerificationStatement {
    handle: string;
    subject: Subjects;
}

export interface SoundCloudVerificationStatement {
    permalink: string;
    subject: Subjects;
}

export interface AttestationFlow {}

export interface SendGridBasicFlow {
    api_key: string;
    challenge_delimiter: string;
    from_addr: string;
    from_name: string;
    max_elapsed_minutes: number;
    subject_name: string;
}

export interface DnsVerificationStatement {
    domain: string;
    prefix: string;
    subject: Subjects;
}

export interface Solana {
    address: string;
}

/**
*/
export class WasmClient {
  free(): void;
/**
* @param {string} config
*/
  constructor(config: string);
/**
* @returns {Promise<Promise<any>>}
*/
  new_jwk(): Promise<Promise<any>>;
/**
* @param {string} session_config
* @param {string} service_key
* @param {string} delegated_capabilities
* @returns {Promise<Promise<any>>}
*/
  siwe_message(session_config: string, service_key: string, delegated_capabilities: string): Promise<Promise<any>>;
/**
* @param {string} req
* @returns {Promise<any>}
*/
  instructions(req: string): Promise<any>;
/**
* @param {string} req
* @returns {Promise<any>}
*/
  statement(req: string): Promise<any>;
/**
* @param {string} req
* @returns {Promise<any>}
*/
  witness_jwt(req: string): Promise<any>;
/**
* @param {string} req
* @returns {Promise<any>}
*/
  witness_ld(req: string): Promise<any>;
/**
* @param {string} req
* @returns {Promise<any>}
*/
  witness_verify(req: string): Promise<any>;
/**
* @param {string} req
* @returns {Promise<any>}
*/
  verify(req: string): Promise<any>;
/**
* @param {string} delegated_attestation_config
* @param {string} statement
* @returns {Promise<any>}
*/
  delegated_attestation_jwt(delegated_attestation_config: string, statement: string): Promise<any>;
}

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

export interface InitOutput {
  readonly memory: WebAssembly.Memory;
  readonly __wbg_wasmclient_free: (a: number) => void;
  readonly wasmclient_new: (a: number, b: number, c: number) => void;
  readonly wasmclient_new_jwk: (a: number) => number;
  readonly wasmclient_siwe_message: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
  readonly wasmclient_instructions: (a: number, b: number, c: number) => number;
  readonly wasmclient_statement: (a: number, b: number, c: number) => number;
  readonly wasmclient_witness_jwt: (a: number, b: number, c: number) => number;
  readonly wasmclient_witness_ld: (a: number, b: number, c: number) => number;
  readonly wasmclient_witness_verify: (a: number, b: number, c: number) => number;
  readonly wasmclient_verify: (a: number, b: number, c: number) => number;
  readonly wasmclient_delegated_attestation_jwt: (a: number, b: number, c: number, d: number, e: number) => number;
  readonly __wbindgen_malloc: (a: number, b: number) => number;
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
  readonly __wbindgen_export_2: WebAssembly.Table;
  readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8103eb90895b7420: (a: number, b: number, c: number) => void;
  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 wasm_bindgen__convert__closures__invoke2_mut__h0ddbe365a6a3f184: (a: number, b: number, c: number, d: number) => 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>;
