UNPKG

@krebitdao/reputation-passport

Version:

Krebit SDK for Verified Credentials

67 lines 1.7 kB
import 'isomorphic-fetch'; import { ethers } from 'ethers'; import { DIDDataStore } from '@glazed/did-datastore'; export interface ClaimProps { id: string; value: any; type: string; typeSchema: string; ethereumAddress: string; did: string; expirationDate: string; tags?: string[]; trust?: number; stake?: number; price?: number; encrypt?: 'hash' | 'lit' | 'plain'; shareEncryptedWith?: string; } export interface IssueProps { wallet: ethers.Wallet; idx: DIDDataStore; claim: ClaimProps; } export interface ValidateProps { idx: DIDDataStore; claim: ClaimProps; } export interface HashProps { did: string; value: any; } export declare const hashClaimValue: (props: HashProps) => string; export declare const validateSchema: (props: ValidateProps) => Promise<true>; export declare const issueCredential: (props: IssueProps) => Promise<{ proof: import("@krebitdao/eip712-vc").Proof; '@context': string[]; type: string[]; id: string; issuer: { id: string; ethereumAddress: string; }; credentialSubject: { id: string; trust: number; stake: number; price: number; nbf: number; exp: number; value: any; type: string; typeSchema: string; ethereumAddress: string; did: string; expirationDate: string; tags?: string[]; encrypt?: 'hash' | 'lit' | 'plain'; shareEncryptedWith?: string; }; credentialSchema: { id: string; type: string; }; issuanceDate: string; expirationDate: string; }>; //# sourceMappingURL=issueCredential.d.ts.map