From f5da46f3de3e132a3434470e229c1e3478a4321b Mon Sep 17 00:00:00 2001 From: PeterTheOne Date: Mon, 24 Aug 2020 16:00:51 +0200 Subject: [PATCH] fix: update to vc-data-model v1.0 issued -> issuanceDate claim -> credentialSubject https://github.com/jolocom/jolocom-lib/issues/393 --- dist/lib/contracts.d.ts | 3 +-- dist/lib/credential.d.ts | 2 +- dist/lib/signedCredential.d.ts | 6 +++--- lib/credential.ts | 2 +- lib/signedCredential.ts | 6 +++--- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/dist/lib/contracts.d.ts b/dist/lib/contracts.d.ts index 309454d..5d4b6a9 100644 --- a/dist/lib/contracts.d.ts +++ b/dist/lib/contracts.d.ts @@ -1,4 +1,3 @@ -import { IVaultedKeyProvider } from './vaultedKeyProvider'; interface ContractsGatewayInfo { name: string; chainId: number; @@ -9,7 +8,7 @@ interface AddressInfo { balance: number; } export interface IContractsAdapter { - assembleTxFromInteractionToken: (requestToken: ITransactionEncodable, from: string, nonce: number, vault: IVaultedKeyProvider, pass: string) => string; + assembleTxFromInteractionToken: (requestToken: ITransactionEncodable, from: string, nonce: number, vault: any, pass: string) => string; } export interface IContractsGateway { getNetworkInfo: () => ContractsGatewayInfo | {}; diff --git a/dist/lib/credential.d.ts b/dist/lib/credential.d.ts index 16dd3b7..f1b12ec 100644 --- a/dist/lib/credential.d.ts +++ b/dist/lib/credential.d.ts @@ -9,6 +9,6 @@ export interface IClaimSection { export interface ICredentialAttrs extends JsonLdObject { type: string[]; name?: string; - claim: ClaimEntry; + credentialSubject: ClaimEntry; } export {}; diff --git a/dist/lib/signedCredential.d.ts b/dist/lib/signedCredential.d.ts index 197d3d3..7d18b3f 100644 --- a/dist/lib/signedCredential.d.ts +++ b/dist/lib/signedCredential.d.ts @@ -4,13 +4,13 @@ import { SignedJsonLdObject } from './linkedData'; export interface ISignedCredentialAttrs extends SignedJsonLdObject, ICredentialAttrs { id: string; issuer: string; - issued: string; + issuanceDate: string; expires?: string; - claim: IClaimSection; + credentialSubject: IClaimSection; } export interface ISignedCredCreationArgs { metadata: T; - claim: T['claimInterface']; + credentialSubject: T['claimInterface']; subject: string; } export interface IKeyMetadata { diff --git a/lib/credential.ts b/lib/credential.ts index 588e39c..b40bfbe 100644 --- a/lib/credential.ts +++ b/lib/credential.ts @@ -27,5 +27,5 @@ export interface IClaimSection { export interface ICredentialAttrs extends JsonLdObject { type: string[] name?: string - claim: ClaimEntry + credentialSubject: ClaimEntry } diff --git a/lib/signedCredential.ts b/lib/signedCredential.ts index 7cfb791..4819e8e 100644 --- a/lib/signedCredential.ts +++ b/lib/signedCredential.ts @@ -5,15 +5,15 @@ import { SignedJsonLdObject } from './linkedData' export interface ISignedCredentialAttrs extends SignedJsonLdObject, ICredentialAttrs { id: string issuer: string - issued: string + issuanceDate: string expires?: string - claim: IClaimSection + credentialSubject: IClaimSection } /* Allows for neat claim autocompletion based on metadata type */ export interface ISignedCredCreationArgs { metadata: T - claim: T['claimInterface'] + credentialSubject: T['claimInterface'] subject: string }