@ew-did-registry/claims
Version:
The package exposes functionality needed to create, inspect, approve, and verify Private and Public claims
50 lines (49 loc) • 1.23 kB
TypeScript
import { IJWT } from '@ew-did-registry/jwt';
import { StatusList2021Entry } from '@ew-did-registry/credentials-interface';
export interface IPublicClaim {
did: string;
signer: string;
claimData: object;
credentialStatus?: StatusList2021Entry;
exp?: number;
[key: string]: string | object | undefined | number;
}
export interface IPrivateClaim {
did: string;
signer: string;
claimData: {
[key: string]: string | [];
};
[key: string]: string | object;
}
export interface IProofData {
[key: string]: {
value: string | object;
encrypted: boolean;
};
}
export interface IProofClaim {
did: string;
signer: string;
claimUrl: string;
proofData: IProofData;
[key: string]: string | object;
}
export interface ISaltedFields {
[key: string]: string;
}
export interface IClaims {
did: string;
keys: {
privateKey?: string;
publicKey: string;
};
jwt: IJWT;
verify(claimUrl: string, hashFns?: {
[hashAlg: string]: (data: string) => string;
}): Promise<IPublicClaim | IPrivateClaim>;
}
export declare enum VerificationPurpose {
Authentication = "Authentication",
Assertion = "Assertion"
}