UNPKG

@sybil-center/zkc-core

Version:
22 lines (21 loc) 830 B
import { PassportIssuer, PassportIT } from "./issuer/index.js"; import { HttpClient } from "zkc-core"; import { SybilWalletProof } from "./type/index.js"; type ZkCredKinds = { passport: { Kind: PassportIT["Cred"]; Issuer: PassportIssuer; Options: PassportIT["Options"] | undefined; }; }; type Issuers = { [K in keyof ZkCredKinds]: ZkCredKinds[K]["Issuer"]; }; export declare class ZkSybil { readonly issuerDomain?: URL | undefined; readonly issuers: Issuers; constructor(issuerDomain?: URL | undefined, httpClient?: HttpClient); issuer<TName extends keyof Issuers>(name: TName): Issuers[TName]; credential<TName extends keyof ZkCredKinds>(name: TName, walletProof: SybilWalletProof, options: ZkCredKinds[TName]["Options"]): Promise<ZkCredKinds[TName]["Kind"]>; } export {};