-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into release/v4.0.0
- Loading branch information
Showing
12 changed files
with
149 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
import { IPublicKeySectionAttrs, IAuthenticationSectionAttrs, IServiceEndpointSectionAttrs } from './sections/types'; | ||
import { ILinkedDataSignatureAttrs } from '../../linkedDataSignature/types'; | ||
import { ContextEntry } from 'cred-types-jolocom-core'; | ||
export interface IDidDocumentAttrs { | ||
'@context': ContextEntry[]; | ||
import { SignedJsonLdObject } from '../../linkedData/types'; | ||
export interface IDidDocumentAttrs extends SignedJsonLdObject { | ||
id: string; | ||
authentication: IAuthenticationSectionAttrs[]; | ||
publicKey: IPublicKeySectionAttrs[]; | ||
service: IServiceEndpointSectionAttrs[]; | ||
created: string; | ||
proof: ILinkedDataSignatureAttrs; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/// <reference types="node" /> | ||
import { ILinkedDataSignatureAttrs } from '../linkedDataSignature/types'; | ||
import { IRegistry } from '../registries/types'; | ||
import { JsonLdObject, SignedJsonLdObject, JsonLdContext } from './types'; | ||
export declare const normalizeJsonLd: ({ ["@context"]: _, ...data }: JsonLdObject, context: JsonLdContext) => Promise<any>; | ||
export declare const normalizeLdProof: ({ signatureValue, id, type, ...toNormalize }: ILinkedDataSignatureAttrs, context: JsonLdContext) => Promise<string>; | ||
export declare const digestJsonLd: ({ proof, ["@context"]: _, ...data }: SignedJsonLdObject, context: JsonLdContext) => Promise<Buffer>; | ||
export declare const validateJsonLd: (json: SignedJsonLdObject, customRegistry?: IRegistry) => Promise<boolean>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { ILinkedDataSignatureAttrs } from '../linkedDataSignature/types'; | ||
import { ContextEntry } from 'cred-types-jolocom-core'; | ||
declare type JsonLdPrimitive = string | number | boolean | JsonLdObject | JsonLdObject[]; | ||
export declare type JsonLdContext = ContextEntry | ContextEntry[]; | ||
export interface JsonLdObject { | ||
'@context'?: JsonLdContext; | ||
[key: string]: JsonLdPrimitive | JsonLdPrimitive[]; | ||
} | ||
export interface SignedJsonLdObject extends JsonLdObject { | ||
proof: ILinkedDataSignatureAttrs; | ||
} | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,105 @@ | ||
import { ContextEntry } from 'cred-types-jolocom-core'; | ||
export declare const defaultContext: ContextEntry[]; | ||
export declare const defaultContextIdentity: ContextEntry[]; | ||
export declare const defaultContext: { | ||
id: string; | ||
type: string; | ||
cred: string; | ||
schema: string; | ||
dc: string; | ||
xsd: string; | ||
sec: string; | ||
Credential: string; | ||
issuer: { | ||
'@id': string; | ||
'@type': string; | ||
}; | ||
issued: { | ||
'@id': string; | ||
'@type': string; | ||
}; | ||
claim: { | ||
'@id': string; | ||
'@type': string; | ||
}; | ||
credential: { | ||
'@id': string; | ||
'@type': string; | ||
}; | ||
expires: { | ||
'@id': string; | ||
'@type': string; | ||
}; | ||
proof: { | ||
'@id': string; | ||
'@type': string; | ||
}; | ||
EcdsaKoblitzSignature2016: string; | ||
created: { | ||
'@id': string; | ||
'@type': string; | ||
}; | ||
creator: { | ||
'@id': string; | ||
'@type': string; | ||
}; | ||
domain: string; | ||
nonce: string; | ||
signatureValue: string; | ||
}[]; | ||
export declare const defaultContextIdentity: { | ||
id: string; | ||
type: string; | ||
dc: string; | ||
rdfs: string; | ||
schema: string; | ||
sec: string; | ||
didv: string; | ||
xsd: string; | ||
AuthenticationSuite: string; | ||
CryptographicKey: string; | ||
LinkedDataSignature2016: string; | ||
authentication: string; | ||
created: { | ||
'@id': string; | ||
'@type': string; | ||
}; | ||
creator: { | ||
'@id': string; | ||
'@type': string; | ||
}; | ||
digestAlgorithm: string; | ||
digestValue: string; | ||
domain: string; | ||
entity: string; | ||
expires: { | ||
'@id': string; | ||
'@type': string; | ||
}; | ||
name: string; | ||
nonce: string; | ||
normalizationAlgorithm: string; | ||
owner: { | ||
'@id': string; | ||
'@type': string; | ||
}; | ||
privateKey: { | ||
'@id': string; | ||
'@type': string; | ||
}; | ||
proof: string; | ||
proofAlgorithm: string; | ||
proofType: string; | ||
proofValue: string; | ||
publicKey: { | ||
'@id': string; | ||
'@type': string; | ||
'@container': string; | ||
}; | ||
publicKeyHex: string; | ||
requiredProof: string; | ||
revoked: { | ||
'@id': string; | ||
'@type': string; | ||
}; | ||
signature: string; | ||
signatureAlgorithm: string; | ||
signatureValue: string; | ||
}[]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters