@worldcoin/idkit-core
Version:
The identity SDK. Privacy-preserving identity and proof of personhood with World ID.
36 lines (32 loc) • 1.38 kB
TypeScript
import { V as VerificationLevel } from './config-fuwC_Hia.js';
declare enum AppErrorCodes {
ConnectionFailed = "connection_failed",
VerificationRejected = "verification_rejected",
MaxVerificationsReached = "max_verifications_reached",
CredentialUnavailable = "credential_unavailable",
MalformedRequest = "malformed_request",
InvalidNetwork = "invalid_network",
InclusionProofFailed = "inclusion_proof_failed",
InclusionProofPending = "inclusion_proof_pending",
UnexpectedResponse = "unexpected_response",// NOTE: when the World app returns an unexpected response
FailedByHostApp = "failed_by_host_app",// NOTE: Host app failed/rejected verification (does not come from World App / simulator)
GenericError = "generic_error"
}
declare enum VerificationState {
PreparingClient = "loading_widget",
WaitingForConnection = "awaiting_connection",// Awaiting connection from the wallet
WaitingForApp = "awaiting_app",// Awaiting user confirmation in wallet
Confirmed = "confirmed",
Failed = "failed"
}
interface ISuccessResult {
proof: string;
merkle_root: string;
nullifier_hash: string;
verification_level: VerificationLevel;
}
interface IErrorState {
code: AppErrorCodes;
message?: string;
}
export { AppErrorCodes as A, type ISuccessResult as I, VerificationState as V, type IErrorState as a };