diff --git a/DEVREADME.md b/DEVREADME.md index 63904f7dd1..9646a37bab 100644 --- a/DEVREADME.md +++ b/DEVREADME.md @@ -2,6 +2,11 @@ This file is intended for developers working on the internals of the framework. If you're just looking how to get started with the framework, see the [docs](./docs) +## Installing dependencies + +Right now, as a patch that will later be changed, some platforms will have an "error" when installing the dependencies with yarn. This is because the BBS signatures library that we use is built for Linux x86 and MacOS x86 (and not Windows and MacOS arm). This means that it will show that it could not download the binary. +This is not an error for developers, the library that fails is `node-bbs-signaturs` and is an optional dependency for perfomance improvements. It will fallback to a, slower, wasm build. + ## Running tests Test are executed using jest. Some test require either the **mediator agents** or the **ledger** to be running. When running tests that require a connection to the ledger pool, you need to set the `TEST_AGENT_PUBLIC_DID_SEED` and `GENESIS_TXN_PATH` environment variables. diff --git a/packages/core/package.json b/packages/core/package.json index 80a6925341..9e69e5d54e 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -23,9 +23,14 @@ "prepublishOnly": "yarn run build" }, "dependencies": { + "@digitalcredentials/jsonld": "^5.2.1", + "@digitalcredentials/jsonld-signatures": "^9.3.1", + "@digitalcredentials/vc": "^1.1.2", "@mattrglobal/bbs-signatures": "^1.0.0", + "@mattrglobal/bls12381-key-pair": "^1.0.0", "@multiformats/base-x": "^4.0.1", "@stablelib/ed25519": "^1.0.2", + "@stablelib/random": "^1.0.1", "@stablelib/sha256": "^1.0.1", "@types/indy-sdk": "^1.16.16", "@types/node-fetch": "^2.5.10", diff --git a/packages/core/src/crypto/LdKeyPair.ts b/packages/core/src/crypto/LdKeyPair.ts new file mode 100644 index 0000000000..3a46c47c1a --- /dev/null +++ b/packages/core/src/crypto/LdKeyPair.ts @@ -0,0 +1,51 @@ +import type { VerificationMethod } from '../modules/dids' + +export interface LdKeyPairOptions { + id: string + controller: string +} + +export abstract class LdKeyPair { + public readonly id: string + public readonly controller: string + public abstract type: string + + public constructor(options: LdKeyPairOptions) { + this.id = options.id + this.controller = options.controller + } + + public static async generate(): Promise { + throw new Error('Not implemented') + } + + // eslint-disable-next-line @typescript-eslint/no-unused-vars + public static async from(verificationMethod: VerificationMethod): Promise { + throw new Error('Abstract method from() must be implemented in subclass.') + } + + public export(publicKey = false, privateKey = false) { + if (!publicKey && !privateKey) { + throw new Error('Export requires specifying either "publicKey" or "privateKey".') + } + const key = { + id: this.id, + type: this.type, + controller: this.controller, + } + + return key + } + + public abstract fingerprint(): string + + public abstract verifyFingerprint(fingerprint: string): boolean + + public abstract signer(): { + sign: (data: { data: Uint8Array | Uint8Array[] }) => Promise> + } + + public abstract verifier(): { + verify: (data: { data: Uint8Array | Uint8Array[]; signature: Uint8Array }) => Promise + } +} diff --git a/packages/core/src/crypto/WalletKeyPair.ts b/packages/core/src/crypto/WalletKeyPair.ts new file mode 100644 index 0000000000..bf7873b99c --- /dev/null +++ b/packages/core/src/crypto/WalletKeyPair.ts @@ -0,0 +1,123 @@ +import type { Wallet } from '..' +import type { Key } from './Key' +import type { LdKeyPairOptions } from './LdKeyPair' + +import { VerificationMethod } from '../modules/dids' +import { getKeyDidMappingByVerificationMethod } from '../modules/dids/domain/key-type/keyDidMapping' +import { JsonTransformer } from '../utils' +import { MessageValidator } from '../utils/MessageValidator' +import { Buffer } from '../utils/buffer' + +import { LdKeyPair } from './LdKeyPair' + +interface WalletKeyPairOptions extends LdKeyPairOptions { + wallet: Wallet + key: Key +} + +export function createWalletKeyPairClass(wallet: Wallet) { + return class WalletKeyPair extends LdKeyPair { + public wallet: Wallet + public key: Key + public type: string + + public constructor(options: WalletKeyPairOptions) { + super(options) + this.wallet = options.wallet + this.key = options.key + this.type = options.key.keyType + } + + public static async generate(): Promise { + throw new Error('Not implemented') + } + + public fingerprint(): string { + throw new Error('Method not implemented.') + } + + // eslint-disable-next-line @typescript-eslint/no-unused-vars + public verifyFingerprint(fingerprint: string): boolean { + throw new Error('Method not implemented.') + } + + public static async from(verificationMethod: VerificationMethod): Promise { + const vMethod = JsonTransformer.fromJSON(verificationMethod, VerificationMethod) + await MessageValidator.validate(vMethod) + const { getKeyFromVerificationMethod } = getKeyDidMappingByVerificationMethod(vMethod) + const key = getKeyFromVerificationMethod(vMethod) + + return new WalletKeyPair({ + id: vMethod.id, + controller: vMethod.controller, + wallet: wallet, + key: key, + }) + } + + /** + * This method returns a wrapped wallet.sign method. The method is being wrapped so we can covert between Uint8Array and Buffer. This is to make it compatible with the external signature libraries. + */ + public signer(): { sign: (data: { data: Uint8Array | Uint8Array[] }) => Promise } { + // wrap function for conversion + const wrappedSign = async (data: { data: Uint8Array | Uint8Array[] }): Promise => { + let converted: Buffer | Buffer[] = [] + + // convert uint8array to buffer + if (Array.isArray(data.data)) { + converted = data.data.map((d) => Buffer.from(d)) + } else { + converted = Buffer.from(data.data) + } + + // sign + const result = await wallet.sign({ + data: converted, + key: this.key, + }) + + // convert result buffer to uint8array + return Uint8Array.from(result) + } + + return { + sign: wrappedSign.bind(this), + } + } + + /** + * This method returns a wrapped wallet.verify method. The method is being wrapped so we can covert between Uint8Array and Buffer. This is to make it compatible with the external signature libraries. + */ + public verifier(): { + verify: (data: { data: Uint8Array | Uint8Array[]; signature: Uint8Array }) => Promise + } { + const wrappedVerify = async (data: { + data: Uint8Array | Uint8Array[] + signature: Uint8Array + }): Promise => { + let converted: Buffer | Buffer[] = [] + + // convert uint8array to buffer + if (Array.isArray(data.data)) { + converted = data.data.map((d) => Buffer.from(d)) + } else { + converted = Buffer.from(data.data) + } + + // verify + return wallet.verify({ + data: converted, + signature: Buffer.from(data.signature), + key: this.key, + }) + } + return { + verify: wrappedVerify.bind(this), + } + } + + public get publicKeyBuffer(): Uint8Array { + return new Uint8Array(this.key.publicKey) + } + } +} diff --git a/packages/core/src/crypto/signature-suites/JwsLinkedDataSignature.ts b/packages/core/src/crypto/signature-suites/JwsLinkedDataSignature.ts new file mode 100644 index 0000000000..e062d503da --- /dev/null +++ b/packages/core/src/crypto/signature-suites/JwsLinkedDataSignature.ts @@ -0,0 +1,270 @@ +/*! + * Copyright (c) 2020-2021 Digital Bazaar, Inc. All rights reserved. + */ +import type { DocumentLoader, Proof, VerificationMethod } from '../../utils' +import type { LdKeyPair } from '../LdKeyPair' + +import { suites } from '../../../types/jsonld-signatures' +import { AriesFrameworkError } from '../../error' +import { TypedArrayEncoder, JsonEncoder } from '../../utils' + +const LinkedDataSignature = suites.LinkedDataSignature +export interface JwsLinkedDataSignatureOptions { + type: string + algorithm: string + LDKeyClass: typeof LdKeyPair + key?: LdKeyPair + proof: Proof + date: string + contextUrl: string + useNativeCanonize: boolean +} + +export class JwsLinkedDataSignature extends LinkedDataSignature { + /** + * @param options - Options hashmap. + * @param options.type - Provided by subclass. + * @param options.alg - JWS alg provided by subclass. + * @param [options.LDKeyClass] - Provided by subclass or subclass + * overrides `getVerificationMethod`. + * + * Either a `key` OR at least one of `signer`/`verifier` is required. + * + * @param [options.key] - An optional key object (containing an + * `id` property, and either `signer` or `verifier`, depending on the + * intended operation. Useful for when the application is managing keys + * itself (when using a KMS, you never have access to the private key, + * and so should use the `signer` param instead). + * + * Advanced optional parameters and overrides. + * + * @param [options.proof] - A JSON-LD document with options to use + * for the `proof` node. Any other custom fields can be provided here + * using a context different from `security-v2`. + * @param [options.date] - Signing date to use if not passed. + * @param options.contextUrl - JSON-LD context url that corresponds + * to this signature suite. Used for enforcing suite context during the + * `sign()` operation. + * @param [options.useNativeCanonize] - Whether to use a native + * canonize algorithm. + */ + public constructor(options: JwsLinkedDataSignatureOptions) { + super({ + type: options.type, + LDKeyClass: options.LDKeyClass, + contextUrl: options.contextUrl, + key: options.key, + signer: undefined, + verifier: undefined, + proof: options.proof, + date: options.date, + useNativeCanonize: options.useNativeCanonize, + }) + this.alg = options.algorithm + } + + /** + * @param options - Options hashmap. + * @param options.verifyData - The data to sign. + * @param options.proof - A JSON-LD document with options to use + * for the `proof` node. Any other custom fields can be provided here + * using a context different from `security-v2`. + * + * @returns The proof containing the signature value. + */ + public async sign(options: { verifyData: Uint8Array; proof: Proof }) { + if (!(this.signer && typeof this.signer.sign === 'function')) { + throw new Error('A signer API has not been specified.') + } + // JWS header + const header = { + alg: this.alg, + b64: false, + crit: ['b64'], + } + + /* + +-------+-----------------------------------------------------------+ + | "b64" | JWS Signing Input Formula | + +-------+-----------------------------------------------------------+ + | true | ASCII(BASE64URL(UTF8(JWS Protected Header)) || '.' || | + | | BASE64URL(JWS Payload)) | + | | | + | false | ASCII(BASE64URL(UTF8(JWS Protected Header)) || '.') || | + | | JWS Payload | + +-------+-----------------------------------------------------------+ + */ + + // create JWS data and sign + const encodedHeader = JsonEncoder.toBase64URL(header) + + const data = _createJws({ encodedHeader, verifyData: options.verifyData }) + + const signature = await this.signer.sign({ data }) + + // create detached content signature + const encodedSignature = TypedArrayEncoder.toBase64URL(signature) + options.proof.jws = encodedHeader + '..' + encodedSignature + return options.proof + } + + /** + * @param options - Options hashmap. + * @param options.verifyData - The data to verify. + * @param options.verificationMethod - A verification method. + * @param options.proof - The proof to be verified. + * + * @returns Resolves with the verification result. + */ + public async verifySignature(options: { + verifyData: Uint8Array + verificationMethod: VerificationMethod + proof: Proof + }) { + if (!(options.proof.jws && typeof options.proof.jws === 'string' && options.proof.jws.includes('.'))) { + throw new TypeError('The proof does not include a valid "jws" property.') + } + // add payload into detached content signature + const [encodedHeader /*payload*/, , encodedSignature] = options.proof.jws.split('.') + + let header + try { + header = JsonEncoder.fromBase64(encodedHeader) + } catch (e) { + throw new Error('Could not parse JWS header; ' + e) + } + if (!(header && typeof header === 'object')) { + throw new Error('Invalid JWS header.') + } + + // confirm header matches all expectations + if ( + !( + header.alg === this.alg && + header.b64 === false && + Array.isArray(header.crit) && + header.crit.length === 1 && + header.crit[0] === 'b64' + ) && + Object.keys(header).length === 3 + ) { + throw new Error(`Invalid JWS header parameters for ${this.type}.`) + } + + // do signature verification + const signature = TypedArrayEncoder.fromBase64(encodedSignature) + + const data = _createJws({ encodedHeader, verifyData: options.verifyData }) + + let { verifier } = this + if (!verifier) { + const key = await this.LDKeyClass.from(options.verificationMethod) + verifier = key.verifier() + } + return verifier.verify({ data, signature }) + } + + public async getVerificationMethod(options: { proof: Proof; documentLoader?: DocumentLoader }) { + if (this.key) { + // This happens most often during sign() operations. For verify(), + // the expectation is that the verification method will be fetched + // by the documentLoader (below), not provided as a `key` parameter. + return this.key.export({ publicKey: true }) + } + + let { verificationMethod } = options.proof + + if (typeof verificationMethod === 'object' && verificationMethod !== null) { + verificationMethod = verificationMethod.id + } + + if (!verificationMethod) { + throw new Error('No "verificationMethod" found in proof.') + } + + if (!options.documentLoader) { + throw new AriesFrameworkError( + 'Missing custom document loader. This is required for resolving verification methods.' + ) + } + + const { document } = await options.documentLoader(verificationMethod) + + verificationMethod = typeof document === 'string' ? JSON.parse(document) : document + + await this.assertVerificationMethod(verificationMethod) + return verificationMethod + } + + /** + * Checks whether a given proof exists in the document. + * + * @param options - Options hashmap. + * @param options.proof - A proof. + * @param options.document - A JSON-LD document. + * @param options.purpose - A jsonld-signatures ProofPurpose + * instance (e.g. AssertionProofPurpose, AuthenticationProofPurpose, etc). + * @param options.documentLoader - A secure document loader (it is + * recommended to use one that provides static known documents, instead of + * fetching from the web) for returning contexts, controller documents, + * keys, and other relevant URLs needed for the proof. + * @param [options.expansionMap] - A custom expansion map that is + * passed to the JSON-LD processor; by default a function that will throw + * an error when unmapped properties are detected in the input, use `false` + * to turn this off and allow unmapped properties to be dropped or use a + * custom function. + * + * @returns Whether a match for the proof was found. + */ + public async matchProof(options: { + proof: Proof + document: VerificationMethod + // eslint-disable-next-line @typescript-eslint/no-explicit-any + purpose: any + documentLoader?: DocumentLoader + expansionMap?: () => void + }) { + const proofMatches = await super.matchProof({ + proof: options.proof, + document: options.document, + purpose: options.purpose, + documentLoader: options.documentLoader, + expansionMap: options.expansionMap, + }) + if (!proofMatches) { + return false + } + // NOTE: When subclassing this suite: Extending suites will need to check + + if (!this.key) { + // no key specified, so assume this suite matches and it can be retrieved + return true + } + + const { verificationMethod } = options.proof + + // only match if the key specified matches the one in the proof + if (typeof verificationMethod === 'object') { + return verificationMethod.id === this.key.id + } + return verificationMethod === this.key.id + } +} + +/** + * Creates the bytes ready for signing. + * + * @param {object} options - Options hashmap. + * @param {string} options.encodedHeader - A base64url encoded JWT header. + * @param {Uint8Array} options.verifyData - Payload to sign/verify. + * @returns {Uint8Array} A combined byte array for signing. + */ +function _createJws(options: { encodedHeader: string; verifyData: Uint8Array }): Uint8Array { + const encodedHeaderBytes = TypedArrayEncoder.fromString(options.encodedHeader + '.') + + // concatenate the two uint8arrays + const data = new Uint8Array(encodedHeaderBytes.length + options.verifyData.length) + data.set(encodedHeaderBytes, 0) + data.set(options.verifyData, encodedHeaderBytes.length) + return data +} diff --git a/packages/core/src/crypto/signature-suites/bbs/BbsBlsSignature2020.ts b/packages/core/src/crypto/signature-suites/bbs/BbsBlsSignature2020.ts new file mode 100644 index 0000000000..094d697e57 --- /dev/null +++ b/packages/core/src/crypto/signature-suites/bbs/BbsBlsSignature2020.ts @@ -0,0 +1,412 @@ +/* + * Copyright 2020 - MATTR Limited + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import type { JsonObject } from '../../../types' +import type { DocumentLoader, Proof, VerificationMethod } from '../../../utils' +import type { + SignatureSuiteOptions, + CreateProofOptions, + CanonizeOptions, + CreateVerifyDataOptions, + VerifyProofOptions, + VerifySignatureOptions, + SuiteSignOptions, +} from './types' + +import jsonld from '../../../../types/jsonld' +import { suites } from '../../../../types/jsonld-signatures' +import { AriesFrameworkError } from '../../../error' +import { SECURITY_CONTEXT_BBS_URL, SECURITY_CONTEXT_URL } from '../../../modules/vc/constants' +import { w3cDate, TypedArrayEncoder } from '../../../utils' + +/** + * A BBS+ signature suite for use with BLS12-381 key pairs + */ +export class BbsBlsSignature2020 extends suites.LinkedDataProof { + private proof: Record + /** + * Default constructor + * @param options {SignatureSuiteOptions} options for constructing the signature suite + */ + public constructor(options: SignatureSuiteOptions = {}) { + const { verificationMethod, signer, key, date, useNativeCanonize, LDKeyClass } = options + // validate common options + if (verificationMethod !== undefined && typeof verificationMethod !== 'string') { + throw new TypeError('"verificationMethod" must be a URL string.') + } + super({ + type: 'BbsBlsSignature2020', + }) + + this.proof = { + '@context': [ + { + sec: 'https://w3id.org/security#', + proof: { + '@id': 'sec:proof', + '@type': '@id', + '@container': '@graph', + }, + }, + SECURITY_CONTEXT_BBS_URL, + ], + type: 'BbsBlsSignature2020', + } + + this.LDKeyClass = LDKeyClass + this.signer = signer + this.verificationMethod = verificationMethod + this.proofSignatureKey = 'proofValue' + if (key) { + if (verificationMethod === undefined) { + this.verificationMethod = key.id + } + this.key = key + if (typeof key.signer === 'function') { + this.signer = key.signer() + } + if (typeof key.verifier === 'function') { + this.verifier = key.verifier() + } + } + if (date) { + this.date = new Date(date) + + if (isNaN(this.date)) { + throw TypeError(`"date" "${date}" is not a valid date.`) + } + } + this.useNativeCanonize = useNativeCanonize + } + + public ensureSuiteContext({ document }: { document: Record }) { + if ( + document['@context'] === SECURITY_CONTEXT_BBS_URL || + (Array.isArray(document['@context']) && document['@context'].includes(SECURITY_CONTEXT_BBS_URL)) + ) { + // document already includes the required context + return + } + throw new TypeError( + `The document to be signed must contain this suite's @context, ` + `"${SECURITY_CONTEXT_BBS_URL}".` + ) + } + + /** + * @param options {CreateProofOptions} options for creating the proof + * + * @returns {Promise} Resolves with the created proof object. + */ + public async createProof(options: CreateProofOptions): Promise> { + const { document, purpose, documentLoader, expansionMap, compactProof } = options + + let proof: JsonObject + + // use proof JSON-LD document passed to API + if (this.proof) { + proof = await jsonld.compact(this.proof, SECURITY_CONTEXT_URL, { + documentLoader, + expansionMap, + compactToRelative: true, + }) + } else { + // create proof JSON-LD document + proof = { '@context': SECURITY_CONTEXT_URL } + } + + // ensure proof type is set + proof.type = this.type + + // set default `now` date if not given in `proof` or `options` + let date = this.date + if (proof.created === undefined && date === undefined) { + date = new Date() + } + + // ensure date is in string format + if (date !== undefined && typeof date !== 'string') { + date = w3cDate(date) + } + + // add API overrides + if (date !== undefined) { + proof.created = date + } + + if (this.verificationMethod !== undefined) { + proof.verificationMethod = this.verificationMethod + } + + // allow purpose to update the proof; the `proof` is in the + // SECURITY_CONTEXT_URL `@context` -- therefore the `purpose` must + // ensure any added fields are also represented in that same `@context` + proof = await purpose.update(proof, { + document, + suite: this, + documentLoader, + expansionMap, + }) + + // create data to sign + const verifyData = ( + await this.createVerifyData({ + document, + proof, + documentLoader, + expansionMap, + compactProof, + }) + ).map((item) => new Uint8Array(TypedArrayEncoder.fromString(item))) + + // sign data + proof = await this.sign({ + verifyData, + document, + proof, + documentLoader, + expansionMap, + }) + delete proof['@context'] + + return proof + } + + /** + * @param options {object} options for verifying the proof. + * + * @returns {Promise<{object}>} Resolves with the verification result. + */ + public async verifyProof(options: VerifyProofOptions): Promise> { + const { proof, document, documentLoader, expansionMap, purpose } = options + + try { + // create data to verify + const verifyData = ( + await this.createVerifyData({ + document, + proof, + documentLoader, + expansionMap, + compactProof: false, + }) + ).map((item) => new Uint8Array(TypedArrayEncoder.fromString(item))) + + // fetch verification method + const verificationMethod = await this.getVerificationMethod({ + proof, + documentLoader, + }) + + // verify signature on data + const verified = await this.verifySignature({ + verifyData, + verificationMethod, + document, + proof, + documentLoader, + expansionMap, + }) + if (!verified) { + throw new Error('Invalid signature.') + } + + // ensure proof was performed for a valid purpose + const { valid, error } = await purpose.validate(proof, { + document, + suite: this, + verificationMethod, + documentLoader, + expansionMap, + }) + if (!valid) { + throw error + } + + return { verified: true } + } catch (error) { + return { verified: false, error } + } + } + + public async canonize(input: Record, options: CanonizeOptions): Promise { + const { documentLoader, expansionMap, skipExpansion } = options + return jsonld.canonize(input, { + algorithm: 'URDNA2015', + format: 'application/n-quads', + documentLoader, + expansionMap, + skipExpansion, + useNative: this.useNativeCanonize, + }) + } + + public async canonizeProof(proof: Record, options: CanonizeOptions): Promise { + const { documentLoader, expansionMap } = options + proof = { ...proof } + delete proof[this.proofSignatureKey] + return this.canonize(proof, { + documentLoader, + expansionMap, + skipExpansion: false, + }) + } + + /** + * @param document {CreateVerifyDataOptions} options to create verify data + * + * @returns {Promise<{string[]>}. + */ + public async createVerifyData(options: CreateVerifyDataOptions): Promise { + const { proof, document, documentLoader, expansionMap } = options + + const proof2 = { ...proof, '@context': document['@context'] } + + const proofStatements = await this.createVerifyProofData(proof2, { + documentLoader, + expansionMap, + }) + const documentStatements = await this.createVerifyDocumentData(document, { + documentLoader, + expansionMap, + }) + + // concatenate c14n proof options and c14n document + return proofStatements.concat(documentStatements) + } + + /** + * @param proof to canonicalize + * @param options to create verify data + * + * @returns {Promise<{string[]>}. + */ + public async createVerifyProofData( + proof: Record, + { documentLoader, expansionMap }: { documentLoader?: DocumentLoader; expansionMap?: () => void } + ): Promise { + const c14nProofOptions = await this.canonizeProof(proof, { + documentLoader, + expansionMap, + }) + + return c14nProofOptions.split('\n').filter((_) => _.length > 0) + } + + /** + * @param document to canonicalize + * @param options to create verify data + * + * @returns {Promise<{string[]>}. + */ + public async createVerifyDocumentData( + document: Record, + { documentLoader, expansionMap }: { documentLoader?: DocumentLoader; expansionMap?: () => void } + ): Promise { + const c14nDocument = await this.canonize(document, { + documentLoader, + expansionMap, + }) + + return c14nDocument.split('\n').filter((_) => _.length > 0) + } + + /** + * @param document {object} to be signed. + * @param proof {object} + * @param documentLoader {function} + * @param expansionMap {function} + */ + public async getVerificationMethod({ + proof, + documentLoader, + }: { + proof: Proof + documentLoader?: DocumentLoader + }): Promise { + let { verificationMethod } = proof + + if (typeof verificationMethod === 'object' && verificationMethod !== null) { + verificationMethod = verificationMethod.id + } + + if (!verificationMethod) { + throw new Error('No "verificationMethod" found in proof.') + } + + if (!documentLoader) { + throw new AriesFrameworkError( + 'Missing custom document loader. This is required for resolving verification methods.' + ) + } + + const { document } = await documentLoader(verificationMethod) + + if (!document) { + throw new Error(`Verification method ${verificationMethod} not found.`) + } + + // ensure verification method has not been revoked + if (document.revoked !== undefined) { + throw new Error('The verification method has been revoked.') + } + + return document as VerificationMethod + } + + /** + * @param options {SuiteSignOptions} Options for signing. + * + * @returns {Promise<{object}>} the proof containing the signature value. + */ + public async sign(options: SuiteSignOptions): Promise { + const { verifyData, proof } = options + + if (!(this.signer && typeof this.signer.sign === 'function')) { + throw new Error('A signer API with sign function has not been specified.') + } + + const proofValue: Uint8Array = await this.signer.sign({ + data: verifyData, + }) + + proof[this.proofSignatureKey] = TypedArrayEncoder.toBase64(proofValue) + + return proof as Proof + } + + /** + * @param verifyData {VerifySignatureOptions} Options to verify the signature. + * + * @returns {Promise} + */ + public async verifySignature(options: VerifySignatureOptions): Promise { + const { verificationMethod, verifyData, proof } = options + let { verifier } = this + + if (!verifier) { + const key = await this.LDKeyClass.from(verificationMethod) + verifier = key.verifier(key, this.alg, this.type) + } + + return await verifier.verify({ + data: verifyData, + signature: new Uint8Array(TypedArrayEncoder.fromBase64(proof[this.proofSignatureKey] as string)), + }) + } + + public static proofType = [ + 'BbsBlsSignature2020', + 'sec:BbsBlsSignature2020', + 'https://w3id.org/security#BbsBlsSignature2020', + ] +} diff --git a/packages/core/src/crypto/signature-suites/bbs/BbsBlsSignatureProof2020.ts b/packages/core/src/crypto/signature-suites/bbs/BbsBlsSignatureProof2020.ts new file mode 100644 index 0000000000..c785986435 --- /dev/null +++ b/packages/core/src/crypto/signature-suites/bbs/BbsBlsSignatureProof2020.ts @@ -0,0 +1,422 @@ +/* + * Copyright 2020 - MATTR Limited + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import type { JsonObject } from '../../../types' +import type { DocumentLoader, Proof } from '../../../utils' +import type { DeriveProofOptions, VerifyProofOptions, CreateVerifyDataOptions, CanonizeOptions } from './types' +import type { VerifyProofResult } from './types/VerifyProofResult' + +import { blsCreateProof, blsVerifyProof } from '@mattrglobal/bbs-signatures' +import { Bls12381G2KeyPair } from '@mattrglobal/bls12381-key-pair' +import { randomBytes } from '@stablelib/random' + +import jsonld from '../../../../types/jsonld' +import { suites } from '../../../../types/jsonld-signatures' +import { AriesFrameworkError } from '../../../error' +import { SECURITY_CONTEXT_URL } from '../../../modules/vc/constants' +import { TypedArrayEncoder } from '../../../utils' + +import { BbsBlsSignature2020 } from './BbsBlsSignature2020' + +export class BbsBlsSignatureProof2020 extends suites.LinkedDataProof { + public constructor({ useNativeCanonize, key, LDKeyClass }: Record = {}) { + super({ + type: 'BbsBlsSignatureProof2020', + }) + + this.proof = { + '@context': [ + { + sec: 'https://w3id.org/security#', + proof: { + '@id': 'sec:proof', + '@type': '@id', + '@container': '@graph', + }, + }, + 'https://w3id.org/security/bbs/v1', + ], + type: 'BbsBlsSignatureProof2020', + } + this.mappedDerivedProofType = 'BbsBlsSignature2020' + this.supportedDeriveProofType = BbsBlsSignatureProof2020.supportedDerivedProofType + + this.LDKeyClass = LDKeyClass ?? Bls12381G2KeyPair + this.proofSignatureKey = 'proofValue' + this.key = key + this.useNativeCanonize = useNativeCanonize + } + + /** + * Derive a proof from a proof and reveal document + * + * @param options {object} options for deriving a proof. + * + * @returns {Promise} Resolves with the derived proof object. + */ + public async deriveProof(options: DeriveProofOptions): Promise> { + const { document, proof, revealDocument, documentLoader, expansionMap } = options + let { nonce } = options + + const proofType = proof.type + + if (typeof proofType !== 'string') { + throw new TypeError(`Expected proof.type to be of type 'string', got ${typeof proofType} instead.`) + } + + // Validate that the input proof document has a proof compatible with this suite + if (!BbsBlsSignatureProof2020.supportedDerivedProofType.includes(proofType)) { + throw new TypeError( + `proof document proof incompatible, expected proof types of ${JSON.stringify( + BbsBlsSignatureProof2020.supportedDerivedProofType + )} received ${proof.type}` + ) + } + + const signatureBase58 = proof[this.proofSignatureKey] + + if (typeof signatureBase58 !== 'string') { + throw new TypeError(`Expected signature to be a base58 encoded string, got ${typeof signatureBase58} instead.`) + } + + //Extract the BBS signature from the input proof + const signature = TypedArrayEncoder.fromBase64(signatureBase58) + + //Initialize the BBS signature suite + const suite = new BbsBlsSignature2020() + + //Initialize the derived proof + let derivedProof + if (this.proof) { + // use proof JSON-LD document passed to API + derivedProof = await jsonld.compact(this.proof, SECURITY_CONTEXT_URL, { + documentLoader, + expansionMap, + compactToRelative: false, + }) + } else { + // create proof JSON-LD document + derivedProof = { '@context': SECURITY_CONTEXT_URL } + } + + // ensure proof type is set + derivedProof.type = this.type + + // Get the input document statements + const documentStatements = await suite.createVerifyDocumentData(document, { + documentLoader, + expansionMap, + }) + + // Get the proof statements + const proofStatements = await suite.createVerifyProofData(proof, { + documentLoader, + expansionMap, + }) + + // Transform any blank node identifiers for the input + // document statements into actual node identifiers + // e.g _:c14n0 => urn:bnid:_:c14n0 + const transformedInputDocumentStatements = documentStatements.map((element) => + element.replace(/(_:c14n[0-9]+)/g, '') + ) + + //Transform the resulting RDF statements back into JSON-LD + const compactInputProofDocument = await jsonld.fromRDF(transformedInputDocumentStatements.join('\n')) + + // Frame the result to create the reveal document result + const revealDocumentResult = await jsonld.frame(compactInputProofDocument, revealDocument, { documentLoader }) + + // Canonicalize the resulting reveal document + const revealDocumentStatements = await suite.createVerifyDocumentData(revealDocumentResult, { + documentLoader, + expansionMap, + }) + + //Get the indicies of the revealed statements from the transformed input document offset + //by the number of proof statements + const numberOfProofStatements = proofStatements.length + + //Always reveal all the statements associated to the original proof + //these are always the first statements in the normalized form + const proofRevealIndicies = Array.from(Array(numberOfProofStatements).keys()) + + //Reveal the statements indicated from the reveal document + const documentRevealIndicies = revealDocumentStatements.map( + (key) => transformedInputDocumentStatements.indexOf(key) + numberOfProofStatements + ) + + // Check there is not a mismatch + if (documentRevealIndicies.length !== revealDocumentStatements.length) { + throw new Error('Some statements in the reveal document not found in original proof') + } + + // Combine all indicies to get the resulting list of revealed indicies + const revealIndicies = proofRevealIndicies.concat(documentRevealIndicies) + + // Create a nonce if one is not supplied + if (!nonce) { + nonce = randomBytes(50) + } + + // Set the nonce on the derived proof + // derivedProof.nonce = Buffer.from(nonce).toString('base64') + derivedProof.nonce = TypedArrayEncoder.toBase64(nonce) + + //Combine all the input statements that + //were originally signed to generate the proof + const allInputStatements: Uint8Array[] = proofStatements + .concat(documentStatements) + .map((item) => new Uint8Array(TypedArrayEncoder.fromString(item))) + + // Fetch the verification method + const verificationMethod = await this.getVerificationMethod({ + proof, + documentLoader, + }) + + // Construct a key pair class from the returned verification method + const key = verificationMethod.publicKeyJwk + ? await this.LDKeyClass.fromJwk(verificationMethod) + : await this.LDKeyClass.from(verificationMethod) + + // Compute the proof + const outputProof = await blsCreateProof({ + signature, + publicKey: key.publicKeyBuffer, + messages: allInputStatements, + nonce, + revealed: revealIndicies, + }) + + // Set the proof value on the derived proof + derivedProof.proofValue = TypedArrayEncoder.toBase64(outputProof) + + // Set the relevant proof elements on the derived proof from the input proof + derivedProof.verificationMethod = proof.verificationMethod + derivedProof.proofPurpose = proof.proofPurpose + derivedProof.created = proof.created + + return { + document: { ...revealDocumentResult }, + proof: derivedProof, + } + } + + /** + * @param options {object} options for verifying the proof. + * + * @returns {Promise<{object}>} Resolves with the verification result. + */ + public async verifyProof(options: VerifyProofOptions): Promise { + const { document, documentLoader, expansionMap, purpose } = options + const { proof } = options + + try { + proof.type = this.mappedDerivedProofType + + const proofIncludingDocumentContext = { ...proof, '@context': document['@context'] } + + // Get the proof statements + const proofStatements = await this.createVerifyProofData(proofIncludingDocumentContext, { + documentLoader, + expansionMap, + }) + + // Get the document statements + const documentStatements = await this.createVerifyProofData(document, { + documentLoader, + expansionMap, + }) + + // Transform the blank node identifier placeholders for the document statements + // back into actual blank node identifiers + const transformedDocumentStatements = documentStatements.map((element) => + element.replace(//g, '$1') + ) + + // Combine all the statements to be verified + const statementsToVerify: Uint8Array[] = proofStatements + .concat(transformedDocumentStatements) + .map((item) => new Uint8Array(TypedArrayEncoder.fromString(item))) + + // Fetch the verification method + const verificationMethod = await this.getVerificationMethod({ + proof, + documentLoader, + }) + + // Construct a key pair class from the returned verification method + const key = verificationMethod.publicKeyJwk + ? await this.LDKeyClass.fromJwk(verificationMethod) + : await this.LDKeyClass.from(verificationMethod) + + const proofValue = proof.proofValue + + if (typeof proofValue !== 'string') { + throw new AriesFrameworkError(`Expected proof.proofValue to be of type 'string', got ${typeof proof}`) + } + + // Verify the proof + const verified = await blsVerifyProof({ + proof: TypedArrayEncoder.fromBase64(proofValue), + publicKey: key.publicKeyBuffer, + messages: statementsToVerify, + nonce: TypedArrayEncoder.fromBase64(proof.nonce as string), + }) + + // Ensure proof was performed for a valid purpose + const { valid, error } = await purpose.validate(proof, { + document, + suite: this, + verificationMethod, + documentLoader, + expansionMap, + }) + if (!valid) { + throw error + } + + return verified + } catch (error) { + return { verified: false, error } + } + } + + public async canonize(input: JsonObject, options: CanonizeOptions): Promise { + const { documentLoader, expansionMap, skipExpansion } = options + return jsonld.canonize(input, { + algorithm: 'URDNA2015', + format: 'application/n-quads', + documentLoader, + expansionMap, + skipExpansion, + useNative: this.useNativeCanonize, + }) + } + + public async canonizeProof(proof: JsonObject, options: CanonizeOptions): Promise { + const { documentLoader, expansionMap } = options + proof = { ...proof } + + delete proof.nonce + delete proof.proofValue + + return this.canonize(proof, { + documentLoader, + expansionMap, + skipExpansion: false, + }) + } + + /** + * @param document {CreateVerifyDataOptions} options to create verify data + * + * @returns {Promise<{string[]>}. + */ + public async createVerifyData(options: CreateVerifyDataOptions): Promise { + const { proof, document, documentLoader, expansionMap } = options + + const proofStatements = await this.createVerifyProofData(proof, { + documentLoader, + expansionMap, + }) + const documentStatements = await this.createVerifyDocumentData(document, { + documentLoader, + expansionMap, + }) + + // concatenate c14n proof options and c14n document + return proofStatements.concat(documentStatements) + } + + /** + * @param proof to canonicalize + * @param options to create verify data + * + * @returns {Promise<{string[]>}. + */ + public async createVerifyProofData( + proof: JsonObject, + { documentLoader, expansionMap }: { documentLoader?: DocumentLoader; expansionMap?: () => void } + ): Promise { + const c14nProofOptions = await this.canonizeProof(proof, { + documentLoader, + expansionMap, + }) + + return c14nProofOptions.split('\n').filter((_) => _.length > 0) + } + + /** + * @param document to canonicalize + * @param options to create verify data + * + * @returns {Promise<{string[]>}. + */ + public async createVerifyDocumentData( + document: JsonObject, + { documentLoader, expansionMap }: { documentLoader?: DocumentLoader; expansionMap?: () => void } + ): Promise { + const c14nDocument = await this.canonize(document, { + documentLoader, + expansionMap, + }) + + return c14nDocument.split('\n').filter((_) => _.length > 0) + } + + public async getVerificationMethod(options: { proof: Proof; documentLoader?: DocumentLoader }) { + if (this.key) { + // This happens most often during sign() operations. For verify(), + // the expectation is that the verification method will be fetched + // by the documentLoader (below), not provided as a `key` parameter. + return this.key.export({ publicKey: true }) + } + + let { verificationMethod } = options.proof + + if (typeof verificationMethod === 'object' && verificationMethod !== null) { + verificationMethod = verificationMethod.id + } + + if (!verificationMethod) { + throw new Error('No "verificationMethod" found in proof.') + } + + if (!options.documentLoader) { + throw new AriesFrameworkError( + 'Missing custom document loader. This is required for resolving verification methods.' + ) + } + + const { document } = await options.documentLoader(verificationMethod) + + verificationMethod = typeof document === 'string' ? JSON.parse(document) : document + + // await this.assertVerificationMethod(verificationMethod) + return verificationMethod + } + + public static proofType = [ + 'BbsBlsSignatureProof2020', + 'sec:BbsBlsSignatureProof2020', + 'https://w3id.org/security#BbsBlsSignatureProof2020', + ] + + public static supportedDerivedProofType = [ + 'BbsBlsSignature2020', + 'sec:BbsBlsSignature2020', + 'https://w3id.org/security#BbsBlsSignature2020', + ] +} diff --git a/packages/core/src/crypto/signature-suites/bbs/deriveProof.ts b/packages/core/src/crypto/signature-suites/bbs/deriveProof.ts new file mode 100644 index 0000000000..012b15d323 --- /dev/null +++ b/packages/core/src/crypto/signature-suites/bbs/deriveProof.ts @@ -0,0 +1,129 @@ +/* + * Copyright 2020 - MATTR Limited + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import type { JsonObject } from '../../../types' + +import jsonld from '../../../../types/jsonld' +import { SECURITY_PROOF_URL } from '../../../modules/vc/constants' +import { W3cVerifiableCredential } from '../../../modules/vc/models' +import { JsonTransformer, getProofs, getTypeInfo } from '../../../utils' + +/** + * Derives a proof from a document featuring a supported linked data proof + * + * NOTE - This is a temporary API extending JSON-LD signatures + * + * @param proofDocument A document featuring a linked data proof capable of proof derivation + * @param revealDocument A document of the form of a JSON-LD frame describing the terms to selectively derive from the proof document + * @param options Options for proof derivation + */ +export const deriveProof = async ( + proofDocument: JsonObject, + revealDocument: JsonObject, + { suite, skipProofCompaction, documentLoader, expansionMap, nonce }: any +): Promise => { + if (!suite) { + throw new TypeError('"options.suite" is required.') + } + + if (Array.isArray(proofDocument)) { + throw new TypeError('proofDocument should be an object not an array.') + } + + const { proofs, document } = await getProofs({ + document: proofDocument, + proofType: suite.supportedDeriveProofType, + documentLoader, + expansionMap, + }) + + if (proofs.length === 0) { + throw new Error(`There were not any proofs provided that can be used to derive a proof with this suite.`) + } + let derivedProof + + derivedProof = await suite.deriveProof({ + document, + proof: proofs[0], + revealDocument, + documentLoader, + expansionMap, + nonce, + }) + + if (proofs.length > 1) { + // convert the proof property value from object ot array of objects + derivedProof = { ...derivedProof, proof: [derivedProof.proof] } + + // drop the first proof because it's already been processed + proofs.splice(0, 1) + + // add all the additional proofs to the derivedProof document + for (const proof of proofs) { + const additionalDerivedProofValue = await suite.deriveProof({ + document, + proof, + revealDocument, + documentLoader, + expansionMap, + }) + derivedProof.proof.push(additionalDerivedProofValue.proof) + } + } + + if (!skipProofCompaction) { + /* eslint-disable prefer-const */ + let expandedProof: Record = { + [SECURITY_PROOF_URL]: { + '@graph': derivedProof.proof, + }, + } + + // account for type-scoped `proof` definition by getting document types + const { types, alias } = await getTypeInfo(derivedProof.document, { + documentLoader, + expansionMap, + }) + + expandedProof['@type'] = types + + const ctx = jsonld.getValues(derivedProof.document, '@context') + + const compactProof = await jsonld.compact(expandedProof, ctx, { + documentLoader, + expansionMap, + compactToRelative: false, + }) + + delete compactProof[alias] + delete compactProof['@context'] + + /** + * removes the @included tag when multiple proofs exist because the + * @included tag messes up the canonicalized bytes leading to a bad + * signature that won't verify. + **/ + if (compactProof.proof?.['@included']) { + compactProof.proof = compactProof.proof['@included'] + } + + // add proof to document + const key = Object.keys(compactProof)[0] + jsonld.addValue(derivedProof.document, key, compactProof[key]) + } else { + delete derivedProof.proof['@context'] + jsonld.addValue(derivedProof.document, 'proof', derivedProof.proof) + } + + return JsonTransformer.fromJSON(derivedProof.document, W3cVerifiableCredential) +} diff --git a/packages/core/src/crypto/signature-suites/bbs/index.ts b/packages/core/src/crypto/signature-suites/bbs/index.ts new file mode 100644 index 0000000000..47275d0d9a --- /dev/null +++ b/packages/core/src/crypto/signature-suites/bbs/index.ts @@ -0,0 +1,19 @@ +/* + * Copyright 2020 - MATTR Limited + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { Bls12381G2KeyPair } from '@mattrglobal/bls12381-key-pair' +export { BbsBlsSignature2020 } from './BbsBlsSignature2020' +export { BbsBlsSignatureProof2020 } from './BbsBlsSignatureProof2020' +export * from './types' + +export { deriveProof } from './deriveProof' diff --git a/packages/core/src/crypto/signature-suites/bbs/types/CanonizeOptions.ts b/packages/core/src/crypto/signature-suites/bbs/types/CanonizeOptions.ts new file mode 100644 index 0000000000..856baecbde --- /dev/null +++ b/packages/core/src/crypto/signature-suites/bbs/types/CanonizeOptions.ts @@ -0,0 +1,33 @@ +/* + * Copyright 2020 - MATTR Limited + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import type { DocumentLoader } from '../../../../utils' + +/** + * Options for canonizing a document + */ +export interface CanonizeOptions { + /** + * Optional custom document loader + */ + documentLoader?: DocumentLoader + /** + * Optional expansion map + */ + // eslint-disable-next-line + expansionMap?: () => void + /** + * Indicates whether to skip expansion during canonization + */ + readonly skipExpansion?: boolean +} diff --git a/packages/core/src/crypto/signature-suites/bbs/types/CreateProofOptions.ts b/packages/core/src/crypto/signature-suites/bbs/types/CreateProofOptions.ts new file mode 100644 index 0000000000..60e06c0185 --- /dev/null +++ b/packages/core/src/crypto/signature-suites/bbs/types/CreateProofOptions.ts @@ -0,0 +1,42 @@ +/* + * Copyright 2020 - MATTR Limited + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import type { ProofPurpose } from '../../../../modules/vc/proof-purposes/ProofPurpose' +import type { JsonObject } from '../../../../types' +import type { DocumentLoader } from '../../../../utils' + +/** + * Options for creating a proof + */ +export interface CreateProofOptions { + /** + * Document to create the proof for + */ + readonly document: JsonObject + /** + * The proof purpose to specify for the generated proof + */ + readonly purpose: ProofPurpose + /** + * Optional custom document loader + */ + documentLoader?: DocumentLoader + /** + * Optional expansion map + */ + expansionMap?: () => void + /** + * Indicates whether to compact the resulting proof + */ + readonly compactProof: boolean +} diff --git a/packages/core/src/crypto/signature-suites/bbs/types/CreateVerifyDataOptions.ts b/packages/core/src/crypto/signature-suites/bbs/types/CreateVerifyDataOptions.ts new file mode 100644 index 0000000000..ba493b44a2 --- /dev/null +++ b/packages/core/src/crypto/signature-suites/bbs/types/CreateVerifyDataOptions.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2020 - MATTR Limited + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import type { JsonObject } from '../../../../types' +import type { DocumentLoader } from '../../../../utils' + +/** + * Options for creating a proof + */ +export interface CreateVerifyDataOptions { + /** + * Document to create the proof for + */ + readonly document: JsonObject + /** + * The proof + */ + readonly proof: JsonObject + /** + * Optional custom document loader + */ + + documentLoader?: DocumentLoader + /** + * Optional expansion map + */ + + expansionMap?: () => void + /** + * Indicates whether to compact the proof + */ + readonly compactProof: boolean +} diff --git a/packages/core/src/crypto/signature-suites/bbs/types/DeriveProofOptions.ts b/packages/core/src/crypto/signature-suites/bbs/types/DeriveProofOptions.ts new file mode 100644 index 0000000000..68a1322e5f --- /dev/null +++ b/packages/core/src/crypto/signature-suites/bbs/types/DeriveProofOptions.ts @@ -0,0 +1,51 @@ +/* + * Copyright 2020 - MATTR Limited + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import type { JsonObject } from '../../../../types' +import type { DocumentLoader, Proof } from '../../../../utils' + +/** + * Options for creating a proof + */ +export interface DeriveProofOptions { + /** + * Document outlining what statements to reveal + */ + readonly revealDocument: JsonObject + /** + * The document featuring the proof to derive from + */ + readonly document: JsonObject + /** + * The proof for the document + */ + readonly proof: Proof + /** + * Optional custom document loader + */ + // eslint-disable-next-line + documentLoader?: DocumentLoader + /** + * Optional expansion map + */ + // eslint-disable-next-line + expansionMap?: () => void + /** + * Nonce to include in the derived proof + */ + readonly nonce?: Uint8Array + /** + * Indicates whether to compact the resulting proof + */ + readonly skipProofCompaction?: boolean +} diff --git a/packages/core/src/crypto/signature-suites/bbs/types/DidDocumentPublicKey.ts b/packages/core/src/crypto/signature-suites/bbs/types/DidDocumentPublicKey.ts new file mode 100644 index 0000000000..d8a7476e1f --- /dev/null +++ b/packages/core/src/crypto/signature-suites/bbs/types/DidDocumentPublicKey.ts @@ -0,0 +1,52 @@ +/* + * Copyright 2020 - MATTR Limited + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import type { PublicJsonWebKey } from './JsonWebKey' + +/** + * Interface for the public key definition entry in a DID Document. + * @see https://w3c-ccg.github.io/did-spec/#public-keys + */ +export interface DidDocumentPublicKey { + /** + * Fully qualified identifier of this public key, e.g. did:example:entity.id#keys-1 + */ + readonly id: string + + /** + * The type of this public key, as defined in: https://w3c-ccg.github.io/ld-cryptosuite-registry/ + */ + readonly type: string + + /** + * The DID of the controller of this key. + */ + readonly controller?: string + + /** + * The value of the public key in Base58 format. Only one value field will be present. + */ + readonly publicKeyBase58?: string + + /** + * Public key in JWK format. + * @see https://w3c-ccg.github.io/did-spec/#public-keys + */ + readonly publicKeyJwk?: PublicJsonWebKey + + /** + * Public key in HEX format. + * @see https://w3c-ccg.github.io/did-spec/#public-keys + */ + readonly publicKeyHex?: string +} diff --git a/packages/core/src/crypto/signature-suites/bbs/types/GetProofsOptions.ts b/packages/core/src/crypto/signature-suites/bbs/types/GetProofsOptions.ts new file mode 100644 index 0000000000..5dae685de7 --- /dev/null +++ b/packages/core/src/crypto/signature-suites/bbs/types/GetProofsOptions.ts @@ -0,0 +1,41 @@ +/* + * Copyright 2020 - MATTR Limited + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import type { JsonObject } from '../../../../types' +import type { DocumentLoader } from '../../../../utils' + +/** + * Options for getting a proof from a JSON-LD document + */ +export interface GetProofsOptions { + /** + * The JSON-LD document to extract the proofs from. + */ + readonly document: JsonObject + /** + * Optional the proof type(s) to filter the returned proofs by + */ + readonly proofType?: string | readonly string[] + /** + * Optional custom document loader + */ + documentLoader?(): DocumentLoader + /** + * Optional expansion map + */ + expansionMap?(): () => void + /** + * Optional property to indicate whether to skip compacting the resulting proof + */ + readonly skipProofCompaction?: boolean +} diff --git a/packages/core/src/crypto/signature-suites/bbs/types/GetProofsResult.ts b/packages/core/src/crypto/signature-suites/bbs/types/GetProofsResult.ts new file mode 100644 index 0000000000..d96eb8b814 --- /dev/null +++ b/packages/core/src/crypto/signature-suites/bbs/types/GetProofsResult.ts @@ -0,0 +1,28 @@ +/* + * Copyright 2020 - MATTR Limited + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import type { JsonArray, JsonObject } from '../../../../types' + +/** + * Result for getting proofs from a JSON-LD document + */ +export interface GetProofsResult { + /** + * The JSON-LD document with the linked data proofs removed. + */ + document: JsonObject + /** + * The list of proofs that matched the requested type. + */ + proofs: JsonArray +} diff --git a/packages/core/src/crypto/signature-suites/bbs/types/GetTypeOptions.ts b/packages/core/src/crypto/signature-suites/bbs/types/GetTypeOptions.ts new file mode 100644 index 0000000000..5dd396da4b --- /dev/null +++ b/packages/core/src/crypto/signature-suites/bbs/types/GetTypeOptions.ts @@ -0,0 +1,30 @@ +/* + * Copyright 2020 - MATTR Limited + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import type { DocumentLoader } from '../../../../utils' + +/** + * Options for getting the type from a JSON-LD document + */ +export interface GetTypeOptions { + /** + * Optional custom document loader + */ + // eslint-disable-next-line + documentLoader?: DocumentLoader + /** + * Optional expansion map + */ + // eslint-disable-next-line + expansionMap?: () => void +} diff --git a/packages/core/src/crypto/signature-suites/bbs/types/JsonWebKey.ts b/packages/core/src/crypto/signature-suites/bbs/types/JsonWebKey.ts new file mode 100644 index 0000000000..a027778879 --- /dev/null +++ b/packages/core/src/crypto/signature-suites/bbs/types/JsonWebKey.ts @@ -0,0 +1,53 @@ +/* + * Copyright 2020 - MATTR Limited + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export enum JwkKty { + OctetKeyPair = 'OKP', + EC = 'EC', + RSA = 'RSA', +} + +export interface JwkEc { + readonly kty: JwkKty.EC + readonly crv: string + readonly d?: string + readonly x?: string + readonly y?: string + readonly kid?: string +} + +export interface JwkOctetKeyPair { + readonly kty: JwkKty.OctetKeyPair + readonly crv: string + readonly d?: string + readonly x?: string + readonly y?: string + readonly kid?: string +} + +export interface JwkRsa { + readonly kty: JwkKty.RSA + readonly e: string + readonly n: string +} + +export interface JwkRsaPrivate extends JwkRsa { + readonly d: string + readonly p: string + readonly q: string + readonly dp: string + readonly dq: string + readonly qi: string +} +export type JsonWebKey = JwkOctetKeyPair | JwkEc | JwkRsa | JwkRsaPrivate +export type PublicJsonWebKey = JwkOctetKeyPair | JwkEc | JwkRsa diff --git a/packages/core/src/crypto/signature-suites/bbs/types/KeyPairOptions.ts b/packages/core/src/crypto/signature-suites/bbs/types/KeyPairOptions.ts new file mode 100644 index 0000000000..624029cd9c --- /dev/null +++ b/packages/core/src/crypto/signature-suites/bbs/types/KeyPairOptions.ts @@ -0,0 +1,34 @@ +/* + * Copyright 2020 - MATTR Limited + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Options for constructing a key pair + */ +export interface KeyPairOptions { + /** + * The key id + */ + readonly id?: string + /** + * The key controller + */ + readonly controller?: string + /** + * Base58 encoding of the private key + */ + readonly privateKeyBase58?: string + /** + * Base58 encoding of the public key + */ + readonly publicKeyBase58: string +} diff --git a/packages/core/src/crypto/signature-suites/bbs/types/KeyPairSigner.ts b/packages/core/src/crypto/signature-suites/bbs/types/KeyPairSigner.ts new file mode 100644 index 0000000000..2aaa37f7cf --- /dev/null +++ b/packages/core/src/crypto/signature-suites/bbs/types/KeyPairSigner.ts @@ -0,0 +1,29 @@ +/* + * Copyright 2020 - MATTR Limited + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Key pair signer + */ +export interface KeyPairSigner { + /** + * Signer function + */ + readonly sign: (options: KeyPairSignerOptions) => Promise +} + +/** + * Key pair signer options + */ +export interface KeyPairSignerOptions { + readonly data: Uint8Array | Uint8Array[] +} diff --git a/packages/core/src/crypto/signature-suites/bbs/types/KeyPairVerifier.ts b/packages/core/src/crypto/signature-suites/bbs/types/KeyPairVerifier.ts new file mode 100644 index 0000000000..ed89f3bffe --- /dev/null +++ b/packages/core/src/crypto/signature-suites/bbs/types/KeyPairVerifier.ts @@ -0,0 +1,30 @@ +/* + * Copyright 2020 - MATTR Limited + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Key pair verifier + */ +export interface KeyPairVerifier { + /** + * Key pair verify function + */ + readonly verify: (options: KeyPairVerifierOptions) => Promise +} + +/** + * Key pair verifier options + */ +export interface KeyPairVerifierOptions { + readonly data: Uint8Array | Uint8Array[] + readonly signature: Uint8Array +} diff --git a/packages/core/src/crypto/signature-suites/bbs/types/SignatureSuiteOptions.ts b/packages/core/src/crypto/signature-suites/bbs/types/SignatureSuiteOptions.ts new file mode 100644 index 0000000000..d3f2ba95ba --- /dev/null +++ b/packages/core/src/crypto/signature-suites/bbs/types/SignatureSuiteOptions.ts @@ -0,0 +1,52 @@ +/* + * Copyright 2020 - MATTR Limited + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import type { JsonArray } from '../../../../types' +import type { LdKeyPair } from '../../../LdKeyPair' +import type { KeyPairSigner } from './KeyPairSigner' +import type { Bls12381G2KeyPair } from '@mattrglobal/bls12381-key-pair' + +/** + * Options for constructing a signature suite + */ +export interface SignatureSuiteOptions { + /** + * An optional signer interface for handling the sign operation + */ + readonly signer?: KeyPairSigner + /** + * The key pair used to generate the proof + */ + readonly key?: Bls12381G2KeyPair + /** + * A key id URL to the paired public key used for verifying the proof + */ + readonly verificationMethod?: string + /** + * The `created` date to report in generated proofs + */ + readonly date?: string | Date + /** + * Indicates whether to use the native implementation + * of RDF Dataset Normalization + */ + readonly useNativeCanonize?: boolean + /** + * Additional proof elements + */ + readonly proof?: JsonArray + /** + * Linked Data Key class implementation + */ + readonly LDKeyClass?: LdKeyPair +} diff --git a/packages/core/src/crypto/signature-suites/bbs/types/SuiteSignOptions.ts b/packages/core/src/crypto/signature-suites/bbs/types/SuiteSignOptions.ts new file mode 100644 index 0000000000..9bed5d5644 --- /dev/null +++ b/packages/core/src/crypto/signature-suites/bbs/types/SuiteSignOptions.ts @@ -0,0 +1,41 @@ +/* + * Copyright 2020 - MATTR Limited + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import type { JsonObject } from '../../../../types' +import type { DocumentLoader } from '../../../../utils' + +/** + * Options for signing using a signature suite + */ +export interface SuiteSignOptions { + /** + * Input document to sign + */ + readonly document: JsonObject + /** + * Optional custom document loader + */ + documentLoader?: DocumentLoader + /** + * Optional expansion map + */ + expansionMap?: () => void + /** + * The array of statements to sign + */ + readonly verifyData: readonly Uint8Array[] + /** + * The proof + */ + readonly proof: JsonObject +} diff --git a/packages/core/src/crypto/signature-suites/bbs/types/VerifyProofOptions.ts b/packages/core/src/crypto/signature-suites/bbs/types/VerifyProofOptions.ts new file mode 100644 index 0000000000..ba3538e7d4 --- /dev/null +++ b/packages/core/src/crypto/signature-suites/bbs/types/VerifyProofOptions.ts @@ -0,0 +1,42 @@ +/* + * Copyright 2020 - MATTR Limited + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import type { ProofPurpose } from '../../../../modules/vc/proof-purposes/ProofPurpose' +import type { JsonObject } from '../../../../types' +import type { DocumentLoader, Proof } from '../../../../utils' + +/** + * Options for verifying a proof + */ +export interface VerifyProofOptions { + /** + * The proof + */ + readonly proof: Proof + /** + * The document + */ + readonly document: JsonObject + /** + * The proof purpose to specify for the generated proof + */ + readonly purpose: ProofPurpose + /** + * Optional custom document loader + */ + documentLoader?: DocumentLoader + /** + * Optional expansion map + */ + expansionMap?: () => void +} diff --git a/packages/core/src/crypto/signature-suites/bbs/types/VerifyProofResult.ts b/packages/core/src/crypto/signature-suites/bbs/types/VerifyProofResult.ts new file mode 100644 index 0000000000..96996d006d --- /dev/null +++ b/packages/core/src/crypto/signature-suites/bbs/types/VerifyProofResult.ts @@ -0,0 +1,26 @@ +/* + * Copyright 2020 - MATTR Limited + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Result of calling verify proof + */ +export interface VerifyProofResult { + /** + * A boolean indicating if the verification was successful + */ + readonly verified: boolean + /** + * A string representing the error if the verification failed + */ + readonly error?: unknown +} diff --git a/packages/core/src/crypto/signature-suites/bbs/types/VerifySignatureOptions.ts b/packages/core/src/crypto/signature-suites/bbs/types/VerifySignatureOptions.ts new file mode 100644 index 0000000000..02eb2c54b1 --- /dev/null +++ b/packages/core/src/crypto/signature-suites/bbs/types/VerifySignatureOptions.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2020 - MATTR Limited + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import type { JsonObject } from '../../../../types' +import type { DocumentLoader, Proof, VerificationMethod } from '../../../../utils' + +/** + * Options for verifying a signature + */ +export interface VerifySignatureOptions { + /** + * Document to verify + */ + readonly document: JsonObject + /** + * Array of statements to verify + */ + readonly verifyData: Uint8Array[] + /** + * Verification method to verify the signature against + */ + readonly verificationMethod: VerificationMethod + /** + * Proof to verify + */ + readonly proof: Proof + /** + * Optional custom document loader + */ + documentLoader?: DocumentLoader + /** + * Optional expansion map + */ + expansionMap?: () => void +} diff --git a/packages/core/src/crypto/signature-suites/bbs/types/index.ts b/packages/core/src/crypto/signature-suites/bbs/types/index.ts new file mode 100644 index 0000000000..f3436316be --- /dev/null +++ b/packages/core/src/crypto/signature-suites/bbs/types/index.ts @@ -0,0 +1,28 @@ +/* + * Copyright 2020 - MATTR Limited + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { KeyPairOptions } from './KeyPairOptions' +export { KeyPairSigner } from './KeyPairSigner' +export { KeyPairVerifier } from './KeyPairVerifier' +export { SignatureSuiteOptions } from './SignatureSuiteOptions' +export { CreateProofOptions } from './CreateProofOptions' +export { VerifyProofOptions } from './VerifyProofOptions' +export { CanonizeOptions } from './CanonizeOptions' +export { CreateVerifyDataOptions } from './CreateVerifyDataOptions' +export { VerifySignatureOptions } from './VerifySignatureOptions' +export { SuiteSignOptions } from './SuiteSignOptions' +export { DeriveProofOptions } from './DeriveProofOptions' +export { DidDocumentPublicKey } from './DidDocumentPublicKey' +export { GetProofsOptions } from './GetProofsOptions' +export { GetProofsResult } from './GetProofsResult' +export { GetTypeOptions } from './GetTypeOptions' diff --git a/packages/core/src/crypto/signature-suites/ed25519/Ed25519Signature2018.ts b/packages/core/src/crypto/signature-suites/ed25519/Ed25519Signature2018.ts new file mode 100644 index 0000000000..d32f747056 --- /dev/null +++ b/packages/core/src/crypto/signature-suites/ed25519/Ed25519Signature2018.ts @@ -0,0 +1,223 @@ +import type { DocumentLoader, JsonLdDoc, Proof, VerificationMethod } from '../../../utils' +import type { JwsLinkedDataSignatureOptions } from '../JwsLinkedDataSignature' + +import jsonld from '../../../../types/jsonld' +import { CREDENTIALS_CONTEXT_V1_URL, SECURITY_CONTEXT_URL } from '../../../modules/vc/constants' +import { TypedArrayEncoder, MultiBaseEncoder, _includesContext } from '../../../utils' +import { JwsLinkedDataSignature } from '../JwsLinkedDataSignature' + +import { ED25519_SUITE_CONTEXT_URL_2018, ED25519_SUITE_CONTEXT_URL_2020 } from './constants' +import { ed25519Signature2018Context } from './context' + +type Ed25519Signature2018Options = Pick< + JwsLinkedDataSignatureOptions, + 'key' | 'proof' | 'date' | 'useNativeCanonize' | 'LDKeyClass' +> + +export class Ed25519Signature2018 extends JwsLinkedDataSignature { + public static CONTEXT_URL = ED25519_SUITE_CONTEXT_URL_2018 + public static CONTEXT = ed25519Signature2018Context.get(ED25519_SUITE_CONTEXT_URL_2018) + + /** + * @param {object} options - Options hashmap. + * + * Either a `key` OR at least one of `signer`/`verifier` is required. + * + * @param {object} [options.key] - An optional key object (containing an + * `id` property, and either `signer` or `verifier`, depending on the + * intended operation. Useful for when the application is managing keys + * itself (when using a KMS, you never have access to the private key, + * and so should use the `signer` param instead). + * @param {Function} [options.signer] - Signer function that returns an + * object with an async sign() method. This is useful when interfacing + * with a KMS (since you don't get access to the private key and its + * `signer()`, the KMS client gives you only the signer function to use). + * @param {Function} [options.verifier] - Verifier function that returns + * an object with an async `verify()` method. Useful when working with a + * KMS-provided verifier function. + * + * Advanced optional parameters and overrides. + * + * @param {object} [options.proof] - A JSON-LD document with options to use + * for the `proof` node. Any other custom fields can be provided here + * using a context different from security-v2). + * @param {string|Date} [options.date] - Signing date to use if not passed. + * @param {boolean} [options.useNativeCanonize] - Whether to use a native + * canonize algorithm. + */ + public constructor(options: Ed25519Signature2018Options) { + super({ + type: 'Ed25519Signature2018', + algorithm: 'EdDSA', + LDKeyClass: options.LDKeyClass, + contextUrl: ED25519_SUITE_CONTEXT_URL_2018, + key: options.key, + proof: options.proof, + date: options.date, + useNativeCanonize: options.useNativeCanonize, + }) + this.requiredKeyType = 'Ed25519VerificationKey2018' + } + + public async assertVerificationMethod(document: JsonLdDoc) { + if (!_includesCompatibleContext({ document: document })) { + // For DID Documents, since keys do not have their own contexts, + // the suite context is usually provided by the documentLoader logic + throw new TypeError(`The verification method (key) must contain "${this.contextUrl}".`) + } + + if (!(_isEd2018Key(document) || _isEd2020Key(document))) { + throw new Error(`Invalid key type. Key type must be "${this.requiredKeyType}".`) + } + + // ensure verification method has not been revoked + if (document.revoked !== undefined) { + throw new Error('The verification method has been revoked.') + } + } + + public async getVerificationMethod(options: { proof: Proof; documentLoader?: DocumentLoader }) { + let verificationMethod = await super.getVerificationMethod({ + proof: options.proof, + documentLoader: options.documentLoader, + }) + + // convert Ed25519VerificationKey2020 to Ed25519VerificationKey2018 + if (_isEd2020Key(verificationMethod)) { + // -- convert multibase to base58 -- + const publicKeyBuffer = MultiBaseEncoder.decode(verificationMethod.publicKeyMultibase) + + // -- update context -- + // remove 2020 context + const context2020Index = verificationMethod['@context'].indexOf(ED25519_SUITE_CONTEXT_URL_2020) + verificationMethod['@context'].splice(context2020Index, 1) + + // add 2018 context + verificationMethod['@context'].push(ED25519_SUITE_CONTEXT_URL_2018) + + // -- update type + verificationMethod.type = 'Ed25519VerificationKey2018' + + verificationMethod = { + ...verificationMethod, + publicKeyMultibase: undefined, + publicKeyBase58: TypedArrayEncoder.toBase58(publicKeyBuffer.data), + } + } + + return verificationMethod + } + + /** + * Ensures the document to be signed contains the required signature suite + * specific `@context`, by either adding it (if `addSuiteContext` is true), + * or throwing an error if it's missing. + * + * @override + * + * @param {object} options - Options hashmap. + * @param {object} options.document - JSON-LD document to be signed. + * @param {boolean} options.addSuiteContext - Add suite context? + */ + public ensureSuiteContext(options: { document: JsonLdDoc; addSuiteContext: boolean }) { + if (_includesCompatibleContext({ document: options.document })) { + return + } + + super.ensureSuiteContext({ document: options.document, addSuiteContext: options.addSuiteContext }) + } + + /** + * Checks whether a given proof exists in the document. + * + * @override + * + * @param {object} options - Options hashmap. + * @param {object} options.proof - A proof. + * @param {object} options.document - A JSON-LD document. + * @param {object} options.purpose - A jsonld-signatures ProofPurpose + * instance (e.g. AssertionProofPurpose, AuthenticationProofPurpose, etc). + * @param {Function} options.documentLoader - A secure document loader (it is + * recommended to use one that provides static known documents, instead of + * fetching from the web) for returning contexts, controller documents, + * keys, and other relevant URLs needed for the proof. + * @param {Function} [options.expansionMap] - A custom expansion map that is + * passed to the JSON-LD processor; by default a function that will throw + * an error when unmapped properties are detected in the input, use `false` + * to turn this off and allow unmapped properties to be dropped or use a + * custom function. + * + * @returns {Promise} Whether a match for the proof was found. + */ + public async matchProof(options: { + proof: Proof + document: VerificationMethod + // eslint-disable-next-line @typescript-eslint/no-explicit-any + purpose: any + documentLoader?: DocumentLoader + expansionMap?: () => void + }) { + if (!_includesCompatibleContext({ document: options.document })) { + return false + } + return super.matchProof({ + proof: options.proof, + document: options.document, + purpose: options.purpose, + documentLoader: options.documentLoader, + expansionMap: options.expansionMap, + }) + } +} + +function _includesCompatibleContext(options: { document: JsonLdDoc }) { + // Handle the unfortunate Ed25519Signature2018 / credentials/v1 collision + const hasEd2018 = _includesContext({ + document: options.document, + contextUrl: ED25519_SUITE_CONTEXT_URL_2018, + }) + const hasEd2020 = _includesContext({ + document: options.document, + contextUrl: ED25519_SUITE_CONTEXT_URL_2020, + }) + const hasCred = _includesContext({ document: options.document, contextUrl: CREDENTIALS_CONTEXT_V1_URL }) + const hasSecV2 = _includesContext({ document: options.document, contextUrl: SECURITY_CONTEXT_URL }) + + // TODO: the console.warn statements below should probably be replaced with logging statements. However, this would currently require injection and I'm not sure we want to do that. + if (hasEd2018 && hasCred) { + // Warn if both are present + // console.warn('Warning: The ed25519-2018/v1 and credentials/v1 ' + 'contexts are incompatible.') + // console.warn('For VCs using Ed25519Signature2018 suite,' + ' using the credentials/v1 context is sufficient.') + return false + } + + if (hasEd2018 && hasSecV2) { + // Warn if both are present + // console.warn('Warning: The ed25519-2018/v1 and security/v2 ' + 'contexts are incompatible.') + // console.warn('For VCs using Ed25519Signature2018 suite,' + ' using the security/v2 context is sufficient.') + return false + } + + // Either one by itself is fine, for this suite + return hasEd2018 || hasEd2020 || hasCred || hasSecV2 +} + +function _isEd2018Key(verificationMethod: JsonLdDoc) { + const hasEd2018 = _includesContext({ + document: verificationMethod, + contextUrl: ED25519_SUITE_CONTEXT_URL_2018, + }) + + // @ts-ignore - .hasValue is not part of the public API + return hasEd2018 && jsonld.hasValue(verificationMethod, 'type', 'Ed25519VerificationKey2018') +} + +function _isEd2020Key(verificationMethod: JsonLdDoc) { + const hasEd2020 = _includesContext({ + document: verificationMethod, + contextUrl: ED25519_SUITE_CONTEXT_URL_2020, + }) + + // @ts-ignore - .hasValue is not part of the public API + return hasEd2020 && jsonld.hasValue(verificationMethod, 'type', 'Ed25519VerificationKey2020') +} diff --git a/packages/core/src/crypto/signature-suites/ed25519/constants.ts b/packages/core/src/crypto/signature-suites/ed25519/constants.ts new file mode 100644 index 0000000000..881a7ea3b1 --- /dev/null +++ b/packages/core/src/crypto/signature-suites/ed25519/constants.ts @@ -0,0 +1,2 @@ +export const ED25519_SUITE_CONTEXT_URL_2018 = 'https://w3id.org/security/suites/ed25519-2018/v1' +export const ED25519_SUITE_CONTEXT_URL_2020 = 'https://w3id.org/security/suites/ed25519-2020/v1' diff --git a/packages/core/src/crypto/signature-suites/ed25519/context.ts b/packages/core/src/crypto/signature-suites/ed25519/context.ts new file mode 100644 index 0000000000..1f2c6af92c --- /dev/null +++ b/packages/core/src/crypto/signature-suites/ed25519/context.ts @@ -0,0 +1,99 @@ +import { ED25519_SUITE_CONTEXT_URL_2018 } from './constants' + +export const context = { + '@context': { + id: '@id', + type: '@type', + '@protected': true, + + proof: { + '@id': 'https://w3id.org/security#proof', + '@type': '@id', + '@container': '@graph', + }, + Ed25519VerificationKey2018: { + '@id': 'https://w3id.org/security#Ed25519VerificationKey2018', + '@context': { + '@protected': true, + id: '@id', + type: '@type', + controller: { + '@id': 'https://w3id.org/security#controller', + '@type': '@id', + }, + revoked: { + '@id': 'https://w3id.org/security#revoked', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + publicKeyBase58: { + '@id': 'https://w3id.org/security#publicKeyBase58', + }, + }, + }, + Ed25519Signature2018: { + '@id': 'https://w3id.org/security#Ed25519Signature2018', + '@context': { + '@protected': true, + id: '@id', + type: '@type', + challenge: 'https://w3id.org/security#challenge', + created: { + '@id': 'http://purl.org/dc/terms/created', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + domain: 'https://w3id.org/security#domain', + expires: { + '@id': 'https://w3id.org/security#expiration', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + nonce: 'https://w3id.org/security#nonce', + proofPurpose: { + '@id': 'https://w3id.org/security#proofPurpose', + '@type': '@vocab', + '@context': { + '@protected': true, + id: '@id', + type: '@type', + assertionMethod: { + '@id': 'https://w3id.org/security#assertionMethod', + '@type': '@id', + '@container': '@set', + }, + authentication: { + '@id': 'https://w3id.org/security#authenticationMethod', + '@type': '@id', + '@container': '@set', + }, + capabilityInvocation: { + '@id': 'https://w3id.org/security#capabilityInvocationMethod', + '@type': '@id', + '@container': '@set', + }, + capabilityDelegation: { + '@id': 'https://w3id.org/security#capabilityDelegationMethod', + '@type': '@id', + '@container': '@set', + }, + keyAgreement: { + '@id': 'https://w3id.org/security#keyAgreementMethod', + '@type': '@id', + '@container': '@set', + }, + }, + }, + jws: { + '@id': 'https://w3id.org/security#jws', + }, + verificationMethod: { + '@id': 'https://w3id.org/security#verificationMethod', + '@type': '@id', + }, + }, + }, + }, +} + +const ed25519Signature2018Context = new Map() +ed25519Signature2018Context.set(ED25519_SUITE_CONTEXT_URL_2018, context) + +export { ed25519Signature2018Context } diff --git a/packages/core/src/crypto/signature-suites/index.ts b/packages/core/src/crypto/signature-suites/index.ts new file mode 100644 index 0000000000..7eecb7ef25 --- /dev/null +++ b/packages/core/src/crypto/signature-suites/index.ts @@ -0,0 +1,2 @@ +export * from './ed25519/Ed25519Signature2018' +export * from './JwsLinkedDataSignature' diff --git a/packages/core/src/modules/dids/methods/sov/SovDidResolver.ts b/packages/core/src/modules/dids/methods/sov/SovDidResolver.ts index e0771577df..694987c059 100644 --- a/packages/core/src/modules/dids/methods/sov/SovDidResolver.ts +++ b/packages/core/src/modules/dids/methods/sov/SovDidResolver.ts @@ -4,8 +4,10 @@ import type { ParsedDid, DidResolutionResult } from '../../types' import { convertPublicKeyToX25519 } from '@stablelib/ed25519' +import { ED25519_SUITE_CONTEXT_URL_2018 } from '../../../../crypto/signature-suites/ed25519/constants' import { TypedArrayEncoder } from '../../../../utils/TypedArrayEncoder' import { getFullVerkey } from '../../../../utils/did' +import { SECURITY_X25519_CONTEXT_URL } from '../../../vc/constants' import { DidDocumentService } from '../../domain' import { DidDocumentBuilder } from '../../domain/DidDocumentBuilder' import { DidCommV1Service } from '../../domain/service/DidCommV1Service' @@ -36,8 +38,9 @@ export class SovDidResolver implements DidResolver { ) const builder = new DidDocumentBuilder(parsed.did) - .addContext('https://w3id.org/security/suites/ed25519-2018/v1') - .addContext('https://w3id.org/security/suites/x25519-2019/v1') + + .addContext(ED25519_SUITE_CONTEXT_URL_2018) + .addContext(SECURITY_X25519_CONTEXT_URL) .addVerificationMethod({ controller: parsed.did, id: verificationMethodId, diff --git a/packages/core/src/modules/vc/SignatureSuiteRegistry.ts b/packages/core/src/modules/vc/SignatureSuiteRegistry.ts new file mode 100644 index 0000000000..469d0a4aaf --- /dev/null +++ b/packages/core/src/modules/vc/SignatureSuiteRegistry.ts @@ -0,0 +1,55 @@ +import { suites } from '../../../types/jsonld-signatures' +import { KeyType } from '../../crypto' +import { Ed25519Signature2018 } from '../../crypto/signature-suites' +import { BbsBlsSignature2020, BbsBlsSignatureProof2020 } from '../../crypto/signature-suites/bbs' +import { AriesFrameworkError } from '../../error' + +const LinkedDataSignature = suites.LinkedDataSignature + +export interface SuiteInfo { + suiteClass: typeof LinkedDataSignature + proofType: string + requiredKeyType: string + keyType: string +} + +export class SignatureSuiteRegistry { + private suiteMapping: SuiteInfo[] = [ + { + suiteClass: Ed25519Signature2018, + proofType: 'Ed25519Signature2018', + requiredKeyType: 'Ed25519VerificationKey2018', + keyType: KeyType.Ed25519, + }, + { + suiteClass: BbsBlsSignature2020, + proofType: 'BbsBlsSignature2020', + requiredKeyType: 'BbsBlsSignatureProof2020', + keyType: KeyType.Bls12381g2, + }, + { + suiteClass: BbsBlsSignatureProof2020, + proofType: 'BbsBlsSignatureProof2020', + requiredKeyType: 'BbsBlsSignatureProof2020', + keyType: KeyType.Bls12381g2, + }, + ] + + public get supportedProofTypes(): string[] { + return this.suiteMapping.map((x) => x.proofType) + } + + public getByKeyType(keyType: KeyType) { + return this.suiteMapping.find((x) => x.keyType === keyType) + } + + public getByProofType(proofType: string) { + const suiteInfo = this.suiteMapping.find((x) => x.proofType === proofType) + + if (!suiteInfo) { + throw new AriesFrameworkError(`No signature suite for proof type: ${proofType}`) + } + + return suiteInfo + } +} diff --git a/packages/core/src/modules/vc/W3cCredentialService.ts b/packages/core/src/modules/vc/W3cCredentialService.ts new file mode 100644 index 0000000000..5efaeda92f --- /dev/null +++ b/packages/core/src/modules/vc/W3cCredentialService.ts @@ -0,0 +1,391 @@ +import type { Key } from '../../crypto/Key' +import type { DocumentLoaderResult } from '../../utils' +import type { W3cVerifyCredentialResult } from './models' +import type { + CreatePresentationOptions, + DeriveProofOptions, + SignCredentialOptions, + SignPresentationOptions, + StoreCredentialOptions, + VerifyCredentialOptions, + VerifyPresentationOptions, +} from './models/W3cCredentialServiceOptions' +import type { VerifyPresentationResult } from './models/presentation/VerifyPresentationResult' + +import { inject, Lifecycle, scoped } from 'tsyringe' + +import jsonld, { documentLoaderNode, documentLoaderXhr } from '../../../types/jsonld' +import vc from '../../../types/vc' +import { AgentConfig } from '../../agent/AgentConfig' +import { createWalletKeyPairClass } from '../../crypto/WalletKeyPair' +import { deriveProof } from '../../crypto/signature-suites/bbs' +import { AriesFrameworkError } from '../../error' +import { Logger } from '../../logger' +import { JsonTransformer, orArrayToArray, w3cDate } from '../../utils' +import { isNodeJS, isReactNative } from '../../utils/environment' +import { Wallet } from '../../wallet' +import { DidResolverService, VerificationMethod } from '../dids' +import { getKeyDidMappingByVerificationMethod } from '../dids/domain/key-type' + +import { SignatureSuiteRegistry } from './SignatureSuiteRegistry' +import { W3cVerifiableCredential } from './models' +import { W3cCredentialRecord } from './models/credential/W3cCredentialRecord' +import { W3cCredentialRepository } from './models/credential/W3cCredentialRepository' +import { W3cPresentation } from './models/presentation/W3Presentation' +import { W3cVerifiablePresentation } from './models/presentation/W3cVerifiablePresentation' + +@scoped(Lifecycle.ContainerScoped) +export class W3cCredentialService { + private wallet: Wallet + private w3cCredentialRepository: W3cCredentialRepository + private didResolver: DidResolverService + private agentConfig: AgentConfig + private logger: Logger + private suiteRegistry: SignatureSuiteRegistry + + public constructor( + @inject('Wallet') wallet: Wallet, + w3cCredentialRepository: W3cCredentialRepository, + didResolver: DidResolverService, + agentConfig: AgentConfig, + logger: Logger + ) { + this.wallet = wallet + this.w3cCredentialRepository = w3cCredentialRepository + this.didResolver = didResolver + this.agentConfig = agentConfig + this.logger = logger + this.suiteRegistry = new SignatureSuiteRegistry() + } + + /** + * Signs a credential + * + * @param credential the credential to be signed + * @returns the signed credential + */ + public async signCredential(options: SignCredentialOptions): Promise { + const WalletKeyPair = createWalletKeyPairClass(this.wallet) + + const signingKey = await this.getPublicKeyFromVerificationMethod(options.verificationMethod) + const suiteInfo = this.suiteRegistry.getByProofType(options.proofType) + + if (signingKey.keyType !== suiteInfo.keyType) { + throw new AriesFrameworkError('The key type of the verification method does not match the suite') + } + + const keyPair = new WalletKeyPair({ + controller: options.credential.issuerId, // should we check this against the verificationMethod.controller? + id: options.verificationMethod, + key: signingKey, + wallet: this.wallet, + }) + + const SuiteClass = suiteInfo.suiteClass + + const suite = new SuiteClass({ + key: keyPair, + LDKeyClass: WalletKeyPair, + proof: { + verificationMethod: options.verificationMethod, + }, + useNativeCanonize: false, + date: options.created ?? w3cDate(), + }) + + const result = await vc.issue({ + credential: JsonTransformer.toJSON(options.credential), + suite: suite, + purpose: options.proofPurpose, + documentLoader: this.documentLoader, + }) + + return JsonTransformer.fromJSON(result, W3cVerifiableCredential) + } + + /** + * Verifies the signature(s) of a credential + * + * @param credential the credential to be verified + * @returns the verification result + */ + public async verifyCredential(options: VerifyCredentialOptions): Promise { + const suites = this.getSignatureSuitesForCredential(options.credential) + + const verifyOptions: Record = { + credential: JsonTransformer.toJSON(options.credential), + suite: suites, + documentLoader: this.documentLoader, + } + + // this is a hack because vcjs throws if purpose is passed as undefined or null + if (options.proofPurpose) { + verifyOptions['purpose'] = options.proofPurpose + } + + const result = await vc.verifyCredential(verifyOptions) + + return result as unknown as W3cVerifyCredentialResult + } + + /** + * Utility method that creates a {@link W3cPresentation} from one or more {@link W3cVerifiableCredential}s. + * + * **NOTE: the presentation that is returned is unsigned.** + * + * @param credentials One or more instances of {@link W3cVerifiableCredential} + * @param [id] an optional unique identifier for the presentation + * @param [holderUrl] an optional identifier identifying the entity that is generating the presentation + * @returns An instance of {@link W3cPresentation} + */ + public async createPresentation(options: CreatePresentationOptions): Promise { + if (!Array.isArray(options.credentials)) { + options.credentials = [options.credentials] + } + + const presentationJson = vc.createPresentation({ + verifiableCredential: options.credentials.map((credential) => JsonTransformer.toJSON(credential)), + id: options.id, + holder: options.holderUrl, + }) + + return JsonTransformer.fromJSON(presentationJson, W3cPresentation) + } + + /** + * Signs a presentation including the credentials it includes + * + * @param presentation the presentation to be signed + * @returns the signed presentation + */ + public async signPresentation(options: SignPresentationOptions): Promise { + // create keyPair + const WalletKeyPair = createWalletKeyPairClass(this.wallet) + + const suiteInfo = this.suiteRegistry.getByProofType(options.signatureType) + + if (!suiteInfo) { + throw new AriesFrameworkError(`The requested proofType ${options.signatureType} is not supported`) + } + + const signingKey = await this.getPublicKeyFromVerificationMethod(options.verificationMethod) + + if (signingKey.keyType !== suiteInfo.keyType) { + throw new AriesFrameworkError('The key type of the verification method does not match the suite') + } + + const verificationMethodObject = (await this.documentLoader(options.verificationMethod)).document as Record< + string, + unknown + > + + const keyPair = new WalletKeyPair({ + controller: verificationMethodObject['controller'] as string, + id: options.verificationMethod, + key: signingKey, + wallet: this.wallet, + }) + + const suite = new suiteInfo.suiteClass({ + LDKeyClass: WalletKeyPair, + proof: { + verificationMethod: options.verificationMethod, + }, + date: new Date().toISOString(), + key: keyPair, + useNativeCanonize: false, + }) + + const result = await vc.signPresentation({ + presentation: JsonTransformer.toJSON(options.presentation), + suite: suite, + challenge: options.challenge, + documentLoader: this.documentLoader, + }) + + return JsonTransformer.fromJSON(result, W3cVerifiablePresentation) + } + + /** + * Verifies a presentation including the credentials it includes + * + * @param presentation the presentation to be verified + * @returns the verification result + */ + public async verifyPresentation(options: VerifyPresentationOptions): Promise { + // create keyPair + const WalletKeyPair = createWalletKeyPairClass(this.wallet) + + let proofs = options.presentation.proof + + if (!Array.isArray(proofs)) { + proofs = [proofs] + } + if (options.purpose) { + proofs = proofs.filter((proof) => proof.proofPurpose === options.purpose.term) + } + + const presentationSuites = proofs.map((proof) => { + const SuiteClass = this.suiteRegistry.getByProofType(proof.type).suiteClass + return new SuiteClass({ + LDKeyClass: WalletKeyPair, + proof: { + verificationMethod: proof.verificationMethod, + }, + date: proof.created, + useNativeCanonize: false, + }) + }) + + const credentials = Array.isArray(options.presentation.verifiableCredential) + ? options.presentation.verifiableCredential + : [options.presentation.verifiableCredential] + + const credentialSuites = credentials.map((credential) => this.getSignatureSuitesForCredential(credential)) + const allSuites = presentationSuites.concat(...credentialSuites) + + const verifyOptions: Record = { + presentation: JsonTransformer.toJSON(options.presentation), + suite: allSuites, + challenge: options.challenge, + documentLoader: this.documentLoader, + } + + // this is a hack because vcjs throws if purpose is passed as undefined or null + if (options.purpose) { + verifyOptions['presentationPurpose'] = options.purpose + } + + const result = await vc.verify(verifyOptions) + + return result as unknown as VerifyPresentationResult + } + + public async deriveProof(options: DeriveProofOptions): Promise { + const suiteInfo = this.suiteRegistry.getByProofType('BbsBlsSignatureProof2020') + const SuiteClass = suiteInfo.suiteClass + + const suite = new SuiteClass() + + const proof = await deriveProof(JsonTransformer.toJSON(options.credential), options.revealDocument, { + suite: suite, + documentLoader: this.documentLoader, + }) + + return proof + } + + public documentLoader = async (url: string): Promise => { + if (url.startsWith('did:')) { + const result = await this.didResolver.resolve(url) + + if (result.didResolutionMetadata.error || !result.didDocument) { + throw new AriesFrameworkError(`Unable to resolve DID: ${url}`) + } + + const framed = await jsonld.frame(result.didDocument.toJSON(), { + '@context': result.didDocument.context, + '@embed': '@never', + id: url, + }) + + return { + contextUrl: null, + documentUrl: url, + document: framed, + } + } + + let loader + + if (isNodeJS()) { + loader = documentLoaderNode.apply(jsonld, []) + } else if (isReactNative()) { + loader = documentLoaderXhr.apply(jsonld, []) + } else { + throw new AriesFrameworkError('Unsupported environment') + } + + return await loader(url) + } + + private async getPublicKeyFromVerificationMethod(verificationMethod: string): Promise { + const verificationMethodObject = await this.documentLoader(verificationMethod) + const verificationMethodClass = JsonTransformer.fromJSON(verificationMethodObject.document, VerificationMethod) + + const key = getKeyDidMappingByVerificationMethod(verificationMethodClass) + + return key.getKeyFromVerificationMethod(verificationMethodClass) + } + + /** + * Writes a credential to storage + * + * @param record the credential to be stored + * @returns the credential record that was written to storage + */ + public async storeCredential(options: StoreCredentialOptions): Promise { + // Get the expanded types + const expandedTypes = ( + await jsonld.expand(JsonTransformer.toJSON(options.record), { documentLoader: this.documentLoader }) + )[0]['@type'] + + // Create an instance of the w3cCredentialRecord + const w3cCredentialRecord = new W3cCredentialRecord({ + tags: { expandedTypes: orArrayToArray(expandedTypes) }, + credential: options.record, + }) + + // Store the w3c credential record + await this.w3cCredentialRepository.save(w3cCredentialRecord) + + return w3cCredentialRecord + } + + public async getAllCredentials(): Promise { + const allRecords = await this.w3cCredentialRepository.getAll() + return allRecords.map((record) => record.credential) + } + + public async getCredentialById(id: string): Promise { + return (await this.w3cCredentialRepository.getById(id)).credential + } + + public async findCredentialsByQuery( + query: Parameters[0] + ): Promise { + const result = await this.w3cCredentialRepository.findByQuery(query) + return result.map((record) => record.credential) + } + + public async findSingleCredentialByQuery( + query: Parameters[0] + ): Promise { + const result = await this.w3cCredentialRepository.findSingleByQuery(query) + return result?.credential + } + + private getSignatureSuitesForCredential(credential: W3cVerifiableCredential) { + const WalletKeyPair = createWalletKeyPairClass(this.wallet) + + let proofs = credential.proof + + if (!Array.isArray(proofs)) { + proofs = [proofs] + } + + return proofs.map((proof) => { + const SuiteClass = this.suiteRegistry.getByProofType(proof.type)?.suiteClass + if (SuiteClass) { + return new SuiteClass({ + LDKeyClass: WalletKeyPair, + proof: { + verificationMethod: proof.verificationMethod, + }, + date: proof.created, + useNativeCanonize: false, + }) + } + }) + } +} diff --git a/packages/core/src/modules/vc/__tests__/W3cCredentialService.test.ts b/packages/core/src/modules/vc/__tests__/W3cCredentialService.test.ts new file mode 100644 index 0000000000..304cf14231 --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/W3cCredentialService.test.ts @@ -0,0 +1,430 @@ +import type { AgentConfig } from '../../../agent/AgentConfig' + +import { getAgentConfig } from '../../../../tests/helpers' +import { TestLogger } from '../../../../tests/logger' +import { purposes } from '../../../../types/jsonld-signatures' +import { KeyType } from '../../../crypto' +import { Key } from '../../../crypto/Key' +import { LogLevel } from '../../../logger' +import { JsonTransformer, orArrayToArray } from '../../../utils' +import { IndyWallet } from '../../../wallet/IndyWallet' +import { WalletError } from '../../../wallet/error' +import { DidKey, DidResolverService } from '../../dids' +import { DidRepository } from '../../dids/repository' +import { IndyLedgerService } from '../../ledger/services/IndyLedgerService' +import { W3cCredentialService } from '../W3cCredentialService' +import { W3cCredential, W3cVerifiableCredential } from '../models' +import { LinkedDataProof } from '../models/LinkedDataProof' +import { W3cCredentialRepository } from '../models/credential/W3cCredentialRepository' +import { W3cPresentation } from '../models/presentation/W3Presentation' +import { W3cVerifiablePresentation } from '../models/presentation/W3cVerifiablePresentation' +import { CredentialIssuancePurpose } from '../proof-purposes/CredentialIssuancePurpose' + +import { customDocumentLoader } from './documentLoader' +import { BbsBlsSignature2020Fixtures, Ed25519Signature2018Fixtures } from './fixtures' + +jest.mock('../../ledger/services/IndyLedgerService') + +const IndyLedgerServiceMock = IndyLedgerService as jest.Mock +const DidRepositoryMock = DidRepository as unknown as jest.Mock + +jest.mock('../models/credential/W3cCredentialRepository') +const W3cCredentialRepositoryMock = W3cCredentialRepository as jest.Mock + +describe('W3cCredentialService', () => { + let wallet: IndyWallet + let agentConfig: AgentConfig + let didResolverService: DidResolverService + let logger: TestLogger + let w3cCredentialService: W3cCredentialService + let w3cCredentialRepository: W3cCredentialRepository + const seed = 'testseed000000000000000000000001' + + beforeAll(async () => { + agentConfig = getAgentConfig('W3cCredentialServiceTest') + wallet = new IndyWallet(agentConfig) + logger = new TestLogger(LogLevel.error) + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + await wallet.createAndOpen(agentConfig.walletConfig!) + didResolverService = new DidResolverService(agentConfig, new IndyLedgerServiceMock(), new DidRepositoryMock()) + w3cCredentialRepository = new W3cCredentialRepositoryMock() + w3cCredentialService = new W3cCredentialService( + wallet, + w3cCredentialRepository, + didResolverService, + agentConfig, + logger + ) + w3cCredentialService.documentLoader = customDocumentLoader + }) + + afterAll(async () => { + await wallet.delete() + }) + + describe('Ed25519Signature2018', () => { + let issuerDidKey: DidKey + let verificationMethod: string + beforeAll(async () => { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const issuerDidInfo = await wallet.createDid({ seed }) + const issuerKey = Key.fromPublicKeyBase58(issuerDidInfo.verkey, KeyType.Ed25519) + issuerDidKey = new DidKey(issuerKey) + verificationMethod = `${issuerDidKey.did}#${issuerDidKey.key.fingerprint}` + }) + describe('signCredential', () => { + it('should return a successfully signed credential', async () => { + const credentialJson = Ed25519Signature2018Fixtures.TEST_LD_DOCUMENT + + const credential = JsonTransformer.fromJSON(credentialJson, W3cCredential) + + const vc = await w3cCredentialService.signCredential({ + credential, + proofType: 'Ed25519Signature2018', + verificationMethod: verificationMethod, + }) + + expect(vc).toBeInstanceOf(W3cVerifiableCredential) + expect(vc.issuer).toEqual(issuerDidKey.did) + expect(Array.isArray(vc.proof)).toBe(false) + expect(vc.proof).toBeInstanceOf(LinkedDataProof) + + // @ts-ignore + expect(vc.proof.verificationMethod).toEqual(verificationMethod) + }) + + it('should throw because of verificationMethod does not belong to this wallet', async () => { + const credentialJson = Ed25519Signature2018Fixtures.TEST_LD_DOCUMENT + credentialJson.issuer = issuerDidKey.did + + const credential = JsonTransformer.fromJSON(credentialJson, W3cCredential) + + expect(async () => { + await w3cCredentialService.signCredential({ + credential, + proofType: 'Ed25519Signature2018', + verificationMethod: + 'did:key:z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV#z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV', + }) + }).rejects.toThrowError(WalletError) + }) + }) + describe('verifyCredential', () => { + it('should credential verify successfully', async () => { + const vc = JsonTransformer.fromJSON( + Ed25519Signature2018Fixtures.TEST_LD_DOCUMENT_SIGNED, + W3cVerifiableCredential + ) + const result = await w3cCredentialService.verifyCredential({ credential: vc }) + + expect(result.verified).toBe(true) + expect(result.error).toBeUndefined() + + expect(result.results.length).toBe(1) + + expect(result.results[0].verified).toBe(true) + expect(result.results[0].error).toBeUndefined() + }) + it('should fail because of invalid signature', async () => { + const vc = JsonTransformer.fromJSON( + Ed25519Signature2018Fixtures.TEST_LD_DOCUMENT_BAD_SIGNED, + W3cVerifiableCredential + ) + const result = await w3cCredentialService.verifyCredential({ credential: vc }) + + expect(result.verified).toBe(false) + expect(result.error).toBeDefined() + + // @ts-ignore + expect(result.error.errors[0]).toBeInstanceOf(Error) + // @ts-ignore + expect(result.error.errors[0].message).toBe('Invalid signature.') + }) + it('should fail because of an unsigned statement', async () => { + const vcJson = { + ...Ed25519Signature2018Fixtures.TEST_LD_DOCUMENT_SIGNED, + credentialSubject: { + ...Ed25519Signature2018Fixtures.TEST_LD_DOCUMENT_SIGNED.credentialSubject, + alumniOf: 'oops', + }, + } + + const vc = JsonTransformer.fromJSON(vcJson, W3cVerifiableCredential) + const result = await w3cCredentialService.verifyCredential({ credential: vc }) + + expect(result.verified).toBe(false) + + // @ts-ignore + expect(result.error.errors[0]).toBeInstanceOf(Error) + // @ts-ignore + expect(result.error.errors[0].message).toBe('Invalid signature.') + }) + it('should fail because of a changed statement', async () => { + const vcJson = { + ...Ed25519Signature2018Fixtures.TEST_LD_DOCUMENT_SIGNED, + credentialSubject: { + ...Ed25519Signature2018Fixtures.TEST_LD_DOCUMENT_SIGNED.credentialSubject, + degree: { + ...Ed25519Signature2018Fixtures.TEST_LD_DOCUMENT_SIGNED.credentialSubject.degree, + name: 'oops', + }, + }, + } + + const vc = JsonTransformer.fromJSON(vcJson, W3cVerifiableCredential) + const result = await w3cCredentialService.verifyCredential({ credential: vc }) + + expect(result.verified).toBe(false) + + // @ts-ignore + expect(result.error.errors[0]).toBeInstanceOf(Error) + // @ts-ignore + expect(result.error.errors[0].message).toBe('Invalid signature.') + }) + }) + describe('createPresentation', () => { + it('should successfully create a presentation from single verifiable credential', async () => { + const vc = JsonTransformer.fromJSON( + Ed25519Signature2018Fixtures.TEST_LD_DOCUMENT_SIGNED, + W3cVerifiableCredential + ) + const result = await w3cCredentialService.createPresentation({ credentials: vc }) + + expect(result).toBeInstanceOf(W3cPresentation) + + expect(result.type).toEqual(expect.arrayContaining(['VerifiablePresentation'])) + + expect(result.verifiableCredential).toHaveLength(1) + expect(result.verifiableCredential).toEqual(expect.arrayContaining([vc])) + }) + it('should successfully create a presentation from two verifiable credential', async () => { + const vc1 = JsonTransformer.fromJSON( + Ed25519Signature2018Fixtures.TEST_LD_DOCUMENT_SIGNED, + W3cVerifiableCredential + ) + const vc2 = JsonTransformer.fromJSON( + Ed25519Signature2018Fixtures.TEST_LD_DOCUMENT_SIGNED, + W3cVerifiableCredential + ) + + const vcs = [vc1, vc2] + const result = await w3cCredentialService.createPresentation({ credentials: vcs }) + + expect(result).toBeInstanceOf(W3cPresentation) + + expect(result.type).toEqual(expect.arrayContaining(['VerifiablePresentation'])) + + expect(result.verifiableCredential).toHaveLength(2) + expect(result.verifiableCredential).toEqual(expect.arrayContaining([vc1, vc2])) + }) + }) + describe('signPresentation', () => { + it('should successfully create a presentation from single verifiable credential', async () => { + const presentation = JsonTransformer.fromJSON(Ed25519Signature2018Fixtures.TEST_VP_DOCUMENT, W3cPresentation) + + const purpose = new CredentialIssuancePurpose({ + controller: { + id: 'did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL', + }, + date: new Date().toISOString(), + }) + + const verifiablePresentation = await w3cCredentialService.signPresentation({ + presentation: presentation, + purpose: purpose, + signatureType: 'Ed25519Signature2018', + challenge: '7bf32d0b-39d4-41f3-96b6-45de52988e4c', + verificationMethod: verificationMethod, + }) + + expect(verifiablePresentation).toBeInstanceOf(W3cVerifiablePresentation) + }) + }) + describe('verifyPresentation', () => { + it('should successfully verify a presentation containing a single verifiable credential', async () => { + const vp = JsonTransformer.fromJSON( + Ed25519Signature2018Fixtures.TEST_VP_DOCUMENT_SIGNED, + W3cVerifiablePresentation + ) + + const result = await w3cCredentialService.verifyPresentation({ + presentation: vp, + proofType: 'Ed25519Signature2018', + challenge: '7bf32d0b-39d4-41f3-96b6-45de52988e4c', + verificationMethod: + 'did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL', + }) + + expect(result.verified).toBe(true) + }) + }) + describe('storeCredential', () => { + it('should store a credential', async () => { + const credential = JsonTransformer.fromJSON( + Ed25519Signature2018Fixtures.TEST_LD_DOCUMENT_SIGNED, + W3cVerifiableCredential + ) + + const w3cCredentialRecord = await w3cCredentialService.storeCredential({ record: credential }) + + expect(w3cCredentialRecord).toMatchObject({ + type: 'W3cCredentialRecord', + id: expect.any(String), + createdAt: expect.any(Date), + credential: expect.any(W3cVerifiableCredential), + }) + + expect(w3cCredentialRecord.getTags()).toMatchObject({ + expandedTypes: [ + 'https://www.w3.org/2018/credentials#VerifiableCredential', + 'https://example.org/examples#UniversityDegreeCredential', + ], + }) + }) + }) + }) + + describe('BbsBlsSignature2020', () => { + let issuerDidKey: DidKey + let verificationMethod: string + beforeAll(async () => { + const key = await wallet.createKey({ keyType: KeyType.Bls12381g2, seed }) + issuerDidKey = new DidKey(key) + verificationMethod = `${issuerDidKey.did}#${issuerDidKey.key.fingerprint}` + }) + describe('signCredential', () => { + it('should return a successfully signed credential bbs', async () => { + const credentialJson = BbsBlsSignature2020Fixtures.TEST_LD_DOCUMENT + credentialJson.issuer = issuerDidKey.did + + const credential = JsonTransformer.fromJSON(credentialJson, W3cCredential) + + const vc = await w3cCredentialService.signCredential({ + credential, + proofType: 'BbsBlsSignature2020', + verificationMethod: verificationMethod, + }) + + expect(vc).toBeInstanceOf(W3cVerifiableCredential) + expect(vc.issuer).toEqual(issuerDidKey.did) + expect(Array.isArray(vc.proof)).toBe(false) + expect(vc.proof).toBeInstanceOf(LinkedDataProof) + + vc.proof = vc.proof as LinkedDataProof + expect(vc.proof.verificationMethod).toEqual(verificationMethod) + }) + }) + describe('verifyCredential', () => { + it('should verify the credential successfully', async () => { + const result = await w3cCredentialService.verifyCredential({ + credential: JsonTransformer.fromJSON( + BbsBlsSignature2020Fixtures.TEST_LD_DOCUMENT_SIGNED, + W3cVerifiableCredential + ), + proofPurpose: new purposes.AssertionProofPurpose(), + }) + + expect(result.verified).toEqual(true) + }) + }) + describe('deriveProof', () => { + it('should derive proof successfully', async () => { + const credentialJson = BbsBlsSignature2020Fixtures.TEST_LD_DOCUMENT_SIGNED + + const vc = JsonTransformer.fromJSON(credentialJson, W3cVerifiableCredential) + + const revealDocument = { + '@context': [ + 'https://www.w3.org/2018/credentials/v1', + 'https://w3id.org/citizenship/v1', + 'https://w3id.org/security/bbs/v1', + ], + type: ['VerifiableCredential', 'PermanentResidentCard'], + credentialSubject: { + '@explicit': true, + type: ['PermanentResident', 'Person'], + givenName: {}, + familyName: {}, + gender: {}, + }, + } + + const result = await w3cCredentialService.deriveProof({ + credential: vc, + revealDocument: revealDocument, + verificationMethod: verificationMethod, + }) + + // result.proof = result.proof as LinkedDataProof + expect(orArrayToArray(result.proof)[0].verificationMethod).toBe( + 'did:key:zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN#zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN' + ) + }) + }) + describe('verifyDerived', () => { + it('should verify the derived proof successfully', async () => { + const result = await w3cCredentialService.verifyCredential({ + credential: JsonTransformer.fromJSON(BbsBlsSignature2020Fixtures.TEST_VALID_DERIVED, W3cVerifiableCredential), + proofPurpose: new purposes.AssertionProofPurpose(), + }) + expect(result.verified).toEqual(true) + }) + }) + describe('createPresentation', () => { + it('should create a presentation successfully', async () => { + const vc = JsonTransformer.fromJSON(BbsBlsSignature2020Fixtures.TEST_VALID_DERIVED, W3cVerifiableCredential) + const result = await w3cCredentialService.createPresentation({ credentials: vc }) + + expect(result).toBeInstanceOf(W3cPresentation) + + expect(result.type).toEqual(expect.arrayContaining(['VerifiablePresentation'])) + + expect(result.verifiableCredential).toHaveLength(1) + expect(result.verifiableCredential).toEqual(expect.arrayContaining([vc])) + }) + }) + describe('signPresentation', () => { + it('should sign the presentation successfully', async () => { + const signingKey = Key.fromPublicKeyBase58((await wallet.createDid({ seed })).verkey, KeyType.Ed25519) + const signingDidKey = new DidKey(signingKey) + const verificationMethod = `${signingDidKey.did}#${signingDidKey.key.fingerprint}` + const presentation = JsonTransformer.fromJSON(BbsBlsSignature2020Fixtures.TEST_VP_DOCUMENT, W3cPresentation) + + const purpose = new CredentialIssuancePurpose({ + controller: { + id: 'did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL', + }, + date: new Date().toISOString(), + }) + + const verifiablePresentation = await w3cCredentialService.signPresentation({ + presentation: presentation, + purpose: purpose, + signatureType: 'Ed25519Signature2018', + challenge: 'e950bfe5-d7ec-4303-ad61-6983fb976ac9', + verificationMethod: verificationMethod, + }) + + expect(verifiablePresentation).toBeInstanceOf(W3cVerifiablePresentation) + }) + }) + describe('verifyPresentation', () => { + it('should successfully verify a presentation containing a single verifiable credential bbs', async () => { + const vp = JsonTransformer.fromJSON( + BbsBlsSignature2020Fixtures.TEST_VP_DOCUMENT_SIGNED, + W3cVerifiablePresentation + ) + + const result = await w3cCredentialService.verifyPresentation({ + presentation: vp, + proofType: 'Ed25519Signature2018', + challenge: 'e950bfe5-d7ec-4303-ad61-6983fb976ac9', + verificationMethod: + 'did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL', + }) + + expect(result.verified).toBe(true) + }) + }) + }) +}) diff --git a/packages/core/src/modules/vc/__tests__/contexts/X25519_v1.ts b/packages/core/src/modules/vc/__tests__/contexts/X25519_v1.ts new file mode 100644 index 0000000000..3a5b8bf768 --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/contexts/X25519_v1.ts @@ -0,0 +1,26 @@ +export const X25519_V1 = { + '@context': { + id: '@id', + type: '@type', + '@protected': true, + X25519KeyAgreementKey2019: { + '@id': 'https://w3id.org/security#X25519KeyAgreementKey2019', + '@context': { + '@protected': true, + id: '@id', + type: '@type', + controller: { + '@id': 'https://w3id.org/security#controller', + '@type': '@id', + }, + revoked: { + '@id': 'https://w3id.org/security#revoked', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + publicKeyBase58: { + '@id': 'https://w3id.org/security#publicKeyBase58', + }, + }, + }, + }, +} diff --git a/packages/core/src/modules/vc/__tests__/contexts/bbs_v1.ts b/packages/core/src/modules/vc/__tests__/contexts/bbs_v1.ts new file mode 100644 index 0000000000..d7fa000420 --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/contexts/bbs_v1.ts @@ -0,0 +1,92 @@ +export const BBS_V1 = { + '@context': { + '@version': 1.1, + id: '@id', + type: '@type', + BbsBlsSignature2020: { + '@id': 'https://w3id.org/security#BbsBlsSignature2020', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + challenge: 'https://w3id.org/security#challenge', + created: { + '@id': 'http://purl.org/dc/terms/created', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + domain: 'https://w3id.org/security#domain', + proofValue: 'https://w3id.org/security#proofValue', + nonce: 'https://w3id.org/security#nonce', + proofPurpose: { + '@id': 'https://w3id.org/security#proofPurpose', + '@type': '@vocab', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + assertionMethod: { + '@id': 'https://w3id.org/security#assertionMethod', + '@type': '@id', + '@container': '@set', + }, + authentication: { + '@id': 'https://w3id.org/security#authenticationMethod', + '@type': '@id', + '@container': '@set', + }, + }, + }, + verificationMethod: { + '@id': 'https://w3id.org/security#verificationMethod', + '@type': '@id', + }, + }, + }, + BbsBlsSignatureProof2020: { + '@id': 'https://w3id.org/security#BbsBlsSignatureProof2020', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + challenge: 'https://w3id.org/security#challenge', + created: { + '@id': 'http://purl.org/dc/terms/created', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + domain: 'https://w3id.org/security#domain', + nonce: 'https://w3id.org/security#nonce', + proofPurpose: { + '@id': 'https://w3id.org/security#proofPurpose', + '@type': '@vocab', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + sec: 'https://w3id.org/security#', + assertionMethod: { + '@id': 'https://w3id.org/security#assertionMethod', + '@type': '@id', + '@container': '@set', + }, + authentication: { + '@id': 'https://w3id.org/security#authenticationMethod', + '@type': '@id', + '@container': '@set', + }, + }, + }, + proofValue: 'https://w3id.org/security#proofValue', + verificationMethod: { + '@id': 'https://w3id.org/security#verificationMethod', + '@type': '@id', + }, + }, + }, + Bls12381G1Key2020: 'https://w3id.org/security#Bls12381G1Key2020', + Bls12381G2Key2020: 'https://w3id.org/security#Bls12381G2Key2020', + }, +} diff --git a/packages/core/src/modules/vc/__tests__/contexts/citizenship_v1.ts b/packages/core/src/modules/vc/__tests__/contexts/citizenship_v1.ts new file mode 100644 index 0000000000..13eb72776c --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/contexts/citizenship_v1.ts @@ -0,0 +1,45 @@ +export const CITIZENSHIP_V1 = { + '@context': { + '@version': 1.1, + '@protected': true, + name: 'http://schema.org/name', + description: 'http://schema.org/description', + identifier: 'http://schema.org/identifier', + image: { '@id': 'http://schema.org/image', '@type': '@id' }, + PermanentResidentCard: { + '@id': 'https://w3id.org/citizenship#PermanentResidentCard', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + description: 'http://schema.org/description', + name: 'http://schema.org/name', + identifier: 'http://schema.org/identifier', + image: { '@id': 'http://schema.org/image', '@type': '@id' }, + }, + }, + PermanentResident: { + '@id': 'https://w3id.org/citizenship#PermanentResident', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + ctzn: 'https://w3id.org/citizenship#', + schema: 'http://schema.org/', + xsd: 'http://www.w3.org/2001/XMLSchema#', + birthCountry: 'ctzn:birthCountry', + birthDate: { '@id': 'schema:birthDate', '@type': 'xsd:dateTime' }, + commuterClassification: 'ctzn:commuterClassification', + familyName: 'schema:familyName', + gender: 'schema:gender', + givenName: 'schema:givenName', + lprCategory: 'ctzn:lprCategory', + lprNumber: 'ctzn:lprNumber', + residentSince: { '@id': 'ctzn:residentSince', '@type': 'xsd:dateTime' }, + }, + }, + Person: 'http://schema.org/Person', + }, +} diff --git a/packages/core/src/modules/vc/__tests__/contexts/credentials_v1.ts b/packages/core/src/modules/vc/__tests__/contexts/credentials_v1.ts new file mode 100644 index 0000000000..f401fb33f5 --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/contexts/credentials_v1.ts @@ -0,0 +1,250 @@ +export const CREDENTIALS_V1 = { + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + VerifiableCredential: { + '@id': 'https://www.w3.org/2018/credentials#VerifiableCredential', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + cred: 'https://www.w3.org/2018/credentials#', + sec: 'https://w3id.org/security#', + xsd: 'http://www.w3.org/2001/XMLSchema#', + credentialSchema: { + '@id': 'cred:credentialSchema', + '@type': '@id', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + cred: 'https://www.w3.org/2018/credentials#', + JsonSchemaValidator2018: 'cred:JsonSchemaValidator2018', + }, + }, + credentialStatus: { '@id': 'cred:credentialStatus', '@type': '@id' }, + credentialSubject: { '@id': 'cred:credentialSubject', '@type': '@id' }, + evidence: { '@id': 'cred:evidence', '@type': '@id' }, + expirationDate: { + '@id': 'cred:expirationDate', + '@type': 'xsd:dateTime', + }, + holder: { '@id': 'cred:holder', '@type': '@id' }, + issued: { '@id': 'cred:issued', '@type': 'xsd:dateTime' }, + issuer: { '@id': 'cred:issuer', '@type': '@id' }, + issuanceDate: { '@id': 'cred:issuanceDate', '@type': 'xsd:dateTime' }, + proof: { '@id': 'sec:proof', '@type': '@id', '@container': '@graph' }, + refreshService: { + '@id': 'cred:refreshService', + '@type': '@id', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + cred: 'https://www.w3.org/2018/credentials#', + ManualRefreshService2018: 'cred:ManualRefreshService2018', + }, + }, + termsOfUse: { '@id': 'cred:termsOfUse', '@type': '@id' }, + validFrom: { '@id': 'cred:validFrom', '@type': 'xsd:dateTime' }, + validUntil: { '@id': 'cred:validUntil', '@type': 'xsd:dateTime' }, + }, + }, + VerifiablePresentation: { + '@id': 'https://www.w3.org/2018/credentials#VerifiablePresentation', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + cred: 'https://www.w3.org/2018/credentials#', + sec: 'https://w3id.org/security#', + holder: { '@id': 'cred:holder', '@type': '@id' }, + proof: { '@id': 'sec:proof', '@type': '@id', '@container': '@graph' }, + verifiableCredential: { + '@id': 'cred:verifiableCredential', + '@type': '@id', + '@container': '@graph', + }, + }, + }, + EcdsaSecp256k1Signature2019: { + '@id': 'https://w3id.org/security#EcdsaSecp256k1Signature2019', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + sec: 'https://w3id.org/security#', + xsd: 'http://www.w3.org/2001/XMLSchema#', + challenge: 'sec:challenge', + created: { + '@id': 'http://purl.org/dc/terms/created', + '@type': 'xsd:dateTime', + }, + domain: 'sec:domain', + expires: { '@id': 'sec:expiration', '@type': 'xsd:dateTime' }, + jws: 'sec:jws', + nonce: 'sec:nonce', + proofPurpose: { + '@id': 'sec:proofPurpose', + '@type': '@vocab', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + sec: 'https://w3id.org/security#', + assertionMethod: { + '@id': 'sec:assertionMethod', + '@type': '@id', + '@container': '@set', + }, + authentication: { + '@id': 'sec:authenticationMethod', + '@type': '@id', + '@container': '@set', + }, + }, + }, + proofValue: 'sec:proofValue', + verificationMethod: { '@id': 'sec:verificationMethod', '@type': '@id' }, + }, + }, + EcdsaSecp256r1Signature2019: { + '@id': 'https://w3id.org/security#EcdsaSecp256r1Signature2019', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + sec: 'https://w3id.org/security#', + xsd: 'http://www.w3.org/2001/XMLSchema#', + challenge: 'sec:challenge', + created: { + '@id': 'http://purl.org/dc/terms/created', + '@type': 'xsd:dateTime', + }, + domain: 'sec:domain', + expires: { '@id': 'sec:expiration', '@type': 'xsd:dateTime' }, + jws: 'sec:jws', + nonce: 'sec:nonce', + proofPurpose: { + '@id': 'sec:proofPurpose', + '@type': '@vocab', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + sec: 'https://w3id.org/security#', + assertionMethod: { + '@id': 'sec:assertionMethod', + '@type': '@id', + '@container': '@set', + }, + authentication: { + '@id': 'sec:authenticationMethod', + '@type': '@id', + '@container': '@set', + }, + }, + }, + proofValue: 'sec:proofValue', + verificationMethod: { '@id': 'sec:verificationMethod', '@type': '@id' }, + }, + }, + Ed25519Signature2018: { + '@id': 'https://w3id.org/security#Ed25519Signature2018', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + sec: 'https://w3id.org/security#', + xsd: 'http://www.w3.org/2001/XMLSchema#', + challenge: 'sec:challenge', + created: { + '@id': 'http://purl.org/dc/terms/created', + '@type': 'xsd:dateTime', + }, + domain: 'sec:domain', + expires: { '@id': 'sec:expiration', '@type': 'xsd:dateTime' }, + jws: 'sec:jws', + nonce: 'sec:nonce', + proofPurpose: { + '@id': 'sec:proofPurpose', + '@type': '@vocab', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + sec: 'https://w3id.org/security#', + assertionMethod: { + '@id': 'sec:assertionMethod', + '@type': '@id', + '@container': '@set', + }, + authentication: { + '@id': 'sec:authenticationMethod', + '@type': '@id', + '@container': '@set', + }, + }, + }, + proofValue: 'sec:proofValue', + verificationMethod: { '@id': 'sec:verificationMethod', '@type': '@id' }, + }, + }, + RsaSignature2018: { + '@id': 'https://w3id.org/security#RsaSignature2018', + '@context': { + '@version': 1.1, + '@protected': true, + challenge: 'sec:challenge', + created: { + '@id': 'http://purl.org/dc/terms/created', + '@type': 'xsd:dateTime', + }, + domain: 'sec:domain', + expires: { '@id': 'sec:expiration', '@type': 'xsd:dateTime' }, + jws: 'sec:jws', + nonce: 'sec:nonce', + proofPurpose: { + '@id': 'sec:proofPurpose', + '@type': '@vocab', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + sec: 'https://w3id.org/security#', + assertionMethod: { + '@id': 'sec:assertionMethod', + '@type': '@id', + '@container': '@set', + }, + authentication: { + '@id': 'sec:authenticationMethod', + '@type': '@id', + '@container': '@set', + }, + }, + }, + proofValue: 'sec:proofValue', + verificationMethod: { '@id': 'sec:verificationMethod', '@type': '@id' }, + }, + }, + proof: { + '@id': 'https://w3id.org/security#proof', + '@type': '@id', + '@container': '@graph', + }, + }, +} diff --git a/packages/core/src/modules/vc/__tests__/contexts/did_v1.ts b/packages/core/src/modules/vc/__tests__/contexts/did_v1.ts new file mode 100644 index 0000000000..2a431389b3 --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/contexts/did_v1.ts @@ -0,0 +1,56 @@ +export const DID_V1 = { + '@context': { + '@protected': true, + id: '@id', + type: '@type', + alsoKnownAs: { + '@id': 'https://www.w3.org/ns/activitystreams#alsoKnownAs', + '@type': '@id', + }, + assertionMethod: { + '@id': 'https://w3id.org/security#assertionMethod', + '@type': '@id', + '@container': '@set', + }, + authentication: { + '@id': 'https://w3id.org/security#authenticationMethod', + '@type': '@id', + '@container': '@set', + }, + capabilityDelegation: { + '@id': 'https://w3id.org/security#capabilityDelegationMethod', + '@type': '@id', + '@container': '@set', + }, + capabilityInvocation: { + '@id': 'https://w3id.org/security#capabilityInvocationMethod', + '@type': '@id', + '@container': '@set', + }, + controller: { + '@id': 'https://w3id.org/security#controller', + '@type': '@id', + }, + keyAgreement: { + '@id': 'https://w3id.org/security#keyAgreementMethod', + '@type': '@id', + '@container': '@set', + }, + service: { + '@id': 'https://www.w3.org/ns/did#service', + '@type': '@id', + '@context': { + '@protected': true, + id: '@id', + type: '@type', + serviceEndpoint: { + '@id': 'https://www.w3.org/ns/did#serviceEndpoint', + '@type': '@id', + }, + }, + }, + verificationMethod: { + '@id': 'https://w3id.org/security#verificationMethod', + }, + }, +} diff --git a/packages/core/src/modules/vc/__tests__/contexts/ed25519_v1.ts b/packages/core/src/modules/vc/__tests__/contexts/ed25519_v1.ts new file mode 100644 index 0000000000..29e09035d4 --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/contexts/ed25519_v1.ts @@ -0,0 +1,91 @@ +export const ED25519_V1 = { + '@context': { + id: '@id', + type: '@type', + '@protected': true, + proof: { + '@id': 'https://w3id.org/security#proof', + '@type': '@id', + '@container': '@graph', + }, + Ed25519VerificationKey2018: { + '@id': 'https://w3id.org/security#Ed25519VerificationKey2018', + '@context': { + '@protected': true, + id: '@id', + type: '@type', + controller: { + '@id': 'https://w3id.org/security#controller', + '@type': '@id', + }, + revoked: { + '@id': 'https://w3id.org/security#revoked', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + publicKeyBase58: { + '@id': 'https://w3id.org/security#publicKeyBase58', + }, + }, + }, + Ed25519Signature2018: { + '@id': 'https://w3id.org/security#Ed25519Signature2018', + '@context': { + '@protected': true, + id: '@id', + type: '@type', + challenge: 'https://w3id.org/security#challenge', + created: { + '@id': 'http://purl.org/dc/terms/created', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + domain: 'https://w3id.org/security#domain', + expires: { + '@id': 'https://w3id.org/security#expiration', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + nonce: 'https://w3id.org/security#nonce', + proofPurpose: { + '@id': 'https://w3id.org/security#proofPurpose', + '@type': '@vocab', + '@context': { + '@protected': true, + id: '@id', + type: '@type', + assertionMethod: { + '@id': 'https://w3id.org/security#assertionMethod', + '@type': '@id', + '@container': '@set', + }, + authentication: { + '@id': 'https://w3id.org/security#authenticationMethod', + '@type': '@id', + '@container': '@set', + }, + capabilityInvocation: { + '@id': 'https://w3id.org/security#capabilityInvocationMethod', + '@type': '@id', + '@container': '@set', + }, + capabilityDelegation: { + '@id': 'https://w3id.org/security#capabilityDelegationMethod', + '@type': '@id', + '@container': '@set', + }, + keyAgreement: { + '@id': 'https://w3id.org/security#keyAgreementMethod', + '@type': '@id', + '@container': '@set', + }, + }, + }, + jws: { + '@id': 'https://w3id.org/security#jws', + }, + verificationMethod: { + '@id': 'https://w3id.org/security#verificationMethod', + '@type': '@id', + }, + }, + }, + }, +} diff --git a/packages/core/src/modules/vc/__tests__/contexts/examples_v1.ts b/packages/core/src/modules/vc/__tests__/contexts/examples_v1.ts new file mode 100644 index 0000000000..c0894b4553 --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/contexts/examples_v1.ts @@ -0,0 +1,46 @@ +export const EXAMPLES_V1 = { + '@context': [ + { '@version': 1.1 }, + 'https://www.w3.org/ns/odrl.jsonld', + { + ex: 'https://example.org/examples#', + schema: 'http://schema.org/', + rdf: 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', + '3rdPartyCorrelation': 'ex:3rdPartyCorrelation', + AllVerifiers: 'ex:AllVerifiers', + Archival: 'ex:Archival', + BachelorDegree: 'ex:BachelorDegree', + Child: 'ex:Child', + CLCredentialDefinition2019: 'ex:CLCredentialDefinition2019', + CLSignature2019: 'ex:CLSignature2019', + IssuerPolicy: 'ex:IssuerPolicy', + HolderPolicy: 'ex:HolderPolicy', + Mother: 'ex:Mother', + RelationshipCredential: 'ex:RelationshipCredential', + UniversityDegreeCredential: 'ex:UniversityDegreeCredential', + ZkpExampleSchema2018: 'ex:ZkpExampleSchema2018', + issuerData: 'ex:issuerData', + attributes: 'ex:attributes', + signature: 'ex:signature', + signatureCorrectnessProof: 'ex:signatureCorrectnessProof', + primaryProof: 'ex:primaryProof', + nonRevocationProof: 'ex:nonRevocationProof', + alumniOf: { '@id': 'schema:alumniOf', '@type': 'rdf:HTML' }, + child: { '@id': 'ex:child', '@type': '@id' }, + degree: 'ex:degree', + degreeType: 'ex:degreeType', + degreeSchool: 'ex:degreeSchool', + college: 'ex:college', + name: { '@id': 'schema:name', '@type': 'rdf:HTML' }, + givenName: 'schema:givenName', + familyName: 'schema:familyName', + parent: { '@id': 'ex:parent', '@type': '@id' }, + referenceId: 'ex:referenceId', + documentPresence: 'ex:documentPresence', + evidenceDocument: 'ex:evidenceDocument', + spouse: 'schema:spouse', + subjectPresence: 'ex:subjectPresence', + verifier: { '@id': 'ex:verifier', '@type': '@id' }, + }, + ], +} diff --git a/packages/core/src/modules/vc/__tests__/contexts/index.ts b/packages/core/src/modules/vc/__tests__/contexts/index.ts new file mode 100644 index 0000000000..c66801c24a --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/contexts/index.ts @@ -0,0 +1,11 @@ +export * from './bbs_v1' +export * from './citizenship_v1' +export * from './credentials_v1' +export * from './did_v1' +export * from './examples_v1' +export * from './odrl' +export * from './schema_org' +export * from './security_v1' +export * from './security_v2' +export * from './security_v3_unstable' +export * from './vaccination_v1' diff --git a/packages/core/src/modules/vc/__tests__/contexts/odrl.ts b/packages/core/src/modules/vc/__tests__/contexts/odrl.ts new file mode 100644 index 0000000000..6efea2320e --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/contexts/odrl.ts @@ -0,0 +1,181 @@ +export const ODRL = { + '@context': { + odrl: 'http://www.w3.org/ns/odrl/2/', + rdf: 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', + rdfs: 'http://www.w3.org/2000/01/rdf-schema#', + owl: 'http://www.w3.org/2002/07/owl#', + skos: 'http://www.w3.org/2004/02/skos/core#', + dct: 'http://purl.org/dc/terms/', + xsd: 'http://www.w3.org/2001/XMLSchema#', + vcard: 'http://www.w3.org/2006/vcard/ns#', + foaf: 'http://xmlns.com/foaf/0.1/', + schema: 'http://schema.org/', + cc: 'http://creativecommons.org/ns#', + uid: '@id', + type: '@type', + Policy: 'odrl:Policy', + Rule: 'odrl:Rule', + profile: { '@type': '@id', '@id': 'odrl:profile' }, + inheritFrom: { '@type': '@id', '@id': 'odrl:inheritFrom' }, + ConflictTerm: 'odrl:ConflictTerm', + conflict: { '@type': '@vocab', '@id': 'odrl:conflict' }, + perm: 'odrl:perm', + prohibit: 'odrl:prohibit', + invalid: 'odrl:invalid', + Agreement: 'odrl:Agreement', + Assertion: 'odrl:Assertion', + Offer: 'odrl:Offer', + Privacy: 'odrl:Privacy', + Request: 'odrl:Request', + Set: 'odrl:Set', + Ticket: 'odrl:Ticket', + Asset: 'odrl:Asset', + AssetCollection: 'odrl:AssetCollection', + relation: { '@type': '@id', '@id': 'odrl:relation' }, + hasPolicy: { '@type': '@id', '@id': 'odrl:hasPolicy' }, + target: { '@type': '@id', '@id': 'odrl:target' }, + output: { '@type': '@id', '@id': 'odrl:output' }, + partOf: { '@type': '@id', '@id': 'odrl:partOf' }, + source: { '@type': '@id', '@id': 'odrl:source' }, + Party: 'odrl:Party', + PartyCollection: 'odrl:PartyCollection', + function: { '@type': '@vocab', '@id': 'odrl:function' }, + PartyScope: 'odrl:PartyScope', + assignee: { '@type': '@id', '@id': 'odrl:assignee' }, + assigner: { '@type': '@id', '@id': 'odrl:assigner' }, + assigneeOf: { '@type': '@id', '@id': 'odrl:assigneeOf' }, + assignerOf: { '@type': '@id', '@id': 'odrl:assignerOf' }, + attributedParty: { '@type': '@id', '@id': 'odrl:attributedParty' }, + attributingParty: { '@type': '@id', '@id': 'odrl:attributingParty' }, + compensatedParty: { '@type': '@id', '@id': 'odrl:compensatedParty' }, + compensatingParty: { '@type': '@id', '@id': 'odrl:compensatingParty' }, + consentingParty: { '@type': '@id', '@id': 'odrl:consentingParty' }, + consentedParty: { '@type': '@id', '@id': 'odrl:consentedParty' }, + informedParty: { '@type': '@id', '@id': 'odrl:informedParty' }, + informingParty: { '@type': '@id', '@id': 'odrl:informingParty' }, + trackingParty: { '@type': '@id', '@id': 'odrl:trackingParty' }, + trackedParty: { '@type': '@id', '@id': 'odrl:trackedParty' }, + contractingParty: { '@type': '@id', '@id': 'odrl:contractingParty' }, + contractedParty: { '@type': '@id', '@id': 'odrl:contractedParty' }, + Action: 'odrl:Action', + action: { '@type': '@vocab', '@id': 'odrl:action' }, + includedIn: { '@type': '@id', '@id': 'odrl:includedIn' }, + implies: { '@type': '@id', '@id': 'odrl:implies' }, + Permission: 'odrl:Permission', + permission: { '@type': '@id', '@id': 'odrl:permission' }, + Prohibition: 'odrl:Prohibition', + prohibition: { '@type': '@id', '@id': 'odrl:prohibition' }, + obligation: { '@type': '@id', '@id': 'odrl:obligation' }, + use: 'odrl:use', + grantUse: 'odrl:grantUse', + aggregate: 'odrl:aggregate', + annotate: 'odrl:annotate', + anonymize: 'odrl:anonymize', + archive: 'odrl:archive', + concurrentUse: 'odrl:concurrentUse', + derive: 'odrl:derive', + digitize: 'odrl:digitize', + display: 'odrl:display', + distribute: 'odrl:distribute', + execute: 'odrl:execute', + extract: 'odrl:extract', + give: 'odrl:give', + index: 'odrl:index', + install: 'odrl:install', + modify: 'odrl:modify', + move: 'odrl:move', + play: 'odrl:play', + present: 'odrl:present', + print: 'odrl:print', + read: 'odrl:read', + reproduce: 'odrl:reproduce', + sell: 'odrl:sell', + stream: 'odrl:stream', + textToSpeech: 'odrl:textToSpeech', + transfer: 'odrl:transfer', + transform: 'odrl:transform', + translate: 'odrl:translate', + Duty: 'odrl:Duty', + duty: { '@type': '@id', '@id': 'odrl:duty' }, + consequence: { '@type': '@id', '@id': 'odrl:consequence' }, + remedy: { '@type': '@id', '@id': 'odrl:remedy' }, + acceptTracking: 'odrl:acceptTracking', + attribute: 'odrl:attribute', + compensate: 'odrl:compensate', + delete: 'odrl:delete', + ensureExclusivity: 'odrl:ensureExclusivity', + include: 'odrl:include', + inform: 'odrl:inform', + nextPolicy: 'odrl:nextPolicy', + obtainConsent: 'odrl:obtainConsent', + reviewPolicy: 'odrl:reviewPolicy', + uninstall: 'odrl:uninstall', + watermark: 'odrl:watermark', + Constraint: 'odrl:Constraint', + LogicalConstraint: 'odrl:LogicalConstraint', + constraint: { '@type': '@id', '@id': 'odrl:constraint' }, + refinement: { '@type': '@id', '@id': 'odrl:refinement' }, + Operator: 'odrl:Operator', + operator: { '@type': '@vocab', '@id': 'odrl:operator' }, + RightOperand: 'odrl:RightOperand', + rightOperand: 'odrl:rightOperand', + rightOperandReference: { + '@type': 'xsd:anyURI', + '@id': 'odrl:rightOperandReference', + }, + LeftOperand: 'odrl:LeftOperand', + leftOperand: { '@type': '@vocab', '@id': 'odrl:leftOperand' }, + unit: 'odrl:unit', + dataType: { '@type': 'xsd:anyType', '@id': 'odrl:datatype' }, + status: 'odrl:status', + absolutePosition: 'odrl:absolutePosition', + absoluteSpatialPosition: 'odrl:absoluteSpatialPosition', + absoluteTemporalPosition: 'odrl:absoluteTemporalPosition', + absoluteSize: 'odrl:absoluteSize', + count: 'odrl:count', + dateTime: 'odrl:dateTime', + delayPeriod: 'odrl:delayPeriod', + deliveryChannel: 'odrl:deliveryChannel', + elapsedTime: 'odrl:elapsedTime', + event: 'odrl:event', + fileFormat: 'odrl:fileFormat', + industry: 'odrl:industry:', + language: 'odrl:language', + media: 'odrl:media', + meteredTime: 'odrl:meteredTime', + payAmount: 'odrl:payAmount', + percentage: 'odrl:percentage', + product: 'odrl:product', + purpose: 'odrl:purpose', + recipient: 'odrl:recipient', + relativePosition: 'odrl:relativePosition', + relativeSpatialPosition: 'odrl:relativeSpatialPosition', + relativeTemporalPosition: 'odrl:relativeTemporalPosition', + relativeSize: 'odrl:relativeSize', + resolution: 'odrl:resolution', + spatial: 'odrl:spatial', + spatialCoordinates: 'odrl:spatialCoordinates', + systemDevice: 'odrl:systemDevice', + timeInterval: 'odrl:timeInterval', + unitOfCount: 'odrl:unitOfCount', + version: 'odrl:version', + virtualLocation: 'odrl:virtualLocation', + eq: 'odrl:eq', + gt: 'odrl:gt', + gteq: 'odrl:gteq', + lt: 'odrl:lt', + lteq: 'odrl:lteq', + neq: 'odrl:neg', + isA: 'odrl:isA', + hasPart: 'odrl:hasPart', + isPartOf: 'odrl:isPartOf', + isAllOf: 'odrl:isAllOf', + isAnyOf: 'odrl:isAnyOf', + isNoneOf: 'odrl:isNoneOf', + or: 'odrl:or', + xone: 'odrl:xone', + and: 'odrl:and', + andSequence: 'odrl:andSequence', + policyUsage: 'odrl:policyUsage', + }, +} diff --git a/packages/core/src/modules/vc/__tests__/contexts/schema_org.ts b/packages/core/src/modules/vc/__tests__/contexts/schema_org.ts new file mode 100644 index 0000000000..818951da70 --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/contexts/schema_org.ts @@ -0,0 +1,2838 @@ +export const SCHEMA_ORG = { + '@context': { + type: '@type', + id: '@id', + HTML: { '@id': 'rdf:HTML' }, + '@vocab': 'http://schema.org/', + rdf: 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', + rdfs: 'http://www.w3.org/2000/01/rdf-schema#', + xsd: 'http://www.w3.org/2001/XMLSchema#', + schema: 'http://schema.org/', + owl: 'http://www.w3.org/2002/07/owl#', + dc: 'http://purl.org/dc/elements/1.1/', + dct: 'http://purl.org/dc/terms/', + dctype: 'http://purl.org/dc/dcmitype/', + void: 'http://rdfs.org/ns/void#', + dcat: 'http://www.w3.org/ns/dcat#', + '3DModel': { '@id': 'schema:3DModel' }, + AMRadioChannel: { '@id': 'schema:AMRadioChannel' }, + APIReference: { '@id': 'schema:APIReference' }, + Abdomen: { '@id': 'schema:Abdomen' }, + AboutPage: { '@id': 'schema:AboutPage' }, + AcceptAction: { '@id': 'schema:AcceptAction' }, + Accommodation: { '@id': 'schema:Accommodation' }, + AccountingService: { '@id': 'schema:AccountingService' }, + AchieveAction: { '@id': 'schema:AchieveAction' }, + Action: { '@id': 'schema:Action' }, + ActionAccessSpecification: { '@id': 'schema:ActionAccessSpecification' }, + ActionStatusType: { '@id': 'schema:ActionStatusType' }, + ActivateAction: { '@id': 'schema:ActivateAction' }, + ActivationFee: { '@id': 'schema:ActivationFee' }, + ActiveActionStatus: { '@id': 'schema:ActiveActionStatus' }, + ActiveNotRecruiting: { '@id': 'schema:ActiveNotRecruiting' }, + AddAction: { '@id': 'schema:AddAction' }, + AdministrativeArea: { '@id': 'schema:AdministrativeArea' }, + AdultEntertainment: { '@id': 'schema:AdultEntertainment' }, + AdvertiserContentArticle: { '@id': 'schema:AdvertiserContentArticle' }, + AerobicActivity: { '@id': 'schema:AerobicActivity' }, + AggregateOffer: { '@id': 'schema:AggregateOffer' }, + AggregateRating: { '@id': 'schema:AggregateRating' }, + AgreeAction: { '@id': 'schema:AgreeAction' }, + Airline: { '@id': 'schema:Airline' }, + Airport: { '@id': 'schema:Airport' }, + AlbumRelease: { '@id': 'schema:AlbumRelease' }, + AlignmentObject: { '@id': 'schema:AlignmentObject' }, + AllWheelDriveConfiguration: { '@id': 'schema:AllWheelDriveConfiguration' }, + AllergiesHealthAspect: { '@id': 'schema:AllergiesHealthAspect' }, + AllocateAction: { '@id': 'schema:AllocateAction' }, + AmpStory: { '@id': 'schema:AmpStory' }, + AmusementPark: { '@id': 'schema:AmusementPark' }, + AnaerobicActivity: { '@id': 'schema:AnaerobicActivity' }, + AnalysisNewsArticle: { '@id': 'schema:AnalysisNewsArticle' }, + AnatomicalStructure: { '@id': 'schema:AnatomicalStructure' }, + AnatomicalSystem: { '@id': 'schema:AnatomicalSystem' }, + Anesthesia: { '@id': 'schema:Anesthesia' }, + AnimalShelter: { '@id': 'schema:AnimalShelter' }, + Answer: { '@id': 'schema:Answer' }, + Apartment: { '@id': 'schema:Apartment' }, + ApartmentComplex: { '@id': 'schema:ApartmentComplex' }, + Appearance: { '@id': 'schema:Appearance' }, + AppendAction: { '@id': 'schema:AppendAction' }, + ApplyAction: { '@id': 'schema:ApplyAction' }, + ApprovedIndication: { '@id': 'schema:ApprovedIndication' }, + Aquarium: { '@id': 'schema:Aquarium' }, + ArchiveComponent: { '@id': 'schema:ArchiveComponent' }, + ArchiveOrganization: { '@id': 'schema:ArchiveOrganization' }, + ArriveAction: { '@id': 'schema:ArriveAction' }, + ArtGallery: { '@id': 'schema:ArtGallery' }, + Artery: { '@id': 'schema:Artery' }, + Article: { '@id': 'schema:Article' }, + AskAction: { '@id': 'schema:AskAction' }, + AskPublicNewsArticle: { '@id': 'schema:AskPublicNewsArticle' }, + AssessAction: { '@id': 'schema:AssessAction' }, + AssignAction: { '@id': 'schema:AssignAction' }, + Atlas: { '@id': 'schema:Atlas' }, + Attorney: { '@id': 'schema:Attorney' }, + Audience: { '@id': 'schema:Audience' }, + AudioObject: { '@id': 'schema:AudioObject' }, + Audiobook: { '@id': 'schema:Audiobook' }, + AudiobookFormat: { '@id': 'schema:AudiobookFormat' }, + AuthoritativeLegalValue: { '@id': 'schema:AuthoritativeLegalValue' }, + AuthorizeAction: { '@id': 'schema:AuthorizeAction' }, + AutoBodyShop: { '@id': 'schema:AutoBodyShop' }, + AutoDealer: { '@id': 'schema:AutoDealer' }, + AutoPartsStore: { '@id': 'schema:AutoPartsStore' }, + AutoRental: { '@id': 'schema:AutoRental' }, + AutoRepair: { '@id': 'schema:AutoRepair' }, + AutoWash: { '@id': 'schema:AutoWash' }, + AutomatedTeller: { '@id': 'schema:AutomatedTeller' }, + AutomotiveBusiness: { '@id': 'schema:AutomotiveBusiness' }, + Ayurvedic: { '@id': 'schema:Ayurvedic' }, + BackOrder: { '@id': 'schema:BackOrder' }, + BackgroundNewsArticle: { '@id': 'schema:BackgroundNewsArticle' }, + Bacteria: { '@id': 'schema:Bacteria' }, + Bakery: { '@id': 'schema:Bakery' }, + Balance: { '@id': 'schema:Balance' }, + BankAccount: { '@id': 'schema:BankAccount' }, + BankOrCreditUnion: { '@id': 'schema:BankOrCreditUnion' }, + BarOrPub: { '@id': 'schema:BarOrPub' }, + Barcode: { '@id': 'schema:Barcode' }, + BasicIncome: { '@id': 'schema:BasicIncome' }, + Beach: { '@id': 'schema:Beach' }, + BeautySalon: { '@id': 'schema:BeautySalon' }, + BedAndBreakfast: { '@id': 'schema:BedAndBreakfast' }, + BedDetails: { '@id': 'schema:BedDetails' }, + BedType: { '@id': 'schema:BedType' }, + BefriendAction: { '@id': 'schema:BefriendAction' }, + BenefitsHealthAspect: { '@id': 'schema:BenefitsHealthAspect' }, + BikeStore: { '@id': 'schema:BikeStore' }, + Blog: { '@id': 'schema:Blog' }, + BlogPosting: { '@id': 'schema:BlogPosting' }, + BloodTest: { '@id': 'schema:BloodTest' }, + BoardingPolicyType: { '@id': 'schema:BoardingPolicyType' }, + BoatReservation: { '@id': 'schema:BoatReservation' }, + BoatTerminal: { '@id': 'schema:BoatTerminal' }, + BoatTrip: { '@id': 'schema:BoatTrip' }, + BodyMeasurementArm: { '@id': 'schema:BodyMeasurementArm' }, + BodyMeasurementBust: { '@id': 'schema:BodyMeasurementBust' }, + BodyMeasurementChest: { '@id': 'schema:BodyMeasurementChest' }, + BodyMeasurementFoot: { '@id': 'schema:BodyMeasurementFoot' }, + BodyMeasurementHand: { '@id': 'schema:BodyMeasurementHand' }, + BodyMeasurementHead: { '@id': 'schema:BodyMeasurementHead' }, + BodyMeasurementHeight: { '@id': 'schema:BodyMeasurementHeight' }, + BodyMeasurementHips: { '@id': 'schema:BodyMeasurementHips' }, + BodyMeasurementInsideLeg: { '@id': 'schema:BodyMeasurementInsideLeg' }, + BodyMeasurementNeck: { '@id': 'schema:BodyMeasurementNeck' }, + BodyMeasurementTypeEnumeration: { + '@id': 'schema:BodyMeasurementTypeEnumeration', + }, + BodyMeasurementUnderbust: { '@id': 'schema:BodyMeasurementUnderbust' }, + BodyMeasurementWaist: { '@id': 'schema:BodyMeasurementWaist' }, + BodyMeasurementWeight: { '@id': 'schema:BodyMeasurementWeight' }, + BodyOfWater: { '@id': 'schema:BodyOfWater' }, + Bone: { '@id': 'schema:Bone' }, + Book: { '@id': 'schema:Book' }, + BookFormatType: { '@id': 'schema:BookFormatType' }, + BookSeries: { '@id': 'schema:BookSeries' }, + BookStore: { '@id': 'schema:BookStore' }, + BookmarkAction: { '@id': 'schema:BookmarkAction' }, + Boolean: { '@id': 'schema:Boolean' }, + BorrowAction: { '@id': 'schema:BorrowAction' }, + BowlingAlley: { '@id': 'schema:BowlingAlley' }, + BrainStructure: { '@id': 'schema:BrainStructure' }, + Brand: { '@id': 'schema:Brand' }, + BreadcrumbList: { '@id': 'schema:BreadcrumbList' }, + Brewery: { '@id': 'schema:Brewery' }, + Bridge: { '@id': 'schema:Bridge' }, + BroadcastChannel: { '@id': 'schema:BroadcastChannel' }, + BroadcastEvent: { '@id': 'schema:BroadcastEvent' }, + BroadcastFrequencySpecification: { + '@id': 'schema:BroadcastFrequencySpecification', + }, + BroadcastRelease: { '@id': 'schema:BroadcastRelease' }, + BroadcastService: { '@id': 'schema:BroadcastService' }, + BrokerageAccount: { '@id': 'schema:BrokerageAccount' }, + BuddhistTemple: { '@id': 'schema:BuddhistTemple' }, + BusOrCoach: { '@id': 'schema:BusOrCoach' }, + BusReservation: { '@id': 'schema:BusReservation' }, + BusStation: { '@id': 'schema:BusStation' }, + BusStop: { '@id': 'schema:BusStop' }, + BusTrip: { '@id': 'schema:BusTrip' }, + BusinessAudience: { '@id': 'schema:BusinessAudience' }, + BusinessEntityType: { '@id': 'schema:BusinessEntityType' }, + BusinessEvent: { '@id': 'schema:BusinessEvent' }, + BusinessFunction: { '@id': 'schema:BusinessFunction' }, + BusinessSupport: { '@id': 'schema:BusinessSupport' }, + BuyAction: { '@id': 'schema:BuyAction' }, + CDCPMDRecord: { '@id': 'schema:CDCPMDRecord' }, + CDFormat: { '@id': 'schema:CDFormat' }, + CT: { '@id': 'schema:CT' }, + CableOrSatelliteService: { '@id': 'schema:CableOrSatelliteService' }, + CafeOrCoffeeShop: { '@id': 'schema:CafeOrCoffeeShop' }, + Campground: { '@id': 'schema:Campground' }, + CampingPitch: { '@id': 'schema:CampingPitch' }, + Canal: { '@id': 'schema:Canal' }, + CancelAction: { '@id': 'schema:CancelAction' }, + Car: { '@id': 'schema:Car' }, + CarUsageType: { '@id': 'schema:CarUsageType' }, + Cardiovascular: { '@id': 'schema:Cardiovascular' }, + CardiovascularExam: { '@id': 'schema:CardiovascularExam' }, + CaseSeries: { '@id': 'schema:CaseSeries' }, + Casino: { '@id': 'schema:Casino' }, + CassetteFormat: { '@id': 'schema:CassetteFormat' }, + CategoryCode: { '@id': 'schema:CategoryCode' }, + CategoryCodeSet: { '@id': 'schema:CategoryCodeSet' }, + CatholicChurch: { '@id': 'schema:CatholicChurch' }, + CausesHealthAspect: { '@id': 'schema:CausesHealthAspect' }, + Cemetery: { '@id': 'schema:Cemetery' }, + Chapter: { '@id': 'schema:Chapter' }, + CharitableIncorporatedOrganization: { + '@id': 'schema:CharitableIncorporatedOrganization', + }, + CheckAction: { '@id': 'schema:CheckAction' }, + CheckInAction: { '@id': 'schema:CheckInAction' }, + CheckOutAction: { '@id': 'schema:CheckOutAction' }, + CheckoutPage: { '@id': 'schema:CheckoutPage' }, + ChildCare: { '@id': 'schema:ChildCare' }, + ChildrensEvent: { '@id': 'schema:ChildrensEvent' }, + Chiropractic: { '@id': 'schema:Chiropractic' }, + ChooseAction: { '@id': 'schema:ChooseAction' }, + Church: { '@id': 'schema:Church' }, + City: { '@id': 'schema:City' }, + CityHall: { '@id': 'schema:CityHall' }, + CivicStructure: { '@id': 'schema:CivicStructure' }, + Claim: { '@id': 'schema:Claim' }, + ClaimReview: { '@id': 'schema:ClaimReview' }, + Class: { '@id': 'schema:Class' }, + CleaningFee: { '@id': 'schema:CleaningFee' }, + Clinician: { '@id': 'schema:Clinician' }, + Clip: { '@id': 'schema:Clip' }, + ClothingStore: { '@id': 'schema:ClothingStore' }, + CoOp: { '@id': 'schema:CoOp' }, + Code: { '@id': 'schema:Code' }, + CohortStudy: { '@id': 'schema:CohortStudy' }, + Collection: { '@id': 'schema:Collection' }, + CollectionPage: { '@id': 'schema:CollectionPage' }, + CollegeOrUniversity: { '@id': 'schema:CollegeOrUniversity' }, + ComedyClub: { '@id': 'schema:ComedyClub' }, + ComedyEvent: { '@id': 'schema:ComedyEvent' }, + ComicCoverArt: { '@id': 'schema:ComicCoverArt' }, + ComicIssue: { '@id': 'schema:ComicIssue' }, + ComicSeries: { '@id': 'schema:ComicSeries' }, + ComicStory: { '@id': 'schema:ComicStory' }, + Comment: { '@id': 'schema:Comment' }, + CommentAction: { '@id': 'schema:CommentAction' }, + CommentPermission: { '@id': 'schema:CommentPermission' }, + CommunicateAction: { '@id': 'schema:CommunicateAction' }, + CommunityHealth: { '@id': 'schema:CommunityHealth' }, + CompilationAlbum: { '@id': 'schema:CompilationAlbum' }, + CompleteDataFeed: { '@id': 'schema:CompleteDataFeed' }, + Completed: { '@id': 'schema:Completed' }, + CompletedActionStatus: { '@id': 'schema:CompletedActionStatus' }, + CompoundPriceSpecification: { '@id': 'schema:CompoundPriceSpecification' }, + ComputerLanguage: { '@id': 'schema:ComputerLanguage' }, + ComputerStore: { '@id': 'schema:ComputerStore' }, + ConfirmAction: { '@id': 'schema:ConfirmAction' }, + Consortium: { '@id': 'schema:Consortium' }, + ConsumeAction: { '@id': 'schema:ConsumeAction' }, + ContactPage: { '@id': 'schema:ContactPage' }, + ContactPoint: { '@id': 'schema:ContactPoint' }, + ContactPointOption: { '@id': 'schema:ContactPointOption' }, + ContagiousnessHealthAspect: { '@id': 'schema:ContagiousnessHealthAspect' }, + Continent: { '@id': 'schema:Continent' }, + ControlAction: { '@id': 'schema:ControlAction' }, + ConvenienceStore: { '@id': 'schema:ConvenienceStore' }, + Conversation: { '@id': 'schema:Conversation' }, + CookAction: { '@id': 'schema:CookAction' }, + Corporation: { '@id': 'schema:Corporation' }, + CorrectionComment: { '@id': 'schema:CorrectionComment' }, + Country: { '@id': 'schema:Country' }, + Course: { '@id': 'schema:Course' }, + CourseInstance: { '@id': 'schema:CourseInstance' }, + Courthouse: { '@id': 'schema:Courthouse' }, + CoverArt: { '@id': 'schema:CoverArt' }, + CovidTestingFacility: { '@id': 'schema:CovidTestingFacility' }, + CreateAction: { '@id': 'schema:CreateAction' }, + CreativeWork: { '@id': 'schema:CreativeWork' }, + CreativeWorkSeason: { '@id': 'schema:CreativeWorkSeason' }, + CreativeWorkSeries: { '@id': 'schema:CreativeWorkSeries' }, + CreditCard: { '@id': 'schema:CreditCard' }, + Crematorium: { '@id': 'schema:Crematorium' }, + CriticReview: { '@id': 'schema:CriticReview' }, + CrossSectional: { '@id': 'schema:CrossSectional' }, + CssSelectorType: { '@id': 'schema:CssSelectorType' }, + CurrencyConversionService: { '@id': 'schema:CurrencyConversionService' }, + DDxElement: { '@id': 'schema:DDxElement' }, + DJMixAlbum: { '@id': 'schema:DJMixAlbum' }, + DVDFormat: { '@id': 'schema:DVDFormat' }, + DamagedCondition: { '@id': 'schema:DamagedCondition' }, + DanceEvent: { '@id': 'schema:DanceEvent' }, + DanceGroup: { '@id': 'schema:DanceGroup' }, + DataCatalog: { '@id': 'schema:DataCatalog' }, + DataDownload: { '@id': 'schema:DataDownload' }, + DataFeed: { '@id': 'schema:DataFeed' }, + DataFeedItem: { '@id': 'schema:DataFeedItem' }, + DataType: { '@id': 'schema:DataType' }, + Dataset: { '@id': 'schema:Dataset' }, + Date: { '@id': 'schema:Date' }, + DateTime: { '@id': 'schema:DateTime' }, + DatedMoneySpecification: { '@id': 'schema:DatedMoneySpecification' }, + DayOfWeek: { '@id': 'schema:DayOfWeek' }, + DaySpa: { '@id': 'schema:DaySpa' }, + DeactivateAction: { '@id': 'schema:DeactivateAction' }, + DecontextualizedContent: { '@id': 'schema:DecontextualizedContent' }, + DefenceEstablishment: { '@id': 'schema:DefenceEstablishment' }, + DefinedRegion: { '@id': 'schema:DefinedRegion' }, + DefinedTerm: { '@id': 'schema:DefinedTerm' }, + DefinedTermSet: { '@id': 'schema:DefinedTermSet' }, + DefinitiveLegalValue: { '@id': 'schema:DefinitiveLegalValue' }, + DeleteAction: { '@id': 'schema:DeleteAction' }, + DeliveryChargeSpecification: { '@id': 'schema:DeliveryChargeSpecification' }, + DeliveryEvent: { '@id': 'schema:DeliveryEvent' }, + DeliveryMethod: { '@id': 'schema:DeliveryMethod' }, + DeliveryTimeSettings: { '@id': 'schema:DeliveryTimeSettings' }, + Demand: { '@id': 'schema:Demand' }, + DemoAlbum: { '@id': 'schema:DemoAlbum' }, + Dentist: { '@id': 'schema:Dentist' }, + Dentistry: { '@id': 'schema:Dentistry' }, + DepartAction: { '@id': 'schema:DepartAction' }, + DepartmentStore: { '@id': 'schema:DepartmentStore' }, + DepositAccount: { '@id': 'schema:DepositAccount' }, + Dermatologic: { '@id': 'schema:Dermatologic' }, + Dermatology: { '@id': 'schema:Dermatology' }, + DiabeticDiet: { '@id': 'schema:DiabeticDiet' }, + Diagnostic: { '@id': 'schema:Diagnostic' }, + DiagnosticLab: { '@id': 'schema:DiagnosticLab' }, + DiagnosticProcedure: { '@id': 'schema:DiagnosticProcedure' }, + Diet: { '@id': 'schema:Diet' }, + DietNutrition: { '@id': 'schema:DietNutrition' }, + DietarySupplement: { '@id': 'schema:DietarySupplement' }, + DigitalAudioTapeFormat: { '@id': 'schema:DigitalAudioTapeFormat' }, + DigitalDocument: { '@id': 'schema:DigitalDocument' }, + DigitalDocumentPermission: { '@id': 'schema:DigitalDocumentPermission' }, + DigitalDocumentPermissionType: { + '@id': 'schema:DigitalDocumentPermissionType', + }, + DigitalFormat: { '@id': 'schema:DigitalFormat' }, + DisabilitySupport: { '@id': 'schema:DisabilitySupport' }, + DisagreeAction: { '@id': 'schema:DisagreeAction' }, + Discontinued: { '@id': 'schema:Discontinued' }, + DiscoverAction: { '@id': 'schema:DiscoverAction' }, + DiscussionForumPosting: { '@id': 'schema:DiscussionForumPosting' }, + DislikeAction: { '@id': 'schema:DislikeAction' }, + Distance: { '@id': 'schema:Distance' }, + DistanceFee: { '@id': 'schema:DistanceFee' }, + Distillery: { '@id': 'schema:Distillery' }, + DonateAction: { '@id': 'schema:DonateAction' }, + DoseSchedule: { '@id': 'schema:DoseSchedule' }, + DoubleBlindedTrial: { '@id': 'schema:DoubleBlindedTrial' }, + DownloadAction: { '@id': 'schema:DownloadAction' }, + Downpayment: { '@id': 'schema:Downpayment' }, + DrawAction: { '@id': 'schema:DrawAction' }, + Drawing: { '@id': 'schema:Drawing' }, + DrinkAction: { '@id': 'schema:DrinkAction' }, + DriveWheelConfigurationValue: { '@id': 'schema:DriveWheelConfigurationValue' }, + DrivingSchoolVehicleUsage: { '@id': 'schema:DrivingSchoolVehicleUsage' }, + Drug: { '@id': 'schema:Drug' }, + DrugClass: { '@id': 'schema:DrugClass' }, + DrugCost: { '@id': 'schema:DrugCost' }, + DrugCostCategory: { '@id': 'schema:DrugCostCategory' }, + DrugLegalStatus: { '@id': 'schema:DrugLegalStatus' }, + DrugPregnancyCategory: { '@id': 'schema:DrugPregnancyCategory' }, + DrugPrescriptionStatus: { '@id': 'schema:DrugPrescriptionStatus' }, + DrugStrength: { '@id': 'schema:DrugStrength' }, + DryCleaningOrLaundry: { '@id': 'schema:DryCleaningOrLaundry' }, + Duration: { '@id': 'schema:Duration' }, + EBook: { '@id': 'schema:EBook' }, + EPRelease: { '@id': 'schema:EPRelease' }, + EUEnergyEfficiencyCategoryA: { '@id': 'schema:EUEnergyEfficiencyCategoryA' }, + EUEnergyEfficiencyCategoryA1Plus: { + '@id': 'schema:EUEnergyEfficiencyCategoryA1Plus', + }, + EUEnergyEfficiencyCategoryA2Plus: { + '@id': 'schema:EUEnergyEfficiencyCategoryA2Plus', + }, + EUEnergyEfficiencyCategoryA3Plus: { + '@id': 'schema:EUEnergyEfficiencyCategoryA3Plus', + }, + EUEnergyEfficiencyCategoryB: { '@id': 'schema:EUEnergyEfficiencyCategoryB' }, + EUEnergyEfficiencyCategoryC: { '@id': 'schema:EUEnergyEfficiencyCategoryC' }, + EUEnergyEfficiencyCategoryD: { '@id': 'schema:EUEnergyEfficiencyCategoryD' }, + EUEnergyEfficiencyCategoryE: { '@id': 'schema:EUEnergyEfficiencyCategoryE' }, + EUEnergyEfficiencyCategoryF: { '@id': 'schema:EUEnergyEfficiencyCategoryF' }, + EUEnergyEfficiencyCategoryG: { '@id': 'schema:EUEnergyEfficiencyCategoryG' }, + EUEnergyEfficiencyEnumeration: { + '@id': 'schema:EUEnergyEfficiencyEnumeration', + }, + Ear: { '@id': 'schema:Ear' }, + EatAction: { '@id': 'schema:EatAction' }, + EditedOrCroppedContent: { '@id': 'schema:EditedOrCroppedContent' }, + EducationEvent: { '@id': 'schema:EducationEvent' }, + EducationalAudience: { '@id': 'schema:EducationalAudience' }, + EducationalOccupationalCredential: { + '@id': 'schema:EducationalOccupationalCredential', + }, + EducationalOccupationalProgram: { + '@id': 'schema:EducationalOccupationalProgram', + }, + EducationalOrganization: { '@id': 'schema:EducationalOrganization' }, + EffectivenessHealthAspect: { '@id': 'schema:EffectivenessHealthAspect' }, + Electrician: { '@id': 'schema:Electrician' }, + ElectronicsStore: { '@id': 'schema:ElectronicsStore' }, + ElementarySchool: { '@id': 'schema:ElementarySchool' }, + EmailMessage: { '@id': 'schema:EmailMessage' }, + Embassy: { '@id': 'schema:Embassy' }, + Emergency: { '@id': 'schema:Emergency' }, + EmergencyService: { '@id': 'schema:EmergencyService' }, + EmployeeRole: { '@id': 'schema:EmployeeRole' }, + EmployerAggregateRating: { '@id': 'schema:EmployerAggregateRating' }, + EmployerReview: { '@id': 'schema:EmployerReview' }, + EmploymentAgency: { '@id': 'schema:EmploymentAgency' }, + Endocrine: { '@id': 'schema:Endocrine' }, + EndorseAction: { '@id': 'schema:EndorseAction' }, + EndorsementRating: { '@id': 'schema:EndorsementRating' }, + Energy: { '@id': 'schema:Energy' }, + EnergyConsumptionDetails: { '@id': 'schema:EnergyConsumptionDetails' }, + EnergyEfficiencyEnumeration: { '@id': 'schema:EnergyEfficiencyEnumeration' }, + EnergyStarCertified: { '@id': 'schema:EnergyStarCertified' }, + EnergyStarEnergyEfficiencyEnumeration: { + '@id': 'schema:EnergyStarEnergyEfficiencyEnumeration', + }, + EngineSpecification: { '@id': 'schema:EngineSpecification' }, + EnrollingByInvitation: { '@id': 'schema:EnrollingByInvitation' }, + EntertainmentBusiness: { '@id': 'schema:EntertainmentBusiness' }, + EntryPoint: { '@id': 'schema:EntryPoint' }, + Enumeration: { '@id': 'schema:Enumeration' }, + Episode: { '@id': 'schema:Episode' }, + Event: { '@id': 'schema:Event' }, + EventAttendanceModeEnumeration: { + '@id': 'schema:EventAttendanceModeEnumeration', + }, + EventCancelled: { '@id': 'schema:EventCancelled' }, + EventMovedOnline: { '@id': 'schema:EventMovedOnline' }, + EventPostponed: { '@id': 'schema:EventPostponed' }, + EventRescheduled: { '@id': 'schema:EventRescheduled' }, + EventReservation: { '@id': 'schema:EventReservation' }, + EventScheduled: { '@id': 'schema:EventScheduled' }, + EventSeries: { '@id': 'schema:EventSeries' }, + EventStatusType: { '@id': 'schema:EventStatusType' }, + EventVenue: { '@id': 'schema:EventVenue' }, + EvidenceLevelA: { '@id': 'schema:EvidenceLevelA' }, + EvidenceLevelB: { '@id': 'schema:EvidenceLevelB' }, + EvidenceLevelC: { '@id': 'schema:EvidenceLevelC' }, + ExchangeRateSpecification: { '@id': 'schema:ExchangeRateSpecification' }, + ExchangeRefund: { '@id': 'schema:ExchangeRefund' }, + ExerciseAction: { '@id': 'schema:ExerciseAction' }, + ExerciseGym: { '@id': 'schema:ExerciseGym' }, + ExercisePlan: { '@id': 'schema:ExercisePlan' }, + ExhibitionEvent: { '@id': 'schema:ExhibitionEvent' }, + Eye: { '@id': 'schema:Eye' }, + FAQPage: { '@id': 'schema:FAQPage' }, + FDAcategoryA: { '@id': 'schema:FDAcategoryA' }, + FDAcategoryB: { '@id': 'schema:FDAcategoryB' }, + FDAcategoryC: { '@id': 'schema:FDAcategoryC' }, + FDAcategoryD: { '@id': 'schema:FDAcategoryD' }, + FDAcategoryX: { '@id': 'schema:FDAcategoryX' }, + FDAnotEvaluated: { '@id': 'schema:FDAnotEvaluated' }, + FMRadioChannel: { '@id': 'schema:FMRadioChannel' }, + FailedActionStatus: { '@id': 'schema:FailedActionStatus' }, + False: { '@id': 'schema:False' }, + FastFoodRestaurant: { '@id': 'schema:FastFoodRestaurant' }, + Female: { '@id': 'schema:Female' }, + Festival: { '@id': 'schema:Festival' }, + FilmAction: { '@id': 'schema:FilmAction' }, + FinancialProduct: { '@id': 'schema:FinancialProduct' }, + FinancialService: { '@id': 'schema:FinancialService' }, + FindAction: { '@id': 'schema:FindAction' }, + FireStation: { '@id': 'schema:FireStation' }, + Flexibility: { '@id': 'schema:Flexibility' }, + Flight: { '@id': 'schema:Flight' }, + FlightReservation: { '@id': 'schema:FlightReservation' }, + Float: { '@id': 'schema:Float' }, + FloorPlan: { '@id': 'schema:FloorPlan' }, + Florist: { '@id': 'schema:Florist' }, + FollowAction: { '@id': 'schema:FollowAction' }, + FoodEstablishment: { '@id': 'schema:FoodEstablishment' }, + FoodEstablishmentReservation: { '@id': 'schema:FoodEstablishmentReservation' }, + FoodEvent: { '@id': 'schema:FoodEvent' }, + FoodService: { '@id': 'schema:FoodService' }, + FourWheelDriveConfiguration: { '@id': 'schema:FourWheelDriveConfiguration' }, + Friday: { '@id': 'schema:Friday' }, + FrontWheelDriveConfiguration: { '@id': 'schema:FrontWheelDriveConfiguration' }, + FullRefund: { '@id': 'schema:FullRefund' }, + FundingAgency: { '@id': 'schema:FundingAgency' }, + FundingScheme: { '@id': 'schema:FundingScheme' }, + Fungus: { '@id': 'schema:Fungus' }, + FurnitureStore: { '@id': 'schema:FurnitureStore' }, + Game: { '@id': 'schema:Game' }, + GamePlayMode: { '@id': 'schema:GamePlayMode' }, + GameServer: { '@id': 'schema:GameServer' }, + GameServerStatus: { '@id': 'schema:GameServerStatus' }, + GardenStore: { '@id': 'schema:GardenStore' }, + GasStation: { '@id': 'schema:GasStation' }, + Gastroenterologic: { '@id': 'schema:Gastroenterologic' }, + GatedResidenceCommunity: { '@id': 'schema:GatedResidenceCommunity' }, + GenderType: { '@id': 'schema:GenderType' }, + GeneralContractor: { '@id': 'schema:GeneralContractor' }, + Genetic: { '@id': 'schema:Genetic' }, + Genitourinary: { '@id': 'schema:Genitourinary' }, + GeoCircle: { '@id': 'schema:GeoCircle' }, + GeoCoordinates: { '@id': 'schema:GeoCoordinates' }, + GeoShape: { '@id': 'schema:GeoShape' }, + GeospatialGeometry: { '@id': 'schema:GeospatialGeometry' }, + Geriatric: { '@id': 'schema:Geriatric' }, + GettingAccessHealthAspect: { '@id': 'schema:GettingAccessHealthAspect' }, + GiveAction: { '@id': 'schema:GiveAction' }, + GlutenFreeDiet: { '@id': 'schema:GlutenFreeDiet' }, + GolfCourse: { '@id': 'schema:GolfCourse' }, + GovernmentBenefitsType: { '@id': 'schema:GovernmentBenefitsType' }, + GovernmentBuilding: { '@id': 'schema:GovernmentBuilding' }, + GovernmentOffice: { '@id': 'schema:GovernmentOffice' }, + GovernmentOrganization: { '@id': 'schema:GovernmentOrganization' }, + GovernmentPermit: { '@id': 'schema:GovernmentPermit' }, + GovernmentService: { '@id': 'schema:GovernmentService' }, + Grant: { '@id': 'schema:Grant' }, + GraphicNovel: { '@id': 'schema:GraphicNovel' }, + GroceryStore: { '@id': 'schema:GroceryStore' }, + GroupBoardingPolicy: { '@id': 'schema:GroupBoardingPolicy' }, + Guide: { '@id': 'schema:Guide' }, + Gynecologic: { '@id': 'schema:Gynecologic' }, + HVACBusiness: { '@id': 'schema:HVACBusiness' }, + Hackathon: { '@id': 'schema:Hackathon' }, + HairSalon: { '@id': 'schema:HairSalon' }, + HalalDiet: { '@id': 'schema:HalalDiet' }, + Hardcover: { '@id': 'schema:Hardcover' }, + HardwareStore: { '@id': 'schema:HardwareStore' }, + Head: { '@id': 'schema:Head' }, + HealthAndBeautyBusiness: { '@id': 'schema:HealthAndBeautyBusiness' }, + HealthAspectEnumeration: { '@id': 'schema:HealthAspectEnumeration' }, + HealthCare: { '@id': 'schema:HealthCare' }, + HealthClub: { '@id': 'schema:HealthClub' }, + HealthInsurancePlan: { '@id': 'schema:HealthInsurancePlan' }, + HealthPlanCostSharingSpecification: { + '@id': 'schema:HealthPlanCostSharingSpecification', + }, + HealthPlanFormulary: { '@id': 'schema:HealthPlanFormulary' }, + HealthPlanNetwork: { '@id': 'schema:HealthPlanNetwork' }, + HealthTopicContent: { '@id': 'schema:HealthTopicContent' }, + HearingImpairedSupported: { '@id': 'schema:HearingImpairedSupported' }, + Hematologic: { '@id': 'schema:Hematologic' }, + HighSchool: { '@id': 'schema:HighSchool' }, + HinduDiet: { '@id': 'schema:HinduDiet' }, + HinduTemple: { '@id': 'schema:HinduTemple' }, + HobbyShop: { '@id': 'schema:HobbyShop' }, + HomeAndConstructionBusiness: { '@id': 'schema:HomeAndConstructionBusiness' }, + HomeGoodsStore: { '@id': 'schema:HomeGoodsStore' }, + Homeopathic: { '@id': 'schema:Homeopathic' }, + Hospital: { '@id': 'schema:Hospital' }, + Hostel: { '@id': 'schema:Hostel' }, + Hotel: { '@id': 'schema:Hotel' }, + HotelRoom: { '@id': 'schema:HotelRoom' }, + House: { '@id': 'schema:House' }, + HousePainter: { '@id': 'schema:HousePainter' }, + HowItWorksHealthAspect: { '@id': 'schema:HowItWorksHealthAspect' }, + HowOrWhereHealthAspect: { '@id': 'schema:HowOrWhereHealthAspect' }, + HowTo: { '@id': 'schema:HowTo' }, + HowToDirection: { '@id': 'schema:HowToDirection' }, + HowToItem: { '@id': 'schema:HowToItem' }, + HowToSection: { '@id': 'schema:HowToSection' }, + HowToStep: { '@id': 'schema:HowToStep' }, + HowToSupply: { '@id': 'schema:HowToSupply' }, + HowToTip: { '@id': 'schema:HowToTip' }, + HowToTool: { '@id': 'schema:HowToTool' }, + HyperToc: { '@id': 'schema:HyperToc' }, + HyperTocEntry: { '@id': 'schema:HyperTocEntry' }, + IceCreamShop: { '@id': 'schema:IceCreamShop' }, + IgnoreAction: { '@id': 'schema:IgnoreAction' }, + ImageGallery: { '@id': 'schema:ImageGallery' }, + ImageObject: { '@id': 'schema:ImageObject' }, + ImagingTest: { '@id': 'schema:ImagingTest' }, + InForce: { '@id': 'schema:InForce' }, + InStock: { '@id': 'schema:InStock' }, + InStoreOnly: { '@id': 'schema:InStoreOnly' }, + IndividualProduct: { '@id': 'schema:IndividualProduct' }, + Infectious: { '@id': 'schema:Infectious' }, + InfectiousAgentClass: { '@id': 'schema:InfectiousAgentClass' }, + InfectiousDisease: { '@id': 'schema:InfectiousDisease' }, + InformAction: { '@id': 'schema:InformAction' }, + IngredientsHealthAspect: { '@id': 'schema:IngredientsHealthAspect' }, + InsertAction: { '@id': 'schema:InsertAction' }, + InstallAction: { '@id': 'schema:InstallAction' }, + Installment: { '@id': 'schema:Installment' }, + InsuranceAgency: { '@id': 'schema:InsuranceAgency' }, + Intangible: { '@id': 'schema:Intangible' }, + Integer: { '@id': 'schema:Integer' }, + InteractAction: { '@id': 'schema:InteractAction' }, + InteractionCounter: { '@id': 'schema:InteractionCounter' }, + InternationalTrial: { '@id': 'schema:InternationalTrial' }, + InternetCafe: { '@id': 'schema:InternetCafe' }, + InvestmentFund: { '@id': 'schema:InvestmentFund' }, + InvestmentOrDeposit: { '@id': 'schema:InvestmentOrDeposit' }, + InviteAction: { '@id': 'schema:InviteAction' }, + Invoice: { '@id': 'schema:Invoice' }, + InvoicePrice: { '@id': 'schema:InvoicePrice' }, + ItemAvailability: { '@id': 'schema:ItemAvailability' }, + ItemList: { '@id': 'schema:ItemList' }, + ItemListOrderAscending: { '@id': 'schema:ItemListOrderAscending' }, + ItemListOrderDescending: { '@id': 'schema:ItemListOrderDescending' }, + ItemListOrderType: { '@id': 'schema:ItemListOrderType' }, + ItemListUnordered: { '@id': 'schema:ItemListUnordered' }, + ItemPage: { '@id': 'schema:ItemPage' }, + JewelryStore: { '@id': 'schema:JewelryStore' }, + JobPosting: { '@id': 'schema:JobPosting' }, + JoinAction: { '@id': 'schema:JoinAction' }, + Joint: { '@id': 'schema:Joint' }, + KosherDiet: { '@id': 'schema:KosherDiet' }, + LaboratoryScience: { '@id': 'schema:LaboratoryScience' }, + LakeBodyOfWater: { '@id': 'schema:LakeBodyOfWater' }, + Landform: { '@id': 'schema:Landform' }, + LandmarksOrHistoricalBuildings: { + '@id': 'schema:LandmarksOrHistoricalBuildings', + }, + Language: { '@id': 'schema:Language' }, + LaserDiscFormat: { '@id': 'schema:LaserDiscFormat' }, + LearningResource: { '@id': 'schema:LearningResource' }, + LeaveAction: { '@id': 'schema:LeaveAction' }, + LeftHandDriving: { '@id': 'schema:LeftHandDriving' }, + LegalForceStatus: { '@id': 'schema:LegalForceStatus' }, + LegalService: { '@id': 'schema:LegalService' }, + LegalValueLevel: { '@id': 'schema:LegalValueLevel' }, + Legislation: { '@id': 'schema:Legislation' }, + LegislationObject: { '@id': 'schema:LegislationObject' }, + LegislativeBuilding: { '@id': 'schema:LegislativeBuilding' }, + LeisureTimeActivity: { '@id': 'schema:LeisureTimeActivity' }, + LendAction: { '@id': 'schema:LendAction' }, + Library: { '@id': 'schema:Library' }, + LibrarySystem: { '@id': 'schema:LibrarySystem' }, + LifestyleModification: { '@id': 'schema:LifestyleModification' }, + Ligament: { '@id': 'schema:Ligament' }, + LikeAction: { '@id': 'schema:LikeAction' }, + LimitedAvailability: { '@id': 'schema:LimitedAvailability' }, + LimitedByGuaranteeCharity: { '@id': 'schema:LimitedByGuaranteeCharity' }, + LinkRole: { '@id': 'schema:LinkRole' }, + LiquorStore: { '@id': 'schema:LiquorStore' }, + ListItem: { '@id': 'schema:ListItem' }, + ListPrice: { '@id': 'schema:ListPrice' }, + ListenAction: { '@id': 'schema:ListenAction' }, + LiteraryEvent: { '@id': 'schema:LiteraryEvent' }, + LiveAlbum: { '@id': 'schema:LiveAlbum' }, + LiveBlogPosting: { '@id': 'schema:LiveBlogPosting' }, + LivingWithHealthAspect: { '@id': 'schema:LivingWithHealthAspect' }, + LoanOrCredit: { '@id': 'schema:LoanOrCredit' }, + LocalBusiness: { '@id': 'schema:LocalBusiness' }, + LocationFeatureSpecification: { '@id': 'schema:LocationFeatureSpecification' }, + LockerDelivery: { '@id': 'schema:LockerDelivery' }, + Locksmith: { '@id': 'schema:Locksmith' }, + LodgingBusiness: { '@id': 'schema:LodgingBusiness' }, + LodgingReservation: { '@id': 'schema:LodgingReservation' }, + Longitudinal: { '@id': 'schema:Longitudinal' }, + LoseAction: { '@id': 'schema:LoseAction' }, + LowCalorieDiet: { '@id': 'schema:LowCalorieDiet' }, + LowFatDiet: { '@id': 'schema:LowFatDiet' }, + LowLactoseDiet: { '@id': 'schema:LowLactoseDiet' }, + LowSaltDiet: { '@id': 'schema:LowSaltDiet' }, + Lung: { '@id': 'schema:Lung' }, + LymphaticVessel: { '@id': 'schema:LymphaticVessel' }, + MRI: { '@id': 'schema:MRI' }, + MSRP: { '@id': 'schema:MSRP' }, + Male: { '@id': 'schema:Male' }, + Manuscript: { '@id': 'schema:Manuscript' }, + Map: { '@id': 'schema:Map' }, + MapCategoryType: { '@id': 'schema:MapCategoryType' }, + MarryAction: { '@id': 'schema:MarryAction' }, + Mass: { '@id': 'schema:Mass' }, + MathSolver: { '@id': 'schema:MathSolver' }, + MaximumDoseSchedule: { '@id': 'schema:MaximumDoseSchedule' }, + MayTreatHealthAspect: { '@id': 'schema:MayTreatHealthAspect' }, + MeasurementTypeEnumeration: { '@id': 'schema:MeasurementTypeEnumeration' }, + MediaGallery: { '@id': 'schema:MediaGallery' }, + MediaManipulationRatingEnumeration: { + '@id': 'schema:MediaManipulationRatingEnumeration', + }, + MediaObject: { '@id': 'schema:MediaObject' }, + MediaReview: { '@id': 'schema:MediaReview' }, + MediaSubscription: { '@id': 'schema:MediaSubscription' }, + MedicalAudience: { '@id': 'schema:MedicalAudience' }, + MedicalAudienceType: { '@id': 'schema:MedicalAudienceType' }, + MedicalBusiness: { '@id': 'schema:MedicalBusiness' }, + MedicalCause: { '@id': 'schema:MedicalCause' }, + MedicalClinic: { '@id': 'schema:MedicalClinic' }, + MedicalCode: { '@id': 'schema:MedicalCode' }, + MedicalCondition: { '@id': 'schema:MedicalCondition' }, + MedicalConditionStage: { '@id': 'schema:MedicalConditionStage' }, + MedicalContraindication: { '@id': 'schema:MedicalContraindication' }, + MedicalDevice: { '@id': 'schema:MedicalDevice' }, + MedicalDevicePurpose: { '@id': 'schema:MedicalDevicePurpose' }, + MedicalEntity: { '@id': 'schema:MedicalEntity' }, + MedicalEnumeration: { '@id': 'schema:MedicalEnumeration' }, + MedicalEvidenceLevel: { '@id': 'schema:MedicalEvidenceLevel' }, + MedicalGuideline: { '@id': 'schema:MedicalGuideline' }, + MedicalGuidelineContraindication: { + '@id': 'schema:MedicalGuidelineContraindication', + }, + MedicalGuidelineRecommendation: { + '@id': 'schema:MedicalGuidelineRecommendation', + }, + MedicalImagingTechnique: { '@id': 'schema:MedicalImagingTechnique' }, + MedicalIndication: { '@id': 'schema:MedicalIndication' }, + MedicalIntangible: { '@id': 'schema:MedicalIntangible' }, + MedicalObservationalStudy: { '@id': 'schema:MedicalObservationalStudy' }, + MedicalObservationalStudyDesign: { + '@id': 'schema:MedicalObservationalStudyDesign', + }, + MedicalOrganization: { '@id': 'schema:MedicalOrganization' }, + MedicalProcedure: { '@id': 'schema:MedicalProcedure' }, + MedicalProcedureType: { '@id': 'schema:MedicalProcedureType' }, + MedicalResearcher: { '@id': 'schema:MedicalResearcher' }, + MedicalRiskCalculator: { '@id': 'schema:MedicalRiskCalculator' }, + MedicalRiskEstimator: { '@id': 'schema:MedicalRiskEstimator' }, + MedicalRiskFactor: { '@id': 'schema:MedicalRiskFactor' }, + MedicalRiskScore: { '@id': 'schema:MedicalRiskScore' }, + MedicalScholarlyArticle: { '@id': 'schema:MedicalScholarlyArticle' }, + MedicalSign: { '@id': 'schema:MedicalSign' }, + MedicalSignOrSymptom: { '@id': 'schema:MedicalSignOrSymptom' }, + MedicalSpecialty: { '@id': 'schema:MedicalSpecialty' }, + MedicalStudy: { '@id': 'schema:MedicalStudy' }, + MedicalStudyStatus: { '@id': 'schema:MedicalStudyStatus' }, + MedicalSymptom: { '@id': 'schema:MedicalSymptom' }, + MedicalTest: { '@id': 'schema:MedicalTest' }, + MedicalTestPanel: { '@id': 'schema:MedicalTestPanel' }, + MedicalTherapy: { '@id': 'schema:MedicalTherapy' }, + MedicalTrial: { '@id': 'schema:MedicalTrial' }, + MedicalTrialDesign: { '@id': 'schema:MedicalTrialDesign' }, + MedicalWebPage: { '@id': 'schema:MedicalWebPage' }, + MedicineSystem: { '@id': 'schema:MedicineSystem' }, + MeetingRoom: { '@id': 'schema:MeetingRoom' }, + MensClothingStore: { '@id': 'schema:MensClothingStore' }, + Menu: { '@id': 'schema:Menu' }, + MenuItem: { '@id': 'schema:MenuItem' }, + MenuSection: { '@id': 'schema:MenuSection' }, + MerchantReturnEnumeration: { '@id': 'schema:MerchantReturnEnumeration' }, + MerchantReturnFiniteReturnWindow: { + '@id': 'schema:MerchantReturnFiniteReturnWindow', + }, + MerchantReturnNotPermitted: { '@id': 'schema:MerchantReturnNotPermitted' }, + MerchantReturnPolicy: { '@id': 'schema:MerchantReturnPolicy' }, + MerchantReturnUnlimitedWindow: { + '@id': 'schema:MerchantReturnUnlimitedWindow', + }, + MerchantReturnUnspecified: { '@id': 'schema:MerchantReturnUnspecified' }, + Message: { '@id': 'schema:Message' }, + MiddleSchool: { '@id': 'schema:MiddleSchool' }, + Midwifery: { '@id': 'schema:Midwifery' }, + MinimumAdvertisedPrice: { '@id': 'schema:MinimumAdvertisedPrice' }, + MisconceptionsHealthAspect: { '@id': 'schema:MisconceptionsHealthAspect' }, + MixedEventAttendanceMode: { '@id': 'schema:MixedEventAttendanceMode' }, + MixtapeAlbum: { '@id': 'schema:MixtapeAlbum' }, + MobileApplication: { '@id': 'schema:MobileApplication' }, + MobilePhoneStore: { '@id': 'schema:MobilePhoneStore' }, + Monday: { '@id': 'schema:Monday' }, + MonetaryAmount: { '@id': 'schema:MonetaryAmount' }, + MonetaryAmountDistribution: { '@id': 'schema:MonetaryAmountDistribution' }, + MonetaryGrant: { '@id': 'schema:MonetaryGrant' }, + MoneyTransfer: { '@id': 'schema:MoneyTransfer' }, + MortgageLoan: { '@id': 'schema:MortgageLoan' }, + Mosque: { '@id': 'schema:Mosque' }, + Motel: { '@id': 'schema:Motel' }, + Motorcycle: { '@id': 'schema:Motorcycle' }, + MotorcycleDealer: { '@id': 'schema:MotorcycleDealer' }, + MotorcycleRepair: { '@id': 'schema:MotorcycleRepair' }, + MotorizedBicycle: { '@id': 'schema:MotorizedBicycle' }, + Mountain: { '@id': 'schema:Mountain' }, + MoveAction: { '@id': 'schema:MoveAction' }, + Movie: { '@id': 'schema:Movie' }, + MovieClip: { '@id': 'schema:MovieClip' }, + MovieRentalStore: { '@id': 'schema:MovieRentalStore' }, + MovieSeries: { '@id': 'schema:MovieSeries' }, + MovieTheater: { '@id': 'schema:MovieTheater' }, + MovingCompany: { '@id': 'schema:MovingCompany' }, + MultiCenterTrial: { '@id': 'schema:MultiCenterTrial' }, + MultiPlayer: { '@id': 'schema:MultiPlayer' }, + MulticellularParasite: { '@id': 'schema:MulticellularParasite' }, + Muscle: { '@id': 'schema:Muscle' }, + Musculoskeletal: { '@id': 'schema:Musculoskeletal' }, + MusculoskeletalExam: { '@id': 'schema:MusculoskeletalExam' }, + Museum: { '@id': 'schema:Museum' }, + MusicAlbum: { '@id': 'schema:MusicAlbum' }, + MusicAlbumProductionType: { '@id': 'schema:MusicAlbumProductionType' }, + MusicAlbumReleaseType: { '@id': 'schema:MusicAlbumReleaseType' }, + MusicComposition: { '@id': 'schema:MusicComposition' }, + MusicEvent: { '@id': 'schema:MusicEvent' }, + MusicGroup: { '@id': 'schema:MusicGroup' }, + MusicPlaylist: { '@id': 'schema:MusicPlaylist' }, + MusicRecording: { '@id': 'schema:MusicRecording' }, + MusicRelease: { '@id': 'schema:MusicRelease' }, + MusicReleaseFormatType: { '@id': 'schema:MusicReleaseFormatType' }, + MusicStore: { '@id': 'schema:MusicStore' }, + MusicVenue: { '@id': 'schema:MusicVenue' }, + MusicVideoObject: { '@id': 'schema:MusicVideoObject' }, + NGO: { '@id': 'schema:NGO' }, + NLNonprofitType: { '@id': 'schema:NLNonprofitType' }, + NailSalon: { '@id': 'schema:NailSalon' }, + Neck: { '@id': 'schema:Neck' }, + Nerve: { '@id': 'schema:Nerve' }, + Neuro: { '@id': 'schema:Neuro' }, + Neurologic: { '@id': 'schema:Neurologic' }, + NewCondition: { '@id': 'schema:NewCondition' }, + NewsArticle: { '@id': 'schema:NewsArticle' }, + NewsMediaOrganization: { '@id': 'schema:NewsMediaOrganization' }, + Newspaper: { '@id': 'schema:Newspaper' }, + NightClub: { '@id': 'schema:NightClub' }, + NoninvasiveProcedure: { '@id': 'schema:NoninvasiveProcedure' }, + Nonprofit501a: { '@id': 'schema:Nonprofit501a' }, + Nonprofit501c1: { '@id': 'schema:Nonprofit501c1' }, + Nonprofit501c10: { '@id': 'schema:Nonprofit501c10' }, + Nonprofit501c11: { '@id': 'schema:Nonprofit501c11' }, + Nonprofit501c12: { '@id': 'schema:Nonprofit501c12' }, + Nonprofit501c13: { '@id': 'schema:Nonprofit501c13' }, + Nonprofit501c14: { '@id': 'schema:Nonprofit501c14' }, + Nonprofit501c15: { '@id': 'schema:Nonprofit501c15' }, + Nonprofit501c16: { '@id': 'schema:Nonprofit501c16' }, + Nonprofit501c17: { '@id': 'schema:Nonprofit501c17' }, + Nonprofit501c18: { '@id': 'schema:Nonprofit501c18' }, + Nonprofit501c19: { '@id': 'schema:Nonprofit501c19' }, + Nonprofit501c2: { '@id': 'schema:Nonprofit501c2' }, + Nonprofit501c20: { '@id': 'schema:Nonprofit501c20' }, + Nonprofit501c21: { '@id': 'schema:Nonprofit501c21' }, + Nonprofit501c22: { '@id': 'schema:Nonprofit501c22' }, + Nonprofit501c23: { '@id': 'schema:Nonprofit501c23' }, + Nonprofit501c24: { '@id': 'schema:Nonprofit501c24' }, + Nonprofit501c25: { '@id': 'schema:Nonprofit501c25' }, + Nonprofit501c26: { '@id': 'schema:Nonprofit501c26' }, + Nonprofit501c27: { '@id': 'schema:Nonprofit501c27' }, + Nonprofit501c28: { '@id': 'schema:Nonprofit501c28' }, + Nonprofit501c3: { '@id': 'schema:Nonprofit501c3' }, + Nonprofit501c4: { '@id': 'schema:Nonprofit501c4' }, + Nonprofit501c5: { '@id': 'schema:Nonprofit501c5' }, + Nonprofit501c6: { '@id': 'schema:Nonprofit501c6' }, + Nonprofit501c7: { '@id': 'schema:Nonprofit501c7' }, + Nonprofit501c8: { '@id': 'schema:Nonprofit501c8' }, + Nonprofit501c9: { '@id': 'schema:Nonprofit501c9' }, + Nonprofit501d: { '@id': 'schema:Nonprofit501d' }, + Nonprofit501e: { '@id': 'schema:Nonprofit501e' }, + Nonprofit501f: { '@id': 'schema:Nonprofit501f' }, + Nonprofit501k: { '@id': 'schema:Nonprofit501k' }, + Nonprofit501n: { '@id': 'schema:Nonprofit501n' }, + Nonprofit501q: { '@id': 'schema:Nonprofit501q' }, + Nonprofit527: { '@id': 'schema:Nonprofit527' }, + NonprofitANBI: { '@id': 'schema:NonprofitANBI' }, + NonprofitSBBI: { '@id': 'schema:NonprofitSBBI' }, + NonprofitType: { '@id': 'schema:NonprofitType' }, + Nose: { '@id': 'schema:Nose' }, + NotInForce: { '@id': 'schema:NotInForce' }, + NotYetRecruiting: { '@id': 'schema:NotYetRecruiting' }, + Notary: { '@id': 'schema:Notary' }, + NoteDigitalDocument: { '@id': 'schema:NoteDigitalDocument' }, + Number: { '@id': 'schema:Number' }, + Nursing: { '@id': 'schema:Nursing' }, + NutritionInformation: { '@id': 'schema:NutritionInformation' }, + OTC: { '@id': 'schema:OTC' }, + Observation: { '@id': 'schema:Observation' }, + Observational: { '@id': 'schema:Observational' }, + Obstetric: { '@id': 'schema:Obstetric' }, + Occupation: { '@id': 'schema:Occupation' }, + OccupationalActivity: { '@id': 'schema:OccupationalActivity' }, + OccupationalExperienceRequirements: { + '@id': 'schema:OccupationalExperienceRequirements', + }, + OccupationalTherapy: { '@id': 'schema:OccupationalTherapy' }, + OceanBodyOfWater: { '@id': 'schema:OceanBodyOfWater' }, + Offer: { '@id': 'schema:Offer' }, + OfferCatalog: { '@id': 'schema:OfferCatalog' }, + OfferForLease: { '@id': 'schema:OfferForLease' }, + OfferForPurchase: { '@id': 'schema:OfferForPurchase' }, + OfferItemCondition: { '@id': 'schema:OfferItemCondition' }, + OfferShippingDetails: { '@id': 'schema:OfferShippingDetails' }, + OfficeEquipmentStore: { '@id': 'schema:OfficeEquipmentStore' }, + OfficialLegalValue: { '@id': 'schema:OfficialLegalValue' }, + OfflineEventAttendanceMode: { '@id': 'schema:OfflineEventAttendanceMode' }, + OfflinePermanently: { '@id': 'schema:OfflinePermanently' }, + OfflineTemporarily: { '@id': 'schema:OfflineTemporarily' }, + OnDemandEvent: { '@id': 'schema:OnDemandEvent' }, + OnSitePickup: { '@id': 'schema:OnSitePickup' }, + Oncologic: { '@id': 'schema:Oncologic' }, + OneTimePayments: { '@id': 'schema:OneTimePayments' }, + Online: { '@id': 'schema:Online' }, + OnlineEventAttendanceMode: { '@id': 'schema:OnlineEventAttendanceMode' }, + OnlineFull: { '@id': 'schema:OnlineFull' }, + OnlineOnly: { '@id': 'schema:OnlineOnly' }, + OpenTrial: { '@id': 'schema:OpenTrial' }, + OpeningHoursSpecification: { '@id': 'schema:OpeningHoursSpecification' }, + OpinionNewsArticle: { '@id': 'schema:OpinionNewsArticle' }, + Optician: { '@id': 'schema:Optician' }, + Optometric: { '@id': 'schema:Optometric' }, + Order: { '@id': 'schema:Order' }, + OrderAction: { '@id': 'schema:OrderAction' }, + OrderCancelled: { '@id': 'schema:OrderCancelled' }, + OrderDelivered: { '@id': 'schema:OrderDelivered' }, + OrderInTransit: { '@id': 'schema:OrderInTransit' }, + OrderItem: { '@id': 'schema:OrderItem' }, + OrderPaymentDue: { '@id': 'schema:OrderPaymentDue' }, + OrderPickupAvailable: { '@id': 'schema:OrderPickupAvailable' }, + OrderProblem: { '@id': 'schema:OrderProblem' }, + OrderProcessing: { '@id': 'schema:OrderProcessing' }, + OrderReturned: { '@id': 'schema:OrderReturned' }, + OrderStatus: { '@id': 'schema:OrderStatus' }, + Organization: { '@id': 'schema:Organization' }, + OrganizationRole: { '@id': 'schema:OrganizationRole' }, + OrganizeAction: { '@id': 'schema:OrganizeAction' }, + OriginalMediaContent: { '@id': 'schema:OriginalMediaContent' }, + OriginalShippingFees: { '@id': 'schema:OriginalShippingFees' }, + Osteopathic: { '@id': 'schema:Osteopathic' }, + Otolaryngologic: { '@id': 'schema:Otolaryngologic' }, + OutOfStock: { '@id': 'schema:OutOfStock' }, + OutletStore: { '@id': 'schema:OutletStore' }, + OverviewHealthAspect: { '@id': 'schema:OverviewHealthAspect' }, + OwnershipInfo: { '@id': 'schema:OwnershipInfo' }, + PET: { '@id': 'schema:PET' }, + PaidLeave: { '@id': 'schema:PaidLeave' }, + PaintAction: { '@id': 'schema:PaintAction' }, + Painting: { '@id': 'schema:Painting' }, + PalliativeProcedure: { '@id': 'schema:PalliativeProcedure' }, + Paperback: { '@id': 'schema:Paperback' }, + ParcelDelivery: { '@id': 'schema:ParcelDelivery' }, + ParcelService: { '@id': 'schema:ParcelService' }, + ParentAudience: { '@id': 'schema:ParentAudience' }, + ParentalSupport: { '@id': 'schema:ParentalSupport' }, + Park: { '@id': 'schema:Park' }, + ParkingFacility: { '@id': 'schema:ParkingFacility' }, + ParkingMap: { '@id': 'schema:ParkingMap' }, + PartiallyInForce: { '@id': 'schema:PartiallyInForce' }, + Pathology: { '@id': 'schema:Pathology' }, + PathologyTest: { '@id': 'schema:PathologyTest' }, + Patient: { '@id': 'schema:Patient' }, + PatientExperienceHealthAspect: { + '@id': 'schema:PatientExperienceHealthAspect', + }, + PawnShop: { '@id': 'schema:PawnShop' }, + PayAction: { '@id': 'schema:PayAction' }, + PaymentAutomaticallyApplied: { '@id': 'schema:PaymentAutomaticallyApplied' }, + PaymentCard: { '@id': 'schema:PaymentCard' }, + PaymentChargeSpecification: { '@id': 'schema:PaymentChargeSpecification' }, + PaymentComplete: { '@id': 'schema:PaymentComplete' }, + PaymentDeclined: { '@id': 'schema:PaymentDeclined' }, + PaymentDue: { '@id': 'schema:PaymentDue' }, + PaymentMethod: { '@id': 'schema:PaymentMethod' }, + PaymentPastDue: { '@id': 'schema:PaymentPastDue' }, + PaymentService: { '@id': 'schema:PaymentService' }, + PaymentStatusType: { '@id': 'schema:PaymentStatusType' }, + Pediatric: { '@id': 'schema:Pediatric' }, + PeopleAudience: { '@id': 'schema:PeopleAudience' }, + PercutaneousProcedure: { '@id': 'schema:PercutaneousProcedure' }, + PerformAction: { '@id': 'schema:PerformAction' }, + PerformanceRole: { '@id': 'schema:PerformanceRole' }, + PerformingArtsTheater: { '@id': 'schema:PerformingArtsTheater' }, + PerformingGroup: { '@id': 'schema:PerformingGroup' }, + Periodical: { '@id': 'schema:Periodical' }, + Permit: { '@id': 'schema:Permit' }, + Person: { '@id': 'schema:Person' }, + PetStore: { '@id': 'schema:PetStore' }, + Pharmacy: { '@id': 'schema:Pharmacy' }, + PharmacySpecialty: { '@id': 'schema:PharmacySpecialty' }, + Photograph: { '@id': 'schema:Photograph' }, + PhotographAction: { '@id': 'schema:PhotographAction' }, + PhysicalActivity: { '@id': 'schema:PhysicalActivity' }, + PhysicalActivityCategory: { '@id': 'schema:PhysicalActivityCategory' }, + PhysicalExam: { '@id': 'schema:PhysicalExam' }, + PhysicalTherapy: { '@id': 'schema:PhysicalTherapy' }, + Physician: { '@id': 'schema:Physician' }, + Physiotherapy: { '@id': 'schema:Physiotherapy' }, + Place: { '@id': 'schema:Place' }, + PlaceOfWorship: { '@id': 'schema:PlaceOfWorship' }, + PlaceboControlledTrial: { '@id': 'schema:PlaceboControlledTrial' }, + PlanAction: { '@id': 'schema:PlanAction' }, + PlasticSurgery: { '@id': 'schema:PlasticSurgery' }, + Play: { '@id': 'schema:Play' }, + PlayAction: { '@id': 'schema:PlayAction' }, + Playground: { '@id': 'schema:Playground' }, + Plumber: { '@id': 'schema:Plumber' }, + PodcastEpisode: { '@id': 'schema:PodcastEpisode' }, + PodcastSeason: { '@id': 'schema:PodcastSeason' }, + PodcastSeries: { '@id': 'schema:PodcastSeries' }, + Podiatric: { '@id': 'schema:Podiatric' }, + PoliceStation: { '@id': 'schema:PoliceStation' }, + Pond: { '@id': 'schema:Pond' }, + PostOffice: { '@id': 'schema:PostOffice' }, + PostalAddress: { '@id': 'schema:PostalAddress' }, + PostalCodeRangeSpecification: { '@id': 'schema:PostalCodeRangeSpecification' }, + Poster: { '@id': 'schema:Poster' }, + PotentialActionStatus: { '@id': 'schema:PotentialActionStatus' }, + PreOrder: { '@id': 'schema:PreOrder' }, + PreOrderAction: { '@id': 'schema:PreOrderAction' }, + PreSale: { '@id': 'schema:PreSale' }, + PregnancyHealthAspect: { '@id': 'schema:PregnancyHealthAspect' }, + PrependAction: { '@id': 'schema:PrependAction' }, + Preschool: { '@id': 'schema:Preschool' }, + PrescriptionOnly: { '@id': 'schema:PrescriptionOnly' }, + PresentationDigitalDocument: { '@id': 'schema:PresentationDigitalDocument' }, + PreventionHealthAspect: { '@id': 'schema:PreventionHealthAspect' }, + PreventionIndication: { '@id': 'schema:PreventionIndication' }, + PriceComponentTypeEnumeration: { + '@id': 'schema:PriceComponentTypeEnumeration', + }, + PriceSpecification: { '@id': 'schema:PriceSpecification' }, + PriceTypeEnumeration: { '@id': 'schema:PriceTypeEnumeration' }, + PrimaryCare: { '@id': 'schema:PrimaryCare' }, + Prion: { '@id': 'schema:Prion' }, + Product: { '@id': 'schema:Product' }, + ProductCollection: { '@id': 'schema:ProductCollection' }, + ProductGroup: { '@id': 'schema:ProductGroup' }, + ProductModel: { '@id': 'schema:ProductModel' }, + ProductReturnEnumeration: { '@id': 'schema:ProductReturnEnumeration' }, + ProductReturnFiniteReturnWindow: { + '@id': 'schema:ProductReturnFiniteReturnWindow', + }, + ProductReturnNotPermitted: { '@id': 'schema:ProductReturnNotPermitted' }, + ProductReturnPolicy: { '@id': 'schema:ProductReturnPolicy' }, + ProductReturnUnlimitedWindow: { '@id': 'schema:ProductReturnUnlimitedWindow' }, + ProductReturnUnspecified: { '@id': 'schema:ProductReturnUnspecified' }, + ProfessionalService: { '@id': 'schema:ProfessionalService' }, + ProfilePage: { '@id': 'schema:ProfilePage' }, + PrognosisHealthAspect: { '@id': 'schema:PrognosisHealthAspect' }, + ProgramMembership: { '@id': 'schema:ProgramMembership' }, + Project: { '@id': 'schema:Project' }, + PronounceableText: { '@id': 'schema:PronounceableText' }, + Property: { '@id': 'schema:Property' }, + PropertyValue: { '@id': 'schema:PropertyValue' }, + PropertyValueSpecification: { '@id': 'schema:PropertyValueSpecification' }, + Protozoa: { '@id': 'schema:Protozoa' }, + Psychiatric: { '@id': 'schema:Psychiatric' }, + PsychologicalTreatment: { '@id': 'schema:PsychologicalTreatment' }, + PublicHealth: { '@id': 'schema:PublicHealth' }, + PublicHolidays: { '@id': 'schema:PublicHolidays' }, + PublicSwimmingPool: { '@id': 'schema:PublicSwimmingPool' }, + PublicToilet: { '@id': 'schema:PublicToilet' }, + PublicationEvent: { '@id': 'schema:PublicationEvent' }, + PublicationIssue: { '@id': 'schema:PublicationIssue' }, + PublicationVolume: { '@id': 'schema:PublicationVolume' }, + Pulmonary: { '@id': 'schema:Pulmonary' }, + QAPage: { '@id': 'schema:QAPage' }, + QualitativeValue: { '@id': 'schema:QualitativeValue' }, + QuantitativeValue: { '@id': 'schema:QuantitativeValue' }, + QuantitativeValueDistribution: { + '@id': 'schema:QuantitativeValueDistribution', + }, + Quantity: { '@id': 'schema:Quantity' }, + Question: { '@id': 'schema:Question' }, + Quiz: { '@id': 'schema:Quiz' }, + Quotation: { '@id': 'schema:Quotation' }, + QuoteAction: { '@id': 'schema:QuoteAction' }, + RVPark: { '@id': 'schema:RVPark' }, + RadiationTherapy: { '@id': 'schema:RadiationTherapy' }, + RadioBroadcastService: { '@id': 'schema:RadioBroadcastService' }, + RadioChannel: { '@id': 'schema:RadioChannel' }, + RadioClip: { '@id': 'schema:RadioClip' }, + RadioEpisode: { '@id': 'schema:RadioEpisode' }, + RadioSeason: { '@id': 'schema:RadioSeason' }, + RadioSeries: { '@id': 'schema:RadioSeries' }, + RadioStation: { '@id': 'schema:RadioStation' }, + Radiography: { '@id': 'schema:Radiography' }, + RandomizedTrial: { '@id': 'schema:RandomizedTrial' }, + Rating: { '@id': 'schema:Rating' }, + ReactAction: { '@id': 'schema:ReactAction' }, + ReadAction: { '@id': 'schema:ReadAction' }, + ReadPermission: { '@id': 'schema:ReadPermission' }, + RealEstateAgent: { '@id': 'schema:RealEstateAgent' }, + RealEstateListing: { '@id': 'schema:RealEstateListing' }, + RearWheelDriveConfiguration: { '@id': 'schema:RearWheelDriveConfiguration' }, + ReceiveAction: { '@id': 'schema:ReceiveAction' }, + Recipe: { '@id': 'schema:Recipe' }, + Recommendation: { '@id': 'schema:Recommendation' }, + RecommendedDoseSchedule: { '@id': 'schema:RecommendedDoseSchedule' }, + Recruiting: { '@id': 'schema:Recruiting' }, + RecyclingCenter: { '@id': 'schema:RecyclingCenter' }, + RefundTypeEnumeration: { '@id': 'schema:RefundTypeEnumeration' }, + RefurbishedCondition: { '@id': 'schema:RefurbishedCondition' }, + RegisterAction: { '@id': 'schema:RegisterAction' }, + Registry: { '@id': 'schema:Registry' }, + ReimbursementCap: { '@id': 'schema:ReimbursementCap' }, + RejectAction: { '@id': 'schema:RejectAction' }, + RelatedTopicsHealthAspect: { '@id': 'schema:RelatedTopicsHealthAspect' }, + RemixAlbum: { '@id': 'schema:RemixAlbum' }, + Renal: { '@id': 'schema:Renal' }, + RentAction: { '@id': 'schema:RentAction' }, + RentalCarReservation: { '@id': 'schema:RentalCarReservation' }, + RentalVehicleUsage: { '@id': 'schema:RentalVehicleUsage' }, + RepaymentSpecification: { '@id': 'schema:RepaymentSpecification' }, + ReplaceAction: { '@id': 'schema:ReplaceAction' }, + ReplyAction: { '@id': 'schema:ReplyAction' }, + Report: { '@id': 'schema:Report' }, + ReportageNewsArticle: { '@id': 'schema:ReportageNewsArticle' }, + ReportedDoseSchedule: { '@id': 'schema:ReportedDoseSchedule' }, + ResearchProject: { '@id': 'schema:ResearchProject' }, + Researcher: { '@id': 'schema:Researcher' }, + Reservation: { '@id': 'schema:Reservation' }, + ReservationCancelled: { '@id': 'schema:ReservationCancelled' }, + ReservationConfirmed: { '@id': 'schema:ReservationConfirmed' }, + ReservationHold: { '@id': 'schema:ReservationHold' }, + ReservationPackage: { '@id': 'schema:ReservationPackage' }, + ReservationPending: { '@id': 'schema:ReservationPending' }, + ReservationStatusType: { '@id': 'schema:ReservationStatusType' }, + ReserveAction: { '@id': 'schema:ReserveAction' }, + Reservoir: { '@id': 'schema:Reservoir' }, + Residence: { '@id': 'schema:Residence' }, + Resort: { '@id': 'schema:Resort' }, + RespiratoryTherapy: { '@id': 'schema:RespiratoryTherapy' }, + Restaurant: { '@id': 'schema:Restaurant' }, + RestockingFees: { '@id': 'schema:RestockingFees' }, + RestrictedDiet: { '@id': 'schema:RestrictedDiet' }, + ResultsAvailable: { '@id': 'schema:ResultsAvailable' }, + ResultsNotAvailable: { '@id': 'schema:ResultsNotAvailable' }, + ResumeAction: { '@id': 'schema:ResumeAction' }, + Retail: { '@id': 'schema:Retail' }, + ReturnAction: { '@id': 'schema:ReturnAction' }, + ReturnFeesEnumeration: { '@id': 'schema:ReturnFeesEnumeration' }, + ReturnShippingFees: { '@id': 'schema:ReturnShippingFees' }, + Review: { '@id': 'schema:Review' }, + ReviewAction: { '@id': 'schema:ReviewAction' }, + ReviewNewsArticle: { '@id': 'schema:ReviewNewsArticle' }, + Rheumatologic: { '@id': 'schema:Rheumatologic' }, + RightHandDriving: { '@id': 'schema:RightHandDriving' }, + RisksOrComplicationsHealthAspect: { + '@id': 'schema:RisksOrComplicationsHealthAspect', + }, + RiverBodyOfWater: { '@id': 'schema:RiverBodyOfWater' }, + Role: { '@id': 'schema:Role' }, + RoofingContractor: { '@id': 'schema:RoofingContractor' }, + Room: { '@id': 'schema:Room' }, + RsvpAction: { '@id': 'schema:RsvpAction' }, + RsvpResponseMaybe: { '@id': 'schema:RsvpResponseMaybe' }, + RsvpResponseNo: { '@id': 'schema:RsvpResponseNo' }, + RsvpResponseType: { '@id': 'schema:RsvpResponseType' }, + RsvpResponseYes: { '@id': 'schema:RsvpResponseYes' }, + SRP: { '@id': 'schema:SRP' }, + SafetyHealthAspect: { '@id': 'schema:SafetyHealthAspect' }, + SaleEvent: { '@id': 'schema:SaleEvent' }, + SalePrice: { '@id': 'schema:SalePrice' }, + SatireOrParodyContent: { '@id': 'schema:SatireOrParodyContent' }, + SatiricalArticle: { '@id': 'schema:SatiricalArticle' }, + Saturday: { '@id': 'schema:Saturday' }, + Schedule: { '@id': 'schema:Schedule' }, + ScheduleAction: { '@id': 'schema:ScheduleAction' }, + ScholarlyArticle: { '@id': 'schema:ScholarlyArticle' }, + School: { '@id': 'schema:School' }, + SchoolDistrict: { '@id': 'schema:SchoolDistrict' }, + ScreeningEvent: { '@id': 'schema:ScreeningEvent' }, + ScreeningHealthAspect: { '@id': 'schema:ScreeningHealthAspect' }, + Sculpture: { '@id': 'schema:Sculpture' }, + SeaBodyOfWater: { '@id': 'schema:SeaBodyOfWater' }, + SearchAction: { '@id': 'schema:SearchAction' }, + SearchResultsPage: { '@id': 'schema:SearchResultsPage' }, + Season: { '@id': 'schema:Season' }, + Seat: { '@id': 'schema:Seat' }, + SeatingMap: { '@id': 'schema:SeatingMap' }, + SeeDoctorHealthAspect: { '@id': 'schema:SeeDoctorHealthAspect' }, + SeekToAction: { '@id': 'schema:SeekToAction' }, + SelfCareHealthAspect: { '@id': 'schema:SelfCareHealthAspect' }, + SelfStorage: { '@id': 'schema:SelfStorage' }, + SellAction: { '@id': 'schema:SellAction' }, + SendAction: { '@id': 'schema:SendAction' }, + Series: { '@id': 'schema:Series' }, + Service: { '@id': 'schema:Service' }, + ServiceChannel: { '@id': 'schema:ServiceChannel' }, + ShareAction: { '@id': 'schema:ShareAction' }, + SheetMusic: { '@id': 'schema:SheetMusic' }, + ShippingDeliveryTime: { '@id': 'schema:ShippingDeliveryTime' }, + ShippingRateSettings: { '@id': 'schema:ShippingRateSettings' }, + ShoeStore: { '@id': 'schema:ShoeStore' }, + ShoppingCenter: { '@id': 'schema:ShoppingCenter' }, + ShortStory: { '@id': 'schema:ShortStory' }, + SideEffectsHealthAspect: { '@id': 'schema:SideEffectsHealthAspect' }, + SingleBlindedTrial: { '@id': 'schema:SingleBlindedTrial' }, + SingleCenterTrial: { '@id': 'schema:SingleCenterTrial' }, + SingleFamilyResidence: { '@id': 'schema:SingleFamilyResidence' }, + SinglePlayer: { '@id': 'schema:SinglePlayer' }, + SingleRelease: { '@id': 'schema:SingleRelease' }, + SiteNavigationElement: { '@id': 'schema:SiteNavigationElement' }, + SizeGroupEnumeration: { '@id': 'schema:SizeGroupEnumeration' }, + SizeSpecification: { '@id': 'schema:SizeSpecification' }, + SizeSystemEnumeration: { '@id': 'schema:SizeSystemEnumeration' }, + SizeSystemImperial: { '@id': 'schema:SizeSystemImperial' }, + SizeSystemMetric: { '@id': 'schema:SizeSystemMetric' }, + SkiResort: { '@id': 'schema:SkiResort' }, + Skin: { '@id': 'schema:Skin' }, + SocialEvent: { '@id': 'schema:SocialEvent' }, + SocialMediaPosting: { '@id': 'schema:SocialMediaPosting' }, + SoftwareApplication: { '@id': 'schema:SoftwareApplication' }, + SoftwareSourceCode: { '@id': 'schema:SoftwareSourceCode' }, + SoldOut: { '@id': 'schema:SoldOut' }, + SolveMathAction: { '@id': 'schema:SolveMathAction' }, + SomeProducts: { '@id': 'schema:SomeProducts' }, + SoundtrackAlbum: { '@id': 'schema:SoundtrackAlbum' }, + SpeakableSpecification: { '@id': 'schema:SpeakableSpecification' }, + SpecialAnnouncement: { '@id': 'schema:SpecialAnnouncement' }, + Specialty: { '@id': 'schema:Specialty' }, + SpeechPathology: { '@id': 'schema:SpeechPathology' }, + SpokenWordAlbum: { '@id': 'schema:SpokenWordAlbum' }, + SportingGoodsStore: { '@id': 'schema:SportingGoodsStore' }, + SportsActivityLocation: { '@id': 'schema:SportsActivityLocation' }, + SportsClub: { '@id': 'schema:SportsClub' }, + SportsEvent: { '@id': 'schema:SportsEvent' }, + SportsOrganization: { '@id': 'schema:SportsOrganization' }, + SportsTeam: { '@id': 'schema:SportsTeam' }, + SpreadsheetDigitalDocument: { '@id': 'schema:SpreadsheetDigitalDocument' }, + StadiumOrArena: { '@id': 'schema:StadiumOrArena' }, + StagedContent: { '@id': 'schema:StagedContent' }, + StagesHealthAspect: { '@id': 'schema:StagesHealthAspect' }, + State: { '@id': 'schema:State' }, + StatisticalPopulation: { '@id': 'schema:StatisticalPopulation' }, + StatusEnumeration: { '@id': 'schema:StatusEnumeration' }, + SteeringPositionValue: { '@id': 'schema:SteeringPositionValue' }, + Store: { '@id': 'schema:Store' }, + StoreCreditRefund: { '@id': 'schema:StoreCreditRefund' }, + StrengthTraining: { '@id': 'schema:StrengthTraining' }, + StructuredValue: { '@id': 'schema:StructuredValue' }, + StudioAlbum: { '@id': 'schema:StudioAlbum' }, + StupidType: { '@id': 'schema:StupidType' }, + SubscribeAction: { '@id': 'schema:SubscribeAction' }, + Subscription: { '@id': 'schema:Subscription' }, + Substance: { '@id': 'schema:Substance' }, + SubwayStation: { '@id': 'schema:SubwayStation' }, + Suite: { '@id': 'schema:Suite' }, + Sunday: { '@id': 'schema:Sunday' }, + SuperficialAnatomy: { '@id': 'schema:SuperficialAnatomy' }, + Surgical: { '@id': 'schema:Surgical' }, + SurgicalProcedure: { '@id': 'schema:SurgicalProcedure' }, + SuspendAction: { '@id': 'schema:SuspendAction' }, + Suspended: { '@id': 'schema:Suspended' }, + SymptomsHealthAspect: { '@id': 'schema:SymptomsHealthAspect' }, + Synagogue: { '@id': 'schema:Synagogue' }, + TVClip: { '@id': 'schema:TVClip' }, + TVEpisode: { '@id': 'schema:TVEpisode' }, + TVSeason: { '@id': 'schema:TVSeason' }, + TVSeries: { '@id': 'schema:TVSeries' }, + Table: { '@id': 'schema:Table' }, + TakeAction: { '@id': 'schema:TakeAction' }, + TattooParlor: { '@id': 'schema:TattooParlor' }, + Taxi: { '@id': 'schema:Taxi' }, + TaxiReservation: { '@id': 'schema:TaxiReservation' }, + TaxiService: { '@id': 'schema:TaxiService' }, + TaxiStand: { '@id': 'schema:TaxiStand' }, + TaxiVehicleUsage: { '@id': 'schema:TaxiVehicleUsage' }, + TechArticle: { '@id': 'schema:TechArticle' }, + TelevisionChannel: { '@id': 'schema:TelevisionChannel' }, + TelevisionStation: { '@id': 'schema:TelevisionStation' }, + TennisComplex: { '@id': 'schema:TennisComplex' }, + Terminated: { '@id': 'schema:Terminated' }, + Text: { '@id': 'schema:Text' }, + TextDigitalDocument: { '@id': 'schema:TextDigitalDocument' }, + TheaterEvent: { '@id': 'schema:TheaterEvent' }, + TheaterGroup: { '@id': 'schema:TheaterGroup' }, + Therapeutic: { '@id': 'schema:Therapeutic' }, + TherapeuticProcedure: { '@id': 'schema:TherapeuticProcedure' }, + Thesis: { '@id': 'schema:Thesis' }, + Thing: { '@id': 'schema:Thing' }, + Throat: { '@id': 'schema:Throat' }, + Thursday: { '@id': 'schema:Thursday' }, + Ticket: { '@id': 'schema:Ticket' }, + TieAction: { '@id': 'schema:TieAction' }, + Time: { '@id': 'schema:Time' }, + TipAction: { '@id': 'schema:TipAction' }, + TireShop: { '@id': 'schema:TireShop' }, + TollFree: { '@id': 'schema:TollFree' }, + TouristAttraction: { '@id': 'schema:TouristAttraction' }, + TouristDestination: { '@id': 'schema:TouristDestination' }, + TouristInformationCenter: { '@id': 'schema:TouristInformationCenter' }, + TouristTrip: { '@id': 'schema:TouristTrip' }, + Toxicologic: { '@id': 'schema:Toxicologic' }, + ToyStore: { '@id': 'schema:ToyStore' }, + TrackAction: { '@id': 'schema:TrackAction' }, + TradeAction: { '@id': 'schema:TradeAction' }, + TraditionalChinese: { '@id': 'schema:TraditionalChinese' }, + TrainReservation: { '@id': 'schema:TrainReservation' }, + TrainStation: { '@id': 'schema:TrainStation' }, + TrainTrip: { '@id': 'schema:TrainTrip' }, + TransferAction: { '@id': 'schema:TransferAction' }, + TransformedContent: { '@id': 'schema:TransformedContent' }, + TransitMap: { '@id': 'schema:TransitMap' }, + TravelAction: { '@id': 'schema:TravelAction' }, + TravelAgency: { '@id': 'schema:TravelAgency' }, + TreatmentIndication: { '@id': 'schema:TreatmentIndication' }, + TreatmentsHealthAspect: { '@id': 'schema:TreatmentsHealthAspect' }, + Trip: { '@id': 'schema:Trip' }, + TripleBlindedTrial: { '@id': 'schema:TripleBlindedTrial' }, + True: { '@id': 'schema:True' }, + Tuesday: { '@id': 'schema:Tuesday' }, + TypeAndQuantityNode: { '@id': 'schema:TypeAndQuantityNode' }, + TypesHealthAspect: { '@id': 'schema:TypesHealthAspect' }, + UKNonprofitType: { '@id': 'schema:UKNonprofitType' }, + UKTrust: { '@id': 'schema:UKTrust' }, + URL: { '@id': 'schema:URL' }, + USNonprofitType: { '@id': 'schema:USNonprofitType' }, + Ultrasound: { '@id': 'schema:Ultrasound' }, + UnRegisterAction: { '@id': 'schema:UnRegisterAction' }, + UnemploymentSupport: { '@id': 'schema:UnemploymentSupport' }, + UnincorporatedAssociationCharity: { + '@id': 'schema:UnincorporatedAssociationCharity', + }, + UnitPriceSpecification: { '@id': 'schema:UnitPriceSpecification' }, + UnofficialLegalValue: { '@id': 'schema:UnofficialLegalValue' }, + UpdateAction: { '@id': 'schema:UpdateAction' }, + Urologic: { '@id': 'schema:Urologic' }, + UsageOrScheduleHealthAspect: { '@id': 'schema:UsageOrScheduleHealthAspect' }, + UseAction: { '@id': 'schema:UseAction' }, + UsedCondition: { '@id': 'schema:UsedCondition' }, + UserBlocks: { '@id': 'schema:UserBlocks' }, + UserCheckins: { '@id': 'schema:UserCheckins' }, + UserComments: { '@id': 'schema:UserComments' }, + UserDownloads: { '@id': 'schema:UserDownloads' }, + UserInteraction: { '@id': 'schema:UserInteraction' }, + UserLikes: { '@id': 'schema:UserLikes' }, + UserPageVisits: { '@id': 'schema:UserPageVisits' }, + UserPlays: { '@id': 'schema:UserPlays' }, + UserPlusOnes: { '@id': 'schema:UserPlusOnes' }, + UserReview: { '@id': 'schema:UserReview' }, + UserTweets: { '@id': 'schema:UserTweets' }, + VeganDiet: { '@id': 'schema:VeganDiet' }, + VegetarianDiet: { '@id': 'schema:VegetarianDiet' }, + Vehicle: { '@id': 'schema:Vehicle' }, + Vein: { '@id': 'schema:Vein' }, + VenueMap: { '@id': 'schema:VenueMap' }, + Vessel: { '@id': 'schema:Vessel' }, + VeterinaryCare: { '@id': 'schema:VeterinaryCare' }, + VideoGallery: { '@id': 'schema:VideoGallery' }, + VideoGame: { '@id': 'schema:VideoGame' }, + VideoGameClip: { '@id': 'schema:VideoGameClip' }, + VideoGameSeries: { '@id': 'schema:VideoGameSeries' }, + VideoObject: { '@id': 'schema:VideoObject' }, + ViewAction: { '@id': 'schema:ViewAction' }, + VinylFormat: { '@id': 'schema:VinylFormat' }, + VirtualLocation: { '@id': 'schema:VirtualLocation' }, + Virus: { '@id': 'schema:Virus' }, + VisualArtsEvent: { '@id': 'schema:VisualArtsEvent' }, + VisualArtwork: { '@id': 'schema:VisualArtwork' }, + VitalSign: { '@id': 'schema:VitalSign' }, + Volcano: { '@id': 'schema:Volcano' }, + VoteAction: { '@id': 'schema:VoteAction' }, + WPAdBlock: { '@id': 'schema:WPAdBlock' }, + WPFooter: { '@id': 'schema:WPFooter' }, + WPHeader: { '@id': 'schema:WPHeader' }, + WPSideBar: { '@id': 'schema:WPSideBar' }, + WantAction: { '@id': 'schema:WantAction' }, + WarrantyPromise: { '@id': 'schema:WarrantyPromise' }, + WarrantyScope: { '@id': 'schema:WarrantyScope' }, + WatchAction: { '@id': 'schema:WatchAction' }, + Waterfall: { '@id': 'schema:Waterfall' }, + WearAction: { '@id': 'schema:WearAction' }, + WearableMeasurementBack: { '@id': 'schema:WearableMeasurementBack' }, + WearableMeasurementChestOrBust: { + '@id': 'schema:WearableMeasurementChestOrBust', + }, + WearableMeasurementCollar: { '@id': 'schema:WearableMeasurementCollar' }, + WearableMeasurementCup: { '@id': 'schema:WearableMeasurementCup' }, + WearableMeasurementHeight: { '@id': 'schema:WearableMeasurementHeight' }, + WearableMeasurementHips: { '@id': 'schema:WearableMeasurementHips' }, + WearableMeasurementInseam: { '@id': 'schema:WearableMeasurementInseam' }, + WearableMeasurementLength: { '@id': 'schema:WearableMeasurementLength' }, + WearableMeasurementOutsideLeg: { + '@id': 'schema:WearableMeasurementOutsideLeg', + }, + WearableMeasurementSleeve: { '@id': 'schema:WearableMeasurementSleeve' }, + WearableMeasurementTypeEnumeration: { + '@id': 'schema:WearableMeasurementTypeEnumeration', + }, + WearableMeasurementWaist: { '@id': 'schema:WearableMeasurementWaist' }, + WearableMeasurementWidth: { '@id': 'schema:WearableMeasurementWidth' }, + WearableSizeGroupBig: { '@id': 'schema:WearableSizeGroupBig' }, + WearableSizeGroupBoys: { '@id': 'schema:WearableSizeGroupBoys' }, + WearableSizeGroupEnumeration: { '@id': 'schema:WearableSizeGroupEnumeration' }, + WearableSizeGroupExtraShort: { '@id': 'schema:WearableSizeGroupExtraShort' }, + WearableSizeGroupExtraTall: { '@id': 'schema:WearableSizeGroupExtraTall' }, + WearableSizeGroupGirls: { '@id': 'schema:WearableSizeGroupGirls' }, + WearableSizeGroupHusky: { '@id': 'schema:WearableSizeGroupHusky' }, + WearableSizeGroupInfants: { '@id': 'schema:WearableSizeGroupInfants' }, + WearableSizeGroupJuniors: { '@id': 'schema:WearableSizeGroupJuniors' }, + WearableSizeGroupMaternity: { '@id': 'schema:WearableSizeGroupMaternity' }, + WearableSizeGroupMens: { '@id': 'schema:WearableSizeGroupMens' }, + WearableSizeGroupMisses: { '@id': 'schema:WearableSizeGroupMisses' }, + WearableSizeGroupPetite: { '@id': 'schema:WearableSizeGroupPetite' }, + WearableSizeGroupPlus: { '@id': 'schema:WearableSizeGroupPlus' }, + WearableSizeGroupRegular: { '@id': 'schema:WearableSizeGroupRegular' }, + WearableSizeGroupShort: { '@id': 'schema:WearableSizeGroupShort' }, + WearableSizeGroupTall: { '@id': 'schema:WearableSizeGroupTall' }, + WearableSizeGroupWomens: { '@id': 'schema:WearableSizeGroupWomens' }, + WearableSizeSystemAU: { '@id': 'schema:WearableSizeSystemAU' }, + WearableSizeSystemBR: { '@id': 'schema:WearableSizeSystemBR' }, + WearableSizeSystemCN: { '@id': 'schema:WearableSizeSystemCN' }, + WearableSizeSystemContinental: { + '@id': 'schema:WearableSizeSystemContinental', + }, + WearableSizeSystemDE: { '@id': 'schema:WearableSizeSystemDE' }, + WearableSizeSystemEN13402: { '@id': 'schema:WearableSizeSystemEN13402' }, + WearableSizeSystemEnumeration: { + '@id': 'schema:WearableSizeSystemEnumeration', + }, + WearableSizeSystemEurope: { '@id': 'schema:WearableSizeSystemEurope' }, + WearableSizeSystemFR: { '@id': 'schema:WearableSizeSystemFR' }, + WearableSizeSystemGS1: { '@id': 'schema:WearableSizeSystemGS1' }, + WearableSizeSystemIT: { '@id': 'schema:WearableSizeSystemIT' }, + WearableSizeSystemJP: { '@id': 'schema:WearableSizeSystemJP' }, + WearableSizeSystemMX: { '@id': 'schema:WearableSizeSystemMX' }, + WearableSizeSystemUK: { '@id': 'schema:WearableSizeSystemUK' }, + WearableSizeSystemUS: { '@id': 'schema:WearableSizeSystemUS' }, + WebAPI: { '@id': 'schema:WebAPI' }, + WebApplication: { '@id': 'schema:WebApplication' }, + WebContent: { '@id': 'schema:WebContent' }, + WebPage: { '@id': 'schema:WebPage' }, + WebPageElement: { '@id': 'schema:WebPageElement' }, + WebSite: { '@id': 'schema:WebSite' }, + Wednesday: { '@id': 'schema:Wednesday' }, + WesternConventional: { '@id': 'schema:WesternConventional' }, + Wholesale: { '@id': 'schema:Wholesale' }, + WholesaleStore: { '@id': 'schema:WholesaleStore' }, + WinAction: { '@id': 'schema:WinAction' }, + Winery: { '@id': 'schema:Winery' }, + Withdrawn: { '@id': 'schema:Withdrawn' }, + WorkBasedProgram: { '@id': 'schema:WorkBasedProgram' }, + WorkersUnion: { '@id': 'schema:WorkersUnion' }, + WriteAction: { '@id': 'schema:WriteAction' }, + WritePermission: { '@id': 'schema:WritePermission' }, + XPathType: { '@id': 'schema:XPathType' }, + XRay: { '@id': 'schema:XRay' }, + ZoneBoardingPolicy: { '@id': 'schema:ZoneBoardingPolicy' }, + Zoo: { '@id': 'schema:Zoo' }, + about: { '@id': 'schema:about' }, + abridged: { '@id': 'schema:abridged' }, + abstract: { '@id': 'schema:abstract' }, + accelerationTime: { '@id': 'schema:accelerationTime' }, + acceptedAnswer: { '@id': 'schema:acceptedAnswer' }, + acceptedOffer: { '@id': 'schema:acceptedOffer' }, + acceptedPaymentMethod: { '@id': 'schema:acceptedPaymentMethod' }, + acceptsReservations: { '@id': 'schema:acceptsReservations' }, + accessCode: { '@id': 'schema:accessCode' }, + accessMode: { '@id': 'schema:accessMode' }, + accessModeSufficient: { '@id': 'schema:accessModeSufficient' }, + accessibilityAPI: { '@id': 'schema:accessibilityAPI' }, + accessibilityControl: { '@id': 'schema:accessibilityControl' }, + accessibilityFeature: { '@id': 'schema:accessibilityFeature' }, + accessibilityHazard: { '@id': 'schema:accessibilityHazard' }, + accessibilitySummary: { '@id': 'schema:accessibilitySummary' }, + accommodationCategory: { '@id': 'schema:accommodationCategory' }, + accommodationFloorPlan: { '@id': 'schema:accommodationFloorPlan' }, + accountId: { '@id': 'schema:accountId' }, + accountMinimumInflow: { '@id': 'schema:accountMinimumInflow' }, + accountOverdraftLimit: { '@id': 'schema:accountOverdraftLimit' }, + accountablePerson: { '@id': 'schema:accountablePerson' }, + acquireLicensePage: { '@id': 'schema:acquireLicensePage', '@type': '@id' }, + acquiredFrom: { '@id': 'schema:acquiredFrom' }, + acrissCode: { '@id': 'schema:acrissCode' }, + actionAccessibilityRequirement: { + '@id': 'schema:actionAccessibilityRequirement', + }, + actionApplication: { '@id': 'schema:actionApplication' }, + actionOption: { '@id': 'schema:actionOption' }, + actionPlatform: { '@id': 'schema:actionPlatform' }, + actionStatus: { '@id': 'schema:actionStatus' }, + actionableFeedbackPolicy: { + '@id': 'schema:actionableFeedbackPolicy', + '@type': '@id', + }, + activeIngredient: { '@id': 'schema:activeIngredient' }, + activityDuration: { '@id': 'schema:activityDuration' }, + activityFrequency: { '@id': 'schema:activityFrequency' }, + actor: { '@id': 'schema:actor' }, + actors: { '@id': 'schema:actors' }, + addOn: { '@id': 'schema:addOn' }, + additionalName: { '@id': 'schema:additionalName' }, + additionalNumberOfGuests: { '@id': 'schema:additionalNumberOfGuests' }, + additionalProperty: { '@id': 'schema:additionalProperty' }, + additionalType: { '@id': 'schema:additionalType', '@type': '@id' }, + additionalVariable: { '@id': 'schema:additionalVariable' }, + address: { '@id': 'schema:address' }, + addressCountry: { '@id': 'schema:addressCountry' }, + addressLocality: { '@id': 'schema:addressLocality' }, + addressRegion: { '@id': 'schema:addressRegion' }, + administrationRoute: { '@id': 'schema:administrationRoute' }, + advanceBookingRequirement: { '@id': 'schema:advanceBookingRequirement' }, + adverseOutcome: { '@id': 'schema:adverseOutcome' }, + affectedBy: { '@id': 'schema:affectedBy' }, + affiliation: { '@id': 'schema:affiliation' }, + afterMedia: { '@id': 'schema:afterMedia', '@type': '@id' }, + agent: { '@id': 'schema:agent' }, + aggregateRating: { '@id': 'schema:aggregateRating' }, + aircraft: { '@id': 'schema:aircraft' }, + album: { '@id': 'schema:album' }, + albumProductionType: { '@id': 'schema:albumProductionType' }, + albumRelease: { '@id': 'schema:albumRelease' }, + albumReleaseType: { '@id': 'schema:albumReleaseType' }, + albums: { '@id': 'schema:albums' }, + alcoholWarning: { '@id': 'schema:alcoholWarning' }, + algorithm: { '@id': 'schema:algorithm' }, + alignmentType: { '@id': 'schema:alignmentType' }, + alternateName: { '@id': 'schema:alternateName' }, + alternativeHeadline: { '@id': 'schema:alternativeHeadline' }, + alumni: { '@id': 'schema:alumni' }, + alumniOf: { '@id': 'schema:alumniOf' }, + amenityFeature: { '@id': 'schema:amenityFeature' }, + amount: { '@id': 'schema:amount' }, + amountOfThisGood: { '@id': 'schema:amountOfThisGood' }, + announcementLocation: { '@id': 'schema:announcementLocation' }, + annualPercentageRate: { '@id': 'schema:annualPercentageRate' }, + answerCount: { '@id': 'schema:answerCount' }, + answerExplanation: { '@id': 'schema:answerExplanation' }, + antagonist: { '@id': 'schema:antagonist' }, + appearance: { '@id': 'schema:appearance' }, + applicableLocation: { '@id': 'schema:applicableLocation' }, + applicantLocationRequirements: { + '@id': 'schema:applicantLocationRequirements', + }, + application: { '@id': 'schema:application' }, + applicationCategory: { '@id': 'schema:applicationCategory' }, + applicationContact: { '@id': 'schema:applicationContact' }, + applicationDeadline: { '@id': 'schema:applicationDeadline', '@type': 'Date' }, + applicationStartDate: { '@id': 'schema:applicationStartDate', '@type': 'Date' }, + applicationSubCategory: { '@id': 'schema:applicationSubCategory' }, + applicationSuite: { '@id': 'schema:applicationSuite' }, + appliesToDeliveryMethod: { '@id': 'schema:appliesToDeliveryMethod' }, + appliesToPaymentMethod: { '@id': 'schema:appliesToPaymentMethod' }, + archiveHeld: { '@id': 'schema:archiveHeld' }, + area: { '@id': 'schema:area' }, + areaServed: { '@id': 'schema:areaServed' }, + arrivalAirport: { '@id': 'schema:arrivalAirport' }, + arrivalBoatTerminal: { '@id': 'schema:arrivalBoatTerminal' }, + arrivalBusStop: { '@id': 'schema:arrivalBusStop' }, + arrivalGate: { '@id': 'schema:arrivalGate' }, + arrivalPlatform: { '@id': 'schema:arrivalPlatform' }, + arrivalStation: { '@id': 'schema:arrivalStation' }, + arrivalTerminal: { '@id': 'schema:arrivalTerminal' }, + arrivalTime: { '@id': 'schema:arrivalTime' }, + artEdition: { '@id': 'schema:artEdition' }, + artMedium: { '@id': 'schema:artMedium' }, + arterialBranch: { '@id': 'schema:arterialBranch' }, + artform: { '@id': 'schema:artform' }, + articleBody: { '@id': 'schema:articleBody' }, + articleSection: { '@id': 'schema:articleSection' }, + artist: { '@id': 'schema:artist' }, + artworkSurface: { '@id': 'schema:artworkSurface' }, + aspect: { '@id': 'schema:aspect' }, + assembly: { '@id': 'schema:assembly' }, + assemblyVersion: { '@id': 'schema:assemblyVersion' }, + assesses: { '@id': 'schema:assesses' }, + associatedAnatomy: { '@id': 'schema:associatedAnatomy' }, + associatedArticle: { '@id': 'schema:associatedArticle' }, + associatedMedia: { '@id': 'schema:associatedMedia' }, + associatedPathophysiology: { '@id': 'schema:associatedPathophysiology' }, + athlete: { '@id': 'schema:athlete' }, + attendee: { '@id': 'schema:attendee' }, + attendees: { '@id': 'schema:attendees' }, + audience: { '@id': 'schema:audience' }, + audienceType: { '@id': 'schema:audienceType' }, + audio: { '@id': 'schema:audio' }, + authenticator: { '@id': 'schema:authenticator' }, + author: { '@id': 'schema:author' }, + availability: { '@id': 'schema:availability' }, + availabilityEnds: { '@id': 'schema:availabilityEnds', '@type': 'Date' }, + availabilityStarts: { '@id': 'schema:availabilityStarts', '@type': 'Date' }, + availableAtOrFrom: { '@id': 'schema:availableAtOrFrom' }, + availableChannel: { '@id': 'schema:availableChannel' }, + availableDeliveryMethod: { '@id': 'schema:availableDeliveryMethod' }, + availableFrom: { '@id': 'schema:availableFrom' }, + availableIn: { '@id': 'schema:availableIn' }, + availableLanguage: { '@id': 'schema:availableLanguage' }, + availableOnDevice: { '@id': 'schema:availableOnDevice' }, + availableService: { '@id': 'schema:availableService' }, + availableStrength: { '@id': 'schema:availableStrength' }, + availableTest: { '@id': 'schema:availableTest' }, + availableThrough: { '@id': 'schema:availableThrough' }, + award: { '@id': 'schema:award' }, + awards: { '@id': 'schema:awards' }, + awayTeam: { '@id': 'schema:awayTeam' }, + backstory: { '@id': 'schema:backstory' }, + bankAccountType: { '@id': 'schema:bankAccountType' }, + baseSalary: { '@id': 'schema:baseSalary' }, + bccRecipient: { '@id': 'schema:bccRecipient' }, + bed: { '@id': 'schema:bed' }, + beforeMedia: { '@id': 'schema:beforeMedia', '@type': '@id' }, + beneficiaryBank: { '@id': 'schema:beneficiaryBank' }, + benefits: { '@id': 'schema:benefits' }, + benefitsSummaryUrl: { '@id': 'schema:benefitsSummaryUrl', '@type': '@id' }, + bestRating: { '@id': 'schema:bestRating' }, + billingAddress: { '@id': 'schema:billingAddress' }, + billingDuration: { '@id': 'schema:billingDuration' }, + billingIncrement: { '@id': 'schema:billingIncrement' }, + billingPeriod: { '@id': 'schema:billingPeriod' }, + billingStart: { '@id': 'schema:billingStart' }, + biomechnicalClass: { '@id': 'schema:biomechnicalClass' }, + birthDate: { '@id': 'schema:birthDate', '@type': 'Date' }, + birthPlace: { '@id': 'schema:birthPlace' }, + bitrate: { '@id': 'schema:bitrate' }, + blogPost: { '@id': 'schema:blogPost' }, + blogPosts: { '@id': 'schema:blogPosts' }, + bloodSupply: { '@id': 'schema:bloodSupply' }, + boardingGroup: { '@id': 'schema:boardingGroup' }, + boardingPolicy: { '@id': 'schema:boardingPolicy' }, + bodyLocation: { '@id': 'schema:bodyLocation' }, + bodyType: { '@id': 'schema:bodyType' }, + bookEdition: { '@id': 'schema:bookEdition' }, + bookFormat: { '@id': 'schema:bookFormat' }, + bookingAgent: { '@id': 'schema:bookingAgent' }, + bookingTime: { '@id': 'schema:bookingTime' }, + borrower: { '@id': 'schema:borrower' }, + box: { '@id': 'schema:box' }, + branch: { '@id': 'schema:branch' }, + branchCode: { '@id': 'schema:branchCode' }, + branchOf: { '@id': 'schema:branchOf' }, + brand: { '@id': 'schema:brand' }, + breadcrumb: { '@id': 'schema:breadcrumb' }, + breastfeedingWarning: { '@id': 'schema:breastfeedingWarning' }, + broadcastAffiliateOf: { '@id': 'schema:broadcastAffiliateOf' }, + broadcastChannelId: { '@id': 'schema:broadcastChannelId' }, + broadcastDisplayName: { '@id': 'schema:broadcastDisplayName' }, + broadcastFrequency: { '@id': 'schema:broadcastFrequency' }, + broadcastFrequencyValue: { '@id': 'schema:broadcastFrequencyValue' }, + broadcastOfEvent: { '@id': 'schema:broadcastOfEvent' }, + broadcastServiceTier: { '@id': 'schema:broadcastServiceTier' }, + broadcastSignalModulation: { '@id': 'schema:broadcastSignalModulation' }, + broadcastSubChannel: { '@id': 'schema:broadcastSubChannel' }, + broadcastTimezone: { '@id': 'schema:broadcastTimezone' }, + broadcaster: { '@id': 'schema:broadcaster' }, + broker: { '@id': 'schema:broker' }, + browserRequirements: { '@id': 'schema:browserRequirements' }, + busName: { '@id': 'schema:busName' }, + busNumber: { '@id': 'schema:busNumber' }, + businessDays: { '@id': 'schema:businessDays' }, + businessFunction: { '@id': 'schema:businessFunction' }, + buyer: { '@id': 'schema:buyer' }, + byArtist: { '@id': 'schema:byArtist' }, + byDay: { '@id': 'schema:byDay' }, + byMonth: { '@id': 'schema:byMonth' }, + byMonthDay: { '@id': 'schema:byMonthDay' }, + byMonthWeek: { '@id': 'schema:byMonthWeek' }, + callSign: { '@id': 'schema:callSign' }, + calories: { '@id': 'schema:calories' }, + candidate: { '@id': 'schema:candidate' }, + caption: { '@id': 'schema:caption' }, + carbohydrateContent: { '@id': 'schema:carbohydrateContent' }, + cargoVolume: { '@id': 'schema:cargoVolume' }, + carrier: { '@id': 'schema:carrier' }, + carrierRequirements: { '@id': 'schema:carrierRequirements' }, + cashBack: { '@id': 'schema:cashBack' }, + catalog: { '@id': 'schema:catalog' }, + catalogNumber: { '@id': 'schema:catalogNumber' }, + category: { '@id': 'schema:category' }, + causeOf: { '@id': 'schema:causeOf' }, + ccRecipient: { '@id': 'schema:ccRecipient' }, + character: { '@id': 'schema:character' }, + characterAttribute: { '@id': 'schema:characterAttribute' }, + characterName: { '@id': 'schema:characterName' }, + cheatCode: { '@id': 'schema:cheatCode' }, + checkinTime: { '@id': 'schema:checkinTime' }, + checkoutTime: { '@id': 'schema:checkoutTime' }, + childMaxAge: { '@id': 'schema:childMaxAge' }, + childMinAge: { '@id': 'schema:childMinAge' }, + children: { '@id': 'schema:children' }, + cholesterolContent: { '@id': 'schema:cholesterolContent' }, + circle: { '@id': 'schema:circle' }, + citation: { '@id': 'schema:citation' }, + claimReviewed: { '@id': 'schema:claimReviewed' }, + clincalPharmacology: { '@id': 'schema:clincalPharmacology' }, + clinicalPharmacology: { '@id': 'schema:clinicalPharmacology' }, + clipNumber: { '@id': 'schema:clipNumber' }, + closes: { '@id': 'schema:closes' }, + coach: { '@id': 'schema:coach' }, + code: { '@id': 'schema:code' }, + codeRepository: { '@id': 'schema:codeRepository', '@type': '@id' }, + codeSampleType: { '@id': 'schema:codeSampleType' }, + codeValue: { '@id': 'schema:codeValue' }, + codingSystem: { '@id': 'schema:codingSystem' }, + colleague: { '@id': 'schema:colleague', '@type': '@id' }, + colleagues: { '@id': 'schema:colleagues' }, + collection: { '@id': 'schema:collection' }, + collectionSize: { '@id': 'schema:collectionSize' }, + color: { '@id': 'schema:color' }, + colorist: { '@id': 'schema:colorist' }, + comment: { '@id': 'schema:comment' }, + commentCount: { '@id': 'schema:commentCount' }, + commentText: { '@id': 'schema:commentText' }, + commentTime: { '@id': 'schema:commentTime', '@type': 'Date' }, + competencyRequired: { '@id': 'schema:competencyRequired' }, + competitor: { '@id': 'schema:competitor' }, + composer: { '@id': 'schema:composer' }, + comprisedOf: { '@id': 'schema:comprisedOf' }, + conditionsOfAccess: { '@id': 'schema:conditionsOfAccess' }, + confirmationNumber: { '@id': 'schema:confirmationNumber' }, + connectedTo: { '@id': 'schema:connectedTo' }, + constrainingProperty: { '@id': 'schema:constrainingProperty' }, + contactOption: { '@id': 'schema:contactOption' }, + contactPoint: { '@id': 'schema:contactPoint' }, + contactPoints: { '@id': 'schema:contactPoints' }, + contactType: { '@id': 'schema:contactType' }, + contactlessPayment: { '@id': 'schema:contactlessPayment' }, + containedIn: { '@id': 'schema:containedIn' }, + containedInPlace: { '@id': 'schema:containedInPlace' }, + containsPlace: { '@id': 'schema:containsPlace' }, + containsSeason: { '@id': 'schema:containsSeason' }, + contentLocation: { '@id': 'schema:contentLocation' }, + contentRating: { '@id': 'schema:contentRating' }, + contentReferenceTime: { '@id': 'schema:contentReferenceTime' }, + contentSize: { '@id': 'schema:contentSize' }, + contentType: { '@id': 'schema:contentType' }, + contentUrl: { '@id': 'schema:contentUrl', '@type': '@id' }, + contraindication: { '@id': 'schema:contraindication' }, + contributor: { '@id': 'schema:contributor' }, + cookTime: { '@id': 'schema:cookTime' }, + cookingMethod: { '@id': 'schema:cookingMethod' }, + copyrightHolder: { '@id': 'schema:copyrightHolder' }, + copyrightNotice: { '@id': 'schema:copyrightNotice' }, + copyrightYear: { '@id': 'schema:copyrightYear' }, + correction: { '@id': 'schema:correction' }, + correctionsPolicy: { '@id': 'schema:correctionsPolicy', '@type': '@id' }, + costCategory: { '@id': 'schema:costCategory' }, + costCurrency: { '@id': 'schema:costCurrency' }, + costOrigin: { '@id': 'schema:costOrigin' }, + costPerUnit: { '@id': 'schema:costPerUnit' }, + countriesNotSupported: { '@id': 'schema:countriesNotSupported' }, + countriesSupported: { '@id': 'schema:countriesSupported' }, + countryOfOrigin: { '@id': 'schema:countryOfOrigin' }, + course: { '@id': 'schema:course' }, + courseCode: { '@id': 'schema:courseCode' }, + courseMode: { '@id': 'schema:courseMode' }, + coursePrerequisites: { '@id': 'schema:coursePrerequisites' }, + courseWorkload: { '@id': 'schema:courseWorkload' }, + coverageEndTime: { '@id': 'schema:coverageEndTime' }, + coverageStartTime: { '@id': 'schema:coverageStartTime' }, + creativeWorkStatus: { '@id': 'schema:creativeWorkStatus' }, + creator: { '@id': 'schema:creator' }, + credentialCategory: { '@id': 'schema:credentialCategory' }, + creditText: { '@id': 'schema:creditText' }, + creditedTo: { '@id': 'schema:creditedTo' }, + cssSelector: { '@id': 'schema:cssSelector' }, + currenciesAccepted: { '@id': 'schema:currenciesAccepted' }, + currency: { '@id': 'schema:currency' }, + currentExchangeRate: { '@id': 'schema:currentExchangeRate' }, + customer: { '@id': 'schema:customer' }, + cutoffTime: { '@id': 'schema:cutoffTime' }, + cvdCollectionDate: { '@id': 'schema:cvdCollectionDate' }, + cvdFacilityCounty: { '@id': 'schema:cvdFacilityCounty' }, + cvdFacilityId: { '@id': 'schema:cvdFacilityId' }, + cvdNumBeds: { '@id': 'schema:cvdNumBeds' }, + cvdNumBedsOcc: { '@id': 'schema:cvdNumBedsOcc' }, + cvdNumC19Died: { '@id': 'schema:cvdNumC19Died' }, + cvdNumC19HOPats: { '@id': 'schema:cvdNumC19HOPats' }, + cvdNumC19HospPats: { '@id': 'schema:cvdNumC19HospPats' }, + cvdNumC19MechVentPats: { '@id': 'schema:cvdNumC19MechVentPats' }, + cvdNumC19OFMechVentPats: { '@id': 'schema:cvdNumC19OFMechVentPats' }, + cvdNumC19OverflowPats: { '@id': 'schema:cvdNumC19OverflowPats' }, + cvdNumICUBeds: { '@id': 'schema:cvdNumICUBeds' }, + cvdNumICUBedsOcc: { '@id': 'schema:cvdNumICUBedsOcc' }, + cvdNumTotBeds: { '@id': 'schema:cvdNumTotBeds' }, + cvdNumVent: { '@id': 'schema:cvdNumVent' }, + cvdNumVentUse: { '@id': 'schema:cvdNumVentUse' }, + dataFeedElement: { '@id': 'schema:dataFeedElement' }, + dataset: { '@id': 'schema:dataset' }, + datasetTimeInterval: { '@id': 'schema:datasetTimeInterval' }, + dateCreated: { '@id': 'schema:dateCreated', '@type': 'Date' }, + dateDeleted: { '@id': 'schema:dateDeleted', '@type': 'Date' }, + dateIssued: { '@id': 'schema:dateIssued', '@type': 'Date' }, + dateModified: { '@id': 'schema:dateModified', '@type': 'Date' }, + datePosted: { '@id': 'schema:datePosted', '@type': 'Date' }, + datePublished: { '@id': 'schema:datePublished', '@type': 'Date' }, + dateRead: { '@id': 'schema:dateRead', '@type': 'Date' }, + dateReceived: { '@id': 'schema:dateReceived' }, + dateSent: { '@id': 'schema:dateSent' }, + dateVehicleFirstRegistered: { + '@id': 'schema:dateVehicleFirstRegistered', + '@type': 'Date', + }, + dateline: { '@id': 'schema:dateline' }, + dayOfWeek: { '@id': 'schema:dayOfWeek' }, + deathDate: { '@id': 'schema:deathDate', '@type': 'Date' }, + deathPlace: { '@id': 'schema:deathPlace' }, + defaultValue: { '@id': 'schema:defaultValue' }, + deliveryAddress: { '@id': 'schema:deliveryAddress' }, + deliveryLeadTime: { '@id': 'schema:deliveryLeadTime' }, + deliveryMethod: { '@id': 'schema:deliveryMethod' }, + deliveryStatus: { '@id': 'schema:deliveryStatus' }, + deliveryTime: { '@id': 'schema:deliveryTime' }, + department: { '@id': 'schema:department' }, + departureAirport: { '@id': 'schema:departureAirport' }, + departureBoatTerminal: { '@id': 'schema:departureBoatTerminal' }, + departureBusStop: { '@id': 'schema:departureBusStop' }, + departureGate: { '@id': 'schema:departureGate' }, + departurePlatform: { '@id': 'schema:departurePlatform' }, + departureStation: { '@id': 'schema:departureStation' }, + departureTerminal: { '@id': 'schema:departureTerminal' }, + departureTime: { '@id': 'schema:departureTime' }, + dependencies: { '@id': 'schema:dependencies' }, + depth: { '@id': 'schema:depth' }, + description: { '@id': 'schema:description' }, + device: { '@id': 'schema:device' }, + diagnosis: { '@id': 'schema:diagnosis' }, + diagram: { '@id': 'schema:diagram' }, + diet: { '@id': 'schema:diet' }, + dietFeatures: { '@id': 'schema:dietFeatures' }, + differentialDiagnosis: { '@id': 'schema:differentialDiagnosis' }, + director: { '@id': 'schema:director' }, + directors: { '@id': 'schema:directors' }, + disambiguatingDescription: { '@id': 'schema:disambiguatingDescription' }, + discount: { '@id': 'schema:discount' }, + discountCode: { '@id': 'schema:discountCode' }, + discountCurrency: { '@id': 'schema:discountCurrency' }, + discusses: { '@id': 'schema:discusses' }, + discussionUrl: { '@id': 'schema:discussionUrl', '@type': '@id' }, + diseasePreventionInfo: { + '@id': 'schema:diseasePreventionInfo', + '@type': '@id', + }, + diseaseSpreadStatistics: { + '@id': 'schema:diseaseSpreadStatistics', + '@type': '@id', + }, + dissolutionDate: { '@id': 'schema:dissolutionDate', '@type': 'Date' }, + distance: { '@id': 'schema:distance' }, + distinguishingSign: { '@id': 'schema:distinguishingSign' }, + distribution: { '@id': 'schema:distribution' }, + diversityPolicy: { '@id': 'schema:diversityPolicy', '@type': '@id' }, + diversityStaffingReport: { + '@id': 'schema:diversityStaffingReport', + '@type': '@id', + }, + documentation: { '@id': 'schema:documentation', '@type': '@id' }, + doesNotShip: { '@id': 'schema:doesNotShip' }, + domainIncludes: { '@id': 'schema:domainIncludes' }, + domiciledMortgage: { '@id': 'schema:domiciledMortgage' }, + doorTime: { '@id': 'schema:doorTime' }, + dosageForm: { '@id': 'schema:dosageForm' }, + doseSchedule: { '@id': 'schema:doseSchedule' }, + doseUnit: { '@id': 'schema:doseUnit' }, + doseValue: { '@id': 'schema:doseValue' }, + downPayment: { '@id': 'schema:downPayment' }, + downloadUrl: { '@id': 'schema:downloadUrl', '@type': '@id' }, + downvoteCount: { '@id': 'schema:downvoteCount' }, + drainsTo: { '@id': 'schema:drainsTo' }, + driveWheelConfiguration: { '@id': 'schema:driveWheelConfiguration' }, + dropoffLocation: { '@id': 'schema:dropoffLocation' }, + dropoffTime: { '@id': 'schema:dropoffTime' }, + drug: { '@id': 'schema:drug' }, + drugClass: { '@id': 'schema:drugClass' }, + drugUnit: { '@id': 'schema:drugUnit' }, + duns: { '@id': 'schema:duns' }, + duplicateTherapy: { '@id': 'schema:duplicateTherapy' }, + duration: { '@id': 'schema:duration' }, + durationOfWarranty: { '@id': 'schema:durationOfWarranty' }, + duringMedia: { '@id': 'schema:duringMedia', '@type': '@id' }, + earlyPrepaymentPenalty: { '@id': 'schema:earlyPrepaymentPenalty' }, + editEIDR: { '@id': 'schema:editEIDR' }, + editor: { '@id': 'schema:editor' }, + eduQuestionType: { '@id': 'schema:eduQuestionType' }, + educationRequirements: { '@id': 'schema:educationRequirements' }, + educationalAlignment: { '@id': 'schema:educationalAlignment' }, + educationalCredentialAwarded: { '@id': 'schema:educationalCredentialAwarded' }, + educationalFramework: { '@id': 'schema:educationalFramework' }, + educationalLevel: { '@id': 'schema:educationalLevel' }, + educationalProgramMode: { '@id': 'schema:educationalProgramMode' }, + educationalRole: { '@id': 'schema:educationalRole' }, + educationalUse: { '@id': 'schema:educationalUse' }, + elevation: { '@id': 'schema:elevation' }, + eligibilityToWorkRequirement: { '@id': 'schema:eligibilityToWorkRequirement' }, + eligibleCustomerType: { '@id': 'schema:eligibleCustomerType' }, + eligibleDuration: { '@id': 'schema:eligibleDuration' }, + eligibleQuantity: { '@id': 'schema:eligibleQuantity' }, + eligibleRegion: { '@id': 'schema:eligibleRegion' }, + eligibleTransactionVolume: { '@id': 'schema:eligibleTransactionVolume' }, + email: { '@id': 'schema:email' }, + embedUrl: { '@id': 'schema:embedUrl', '@type': '@id' }, + emissionsCO2: { '@id': 'schema:emissionsCO2' }, + employee: { '@id': 'schema:employee' }, + employees: { '@id': 'schema:employees' }, + employerOverview: { '@id': 'schema:employerOverview' }, + employmentType: { '@id': 'schema:employmentType' }, + employmentUnit: { '@id': 'schema:employmentUnit' }, + encodesCreativeWork: { '@id': 'schema:encodesCreativeWork' }, + encoding: { '@id': 'schema:encoding' }, + encodingFormat: { '@id': 'schema:encodingFormat' }, + encodingType: { '@id': 'schema:encodingType' }, + encodings: { '@id': 'schema:encodings' }, + endDate: { '@id': 'schema:endDate', '@type': 'Date' }, + endOffset: { '@id': 'schema:endOffset' }, + endTime: { '@id': 'schema:endTime' }, + endorsee: { '@id': 'schema:endorsee' }, + endorsers: { '@id': 'schema:endorsers' }, + energyEfficiencyScaleMax: { '@id': 'schema:energyEfficiencyScaleMax' }, + energyEfficiencyScaleMin: { '@id': 'schema:energyEfficiencyScaleMin' }, + engineDisplacement: { '@id': 'schema:engineDisplacement' }, + enginePower: { '@id': 'schema:enginePower' }, + engineType: { '@id': 'schema:engineType' }, + entertainmentBusiness: { '@id': 'schema:entertainmentBusiness' }, + epidemiology: { '@id': 'schema:epidemiology' }, + episode: { '@id': 'schema:episode' }, + episodeNumber: { '@id': 'schema:episodeNumber' }, + episodes: { '@id': 'schema:episodes' }, + equal: { '@id': 'schema:equal' }, + error: { '@id': 'schema:error' }, + estimatedCost: { '@id': 'schema:estimatedCost' }, + estimatedFlightDuration: { '@id': 'schema:estimatedFlightDuration' }, + estimatedSalary: { '@id': 'schema:estimatedSalary' }, + estimatesRiskOf: { '@id': 'schema:estimatesRiskOf' }, + ethicsPolicy: { '@id': 'schema:ethicsPolicy', '@type': '@id' }, + event: { '@id': 'schema:event' }, + eventAttendanceMode: { '@id': 'schema:eventAttendanceMode' }, + eventSchedule: { '@id': 'schema:eventSchedule' }, + eventStatus: { '@id': 'schema:eventStatus' }, + events: { '@id': 'schema:events' }, + evidenceLevel: { '@id': 'schema:evidenceLevel' }, + evidenceOrigin: { '@id': 'schema:evidenceOrigin' }, + exampleOfWork: { '@id': 'schema:exampleOfWork' }, + exceptDate: { '@id': 'schema:exceptDate', '@type': 'Date' }, + exchangeRateSpread: { '@id': 'schema:exchangeRateSpread' }, + executableLibraryName: { '@id': 'schema:executableLibraryName' }, + exerciseCourse: { '@id': 'schema:exerciseCourse' }, + exercisePlan: { '@id': 'schema:exercisePlan' }, + exerciseRelatedDiet: { '@id': 'schema:exerciseRelatedDiet' }, + exerciseType: { '@id': 'schema:exerciseType' }, + exifData: { '@id': 'schema:exifData' }, + expectedArrivalFrom: { '@id': 'schema:expectedArrivalFrom', '@type': 'Date' }, + expectedArrivalUntil: { '@id': 'schema:expectedArrivalUntil', '@type': 'Date' }, + expectedPrognosis: { '@id': 'schema:expectedPrognosis' }, + expectsAcceptanceOf: { '@id': 'schema:expectsAcceptanceOf' }, + experienceInPlaceOfEducation: { '@id': 'schema:experienceInPlaceOfEducation' }, + experienceRequirements: { '@id': 'schema:experienceRequirements' }, + expertConsiderations: { '@id': 'schema:expertConsiderations' }, + expires: { '@id': 'schema:expires', '@type': 'Date' }, + familyName: { '@id': 'schema:familyName' }, + fatContent: { '@id': 'schema:fatContent' }, + faxNumber: { '@id': 'schema:faxNumber' }, + featureList: { '@id': 'schema:featureList' }, + feesAndCommissionsSpecification: { + '@id': 'schema:feesAndCommissionsSpecification', + }, + fiberContent: { '@id': 'schema:fiberContent' }, + fileFormat: { '@id': 'schema:fileFormat' }, + fileSize: { '@id': 'schema:fileSize' }, + financialAidEligible: { '@id': 'schema:financialAidEligible' }, + firstAppearance: { '@id': 'schema:firstAppearance' }, + firstPerformance: { '@id': 'schema:firstPerformance' }, + flightDistance: { '@id': 'schema:flightDistance' }, + flightNumber: { '@id': 'schema:flightNumber' }, + floorLevel: { '@id': 'schema:floorLevel' }, + floorLimit: { '@id': 'schema:floorLimit' }, + floorSize: { '@id': 'schema:floorSize' }, + followee: { '@id': 'schema:followee' }, + follows: { '@id': 'schema:follows' }, + followup: { '@id': 'schema:followup' }, + foodEstablishment: { '@id': 'schema:foodEstablishment' }, + foodEvent: { '@id': 'schema:foodEvent' }, + foodWarning: { '@id': 'schema:foodWarning' }, + founder: { '@id': 'schema:founder' }, + founders: { '@id': 'schema:founders' }, + foundingDate: { '@id': 'schema:foundingDate', '@type': 'Date' }, + foundingLocation: { '@id': 'schema:foundingLocation' }, + free: { '@id': 'schema:free' }, + freeShippingThreshold: { '@id': 'schema:freeShippingThreshold' }, + frequency: { '@id': 'schema:frequency' }, + fromLocation: { '@id': 'schema:fromLocation' }, + fuelCapacity: { '@id': 'schema:fuelCapacity' }, + fuelConsumption: { '@id': 'schema:fuelConsumption' }, + fuelEfficiency: { '@id': 'schema:fuelEfficiency' }, + fuelType: { '@id': 'schema:fuelType' }, + functionalClass: { '@id': 'schema:functionalClass' }, + fundedItem: { '@id': 'schema:fundedItem' }, + funder: { '@id': 'schema:funder' }, + game: { '@id': 'schema:game' }, + gameItem: { '@id': 'schema:gameItem' }, + gameLocation: { '@id': 'schema:gameLocation', '@type': '@id' }, + gamePlatform: { '@id': 'schema:gamePlatform' }, + gameServer: { '@id': 'schema:gameServer' }, + gameTip: { '@id': 'schema:gameTip' }, + gender: { '@id': 'schema:gender' }, + genre: { '@id': 'schema:genre' }, + geo: { '@id': 'schema:geo' }, + geoContains: { '@id': 'schema:geoContains' }, + geoCoveredBy: { '@id': 'schema:geoCoveredBy' }, + geoCovers: { '@id': 'schema:geoCovers' }, + geoCrosses: { '@id': 'schema:geoCrosses' }, + geoDisjoint: { '@id': 'schema:geoDisjoint' }, + geoEquals: { '@id': 'schema:geoEquals' }, + geoIntersects: { '@id': 'schema:geoIntersects' }, + geoMidpoint: { '@id': 'schema:geoMidpoint' }, + geoOverlaps: { '@id': 'schema:geoOverlaps' }, + geoRadius: { '@id': 'schema:geoRadius' }, + geoTouches: { '@id': 'schema:geoTouches' }, + geoWithin: { '@id': 'schema:geoWithin' }, + geographicArea: { '@id': 'schema:geographicArea' }, + gettingTestedInfo: { '@id': 'schema:gettingTestedInfo', '@type': '@id' }, + givenName: { '@id': 'schema:givenName' }, + globalLocationNumber: { '@id': 'schema:globalLocationNumber' }, + governmentBenefitsInfo: { '@id': 'schema:governmentBenefitsInfo' }, + gracePeriod: { '@id': 'schema:gracePeriod' }, + grantee: { '@id': 'schema:grantee' }, + greater: { '@id': 'schema:greater' }, + greaterOrEqual: { '@id': 'schema:greaterOrEqual' }, + gtin: { '@id': 'schema:gtin' }, + gtin12: { '@id': 'schema:gtin12' }, + gtin13: { '@id': 'schema:gtin13' }, + gtin14: { '@id': 'schema:gtin14' }, + gtin8: { '@id': 'schema:gtin8' }, + guideline: { '@id': 'schema:guideline' }, + guidelineDate: { '@id': 'schema:guidelineDate', '@type': 'Date' }, + guidelineSubject: { '@id': 'schema:guidelineSubject' }, + handlingTime: { '@id': 'schema:handlingTime' }, + hasBroadcastChannel: { '@id': 'schema:hasBroadcastChannel' }, + hasCategoryCode: { '@id': 'schema:hasCategoryCode' }, + hasCourse: { '@id': 'schema:hasCourse' }, + hasCourseInstance: { '@id': 'schema:hasCourseInstance' }, + hasCredential: { '@id': 'schema:hasCredential' }, + hasDefinedTerm: { '@id': 'schema:hasDefinedTerm' }, + hasDeliveryMethod: { '@id': 'schema:hasDeliveryMethod' }, + hasDigitalDocumentPermission: { '@id': 'schema:hasDigitalDocumentPermission' }, + hasDriveThroughService: { '@id': 'schema:hasDriveThroughService' }, + hasEnergyConsumptionDetails: { '@id': 'schema:hasEnergyConsumptionDetails' }, + hasEnergyEfficiencyCategory: { '@id': 'schema:hasEnergyEfficiencyCategory' }, + hasHealthAspect: { '@id': 'schema:hasHealthAspect' }, + hasMap: { '@id': 'schema:hasMap', '@type': '@id' }, + hasMeasurement: { '@id': 'schema:hasMeasurement' }, + hasMenu: { '@id': 'schema:hasMenu' }, + hasMenuItem: { '@id': 'schema:hasMenuItem' }, + hasMenuSection: { '@id': 'schema:hasMenuSection' }, + hasMerchantReturnPolicy: { '@id': 'schema:hasMerchantReturnPolicy' }, + hasOccupation: { '@id': 'schema:hasOccupation' }, + hasOfferCatalog: { '@id': 'schema:hasOfferCatalog' }, + hasPOS: { '@id': 'schema:hasPOS' }, + hasPart: { '@id': 'schema:hasPart' }, + hasProductReturnPolicy: { '@id': 'schema:hasProductReturnPolicy' }, + hasVariant: { '@id': 'schema:hasVariant' }, + headline: { '@id': 'schema:headline' }, + healthCondition: { '@id': 'schema:healthCondition' }, + healthPlanCoinsuranceOption: { '@id': 'schema:healthPlanCoinsuranceOption' }, + healthPlanCoinsuranceRate: { '@id': 'schema:healthPlanCoinsuranceRate' }, + healthPlanCopay: { '@id': 'schema:healthPlanCopay' }, + healthPlanCopayOption: { '@id': 'schema:healthPlanCopayOption' }, + healthPlanCostSharing: { '@id': 'schema:healthPlanCostSharing' }, + healthPlanDrugOption: { '@id': 'schema:healthPlanDrugOption' }, + healthPlanDrugTier: { '@id': 'schema:healthPlanDrugTier' }, + healthPlanId: { '@id': 'schema:healthPlanId' }, + healthPlanMarketingUrl: { + '@id': 'schema:healthPlanMarketingUrl', + '@type': '@id', + }, + healthPlanNetworkId: { '@id': 'schema:healthPlanNetworkId' }, + healthPlanNetworkTier: { '@id': 'schema:healthPlanNetworkTier' }, + healthPlanPharmacyCategory: { '@id': 'schema:healthPlanPharmacyCategory' }, + healthcareReportingData: { '@id': 'schema:healthcareReportingData' }, + height: { '@id': 'schema:height' }, + highPrice: { '@id': 'schema:highPrice' }, + hiringOrganization: { '@id': 'schema:hiringOrganization' }, + holdingArchive: { '@id': 'schema:holdingArchive' }, + homeLocation: { '@id': 'schema:homeLocation' }, + homeTeam: { '@id': 'schema:homeTeam' }, + honorificPrefix: { '@id': 'schema:honorificPrefix' }, + honorificSuffix: { '@id': 'schema:honorificSuffix' }, + hospitalAffiliation: { '@id': 'schema:hospitalAffiliation' }, + hostingOrganization: { '@id': 'schema:hostingOrganization' }, + hoursAvailable: { '@id': 'schema:hoursAvailable' }, + howPerformed: { '@id': 'schema:howPerformed' }, + httpMethod: { '@id': 'schema:httpMethod' }, + iataCode: { '@id': 'schema:iataCode' }, + icaoCode: { '@id': 'schema:icaoCode' }, + identifier: { '@id': 'schema:identifier' }, + identifyingExam: { '@id': 'schema:identifyingExam' }, + identifyingTest: { '@id': 'schema:identifyingTest' }, + illustrator: { '@id': 'schema:illustrator' }, + image: { '@id': 'schema:image', '@type': '@id' }, + imagingTechnique: { '@id': 'schema:imagingTechnique' }, + inAlbum: { '@id': 'schema:inAlbum' }, + inBroadcastLineup: { '@id': 'schema:inBroadcastLineup' }, + inCodeSet: { '@id': 'schema:inCodeSet', '@type': '@id' }, + inDefinedTermSet: { '@id': 'schema:inDefinedTermSet', '@type': '@id' }, + inLanguage: { '@id': 'schema:inLanguage' }, + inPlaylist: { '@id': 'schema:inPlaylist' }, + inProductGroupWithID: { '@id': 'schema:inProductGroupWithID' }, + inStoreReturnsOffered: { '@id': 'schema:inStoreReturnsOffered' }, + inSupportOf: { '@id': 'schema:inSupportOf' }, + incentiveCompensation: { '@id': 'schema:incentiveCompensation' }, + incentives: { '@id': 'schema:incentives' }, + includedComposition: { '@id': 'schema:includedComposition' }, + includedDataCatalog: { '@id': 'schema:includedDataCatalog' }, + includedInDataCatalog: { '@id': 'schema:includedInDataCatalog' }, + includedInHealthInsurancePlan: { + '@id': 'schema:includedInHealthInsurancePlan', + }, + includedRiskFactor: { '@id': 'schema:includedRiskFactor' }, + includesAttraction: { '@id': 'schema:includesAttraction' }, + includesHealthPlanFormulary: { '@id': 'schema:includesHealthPlanFormulary' }, + includesHealthPlanNetwork: { '@id': 'schema:includesHealthPlanNetwork' }, + includesObject: { '@id': 'schema:includesObject' }, + increasesRiskOf: { '@id': 'schema:increasesRiskOf' }, + industry: { '@id': 'schema:industry' }, + ineligibleRegion: { '@id': 'schema:ineligibleRegion' }, + infectiousAgent: { '@id': 'schema:infectiousAgent' }, + infectiousAgentClass: { '@id': 'schema:infectiousAgentClass' }, + ingredients: { '@id': 'schema:ingredients' }, + inker: { '@id': 'schema:inker' }, + insertion: { '@id': 'schema:insertion' }, + installUrl: { '@id': 'schema:installUrl', '@type': '@id' }, + instructor: { '@id': 'schema:instructor' }, + instrument: { '@id': 'schema:instrument' }, + intensity: { '@id': 'schema:intensity' }, + interactingDrug: { '@id': 'schema:interactingDrug' }, + interactionCount: { '@id': 'schema:interactionCount' }, + interactionService: { '@id': 'schema:interactionService' }, + interactionStatistic: { '@id': 'schema:interactionStatistic' }, + interactionType: { '@id': 'schema:interactionType' }, + interactivityType: { '@id': 'schema:interactivityType' }, + interestRate: { '@id': 'schema:interestRate' }, + inventoryLevel: { '@id': 'schema:inventoryLevel' }, + inverseOf: { '@id': 'schema:inverseOf' }, + isAcceptingNewPatients: { '@id': 'schema:isAcceptingNewPatients' }, + isAccessibleForFree: { '@id': 'schema:isAccessibleForFree' }, + isAccessoryOrSparePartFor: { '@id': 'schema:isAccessoryOrSparePartFor' }, + isAvailableGenerically: { '@id': 'schema:isAvailableGenerically' }, + isBasedOn: { '@id': 'schema:isBasedOn', '@type': '@id' }, + isBasedOnUrl: { '@id': 'schema:isBasedOnUrl', '@type': '@id' }, + isConsumableFor: { '@id': 'schema:isConsumableFor' }, + isFamilyFriendly: { '@id': 'schema:isFamilyFriendly' }, + isGift: { '@id': 'schema:isGift' }, + isLiveBroadcast: { '@id': 'schema:isLiveBroadcast' }, + isPartOf: { '@id': 'schema:isPartOf', '@type': '@id' }, + isPlanForApartment: { '@id': 'schema:isPlanForApartment' }, + isProprietary: { '@id': 'schema:isProprietary' }, + isRelatedTo: { '@id': 'schema:isRelatedTo' }, + isResizable: { '@id': 'schema:isResizable' }, + isSimilarTo: { '@id': 'schema:isSimilarTo' }, + isUnlabelledFallback: { '@id': 'schema:isUnlabelledFallback' }, + isVariantOf: { '@id': 'schema:isVariantOf' }, + isbn: { '@id': 'schema:isbn' }, + isicV4: { '@id': 'schema:isicV4' }, + isrcCode: { '@id': 'schema:isrcCode' }, + issn: { '@id': 'schema:issn' }, + issueNumber: { '@id': 'schema:issueNumber' }, + issuedBy: { '@id': 'schema:issuedBy' }, + issuedThrough: { '@id': 'schema:issuedThrough' }, + iswcCode: { '@id': 'schema:iswcCode' }, + item: { '@id': 'schema:item' }, + itemCondition: { '@id': 'schema:itemCondition' }, + itemListElement: { '@id': 'schema:itemListElement' }, + itemListOrder: { '@id': 'schema:itemListOrder' }, + itemLocation: { '@id': 'schema:itemLocation' }, + itemOffered: { '@id': 'schema:itemOffered' }, + itemReviewed: { '@id': 'schema:itemReviewed' }, + itemShipped: { '@id': 'schema:itemShipped' }, + itinerary: { '@id': 'schema:itinerary' }, + jobBenefits: { '@id': 'schema:jobBenefits' }, + jobImmediateStart: { '@id': 'schema:jobImmediateStart' }, + jobLocation: { '@id': 'schema:jobLocation' }, + jobLocationType: { '@id': 'schema:jobLocationType' }, + jobStartDate: { '@id': 'schema:jobStartDate' }, + jobTitle: { '@id': 'schema:jobTitle' }, + jurisdiction: { '@id': 'schema:jurisdiction' }, + keywords: { '@id': 'schema:keywords' }, + knownVehicleDamages: { '@id': 'schema:knownVehicleDamages' }, + knows: { '@id': 'schema:knows' }, + knowsAbout: { '@id': 'schema:knowsAbout' }, + knowsLanguage: { '@id': 'schema:knowsLanguage' }, + labelDetails: { '@id': 'schema:labelDetails', '@type': '@id' }, + landlord: { '@id': 'schema:landlord' }, + language: { '@id': 'schema:language' }, + lastReviewed: { '@id': 'schema:lastReviewed', '@type': 'Date' }, + latitude: { '@id': 'schema:latitude' }, + layoutImage: { '@id': 'schema:layoutImage', '@type': '@id' }, + learningResourceType: { '@id': 'schema:learningResourceType' }, + leaseLength: { '@id': 'schema:leaseLength' }, + legalName: { '@id': 'schema:legalName' }, + legalStatus: { '@id': 'schema:legalStatus' }, + legislationApplies: { '@id': 'schema:legislationApplies' }, + legislationChanges: { '@id': 'schema:legislationChanges' }, + legislationConsolidates: { '@id': 'schema:legislationConsolidates' }, + legislationDate: { '@id': 'schema:legislationDate', '@type': 'Date' }, + legislationDateVersion: { + '@id': 'schema:legislationDateVersion', + '@type': 'Date', + }, + legislationIdentifier: { '@id': 'schema:legislationIdentifier' }, + legislationJurisdiction: { '@id': 'schema:legislationJurisdiction' }, + legislationLegalForce: { '@id': 'schema:legislationLegalForce' }, + legislationLegalValue: { '@id': 'schema:legislationLegalValue' }, + legislationPassedBy: { '@id': 'schema:legislationPassedBy' }, + legislationResponsible: { '@id': 'schema:legislationResponsible' }, + legislationTransposes: { '@id': 'schema:legislationTransposes' }, + legislationType: { '@id': 'schema:legislationType' }, + leiCode: { '@id': 'schema:leiCode' }, + lender: { '@id': 'schema:lender' }, + lesser: { '@id': 'schema:lesser' }, + lesserOrEqual: { '@id': 'schema:lesserOrEqual' }, + letterer: { '@id': 'schema:letterer' }, + license: { '@id': 'schema:license', '@type': '@id' }, + line: { '@id': 'schema:line' }, + linkRelationship: { '@id': 'schema:linkRelationship' }, + liveBlogUpdate: { '@id': 'schema:liveBlogUpdate' }, + loanMortgageMandateAmount: { '@id': 'schema:loanMortgageMandateAmount' }, + loanPaymentAmount: { '@id': 'schema:loanPaymentAmount' }, + loanPaymentFrequency: { '@id': 'schema:loanPaymentFrequency' }, + loanRepaymentForm: { '@id': 'schema:loanRepaymentForm' }, + loanTerm: { '@id': 'schema:loanTerm' }, + loanType: { '@id': 'schema:loanType' }, + location: { '@id': 'schema:location' }, + locationCreated: { '@id': 'schema:locationCreated' }, + lodgingUnitDescription: { '@id': 'schema:lodgingUnitDescription' }, + lodgingUnitType: { '@id': 'schema:lodgingUnitType' }, + logo: { '@id': 'schema:logo', '@type': '@id' }, + longitude: { '@id': 'schema:longitude' }, + loser: { '@id': 'schema:loser' }, + lowPrice: { '@id': 'schema:lowPrice' }, + lyricist: { '@id': 'schema:lyricist' }, + lyrics: { '@id': 'schema:lyrics' }, + mainContentOfPage: { '@id': 'schema:mainContentOfPage' }, + mainEntity: { '@id': 'schema:mainEntity' }, + mainEntityOfPage: { '@id': 'schema:mainEntityOfPage', '@type': '@id' }, + maintainer: { '@id': 'schema:maintainer' }, + makesOffer: { '@id': 'schema:makesOffer' }, + manufacturer: { '@id': 'schema:manufacturer' }, + map: { '@id': 'schema:map', '@type': '@id' }, + mapType: { '@id': 'schema:mapType' }, + maps: { '@id': 'schema:maps', '@type': '@id' }, + marginOfError: { '@id': 'schema:marginOfError' }, + masthead: { '@id': 'schema:masthead', '@type': '@id' }, + material: { '@id': 'schema:material' }, + materialExtent: { '@id': 'schema:materialExtent' }, + mathExpression: { '@id': 'schema:mathExpression' }, + maxPrice: { '@id': 'schema:maxPrice' }, + maxValue: { '@id': 'schema:maxValue' }, + maximumAttendeeCapacity: { '@id': 'schema:maximumAttendeeCapacity' }, + maximumEnrollment: { '@id': 'schema:maximumEnrollment' }, + maximumIntake: { '@id': 'schema:maximumIntake' }, + maximumPhysicalAttendeeCapacity: { + '@id': 'schema:maximumPhysicalAttendeeCapacity', + }, + maximumVirtualAttendeeCapacity: { + '@id': 'schema:maximumVirtualAttendeeCapacity', + }, + mealService: { '@id': 'schema:mealService' }, + measuredProperty: { '@id': 'schema:measuredProperty' }, + measuredValue: { '@id': 'schema:measuredValue' }, + measurementTechnique: { '@id': 'schema:measurementTechnique' }, + mechanismOfAction: { '@id': 'schema:mechanismOfAction' }, + mediaAuthenticityCategory: { '@id': 'schema:mediaAuthenticityCategory' }, + median: { '@id': 'schema:median' }, + medicalAudience: { '@id': 'schema:medicalAudience' }, + medicalSpecialty: { '@id': 'schema:medicalSpecialty' }, + medicineSystem: { '@id': 'schema:medicineSystem' }, + meetsEmissionStandard: { '@id': 'schema:meetsEmissionStandard' }, + member: { '@id': 'schema:member' }, + memberOf: { '@id': 'schema:memberOf' }, + members: { '@id': 'schema:members' }, + membershipNumber: { '@id': 'schema:membershipNumber' }, + membershipPointsEarned: { '@id': 'schema:membershipPointsEarned' }, + memoryRequirements: { '@id': 'schema:memoryRequirements' }, + mentions: { '@id': 'schema:mentions' }, + menu: { '@id': 'schema:menu' }, + menuAddOn: { '@id': 'schema:menuAddOn' }, + merchant: { '@id': 'schema:merchant' }, + merchantReturnDays: { '@id': 'schema:merchantReturnDays' }, + merchantReturnLink: { '@id': 'schema:merchantReturnLink', '@type': '@id' }, + messageAttachment: { '@id': 'schema:messageAttachment' }, + mileageFromOdometer: { '@id': 'schema:mileageFromOdometer' }, + minPrice: { '@id': 'schema:minPrice' }, + minValue: { '@id': 'schema:minValue' }, + minimumPaymentDue: { '@id': 'schema:minimumPaymentDue' }, + missionCoveragePrioritiesPolicy: { + '@id': 'schema:missionCoveragePrioritiesPolicy', + '@type': '@id', + }, + model: { '@id': 'schema:model' }, + modelDate: { '@id': 'schema:modelDate', '@type': 'Date' }, + modifiedTime: { '@id': 'schema:modifiedTime' }, + monthlyMinimumRepaymentAmount: { + '@id': 'schema:monthlyMinimumRepaymentAmount', + }, + monthsOfExperience: { '@id': 'schema:monthsOfExperience' }, + mpn: { '@id': 'schema:mpn' }, + multipleValues: { '@id': 'schema:multipleValues' }, + muscleAction: { '@id': 'schema:muscleAction' }, + musicArrangement: { '@id': 'schema:musicArrangement' }, + musicBy: { '@id': 'schema:musicBy' }, + musicCompositionForm: { '@id': 'schema:musicCompositionForm' }, + musicGroupMember: { '@id': 'schema:musicGroupMember' }, + musicReleaseFormat: { '@id': 'schema:musicReleaseFormat' }, + musicalKey: { '@id': 'schema:musicalKey' }, + naics: { '@id': 'schema:naics' }, + name: { '@id': 'schema:name' }, + namedPosition: { '@id': 'schema:namedPosition' }, + nationality: { '@id': 'schema:nationality' }, + naturalProgression: { '@id': 'schema:naturalProgression' }, + nerve: { '@id': 'schema:nerve' }, + nerveMotor: { '@id': 'schema:nerveMotor' }, + netWorth: { '@id': 'schema:netWorth' }, + newsUpdatesAndGuidelines: { + '@id': 'schema:newsUpdatesAndGuidelines', + '@type': '@id', + }, + nextItem: { '@id': 'schema:nextItem' }, + noBylinesPolicy: { '@id': 'schema:noBylinesPolicy', '@type': '@id' }, + nonEqual: { '@id': 'schema:nonEqual' }, + nonProprietaryName: { '@id': 'schema:nonProprietaryName' }, + nonprofitStatus: { '@id': 'schema:nonprofitStatus' }, + normalRange: { '@id': 'schema:normalRange' }, + nsn: { '@id': 'schema:nsn' }, + numAdults: { '@id': 'schema:numAdults' }, + numChildren: { '@id': 'schema:numChildren' }, + numConstraints: { '@id': 'schema:numConstraints' }, + numTracks: { '@id': 'schema:numTracks' }, + numberOfAccommodationUnits: { '@id': 'schema:numberOfAccommodationUnits' }, + numberOfAirbags: { '@id': 'schema:numberOfAirbags' }, + numberOfAvailableAccommodationUnits: { + '@id': 'schema:numberOfAvailableAccommodationUnits', + }, + numberOfAxles: { '@id': 'schema:numberOfAxles' }, + numberOfBathroomsTotal: { '@id': 'schema:numberOfBathroomsTotal' }, + numberOfBedrooms: { '@id': 'schema:numberOfBedrooms' }, + numberOfBeds: { '@id': 'schema:numberOfBeds' }, + numberOfCredits: { '@id': 'schema:numberOfCredits' }, + numberOfDoors: { '@id': 'schema:numberOfDoors' }, + numberOfEmployees: { '@id': 'schema:numberOfEmployees' }, + numberOfEpisodes: { '@id': 'schema:numberOfEpisodes' }, + numberOfForwardGears: { '@id': 'schema:numberOfForwardGears' }, + numberOfFullBathrooms: { '@id': 'schema:numberOfFullBathrooms' }, + numberOfItems: { '@id': 'schema:numberOfItems' }, + numberOfLoanPayments: { '@id': 'schema:numberOfLoanPayments' }, + numberOfPages: { '@id': 'schema:numberOfPages' }, + numberOfPartialBathrooms: { '@id': 'schema:numberOfPartialBathrooms' }, + numberOfPlayers: { '@id': 'schema:numberOfPlayers' }, + numberOfPreviousOwners: { '@id': 'schema:numberOfPreviousOwners' }, + numberOfRooms: { '@id': 'schema:numberOfRooms' }, + numberOfSeasons: { '@id': 'schema:numberOfSeasons' }, + numberedPosition: { '@id': 'schema:numberedPosition' }, + nutrition: { '@id': 'schema:nutrition' }, + object: { '@id': 'schema:object' }, + observationDate: { '@id': 'schema:observationDate' }, + observedNode: { '@id': 'schema:observedNode' }, + occupancy: { '@id': 'schema:occupancy' }, + occupationLocation: { '@id': 'schema:occupationLocation' }, + occupationalCategory: { '@id': 'schema:occupationalCategory' }, + occupationalCredentialAwarded: { + '@id': 'schema:occupationalCredentialAwarded', + }, + offerCount: { '@id': 'schema:offerCount' }, + offeredBy: { '@id': 'schema:offeredBy' }, + offers: { '@id': 'schema:offers' }, + offersPrescriptionByMail: { '@id': 'schema:offersPrescriptionByMail' }, + openingHours: { '@id': 'schema:openingHours' }, + openingHoursSpecification: { '@id': 'schema:openingHoursSpecification' }, + opens: { '@id': 'schema:opens' }, + operatingSystem: { '@id': 'schema:operatingSystem' }, + opponent: { '@id': 'schema:opponent' }, + option: { '@id': 'schema:option' }, + orderDate: { '@id': 'schema:orderDate', '@type': 'Date' }, + orderDelivery: { '@id': 'schema:orderDelivery' }, + orderItemNumber: { '@id': 'schema:orderItemNumber' }, + orderItemStatus: { '@id': 'schema:orderItemStatus' }, + orderNumber: { '@id': 'schema:orderNumber' }, + orderQuantity: { '@id': 'schema:orderQuantity' }, + orderStatus: { '@id': 'schema:orderStatus' }, + orderedItem: { '@id': 'schema:orderedItem' }, + organizer: { '@id': 'schema:organizer' }, + originAddress: { '@id': 'schema:originAddress' }, + originatesFrom: { '@id': 'schema:originatesFrom' }, + overdosage: { '@id': 'schema:overdosage' }, + ownedFrom: { '@id': 'schema:ownedFrom' }, + ownedThrough: { '@id': 'schema:ownedThrough' }, + ownershipFundingInfo: { '@id': 'schema:ownershipFundingInfo' }, + owns: { '@id': 'schema:owns' }, + pageEnd: { '@id': 'schema:pageEnd' }, + pageStart: { '@id': 'schema:pageStart' }, + pagination: { '@id': 'schema:pagination' }, + parent: { '@id': 'schema:parent' }, + parentItem: { '@id': 'schema:parentItem' }, + parentOrganization: { '@id': 'schema:parentOrganization' }, + parentService: { '@id': 'schema:parentService' }, + parents: { '@id': 'schema:parents' }, + partOfEpisode: { '@id': 'schema:partOfEpisode' }, + partOfInvoice: { '@id': 'schema:partOfInvoice' }, + partOfOrder: { '@id': 'schema:partOfOrder' }, + partOfSeason: { '@id': 'schema:partOfSeason' }, + partOfSeries: { '@id': 'schema:partOfSeries' }, + partOfSystem: { '@id': 'schema:partOfSystem' }, + partOfTVSeries: { '@id': 'schema:partOfTVSeries' }, + partOfTrip: { '@id': 'schema:partOfTrip' }, + participant: { '@id': 'schema:participant' }, + partySize: { '@id': 'schema:partySize' }, + passengerPriorityStatus: { '@id': 'schema:passengerPriorityStatus' }, + passengerSequenceNumber: { '@id': 'schema:passengerSequenceNumber' }, + pathophysiology: { '@id': 'schema:pathophysiology' }, + pattern: { '@id': 'schema:pattern' }, + payload: { '@id': 'schema:payload' }, + paymentAccepted: { '@id': 'schema:paymentAccepted' }, + paymentDue: { '@id': 'schema:paymentDue' }, + paymentDueDate: { '@id': 'schema:paymentDueDate', '@type': 'Date' }, + paymentMethod: { '@id': 'schema:paymentMethod' }, + paymentMethodId: { '@id': 'schema:paymentMethodId' }, + paymentStatus: { '@id': 'schema:paymentStatus' }, + paymentUrl: { '@id': 'schema:paymentUrl', '@type': '@id' }, + penciler: { '@id': 'schema:penciler' }, + percentile10: { '@id': 'schema:percentile10' }, + percentile25: { '@id': 'schema:percentile25' }, + percentile75: { '@id': 'schema:percentile75' }, + percentile90: { '@id': 'schema:percentile90' }, + performTime: { '@id': 'schema:performTime' }, + performer: { '@id': 'schema:performer' }, + performerIn: { '@id': 'schema:performerIn' }, + performers: { '@id': 'schema:performers' }, + permissionType: { '@id': 'schema:permissionType' }, + permissions: { '@id': 'schema:permissions' }, + permitAudience: { '@id': 'schema:permitAudience' }, + permittedUsage: { '@id': 'schema:permittedUsage' }, + petsAllowed: { '@id': 'schema:petsAllowed' }, + phoneticText: { '@id': 'schema:phoneticText' }, + photo: { '@id': 'schema:photo' }, + photos: { '@id': 'schema:photos' }, + physicalRequirement: { '@id': 'schema:physicalRequirement' }, + physiologicalBenefits: { '@id': 'schema:physiologicalBenefits' }, + pickupLocation: { '@id': 'schema:pickupLocation' }, + pickupTime: { '@id': 'schema:pickupTime' }, + playMode: { '@id': 'schema:playMode' }, + playerType: { '@id': 'schema:playerType' }, + playersOnline: { '@id': 'schema:playersOnline' }, + polygon: { '@id': 'schema:polygon' }, + populationType: { '@id': 'schema:populationType' }, + position: { '@id': 'schema:position' }, + possibleComplication: { '@id': 'schema:possibleComplication' }, + possibleTreatment: { '@id': 'schema:possibleTreatment' }, + postOfficeBoxNumber: { '@id': 'schema:postOfficeBoxNumber' }, + postOp: { '@id': 'schema:postOp' }, + postalCode: { '@id': 'schema:postalCode' }, + postalCodeBegin: { '@id': 'schema:postalCodeBegin' }, + postalCodeEnd: { '@id': 'schema:postalCodeEnd' }, + postalCodePrefix: { '@id': 'schema:postalCodePrefix' }, + postalCodeRange: { '@id': 'schema:postalCodeRange' }, + potentialAction: { '@id': 'schema:potentialAction' }, + preOp: { '@id': 'schema:preOp' }, + predecessorOf: { '@id': 'schema:predecessorOf' }, + pregnancyCategory: { '@id': 'schema:pregnancyCategory' }, + pregnancyWarning: { '@id': 'schema:pregnancyWarning' }, + prepTime: { '@id': 'schema:prepTime' }, + preparation: { '@id': 'schema:preparation' }, + prescribingInfo: { '@id': 'schema:prescribingInfo', '@type': '@id' }, + prescriptionStatus: { '@id': 'schema:prescriptionStatus' }, + previousItem: { '@id': 'schema:previousItem' }, + previousStartDate: { '@id': 'schema:previousStartDate', '@type': 'Date' }, + price: { '@id': 'schema:price' }, + priceComponent: { '@id': 'schema:priceComponent' }, + priceComponentType: { '@id': 'schema:priceComponentType' }, + priceCurrency: { '@id': 'schema:priceCurrency' }, + priceRange: { '@id': 'schema:priceRange' }, + priceSpecification: { '@id': 'schema:priceSpecification' }, + priceType: { '@id': 'schema:priceType' }, + priceValidUntil: { '@id': 'schema:priceValidUntil', '@type': 'Date' }, + primaryImageOfPage: { '@id': 'schema:primaryImageOfPage' }, + primaryPrevention: { '@id': 'schema:primaryPrevention' }, + printColumn: { '@id': 'schema:printColumn' }, + printEdition: { '@id': 'schema:printEdition' }, + printPage: { '@id': 'schema:printPage' }, + printSection: { '@id': 'schema:printSection' }, + procedure: { '@id': 'schema:procedure' }, + procedureType: { '@id': 'schema:procedureType' }, + processingTime: { '@id': 'schema:processingTime' }, + processorRequirements: { '@id': 'schema:processorRequirements' }, + producer: { '@id': 'schema:producer' }, + produces: { '@id': 'schema:produces' }, + productGroupID: { '@id': 'schema:productGroupID' }, + productID: { '@id': 'schema:productID' }, + productReturnDays: { '@id': 'schema:productReturnDays' }, + productReturnLink: { '@id': 'schema:productReturnLink', '@type': '@id' }, + productSupported: { '@id': 'schema:productSupported' }, + productionCompany: { '@id': 'schema:productionCompany' }, + productionDate: { '@id': 'schema:productionDate', '@type': 'Date' }, + proficiencyLevel: { '@id': 'schema:proficiencyLevel' }, + programMembershipUsed: { '@id': 'schema:programMembershipUsed' }, + programName: { '@id': 'schema:programName' }, + programPrerequisites: { '@id': 'schema:programPrerequisites' }, + programType: { '@id': 'schema:programType' }, + programmingLanguage: { '@id': 'schema:programmingLanguage' }, + programmingModel: { '@id': 'schema:programmingModel' }, + propertyID: { '@id': 'schema:propertyID' }, + proprietaryName: { '@id': 'schema:proprietaryName' }, + proteinContent: { '@id': 'schema:proteinContent' }, + provider: { '@id': 'schema:provider' }, + providerMobility: { '@id': 'schema:providerMobility' }, + providesBroadcastService: { '@id': 'schema:providesBroadcastService' }, + providesService: { '@id': 'schema:providesService' }, + publicAccess: { '@id': 'schema:publicAccess' }, + publicTransportClosuresInfo: { + '@id': 'schema:publicTransportClosuresInfo', + '@type': '@id', + }, + publication: { '@id': 'schema:publication' }, + publicationType: { '@id': 'schema:publicationType' }, + publishedBy: { '@id': 'schema:publishedBy' }, + publishedOn: { '@id': 'schema:publishedOn' }, + publisher: { '@id': 'schema:publisher' }, + publisherImprint: { '@id': 'schema:publisherImprint' }, + publishingPrinciples: { '@id': 'schema:publishingPrinciples', '@type': '@id' }, + purchaseDate: { '@id': 'schema:purchaseDate', '@type': 'Date' }, + qualifications: { '@id': 'schema:qualifications' }, + quarantineGuidelines: { '@id': 'schema:quarantineGuidelines', '@type': '@id' }, + query: { '@id': 'schema:query' }, + quest: { '@id': 'schema:quest' }, + question: { '@id': 'schema:question' }, + rangeIncludes: { '@id': 'schema:rangeIncludes' }, + ratingCount: { '@id': 'schema:ratingCount' }, + ratingExplanation: { '@id': 'schema:ratingExplanation' }, + ratingValue: { '@id': 'schema:ratingValue' }, + readBy: { '@id': 'schema:readBy' }, + readonlyValue: { '@id': 'schema:readonlyValue' }, + realEstateAgent: { '@id': 'schema:realEstateAgent' }, + recipe: { '@id': 'schema:recipe' }, + recipeCategory: { '@id': 'schema:recipeCategory' }, + recipeCuisine: { '@id': 'schema:recipeCuisine' }, + recipeIngredient: { '@id': 'schema:recipeIngredient' }, + recipeInstructions: { '@id': 'schema:recipeInstructions' }, + recipeYield: { '@id': 'schema:recipeYield' }, + recipient: { '@id': 'schema:recipient' }, + recognizedBy: { '@id': 'schema:recognizedBy' }, + recognizingAuthority: { '@id': 'schema:recognizingAuthority' }, + recommendationStrength: { '@id': 'schema:recommendationStrength' }, + recommendedIntake: { '@id': 'schema:recommendedIntake' }, + recordLabel: { '@id': 'schema:recordLabel' }, + recordedAs: { '@id': 'schema:recordedAs' }, + recordedAt: { '@id': 'schema:recordedAt' }, + recordedIn: { '@id': 'schema:recordedIn' }, + recordingOf: { '@id': 'schema:recordingOf' }, + recourseLoan: { '@id': 'schema:recourseLoan' }, + referenceQuantity: { '@id': 'schema:referenceQuantity' }, + referencesOrder: { '@id': 'schema:referencesOrder' }, + refundType: { '@id': 'schema:refundType' }, + regionDrained: { '@id': 'schema:regionDrained' }, + regionsAllowed: { '@id': 'schema:regionsAllowed' }, + relatedAnatomy: { '@id': 'schema:relatedAnatomy' }, + relatedCondition: { '@id': 'schema:relatedCondition' }, + relatedDrug: { '@id': 'schema:relatedDrug' }, + relatedLink: { '@id': 'schema:relatedLink', '@type': '@id' }, + relatedStructure: { '@id': 'schema:relatedStructure' }, + relatedTherapy: { '@id': 'schema:relatedTherapy' }, + relatedTo: { '@id': 'schema:relatedTo' }, + releaseDate: { '@id': 'schema:releaseDate', '@type': 'Date' }, + releaseNotes: { '@id': 'schema:releaseNotes' }, + releaseOf: { '@id': 'schema:releaseOf' }, + releasedEvent: { '@id': 'schema:releasedEvent' }, + relevantOccupation: { '@id': 'schema:relevantOccupation' }, + relevantSpecialty: { '@id': 'schema:relevantSpecialty' }, + remainingAttendeeCapacity: { '@id': 'schema:remainingAttendeeCapacity' }, + renegotiableLoan: { '@id': 'schema:renegotiableLoan' }, + repeatCount: { '@id': 'schema:repeatCount' }, + repeatFrequency: { '@id': 'schema:repeatFrequency' }, + repetitions: { '@id': 'schema:repetitions' }, + replacee: { '@id': 'schema:replacee' }, + replacer: { '@id': 'schema:replacer' }, + replyToUrl: { '@id': 'schema:replyToUrl', '@type': '@id' }, + reportNumber: { '@id': 'schema:reportNumber' }, + representativeOfPage: { '@id': 'schema:representativeOfPage' }, + requiredCollateral: { '@id': 'schema:requiredCollateral' }, + requiredGender: { '@id': 'schema:requiredGender' }, + requiredMaxAge: { '@id': 'schema:requiredMaxAge' }, + requiredMinAge: { '@id': 'schema:requiredMinAge' }, + requiredQuantity: { '@id': 'schema:requiredQuantity' }, + requirements: { '@id': 'schema:requirements' }, + requiresSubscription: { '@id': 'schema:requiresSubscription' }, + reservationFor: { '@id': 'schema:reservationFor' }, + reservationId: { '@id': 'schema:reservationId' }, + reservationStatus: { '@id': 'schema:reservationStatus' }, + reservedTicket: { '@id': 'schema:reservedTicket' }, + responsibilities: { '@id': 'schema:responsibilities' }, + restPeriods: { '@id': 'schema:restPeriods' }, + result: { '@id': 'schema:result' }, + resultComment: { '@id': 'schema:resultComment' }, + resultReview: { '@id': 'schema:resultReview' }, + returnFees: { '@id': 'schema:returnFees' }, + returnPolicyCategory: { '@id': 'schema:returnPolicyCategory' }, + review: { '@id': 'schema:review' }, + reviewAspect: { '@id': 'schema:reviewAspect' }, + reviewBody: { '@id': 'schema:reviewBody' }, + reviewCount: { '@id': 'schema:reviewCount' }, + reviewRating: { '@id': 'schema:reviewRating' }, + reviewedBy: { '@id': 'schema:reviewedBy' }, + reviews: { '@id': 'schema:reviews' }, + riskFactor: { '@id': 'schema:riskFactor' }, + risks: { '@id': 'schema:risks' }, + roleName: { '@id': 'schema:roleName' }, + roofLoad: { '@id': 'schema:roofLoad' }, + rsvpResponse: { '@id': 'schema:rsvpResponse' }, + runsTo: { '@id': 'schema:runsTo' }, + runtime: { '@id': 'schema:runtime' }, + runtimePlatform: { '@id': 'schema:runtimePlatform' }, + rxcui: { '@id': 'schema:rxcui' }, + safetyConsideration: { '@id': 'schema:safetyConsideration' }, + salaryCurrency: { '@id': 'schema:salaryCurrency' }, + salaryUponCompletion: { '@id': 'schema:salaryUponCompletion' }, + sameAs: { '@id': 'schema:sameAs', '@type': '@id' }, + sampleType: { '@id': 'schema:sampleType' }, + saturatedFatContent: { '@id': 'schema:saturatedFatContent' }, + scheduleTimezone: { '@id': 'schema:scheduleTimezone' }, + scheduledPaymentDate: { '@id': 'schema:scheduledPaymentDate', '@type': 'Date' }, + scheduledTime: { '@id': 'schema:scheduledTime' }, + schemaVersion: { '@id': 'schema:schemaVersion' }, + schoolClosuresInfo: { '@id': 'schema:schoolClosuresInfo', '@type': '@id' }, + screenCount: { '@id': 'schema:screenCount' }, + screenshot: { '@id': 'schema:screenshot', '@type': '@id' }, + sdDatePublished: { '@id': 'schema:sdDatePublished', '@type': 'Date' }, + sdLicense: { '@id': 'schema:sdLicense', '@type': '@id' }, + sdPublisher: { '@id': 'schema:sdPublisher' }, + season: { '@id': 'schema:season', '@type': '@id' }, + seasonNumber: { '@id': 'schema:seasonNumber' }, + seasons: { '@id': 'schema:seasons' }, + seatNumber: { '@id': 'schema:seatNumber' }, + seatRow: { '@id': 'schema:seatRow' }, + seatSection: { '@id': 'schema:seatSection' }, + seatingCapacity: { '@id': 'schema:seatingCapacity' }, + seatingType: { '@id': 'schema:seatingType' }, + secondaryPrevention: { '@id': 'schema:secondaryPrevention' }, + securityClearanceRequirement: { '@id': 'schema:securityClearanceRequirement' }, + securityScreening: { '@id': 'schema:securityScreening' }, + seeks: { '@id': 'schema:seeks' }, + seller: { '@id': 'schema:seller' }, + sender: { '@id': 'schema:sender' }, + sensoryRequirement: { '@id': 'schema:sensoryRequirement' }, + sensoryUnit: { '@id': 'schema:sensoryUnit' }, + serialNumber: { '@id': 'schema:serialNumber' }, + seriousAdverseOutcome: { '@id': 'schema:seriousAdverseOutcome' }, + serverStatus: { '@id': 'schema:serverStatus' }, + servesCuisine: { '@id': 'schema:servesCuisine' }, + serviceArea: { '@id': 'schema:serviceArea' }, + serviceAudience: { '@id': 'schema:serviceAudience' }, + serviceLocation: { '@id': 'schema:serviceLocation' }, + serviceOperator: { '@id': 'schema:serviceOperator' }, + serviceOutput: { '@id': 'schema:serviceOutput' }, + servicePhone: { '@id': 'schema:servicePhone' }, + servicePostalAddress: { '@id': 'schema:servicePostalAddress' }, + serviceSmsNumber: { '@id': 'schema:serviceSmsNumber' }, + serviceType: { '@id': 'schema:serviceType' }, + serviceUrl: { '@id': 'schema:serviceUrl', '@type': '@id' }, + servingSize: { '@id': 'schema:servingSize' }, + sharedContent: { '@id': 'schema:sharedContent' }, + shippingDestination: { '@id': 'schema:shippingDestination' }, + shippingDetails: { '@id': 'schema:shippingDetails' }, + shippingLabel: { '@id': 'schema:shippingLabel' }, + shippingRate: { '@id': 'schema:shippingRate' }, + shippingSettingsLink: { '@id': 'schema:shippingSettingsLink', '@type': '@id' }, + sibling: { '@id': 'schema:sibling' }, + siblings: { '@id': 'schema:siblings' }, + signDetected: { '@id': 'schema:signDetected' }, + signOrSymptom: { '@id': 'schema:signOrSymptom' }, + significance: { '@id': 'schema:significance' }, + significantLink: { '@id': 'schema:significantLink', '@type': '@id' }, + significantLinks: { '@id': 'schema:significantLinks', '@type': '@id' }, + size: { '@id': 'schema:size' }, + sizeGroup: { '@id': 'schema:sizeGroup' }, + sizeSystem: { '@id': 'schema:sizeSystem' }, + skills: { '@id': 'schema:skills' }, + sku: { '@id': 'schema:sku' }, + slogan: { '@id': 'schema:slogan' }, + smokingAllowed: { '@id': 'schema:smokingAllowed' }, + sodiumContent: { '@id': 'schema:sodiumContent' }, + softwareAddOn: { '@id': 'schema:softwareAddOn' }, + softwareHelp: { '@id': 'schema:softwareHelp' }, + softwareRequirements: { '@id': 'schema:softwareRequirements' }, + softwareVersion: { '@id': 'schema:softwareVersion' }, + sourceOrganization: { '@id': 'schema:sourceOrganization' }, + sourcedFrom: { '@id': 'schema:sourcedFrom' }, + spatial: { '@id': 'schema:spatial' }, + spatialCoverage: { '@id': 'schema:spatialCoverage' }, + speakable: { '@id': 'schema:speakable', '@type': '@id' }, + specialCommitments: { '@id': 'schema:specialCommitments' }, + specialOpeningHoursSpecification: { + '@id': 'schema:specialOpeningHoursSpecification', + }, + specialty: { '@id': 'schema:specialty' }, + speechToTextMarkup: { '@id': 'schema:speechToTextMarkup' }, + speed: { '@id': 'schema:speed' }, + spokenByCharacter: { '@id': 'schema:spokenByCharacter' }, + sponsor: { '@id': 'schema:sponsor' }, + sport: { '@id': 'schema:sport' }, + sportsActivityLocation: { '@id': 'schema:sportsActivityLocation' }, + sportsEvent: { '@id': 'schema:sportsEvent' }, + sportsTeam: { '@id': 'schema:sportsTeam' }, + spouse: { '@id': 'schema:spouse' }, + stage: { '@id': 'schema:stage' }, + stageAsNumber: { '@id': 'schema:stageAsNumber' }, + starRating: { '@id': 'schema:starRating' }, + startDate: { '@id': 'schema:startDate', '@type': 'Date' }, + startOffset: { '@id': 'schema:startOffset' }, + startTime: { '@id': 'schema:startTime' }, + status: { '@id': 'schema:status' }, + steeringPosition: { '@id': 'schema:steeringPosition' }, + step: { '@id': 'schema:step' }, + stepValue: { '@id': 'schema:stepValue' }, + steps: { '@id': 'schema:steps' }, + storageRequirements: { '@id': 'schema:storageRequirements' }, + streetAddress: { '@id': 'schema:streetAddress' }, + strengthUnit: { '@id': 'schema:strengthUnit' }, + strengthValue: { '@id': 'schema:strengthValue' }, + structuralClass: { '@id': 'schema:structuralClass' }, + study: { '@id': 'schema:study' }, + studyDesign: { '@id': 'schema:studyDesign' }, + studyLocation: { '@id': 'schema:studyLocation' }, + studySubject: { '@id': 'schema:studySubject' }, + stupidProperty: { '@id': 'schema:stupidProperty' }, + subEvent: { '@id': 'schema:subEvent' }, + subEvents: { '@id': 'schema:subEvents' }, + subOrganization: { '@id': 'schema:subOrganization' }, + subReservation: { '@id': 'schema:subReservation' }, + subStageSuffix: { '@id': 'schema:subStageSuffix' }, + subStructure: { '@id': 'schema:subStructure' }, + subTest: { '@id': 'schema:subTest' }, + subTrip: { '@id': 'schema:subTrip' }, + subjectOf: { '@id': 'schema:subjectOf' }, + subtitleLanguage: { '@id': 'schema:subtitleLanguage' }, + successorOf: { '@id': 'schema:successorOf' }, + sugarContent: { '@id': 'schema:sugarContent' }, + suggestedAge: { '@id': 'schema:suggestedAge' }, + suggestedAnswer: { '@id': 'schema:suggestedAnswer' }, + suggestedGender: { '@id': 'schema:suggestedGender' }, + suggestedMaxAge: { '@id': 'schema:suggestedMaxAge' }, + suggestedMeasurement: { '@id': 'schema:suggestedMeasurement' }, + suggestedMinAge: { '@id': 'schema:suggestedMinAge' }, + suitableForDiet: { '@id': 'schema:suitableForDiet' }, + superEvent: { '@id': 'schema:superEvent' }, + supersededBy: { '@id': 'schema:supersededBy' }, + supply: { '@id': 'schema:supply' }, + supplyTo: { '@id': 'schema:supplyTo' }, + supportingData: { '@id': 'schema:supportingData' }, + surface: { '@id': 'schema:surface' }, + target: { '@id': 'schema:target' }, + targetCollection: { '@id': 'schema:targetCollection' }, + targetDescription: { '@id': 'schema:targetDescription' }, + targetName: { '@id': 'schema:targetName' }, + targetPlatform: { '@id': 'schema:targetPlatform' }, + targetPopulation: { '@id': 'schema:targetPopulation' }, + targetProduct: { '@id': 'schema:targetProduct' }, + targetUrl: { '@id': 'schema:targetUrl', '@type': '@id' }, + taxID: { '@id': 'schema:taxID' }, + teaches: { '@id': 'schema:teaches' }, + telephone: { '@id': 'schema:telephone' }, + temporal: { '@id': 'schema:temporal' }, + temporalCoverage: { '@id': 'schema:temporalCoverage' }, + termCode: { '@id': 'schema:termCode' }, + termDuration: { '@id': 'schema:termDuration' }, + termsOfService: { '@id': 'schema:termsOfService' }, + termsPerYear: { '@id': 'schema:termsPerYear' }, + text: { '@id': 'schema:text' }, + textValue: { '@id': 'schema:textValue' }, + thumbnail: { '@id': 'schema:thumbnail' }, + thumbnailUrl: { '@id': 'schema:thumbnailUrl', '@type': '@id' }, + tickerSymbol: { '@id': 'schema:tickerSymbol' }, + ticketNumber: { '@id': 'schema:ticketNumber' }, + ticketToken: { '@id': 'schema:ticketToken' }, + ticketedSeat: { '@id': 'schema:ticketedSeat' }, + timeOfDay: { '@id': 'schema:timeOfDay' }, + timeRequired: { '@id': 'schema:timeRequired' }, + timeToComplete: { '@id': 'schema:timeToComplete' }, + tissueSample: { '@id': 'schema:tissueSample' }, + title: { '@id': 'schema:title' }, + titleEIDR: { '@id': 'schema:titleEIDR' }, + toLocation: { '@id': 'schema:toLocation' }, + toRecipient: { '@id': 'schema:toRecipient' }, + tocContinuation: { '@id': 'schema:tocContinuation' }, + tocEntry: { '@id': 'schema:tocEntry' }, + tongueWeight: { '@id': 'schema:tongueWeight' }, + tool: { '@id': 'schema:tool' }, + torque: { '@id': 'schema:torque' }, + totalJobOpenings: { '@id': 'schema:totalJobOpenings' }, + totalPaymentDue: { '@id': 'schema:totalPaymentDue' }, + totalPrice: { '@id': 'schema:totalPrice' }, + totalTime: { '@id': 'schema:totalTime' }, + tourBookingPage: { '@id': 'schema:tourBookingPage', '@type': '@id' }, + touristType: { '@id': 'schema:touristType' }, + track: { '@id': 'schema:track' }, + trackingNumber: { '@id': 'schema:trackingNumber' }, + trackingUrl: { '@id': 'schema:trackingUrl', '@type': '@id' }, + tracks: { '@id': 'schema:tracks' }, + trailer: { '@id': 'schema:trailer' }, + trailerWeight: { '@id': 'schema:trailerWeight' }, + trainName: { '@id': 'schema:trainName' }, + trainNumber: { '@id': 'schema:trainNumber' }, + trainingSalary: { '@id': 'schema:trainingSalary' }, + transFatContent: { '@id': 'schema:transFatContent' }, + transcript: { '@id': 'schema:transcript' }, + transitTime: { '@id': 'schema:transitTime' }, + transitTimeLabel: { '@id': 'schema:transitTimeLabel' }, + translationOfWork: { '@id': 'schema:translationOfWork' }, + translator: { '@id': 'schema:translator' }, + transmissionMethod: { '@id': 'schema:transmissionMethod' }, + travelBans: { '@id': 'schema:travelBans', '@type': '@id' }, + trialDesign: { '@id': 'schema:trialDesign' }, + tributary: { '@id': 'schema:tributary' }, + typeOfBed: { '@id': 'schema:typeOfBed' }, + typeOfGood: { '@id': 'schema:typeOfGood' }, + typicalAgeRange: { '@id': 'schema:typicalAgeRange' }, + typicalCreditsPerTerm: { '@id': 'schema:typicalCreditsPerTerm' }, + typicalTest: { '@id': 'schema:typicalTest' }, + underName: { '@id': 'schema:underName' }, + unitCode: { '@id': 'schema:unitCode' }, + unitText: { '@id': 'schema:unitText' }, + unnamedSourcesPolicy: { '@id': 'schema:unnamedSourcesPolicy', '@type': '@id' }, + unsaturatedFatContent: { '@id': 'schema:unsaturatedFatContent' }, + uploadDate: { '@id': 'schema:uploadDate', '@type': 'Date' }, + upvoteCount: { '@id': 'schema:upvoteCount' }, + url: { '@id': 'schema:url', '@type': '@id' }, + urlTemplate: { '@id': 'schema:urlTemplate' }, + usageInfo: { '@id': 'schema:usageInfo', '@type': '@id' }, + usedToDiagnose: { '@id': 'schema:usedToDiagnose' }, + userInteractionCount: { '@id': 'schema:userInteractionCount' }, + usesDevice: { '@id': 'schema:usesDevice' }, + usesHealthPlanIdStandard: { '@id': 'schema:usesHealthPlanIdStandard' }, + utterances: { '@id': 'schema:utterances' }, + validFor: { '@id': 'schema:validFor' }, + validFrom: { '@id': 'schema:validFrom', '@type': 'Date' }, + validIn: { '@id': 'schema:validIn' }, + validThrough: { '@id': 'schema:validThrough', '@type': 'Date' }, + validUntil: { '@id': 'schema:validUntil', '@type': 'Date' }, + value: { '@id': 'schema:value' }, + valueAddedTaxIncluded: { '@id': 'schema:valueAddedTaxIncluded' }, + valueMaxLength: { '@id': 'schema:valueMaxLength' }, + valueMinLength: { '@id': 'schema:valueMinLength' }, + valueName: { '@id': 'schema:valueName' }, + valuePattern: { '@id': 'schema:valuePattern' }, + valueReference: { '@id': 'schema:valueReference' }, + valueRequired: { '@id': 'schema:valueRequired' }, + variableMeasured: { '@id': 'schema:variableMeasured' }, + variablesMeasured: { '@id': 'schema:variablesMeasured' }, + variantCover: { '@id': 'schema:variantCover' }, + variesBy: { '@id': 'schema:variesBy' }, + vatID: { '@id': 'schema:vatID' }, + vehicleConfiguration: { '@id': 'schema:vehicleConfiguration' }, + vehicleEngine: { '@id': 'schema:vehicleEngine' }, + vehicleIdentificationNumber: { '@id': 'schema:vehicleIdentificationNumber' }, + vehicleInteriorColor: { '@id': 'schema:vehicleInteriorColor' }, + vehicleInteriorType: { '@id': 'schema:vehicleInteriorType' }, + vehicleModelDate: { '@id': 'schema:vehicleModelDate', '@type': 'Date' }, + vehicleSeatingCapacity: { '@id': 'schema:vehicleSeatingCapacity' }, + vehicleSpecialUsage: { '@id': 'schema:vehicleSpecialUsage' }, + vehicleTransmission: { '@id': 'schema:vehicleTransmission' }, + vendor: { '@id': 'schema:vendor' }, + verificationFactCheckingPolicy: { + '@id': 'schema:verificationFactCheckingPolicy', + '@type': '@id', + }, + version: { '@id': 'schema:version' }, + video: { '@id': 'schema:video' }, + videoFormat: { '@id': 'schema:videoFormat' }, + videoFrameSize: { '@id': 'schema:videoFrameSize' }, + videoQuality: { '@id': 'schema:videoQuality' }, + volumeNumber: { '@id': 'schema:volumeNumber' }, + warning: { '@id': 'schema:warning' }, + warranty: { '@id': 'schema:warranty' }, + warrantyPromise: { '@id': 'schema:warrantyPromise' }, + warrantyScope: { '@id': 'schema:warrantyScope' }, + webCheckinTime: { '@id': 'schema:webCheckinTime' }, + webFeed: { '@id': 'schema:webFeed', '@type': '@id' }, + weight: { '@id': 'schema:weight' }, + weightTotal: { '@id': 'schema:weightTotal' }, + wheelbase: { '@id': 'schema:wheelbase' }, + width: { '@id': 'schema:width' }, + winner: { '@id': 'schema:winner' }, + wordCount: { '@id': 'schema:wordCount' }, + workExample: { '@id': 'schema:workExample' }, + workFeatured: { '@id': 'schema:workFeatured' }, + workHours: { '@id': 'schema:workHours' }, + workLocation: { '@id': 'schema:workLocation' }, + workPerformed: { '@id': 'schema:workPerformed' }, + workPresented: { '@id': 'schema:workPresented' }, + workTranslation: { '@id': 'schema:workTranslation' }, + workload: { '@id': 'schema:workload' }, + worksFor: { '@id': 'schema:worksFor' }, + worstRating: { '@id': 'schema:worstRating' }, + xpath: { '@id': 'schema:xpath' }, + yearBuilt: { '@id': 'schema:yearBuilt' }, + yearlyRevenue: { '@id': 'schema:yearlyRevenue' }, + yearsInOperation: { '@id': 'schema:yearsInOperation' }, + yield: { '@id': 'schema:yield' }, + }, +} diff --git a/packages/core/src/modules/vc/__tests__/contexts/security_v1.ts b/packages/core/src/modules/vc/__tests__/contexts/security_v1.ts new file mode 100644 index 0000000000..070779f190 --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/contexts/security_v1.ts @@ -0,0 +1,47 @@ +export const SECURITY_V1 = { + '@context': { + id: '@id', + type: '@type', + dc: 'http://purl.org/dc/terms/', + sec: 'https://w3id.org/security#', + xsd: 'http://www.w3.org/2001/XMLSchema#', + EcdsaKoblitzSignature2016: 'sec:EcdsaKoblitzSignature2016', + Ed25519Signature2018: 'sec:Ed25519Signature2018', + EncryptedMessage: 'sec:EncryptedMessage', + GraphSignature2012: 'sec:GraphSignature2012', + LinkedDataSignature2015: 'sec:LinkedDataSignature2015', + LinkedDataSignature2016: 'sec:LinkedDataSignature2016', + CryptographicKey: 'sec:Key', + authenticationTag: 'sec:authenticationTag', + canonicalizationAlgorithm: 'sec:canonicalizationAlgorithm', + cipherAlgorithm: 'sec:cipherAlgorithm', + cipherData: 'sec:cipherData', + cipherKey: 'sec:cipherKey', + created: { '@id': 'dc:created', '@type': 'xsd:dateTime' }, + creator: { '@id': 'dc:creator', '@type': '@id' }, + digestAlgorithm: 'sec:digestAlgorithm', + digestValue: 'sec:digestValue', + domain: 'sec:domain', + encryptionKey: 'sec:encryptionKey', + expiration: { '@id': 'sec:expiration', '@type': 'xsd:dateTime' }, + expires: { '@id': 'sec:expiration', '@type': 'xsd:dateTime' }, + initializationVector: 'sec:initializationVector', + iterationCount: 'sec:iterationCount', + nonce: 'sec:nonce', + normalizationAlgorithm: 'sec:normalizationAlgorithm', + owner: { '@id': 'sec:owner', '@type': '@id' }, + password: 'sec:password', + privateKey: { '@id': 'sec:privateKey', '@type': '@id' }, + privateKeyPem: 'sec:privateKeyPem', + publicKey: { '@id': 'sec:publicKey', '@type': '@id' }, + publicKeyBase58: 'sec:publicKeyBase58', + publicKeyPem: 'sec:publicKeyPem', + publicKeyWif: 'sec:publicKeyWif', + publicKeyService: { '@id': 'sec:publicKeyService', '@type': '@id' }, + revoked: { '@id': 'sec:revoked', '@type': 'xsd:dateTime' }, + salt: 'sec:salt', + signature: 'sec:signature', + signatureAlgorithm: 'sec:signingAlgorithm', + signatureValue: 'sec:signatureValue', + }, +} diff --git a/packages/core/src/modules/vc/__tests__/contexts/security_v2.ts b/packages/core/src/modules/vc/__tests__/contexts/security_v2.ts new file mode 100644 index 0000000000..5da116cae1 --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/contexts/security_v2.ts @@ -0,0 +1,90 @@ +export const SECURITY_V2 = { + '@context': [ + { '@version': 1.1 }, + 'https://w3id.org/security/v1', + { + AesKeyWrappingKey2019: 'sec:AesKeyWrappingKey2019', + DeleteKeyOperation: 'sec:DeleteKeyOperation', + DeriveSecretOperation: 'sec:DeriveSecretOperation', + EcdsaSecp256k1Signature2019: 'sec:EcdsaSecp256k1Signature2019', + EcdsaSecp256r1Signature2019: 'sec:EcdsaSecp256r1Signature2019', + EcdsaSecp256k1VerificationKey2019: 'sec:EcdsaSecp256k1VerificationKey2019', + EcdsaSecp256r1VerificationKey2019: 'sec:EcdsaSecp256r1VerificationKey2019', + Ed25519Signature2018: 'sec:Ed25519Signature2018', + Ed25519VerificationKey2018: 'sec:Ed25519VerificationKey2018', + EquihashProof2018: 'sec:EquihashProof2018', + ExportKeyOperation: 'sec:ExportKeyOperation', + GenerateKeyOperation: 'sec:GenerateKeyOperation', + KmsOperation: 'sec:KmsOperation', + RevokeKeyOperation: 'sec:RevokeKeyOperation', + RsaSignature2018: 'sec:RsaSignature2018', + RsaVerificationKey2018: 'sec:RsaVerificationKey2018', + Sha256HmacKey2019: 'sec:Sha256HmacKey2019', + SignOperation: 'sec:SignOperation', + UnwrapKeyOperation: 'sec:UnwrapKeyOperation', + VerifyOperation: 'sec:VerifyOperation', + WrapKeyOperation: 'sec:WrapKeyOperation', + X25519KeyAgreementKey2019: 'sec:X25519KeyAgreementKey2019', + allowedAction: 'sec:allowedAction', + assertionMethod: { + '@id': 'sec:assertionMethod', + '@type': '@id', + '@container': '@set', + }, + authentication: { + '@id': 'sec:authenticationMethod', + '@type': '@id', + '@container': '@set', + }, + capability: { '@id': 'sec:capability', '@type': '@id' }, + capabilityAction: 'sec:capabilityAction', + capabilityChain: { + '@id': 'sec:capabilityChain', + '@type': '@id', + '@container': '@list', + }, + capabilityDelegation: { + '@id': 'sec:capabilityDelegationMethod', + '@type': '@id', + '@container': '@set', + }, + capabilityInvocation: { + '@id': 'sec:capabilityInvocationMethod', + '@type': '@id', + '@container': '@set', + }, + caveat: { '@id': 'sec:caveat', '@type': '@id', '@container': '@set' }, + challenge: 'sec:challenge', + ciphertext: 'sec:ciphertext', + controller: { '@id': 'sec:controller', '@type': '@id' }, + delegator: { '@id': 'sec:delegator', '@type': '@id' }, + equihashParameterK: { + '@id': 'sec:equihashParameterK', + '@type': 'xsd:integer', + }, + equihashParameterN: { + '@id': 'sec:equihashParameterN', + '@type': 'xsd:integer', + }, + invocationTarget: { '@id': 'sec:invocationTarget', '@type': '@id' }, + invoker: { '@id': 'sec:invoker', '@type': '@id' }, + jws: 'sec:jws', + keyAgreement: { + '@id': 'sec:keyAgreementMethod', + '@type': '@id', + '@container': '@set', + }, + kmsModule: { '@id': 'sec:kmsModule' }, + parentCapability: { '@id': 'sec:parentCapability', '@type': '@id' }, + plaintext: 'sec:plaintext', + proof: { '@id': 'sec:proof', '@type': '@id', '@container': '@graph' }, + proofPurpose: { '@id': 'sec:proofPurpose', '@type': '@vocab' }, + proofValue: 'sec:proofValue', + referenceId: 'sec:referenceId', + unwrappedKey: 'sec:unwrappedKey', + verificationMethod: { '@id': 'sec:verificationMethod', '@type': '@id' }, + verifyData: 'sec:verifyData', + wrappedKey: 'sec:wrappedKey', + }, + ], +} diff --git a/packages/core/src/modules/vc/__tests__/contexts/security_v3_unstable.ts b/packages/core/src/modules/vc/__tests__/contexts/security_v3_unstable.ts new file mode 100644 index 0000000000..e24d51defe --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/contexts/security_v3_unstable.ts @@ -0,0 +1,680 @@ +export const SECURITY_V3_UNSTABLE = { + '@context': [ + { + '@version': 1.1, + id: '@id', + type: '@type', + '@protected': true, + JsonWebKey2020: { '@id': 'https://w3id.org/security#JsonWebKey2020' }, + JsonWebSignature2020: { + '@id': 'https://w3id.org/security#JsonWebSignature2020', + '@context': { + '@version': 1.1, + id: '@id', + type: '@type', + '@protected': true, + challenge: 'https://w3id.org/security#challenge', + created: { + '@id': 'http://purl.org/dc/terms/created', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + domain: 'https://w3id.org/security#domain', + expires: { + '@id': 'https://w3id.org/security#expiration', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + jws: 'https://w3id.org/security#jws', + nonce: 'https://w3id.org/security#nonce', + proofPurpose: { + '@id': 'https://w3id.org/security#proofPurpose', + '@type': '@vocab', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + assertionMethod: { + '@id': 'https://w3id.org/security#assertionMethod', + '@type': '@id', + '@container': '@set', + }, + authentication: { + '@id': 'https://w3id.org/security#authenticationMethod', + '@type': '@id', + '@container': '@set', + }, + capabilityInvocation: { + '@id': 'https://w3id.org/security#capabilityInvocationMethod', + '@type': '@id', + '@container': '@set', + }, + capabilityDelegation: { + '@id': 'https://w3id.org/security#capabilityDelegationMethod', + '@type': '@id', + '@container': '@set', + }, + keyAgreement: { + '@id': 'https://w3id.org/security#keyAgreementMethod', + '@type': '@id', + '@container': '@set', + }, + }, + }, + verificationMethod: { + '@id': 'https://w3id.org/security#verificationMethod', + '@type': '@id', + }, + }, + }, + Ed25519VerificationKey2020: { + '@id': 'https://w3id.org/security#Ed25519VerificationKey2020', + }, + Ed25519Signature2020: { + '@id': 'https://w3id.org/security#Ed25519Signature2020', + '@context': { + '@protected': true, + id: '@id', + type: '@type', + challenge: 'https://w3id.org/security#challenge', + created: { + '@id': 'http://purl.org/dc/terms/created', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + domain: 'https://w3id.org/security#domain', + expires: { + '@id': 'https://w3id.org/security#expiration', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + nonce: 'https://w3id.org/security#nonce', + proofPurpose: { + '@id': 'https://w3id.org/security#proofPurpose', + '@type': '@vocab', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + assertionMethod: { + '@id': 'https://w3id.org/security#assertionMethod', + '@type': '@id', + '@container': '@set', + }, + authentication: { + '@id': 'https://w3id.org/security#authenticationMethod', + '@type': '@id', + '@container': '@set', + }, + capabilityInvocation: { + '@id': 'https://w3id.org/security#capabilityInvocationMethod', + '@type': '@id', + '@container': '@set', + }, + capabilityDelegation: { + '@id': 'https://w3id.org/security#capabilityDelegationMethod', + '@type': '@id', + '@container': '@set', + }, + keyAgreement: { + '@id': 'https://w3id.org/security#keyAgreementMethod', + '@type': '@id', + '@container': '@set', + }, + }, + }, + proofValue: { + '@id': 'https://w3id.org/security#proofValue', + '@type': 'https://w3id.org/security#multibase', + }, + verificationMethod: { + '@id': 'https://w3id.org/security#verificationMethod', + '@type': '@id', + }, + }, + }, + publicKeyJwk: { + '@id': 'https://w3id.org/security#publicKeyJwk', + '@type': '@json', + }, + ethereumAddress: { '@id': 'https://w3id.org/security#ethereumAddress' }, + publicKeyHex: { '@id': 'https://w3id.org/security#publicKeyHex' }, + blockchainAccountId: { + '@id': 'https://w3id.org/security#blockchainAccountId', + }, + MerkleProof2019: { '@id': 'https://w3id.org/security#MerkleProof2019' }, + Bls12381G1Key2020: { '@id': 'https://w3id.org/security#Bls12381G1Key2020' }, + Bls12381G2Key2020: { '@id': 'https://w3id.org/security#Bls12381G2Key2020' }, + BbsBlsSignature2020: { + '@id': 'https://w3id.org/security#BbsBlsSignature2020', + '@context': { + '@protected': true, + id: '@id', + type: '@type', + challenge: 'https://w3id.org/security#challenge', + created: { + '@id': 'http://purl.org/dc/terms/created', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + domain: 'https://w3id.org/security#domain', + nonce: 'https://w3id.org/security#nonce', + proofPurpose: { + '@id': 'https://w3id.org/security#proofPurpose', + '@type': '@vocab', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + assertionMethod: { + '@id': 'https://w3id.org/security#assertionMethod', + '@type': '@id', + '@container': '@set', + }, + authentication: { + '@id': 'https://w3id.org/security#authenticationMethod', + '@type': '@id', + '@container': '@set', + }, + capabilityInvocation: { + '@id': 'https://w3id.org/security#capabilityInvocationMethod', + '@type': '@id', + '@container': '@set', + }, + capabilityDelegation: { + '@id': 'https://w3id.org/security#capabilityDelegationMethod', + '@type': '@id', + '@container': '@set', + }, + keyAgreement: { + '@id': 'https://w3id.org/security#keyAgreementMethod', + '@type': '@id', + '@container': '@set', + }, + }, + }, + proofValue: 'https://w3id.org/security#proofValue', + verificationMethod: { + '@id': 'https://w3id.org/security#verificationMethod', + '@type': '@id', + }, + }, + }, + BbsBlsSignatureProof2020: { + '@id': 'https://w3id.org/security#BbsBlsSignatureProof2020', + '@context': { + '@protected': true, + id: '@id', + type: '@type', + challenge: 'https://w3id.org/security#challenge', + created: { + '@id': 'http://purl.org/dc/terms/created', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + domain: 'https://w3id.org/security#domain', + nonce: 'https://w3id.org/security#nonce', + proofPurpose: { + '@id': 'https://w3id.org/security#proofPurpose', + '@type': '@vocab', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + assertionMethod: { + '@id': 'https://w3id.org/security#assertionMethod', + '@type': '@id', + '@container': '@set', + }, + authentication: { + '@id': 'https://w3id.org/security#authenticationMethod', + '@type': '@id', + '@container': '@set', + }, + capabilityInvocation: { + '@id': 'https://w3id.org/security#capabilityInvocationMethod', + '@type': '@id', + '@container': '@set', + }, + capabilityDelegation: { + '@id': 'https://w3id.org/security#capabilityDelegationMethod', + '@type': '@id', + '@container': '@set', + }, + keyAgreement: { + '@id': 'https://w3id.org/security#keyAgreementMethod', + '@type': '@id', + '@container': '@set', + }, + }, + }, + proofValue: 'https://w3id.org/security#proofValue', + verificationMethod: { + '@id': 'https://w3id.org/security#verificationMethod', + '@type': '@id', + }, + }, + }, + EcdsaKoblitzSignature2016: 'https://w3id.org/security#EcdsaKoblitzSignature2016', + Ed25519Signature2018: { + '@id': 'https://w3id.org/security#Ed25519Signature2018', + '@context': { + '@protected': true, + id: '@id', + type: '@type', + challenge: 'https://w3id.org/security#challenge', + created: { + '@id': 'http://purl.org/dc/terms/created', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + domain: 'https://w3id.org/security#domain', + expires: { + '@id': 'https://w3id.org/security#expiration', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + jws: 'https://w3id.org/security#jws', + nonce: 'https://w3id.org/security#nonce', + proofPurpose: { + '@id': 'https://w3id.org/security#proofPurpose', + '@type': '@vocab', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + assertionMethod: { + '@id': 'https://w3id.org/security#assertionMethod', + '@type': '@id', + '@container': '@set', + }, + authentication: { + '@id': 'https://w3id.org/security#authenticationMethod', + '@type': '@id', + '@container': '@set', + }, + capabilityInvocation: { + '@id': 'https://w3id.org/security#capabilityInvocationMethod', + '@type': '@id', + '@container': '@set', + }, + capabilityDelegation: { + '@id': 'https://w3id.org/security#capabilityDelegationMethod', + '@type': '@id', + '@container': '@set', + }, + keyAgreement: { + '@id': 'https://w3id.org/security#keyAgreementMethod', + '@type': '@id', + '@container': '@set', + }, + }, + }, + proofValue: 'https://w3id.org/security#proofValue', + verificationMethod: { + '@id': 'https://w3id.org/security#verificationMethod', + '@type': '@id', + }, + }, + }, + EncryptedMessage: 'https://w3id.org/security#EncryptedMessage', + GraphSignature2012: 'https://w3id.org/security#GraphSignature2012', + LinkedDataSignature2015: 'https://w3id.org/security#LinkedDataSignature2015', + LinkedDataSignature2016: 'https://w3id.org/security#LinkedDataSignature2016', + CryptographicKey: 'https://w3id.org/security#Key', + authenticationTag: 'https://w3id.org/security#authenticationTag', + canonicalizationAlgorithm: 'https://w3id.org/security#canonicalizationAlgorithm', + cipherAlgorithm: 'https://w3id.org/security#cipherAlgorithm', + cipherData: 'https://w3id.org/security#cipherData', + cipherKey: 'https://w3id.org/security#cipherKey', + created: { + '@id': 'http://purl.org/dc/terms/created', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + creator: { '@id': 'http://purl.org/dc/terms/creator', '@type': '@id' }, + digestAlgorithm: 'https://w3id.org/security#digestAlgorithm', + digestValue: 'https://w3id.org/security#digestValue', + domain: 'https://w3id.org/security#domain', + encryptionKey: 'https://w3id.org/security#encryptionKey', + expiration: { + '@id': 'https://w3id.org/security#expiration', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + expires: { + '@id': 'https://w3id.org/security#expiration', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + initializationVector: 'https://w3id.org/security#initializationVector', + iterationCount: 'https://w3id.org/security#iterationCount', + nonce: 'https://w3id.org/security#nonce', + normalizationAlgorithm: 'https://w3id.org/security#normalizationAlgorithm', + owner: 'https://w3id.org/security#owner', + password: 'https://w3id.org/security#password', + privateKey: 'https://w3id.org/security#privateKey', + privateKeyPem: 'https://w3id.org/security#privateKeyPem', + publicKey: 'https://w3id.org/security#publicKey', + publicKeyBase58: 'https://w3id.org/security#publicKeyBase58', + publicKeyPem: 'https://w3id.org/security#publicKeyPem', + publicKeyWif: 'https://w3id.org/security#publicKeyWif', + publicKeyService: 'https://w3id.org/security#publicKeyService', + revoked: { + '@id': 'https://w3id.org/security#revoked', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + salt: 'https://w3id.org/security#salt', + signature: 'https://w3id.org/security#signature', + signatureAlgorithm: 'https://w3id.org/security#signingAlgorithm', + signatureValue: 'https://w3id.org/security#signatureValue', + proofValue: 'https://w3id.org/security#proofValue', + AesKeyWrappingKey2019: 'https://w3id.org/security#AesKeyWrappingKey2019', + DeleteKeyOperation: 'https://w3id.org/security#DeleteKeyOperation', + DeriveSecretOperation: 'https://w3id.org/security#DeriveSecretOperation', + EcdsaSecp256k1Signature2019: { + '@id': 'https://w3id.org/security#EcdsaSecp256k1Signature2019', + '@context': { + '@protected': true, + id: '@id', + type: '@type', + challenge: 'https://w3id.org/security#challenge', + created: { + '@id': 'http://purl.org/dc/terms/created', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + domain: 'https://w3id.org/security#domain', + expires: { + '@id': 'https://w3id.org/security#expiration', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + jws: 'https://w3id.org/security#jws', + nonce: 'https://w3id.org/security#nonce', + proofPurpose: { + '@id': 'https://w3id.org/security#proofPurpose', + '@type': '@vocab', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + assertionMethod: { + '@id': 'https://w3id.org/security#assertionMethod', + '@type': '@id', + '@container': '@set', + }, + authentication: { + '@id': 'https://w3id.org/security#authenticationMethod', + '@type': '@id', + '@container': '@set', + }, + capabilityInvocation: { + '@id': 'https://w3id.org/security#capabilityInvocationMethod', + '@type': '@id', + '@container': '@set', + }, + capabilityDelegation: { + '@id': 'https://w3id.org/security#capabilityDelegationMethod', + '@type': '@id', + '@container': '@set', + }, + keyAgreement: { + '@id': 'https://w3id.org/security#keyAgreementMethod', + '@type': '@id', + '@container': '@set', + }, + }, + }, + proofValue: 'https://w3id.org/security#proofValue', + verificationMethod: { + '@id': 'https://w3id.org/security#verificationMethod', + '@type': '@id', + }, + }, + }, + EcdsaSecp256r1Signature2019: { + '@id': 'https://w3id.org/security#EcdsaSecp256r1Signature2019', + '@context': { + '@protected': true, + id: '@id', + type: '@type', + challenge: 'https://w3id.org/security#challenge', + created: { + '@id': 'http://purl.org/dc/terms/created', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + domain: 'https://w3id.org/security#domain', + expires: { + '@id': 'https://w3id.org/security#expiration', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + jws: 'https://w3id.org/security#jws', + nonce: 'https://w3id.org/security#nonce', + proofPurpose: { + '@id': 'https://w3id.org/security#proofPurpose', + '@type': '@vocab', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + assertionMethod: { + '@id': 'https://w3id.org/security#assertionMethod', + '@type': '@id', + '@container': '@set', + }, + authentication: { + '@id': 'https://w3id.org/security#authenticationMethod', + '@type': '@id', + '@container': '@set', + }, + capabilityInvocation: { + '@id': 'https://w3id.org/security#capabilityInvocationMethod', + '@type': '@id', + '@container': '@set', + }, + capabilityDelegation: { + '@id': 'https://w3id.org/security#capabilityDelegationMethod', + '@type': '@id', + '@container': '@set', + }, + keyAgreement: { + '@id': 'https://w3id.org/security#keyAgreementMethod', + '@type': '@id', + '@container': '@set', + }, + }, + }, + proofValue: 'https://w3id.org/security#proofValue', + verificationMethod: { + '@id': 'https://w3id.org/security#verificationMethod', + '@type': '@id', + }, + }, + }, + EcdsaSecp256k1VerificationKey2019: 'https://w3id.org/security#EcdsaSecp256k1VerificationKey2019', + EcdsaSecp256r1VerificationKey2019: 'https://w3id.org/security#EcdsaSecp256r1VerificationKey2019', + Ed25519VerificationKey2018: 'https://w3id.org/security#Ed25519VerificationKey2018', + EquihashProof2018: 'https://w3id.org/security#EquihashProof2018', + ExportKeyOperation: 'https://w3id.org/security#ExportKeyOperation', + GenerateKeyOperation: 'https://w3id.org/security#GenerateKeyOperation', + KmsOperation: 'https://w3id.org/security#KmsOperation', + RevokeKeyOperation: 'https://w3id.org/security#RevokeKeyOperation', + RsaSignature2018: { + '@id': 'https://w3id.org/security#RsaSignature2018', + '@context': { + '@protected': true, + challenge: 'https://w3id.org/security#challenge', + created: { + '@id': 'http://purl.org/dc/terms/created', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + domain: 'https://w3id.org/security#domain', + expires: { + '@id': 'https://w3id.org/security#expiration', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + jws: 'https://w3id.org/security#jws', + nonce: 'https://w3id.org/security#nonce', + proofPurpose: { + '@id': 'https://w3id.org/security#proofPurpose', + '@type': '@vocab', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + assertionMethod: { + '@id': 'https://w3id.org/security#assertionMethod', + '@type': '@id', + '@container': '@set', + }, + authentication: { + '@id': 'https://w3id.org/security#authenticationMethod', + '@type': '@id', + '@container': '@set', + }, + capabilityInvocation: { + '@id': 'https://w3id.org/security#capabilityInvocationMethod', + '@type': '@id', + '@container': '@set', + }, + capabilityDelegation: { + '@id': 'https://w3id.org/security#capabilityDelegationMethod', + '@type': '@id', + '@container': '@set', + }, + keyAgreement: { + '@id': 'https://w3id.org/security#keyAgreementMethod', + '@type': '@id', + '@container': '@set', + }, + }, + }, + proofValue: 'https://w3id.org/security#proofValue', + verificationMethod: { + '@id': 'https://w3id.org/security#verificationMethod', + '@type': '@id', + }, + }, + }, + RsaVerificationKey2018: 'https://w3id.org/security#RsaVerificationKey2018', + Sha256HmacKey2019: 'https://w3id.org/security#Sha256HmacKey2019', + SignOperation: 'https://w3id.org/security#SignOperation', + UnwrapKeyOperation: 'https://w3id.org/security#UnwrapKeyOperation', + VerifyOperation: 'https://w3id.org/security#VerifyOperation', + WrapKeyOperation: 'https://w3id.org/security#WrapKeyOperation', + X25519KeyAgreementKey2019: 'https://w3id.org/security#X25519KeyAgreementKey2019', + allowedAction: 'https://w3id.org/security#allowedAction', + assertionMethod: { + '@id': 'https://w3id.org/security#assertionMethod', + '@type': '@id', + '@container': '@set', + }, + authentication: { + '@id': 'https://w3id.org/security#authenticationMethod', + '@type': '@id', + '@container': '@set', + }, + capability: { + '@id': 'https://w3id.org/security#capability', + '@type': '@id', + }, + capabilityAction: 'https://w3id.org/security#capabilityAction', + capabilityChain: { + '@id': 'https://w3id.org/security#capabilityChain', + '@type': '@id', + '@container': '@list', + }, + capabilityDelegation: { + '@id': 'https://w3id.org/security#capabilityDelegationMethod', + '@type': '@id', + '@container': '@set', + }, + capabilityInvocation: { + '@id': 'https://w3id.org/security#capabilityInvocationMethod', + '@type': '@id', + '@container': '@set', + }, + caveat: { + '@id': 'https://w3id.org/security#caveat', + '@type': '@id', + '@container': '@set', + }, + challenge: 'https://w3id.org/security#challenge', + ciphertext: 'https://w3id.org/security#ciphertext', + controller: { + '@id': 'https://w3id.org/security#controller', + '@type': '@id', + }, + delegator: { '@id': 'https://w3id.org/security#delegator', '@type': '@id' }, + equihashParameterK: { + '@id': 'https://w3id.org/security#equihashParameterK', + '@type': 'http://www.w3.org/2001/XMLSchema#:integer', + }, + equihashParameterN: { + '@id': 'https://w3id.org/security#equihashParameterN', + '@type': 'http://www.w3.org/2001/XMLSchema#:integer', + }, + invocationTarget: { + '@id': 'https://w3id.org/security#invocationTarget', + '@type': '@id', + }, + invoker: { '@id': 'https://w3id.org/security#invoker', '@type': '@id' }, + jws: 'https://w3id.org/security#jws', + keyAgreement: { + '@id': 'https://w3id.org/security#keyAgreementMethod', + '@type': '@id', + '@container': '@set', + }, + kmsModule: { '@id': 'https://w3id.org/security#kmsModule' }, + parentCapability: { + '@id': 'https://w3id.org/security#parentCapability', + '@type': '@id', + }, + plaintext: 'https://w3id.org/security#plaintext', + proof: { + '@id': 'https://w3id.org/security#proof', + '@type': '@id', + '@container': '@graph', + }, + proofPurpose: { + '@id': 'https://w3id.org/security#proofPurpose', + '@type': '@vocab', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + assertionMethod: { + '@id': 'https://w3id.org/security#assertionMethod', + '@type': '@id', + '@container': '@set', + }, + authentication: { + '@id': 'https://w3id.org/security#authenticationMethod', + '@type': '@id', + '@container': '@set', + }, + capabilityInvocation: { + '@id': 'https://w3id.org/security#capabilityInvocationMethod', + '@type': '@id', + '@container': '@set', + }, + capabilityDelegation: { + '@id': 'https://w3id.org/security#capabilityDelegationMethod', + '@type': '@id', + '@container': '@set', + }, + keyAgreement: { + '@id': 'https://w3id.org/security#keyAgreementMethod', + '@type': '@id', + '@container': '@set', + }, + }, + }, + referenceId: 'https://w3id.org/security#referenceId', + unwrappedKey: 'https://w3id.org/security#unwrappedKey', + verificationMethod: { + '@id': 'https://w3id.org/security#verificationMethod', + '@type': '@id', + }, + verifyData: 'https://w3id.org/security#verifyData', + wrappedKey: 'https://w3id.org/security#wrappedKey', + }, + ], +} diff --git a/packages/core/src/modules/vc/__tests__/contexts/vaccination_v1.ts b/packages/core/src/modules/vc/__tests__/contexts/vaccination_v1.ts new file mode 100644 index 0000000000..ce7d65f499 --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/contexts/vaccination_v1.ts @@ -0,0 +1,88 @@ +export const VACCINATION_V1 = { + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + description: 'http://schema.org/description', + identifier: 'http://schema.org/identifier', + name: 'http://schema.org/name', + image: 'http://schema.org/image', + VaccinationCertificate: { + '@id': 'https://w3id.org/vaccination#VaccinationCertificate', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + description: 'http://schema.org/description', + identifier: 'http://schema.org/identifier', + name: 'http://schema.org/name', + image: 'http://schema.org/image', + }, + }, + VaccinationEvent: { + '@id': 'https://w3id.org/vaccination#VaccinationEvent', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + administeringCentre: 'https://w3id.org/vaccination#administeringCentre', + batchNumber: 'https://w3id.org/vaccination#batchNumber', + countryOfVaccination: 'https://w3id.org/vaccination#countryOfVaccination', + dateOfVaccination: { + '@id': 'https://w3id.org/vaccination#dateOfVaccination', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + healthProfessional: 'https://w3id.org/vaccination#healthProfessional', + nextVaccinationDate: { + '@id': 'https://w3id.org/vaccination#nextVaccinationDate', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + order: 'https://w3id.org/vaccination#order', + recipient: { + '@id': 'https://w3id.org/vaccination#recipient', + '@type': 'https://w3id.org/vaccination#VaccineRecipient', + }, + vaccine: { + '@id': 'https://w3id.org/vaccination#VaccineEventVaccine', + '@type': 'https://w3id.org/vaccination#Vaccine', + }, + }, + }, + VaccineRecipient: { + '@id': 'https://w3id.org/vaccination#VaccineRecipient', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + birthDate: { + '@id': 'http://schema.org/birthDate', + '@type': 'http://www.w3.org/2001/XMLSchema#dateTime', + }, + familyName: 'http://schema.org/familyName', + gender: 'http://schema.org/gender', + givenName: 'http://schema.org/givenName', + }, + }, + Vaccine: { + '@id': 'https://w3id.org/vaccination#Vaccine', + '@context': { + '@version': 1.1, + '@protected': true, + id: '@id', + type: '@type', + atcCode: 'https://w3id.org/vaccination#atc-code', + disease: 'https://w3id.org/vaccination#disease', + event: { + '@id': 'https://w3id.org/vaccination#VaccineRecipientVaccineEvent', + '@type': 'https://w3id.org/vaccination#VaccineEvent', + }, + marketingAuthorizationHolder: 'https://w3id.org/vaccination#marketingAuthorizationHolder', + medicinalProductName: 'https://w3id.org/vaccination#medicinalProductName', + }, + }, + }, +} diff --git a/packages/core/src/modules/vc/__tests__/dids/did_example_489398593.ts b/packages/core/src/modules/vc/__tests__/dids/did_example_489398593.ts new file mode 100644 index 0000000000..9cee4d0e2c --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/dids/did_example_489398593.ts @@ -0,0 +1,13 @@ +export const DID_EXAMPLE_48939859 = { + '@context': 'https://www.w3.org/ns/did/v1', + id: 'did:example:489398593', + assertionMethod: [ + { + id: 'did:example:489398593#test', + type: 'Bls12381G2Key2020', + controller: 'did:example:489398593', + publicKeyBase58: + 'oqpWYKaZD9M1Kbe94BVXpr8WTdFBNZyKv48cziTiQUeuhm7sBhCABMyYG4kcMrseC68YTFFgyhiNeBKjzdKk9MiRWuLv5H4FFujQsQK2KTAtzU8qTBiZqBHMmnLF4PL7Ytu', + }, + ], +} diff --git a/packages/core/src/modules/vc/__tests__/dids/did_sov_QqEfJxe752NCmWqR5TssZ5.ts b/packages/core/src/modules/vc/__tests__/dids/did_sov_QqEfJxe752NCmWqR5TssZ5.ts new file mode 100644 index 0000000000..0246796da6 --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/dids/did_sov_QqEfJxe752NCmWqR5TssZ5.ts @@ -0,0 +1,24 @@ +export const DID_SOV_QqEfJxe752NCmWqR5TssZ5 = { + '@context': 'https://www.w3.org/ns/did/v1', + id: 'did:sov:QqEfJxe752NCmWqR5TssZ5', + verificationMethod: [ + { + id: 'did:sov:QqEfJxe752NCmWqR5TssZ5#key-1', + type: 'Ed25519VerificationKey2018', + controller: 'did:sov:QqEfJxe752NCmWqR5TssZ5', + publicKeyBase58: 'DzNC1pbarUzgGXmxRsccNJDBjWgCaiy6uSXgPPJZGWCL', + }, + ], + authentication: ['did:sov:QqEfJxe752NCmWqR5TssZ5#key-1'], + assertionMethod: ['did:sov:QqEfJxe752NCmWqR5TssZ5#key-1'], + service: [ + { + id: 'did:sov:QqEfJxe752NCmWqR5TssZ5#did-communication', + type: 'did-communication', + serviceEndpoint: 'http://localhost:3002', + recipientKeys: ['did:sov:QqEfJxe752NCmWqR5TssZ5#key-1'], + routingKeys: [], + priority: 0, + }, + ], +} diff --git a/packages/core/src/modules/vc/__tests__/dids/did_z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL.ts b/packages/core/src/modules/vc/__tests__/dids/did_z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL.ts new file mode 100644 index 0000000000..f3bb1e0b1d --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/dids/did_z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL.ts @@ -0,0 +1,45 @@ +export const DID_z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL = { + '@context': [ + 'https://w3id.org/did/v1', + 'https://w3id.org/security/suites/ed25519-2018/v1', + 'https://w3id.org/security/suites/x25519-2019/v1', + ], + alsoKnownAs: [], + controller: [], + verificationMethod: [ + { + id: 'did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL', + type: 'Ed25519VerificationKey2018', + controller: 'did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL', + publicKeyBase58: '3Dn1SJNPaCXcvvJvSbsFWP2xaCjMom3can8CQNhWrTRx', + }, + ], + service: [], + authentication: [ + 'did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL', + ], + assertionMethod: [ + 'did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL', + ], + keyAgreement: [ + { + id: 'did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL', + type: 'Ed25519VerificationKey2018', + controller: 'did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL', + publicKeyBase58: '3Dn1SJNPaCXcvvJvSbsFWP2xaCjMom3can8CQNhWrTRx', + }, + { + id: 'did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6LSbkodSr6SU2trs8VUgnrnWtSm7BAPG245ggrBmSrxbv1R', + type: 'X25519KeyAgreementKey2019', + controller: 'did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL', + publicKeyBase58: '5dTvYHaNaB7mk7iA9LqCJEHG2dGZQsvoi8WGzDRtYEf', + }, + ], + capabilityInvocation: [ + 'did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL', + ], + capabilityDelegation: [ + 'did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL', + ], + id: 'did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL', +} diff --git a/packages/core/src/modules/vc/__tests__/dids/did_z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV.ts b/packages/core/src/modules/vc/__tests__/dids/did_z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV.ts new file mode 100644 index 0000000000..2c8d443940 --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/dids/did_z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV.ts @@ -0,0 +1,45 @@ +export const DID_z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV = { + '@context': [ + 'https://w3id.org/did/v1', + 'https://w3id.org/security/suites/ed25519-2018/v1', + 'https://w3id.org/security/suites/x25519-2019/v1', + ], + alsoKnownAs: [], + controller: [], + verificationMethod: [ + { + id: 'did:key:z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV#z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV', + type: 'Ed25519VerificationKey2018', + controller: 'did:key:z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV', + publicKeyBase58: 'HC8vuuvP8x9kVJizh2eujQjo2JwFQJz6w63szzdbu1Q7', + }, + ], + service: [], + authentication: [ + 'did:key:z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV#z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV', + ], + assertionMethod: [ + 'did:key:z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV#z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV', + ], + keyAgreement: [ + { + id: 'did:key:z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV#z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV', + type: 'Ed25519VerificationKey2018', + controller: 'did:key:z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV', + publicKeyBase58: 'HC8vuuvP8x9kVJizh2eujQjo2JwFQJz6w63szzdbu1Q7', + }, + { + id: 'did:key:z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV#z6LSsJwtXqeVHCtCR9QMyX58hfBNY62wQooE4VPYmwyyesov', + type: 'X25519KeyAgreementKey2019', + controller: 'did:key:z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV', + publicKeyBase58: 'Gdmj1XqdBkATKm2bSsZBP4xtgwVpiCd5BWfsHVLSwW3A', + }, + ], + capabilityInvocation: [ + 'did:key:z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV#z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV', + ], + capabilityDelegation: [ + 'did:key:z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV#z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV', + ], + id: 'did:key:z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV', +} diff --git a/packages/core/src/modules/vc/__tests__/dids/did_zUC729nNiUKQ4pHHNYovae25gkkuvtsZmtpjnLYUj1r8Yd4ZRn3FaswicUWs2NYNuWXxQ7MgzAX7dqXxAFZXFvn2jhqGKpjm5xLwESYfhcDGdSrc9mgfu51w939BjmKmng5HvYK.ts b/packages/core/src/modules/vc/__tests__/dids/did_zUC729nNiUKQ4pHHNYovae25gkkuvtsZmtpjnLYUj1r8Yd4ZRn3FaswicUWs2NYNuWXxQ7MgzAX7dqXxAFZXFvn2jhqGKpjm5xLwESYfhcDGdSrc9mgfu51w939BjmKmng5HvYK.ts new file mode 100644 index 0000000000..46ae84b94e --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/dids/did_zUC729nNiUKQ4pHHNYovae25gkkuvtsZmtpjnLYUj1r8Yd4ZRn3FaswicUWs2NYNuWXxQ7MgzAX7dqXxAFZXFvn2jhqGKpjm5xLwESYfhcDGdSrc9mgfu51w939BjmKmng5HvYK.ts @@ -0,0 +1,30 @@ +export const DID_zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4 = + { + '@context': ['https://www.w3.org/ns/did/v1', 'https://w3id.org/security/suites/jws-2020/v1'], + id: 'did:key:zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4', + verificationMethod: [ + { + id: 'did:key:zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4#zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4', + type: 'JsonWebKey2020', + controller: + 'did:key:zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4', + publicKeyJwk: { + kty: 'EC', + crv: 'BLS12381_G2', + x: 'rvmIn58iMglCOixwxv7snWjuu8ooQteghivgqrchuIDH8DbG7pzF5io_k2t5HOW1DjcsVioEXLnIdSdUz8jJQq2r-B8zyw4CEiWAM9LUPnmmRDeVFVtA0YVaLo7DdkOn', + }, + }, + ], + assertionMethod: [ + 'did:key:zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4#zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4', + ], + authentication: [ + 'did:key:zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4#zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4', + ], + capabilityInvocation: [ + 'did:key:zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4#zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4', + ], + capabilityDelegation: [ + 'did:key:zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4#zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4', + ], + } diff --git a/packages/core/src/modules/vc/__tests__/dids/did_zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa.ts b/packages/core/src/modules/vc/__tests__/dids/did_zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa.ts new file mode 100644 index 0000000000..472bc1e84c --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/dids/did_zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa.ts @@ -0,0 +1,54 @@ +export const DID_zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa = + { + '@context': ['https://w3id.org/did/v1', 'https://w3id.org/security/bbs/v1'], + alsoKnownAs: [], + controller: [], + verificationMethod: [ + { + id: 'did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa#zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa', + type: 'Bls12381G2Key2020', + controller: + 'did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa', + publicKeyBase58: + 'nZZe9Nizhaz9JGpgjysaNkWGg5TNEhpib5j6WjTUHJ5K46dedUrZ57PUFZBq9Xckv8mFJjx6G6Vvj2rPspq22BagdADEEEy2F8AVLE1DhuwWC5vHFa4fUhUwxMkH7B6joqG', + publicKeyBase64: undefined, + publicKeyJwk: undefined, + publicKeyHex: undefined, + publicKeyMultibase: undefined, + publicKeyPem: undefined, + blockchainAccountId: undefined, + ethereumAddress: undefined, + }, + ], + service: [], + authentication: [ + 'did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa#zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa', + ], + assertionMethod: [ + 'did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa#zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa', + ], + keyAgreement: [ + { + id: 'did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa#zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa', + type: 'Bls12381G2Key2020', + controller: + 'did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa', + publicKeyBase58: + 'nZZe9Nizhaz9JGpgjysaNkWGg5TNEhpib5j6WjTUHJ5K46dedUrZ57PUFZBq9Xckv8mFJjx6G6Vvj2rPspq22BagdADEEEy2F8AVLE1DhuwWC5vHFa4fUhUwxMkH7B6joqG', + publicKeyBase64: undefined, + publicKeyJwk: undefined, + publicKeyHex: undefined, + publicKeyMultibase: undefined, + publicKeyPem: undefined, + blockchainAccountId: undefined, + ethereumAddress: undefined, + }, + ], + capabilityInvocation: [ + 'did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa#zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa', + ], + capabilityDelegation: [ + 'did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa#zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa', + ], + id: 'did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa', + } diff --git a/packages/core/src/modules/vc/__tests__/dids/did_zUC72to2eJiFMrt8a89LoaEPHC76QcfAxQdFys3nFGCmDKAmLbdE4ByyQ54kh42XgECCyZfVKe3m41Kk35nzrBKYbk6s9K7EjyLJcGGPkA7N15tDNBQJaY7cHD4RRaTwF6qXpmD.ts b/packages/core/src/modules/vc/__tests__/dids/did_zUC72to2eJiFMrt8a89LoaEPHC76QcfAxQdFys3nFGCmDKAmLbdE4ByyQ54kh42XgECCyZfVKe3m41Kk35nzrBKYbk6s9K7EjyLJcGGPkA7N15tDNBQJaY7cHD4RRaTwF6qXpmD.ts new file mode 100644 index 0000000000..968aec92bc --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/dids/did_zUC72to2eJiFMrt8a89LoaEPHC76QcfAxQdFys3nFGCmDKAmLbdE4ByyQ54kh42XgECCyZfVKe3m41Kk35nzrBKYbk6s9K7EjyLJcGGPkA7N15tDNBQJaY7cHD4RRaTwF6qXpmD.ts @@ -0,0 +1,30 @@ +export const DID_zUC72to2eJiFMrt8a89LoaEPHC76QcfAxQdFys3nFGCmDKAmLbdE4ByyQ54kh42XgECCyZfVKe3m41Kk35nzrBKYbk6s9K7EjyLJcGGPkA7N15tDNBQJaY7cHD4RRaTwF6qXpmD = + { + '@context': ['https://www.w3.org/ns/did/v1', 'https://w3id.org/security/suites/jws-2020/v1'], + id: 'did:key:zUC72to2eJiFMrt8a89LoaEPHC76QcfAxQdFys3nFGCmDKAmLbdE4ByyQ54kh42XgECCyZfVKe3m41Kk35nzrBKYbk6s9K7EjyLJcGGPkA7N15tDNBQJaY7cHD4RRaTwF6qXpmD', + verificationMethod: [ + { + id: 'did:key:zUC72to2eJiFMrt8a89LoaEPHC76QcfAxQdFys3nFGCmDKAmLbdE4ByyQ54kh42XgECCyZfVKe3m41Kk35nzrBKYbk6s9K7EjyLJcGGPkA7N15tDNBQJaY7cHD4RRaTwF6qXpmD#zUC72to2eJiFMrt8a89LoaEPHC76QcfAxQdFys3nFGCmDKAmLbdE4ByyQ54kh42XgECCyZfVKe3m41Kk35nzrBKYbk6s9K7EjyLJcGGPkA7N15tDNBQJaY7cHD4RRaTwF6qXpmD', + type: 'JsonWebKey2020', + controller: + 'did:key:zUC72to2eJiFMrt8a89LoaEPHC76QcfAxQdFys3nFGCmDKAmLbdE4ByyQ54kh42XgECCyZfVKe3m41Kk35nzrBKYbk6s9K7EjyLJcGGPkA7N15tDNBQJaY7cHD4RRaTwF6qXpmD', + publicKeyJwk: { + kty: 'EC', + crv: 'BLS12381_G2', + x: 'hbLuuV4otX1HEALBmUGy_ryyTIcY4TsoZYm_UZPCPgITbXvn8YlvlVM_T6_D0ZrUByvZELEX6wXzKhSkCwEqawZOEhUk4iWFID4MR6nRD4icGm97LC4d58WHTfCZ5bXw', + }, + }, + ], + assertionMethod: [ + 'did:key:zUC72to2eJiFMrt8a89LoaEPHC76QcfAxQdFys3nFGCmDKAmLbdE4ByyQ54kh42XgECCyZfVKe3m41Kk35nzrBKYbk6s9K7EjyLJcGGPkA7N15tDNBQJaY7cHD4RRaTwF6qXpmD#zUC72to2eJiFMrt8a89LoaEPHC76QcfAxQdFys3nFGCmDKAmLbdE4ByyQ54kh42XgECCyZfVKe3m41Kk35nzrBKYbk6s9K7EjyLJcGGPkA7N15tDNBQJaY7cHD4RRaTwF6qXpmD', + ], + authentication: [ + 'did:key:zUC72to2eJiFMrt8a89LoaEPHC76QcfAxQdFys3nFGCmDKAmLbdE4ByyQ54kh42XgECCyZfVKe3m41Kk35nzrBKYbk6s9K7EjyLJcGGPkA7N15tDNBQJaY7cHD4RRaTwF6qXpmD#zUC72to2eJiFMrt8a89LoaEPHC76QcfAxQdFys3nFGCmDKAmLbdE4ByyQ54kh42XgECCyZfVKe3m41Kk35nzrBKYbk6s9K7EjyLJcGGPkA7N15tDNBQJaY7cHD4RRaTwF6qXpmD', + ], + capabilityInvocation: [ + 'did:key:zUC72to2eJiFMrt8a89LoaEPHC76QcfAxQdFys3nFGCmDKAmLbdE4ByyQ54kh42XgECCyZfVKe3m41Kk35nzrBKYbk6s9K7EjyLJcGGPkA7N15tDNBQJaY7cHD4RRaTwF6qXpmD#zUC72to2eJiFMrt8a89LoaEPHC76QcfAxQdFys3nFGCmDKAmLbdE4ByyQ54kh42XgECCyZfVKe3m41Kk35nzrBKYbk6s9K7EjyLJcGGPkA7N15tDNBQJaY7cHD4RRaTwF6qXpmD', + ], + capabilityDelegation: [ + 'did:key:zUC72to2eJiFMrt8a89LoaEPHC76QcfAxQdFys3nFGCmDKAmLbdE4ByyQ54kh42XgECCyZfVKe3m41Kk35nzrBKYbk6s9K7EjyLJcGGPkA7N15tDNBQJaY7cHD4RRaTwF6qXpmD#zUC72to2eJiFMrt8a89LoaEPHC76QcfAxQdFys3nFGCmDKAmLbdE4ByyQ54kh42XgECCyZfVKe3m41Kk35nzrBKYbk6s9K7EjyLJcGGPkA7N15tDNBQJaY7cHD4RRaTwF6qXpmD', + ], + } diff --git a/packages/core/src/modules/vc/__tests__/dids/did_zUC73JKGpX1WG4CWbFM15ni3faANPet6m8WJ6vaF5xyFsM3MeoBVNgQ6jjVPCcUnTAnJy6RVKqsUXa4AvdRKwV5hhQhwhMWFT9so9jrPekKmqpikTjYBXa3RYWqRpCWHY4u4hxh.ts b/packages/core/src/modules/vc/__tests__/dids/did_zUC73JKGpX1WG4CWbFM15ni3faANPet6m8WJ6vaF5xyFsM3MeoBVNgQ6jjVPCcUnTAnJy6RVKqsUXa4AvdRKwV5hhQhwhMWFT9so9jrPekKmqpikTjYBXa3RYWqRpCWHY4u4hxh.ts new file mode 100644 index 0000000000..b3072fa575 --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/dids/did_zUC73JKGpX1WG4CWbFM15ni3faANPet6m8WJ6vaF5xyFsM3MeoBVNgQ6jjVPCcUnTAnJy6RVKqsUXa4AvdRKwV5hhQhwhMWFT9so9jrPekKmqpikTjYBXa3RYWqRpCWHY4u4hxh.ts @@ -0,0 +1,30 @@ +export const DID_zUC73JKGpX1WG4CWbFM15ni3faANPet6m8WJ6vaF5xyFsM3MeoBVNgQ6jjVPCcUnTAnJy6RVKqsUXa4AvdRKwV5hhQhwhMWFT9so9jrPekKmqpikTjYBXa3RYWqRpCWHY4u4hxh = + { + '@context': ['https://www.w3.org/ns/did/v1', 'https://w3id.org/security/suites/jws-2020/v1'], + id: 'did:key:zUC73JKGpX1WG4CWbFM15ni3faANPet6m8WJ6vaF5xyFsM3MeoBVNgQ6jjVPCcUnTAnJy6RVKqsUXa4AvdRKwV5hhQhwhMWFT9so9jrPekKmqpikTjYBXa3RYWqRpCWHY4u4hxh', + verificationMethod: [ + { + id: 'did:key:zUC73JKGpX1WG4CWbFM15ni3faANPet6m8WJ6vaF5xyFsM3MeoBVNgQ6jjVPCcUnTAnJy6RVKqsUXa4AvdRKwV5hhQhwhMWFT9so9jrPekKmqpikTjYBXa3RYWqRpCWHY4u4hxh#zUC73JKGpX1WG4CWbFM15ni3faANPet6m8WJ6vaF5xyFsM3MeoBVNgQ6jjVPCcUnTAnJy6RVKqsUXa4AvdRKwV5hhQhwhMWFT9so9jrPekKmqpikTjYBXa3RYWqRpCWHY4u4hxh', + type: 'JsonWebKey2020', + controller: + 'did:key:zUC73JKGpX1WG4CWbFM15ni3faANPet6m8WJ6vaF5xyFsM3MeoBVNgQ6jjVPCcUnTAnJy6RVKqsUXa4AvdRKwV5hhQhwhMWFT9so9jrPekKmqpikTjYBXa3RYWqRpCWHY4u4hxh', + publicKeyJwk: { + kty: 'EC', + crv: 'BLS12381_G2', + x: 'huBQv7qpuF5FI5bvaku1B8JSPHeHKPI-hhvcJ97I5vNdGtafbPfrPncV4NNXidkzDDASYgt22eMSVKX9Kc9iWFnPmprzDNUt1HhvtBrldXLlRegT93LOogEh7BwoKVGW', + }, + }, + ], + assertionMethod: [ + 'did:key:zUC73JKGpX1WG4CWbFM15ni3faANPet6m8WJ6vaF5xyFsM3MeoBVNgQ6jjVPCcUnTAnJy6RVKqsUXa4AvdRKwV5hhQhwhMWFT9so9jrPekKmqpikTjYBXa3RYWqRpCWHY4u4hxh#zUC73JKGpX1WG4CWbFM15ni3faANPet6m8WJ6vaF5xyFsM3MeoBVNgQ6jjVPCcUnTAnJy6RVKqsUXa4AvdRKwV5hhQhwhMWFT9so9jrPekKmqpikTjYBXa3RYWqRpCWHY4u4hxh', + ], + authentication: [ + 'did:key:zUC73JKGpX1WG4CWbFM15ni3faANPet6m8WJ6vaF5xyFsM3MeoBVNgQ6jjVPCcUnTAnJy6RVKqsUXa4AvdRKwV5hhQhwhMWFT9so9jrPekKmqpikTjYBXa3RYWqRpCWHY4u4hxh#zUC73JKGpX1WG4CWbFM15ni3faANPet6m8WJ6vaF5xyFsM3MeoBVNgQ6jjVPCcUnTAnJy6RVKqsUXa4AvdRKwV5hhQhwhMWFT9so9jrPekKmqpikTjYBXa3RYWqRpCWHY4u4hxh', + ], + capabilityInvocation: [ + 'did:key:zUC73JKGpX1WG4CWbFM15ni3faANPet6m8WJ6vaF5xyFsM3MeoBVNgQ6jjVPCcUnTAnJy6RVKqsUXa4AvdRKwV5hhQhwhMWFT9so9jrPekKmqpikTjYBXa3RYWqRpCWHY4u4hxh#zUC73JKGpX1WG4CWbFM15ni3faANPet6m8WJ6vaF5xyFsM3MeoBVNgQ6jjVPCcUnTAnJy6RVKqsUXa4AvdRKwV5hhQhwhMWFT9so9jrPekKmqpikTjYBXa3RYWqRpCWHY4u4hxh', + ], + capabilityDelegation: [ + 'did:key:zUC73JKGpX1WG4CWbFM15ni3faANPet6m8WJ6vaF5xyFsM3MeoBVNgQ6jjVPCcUnTAnJy6RVKqsUXa4AvdRKwV5hhQhwhMWFT9so9jrPekKmqpikTjYBXa3RYWqRpCWHY4u4hxh#zUC73JKGpX1WG4CWbFM15ni3faANPet6m8WJ6vaF5xyFsM3MeoBVNgQ6jjVPCcUnTAnJy6RVKqsUXa4AvdRKwV5hhQhwhMWFT9so9jrPekKmqpikTjYBXa3RYWqRpCWHY4u4hxh', + ], + } diff --git a/packages/core/src/modules/vc/__tests__/dids/did_zUC73YqdRJ3t8bZsFUoxYFPNVruHzn4o7u78GSrMXVSkcb3xAYtUxRD2kSt2bDcmQpRjKfygwLJ1HEGfkosSN7gr4acjGkXLbLRXREueknFN4AU19m8BxEgWnLM84CAvsw6bhYn.ts b/packages/core/src/modules/vc/__tests__/dids/did_zUC73YqdRJ3t8bZsFUoxYFPNVruHzn4o7u78GSrMXVSkcb3xAYtUxRD2kSt2bDcmQpRjKfygwLJ1HEGfkosSN7gr4acjGkXLbLRXREueknFN4AU19m8BxEgWnLM84CAvsw6bhYn.ts new file mode 100644 index 0000000000..c2861e2a1a --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/dids/did_zUC73YqdRJ3t8bZsFUoxYFPNVruHzn4o7u78GSrMXVSkcb3xAYtUxRD2kSt2bDcmQpRjKfygwLJ1HEGfkosSN7gr4acjGkXLbLRXREueknFN4AU19m8BxEgWnLM84CAvsw6bhYn.ts @@ -0,0 +1,30 @@ +export const DID_zUC73YqdRJ3t8bZsFUoxYFPNVruHzn4o7u78GSrMXVSkcb3xAYtUxRD2kSt2bDcmQpRjKfygwLJ1HEGfkosSN7gr4acjGkXLbLRXREueknFN4AU19m8BxEgWnLM84CAvsw6bhYn = + { + '@context': ['https://www.w3.org/ns/did/v1', 'https://w3id.org/security/suites/jws-2020/v1'], + id: 'did:key:zUC73YqdRJ3t8bZsFUoxYFPNVruHzn4o7u78GSrMXVSkcb3xAYtUxRD2kSt2bDcmQpRjKfygwLJ1HEGfkosSN7gr4acjGkXLbLRXREueknFN4AU19m8BxEgWnLM84CAvsw6bhYn', + verificationMethod: [ + { + id: 'did:key:zUC73YqdRJ3t8bZsFUoxYFPNVruHzn4o7u78GSrMXVSkcb3xAYtUxRD2kSt2bDcmQpRjKfygwLJ1HEGfkosSN7gr4acjGkXLbLRXREueknFN4AU19m8BxEgWnLM84CAvsw6bhYn#zUC73YqdRJ3t8bZsFUoxYFPNVruHzn4o7u78GSrMXVSkcb3xAYtUxRD2kSt2bDcmQpRjKfygwLJ1HEGfkosSN7gr4acjGkXLbLRXREueknFN4AU19m8BxEgWnLM84CAvsw6bhYn', + type: 'JsonWebKey2020', + controller: + 'did:key:zUC73YqdRJ3t8bZsFUoxYFPNVruHzn4o7u78GSrMXVSkcb3xAYtUxRD2kSt2bDcmQpRjKfygwLJ1HEGfkosSN7gr4acjGkXLbLRXREueknFN4AU19m8BxEgWnLM84CAvsw6bhYn', + publicKeyJwk: { + kty: 'EC', + crv: 'BLS12381_G2', + x: 'h5pno-Wq71ExNSbjZ91OJavpe0tA871-20TigCvQAs9jHtIV6KjXtX17Cmoz01dQBlPUFPOB5ILw2JeZ2MYtMOzCCYtnuour5XDuyYs6KTAXgYQ2nAlIFfmXXr9Jc48z', + }, + }, + ], + assertionMethod: [ + 'did:key:zUC73YqdRJ3t8bZsFUoxYFPNVruHzn4o7u78GSrMXVSkcb3xAYtUxRD2kSt2bDcmQpRjKfygwLJ1HEGfkosSN7gr4acjGkXLbLRXREueknFN4AU19m8BxEgWnLM84CAvsw6bhYn#zUC73YqdRJ3t8bZsFUoxYFPNVruHzn4o7u78GSrMXVSkcb3xAYtUxRD2kSt2bDcmQpRjKfygwLJ1HEGfkosSN7gr4acjGkXLbLRXREueknFN4AU19m8BxEgWnLM84CAvsw6bhYn', + ], + authentication: [ + 'did:key:zUC73YqdRJ3t8bZsFUoxYFPNVruHzn4o7u78GSrMXVSkcb3xAYtUxRD2kSt2bDcmQpRjKfygwLJ1HEGfkosSN7gr4acjGkXLbLRXREueknFN4AU19m8BxEgWnLM84CAvsw6bhYn#zUC73YqdRJ3t8bZsFUoxYFPNVruHzn4o7u78GSrMXVSkcb3xAYtUxRD2kSt2bDcmQpRjKfygwLJ1HEGfkosSN7gr4acjGkXLbLRXREueknFN4AU19m8BxEgWnLM84CAvsw6bhYn', + ], + capabilityInvocation: [ + 'did:key:zUC73YqdRJ3t8bZsFUoxYFPNVruHzn4o7u78GSrMXVSkcb3xAYtUxRD2kSt2bDcmQpRjKfygwLJ1HEGfkosSN7gr4acjGkXLbLRXREueknFN4AU19m8BxEgWnLM84CAvsw6bhYn#zUC73YqdRJ3t8bZsFUoxYFPNVruHzn4o7u78GSrMXVSkcb3xAYtUxRD2kSt2bDcmQpRjKfygwLJ1HEGfkosSN7gr4acjGkXLbLRXREueknFN4AU19m8BxEgWnLM84CAvsw6bhYn', + ], + capabilityDelegation: [ + 'did:key:zUC73YqdRJ3t8bZsFUoxYFPNVruHzn4o7u78GSrMXVSkcb3xAYtUxRD2kSt2bDcmQpRjKfygwLJ1HEGfkosSN7gr4acjGkXLbLRXREueknFN4AU19m8BxEgWnLM84CAvsw6bhYn#zUC73YqdRJ3t8bZsFUoxYFPNVruHzn4o7u78GSrMXVSkcb3xAYtUxRD2kSt2bDcmQpRjKfygwLJ1HEGfkosSN7gr4acjGkXLbLRXREueknFN4AU19m8BxEgWnLM84CAvsw6bhYn', + ], + } diff --git a/packages/core/src/modules/vc/__tests__/dids/did_zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN.ts b/packages/core/src/modules/vc/__tests__/dids/did_zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN.ts new file mode 100644 index 0000000000..3991dcd28b --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/dids/did_zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN.ts @@ -0,0 +1,27 @@ +export const DID_zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN = + { + '@context': ['https://www.w3.org/ns/did/v1', 'https://w3id.org/security/suites/bls12381-2020/v1'], + id: 'did:key:zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN', + verificationMethod: [ + { + id: 'did:key:zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN#zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN', + type: 'Bls12381G2Key2020', + controller: + 'did:key:zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN', + publicKeyBase58: + 'pegxn1a43zphf3uqGT4cx1bz8Ebb9QmoSWhQyP1qYTSeRuvWLGKJ5KcqaymnSj53YhCFbjr3tJAhqcaxxZ4Lry7KxkpLeA6GVf3Zb1x999dYp3k4jQzYa1PQXC6x1uCd9s4', + }, + ], + assertionMethod: [ + 'did:key:zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN#zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN', + ], + authentication: [ + 'did:key:zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN#zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN', + ], + capabilityInvocation: [ + 'did:key:zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN#zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN', + ], + capabilityDelegation: [ + 'did:key:zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN#zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN', + ], + } diff --git a/packages/core/src/modules/vc/__tests__/dids/did_zUC76qMTDAaupy19pEk8JKH5LJwPwmscNQn24SYpqrgqEoYWPFgCSm4CnTfupADRfbB6CxdwYhVaTFjT4fmPvMh7gWY87LauhaLmNpPamCv4LAepcRfBDndSdtCpZKSTELMjzGJ.ts b/packages/core/src/modules/vc/__tests__/dids/did_zUC76qMTDAaupy19pEk8JKH5LJwPwmscNQn24SYpqrgqEoYWPFgCSm4CnTfupADRfbB6CxdwYhVaTFjT4fmPvMh7gWY87LauhaLmNpPamCv4LAepcRfBDndSdtCpZKSTELMjzGJ.ts new file mode 100644 index 0000000000..d369808fc9 --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/dids/did_zUC76qMTDAaupy19pEk8JKH5LJwPwmscNQn24SYpqrgqEoYWPFgCSm4CnTfupADRfbB6CxdwYhVaTFjT4fmPvMh7gWY87LauhaLmNpPamCv4LAepcRfBDndSdtCpZKSTELMjzGJ.ts @@ -0,0 +1,30 @@ +export const DID_zUC76qMTDAaupy19pEk8JKH5LJwPwmscNQn24SYpqrgqEoYWPFgCSm4CnTfupADRfbB6CxdwYhVaTFjT4fmPvMh7gWY87LauhaLmNpPamCv4LAepcRfBDndSdtCpZKSTELMjzGJ = + { + '@context': ['https://www.w3.org/ns/did/v1', 'https://w3id.org/security/suites/jws-2020/v1'], + id: 'did:key:zUC76qMTDAaupy19pEk8JKH5LJwPwmscNQn24SYpqrgqEoYWPFgCSm4CnTfupADRfbB6CxdwYhVaTFjT4fmPvMh7gWY87LauhaLmNpPamCv4LAepcRfBDndSdtCpZKSTELMjzGJ', + verificationMethod: [ + { + id: 'did:key:zUC76qMTDAaupy19pEk8JKH5LJwPwmscNQn24SYpqrgqEoYWPFgCSm4CnTfupADRfbB6CxdwYhVaTFjT4fmPvMh7gWY87LauhaLmNpPamCv4LAepcRfBDndSdtCpZKSTELMjzGJ#zUC76qMTDAaupy19pEk8JKH5LJwPwmscNQn24SYpqrgqEoYWPFgCSm4CnTfupADRfbB6CxdwYhVaTFjT4fmPvMh7gWY87LauhaLmNpPamCv4LAepcRfBDndSdtCpZKSTELMjzGJ', + type: 'JsonWebKey2020', + controller: + 'did:key:zUC76qMTDAaupy19pEk8JKH5LJwPwmscNQn24SYpqrgqEoYWPFgCSm4CnTfupADRfbB6CxdwYhVaTFjT4fmPvMh7gWY87LauhaLmNpPamCv4LAepcRfBDndSdtCpZKSTELMjzGJ', + publicKeyJwk: { + kty: 'EC', + crv: 'BLS12381_G2', + x: 'kSN7z0XGmPGn81aqNhL4zE-jF799YUzc7nl730o0nBsMZiZzwlqyNvemMYrWAGq5FCoaN0jpCkefgdRrMRPPD_6IK3w0g3ieFxNxdwX7NcGR8aihA9stCdTe0kx-ePJr', + }, + }, + ], + assertionMethod: [ + 'did:key:zUC76qMTDAaupy19pEk8JKH5LJwPwmscNQn24SYpqrgqEoYWPFgCSm4CnTfupADRfbB6CxdwYhVaTFjT4fmPvMh7gWY87LauhaLmNpPamCv4LAepcRfBDndSdtCpZKSTELMjzGJ#zUC76qMTDAaupy19pEk8JKH5LJwPwmscNQn24SYpqrgqEoYWPFgCSm4CnTfupADRfbB6CxdwYhVaTFjT4fmPvMh7gWY87LauhaLmNpPamCv4LAepcRfBDndSdtCpZKSTELMjzGJ', + ], + authentication: [ + 'did:key:zUC76qMTDAaupy19pEk8JKH5LJwPwmscNQn24SYpqrgqEoYWPFgCSm4CnTfupADRfbB6CxdwYhVaTFjT4fmPvMh7gWY87LauhaLmNpPamCv4LAepcRfBDndSdtCpZKSTELMjzGJ#zUC76qMTDAaupy19pEk8JKH5LJwPwmscNQn24SYpqrgqEoYWPFgCSm4CnTfupADRfbB6CxdwYhVaTFjT4fmPvMh7gWY87LauhaLmNpPamCv4LAepcRfBDndSdtCpZKSTELMjzGJ', + ], + capabilityInvocation: [ + 'did:key:zUC76qMTDAaupy19pEk8JKH5LJwPwmscNQn24SYpqrgqEoYWPFgCSm4CnTfupADRfbB6CxdwYhVaTFjT4fmPvMh7gWY87LauhaLmNpPamCv4LAepcRfBDndSdtCpZKSTELMjzGJ#zUC76qMTDAaupy19pEk8JKH5LJwPwmscNQn24SYpqrgqEoYWPFgCSm4CnTfupADRfbB6CxdwYhVaTFjT4fmPvMh7gWY87LauhaLmNpPamCv4LAepcRfBDndSdtCpZKSTELMjzGJ', + ], + capabilityDelegation: [ + 'did:key:zUC76qMTDAaupy19pEk8JKH5LJwPwmscNQn24SYpqrgqEoYWPFgCSm4CnTfupADRfbB6CxdwYhVaTFjT4fmPvMh7gWY87LauhaLmNpPamCv4LAepcRfBDndSdtCpZKSTELMjzGJ#zUC76qMTDAaupy19pEk8JKH5LJwPwmscNQn24SYpqrgqEoYWPFgCSm4CnTfupADRfbB6CxdwYhVaTFjT4fmPvMh7gWY87LauhaLmNpPamCv4LAepcRfBDndSdtCpZKSTELMjzGJ', + ], + } diff --git a/packages/core/src/modules/vc/__tests__/dids/did_zUC7DMETzdZM6woUjvs2fieEyFTbHABXwBvLYPBs4NDWKut4H41h8V3KTqGNRUziXLYqa1sFYYw9Zjpt6pFUf7hra4Q1zXMA9JjXcXxDpxuDNpUKEpiDPSYYUztVchUJHQJJhox.ts b/packages/core/src/modules/vc/__tests__/dids/did_zUC7DMETzdZM6woUjvs2fieEyFTbHABXwBvLYPBs4NDWKut4H41h8V3KTqGNRUziXLYqa1sFYYw9Zjpt6pFUf7hra4Q1zXMA9JjXcXxDpxuDNpUKEpiDPSYYUztVchUJHQJJhox.ts new file mode 100644 index 0000000000..5288ec249c --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/dids/did_zUC7DMETzdZM6woUjvs2fieEyFTbHABXwBvLYPBs4NDWKut4H41h8V3KTqGNRUziXLYqa1sFYYw9Zjpt6pFUf7hra4Q1zXMA9JjXcXxDpxuDNpUKEpiDPSYYUztVchUJHQJJhox.ts @@ -0,0 +1,30 @@ +export const DID_zUC7DMETzdZM6woUjvs2fieEyFTbHABXwBvLYPBs4NDWKut4H41h8V3KTqGNRUziXLYqa1sFYYw9Zjpt6pFUf7hra4Q1zXMA9JjXcXxDpxuDNpUKEpiDPSYYUztVchUJHQJJhox = + { + '@context': ['https://www.w3.org/ns/did/v1', 'https://w3id.org/security/suites/jws-2020/v1'], + id: 'did:key:zUC7DMETzdZM6woUjvs2fieEyFTbHABXwBvLYPBs4NDWKut4H41h8V3KTqGNRUziXLYqa1sFYYw9Zjpt6pFUf7hra4Q1zXMA9JjXcXxDpxuDNpUKEpiDPSYYUztVchUJHQJJhox', + verificationMethod: [ + { + id: 'did:key:zUC7DMETzdZM6woUjvs2fieEyFTbHABXwBvLYPBs4NDWKut4H41h8V3KTqGNRUziXLYqa1sFYYw9Zjpt6pFUf7hra4Q1zXMA9JjXcXxDpxuDNpUKEpiDPSYYUztVchUJHQJJhox#zUC7DMETzdZM6woUjvs2fieEyFTbHABXwBvLYPBs4NDWKut4H41h8V3KTqGNRUziXLYqa1sFYYw9Zjpt6pFUf7hra4Q1zXMA9JjXcXxDpxuDNpUKEpiDPSYYUztVchUJHQJJhox', + type: 'JsonWebKey2020', + controller: + 'did:key:zUC7DMETzdZM6woUjvs2fieEyFTbHABXwBvLYPBs4NDWKut4H41h8V3KTqGNRUziXLYqa1sFYYw9Zjpt6pFUf7hra4Q1zXMA9JjXcXxDpxuDNpUKEpiDPSYYUztVchUJHQJJhox', + publicKeyJwk: { + kty: 'EC', + crv: 'BLS12381_G2', + x: 'pA1LXe8EGRU8PTpXfnG3fpJoIW394wpGpx8Q3V5Keh3PUM7j_PRLbk6XN3KJTv7cFesQeo_Q-knymniIm0Ugk9-RGKn65pRIy65aMa1ACfKfGTnnnTuJP4tWRHW2BaHb', + }, + }, + ], + assertionMethod: [ + 'did:key:zUC7DMETzdZM6woUjvs2fieEyFTbHABXwBvLYPBs4NDWKut4H41h8V3KTqGNRUziXLYqa1sFYYw9Zjpt6pFUf7hra4Q1zXMA9JjXcXxDpxuDNpUKEpiDPSYYUztVchUJHQJJhox#zUC7DMETzdZM6woUjvs2fieEyFTbHABXwBvLYPBs4NDWKut4H41h8V3KTqGNRUziXLYqa1sFYYw9Zjpt6pFUf7hra4Q1zXMA9JjXcXxDpxuDNpUKEpiDPSYYUztVchUJHQJJhox', + ], + authentication: [ + 'did:key:zUC7DMETzdZM6woUjvs2fieEyFTbHABXwBvLYPBs4NDWKut4H41h8V3KTqGNRUziXLYqa1sFYYw9Zjpt6pFUf7hra4Q1zXMA9JjXcXxDpxuDNpUKEpiDPSYYUztVchUJHQJJhox#zUC7DMETzdZM6woUjvs2fieEyFTbHABXwBvLYPBs4NDWKut4H41h8V3KTqGNRUziXLYqa1sFYYw9Zjpt6pFUf7hra4Q1zXMA9JjXcXxDpxuDNpUKEpiDPSYYUztVchUJHQJJhox', + ], + capabilityInvocation: [ + 'did:key:zUC7DMETzdZM6woUjvs2fieEyFTbHABXwBvLYPBs4NDWKut4H41h8V3KTqGNRUziXLYqa1sFYYw9Zjpt6pFUf7hra4Q1zXMA9JjXcXxDpxuDNpUKEpiDPSYYUztVchUJHQJJhox#zUC7DMETzdZM6woUjvs2fieEyFTbHABXwBvLYPBs4NDWKut4H41h8V3KTqGNRUziXLYqa1sFYYw9Zjpt6pFUf7hra4Q1zXMA9JjXcXxDpxuDNpUKEpiDPSYYUztVchUJHQJJhox', + ], + capabilityDelegation: [ + 'did:key:zUC7DMETzdZM6woUjvs2fieEyFTbHABXwBvLYPBs4NDWKut4H41h8V3KTqGNRUziXLYqa1sFYYw9Zjpt6pFUf7hra4Q1zXMA9JjXcXxDpxuDNpUKEpiDPSYYUztVchUJHQJJhox#zUC7DMETzdZM6woUjvs2fieEyFTbHABXwBvLYPBs4NDWKut4H41h8V3KTqGNRUziXLYqa1sFYYw9Zjpt6pFUf7hra4Q1zXMA9JjXcXxDpxuDNpUKEpiDPSYYUztVchUJHQJJhox', + ], + } diff --git a/packages/core/src/modules/vc/__tests__/dids/did_zUC7F9Jt6YzVW9fGhwYjVrjdS8Xzg7oQc2CeDcVNgEcEAaJXAtPz3eXu2sewq4xtwRK3DAhQRYwwoYiT3nNzLCPsrKoP72UGZKhh4cNuZD7RkmwzAa1Bye4C5a9DcyYBGKZrE5F.ts b/packages/core/src/modules/vc/__tests__/dids/did_zUC7F9Jt6YzVW9fGhwYjVrjdS8Xzg7oQc2CeDcVNgEcEAaJXAtPz3eXu2sewq4xtwRK3DAhQRYwwoYiT3nNzLCPsrKoP72UGZKhh4cNuZD7RkmwzAa1Bye4C5a9DcyYBGKZrE5F.ts new file mode 100644 index 0000000000..3e4bac3b13 --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/dids/did_zUC7F9Jt6YzVW9fGhwYjVrjdS8Xzg7oQc2CeDcVNgEcEAaJXAtPz3eXu2sewq4xtwRK3DAhQRYwwoYiT3nNzLCPsrKoP72UGZKhh4cNuZD7RkmwzAa1Bye4C5a9DcyYBGKZrE5F.ts @@ -0,0 +1,30 @@ +export const DID_zUC7F9Jt6YzVW9fGhwYjVrjdS8Xzg7oQc2CeDcVNgEcEAaJXAtPz3eXu2sewq4xtwRK3DAhQRYwwoYiT3nNzLCPsrKoP72UGZKhh4cNuZD7RkmwzAa1Bye4C5a9DcyYBGKZrE5F = + { + '@context': ['https://www.w3.org/ns/did/v1', 'https://w3id.org/security/suites/jws-2020/v1'], + id: 'did:key:zUC7F9Jt6YzVW9fGhwYjVrjdS8Xzg7oQc2CeDcVNgEcEAaJXAtPz3eXu2sewq4xtwRK3DAhQRYwwoYiT3nNzLCPsrKoP72UGZKhh4cNuZD7RkmwzAa1Bye4C5a9DcyYBGKZrE5F', + verificationMethod: [ + { + id: 'did:key:zUC7F9Jt6YzVW9fGhwYjVrjdS8Xzg7oQc2CeDcVNgEcEAaJXAtPz3eXu2sewq4xtwRK3DAhQRYwwoYiT3nNzLCPsrKoP72UGZKhh4cNuZD7RkmwzAa1Bye4C5a9DcyYBGKZrE5F#zUC7F9Jt6YzVW9fGhwYjVrjdS8Xzg7oQc2CeDcVNgEcEAaJXAtPz3eXu2sewq4xtwRK3DAhQRYwwoYiT3nNzLCPsrKoP72UGZKhh4cNuZD7RkmwzAa1Bye4C5a9DcyYBGKZrE5F', + type: 'JsonWebKey2020', + controller: + 'did:key:zUC7F9Jt6YzVW9fGhwYjVrjdS8Xzg7oQc2CeDcVNgEcEAaJXAtPz3eXu2sewq4xtwRK3DAhQRYwwoYiT3nNzLCPsrKoP72UGZKhh4cNuZD7RkmwzAa1Bye4C5a9DcyYBGKZrE5F', + publicKeyJwk: { + kty: 'EC', + crv: 'BLS12381_G2', + x: 'qULVOptm5i4PfW7r6Hu6wzw6BZRywAQcCi3V0q1VDidrf0bZ-rFUaP72vXRa1WkPAoWpjMjM-uYbDQJBQbgVXoFm4L5Qz3YG5ziHRGdVWChY_5TX8yV3fQOsLJDSnfZy', + }, + }, + ], + assertionMethod: [ + 'did:key:zUC7F9Jt6YzVW9fGhwYjVrjdS8Xzg7oQc2CeDcVNgEcEAaJXAtPz3eXu2sewq4xtwRK3DAhQRYwwoYiT3nNzLCPsrKoP72UGZKhh4cNuZD7RkmwzAa1Bye4C5a9DcyYBGKZrE5F#zUC7F9Jt6YzVW9fGhwYjVrjdS8Xzg7oQc2CeDcVNgEcEAaJXAtPz3eXu2sewq4xtwRK3DAhQRYwwoYiT3nNzLCPsrKoP72UGZKhh4cNuZD7RkmwzAa1Bye4C5a9DcyYBGKZrE5F', + ], + authentication: [ + 'did:key:zUC7F9Jt6YzVW9fGhwYjVrjdS8Xzg7oQc2CeDcVNgEcEAaJXAtPz3eXu2sewq4xtwRK3DAhQRYwwoYiT3nNzLCPsrKoP72UGZKhh4cNuZD7RkmwzAa1Bye4C5a9DcyYBGKZrE5F#zUC7F9Jt6YzVW9fGhwYjVrjdS8Xzg7oQc2CeDcVNgEcEAaJXAtPz3eXu2sewq4xtwRK3DAhQRYwwoYiT3nNzLCPsrKoP72UGZKhh4cNuZD7RkmwzAa1Bye4C5a9DcyYBGKZrE5F', + ], + capabilityInvocation: [ + 'did:key:zUC7F9Jt6YzVW9fGhwYjVrjdS8Xzg7oQc2CeDcVNgEcEAaJXAtPz3eXu2sewq4xtwRK3DAhQRYwwoYiT3nNzLCPsrKoP72UGZKhh4cNuZD7RkmwzAa1Bye4C5a9DcyYBGKZrE5F#zUC7F9Jt6YzVW9fGhwYjVrjdS8Xzg7oQc2CeDcVNgEcEAaJXAtPz3eXu2sewq4xtwRK3DAhQRYwwoYiT3nNzLCPsrKoP72UGZKhh4cNuZD7RkmwzAa1Bye4C5a9DcyYBGKZrE5F', + ], + capabilityDelegation: [ + 'did:key:zUC7F9Jt6YzVW9fGhwYjVrjdS8Xzg7oQc2CeDcVNgEcEAaJXAtPz3eXu2sewq4xtwRK3DAhQRYwwoYiT3nNzLCPsrKoP72UGZKhh4cNuZD7RkmwzAa1Bye4C5a9DcyYBGKZrE5F#zUC7F9Jt6YzVW9fGhwYjVrjdS8Xzg7oQc2CeDcVNgEcEAaJXAtPz3eXu2sewq4xtwRK3DAhQRYwwoYiT3nNzLCPsrKoP72UGZKhh4cNuZD7RkmwzAa1Bye4C5a9DcyYBGKZrE5F', + ], + } diff --git a/packages/core/src/modules/vc/__tests__/dids/did_zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4.ts b/packages/core/src/modules/vc/__tests__/dids/did_zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4.ts new file mode 100644 index 0000000000..46ae84b94e --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/dids/did_zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4.ts @@ -0,0 +1,30 @@ +export const DID_zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4 = + { + '@context': ['https://www.w3.org/ns/did/v1', 'https://w3id.org/security/suites/jws-2020/v1'], + id: 'did:key:zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4', + verificationMethod: [ + { + id: 'did:key:zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4#zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4', + type: 'JsonWebKey2020', + controller: + 'did:key:zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4', + publicKeyJwk: { + kty: 'EC', + crv: 'BLS12381_G2', + x: 'rvmIn58iMglCOixwxv7snWjuu8ooQteghivgqrchuIDH8DbG7pzF5io_k2t5HOW1DjcsVioEXLnIdSdUz8jJQq2r-B8zyw4CEiWAM9LUPnmmRDeVFVtA0YVaLo7DdkOn', + }, + }, + ], + assertionMethod: [ + 'did:key:zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4#zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4', + ], + authentication: [ + 'did:key:zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4#zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4', + ], + capabilityInvocation: [ + 'did:key:zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4#zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4', + ], + capabilityDelegation: [ + 'did:key:zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4#zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4', + ], + } diff --git a/packages/core/src/modules/vc/__tests__/documentLoader.ts b/packages/core/src/modules/vc/__tests__/documentLoader.ts new file mode 100644 index 0000000000..91a76bf879 --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/documentLoader.ts @@ -0,0 +1,113 @@ +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore +// eslint-disable-next-line import/no-extraneous-dependencies + +import type { JsonObject } from '../../../types' +import type { DocumentLoaderResult } from '../../../utils' + +import jsonld from '../../../../types/jsonld' + +import { BBS_V1, EXAMPLES_V1, ODRL, SCHEMA_ORG, VACCINATION_V1 } from './contexts' +import { X25519_V1 } from './contexts/X25519_v1' +import { CITIZENSHIP_V1 } from './contexts/citizenship_v1' +import { CREDENTIALS_V1 } from './contexts/credentials_v1' +import { DID_V1 } from './contexts/did_v1' +import { ED25519_V1 } from './contexts/ed25519_v1' +import { SECURITY_V1 } from './contexts/security_v1' +import { SECURITY_V2 } from './contexts/security_v2' +import { SECURITY_V3_UNSTABLE } from './contexts/security_v3_unstable' +import { DID_EXAMPLE_48939859 } from './dids/did_example_489398593' +import { DID_SOV_QqEfJxe752NCmWqR5TssZ5 } from './dids/did_sov_QqEfJxe752NCmWqR5TssZ5' +import { DID_z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL } from './dids/did_z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL' +import { DID_z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV } from './dids/did_z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV' +import { DID_zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa } from './dids/did_zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa' +import { DID_zUC72to2eJiFMrt8a89LoaEPHC76QcfAxQdFys3nFGCmDKAmLbdE4ByyQ54kh42XgECCyZfVKe3m41Kk35nzrBKYbk6s9K7EjyLJcGGPkA7N15tDNBQJaY7cHD4RRaTwF6qXpmD } from './dids/did_zUC72to2eJiFMrt8a89LoaEPHC76QcfAxQdFys3nFGCmDKAmLbdE4ByyQ54kh42XgECCyZfVKe3m41Kk35nzrBKYbk6s9K7EjyLJcGGPkA7N15tDNBQJaY7cHD4RRaTwF6qXpmD' +import { DID_zUC73JKGpX1WG4CWbFM15ni3faANPet6m8WJ6vaF5xyFsM3MeoBVNgQ6jjVPCcUnTAnJy6RVKqsUXa4AvdRKwV5hhQhwhMWFT9so9jrPekKmqpikTjYBXa3RYWqRpCWHY4u4hxh } from './dids/did_zUC73JKGpX1WG4CWbFM15ni3faANPet6m8WJ6vaF5xyFsM3MeoBVNgQ6jjVPCcUnTAnJy6RVKqsUXa4AvdRKwV5hhQhwhMWFT9so9jrPekKmqpikTjYBXa3RYWqRpCWHY4u4hxh' +import { DID_zUC73YqdRJ3t8bZsFUoxYFPNVruHzn4o7u78GSrMXVSkcb3xAYtUxRD2kSt2bDcmQpRjKfygwLJ1HEGfkosSN7gr4acjGkXLbLRXREueknFN4AU19m8BxEgWnLM84CAvsw6bhYn } from './dids/did_zUC73YqdRJ3t8bZsFUoxYFPNVruHzn4o7u78GSrMXVSkcb3xAYtUxRD2kSt2bDcmQpRjKfygwLJ1HEGfkosSN7gr4acjGkXLbLRXREueknFN4AU19m8BxEgWnLM84CAvsw6bhYn' +import { DID_zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN } from './dids/did_zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN' +import { DID_zUC76qMTDAaupy19pEk8JKH5LJwPwmscNQn24SYpqrgqEoYWPFgCSm4CnTfupADRfbB6CxdwYhVaTFjT4fmPvMh7gWY87LauhaLmNpPamCv4LAepcRfBDndSdtCpZKSTELMjzGJ } from './dids/did_zUC76qMTDAaupy19pEk8JKH5LJwPwmscNQn24SYpqrgqEoYWPFgCSm4CnTfupADRfbB6CxdwYhVaTFjT4fmPvMh7gWY87LauhaLmNpPamCv4LAepcRfBDndSdtCpZKSTELMjzGJ' +import { DID_zUC7DMETzdZM6woUjvs2fieEyFTbHABXwBvLYPBs4NDWKut4H41h8V3KTqGNRUziXLYqa1sFYYw9Zjpt6pFUf7hra4Q1zXMA9JjXcXxDpxuDNpUKEpiDPSYYUztVchUJHQJJhox } from './dids/did_zUC7DMETzdZM6woUjvs2fieEyFTbHABXwBvLYPBs4NDWKut4H41h8V3KTqGNRUziXLYqa1sFYYw9Zjpt6pFUf7hra4Q1zXMA9JjXcXxDpxuDNpUKEpiDPSYYUztVchUJHQJJhox' +import { DID_zUC7F9Jt6YzVW9fGhwYjVrjdS8Xzg7oQc2CeDcVNgEcEAaJXAtPz3eXu2sewq4xtwRK3DAhQRYwwoYiT3nNzLCPsrKoP72UGZKhh4cNuZD7RkmwzAa1Bye4C5a9DcyYBGKZrE5F } from './dids/did_zUC7F9Jt6YzVW9fGhwYjVrjdS8Xzg7oQc2CeDcVNgEcEAaJXAtPz3eXu2sewq4xtwRK3DAhQRYwwoYiT3nNzLCPsrKoP72UGZKhh4cNuZD7RkmwzAa1Bye4C5a9DcyYBGKZrE5F' +import { DID_zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4 } from './dids/did_zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4' + +export const DOCUMENTS = { + [DID_z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL['id']]: DID_z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL, + [DID_z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV['id']]: DID_z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV, + [DID_zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa[ + 'id' + ]]: DID_zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa, + [DID_EXAMPLE_48939859['id']]: DID_EXAMPLE_48939859, + [DID_zUC73JKGpX1WG4CWbFM15ni3faANPet6m8WJ6vaF5xyFsM3MeoBVNgQ6jjVPCcUnTAnJy6RVKqsUXa4AvdRKwV5hhQhwhMWFT9so9jrPekKmqpikTjYBXa3RYWqRpCWHY4u4hxh[ + 'id' + ]]: DID_zUC73JKGpX1WG4CWbFM15ni3faANPet6m8WJ6vaF5xyFsM3MeoBVNgQ6jjVPCcUnTAnJy6RVKqsUXa4AvdRKwV5hhQhwhMWFT9so9jrPekKmqpikTjYBXa3RYWqRpCWHY4u4hxh, + [DID_zUC73YqdRJ3t8bZsFUoxYFPNVruHzn4o7u78GSrMXVSkcb3xAYtUxRD2kSt2bDcmQpRjKfygwLJ1HEGfkosSN7gr4acjGkXLbLRXREueknFN4AU19m8BxEgWnLM84CAvsw6bhYn[ + 'id' + ]]: DID_zUC73YqdRJ3t8bZsFUoxYFPNVruHzn4o7u78GSrMXVSkcb3xAYtUxRD2kSt2bDcmQpRjKfygwLJ1HEGfkosSN7gr4acjGkXLbLRXREueknFN4AU19m8BxEgWnLM84CAvsw6bhYn, + [DID_zUC76qMTDAaupy19pEk8JKH5LJwPwmscNQn24SYpqrgqEoYWPFgCSm4CnTfupADRfbB6CxdwYhVaTFjT4fmPvMh7gWY87LauhaLmNpPamCv4LAepcRfBDndSdtCpZKSTELMjzGJ[ + 'id' + ]]: DID_zUC76qMTDAaupy19pEk8JKH5LJwPwmscNQn24SYpqrgqEoYWPFgCSm4CnTfupADRfbB6CxdwYhVaTFjT4fmPvMh7gWY87LauhaLmNpPamCv4LAepcRfBDndSdtCpZKSTELMjzGJ, + [DID_zUC7DMETzdZM6woUjvs2fieEyFTbHABXwBvLYPBs4NDWKut4H41h8V3KTqGNRUziXLYqa1sFYYw9Zjpt6pFUf7hra4Q1zXMA9JjXcXxDpxuDNpUKEpiDPSYYUztVchUJHQJJhox[ + 'id' + ]]: DID_zUC7DMETzdZM6woUjvs2fieEyFTbHABXwBvLYPBs4NDWKut4H41h8V3KTqGNRUziXLYqa1sFYYw9Zjpt6pFUf7hra4Q1zXMA9JjXcXxDpxuDNpUKEpiDPSYYUztVchUJHQJJhox, + [DID_zUC7F9Jt6YzVW9fGhwYjVrjdS8Xzg7oQc2CeDcVNgEcEAaJXAtPz3eXu2sewq4xtwRK3DAhQRYwwoYiT3nNzLCPsrKoP72UGZKhh4cNuZD7RkmwzAa1Bye4C5a9DcyYBGKZrE5F[ + 'id' + ]]: DID_zUC7F9Jt6YzVW9fGhwYjVrjdS8Xzg7oQc2CeDcVNgEcEAaJXAtPz3eXu2sewq4xtwRK3DAhQRYwwoYiT3nNzLCPsrKoP72UGZKhh4cNuZD7RkmwzAa1Bye4C5a9DcyYBGKZrE5F, + [DID_zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4[ + 'id' + ]]: DID_zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4, + [DID_zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4[ + 'id' + ]]: DID_zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4, + [DID_zUC72to2eJiFMrt8a89LoaEPHC76QcfAxQdFys3nFGCmDKAmLbdE4ByyQ54kh42XgECCyZfVKe3m41Kk35nzrBKYbk6s9K7EjyLJcGGPkA7N15tDNBQJaY7cHD4RRaTwF6qXpmD[ + 'id' + ]]: DID_zUC72to2eJiFMrt8a89LoaEPHC76QcfAxQdFys3nFGCmDKAmLbdE4ByyQ54kh42XgECCyZfVKe3m41Kk35nzrBKYbk6s9K7EjyLJcGGPkA7N15tDNBQJaY7cHD4RRaTwF6qXpmD, + [DID_zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN[ + 'id' + ]]: DID_zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN, + [DID_SOV_QqEfJxe752NCmWqR5TssZ5['id']]: DID_SOV_QqEfJxe752NCmWqR5TssZ5, + SECURITY_CONTEXT_V1_URL: SECURITY_V1, + SECURITY_CONTEXT_V2_URL: SECURITY_V2, + SECURITY_CONTEXT_V3_URL: SECURITY_V3_UNSTABLE, + DID_V1_CONTEXT_URL: DID_V1, + CREDENTIALS_CONTEXT_V1_URL: CREDENTIALS_V1, + SECURITY_CONTEXT_BBS_URL: BBS_V1, + 'https://w3id.org/security/bbs/v1': BBS_V1, + 'https://w3id.org/security/v1': SECURITY_V1, + 'https://w3id.org/security/v2': SECURITY_V2, + 'https://w3id.org/security/suites/x25519-2019/v1': X25519_V1, + 'https://w3id.org/security/suites/ed25519-2018/v1': ED25519_V1, + 'https://www.w3.org/2018/credentials/examples/v1': EXAMPLES_V1, + 'https://www.w3.org/2018/credentials/v1': CREDENTIALS_V1, + 'https://w3id.org/did/v1': DID_V1, + 'https://w3id.org/citizenship/v1': CITIZENSHIP_V1, + 'https://www.w3.org/ns/odrl.jsonld': ODRL, + 'http://schema.org/': SCHEMA_ORG, + 'https://w3id.org/vaccination/v1': VACCINATION_V1, +} + +export const customDocumentLoader = async (url: string): Promise => { + let result = DOCUMENTS[url] + + if (!result) { + const withoutFragment = url.split('#')[0] + result = DOCUMENTS[withoutFragment] + } + + if (!result) { + throw new Error(`Document not found: ${url}`) + } + + if (url.startsWith('did:')) { + result = await jsonld.frame(result, { + '@context': result['@context'], + '@embed': '@never', + id: url, + }) + } + + return { + contextUrl: null, + documentUrl: url, + document: result as JsonObject, + } +} diff --git a/packages/core/src/modules/vc/__tests__/fixtures.ts b/packages/core/src/modules/vc/__tests__/fixtures.ts new file mode 100644 index 0000000000..a40b8499c1 --- /dev/null +++ b/packages/core/src/modules/vc/__tests__/fixtures.ts @@ -0,0 +1,326 @@ +import { CREDENTIALS_CONTEXT_V1_URL, SECURITY_CONTEXT_BBS_URL } from '../constants' + +export const Ed25519Signature2018Fixtures = { + TEST_LD_DOCUMENT: { + '@context': [CREDENTIALS_CONTEXT_V1_URL, 'https://www.w3.org/2018/credentials/examples/v1'], + type: ['VerifiableCredential', 'UniversityDegreeCredential'], + issuer: 'did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL', + issuanceDate: '2017-10-22T12:23:48Z', + credentialSubject: { + degree: { + type: 'BachelorDegree', + name: 'Bachelor of Science and Arts', + }, + }, + }, + TEST_LD_DOCUMENT_SIGNED: { + '@context': [CREDENTIALS_CONTEXT_V1_URL, 'https://www.w3.org/2018/credentials/examples/v1'], + type: ['VerifiableCredential', 'UniversityDegreeCredential'], + issuer: 'did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL', + issuanceDate: '2017-10-22T12:23:48Z', + credentialSubject: { + degree: { + type: 'BachelorDegree', + name: 'Bachelor of Science and Arts', + }, + }, + proof: { + verificationMethod: + 'did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL', + type: 'Ed25519Signature2018', + created: '2022-04-18T23:13:10Z', + proofPurpose: 'assertionMethod', + jws: 'eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..ECQsj_lABelr1jkehSkqaYpc5CBvbSjbi3ZvgiVVKxZFDYfj5xZmeXb_awa4aw_cGEVaoypeN2uCFmeG6WKkBw', + }, + }, + TEST_LD_DOCUMENT_BAD_SIGNED: { + '@context': [CREDENTIALS_CONTEXT_V1_URL, 'https://www.w3.org/2018/credentials/examples/v1'], + type: ['VerifiableCredential', 'UniversityDegreeCredential'], + issuer: 'did:key:z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV', + issuanceDate: '2017-10-22T12:23:48Z', + credentialSubject: { + degree: { + type: 'BachelorDegree', + name: 'Bachelor of Science and Arts', + }, + }, + proof: { + verificationMethod: + 'did:key:z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV#z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV', + type: 'Ed25519Signature2018', + created: '2022-03-28T15:54:59Z', + proofPurpose: 'assertionMethod', + jws: 'eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..Ej5aEUBTgeNm3_a4uO_AuNnisldnYTMMGMom4xLb-_TmoYe7467Yo046Bw2QqdfdBja6y-HBbBj4SonOlwswAg', + }, + }, + TEST_VP_DOCUMENT: { + '@context': [CREDENTIALS_CONTEXT_V1_URL], + type: ['VerifiablePresentation'], + verifiableCredential: [ + { + '@context': [CREDENTIALS_CONTEXT_V1_URL, 'https://www.w3.org/2018/credentials/examples/v1'], + type: ['VerifiableCredential', 'UniversityDegreeCredential'], + issuer: 'did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL', + issuanceDate: '2017-10-22T12:23:48Z', + credentialSubject: { + degree: { + type: 'BachelorDegree', + name: 'Bachelor of Science and Arts', + }, + }, + proof: { + verificationMethod: + 'did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL', + type: 'Ed25519Signature2018', + created: '2022-04-18T23:13:10Z', + proofPurpose: 'assertionMethod', + jws: 'eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..ECQsj_lABelr1jkehSkqaYpc5CBvbSjbi3ZvgiVVKxZFDYfj5xZmeXb_awa4aw_cGEVaoypeN2uCFmeG6WKkBw', + }, + }, + ], + }, + TEST_VP_DOCUMENT_SIGNED: { + '@context': [CREDENTIALS_CONTEXT_V1_URL], + type: ['VerifiablePresentation'], + verifiableCredential: [ + { + '@context': [CREDENTIALS_CONTEXT_V1_URL, 'https://www.w3.org/2018/credentials/examples/v1'], + type: ['VerifiableCredential', 'UniversityDegreeCredential'], + issuer: 'did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL', + issuanceDate: '2017-10-22T12:23:48Z', + credentialSubject: { + degree: { + type: 'BachelorDegree', + name: 'Bachelor of Science and Arts', + }, + }, + proof: { + verificationMethod: + 'did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL', + type: 'Ed25519Signature2018', + created: '2022-04-18T23:13:10Z', + proofPurpose: 'assertionMethod', + jws: 'eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..ECQsj_lABelr1jkehSkqaYpc5CBvbSjbi3ZvgiVVKxZFDYfj5xZmeXb_awa4aw_cGEVaoypeN2uCFmeG6WKkBw', + }, + }, + ], + proof: { + verificationMethod: + 'did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL', + type: 'Ed25519Signature2018', + created: '2022-04-20T17:31:49Z', + proofPurpose: 'authentication', + challenge: '7bf32d0b-39d4-41f3-96b6-45de52988e4c', + jws: 'eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..yNSkNCfVv6_1-P6CtldiqS2bDe_8DPKBIP3Do9qi0LF2DU_d70pWajevJIBH5NZ8K4AawDYx_irlhdz4aiH3Bw', + }, + }, +} + +export const BbsBlsSignature2020Fixtures = { + TEST_LD_DOCUMENT: { + '@context': [CREDENTIALS_CONTEXT_V1_URL, 'https://w3id.org/citizenship/v1', SECURITY_CONTEXT_BBS_URL], + id: 'https://issuer.oidp.uscis.gov/credentials/83627465', + type: ['VerifiableCredential', 'PermanentResidentCard'], + issuer: '', + identifier: '83627465', + name: 'Permanent Resident Card', + description: 'Government of Example Permanent Resident Card.', + issuanceDate: '2019-12-03T12:19:52Z', + expirationDate: '2029-12-03T12:19:52Z', + credentialSubject: { + id: 'did:example:b34ca6cd37bbf23', + type: ['PermanentResident', 'Person'], + givenName: 'JOHN', + familyName: 'SMITH', + gender: 'Male', + image: 'data:image/png;base64,iVBORw0KGgokJggg==', + residentSince: '2015-01-01', + lprCategory: 'C09', + lprNumber: '999-999-999', + commuterClassification: 'C1', + birthCountry: 'Bahamas', + birthDate: '1958-07-17', + }, + }, + + TEST_LD_DOCUMENT_SIGNED: { + '@context': [CREDENTIALS_CONTEXT_V1_URL, 'https://w3id.org/citizenship/v1', SECURITY_CONTEXT_BBS_URL], + id: 'https://issuer.oidp.uscis.gov/credentials/83627465', + type: ['VerifiableCredential', 'PermanentResidentCard'], + issuer: + 'did:key:zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN', + identifier: '83627465', + name: 'Permanent Resident Card', + description: 'Government of Example Permanent Resident Card.', + issuanceDate: '2019-12-03T12:19:52Z', + expirationDate: '2029-12-03T12:19:52Z', + credentialSubject: { + id: 'did:example:b34ca6cd37bbf23', + type: ['PermanentResident', 'Person'], + givenName: 'JOHN', + familyName: 'SMITH', + gender: 'Male', + image: 'data:image/png;base64,iVBORw0KGgokJggg==', + residentSince: '2015-01-01', + lprCategory: 'C09', + lprNumber: '999-999-999', + commuterClassification: 'C1', + birthCountry: 'Bahamas', + birthDate: '1958-07-17', + }, + proof: { + type: 'BbsBlsSignature2020', + created: '2022-04-13T13:47:47Z', + verificationMethod: + 'did:key:zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN#zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN', + proofPurpose: 'assertionMethod', + proofValue: + 'hoNNnnRIoEoaY9Fvg3pGVG2eWTAHnR1kIM01nObEL2FdI2IkkpM3246jn3VBD8KBYUHlKfzccE4m7waZyoLEkBLFiK2g54Q2i+CdtYBgDdkUDsoULSBMcH1MwGHwdjfXpldFNFrHFx/IAvLVniyeMQ==', + }, + }, + TEST_LD_DOCUMENT_BAD_SIGNED: { + '@context': [CREDENTIALS_CONTEXT_V1_URL, 'https://w3id.org/citizenship/v1', SECURITY_CONTEXT_BBS_URL], + id: 'https://issuer.oidp.uscis.gov/credentials/83627465', + type: ['VerifiableCredential', 'PermanentResidentCard'], + issuer: + 'did:key:zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN', + identifier: '83627465', + name: 'Permanent Resident Card', + description: 'Government of Example Permanent Resident Card.', + issuanceDate: '2019-12-03T12:19:52Z', + expirationDate: '2029-12-03T12:19:52Z', + credentialSubject: { + id: 'did:example:b34ca6cd37bbf23', + type: ['PermanentResident', 'Person'], + givenName: 'JOHN', + familyName: 'SMITH', + gender: 'Male', + image: 'data:image/png;base64,iVBORw0KGgokJggg==', + residentSince: '2015-01-01', + lprCategory: 'C09', + lprNumber: '999-999-999', + commuterClassification: 'C1', + birthCountry: 'Bahamas', + birthDate: '1958-07-17', + }, + proof: { + type: 'BbsBlsSignature2020', + created: '2022-04-13T13:47:47Z', + verificationMethod: + 'did:key:zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN#zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN', + proofPurpose: 'assertionMethod', + proofValue: + 'gU44r/fmvGpkOyMRZX4nwRB6IsbrL7zbVTs+yu6bZGeCNJuiJqS5U6fCPuvGQ+iNYUHlKfzccE4m7waZyoLEkBLFiK2g54Q2i+CdtYBgDdkUDsoULSBMcH1MwGHwdjfXpldFNFrHFx/IAvLVniyeMQ==', + }, + }, + + TEST_VALID_DERIVED: { + '@context': [CREDENTIALS_CONTEXT_V1_URL, 'https://w3id.org/citizenship/v1', SECURITY_CONTEXT_BBS_URL], + id: 'https://issuer.oidp.uscis.gov/credentials/83627465', + type: ['PermanentResidentCard', 'VerifiableCredential'], + description: 'Government of Example Permanent Resident Card.', + identifier: '83627465', + name: 'Permanent Resident Card', + credentialSubject: { + id: 'did:example:b34ca6cd37bbf23', + type: ['Person', 'PermanentResident'], + familyName: 'SMITH', + gender: 'Male', + givenName: 'JOHN', + }, + expirationDate: '2029-12-03T12:19:52Z', + issuanceDate: '2019-12-03T12:19:52Z', + issuer: + 'did:key:zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN', + proof: { + type: 'BbsBlsSignatureProof2020', + created: '2022-04-13T13:47:47Z', + nonce: 'GfuRhH8hSAcWm5RWgUQYNQNWjQBsWuVgMCJrhTCD3kSpnHmQOkHcnNAoBsgyMAT4UUI=', + proofPurpose: 'assertionMethod', + proofValue: + 'ABkB/wbvkcCcbPRE5vrXc++orru4MsgrS4ESsZ30RNCs3noqLwm94/RZNp62I6Hyf0Kmht0Vog70HDtnNzbnMAj/zD9oT/N53pOADrtn5v+xZgP3cK4N2d6amg6h3LXem29gidW9hMrROPLit5cWEIL4/HOzxPxQQGYiwEXdW++Aja5ZuwJoMsIx7ysn4C4ekN7JXZtnAAAAdJR/oeDShxRdSBlnCSUHkE4Ol+Z3AhXBKkxb4AxiMKOiNmBreMTjJUGwNAPNU2aKnAAAAAIBUuKV0W0YBQZY/mwLmwCcyOWMiaEpjnVhYip4jhBBZw1aPBe8GzsG9zv3Sf9XAyGEAvVFe3OvwvMwYY5nZYdYoLSR4TLl1aLw0oChiPm2zb6ApXypCEEVd8KhJMATyssTlY48bEljDNixAD2rVDaoAAAACWjyrWp3b62M5Onuwo9EItCrBjPD68xC12q1agqgwFTnOI0+MfEwVGNZsA0IqkCGrZmo3AyRpcRm51IYDWYorM4hued5EcVHeCGd6NrnLSxTFPEu8lnmCoMXcxBWDCZFRGb//M5WlncbsYiz01itHbSs1nmpj3o+DYlF2ZyOYphvLo5A9T4rWVwHRK1+LeCDEawOnI03DWLyN8U4ZpbpcdZNK421IwNjseYY+ptvvL3juZ2uQR84maAZYy/OjMuHNyzqHPXNgsLLqtrvPo0kncefp+x1jgA0J/b5xfT72+vhKZAN1R48/uPf+DySC3avwD3T+YHjePn1bBOidhCWMjwzI9LYO8VvhcWXzH7nBWh5MeUch+Wkl777KrsLhrXnCg==', + verificationMethod: + 'did:key:zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN#zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN', + }, + }, + + TEST_VP_DOCUMENT: { + '@context': [CREDENTIALS_CONTEXT_V1_URL], + type: ['VerifiablePresentation'], + verifiableCredential: [ + { + '@context': [CREDENTIALS_CONTEXT_V1_URL, 'https://w3id.org/citizenship/v1', SECURITY_CONTEXT_BBS_URL], + id: 'https://issuer.oidp.uscis.gov/credentials/83627465', + type: ['PermanentResidentCard', 'VerifiableCredential'], + description: 'Government of Example Permanent Resident Card.', + identifier: '83627465', + name: 'Permanent Resident Card', + credentialSubject: { + id: 'did:example:b34ca6cd37bbf23', + type: ['Person', 'PermanentResident'], + familyName: 'SMITH', + gender: 'Male', + givenName: 'JOHN', + }, + expirationDate: '2029-12-03T12:19:52Z', + issuanceDate: '2019-12-03T12:19:52Z', + issuer: + 'did:key:zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN', + proof: { + type: 'BbsBlsSignatureProof2020', + created: '2022-04-13T13:47:47Z', + nonce: 'GfuRhH8hSAcWm5RWgUQYNQNWjQBsWuVgMCJrhTCD3kSpnHmQOkHcnNAoBsgyMAT4UUI=', + proofPurpose: 'assertionMethod', + proofValue: + 'ABkB/wbvkcCcbPRE5vrXc++orru4MsgrS4ESsZ30RNCs3noqLwm94/RZNp62I6Hyf0Kmht0Vog70HDtnNzbnMAj/zD9oT/N53pOADrtn5v+xZgP3cK4N2d6amg6h3LXem29gidW9hMrROPLit5cWEIL4/HOzxPxQQGYiwEXdW++Aja5ZuwJoMsIx7ysn4C4ekN7JXZtnAAAAdJR/oeDShxRdSBlnCSUHkE4Ol+Z3AhXBKkxb4AxiMKOiNmBreMTjJUGwNAPNU2aKnAAAAAIBUuKV0W0YBQZY/mwLmwCcyOWMiaEpjnVhYip4jhBBZw1aPBe8GzsG9zv3Sf9XAyGEAvVFe3OvwvMwYY5nZYdYoLSR4TLl1aLw0oChiPm2zb6ApXypCEEVd8KhJMATyssTlY48bEljDNixAD2rVDaoAAAACWjyrWp3b62M5Onuwo9EItCrBjPD68xC12q1agqgwFTnOI0+MfEwVGNZsA0IqkCGrZmo3AyRpcRm51IYDWYorM4hued5EcVHeCGd6NrnLSxTFPEu8lnmCoMXcxBWDCZFRGb//M5WlncbsYiz01itHbSs1nmpj3o+DYlF2ZyOYphvLo5A9T4rWVwHRK1+LeCDEawOnI03DWLyN8U4ZpbpcdZNK421IwNjseYY+ptvvL3juZ2uQR84maAZYy/OjMuHNyzqHPXNgsLLqtrvPo0kncefp+x1jgA0J/b5xfT72+vhKZAN1R48/uPf+DySC3avwD3T+YHjePn1bBOidhCWMjwzI9LYO8VvhcWXzH7nBWh5MeUch+Wkl777KrsLhrXnCg==', + verificationMethod: + 'did:key:zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN#zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN', + }, + }, + ], + }, + TEST_VP_DOCUMENT_SIGNED: { + '@context': [CREDENTIALS_CONTEXT_V1_URL], + type: ['VerifiablePresentation'], + verifiableCredential: [ + { + '@context': [CREDENTIALS_CONTEXT_V1_URL, 'https://w3id.org/citizenship/v1', SECURITY_CONTEXT_BBS_URL], + id: 'https://issuer.oidp.uscis.gov/credentials/83627465', + type: ['PermanentResidentCard', 'VerifiableCredential'], + description: 'Government of Example Permanent Resident Card.', + identifier: '83627465', + name: 'Permanent Resident Card', + credentialSubject: { + id: 'did:example:b34ca6cd37bbf23', + type: ['Person', 'PermanentResident'], + familyName: 'SMITH', + gender: 'Male', + givenName: 'JOHN', + }, + expirationDate: '2029-12-03T12:19:52Z', + issuanceDate: '2019-12-03T12:19:52Z', + issuer: + 'did:key:zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN', + proof: { + type: 'BbsBlsSignatureProof2020', + created: '2022-04-13T13:47:47Z', + nonce: 'GfuRhH8hSAcWm5RWgUQYNQNWjQBsWuVgMCJrhTCD3kSpnHmQOkHcnNAoBsgyMAT4UUI=', + proofPurpose: 'assertionMethod', + proofValue: + 'ABkB/wbvkcCcbPRE5vrXc++orru4MsgrS4ESsZ30RNCs3noqLwm94/RZNp62I6Hyf0Kmht0Vog70HDtnNzbnMAj/zD9oT/N53pOADrtn5v+xZgP3cK4N2d6amg6h3LXem29gidW9hMrROPLit5cWEIL4/HOzxPxQQGYiwEXdW++Aja5ZuwJoMsIx7ysn4C4ekN7JXZtnAAAAdJR/oeDShxRdSBlnCSUHkE4Ol+Z3AhXBKkxb4AxiMKOiNmBreMTjJUGwNAPNU2aKnAAAAAIBUuKV0W0YBQZY/mwLmwCcyOWMiaEpjnVhYip4jhBBZw1aPBe8GzsG9zv3Sf9XAyGEAvVFe3OvwvMwYY5nZYdYoLSR4TLl1aLw0oChiPm2zb6ApXypCEEVd8KhJMATyssTlY48bEljDNixAD2rVDaoAAAACWjyrWp3b62M5Onuwo9EItCrBjPD68xC12q1agqgwFTnOI0+MfEwVGNZsA0IqkCGrZmo3AyRpcRm51IYDWYorM4hued5EcVHeCGd6NrnLSxTFPEu8lnmCoMXcxBWDCZFRGb//M5WlncbsYiz01itHbSs1nmpj3o+DYlF2ZyOYphvLo5A9T4rWVwHRK1+LeCDEawOnI03DWLyN8U4ZpbpcdZNK421IwNjseYY+ptvvL3juZ2uQR84maAZYy/OjMuHNyzqHPXNgsLLqtrvPo0kncefp+x1jgA0J/b5xfT72+vhKZAN1R48/uPf+DySC3avwD3T+YHjePn1bBOidhCWMjwzI9LYO8VvhcWXzH7nBWh5MeUch+Wkl777KrsLhrXnCg==', + verificationMethod: + 'did:key:zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN#zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN', + }, + }, + ], + proof: { + verificationMethod: + 'did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL', + type: 'Ed25519Signature2018', + created: '2022-04-21T10:15:38Z', + proofPurpose: 'authentication', + challenge: 'e950bfe5-d7ec-4303-ad61-6983fb976ac9', + jws: 'eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..wGtR9yuTRfhrsvCthUOn-fg_lK0mZIe2IOO2Lv21aOXo5YUAbk50qMBLk4C1iqoOx-Jz6R0g4aa4cuqpdXzkBw', + }, + }, +} diff --git a/packages/core/src/modules/vc/constants.ts b/packages/core/src/modules/vc/constants.ts new file mode 100644 index 0000000000..6b298625df --- /dev/null +++ b/packages/core/src/modules/vc/constants.ts @@ -0,0 +1,14 @@ +export const SECURITY_CONTEXT_V1_URL = 'https://w3id.org/security/v1' +export const SECURITY_CONTEXT_V2_URL = 'https://w3id.org/security/v2' +export const SECURITY_CONTEXT_V3_URL = 'https://w3id.org/security/v3-unstable' +export const SECURITY_CONTEXT_URL = SECURITY_CONTEXT_V2_URL +export const SECURITY_X25519_CONTEXT_URL = 'https://w3id.org/security/suites/x25519-2019/v1' +export const DID_V1_CONTEXT_URL = 'https://www.w3.org/ns/did/v1' +export const CREDENTIALS_CONTEXT_V1_URL = 'https://www.w3.org/2018/credentials/v1' +export const SECURITY_CONTEXT_BBS_URL = 'https://w3id.org/security/bbs/v1' +export const CREDENTIALS_ISSUER_URL = 'https://www.w3.org/2018/credentials#issuer' +export const SECURITY_PROOF_URL = 'https://w3id.org/security#proof' +export const SECURITY_SIGNATURE_URL = 'https://w3id.org/security#signature' +export const VERIFIABLE_CREDENTIAL_TYPE = 'VerifiableCredential' +export const VERIFIABLE_PRESENTATION_TYPE = 'VerifiablePresentation' +export const EXPANDED_TYPE_CREDENTIALS_CONTEXT_V1_VC_TYPE = 'https://www.w3.org/2018/credentials#VerifiableCredential' diff --git a/packages/core/src/modules/vc/index.ts b/packages/core/src/modules/vc/index.ts new file mode 100644 index 0000000000..7f8b432491 --- /dev/null +++ b/packages/core/src/modules/vc/index.ts @@ -0,0 +1 @@ +export * from './W3cCredentialService' diff --git a/packages/core/src/modules/vc/models/LinkedDataProof.ts b/packages/core/src/modules/vc/models/LinkedDataProof.ts new file mode 100644 index 0000000000..3dd7209dcb --- /dev/null +++ b/packages/core/src/modules/vc/models/LinkedDataProof.ts @@ -0,0 +1,86 @@ +import type { SingleOrArray } from '../../../utils/type' + +import { Transform, TransformationType, plainToInstance, instanceToPlain } from 'class-transformer' +import { IsOptional, IsString } from 'class-validator' + +export interface LinkedDataProofOptions { + type: string + proofPurpose: string + verificationMethod: string + created: string + domain?: string + challenge?: string + jws?: string + proofValue?: string + nonce?: string +} + +/** + * Linked Data Proof + * @see https://w3c.github.io/vc-data-model/#proofs-signatures + * + * @class LinkedDataProof + */ +export class LinkedDataProof { + public constructor(options: LinkedDataProofOptions) { + if (options) { + this.type = options.type + this.proofPurpose = options.proofPurpose + this.verificationMethod = options.verificationMethod + this.created = options.created + this.domain = options.domain + this.challenge = options.challenge + this.jws = options.jws + this.proofValue = options.proofValue + this.nonce = options.nonce + } + } + + @IsString() + public type!: string + + @IsString() + public proofPurpose!: string + + @IsString() + public verificationMethod!: string + + @IsString() + public created!: string + + @IsString() + @IsOptional() + public domain?: string + + @IsString() + @IsOptional() + public challenge?: string + + @IsString() + @IsOptional() + public jws?: string + + @IsString() + @IsOptional() + public proofValue?: string + + @IsString() + @IsOptional() + public nonce?: string +} + +// Custom transformers + +export function LinkedDataProofTransformer() { + return Transform(({ value, type }: { value: SingleOrArray; type: TransformationType }) => { + if (type === TransformationType.PLAIN_TO_CLASS) { + if (Array.isArray(value)) return value.map((v) => plainToInstance(LinkedDataProof, v)) + return plainToInstance(LinkedDataProof, value) + } else if (type === TransformationType.CLASS_TO_PLAIN) { + if (Array.isArray(value)) return value.map((v) => instanceToPlain(v)) + return instanceToPlain(value) + } + // PLAIN_TO_PLAIN + return value + }) +} diff --git a/packages/core/src/modules/vc/models/W3cCredentialServiceOptions.ts b/packages/core/src/modules/vc/models/W3cCredentialServiceOptions.ts new file mode 100644 index 0000000000..b683677576 --- /dev/null +++ b/packages/core/src/modules/vc/models/W3cCredentialServiceOptions.ts @@ -0,0 +1,57 @@ +import type { JsonObject } from '../../../types' +import type { SingleOrArray } from '../../../utils/type' +import type { ProofPurpose } from '../proof-purposes/ProofPurpose' +import type { W3cCredential } from './credential/W3cCredential' +import type { W3cVerifiableCredential } from './credential/W3cVerifiableCredential' +import type { W3cPresentation } from './presentation/W3Presentation' +import type { W3cVerifiablePresentation } from './presentation/W3cVerifiablePresentation' + +export interface SignCredentialOptions { + credential: W3cCredential + proofType: string + verificationMethod: string + proofPurpose?: ProofPurpose + created?: string + domain?: string + challenge?: string + credentialStatus?: { + type: string + } +} + +export interface VerifyCredentialOptions { + credential: W3cVerifiableCredential + proofPurpose?: ProofPurpose +} + +export interface StoreCredentialOptions { + record: W3cVerifiableCredential +} + +export interface CreatePresentationOptions { + credentials: SingleOrArray + id?: string + holderUrl?: string +} + +export interface SignPresentationOptions { + presentation: W3cPresentation + signatureType: string + purpose: ProofPurpose + verificationMethod: string + challenge: string +} + +export interface VerifyPresentationOptions { + presentation: W3cVerifiablePresentation + proofType: string + verificationMethod: string + purpose?: ProofPurpose + challenge?: string +} + +export interface DeriveProofOptions { + credential: W3cVerifiableCredential + revealDocument: JsonObject + verificationMethod: string +} diff --git a/packages/core/src/modules/vc/models/credential/CredentialSchema.ts b/packages/core/src/modules/vc/models/credential/CredentialSchema.ts new file mode 100644 index 0000000000..c98ba30fea --- /dev/null +++ b/packages/core/src/modules/vc/models/credential/CredentialSchema.ts @@ -0,0 +1,23 @@ +import { IsString } from 'class-validator' + +import { IsUri } from '../../../../utils/validators' + +export interface CredentialSchemaOptions { + id: string + type: string +} + +export class CredentialSchema { + public constructor(options: CredentialSchemaOptions) { + if (options) { + this.id = options.id + this.type = options.type + } + } + + @IsUri() + public id!: string + + @IsString() + public type!: string +} diff --git a/packages/core/src/modules/vc/models/credential/CredentialSubject.ts b/packages/core/src/modules/vc/models/credential/CredentialSubject.ts new file mode 100644 index 0000000000..7462a68066 --- /dev/null +++ b/packages/core/src/modules/vc/models/credential/CredentialSubject.ts @@ -0,0 +1,40 @@ +import { Transform, TransformationType, plainToInstance, instanceToPlain } from 'class-transformer' +import { isString } from 'class-validator' + +import { IsUri } from '../../../../utils/validators' + +/** + * TODO: check how to support arbitrary data in class + * @see https://www.w3.org/TR/vc-data-model/#credential-subject + */ + +export interface CredentialSubjectOptions { + id: string +} + +export class CredentialSubject { + public constructor(options: CredentialSubjectOptions) { + if (options) { + this.id = options.id + } + } + + @IsUri() + public id!: string +} + +// Custom transformers + +export function CredentialSubjectTransformer() { + return Transform(({ value, type }: { value: string | CredentialSubjectOptions; type: TransformationType }) => { + if (type === TransformationType.PLAIN_TO_CLASS) { + if (isString(value)) return value + return plainToInstance(CredentialSubject, value) + } else if (type === TransformationType.CLASS_TO_PLAIN) { + if (isString(value)) return value + return instanceToPlain(value) + } + // PLAIN_TO_PLAIN + return value + }) +} diff --git a/packages/core/src/modules/vc/models/credential/Issuer.ts b/packages/core/src/modules/vc/models/credential/Issuer.ts new file mode 100644 index 0000000000..6eb4359087 --- /dev/null +++ b/packages/core/src/modules/vc/models/credential/Issuer.ts @@ -0,0 +1,68 @@ +import type { ValidationOptions } from 'class-validator' + +import { Transform, TransformationType, plainToInstance, instanceToPlain } from 'class-transformer' +import { buildMessage, isInstance, isString, ValidateBy } from 'class-validator' + +import { IsUri, UriValidator } from '../../../../utils/validators' + +/** + * TODO: check how to support arbitrary data in class + * @see https://www.w3.org/TR/vc-data-model/#credential-subject + */ + +export interface IssuerOptions { + id: string +} + +export class Issuer { + public constructor(options: IssuerOptions) { + if (options) { + this.id = options.id + } + } + + @IsUri() + public id!: string +} + +// Custom transformers + +export function IssuerTransformer() { + return Transform(({ value, type }: { value: string | IssuerOptions; type: TransformationType }) => { + if (type === TransformationType.PLAIN_TO_CLASS) { + if (isString(value)) return value + return plainToInstance(Issuer, value) + } else if (type === TransformationType.CLASS_TO_PLAIN) { + if (isString(value)) return value + return instanceToPlain(value) + } + // PLAIN_TO_PLAIN + return value + }) +} + +// Custom validators + +export function IsIssuer(validationOptions?: ValidationOptions): PropertyDecorator { + return ValidateBy( + { + name: 'IsIssuer', + validator: { + validate: (value): boolean => { + if (typeof value === 'string') { + return UriValidator.test(value) + } + if (isInstance(value, Issuer)) { + return UriValidator.test(value.id) + } + return false + }, + defaultMessage: buildMessage( + (eachPrefix) => eachPrefix + '$property must be a string or an object with an id property', + validationOptions + ), + }, + }, + validationOptions + ) +} diff --git a/packages/core/src/modules/vc/models/credential/W3cCredential.ts b/packages/core/src/modules/vc/models/credential/W3cCredential.ts new file mode 100644 index 0000000000..beed50d700 --- /dev/null +++ b/packages/core/src/modules/vc/models/credential/W3cCredential.ts @@ -0,0 +1,128 @@ +import type { JsonObject } from '../../../../types' +import type { CredentialSubjectOptions } from './CredentialSubject' +import type { IssuerOptions } from './Issuer' +import type { ValidationOptions } from 'class-validator' + +import { Expose, Type } from 'class-transformer' +import { buildMessage, IsOptional, IsString, ValidateBy } from 'class-validator' + +import { SingleOrArray } from '../../../../utils/type' +import { IsInstanceOrArrayOfInstances, IsUri } from '../../../../utils/validators' +import { CREDENTIALS_CONTEXT_V1_URL, VERIFIABLE_CREDENTIAL_TYPE } from '../../constants' +import { IsJsonLdContext } from '../../validators' + +import { CredentialSchema } from './CredentialSchema' +import { CredentialSubject } from './CredentialSubject' +import { Issuer, IsIssuer, IssuerTransformer } from './Issuer' + +export interface W3cCredentialOptions { + context: Array | JsonObject + id?: string + type: Array + issuer: string | IssuerOptions + issuanceDate: string + expirationDate?: string + credentialSubject: SingleOrArray +} + +export class W3cCredential { + public constructor(options: W3cCredentialOptions) { + if (options) { + this.context = options.context ?? [CREDENTIALS_CONTEXT_V1_URL] + this.id = options.id + this.type = options.type || [] + this.issuer = options.issuer + this.issuanceDate = options.issuanceDate + this.expirationDate = options.expirationDate + this.credentialSubject = options.credentialSubject + } + } + + @Expose({ name: '@context' }) + @IsJsonLdContext() + public context!: Array | JsonObject + + @IsOptional() + @IsUri() + public id?: string + + @IsCredentialType() + public type!: Array + + @IssuerTransformer() + @IsIssuer() + public issuer!: string | Issuer + + @IsString() + public issuanceDate!: string + + @IsString() + @IsOptional() + public expirationDate?: string + + @Type(() => CredentialSubject) + @IsInstanceOrArrayOfInstances({ classType: CredentialSubject }) + public credentialSubject!: SingleOrArray + + @IsOptional() + @Type(() => CredentialSchema) + @IsInstanceOrArrayOfInstances({ classType: CredentialSchema }) + public credentialSchema?: SingleOrArray + + public get issuerId(): string { + return this.issuer instanceof Issuer ? this.issuer.id : this.issuer + } + + public get credentialSchemaIds(): string[] { + if (!this.credentialSchema) return [] + + if (Array.isArray(this.credentialSchema)) { + return this.credentialSchema.map((credentialSchema) => credentialSchema.id) + } + + return [this.credentialSchema.id] + } + + public get credentialSubjectIds(): string[] { + if (Array.isArray(this.credentialSubject)) { + return this.credentialSubject.map((credentialSubject) => credentialSubject.id) + } + + return [this.credentialSubject.id] + } + + public get contexts(): Array { + if (Array.isArray(this.context)) { + return this.context.filter((x) => typeof x === 'string') + } + + if (typeof this.context === 'string') { + return [this.context] + } + + return [this.context.id as string] + } +} + +// Custom validator + +export function IsCredentialType(validationOptions?: ValidationOptions): PropertyDecorator { + return ValidateBy( + { + name: 'IsVerifiableCredentialType', + validator: { + validate: (value): boolean => { + if (Array.isArray(value)) { + return value.includes(VERIFIABLE_CREDENTIAL_TYPE) + } + return false + }, + defaultMessage: buildMessage( + (eachPrefix) => eachPrefix + '$property must be an array of strings which includes "VerifiableCredential"', + validationOptions + ), + }, + }, + validationOptions + ) +} diff --git a/packages/core/src/modules/vc/models/credential/W3cCredentialRecord.ts b/packages/core/src/modules/vc/models/credential/W3cCredentialRecord.ts new file mode 100644 index 0000000000..a69fa03739 --- /dev/null +++ b/packages/core/src/modules/vc/models/credential/W3cCredentialRecord.ts @@ -0,0 +1,58 @@ +import type { TagsBase } from '../../../../storage/BaseRecord' + +import { Type } from 'class-transformer' + +import { BaseRecord } from '../../../../storage/BaseRecord' +import { uuid } from '../../../../utils/uuid' + +import { W3cVerifiableCredential } from './W3cVerifiableCredential' + +export interface W3cCredentialRecordOptions { + id?: string + createdAt?: Date + credential: W3cVerifiableCredential + tags: CustomW3cCredentialTags +} + +export type CustomW3cCredentialTags = TagsBase & { + expandedTypes?: Array +} + +export type DefaultCredentialTags = { + issuerId: string + subjectIds: Array + schemaIds: Array + contexts: Array + proofTypes: Array + givenId?: string +} + +export class W3cCredentialRecord extends BaseRecord { + public static readonly type = 'W3cCredentialRecord' + public readonly type = W3cCredentialRecord.type + + @Type(() => W3cVerifiableCredential) + public credential!: W3cVerifiableCredential + + public constructor(props: W3cCredentialRecordOptions) { + super() + if (props) { + this.id = props.id ?? uuid() + this.createdAt = props.createdAt ?? new Date() + this._tags = props.tags + this.credential = props.credential + } + } + + public getTags() { + return { + ...this._tags, + issuerId: this.credential.issuerId, + subjectIds: this.credential.credentialSubjectIds, + schemaIds: this.credential.credentialSchemaIds, + contexts: this.credential.contexts, + proofTypes: this.credential.proofTypes, + givedId: this.credential.id, + } + } +} diff --git a/packages/core/src/modules/vc/models/credential/W3cCredentialRepository.ts b/packages/core/src/modules/vc/models/credential/W3cCredentialRepository.ts new file mode 100644 index 0000000000..baf11e4dba --- /dev/null +++ b/packages/core/src/modules/vc/models/credential/W3cCredentialRepository.ts @@ -0,0 +1,14 @@ +import { inject, scoped, Lifecycle } from 'tsyringe' + +import { InjectionSymbols } from '../../../../constants' +import { Repository } from '../../../../storage/Repository' +import { StorageService } from '../../../../storage/StorageService' + +import { W3cCredentialRecord } from './W3cCredentialRecord' + +@scoped(Lifecycle.ContainerScoped) +export class W3cCredentialRepository extends Repository { + public constructor(@inject(InjectionSymbols.StorageService) storageService: StorageService) { + super(W3cCredentialRecord, storageService) + } +} diff --git a/packages/core/src/modules/vc/models/credential/W3cVerifiableCredential.ts b/packages/core/src/modules/vc/models/credential/W3cVerifiableCredential.ts new file mode 100644 index 0000000000..e2d1b1afe3 --- /dev/null +++ b/packages/core/src/modules/vc/models/credential/W3cVerifiableCredential.ts @@ -0,0 +1,53 @@ +import type { LinkedDataProofOptions } from '../LinkedDataProof' +import type { W3cCredentialOptions } from './W3cCredential' + +import { instanceToPlain, plainToInstance, Transform, TransformationType } from 'class-transformer' + +import { orArrayToArray } from '../../../../utils' +import { SingleOrArray } from '../../../../utils/type' +import { IsInstanceOrArrayOfInstances } from '../../../../utils/validators' +import { LinkedDataProof, LinkedDataProofTransformer } from '../LinkedDataProof' + +import { W3cCredential } from './W3cCredential' + +export interface W3cVerifiableCredentialOptions extends W3cCredentialOptions { + proof: SingleOrArray +} + +export class W3cVerifiableCredential extends W3cCredential { + public constructor(options: W3cVerifiableCredentialOptions) { + super(options) + if (options) { + this.proof = Array.isArray(options.proof) + ? options.proof.map((proof) => new LinkedDataProof(proof)) + : new LinkedDataProof(options.proof) + } + } + + @LinkedDataProofTransformer() + @IsInstanceOrArrayOfInstances({ classType: LinkedDataProof }) + public proof!: SingleOrArray + + public get proofTypes(): Array { + const proofArray = orArrayToArray(this.proof) + return proofArray?.map((x) => x.type) ?? [] + } +} + +// Custom transformers + +export function VerifiableCredentialTransformer() { + return Transform( + ({ value, type }: { value: SingleOrArray; type: TransformationType }) => { + if (type === TransformationType.PLAIN_TO_CLASS) { + if (Array.isArray(value)) return value.map((v) => plainToInstance(W3cVerifiableCredential, v)) + return plainToInstance(W3cVerifiableCredential, value) + } else if (type === TransformationType.CLASS_TO_PLAIN) { + if (Array.isArray(value)) return value.map((v) => instanceToPlain(v)) + return instanceToPlain(value) + } + // PLAIN_TO_PLAIN + return value + } + ) +} diff --git a/packages/core/src/modules/vc/models/credential/W3cVerifyCredentialResult.ts b/packages/core/src/modules/vc/models/credential/W3cVerifyCredentialResult.ts new file mode 100644 index 0000000000..9f8880467a --- /dev/null +++ b/packages/core/src/modules/vc/models/credential/W3cVerifyCredentialResult.ts @@ -0,0 +1,15 @@ +import type { JsonObject } from '../../../../types' +import type { W3cVerifiableCredential } from './W3cVerifiableCredential' + +export interface VerifyCredentialResult { + credential: W3cVerifiableCredential + verified: boolean + error?: Error +} + +export interface W3cVerifyCredentialResult { + verified: boolean + statusResult: JsonObject + results: Array + error?: Error +} diff --git a/packages/core/src/modules/vc/models/index.ts b/packages/core/src/modules/vc/models/index.ts new file mode 100644 index 0000000000..37c71ef25d --- /dev/null +++ b/packages/core/src/modules/vc/models/index.ts @@ -0,0 +1,3 @@ +export * from './credential/W3cCredential' +export * from './credential/W3cVerifiableCredential' +export * from './credential/W3cVerifyCredentialResult' diff --git a/packages/core/src/modules/vc/models/presentation/VerifyPresentationResult.ts b/packages/core/src/modules/vc/models/presentation/VerifyPresentationResult.ts new file mode 100644 index 0000000000..41a9041e04 --- /dev/null +++ b/packages/core/src/modules/vc/models/presentation/VerifyPresentationResult.ts @@ -0,0 +1,9 @@ +import type { JsonObject } from '../../../../types' +import type { VerifyCredentialResult } from '../credential/W3cVerifyCredentialResult' + +export interface VerifyPresentationResult { + verified: boolean + presentationResult: JsonObject // the precise interface of this object is still unclear + credentialResults: Array + error?: Error +} diff --git a/packages/core/src/modules/vc/models/presentation/W3Presentation.ts b/packages/core/src/modules/vc/models/presentation/W3Presentation.ts new file mode 100644 index 0000000000..1ee6ae677f --- /dev/null +++ b/packages/core/src/modules/vc/models/presentation/W3Presentation.ts @@ -0,0 +1,77 @@ +import type { JsonObject } from '../../../../types' +import type { W3cVerifiableCredentialOptions } from '../credential/W3cVerifiableCredential' +import type { ValidationOptions } from 'class-validator' + +import { Expose } from 'class-transformer' +import { buildMessage, IsOptional, IsString, ValidateBy } from 'class-validator' + +import { SingleOrArray } from '../../../../utils/type' +import { IsUri, IsInstanceOrArrayOfInstances } from '../../../../utils/validators' +import { VERIFIABLE_PRESENTATION_TYPE } from '../../constants' +import { IsJsonLdContext } from '../../validators' +import { VerifiableCredentialTransformer, W3cVerifiableCredential } from '../credential/W3cVerifiableCredential' + +export interface W3cPresentationOptions { + id?: string + context: Array | JsonObject + verifiableCredential: SingleOrArray + type: Array + holder?: string +} + +export class W3cPresentation { + public constructor(options: W3cPresentationOptions) { + if (options) { + this.id = options.id + this.context = options.context + this.type = options.type + this.verifiableCredential = Array.isArray(options.verifiableCredential) + ? options.verifiableCredential.map((vc) => new W3cVerifiableCredential(vc)) + : new W3cVerifiableCredential(options.verifiableCredential) + this.holder = options.holder + } + } + + @Expose({ name: '@context' }) + @IsJsonLdContext() + public context!: Array | JsonObject + + @IsOptional() + @IsUri() + public id?: string + + @IsVerifiablePresentationType() + public type!: Array + + @IsOptional() + @IsString() + @IsUri() + public holder?: string + + @VerifiableCredentialTransformer() + @IsInstanceOrArrayOfInstances({ classType: W3cVerifiableCredential }) + public verifiableCredential!: SingleOrArray +} + +// Custom validators + +export function IsVerifiablePresentationType(validationOptions?: ValidationOptions): PropertyDecorator { + return ValidateBy( + { + name: 'IsVerifiablePresentationType', + validator: { + validate: (value): boolean => { + if (Array.isArray(value)) { + return value.includes(VERIFIABLE_PRESENTATION_TYPE) + } + return false + }, + defaultMessage: buildMessage( + (eachPrefix) => eachPrefix + '$property must be an array of strings which includes "VerifiablePresentation"', + validationOptions + ), + }, + }, + validationOptions + ) +} diff --git a/packages/core/src/modules/vc/models/presentation/W3cVerifiablePresentation.ts b/packages/core/src/modules/vc/models/presentation/W3cVerifiablePresentation.ts new file mode 100644 index 0000000000..2645fb9cc5 --- /dev/null +++ b/packages/core/src/modules/vc/models/presentation/W3cVerifiablePresentation.ts @@ -0,0 +1,25 @@ +import type { LinkedDataProofOptions } from '../LinkedDataProof' +import type { W3cPresentationOptions } from './W3Presentation' + +import { SingleOrArray } from '../../../../utils/type' +import { IsInstanceOrArrayOfInstances } from '../../../../utils/validators' +import { LinkedDataProof, LinkedDataProofTransformer } from '../LinkedDataProof' + +import { W3cPresentation } from './W3Presentation' + +export interface W3cVerifiablePresentationOptions extends W3cPresentationOptions { + proof: LinkedDataProofOptions +} + +export class W3cVerifiablePresentation extends W3cPresentation { + public constructor(options: W3cVerifiablePresentationOptions) { + super(options) + if (options) { + this.proof = new LinkedDataProof(options.proof) + } + } + + @LinkedDataProofTransformer() + @IsInstanceOrArrayOfInstances({ classType: LinkedDataProof }) + public proof!: SingleOrArray +} diff --git a/packages/core/src/modules/vc/proof-purposes/CredentialIssuancePurpose.ts b/packages/core/src/modules/vc/proof-purposes/CredentialIssuancePurpose.ts new file mode 100644 index 0000000000..c4127374e7 --- /dev/null +++ b/packages/core/src/modules/vc/proof-purposes/CredentialIssuancePurpose.ts @@ -0,0 +1,89 @@ +import type { JsonObject } from '../../../types' +import type { DocumentLoader, Proof } from '../../../utils' + +import jsonld from '../../../../types/jsonld' +import { suites, purposes } from '../../../../types/jsonld-signatures' + +const AssertionProofPurpose = purposes.AssertionProofPurpose +const LinkedDataProof = suites.LinkedDataProof +/** + * Creates a proof purpose that will validate whether or not the verification + * method in a proof was authorized by its declared controller for the + * proof's purpose. + */ +export class CredentialIssuancePurpose extends AssertionProofPurpose { + /** + * @param {object} options - The options to use. + * @param {object} [options.controller] - The description of the controller, + * if it is not to be dereferenced via a `documentLoader`. + * @param {string|Date|number} [options.date] - The expected date for + * the creation of the proof. + * @param {number} [options.maxTimestampDelta=Infinity] - A maximum number + * of seconds that the date on the signature can deviate from. + */ + public constructor(options: { controller?: Record; date: string; maxTimestampDelta?: number }) { + options.maxTimestampDelta = options.maxTimestampDelta || Infinity + super(options) + } + + /** + * Validates the purpose of a proof. This method is called during + * proof verification, after the proof value has been checked against the + * given verification method (in the case of a digital signature, the + * signature has been cryptographically verified against the public key). + * + * @param {object} proof - The proof to validate. + * @param {object} options - The options to use. + * @param {object} options.document - The document whose signature is + * being verified. + * @param {object} options.suite - Signature suite used in + * the proof. + * @param {string} options.verificationMethod - Key id URL to the paired + * public key. + * @param {object} [options.documentLoader] - A document loader. + * @param {object} [options.expansionMap] - An expansion map. + * + * @throws {Error} If verification method not authorized by controller. + * @throws {Error} If proof's created timestamp is out of range. + * + * @returns {Promise<{valid: boolean, error: Error}>} Resolves on completion. + */ + public async validate( + proof: Proof, + options?: { + document: JsonObject + suite: typeof LinkedDataProof + verificationMethod: string + documentLoader?: DocumentLoader + expansionMap?: () => void + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ): Promise<{ valid: boolean; error?: any }> { + try { + const result = await super.validate(proof, options) + + if (!result.valid) { + throw result.error + } + + // This @ts-ignore is necessary because the .getValues() method is not part of the public API. + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + //@ts-ignore + const issuer = jsonld.util.getValues(options.document, 'issuer') + + if (!issuer || issuer.length === 0) { + throw new Error('Credential issuer is required.') + } + + const issuerId = typeof issuer[0] === 'string' ? issuer[0] : issuer[0].id + + if (result.controller.id !== issuerId) { + throw new Error('Credential issuer must match the verification method controller.') + } + + return { valid: true } + } catch (error) { + return { valid: false, error } + } + } +} diff --git a/packages/core/src/modules/vc/proof-purposes/ProofPurpose.ts b/packages/core/src/modules/vc/proof-purposes/ProofPurpose.ts new file mode 100644 index 0000000000..2695f3276c --- /dev/null +++ b/packages/core/src/modules/vc/proof-purposes/ProofPurpose.ts @@ -0,0 +1 @@ +export type ProofPurpose = any diff --git a/packages/core/src/modules/vc/validators.ts b/packages/core/src/modules/vc/validators.ts new file mode 100644 index 0000000000..0bce78fa79 --- /dev/null +++ b/packages/core/src/modules/vc/validators.ts @@ -0,0 +1,32 @@ +import type { ValidationOptions } from 'class-validator' + +import { buildMessage, isString, isURL, ValidateBy } from 'class-validator' + +import { CREDENTIALS_CONTEXT_V1_URL } from './constants' + +export function IsJsonLdContext(validationOptions?: ValidationOptions): PropertyDecorator { + return ValidateBy( + { + name: 'IsJsonLdContext', + validator: { + validate: (value): boolean => { + // If value is an array, check if all items are strings, are URLs and that + // the first entry is a verifiable credential context + if (Array.isArray(value)) { + return value.every((v) => isString(v) && isURL(v)) && value[0] === CREDENTIALS_CONTEXT_V1_URL + } + // If value is not an array, check if it is an object (assuming it's a JSON-LD context definition) + if (typeof value === 'object') { + return true + } + return false + }, + defaultMessage: buildMessage( + (eachPrefix) => eachPrefix + '$property must be an array of strings or a JSON-LD context definition', + validationOptions + ), + }, + }, + validationOptions + ) +} diff --git a/packages/core/src/utils/environment.ts b/packages/core/src/utils/environment.ts new file mode 100644 index 0000000000..b2ebadf0dd --- /dev/null +++ b/packages/core/src/utils/environment.ts @@ -0,0 +1,9 @@ +export function isNodeJS() { + return typeof process !== 'undefined' && process.release && process.release.name === 'node' +} + +export function isReactNative() { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + return typeof navigator != 'undefined' && navigator.product == 'ReactNative' +} diff --git a/packages/core/src/utils/error.ts b/packages/core/src/utils/error.ts new file mode 100644 index 0000000000..530264240a --- /dev/null +++ b/packages/core/src/utils/error.ts @@ -0,0 +1 @@ +export const isError = (value: unknown): value is Error => value instanceof Error diff --git a/packages/core/src/utils/index.ts b/packages/core/src/utils/index.ts index e9352470ff..318ad5d39f 100644 --- a/packages/core/src/utils/index.ts +++ b/packages/core/src/utils/index.ts @@ -9,3 +9,4 @@ export * from './regex' export * from './indyProofRequest' export * from './VarintEncoder' export * from './Hasher' +export * from './jsonld' diff --git a/packages/core/src/utils/jsonld.ts b/packages/core/src/utils/jsonld.ts new file mode 100644 index 0000000000..86c1ba7aea --- /dev/null +++ b/packages/core/src/utils/jsonld.ts @@ -0,0 +1,156 @@ +import type { GetProofsOptions, GetProofsResult, GetTypeOptions } from '../crypto/signature-suites/bbs' +import type { JsonObject, JsonValue } from '../types' +import type { SingleOrArray } from './type' + +import jsonld from '../../types/jsonld' +import { SECURITY_CONTEXT_URL } from '../modules/vc/constants' + +export type JsonLdDoc = Record +export interface VerificationMethod extends JsonObject { + id: string + [key: string]: JsonValue +} + +export interface Proof extends JsonObject { + verificationMethod: string | VerificationMethod + [key: string]: JsonValue +} + +export interface DocumentLoaderResult { + contextUrl?: string | null + documentUrl: string + document: Record +} + +export type DocumentLoader = (url: string) => Promise + +export const orArrayToArray = (val?: SingleOrArray): Array => { + if (!val) return [] + if (Array.isArray(val)) return val + return [val] +} + +export const _includesContext = (options: { document: JsonLdDoc; contextUrl: string }) => { + const context = options.document['@context'] + + return context === options.contextUrl || (Array.isArray(context) && context.includes(options.contextUrl)) +} + +/* + * The code in this file originated from + * @see https://github.com/digitalbazaar/jsonld-signatures + * Hence the following copyright notice applies + * + * Copyright (c) 2017-2018 Digital Bazaar, Inc. All rights reserved. + */ + +/** + * The property identifying the linked data proof + * Note - this will not work for legacy systems that + * relying on `signature` + */ +const PROOF_PROPERTY = 'proof' + +/** + * Gets a supported linked data proof from a JSON-LD Document + * Note - unless instructed not to the document will be compacted + * against the security v2 context @see https://w3id.org/security/v2 + * + * @param options Options for extracting the proof from the document + * + * @returns {GetProofsResult} An object containing the matched proofs and the JSON-LD document + */ +export const getProofs = async (options: GetProofsOptions): Promise => { + const { proofType, skipProofCompaction, documentLoader, expansionMap } = options + let { document } = options + + let proofs + if (!skipProofCompaction) { + // If we must compact the proof then we must first compact the input + // document to find the proof + document = await jsonld.compact(document, SECURITY_CONTEXT_URL, { + documentLoader, + expansionMap, + compactToRelative: false, + }) + } + + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore - needed because getValues is not part of the public API. + proofs = jsonld.getValues(document, PROOF_PROPERTY) + delete document[PROOF_PROPERTY] + + if (typeof proofType === 'string') { + proofs = proofs.filter((_: Record) => _.type == proofType) + } + if (Array.isArray(proofType)) { + proofs = proofs.filter((_: Record) => proofType.includes(_.type)) + } + + proofs = proofs.map((matchedProof: Record) => ({ + '@context': SECURITY_CONTEXT_URL, + ...matchedProof, + })) + + return { + proofs, + document, + } +} + +/** + * Formats an input date to w3c standard date format + * @param date {number|string} Optional if not defined current date is returned + * + * @returns {string} date in a standard format as a string + */ +export const w3cDate = (date?: number | string): string => { + let result = new Date() + if (typeof date === 'number' || typeof date === 'string') { + result = new Date(date) + } + const str = result.toISOString() + return str.substr(0, str.length - 5) + 'Z' +} + +/** + * Gets the JSON-LD type information for a document + * @param document {any} JSON-LD document to extract the type information from + * @param options {GetTypeInfoOptions} Options for extracting the JSON-LD document + * + * @returns {object} Type info for the JSON-LD document + */ +export const getTypeInfo = async ( + document: JsonObject, + options: GetTypeOptions +): Promise<{ types: string[]; alias: string }> => { + const { documentLoader, expansionMap } = options + + // determine `@type` alias, if any + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore - needed because getValues is not part of the public API. + const context = jsonld.getValues(document, '@context') + + const compacted = await jsonld.compact({ '@type': '_:b0' }, context, { + documentLoader, + expansionMap, + }) + + delete compacted['@context'] + + const alias = Object.keys(compacted)[0] + + // optimize: expand only `@type` and `type` values + /* eslint-disable prefer-const */ + let toExpand: Record = { '@context': context } + + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore - needed because getValues is not part of the public API. + toExpand['@type'] = jsonld.getValues(document, '@type').concat(jsonld.getValues(document, alias)) + + const expanded = (await jsonld.expand(toExpand, { documentLoader, expansionMap }))[0] || {} + + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore - needed because getValues is not part of the public API. + return { types: jsonld.getValues(expanded, '@type'), alias } +} diff --git a/packages/core/src/utils/type.ts b/packages/core/src/utils/type.ts index c49bfda4cb..2155975323 100644 --- a/packages/core/src/utils/type.ts +++ b/packages/core/src/utils/type.ts @@ -1,5 +1,7 @@ import type { JsonObject } from '../types' +export type SingleOrArray = T | T[] + export type Optional = Pick, K> & Omit export const isString = (value: unknown): value is string => typeof value === 'string' diff --git a/packages/core/src/utils/validators.ts b/packages/core/src/utils/validators.ts index 3a822fdca9..f32fe1c08f 100644 --- a/packages/core/src/utils/validators.ts +++ b/packages/core/src/utils/validators.ts @@ -3,6 +3,10 @@ import type { ValidationOptions } from 'class-validator' import { isString, ValidateBy, isInstance, buildMessage } from 'class-validator' +export interface IsInstanceOrArrayOfInstancesValidationOptions extends ValidationOptions { + classType: new (...args: any[]) => any +} + /** * Checks if the value is an instance of the specified object. */ @@ -27,3 +31,55 @@ export function IsStringOrInstance(targetType: Constructor, validationOptions?: validationOptions ) } + +export function IsInstanceOrArrayOfInstances( + validationOptions: IsInstanceOrArrayOfInstancesValidationOptions +): PropertyDecorator { + return ValidateBy( + { + name: 'isInstanceOrArrayOfInstances', + validator: { + validate: (value): boolean => { + if (Array.isArray(value)) { + value.forEach((item) => { + if (!isInstance(item, validationOptions.classType)) { + return false + } + }) + return true + } + return isInstance(value, validationOptions.classType) + }, + defaultMessage: buildMessage( + (eachPrefix) => eachPrefix + `$property must be a string or instance of ${validationOptions.classType.name}`, + validationOptions + ), + }, + }, + validationOptions + ) +} + +export function isStringArray(value: any): value is string[] { + return Array.isArray(value) && value.every((v) => typeof v === 'string') +} + +export const UriValidator = new RegExp('w+:(/?/?)[^s]+') + +export function IsUri(validationOptions?: ValidationOptions): PropertyDecorator { + return ValidateBy( + { + name: 'isInstanceOrArrayOfInstances', + validator: { + validate: (value): boolean => { + return UriValidator.test(value) + }, + defaultMessage: buildMessage( + (eachPrefix) => eachPrefix + `$property must be a string that matches regex: ${UriValidator.source}`, + validationOptions + ), + }, + }, + validationOptions + ) +} diff --git a/packages/core/src/wallet/IndyWallet.ts b/packages/core/src/wallet/IndyWallet.ts index 1212ae5503..719f6c51c0 100644 --- a/packages/core/src/wallet/IndyWallet.ts +++ b/packages/core/src/wallet/IndyWallet.ts @@ -9,24 +9,25 @@ import type { } from '../types' import type { Buffer } from '../utils/buffer' import type { - UnpackedMessageContext, Wallet, DidInfo, DidConfig, CreateKeyOptions, - SignOptions, VerifyOptions, + SignOptions, + UnpackedMessageContext, } from './Wallet' import type { default as Indy, WalletStorageConfig } from 'indy-sdk' import { Lifecycle, scoped } from 'tsyringe' import { AgentConfig } from '../agent/AgentConfig' -import { KeyType } from '../crypto' import { BbsService } from '../crypto/BbsService' import { Key } from '../crypto/Key' +import { KeyType } from '../crypto/KeyType' import { AriesFrameworkError, IndySdkError, RecordDuplicateError, RecordNotFoundError } from '../error' import { TypedArrayEncoder, JsonEncoder } from '../utils' +import { isError } from '../utils/error' import { isIndyError } from '../utils/indyError' import { WalletDuplicateError, WalletNotFoundError, WalletError } from './error' @@ -151,6 +152,9 @@ export class IndyWallet implements Wallet { cause: error, }) } else { + if (!isError(error)) { + throw new AriesFrameworkError('Attempted to throw error, but it was not of type Error') + } const errorMessage = `Error creating wallet '${walletConfig.id}'` this.logger.error(errorMessage, { error, @@ -233,6 +237,9 @@ export class IndyWallet implements Wallet { cause: error, }) } else { + if (!isError(error)) { + throw new AriesFrameworkError('Attempted to throw error, but it was not of type Error') + } const errorMessage = `Error opening wallet '${walletConfig.id}': ${error.message}` this.logger.error(errorMessage, { error, @@ -278,6 +285,9 @@ export class IndyWallet implements Wallet { cause: error, }) } else { + if (!isError(error)) { + throw new AriesFrameworkError('Attempted to throw error, but it was not of type Error') + } const errorMessage = `Error deleting wallet '${this.walletConfig.id}': ${error.message}` this.logger.error(errorMessage, { error, @@ -294,6 +304,9 @@ export class IndyWallet implements Wallet { this.logger.debug(`Exporting wallet ${this.walletConfig?.id} to path ${exportConfig.path}`) await this.indy.exportWallet(this.handle, exportConfig) } catch (error) { + if (!isError(error)) { + throw new AriesFrameworkError('Attempted to throw error, but it was not of type Error') + } const errorMessage = `Error exporting wallet: ${error.message}` this.logger.error(errorMessage, { error, @@ -312,6 +325,9 @@ export class IndyWallet implements Wallet { importConfig ) } catch (error) { + if (!isError(error)) { + throw new AriesFrameworkError('Attempted to throw error, but it was not of type Error') + } const errorMessage = `Error importing wallet': ${error.message}` this.logger.error(errorMessage, { error, @@ -342,6 +358,9 @@ export class IndyWallet implements Wallet { cause: error, }) } else { + if (!isError(error)) { + throw new AriesFrameworkError('Attempted to throw error, but it was not of type Error') + } const errorMessage = `Error closing wallet': ${error.message}` this.logger.error(errorMessage, { error, @@ -381,6 +400,10 @@ export class IndyWallet implements Wallet { return masterSecretId } else { + if (!isIndyError(error)) { + throw new AriesFrameworkError('Attempted to throw Indy error, but it was not an Indy error') + } + this.logger.error(`Error creating master secret with id ${masterSecretId}`, { indyError: error.indyName, error, @@ -408,6 +431,9 @@ export class IndyWallet implements Wallet { return { did, verkey } } catch (error) { + if (!isError(error)) { + throw new AriesFrameworkError('Attempted to throw error, but it was not of type Error') + } throw new WalletError('Error creating Did', { cause: error }) } } @@ -441,6 +467,9 @@ export class IndyWallet implements Wallet { return Key.fromPublicKeyBase58(blsKeyPair.publicKeyBase58, keyType) } } catch (error) { + if (!isError(error)) { + throw new AriesFrameworkError('Attempted to throw error, but it was not of type Error') + } throw new WalletError(`Error creating key with key type '${keyType}': ${error.message}`, { cause: error }) } @@ -476,6 +505,9 @@ export class IndyWallet implements Wallet { }) } } catch (error) { + if (!isError(error)) { + throw new AriesFrameworkError('Attempted to throw error, but it was not of type Error') + } throw new WalletError(`Error signing data with verkey ${key.publicKeyBase58}`, { cause: error }) } throw new WalletError(`Unsupported keyType: ${key.keyType}`) @@ -509,6 +541,9 @@ export class IndyWallet implements Wallet { return await BbsService.verify({ signature, publicKey: key.publicKey, messages: data }) } } catch (error) { + if (!isError(error)) { + throw new AriesFrameworkError('Attempted to throw error, but it was not of type Error') + } throw new WalletError(`Error verifying signature of data signed with verkey ${key.publicKeyBase58}`, { cause: error, }) @@ -526,6 +561,9 @@ export class IndyWallet implements Wallet { const packedMessage = await this.indy.packMessage(this.handle, messageRaw, recipientKeys, senderVerkey ?? null) return JsonEncoder.fromBuffer(packedMessage) } catch (error) { + if (!isError(error)) { + throw new AriesFrameworkError('Attempted to throw error, but it was not of type Error') + } throw new WalletError('Error packing message', { cause: error }) } } @@ -540,6 +578,9 @@ export class IndyWallet implements Wallet { plaintextMessage: JsonEncoder.fromString(unpackedMessage.message), } } catch (error) { + if (!isError(error)) { + throw new AriesFrameworkError('Attempted to throw error, but it was not of type Error') + } throw new WalletError('Error unpacking message', { cause: error }) } } @@ -548,6 +589,9 @@ export class IndyWallet implements Wallet { try { return await this.indy.generateNonce() } catch (error) { + if (!isError(error)) { + throw new AriesFrameworkError('Attempted to throw error, but it was not of type Error') + } throw new WalletError('Error generating nonce', { cause: error }) } } diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json index 047f1ca335..93d9dd32b5 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { + "allowJs": false, "typeRoots": ["../../node_modules/@types", "src/types"], "types": ["jest"] } diff --git a/packages/core/types/jsonld-signatures.ts b/packages/core/types/jsonld-signatures.ts new file mode 100644 index 0000000000..c930e2bfe6 --- /dev/null +++ b/packages/core/types/jsonld-signatures.ts @@ -0,0 +1,23 @@ +import { + suites as JsonLdSuites, + purposes as JsonLdPurposes, + constants as JsonLdConstants, + //@ts-ignore +} from '@digitalcredentials/jsonld-signatures' + +interface Suites { + LinkedDataSignature: any + LinkedDataProof: any +} + +interface Purposes { + AssertionProofPurpose: any +} + +type Constants = any + +export const suites = JsonLdSuites as Suites + +export const purposes = JsonLdPurposes as Purposes + +export const constants = JsonLdConstants as Constants diff --git a/packages/core/types/jsonld.ts b/packages/core/types/jsonld.ts new file mode 100644 index 0000000000..3e54d97b10 --- /dev/null +++ b/packages/core/types/jsonld.ts @@ -0,0 +1,29 @@ +//@ts-ignore +import jsonld from '@digitalcredentials/jsonld' +//@ts-ignore +import nodeDocumentLoader from '@digitalcredentials/jsonld/lib/documentLoaders/node' +//@ts-ignore +import xhrDocumentLoader from '@digitalcredentials/jsonld/lib/documentLoaders/xhr' + +interface JsonLd { + compact(document: any, context: any, options?: any): any + fromRDF(document: any): any + frame(document: any, revealDocument: any, options?: any): any + canonize(document: any, options?: any): any + expand(document: any, options?: any): any + getValues(document: any, key: string): any + addValue(document: any, key: string, value: any): void +} + +export interface DocumentLoaderResult { + contextUrl?: string | null + documentUrl: string + document: Record +} + +export type DocumentLoader = (url: string) => Promise + +export const documentLoaderXhr = xhrDocumentLoader as () => DocumentLoader +export const documentLoaderNode = nodeDocumentLoader as () => DocumentLoader + +export default jsonld as unknown as JsonLd diff --git a/packages/core/types/vc.ts b/packages/core/types/vc.ts new file mode 100644 index 0000000000..ca6196528d --- /dev/null +++ b/packages/core/types/vc.ts @@ -0,0 +1,12 @@ +// @ts-ignore +import vc from '@digitalcredentials/vc' + +interface VC { + issue(options: any): Promise> + verifyCredential(options: any): Promise> + createPresentation(options: any): Promise> + signPresentation(options: any): Promise> + verify(options: any): Promise> +} + +export default vc as unknown as VC diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 6553a1b79f..c86e50cbac 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -43,6 +43,7 @@ "peerDependencies": { "indy-sdk-react-native": "^0.2.0", "react-native-fs": "^2.18.0", - "react-native-get-random-values": "^1.7.0" + "react-native-get-random-values": "^1.7.0", + "react-native-bbs-signatures": "0.1.0" } } diff --git a/yarn.lock b/yarn.lock index 7a10e7adf6..01e66a0cc4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -34,39 +34,39 @@ dependencies: "@babel/highlight" "^7.16.7" -"@babel/compat-data@^7.13.11", "@babel/compat-data@^7.17.0", "@babel/compat-data@^7.17.10": +"@babel/compat-data@^7.13.11", "@babel/compat-data@^7.17.10": version "7.17.10" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.17.10.tgz#711dc726a492dfc8be8220028b1b92482362baab" integrity sha512-GZt/TCsG70Ms19gfZO1tM4CVnXsPgEPBCpJu+Qz3L0LUDsY5nZqFZglIoPC1kIYOtNBZlrnFT+klg12vFGZXrw== "@babel/core@^7.0.0", "@babel/core@^7.1.0", "@babel/core@^7.1.6", "@babel/core@^7.12.3", "@babel/core@^7.7.2", "@babel/core@^7.8.0": - version "7.17.10" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.10.tgz#74ef0fbf56b7dfc3f198fc2d927f4f03e12f4b05" - integrity sha512-liKoppandF3ZcBnIYFjfSDHZLKdLHGJRkoWtG8zQyGJBQfIYobpnVGI5+pLBNtS6psFLDzyq8+h5HiVljW9PNA== + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.12.tgz#b4eb2d7ebc3449b062381644c93050db545b70ee" + integrity sha512-44ODe6O1IVz9s2oJE3rZ4trNNKTX9O7KpQpfAP4t8QII/zwrVRHL7i2pxhqtcY7tqMLrrKfMlBKnm1QlrRFs5w== dependencies: "@ampproject/remapping" "^2.1.0" "@babel/code-frame" "^7.16.7" - "@babel/generator" "^7.17.10" + "@babel/generator" "^7.17.12" "@babel/helper-compilation-targets" "^7.17.10" - "@babel/helper-module-transforms" "^7.17.7" + "@babel/helper-module-transforms" "^7.17.12" "@babel/helpers" "^7.17.9" - "@babel/parser" "^7.17.10" + "@babel/parser" "^7.17.12" "@babel/template" "^7.16.7" - "@babel/traverse" "^7.17.10" - "@babel/types" "^7.17.10" + "@babel/traverse" "^7.17.12" + "@babel/types" "^7.17.12" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.1" semver "^6.3.0" -"@babel/generator@^7.17.10", "@babel/generator@^7.5.0", "@babel/generator@^7.7.2": - version "7.17.10" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.17.10.tgz#c281fa35b0c349bbe9d02916f4ae08fc85ed7189" - integrity sha512-46MJZZo9y3o4kmhBVc7zW7i8dtR1oIK/sdO5NcfcZRhTGYi+KKJRtHNgsU6c4VUcJmUNV/LQdebD/9Dlv4K+Tg== +"@babel/generator@^7.17.12", "@babel/generator@^7.5.0", "@babel/generator@^7.7.2": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.17.12.tgz#5970e6160e9be0428e02f4aba62d8551ec366cc8" + integrity sha512-V49KtZiiiLjH/CnIW6OjJdrenrGoyh6AmKQ3k2AZFKozC1h846Q4NYlZ5nqAigPDUXfGzC88+LOUuG8yKd2kCw== dependencies: - "@babel/types" "^7.17.10" - "@jridgewell/gen-mapping" "^0.1.0" + "@babel/types" "^7.17.12" + "@jridgewell/gen-mapping" "^0.3.0" jsesc "^2.5.1" "@babel/helper-annotate-as-pure@^7.16.7": @@ -94,10 +94,10 @@ browserslist "^4.20.2" semver "^6.3.0" -"@babel/helper-create-class-features-plugin@^7.16.7": - version "7.17.9" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.9.tgz#71835d7fb9f38bd9f1378e40a4c0902fdc2ea49d" - integrity sha512-kUjip3gruz6AJKOq5i3nC6CoCEEF/oHH3cp6tOZhB+IyyyPyW0g1Gfsxn3mkk6S08pIA2y8GQh609v9G/5sHVQ== +"@babel/helper-create-class-features-plugin@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.12.tgz#d4f8393fc4838cbff6b7c199af5229aee16d07cf" + integrity sha512-sZoOeUTkFJMyhqCei2+Z+wtH/BehW8NVKQt7IRUQlRiOARuXymJYfN/FCcI8CvVbR0XVyDM6eLFOlR7YtiXnew== dependencies: "@babel/helper-annotate-as-pure" "^7.16.7" "@babel/helper-environment-visitor" "^7.16.7" @@ -108,9 +108,9 @@ "@babel/helper-split-export-declaration" "^7.16.7" "@babel/helper-create-regexp-features-plugin@^7.16.7": - version "7.17.0" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.17.0.tgz#1dcc7d40ba0c6b6b25618997c5dbfd310f186fe1" - integrity sha512-awO2So99wG6KnlE+TPs6rn83gCz5WlEePJDTnLEqbchMVrBeAujURVphRdigsk094VhvZehFoNOihSlcBjwsXA== + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.17.12.tgz#bb37ca467f9694bbe55b884ae7a5cc1e0084e4fd" + integrity sha512-b2aZrV4zvutr9AIa6/gA3wsZKRwTKYoDxYiFKcESS3Ug2GTXzwBEvMuuFLhCQpEnRXs1zng4ISAXSUxxKBIcxw== dependencies: "@babel/helper-annotate-as-pure" "^7.16.7" regexpu-core "^5.0.1" @@ -172,10 +172,10 @@ dependencies: "@babel/types" "^7.16.7" -"@babel/helper-module-transforms@^7.17.7": - version "7.17.7" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.17.7.tgz#3943c7f777139e7954a5355c815263741a9c1cbd" - integrity sha512-VmZD99F3gNTYB7fJRDTi+u6l/zxY0BE6OIxPSU7a50s6ZUQkHwSDmV92FfM+oCG0pZRVojGYhkR8I0OGeCVREw== +"@babel/helper-module-transforms@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.17.12.tgz#bec00139520cb3feb078ef7a4578562480efb77e" + integrity sha512-t5s2BeSWIghhFRPh9XMn6EIGmvn8Lmw5RVASJzkIx1mSemubQQBNIZiQD7WzaFmaHIrjAec4x8z9Yx8SjJ1/LA== dependencies: "@babel/helper-environment-visitor" "^7.16.7" "@babel/helper-module-imports" "^7.16.7" @@ -183,8 +183,8 @@ "@babel/helper-split-export-declaration" "^7.16.7" "@babel/helper-validator-identifier" "^7.16.7" "@babel/template" "^7.16.7" - "@babel/traverse" "^7.17.3" - "@babel/types" "^7.17.0" + "@babel/traverse" "^7.17.12" + "@babel/types" "^7.17.12" "@babel/helper-optimise-call-expression@^7.16.7": version "7.16.7" @@ -193,10 +193,10 @@ dependencies: "@babel/types" "^7.16.7" -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.8.0": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz#aa3a8ab4c3cceff8e65eb9e73d87dc4ff320b2f5" - integrity sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA== +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.17.12", "@babel/helper-plugin-utils@^7.8.0": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.17.12.tgz#86c2347da5acbf5583ba0a10aed4c9bf9da9cf96" + integrity sha512-JDkf04mqtN3y4iAbO1hv9U2ARpPyPL1zqyWs/2WG1pgSq9llHFjStX5jdxb84himgJm+8Ng+x0oiWF/nw/XQKA== "@babel/helper-replace-supers@^7.16.7": version "7.16.7" @@ -250,53 +250,53 @@ "@babel/types" "^7.17.0" "@babel/highlight@^7.10.4", "@babel/highlight@^7.16.7": - version "7.17.9" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.17.9.tgz#61b2ee7f32ea0454612def4fccdae0de232b73e3" - integrity sha512-J9PfEKCbFIv2X5bjTMiZu6Vf341N05QIY+d6FvVKynkG1S7G0j3I0QoRtWIrXhZ+/Nlb5Q0MzqL7TokEJ5BNHg== + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.17.12.tgz#257de56ee5afbd20451ac0a75686b6b404257351" + integrity sha512-7yykMVF3hfZY2jsHZEEgLc+3x4o1O+fYyULu11GynEUQNwB6lua+IIQn1FiJxNucd5UlyJryrwsOh8PL9Sn8Qg== dependencies: "@babel/helper-validator-identifier" "^7.16.7" chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.1.6", "@babel/parser@^7.14.7", "@babel/parser@^7.16.7", "@babel/parser@^7.17.10": - version "7.17.10" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.10.tgz#873b16db82a8909e0fbd7f115772f4b739f6ce78" - integrity sha512-n2Q6i+fnJqzOaq2VkdXxy2TCPCWQZHiCo0XqmrCvDWcZQKRyZzYi4Z0yxlBuN0w+r2ZHmre+Q087DSrw3pbJDQ== +"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.1.6", "@babel/parser@^7.14.7", "@babel/parser@^7.16.7", "@babel/parser@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.12.tgz#36c2ed06944e3691ba82735fc4cf62d12d491a23" + integrity sha512-FLzHmN9V3AJIrWfOpvRlZCeVg/WLdicSnTMsLur6uDj9TT8ymUlG9XxURdW/XvuygK+2CW0poOJABdA4m/YKxA== "@babel/plugin-proposal-class-properties@^7.0.0", "@babel/plugin-proposal-class-properties@^7.1.0": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.16.7.tgz#925cad7b3b1a2fcea7e59ecc8eb5954f961f91b0" - integrity sha512-IobU0Xme31ewjYOShSIqd/ZGM/r/cuOz2z0MDbNrhF5FW+ZVgi0f2lyeoj9KFPDOAqsYxmLWZte1WOwlvY9aww== + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.17.12.tgz#84f65c0cc247d46f40a6da99aadd6438315d80a4" + integrity sha512-U0mI9q8pW5Q9EaTHFPwSVusPMV/DV9Mm8p7csqROFLtIE9rBF5piLqyrBGigftALrBcsBGu4m38JneAe7ZDLXw== dependencies: - "@babel/helper-create-class-features-plugin" "^7.16.7" - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-create-class-features-plugin" "^7.17.12" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-proposal-export-default-from@^7.0.0": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.16.7.tgz#a40ab158ca55627b71c5513f03d3469026a9e929" - integrity sha512-+cENpW1rgIjExn+o5c8Jw/4BuH4eGKKYvkMB8/0ZxFQ9mC0t4z09VsPIwNg6waF69QYC81zxGeAsREGuqQoKeg== + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.17.12.tgz#df785e638618d8ffa14e08c78c44d9695d083b73" + integrity sha512-LpsTRw725eBAXXKUOnJJct+SEaOzwR78zahcLuripD2+dKc2Sj+8Q2DzA+GC/jOpOu/KlDXuxrzG214o1zTauQ== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-syntax-export-default-from" "^7.16.7" "@babel/plugin-proposal-nullish-coalescing-operator@^7.0.0", "@babel/plugin-proposal-nullish-coalescing-operator@^7.1.0": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.16.7.tgz#141fc20b6857e59459d430c850a0011e36561d99" - integrity sha512-aUOrYU3EVtjf62jQrCj63pYZ7k6vns2h/DQvHPWGmsJRYzWXZ6/AsfgpiRy6XiuIDADhJzP2Q9MwSMKauBQ+UQ== + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.17.12.tgz#1e93079bbc2cbc756f6db6a1925157c4a92b94be" + integrity sha512-ws/g3FSGVzv+VH86+QvgtuJL/kR67xaEIF2x0iPqdDfYW6ra6JF3lKVBkWynRLcNtIC1oCTfDRVxmm2mKzy+ag== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" "@babel/plugin-proposal-object-rest-spread@^7.0.0": - version "7.17.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.17.3.tgz#d9eb649a54628a51701aef7e0ea3d17e2b9dd390" - integrity sha512-yuL5iQA/TbZn+RGAfxQXfi7CNLmKi1f8zInn4IgobuCWcAb7i+zj4TYzQ9l8cEzVyJ89PDGuqxK1xZpUDISesw== + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.17.12.tgz#f94a91715a7f2f8cfb3c06af820c776440bc0148" + integrity sha512-6l9cO3YXXRh4yPCPRA776ZyJ3RobG4ZKJZhp7NDRbKIOeV3dBPG8FXCF7ZtiO2RTCIOkQOph1xDDcc01iWVNjQ== dependencies: - "@babel/compat-data" "^7.17.0" - "@babel/helper-compilation-targets" "^7.16.7" - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/compat-data" "^7.17.10" + "@babel/helper-compilation-targets" "^7.17.10" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.16.7" + "@babel/plugin-transform-parameters" "^7.17.12" "@babel/plugin-proposal-optional-catch-binding@^7.0.0": version "7.16.7" @@ -307,11 +307,11 @@ "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" "@babel/plugin-proposal-optional-chaining@^7.0.0", "@babel/plugin-proposal-optional-chaining@^7.1.0": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.7.tgz#7cd629564724816c0e8a969535551f943c64c39a" - integrity sha512-eC3xy+ZrUcBtP7x+sq62Q/HYd674pPTb/77XZMb5wbDPGWIdUbSr4Agr052+zaUPSb+gGRnjxXfKFvx5iMJ+DA== + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.17.12.tgz#f96949e9bacace3a9066323a5cf90cfb9de67174" + integrity sha512-7wigcOs/Z4YWlK7xxjkvaIw84vGhDv/P1dFGQap0nHkc8gFKY/r+hXc8Qzf5k1gY7CvGIcHqAnOagVKJJ1wVOQ== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" "@babel/plugin-syntax-optional-chaining" "^7.8.3" @@ -350,12 +350,12 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-syntax-flow@^7.0.0", "@babel/plugin-syntax-flow@^7.16.7", "@babel/plugin-syntax-flow@^7.2.0": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.16.7.tgz#202b147e5892b8452bbb0bb269c7ed2539ab8832" - integrity sha512-UDo3YGQO0jH6ytzVwgSLv9i/CzMcUjbKenL67dTrAZPPv6GFAtDhe6jqnvmoKzC/7htNTohhos+onPtDMqJwaQ== +"@babel/plugin-syntax-flow@^7.0.0", "@babel/plugin-syntax-flow@^7.17.12", "@babel/plugin-syntax-flow@^7.2.0": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.17.12.tgz#23d852902acd19f42923fca9d0f196984d124e73" + integrity sha512-B8QIgBvkIG6G2jgsOHQUist7Sm0EBLDCx8sen072IwqNuzMegZNXrYnSv77cYzA8mLDZAfQYqsLIhimiP1s2HQ== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-syntax-import-meta@^7.8.3": version "7.10.4" @@ -371,12 +371,12 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-jsx@^7.0.0", "@babel/plugin-syntax-jsx@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.16.7.tgz#50b6571d13f764266a113d77c82b4a6508bbe665" - integrity sha512-Esxmk7YjA8QysKeT3VhTXvF6y77f/a91SIs4pWb4H2eWGQkCKFgQaG6hdoEVZtGsrAcb2K5BW66XsOErD4WU3Q== +"@babel/plugin-syntax-jsx@^7.0.0", "@babel/plugin-syntax-jsx@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.17.12.tgz#834035b45061983a491f60096f61a2e7c5674a47" + integrity sha512-spyY3E3AURfxh/RHtjx5j6hs8am5NbUBGfcZ2vB3uShSpZdQyXSf5rR5Mk76vbtlAZOelyVQ71Fg0x9SG4fsog== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": version "7.10.4" @@ -427,19 +427,19 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-syntax-typescript@^7.16.7", "@babel/plugin-syntax-typescript@^7.7.2": - version "7.17.10" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.17.10.tgz#80031e6042cad6a95ed753f672ebd23c30933195" - integrity sha512-xJefea1DWXW09pW4Tm9bjwVlPDyYA2it3fWlmEjpYz6alPvTUjL0EOzNzI/FEOyI3r4/J7uVH5UqKgl1TQ5hqQ== +"@babel/plugin-syntax-typescript@^7.17.12", "@babel/plugin-syntax-typescript@^7.7.2": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.17.12.tgz#b54fc3be6de734a56b87508f99d6428b5b605a7b" + integrity sha512-TYY0SXFiO31YXtNg3HtFwNJHjLsAyIIhAhNWkQ5whPPS7HWUFlg9z0Ta4qAQNjQbP1wsSt/oKkmZ/4/WWdMUpw== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-transform-arrow-functions@^7.0.0": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.7.tgz#44125e653d94b98db76369de9c396dc14bef4154" - integrity sha512-9ffkFFMbvzTvv+7dTp/66xvZAWASuPD5Tl9LK3Z9vhOmANo6j94rik+5YMBt4CwHVMWLWpMsriIc2zsa3WW3xQ== + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.17.12.tgz#dddd783b473b1b1537ef46423e3944ff24898c45" + integrity sha512-PHln3CNi/49V+mza4xMwrg+WGYevSF1oaiXaC2EQfdp4HWlSjRsrDXWJiQBKpP7749u6vQ9mcry2uuFOv5CXvA== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-transform-block-scoped-functions@^7.0.0": version "7.16.7" @@ -449,39 +449,39 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-transform-block-scoping@^7.0.0": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.7.tgz#f50664ab99ddeaee5bc681b8f3a6ea9d72ab4f87" - integrity sha512-ObZev2nxVAYA4bhyusELdo9hb3H+A56bxH3FZMbEImZFiEDYVHXQSJ1hQKFlDnlt8G9bBrCZ5ZpURZUrV4G5qQ== + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.17.12.tgz#68fc3c4b3bb7dfd809d97b7ed19a584052a2725c" + integrity sha512-jw8XW/B1i7Lqwqj2CbrViPcZijSxfguBWZP2aN59NHgxUyO/OcO1mfdCxH13QhN5LbWhPkX+f+brKGhZTiqtZQ== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-transform-classes@^7.0.0": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.16.7.tgz#8f4b9562850cd973de3b498f1218796eb181ce00" - integrity sha512-WY7og38SFAGYRe64BrjKf8OrE6ulEHtr5jEYaZMwox9KebgqPi67Zqz8K53EKk1fFEJgm96r32rkKZ3qA2nCWQ== + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.17.12.tgz#da889e89a4d38375eeb24985218edeab93af4f29" + integrity sha512-cvO7lc7pZat6BsvH6l/EGaI8zpl8paICaoGk+7x7guvtfak/TbIf66nYmJOH13EuG0H+Xx3M+9LQDtSvZFKXKw== dependencies: "@babel/helper-annotate-as-pure" "^7.16.7" "@babel/helper-environment-visitor" "^7.16.7" - "@babel/helper-function-name" "^7.16.7" + "@babel/helper-function-name" "^7.17.9" "@babel/helper-optimise-call-expression" "^7.16.7" - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/helper-replace-supers" "^7.16.7" "@babel/helper-split-export-declaration" "^7.16.7" globals "^11.1.0" "@babel/plugin-transform-computed-properties@^7.0.0": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.7.tgz#66dee12e46f61d2aae7a73710f591eb3df616470" - integrity sha512-gN72G9bcmenVILj//sv1zLNaPyYcOzUho2lIJBMh/iakJ9ygCo/hEF9cpGb61SCMEDxbbyBoVQxrt+bWKu5KGw== + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.17.12.tgz#bca616a83679698f3258e892ed422546e531387f" + integrity sha512-a7XINeplB5cQUWMg1E/GI1tFz3LfK021IjV1rj1ypE+R7jHm+pIHmHl25VNkZxtx9uuYp7ThGk8fur1HHG7PgQ== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-transform-destructuring@^7.0.0": - version "7.17.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.17.7.tgz#49dc2675a7afa9a5e4c6bdee636061136c3408d1" - integrity sha512-XVh0r5yq9sLR4vZ6eVZe8FKfIcSgaTBxVBRSYokRj2qksf6QerYnTxz9/GTuKTH/n/HwLP7t6gtlybHetJ/6hQ== + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.17.12.tgz#0861d61e75e2401aca30f2570d46dfc85caacf35" + integrity sha512-P8pt0YiKtX5UMUL5Xzsc9Oyij+pJE6JuC+F1k0/brq/OOGs5jDa1If3OY0LRWGvJsJhI+8tsiecL3nJLc0WTlg== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-transform-exponentiation-operator@^7.0.0": version "7.16.7" @@ -491,20 +491,20 @@ "@babel/helper-builder-binary-assignment-operator-visitor" "^7.16.7" "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-flow-strip-types@^7.0.0", "@babel/plugin-transform-flow-strip-types@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.16.7.tgz#291fb140c78dabbf87f2427e7c7c332b126964b8" - integrity sha512-mzmCq3cNsDpZZu9FADYYyfZJIOrSONmHcop2XEKPdBNMa4PDC4eEvcOvzZaCNcjKu72v0XQlA5y1g58aLRXdYg== +"@babel/plugin-transform-flow-strip-types@^7.0.0", "@babel/plugin-transform-flow-strip-types@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.17.12.tgz#5e070f99a4152194bd9275de140e83a92966cab3" + integrity sha512-g8cSNt+cHCpG/uunPQELdq/TeV3eg1OLJYwxypwHtAWo9+nErH3lQx9CSO2uI9lF74A0mR0t4KoMjs1snSgnTw== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" - "@babel/plugin-syntax-flow" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" + "@babel/plugin-syntax-flow" "^7.17.12" "@babel/plugin-transform-for-of@^7.0.0": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.7.tgz#649d639d4617dff502a9a158c479b3b556728d8c" - integrity sha512-/QZm9W92Ptpw7sjI9Nx1mbcsWz33+l8kuMIQnDwgQBG5s3fAfQvkRjQ7NqXhtNcKOnPkdICmUHyCaWW06HCsqg== + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.17.12.tgz#5397c22554ec737a27918e7e7e0e7b679b05f5ec" + integrity sha512-76lTwYaCxw8ldT7tNmye4LLwSoKDbRCBzu6n/DcK/P3FOR29+38CIIaVIZfwol9By8W/QHORYEnYSLuvcQKrsg== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-transform-function-name@^7.0.0": version "7.16.7" @@ -516,11 +516,11 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-transform-literals@^7.0.0": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.7.tgz#254c9618c5ff749e87cb0c0cef1a0a050c0bdab1" - integrity sha512-6tH8RTpTWI0s2sV6uq3e/C9wPo4PTqqZps4uF0kzQ9/xPLFQtipynvmT1g/dOfEJ+0EQsHhkQ/zyRId8J2b8zQ== + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.17.12.tgz#97131fbc6bbb261487105b4b3edbf9ebf9c830ae" + integrity sha512-8iRkvaTjJciWycPIZ9k9duu663FT7VrBdNqNgxnVXEFwOIp55JWcZd23VBRySYbnS3PwQ3rGiabJBBBGj5APmQ== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-transform-member-expression-literals@^7.0.0": version "7.16.7" @@ -530,12 +530,12 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-transform-modules-commonjs@^7.0.0", "@babel/plugin-transform-modules-commonjs@^7.1.0": - version "7.17.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.17.9.tgz#274be1a2087beec0254d4abd4d86e52442e1e5b6" - integrity sha512-2TBFd/r2I6VlYn0YRTz2JdazS+FoUuQ2rIFHoAxtyP/0G3D82SBLaRq9rnUkpqlLg03Byfl/+M32mpxjO6KaPw== + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.17.12.tgz#37691c7404320d007288edd5a2d8600bcef61c34" + integrity sha512-tVPs6MImAJz+DiX8Y1xXEMdTk5Lwxu9jiPjlS+nv5M2A59R7+/d1+9A8C/sbuY0b3QjIxqClkj6KAplEtRvzaA== dependencies: - "@babel/helper-module-transforms" "^7.17.7" - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-module-transforms" "^7.17.12" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/helper-simple-access" "^7.17.7" babel-plugin-dynamic-import-node "^2.3.3" @@ -554,12 +554,12 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/helper-replace-supers" "^7.16.7" -"@babel/plugin-transform-parameters@^7.0.0", "@babel/plugin-transform-parameters@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.7.tgz#a1721f55b99b736511cb7e0152f61f17688f331f" - integrity sha512-AT3MufQ7zZEhU2hwOA11axBnExW0Lszu4RL/tAlUJBuNoRak+wehQW8h6KcXOcgjY42fHtDxswuMhMjFEuv/aw== +"@babel/plugin-transform-parameters@^7.0.0", "@babel/plugin-transform-parameters@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.17.12.tgz#eb467cd9586ff5ff115a9880d6fdbd4a846b7766" + integrity sha512-6qW4rWo1cyCdq1FkYri7AHpauchbGLXpdwnYsfxFb+KtddHENfsY5JZb35xUwkK5opOLcJ3BNd2l7PhRYGlwIA== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-transform-property-literals@^7.0.0": version "7.16.7" @@ -576,11 +576,11 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-transform-react-jsx-self@^7.0.0": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.16.7.tgz#f432ad0cba14c4a1faf44f0076c69e42a4d4479e" - integrity sha512-oe5VuWs7J9ilH3BCCApGoYjHoSO48vkjX2CbA5bFVhIuO2HKxA3vyF7rleA4o6/4rTDbk6r8hBW7Ul8E+UZrpA== + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.17.12.tgz#7f2e9b8c08d6a4204733138d8c29d4dba4bb66c2" + integrity sha512-7S9G2B44EnYOx74mue02t1uD8ckWZ/ee6Uz/qfdzc35uWHX5NgRy9i+iJSb2LFRgMd+QV9zNcStQaazzzZ3n3Q== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-transform-react-jsx-source@^7.0.0": version "7.16.7" @@ -590,15 +590,15 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-transform-react-jsx@^7.0.0": - version "7.17.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.17.3.tgz#eac1565da176ccb1a715dae0b4609858808008c1" - integrity sha512-9tjBm4O07f7mzKSIlEmPdiE6ub7kfIe6Cd+w+oQebpATfTQMAgW+YOuWxogbKVTulA+MEO7byMeIUtQ1z+z+ZQ== + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.17.12.tgz#2aa20022709cd6a3f40b45d60603d5f269586dba" + integrity sha512-Lcaw8bxd1DKht3thfD4A12dqo1X16he1Lm8rIv8sTwjAYNInRS1qHa9aJoqvzpscItXvftKDCfaEQzwoVyXpEQ== dependencies: "@babel/helper-annotate-as-pure" "^7.16.7" "@babel/helper-module-imports" "^7.16.7" - "@babel/helper-plugin-utils" "^7.16.7" - "@babel/plugin-syntax-jsx" "^7.16.7" - "@babel/types" "^7.17.0" + "@babel/helper-plugin-utils" "^7.17.12" + "@babel/plugin-syntax-jsx" "^7.17.12" + "@babel/types" "^7.17.12" "@babel/plugin-transform-regenerator@^7.0.0": version "7.17.9" @@ -608,12 +608,12 @@ regenerator-transform "^0.15.0" "@babel/plugin-transform-runtime@^7.0.0": - version "7.17.10" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.17.10.tgz#b89d821c55d61b5e3d3c3d1d636d8d5a81040ae1" - integrity sha512-6jrMilUAJhktTr56kACL8LnWC5hx3Lf27BS0R0DSyW/OoJfb/iTHeE96V3b1dgKG3FSFdd/0culnYWMkjcKCig== + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.17.12.tgz#5dc79735c4038c6f4fc0490f68f2798ce608cadd" + integrity sha512-xsl5MeGjWnmV6Ui9PfILM2+YRpa3GqLOrczPpXV3N2KCgQGU+sU8OfzuMbjkIdfvZEZIm+3y0V7w58sk0SGzlw== dependencies: "@babel/helper-module-imports" "^7.16.7" - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" babel-plugin-polyfill-corejs2 "^0.3.0" babel-plugin-polyfill-corejs3 "^0.5.0" babel-plugin-polyfill-regenerator "^0.3.0" @@ -627,11 +627,11 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-transform-spread@^7.0.0": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.7.tgz#a303e2122f9f12e0105daeedd0f30fb197d8ff44" - integrity sha512-+pjJpgAngb53L0iaA5gU/1MLXJIfXcYepLgXB3esVRf4fqmj8f2cxM3/FKaHsZms08hFQJkFccEWuIpm429TXg== + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.17.12.tgz#c112cad3064299f03ea32afed1d659223935d1f5" + integrity sha512-9pgmuQAtFi3lpNUstvG9nGfk9DkrdmWNp9KeKPFmuZCpEnxRzYlS8JgwPjYj+1AWDOSvoGN0H30p1cBOmT/Svg== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" "@babel/plugin-transform-sticky-regex@^7.0.0": @@ -642,20 +642,20 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-transform-template-literals@^7.0.0": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.7.tgz#f3d1c45d28967c8e80f53666fc9c3e50618217ab" - integrity sha512-VwbkDDUeenlIjmfNeDX/V0aWrQH2QiVyJtwymVQSzItFDTpxfyJh3EVaQiS0rIN/CqbLGr0VcGmuwyTdZtdIsA== + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.17.12.tgz#4aec0a18f39dd86c442e1d077746df003e362c6e" + integrity sha512-kAKJ7DX1dSRa2s7WN1xUAuaQmkTpN+uig4wCKWivVXIObqGbVTUlSavHyfI2iZvz89GFAMGm9p2DBJ4Y1Tp0hw== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-transform-typescript@^7.16.7", "@babel/plugin-transform-typescript@^7.5.0": - version "7.16.8" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.16.8.tgz#591ce9b6b83504903fa9dd3652c357c2ba7a1ee0" - integrity sha512-bHdQ9k7YpBDO2d0NVfkj51DpQcvwIzIusJ7mEUaMlbZq3Kt/U47j24inXZHQ5MDiYpCs+oZiwnXyKedE8+q7AQ== +"@babel/plugin-transform-typescript@^7.17.12", "@babel/plugin-transform-typescript@^7.5.0": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.17.12.tgz#9654587131bc776ff713218d929fa9a2e98ca16d" + integrity sha512-ICbXZqg6hgenjmwciVI/UfqZtExBrZOrS8sLB5mTHGO/j08Io3MmooULBiijWk9JBknjM3CbbtTc/0ZsqLrjXQ== dependencies: - "@babel/helper-create-class-features-plugin" "^7.16.7" - "@babel/helper-plugin-utils" "^7.16.7" - "@babel/plugin-syntax-typescript" "^7.16.7" + "@babel/helper-create-class-features-plugin" "^7.17.12" + "@babel/helper-plugin-utils" "^7.17.12" + "@babel/plugin-syntax-typescript" "^7.17.12" "@babel/plugin-transform-unicode-regex@^7.0.0": version "7.16.7" @@ -666,22 +666,22 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/preset-flow@^7.0.0": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.16.7.tgz#7fd831323ab25eeba6e4b77a589f680e30581cbd" - integrity sha512-6ceP7IyZdUYQ3wUVqyRSQXztd1YmFHWI4Xv11MIqAlE4WqxBSd/FZ61V9k+TS5Gd4mkHOtQtPp9ymRpxH4y1Ug== + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.17.12.tgz#664a5df59190260939eee862800a255bef3bd66f" + integrity sha512-7QDz7k4uiaBdu7N89VKjUn807pJRXmdirQu0KyR9LXnQrr5Jt41eIMKTS7ljej+H29erwmMrwq9Io9mJHLI3Lw== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/helper-validator-option" "^7.16.7" - "@babel/plugin-transform-flow-strip-types" "^7.16.7" + "@babel/plugin-transform-flow-strip-types" "^7.17.12" "@babel/preset-typescript@^7.1.0": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.16.7.tgz#ab114d68bb2020afc069cd51b37ff98a046a70b9" - integrity sha512-WbVEmgXdIyvzB77AQjGBEyYPZx+8tTsO50XtfozQrkW8QB2rLJpH2lgx0TRw5EJrBxOZQ+wCcyPVQvS8tjEHpQ== + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.17.12.tgz#40269e0a0084d56fc5731b6c40febe1c9a4a3e8c" + integrity sha512-S1ViF8W2QwAKUGJXxP9NAfNaqGDdEBJKpYkxHf5Yy2C4NPPzXGeR3Lhk7G8xJaaLcFTRfNjVbtbVtm8Gb0mqvg== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/helper-validator-option" "^7.16.7" - "@babel/plugin-transform-typescript" "^7.16.7" + "@babel/plugin-transform-typescript" "^7.17.12" "@babel/register@^7.0.0": version "7.17.7" @@ -710,26 +710,26 @@ "@babel/parser" "^7.16.7" "@babel/types" "^7.16.7" -"@babel/traverse@^7.0.0", "@babel/traverse@^7.13.0", "@babel/traverse@^7.16.7", "@babel/traverse@^7.17.10", "@babel/traverse@^7.17.3", "@babel/traverse@^7.17.9", "@babel/traverse@^7.7.2": - version "7.17.10" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.17.10.tgz#1ee1a5ac39f4eac844e6cf855b35520e5eb6f8b5" - integrity sha512-VmbrTHQteIdUUQNTb+zE12SHS/xQVIShmBPhlNP12hD5poF2pbITW1Z4172d03HegaQWhLffdkRJYtAzp0AGcw== +"@babel/traverse@^7.0.0", "@babel/traverse@^7.13.0", "@babel/traverse@^7.16.7", "@babel/traverse@^7.17.12", "@babel/traverse@^7.17.9", "@babel/traverse@^7.7.2": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.17.12.tgz#011874d2abbca0ccf1adbe38f6f7a4ff1747599c" + integrity sha512-zULPs+TbCvOkIFd4FrG53xrpxvCBwLIgo6tO0tJorY7YV2IWFxUfS/lXDJbGgfyYt9ery/Gxj2niwttNnB0gIw== dependencies: "@babel/code-frame" "^7.16.7" - "@babel/generator" "^7.17.10" + "@babel/generator" "^7.17.12" "@babel/helper-environment-visitor" "^7.16.7" "@babel/helper-function-name" "^7.17.9" "@babel/helper-hoist-variables" "^7.16.7" "@babel/helper-split-export-declaration" "^7.16.7" - "@babel/parser" "^7.17.10" - "@babel/types" "^7.17.10" + "@babel/parser" "^7.17.12" + "@babel/types" "^7.17.12" debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.17.0", "@babel/types@^7.17.10", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.17.10" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.10.tgz#d35d7b4467e439fcf06d195f8100e0fea7fc82c4" - integrity sha512-9O26jG0mBYfGkUYCYZRnBwbVLd1UZOICEr2Em6InB6jVfsAv1GKgwXHmrSg+WFWDmeKTA6vyTZiN8tCSM5Oo3A== +"@babel/types@^7.0.0", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.17.0", "@babel/types@^7.17.12", "@babel/types@^7.3.0", "@babel/types@^7.3.3": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.12.tgz#1210690a516489c0200f355d87619157fbbd69a0" + integrity sha512-rH8i29wcZ6x9xjzI5ILHL/yZkbQnCERdHlogKuIb4PUr7do4iT8DPekrTbBLWTnRQm6U0GYABbTMSzijmEqlAg== dependencies: "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" @@ -759,6 +759,66 @@ dependencies: "@cspotcode/source-map-consumer" "0.8.0" +"@digitalbazaar/http-client@^1.1.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@digitalbazaar/http-client/-/http-client-1.2.0.tgz#1ea3661e77000a15bd892a294f20dc6cc5d1c93b" + integrity sha512-W9KQQ5pUJcaR0I4c2HPJC0a7kRbZApIorZgPnEDwMBgj16iQzutGLrCXYaZOmxqVLVNqqlQ4aUJh+HBQZy4W6Q== + dependencies: + esm "^3.2.22" + ky "^0.25.1" + ky-universal "^0.8.2" + +"@digitalbazaar/security-context@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@digitalbazaar/security-context/-/security-context-1.0.0.tgz#23624692cfadc6d97e1eb787ad38a19635d89297" + integrity sha512-mlj+UmodxTAdMCHGxnGVTRLHcSLyiEOVRiz3J6yiRliJWyrgeXs34wlWjBorDIEMDIjK2JwZrDuFEKO9bS5nKQ== + +"@digitalcredentials/http-client@^1.0.0": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@digitalcredentials/http-client/-/http-client-1.2.2.tgz#8b09ab6f1e3aa8878d91d3ca51946ca8265cc92e" + integrity sha512-YOwaE+vUDSwiDhZT0BbXSWVg+bvp1HA1eg/gEc8OCwCOj9Bn9FRQdu8P9Y/fnYqyFCioDwwTRzGxgJLl50baEg== + dependencies: + ky "^0.25.1" + ky-universal "^0.8.2" + +"@digitalcredentials/jsonld-signatures@^9.3.1": + version "9.3.1" + resolved "https://registry.yarnpkg.com/@digitalcredentials/jsonld-signatures/-/jsonld-signatures-9.3.1.tgz#e00175ab4199c580c9b308effade021da805c695" + integrity sha512-YMh1e1GpTeHDqq2a2Kd+pLcHsMiPeKyE2Zs17NSwqckij7UMRVDQ54S5VQhHvoXZ1mlkpVaI2xtj5M5N6rzylw== + dependencies: + "@digitalbazaar/security-context" "^1.0.0" + "@digitalcredentials/jsonld" "^5.2.1" + fast-text-encoding "^1.0.3" + isomorphic-webcrypto "^2.3.8" + serialize-error "^8.0.1" + +"@digitalcredentials/jsonld@^5.2.1": + version "5.2.1" + resolved "https://registry.yarnpkg.com/@digitalcredentials/jsonld/-/jsonld-5.2.1.tgz#60acf587bec8331e86324819fd19692939118775" + integrity sha512-pDiO1liw8xs+J/43qnMZsxyz0VOWOb7Q2yUlBt/tyjq6SlT9xPo+3716tJPbjGPnou2lQRw3H5/I++z+6oQ07w== + dependencies: + "@digitalcredentials/http-client" "^1.0.0" + "@digitalcredentials/rdf-canonize" "^1.0.0" + canonicalize "^1.0.1" + lru-cache "^6.0.0" + +"@digitalcredentials/rdf-canonize@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@digitalcredentials/rdf-canonize/-/rdf-canonize-1.0.0.tgz#6297d512072004c2be7f280246383a9c4b0877ff" + integrity sha512-z8St0Ex2doecsExCFK1uI4gJC+a5EqYYu1xpRH1pKmqSS9l/nxfuVxexNFyaeEum4dUdg1EetIC2rTwLIFhPRA== + dependencies: + fast-text-encoding "^1.0.3" + isomorphic-webcrypto "^2.3.8" + +"@digitalcredentials/vc@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@digitalcredentials/vc/-/vc-1.1.2.tgz#868a56962f5137c29eb51eea1ba60251ebf69ad1" + integrity sha512-TSgny9XUh+W7uFjdcpvZzN7I35F9YMTv6jVINXr7UaLNgrinIjy6A5RMGQH9ecpcaoLMemKB5XjtLOOOQ3vknQ== + dependencies: + "@digitalcredentials/jsonld" "^5.2.1" + "@digitalcredentials/jsonld-signatures" "^9.3.1" + credentials-context "^2.0.0" + "@eslint/eslintrc@^0.4.3": version "0.4.3" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" @@ -1021,6 +1081,15 @@ "@jridgewell/set-array" "^1.0.0" "@jridgewell/sourcemap-codec" "^1.4.10" +"@jridgewell/gen-mapping@^0.3.0": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.1.tgz#cf92a983c83466b8c0ce9124fadeaf09f7c66ea9" + integrity sha512-GcHwniMlA2z+WFPWuY8lp3fsza0I8xPFMWL5+n8LYyP6PSvPrXf4+n8stDHZY2DM0zy9sVkRDy1jDI4XGzYVqg== + dependencies: + "@jridgewell/set-array" "^1.0.0" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + "@jridgewell/resolve-uri@^3.0.3": version "3.0.7" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz#30cd49820a962aff48c8fffc5cd760151fca61fe" @@ -1715,7 +1784,7 @@ npmlog "^4.1.2" write-file-atomic "^3.0.3" -"@mattrglobal/bbs-signatures@^1.0.0": +"@mattrglobal/bbs-signatures@1.0.0", "@mattrglobal/bbs-signatures@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@mattrglobal/bbs-signatures/-/bbs-signatures-1.0.0.tgz#8ff272c6d201aadab7e08bd84dbfd6e0d48ba12d" integrity sha512-FFzybdKqSCrS/e7pl5s6Tl/m/x8ZD5EMBbcTBQaqSOms/lebm91lFukYOIe2qc0a5o+gLhtRKye8OfKwD1Ex/g== @@ -1724,6 +1793,15 @@ optionalDependencies: "@mattrglobal/node-bbs-signatures" "0.13.0" +"@mattrglobal/bls12381-key-pair@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@mattrglobal/bls12381-key-pair/-/bls12381-key-pair-1.0.0.tgz#2959f8663595de0209bebe88517235ae34f1e2b1" + integrity sha512-FbvSkoy1n3t5FHtAPj8cyQJL7Bz+hvvmquCBZW2+bOBBBT26JhGtr//s6EmXE9e4EZk7bAA1yMHI6i1Ky2us0Q== + dependencies: + "@mattrglobal/bbs-signatures" "1.0.0" + bs58 "4.0.1" + rfc4648 "1.4.0" + "@mattrglobal/node-bbs-signatures@0.13.0": version "0.13.0" resolved "https://registry.yarnpkg.com/@mattrglobal/node-bbs-signatures/-/node-bbs-signatures-0.13.0.tgz#3e431b915325d4b139706f8b26fd84b27c192a29" @@ -1929,6 +2007,33 @@ dependencies: "@octokit/openapi-types" "^11.2.0" +"@peculiar/asn1-schema@^2.1.6": + version "2.1.8" + resolved "https://registry.yarnpkg.com/@peculiar/asn1-schema/-/asn1-schema-2.1.8.tgz#552300a1ed7991b22c9abf789a3920a3cb94c26b" + integrity sha512-u34H/bpqCdDuqrCVZvH0vpwFBT/dNEdNY+eE8u4IuC26yYnhDkXF4+Hliqca88Avbb7hyN2EF/eokyDdyS7G/A== + dependencies: + asn1js "^3.0.4" + pvtsutils "^1.3.2" + tslib "^2.4.0" + +"@peculiar/json-schema@^1.1.12": + version "1.1.12" + resolved "https://registry.yarnpkg.com/@peculiar/json-schema/-/json-schema-1.1.12.tgz#fe61e85259e3b5ba5ad566cb62ca75b3d3cd5339" + integrity sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w== + dependencies: + tslib "^2.0.0" + +"@peculiar/webcrypto@^1.0.22": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@peculiar/webcrypto/-/webcrypto-1.4.0.tgz#f941bd95285a0f8a3d2af39ccda5197b80cd32bf" + integrity sha512-U58N44b2m3OuTgpmKgf0LPDOmP3bhwNz01vAnj1mBwxBASRhptWYK+M3zG+HBkDqGQM+bFsoIihTW8MdmPXEqg== + dependencies: + "@peculiar/asn1-schema" "^2.1.6" + "@peculiar/json-schema" "^1.1.12" + pvtsutils "^1.3.2" + tslib "^2.4.0" + webcrypto-core "^1.7.4" + "@react-native-community/cli-debugger-ui@^5.0.1": version "5.0.1" resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-5.0.1.tgz#6b1f3367b8e5211e899983065ea2e72c1901d75f" @@ -2362,7 +2467,7 @@ "@types/json5@^0.0.29": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" - integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= + integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== "@types/luxon@^1.27.0": version "1.27.1" @@ -2600,6 +2705,21 @@ "@typescript-eslint/types" "4.33.0" eslint-visitor-keys "^2.0.0" +"@unimodules/core@*": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@unimodules/core/-/core-7.1.2.tgz#5181b99586476a5d87afd0958f26a04714c47fa1" + integrity sha512-lY+e2TAFuebD3vshHMIRqru3X4+k7Xkba4Wa7QsDBd+ex4c4N2dHAO61E2SrGD9+TRBD8w/o7mzK6ljbqRnbyg== + dependencies: + compare-versions "^3.4.0" + +"@unimodules/react-native-adapter@*": + version "6.3.9" + resolved "https://registry.yarnpkg.com/@unimodules/react-native-adapter/-/react-native-adapter-6.3.9.tgz#2f4bef6b7532dce5bf9f236e69f96403d0243c30" + integrity sha512-i9/9Si4AQ8awls+YGAKkByFbeAsOPgUNeLoYeh2SQ3ddjxJ5ZJDtq/I74clDnpDcn8zS9pYlcDJ9fgVJa39Glw== + dependencies: + expo-modules-autolinking "^0.0.3" + invariant "^2.2.4" + JSONStream@^1.0.4: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" @@ -2628,7 +2748,7 @@ abort-controller@^3.0.0: absolute-path@^0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/absolute-path/-/absolute-path-0.0.0.tgz#a78762fbdadfb5297be99b15d35a785b2f095bf7" - integrity sha1-p4di+9rftSl76ZsV01p4Wy8JW/c= + integrity sha512-HQiug4c+/s3WOvEnDRxXVmNtSG5s2gJM9r19BTcqjp7BWcE48PB+Y2G6jE65kqI0LpsQeMZygt/b60Gi4KxGyA== accepts@^1.3.7, accepts@~1.3.5, accepts@~1.3.7, accepts@~1.3.8: version "1.3.8" @@ -2674,7 +2794,7 @@ acorn@^8.2.4, acorn@^8.4.1: add-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" - integrity sha1-anmQQ3ynNtXhKI25K9MmbV9csqo= + integrity sha512-qQLMr+8o0WC4FZGQTcJiKBVC59JylcPSrTtk6usvmIDFUOCKegapy1VHQwRbFMOFyb/inzUVqHs+eMYKDM1YeQ== agent-base@6, agent-base@^6.0.2: version "6.0.2" @@ -2726,9 +2846,9 @@ anser@^1.4.9: integrity sha512-hCv9AqTQ8ycjpSd3upOJd7vFwW1JaoYQ7tpham03GJ1ca8/65rqn0RpaWpItOAd6ylW9wAw6luXYPJIyPFVOww== ansi-colors@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + version "4.1.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" + integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== ansi-escapes@^4.2.1: version "4.3.2" @@ -2749,7 +2869,7 @@ ansi-fragments@^0.2.1: ansi-regex@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= + integrity sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA== ansi-regex@^4.1.0: version "4.1.1" @@ -2842,7 +2962,7 @@ argparse@^1.0.7: arr-diff@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" - integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= + integrity sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA== arr-flatten@^1.1.0: version "1.1.0" @@ -2852,7 +2972,17 @@ arr-flatten@^1.1.0: arr-union@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" - integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= + integrity sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q== + +array-back@^3.0.1, array-back@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-3.1.0.tgz#b8859d7a508871c9a7b2cf42f99428f65e96bfb0" + integrity sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q== + +array-back@^4.0.1, array-back@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-4.0.2.tgz#8004e999a6274586beeb27342168652fdb89fa1e" + integrity sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg== array-back@^3.0.1, array-back@^3.1.0: version "3.1.0" @@ -2872,17 +3002,17 @@ array-differ@^3.0.0: array-filter@~0.0.0: version "0.0.1" resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec" - integrity sha1-fajPLiZijtcygDWB/SH2fKzS7uw= + integrity sha512-VW0FpCIhjZdarWjIz8Vpva7U95fl2Jn+b+mmFFMLn8PIVscOQcAgEznwUzTEuUHuqZqIxwzRlcaN/urTFFQoiw== array-flatten@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= + integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== array-ify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" - integrity sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4= + integrity sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng== array-includes@^3.1.4: version "3.1.5" @@ -2898,12 +3028,12 @@ array-includes@^3.1.4: array-map@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662" - integrity sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI= + integrity sha512-123XMszMB01QKVptpDQ7x1m1pP5NmJIG1kbl0JSPPRezvwQChxAN0Gvzo7rvR1IZ2tOL2tmiy7kY/KKgnpVVpg== array-reduce@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b" - integrity sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys= + integrity sha512-8jR+StqaC636u7h3ye1co3lQRefgVVUQUhuAmRbDqIMeR2yuXzRvkCNQiQ5J/wbREmoBLNtp13dhaaVpZQDRUw== array-union@^2.1.0: version "2.1.0" @@ -2913,7 +3043,7 @@ array-union@^2.1.0: array-unique@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" - integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= + integrity sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ== array.prototype.flat@^1.2.5: version "1.3.0" @@ -2928,7 +3058,7 @@ array.prototype.flat@^1.2.5: arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" - integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= + integrity sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA== arrify@^2.0.1: version "2.0.1" @@ -2938,7 +3068,12 @@ arrify@^2.0.1: asap@^2.0.0, asap@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" - integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= + integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA== + +asmcrypto.js@^0.22.0: + version "0.22.0" + resolved "https://registry.yarnpkg.com/asmcrypto.js/-/asmcrypto.js-0.22.0.tgz#38fc1440884d802c7bd37d1d23c2b26a5cd5d2d2" + integrity sha512-usgMoyXjMbx/ZPdzTSXExhMPur2FTdz/Vo5PVx2gIaBcdAAJNOFlsdgqveM8Cff7W0v+xrf9BwjOV26JSAF9qA== asn1@~0.2.3: version "0.2.6" @@ -2947,15 +3082,24 @@ asn1@~0.2.3: dependencies: safer-buffer "~2.1.0" +asn1js@^3.0.1, asn1js@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/asn1js/-/asn1js-3.0.4.tgz#65fece61bd30d0ef1e31b39fcd383810f44c9fb5" + integrity sha512-ZibuNYyfODvHiVyRFs80xLAUjCwBSkLbE+r1TasjlRKwdodENGT4AlLdaN12Pl/EcK3lFMDYXU6lE2g7Sq9VVQ== + dependencies: + pvtsutils "^1.3.2" + pvutils "^1.1.3" + tslib "^2.4.0" + assert-plus@1.0.0, assert-plus@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" - integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= + integrity sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw== ast-types@0.14.2: version "0.14.2" @@ -2989,7 +3133,7 @@ async@^2.4.0: asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== at-least-node@^1.0.0: version "1.0.0" @@ -3004,13 +3148,27 @@ atob@^2.1.2: aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + integrity sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA== aws4@^1.8.0: version "1.11.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== +b64-lite@^1.3.1, b64-lite@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/b64-lite/-/b64-lite-1.4.0.tgz#e62442de11f1f21c60e38b74f111ac0242283d3d" + integrity sha512-aHe97M7DXt+dkpa8fHlCcm1CnskAHrJqEfMI0KN7dwqlzml/aUe1AGt6lk51HzrSfVD67xOso84sOpr+0wIe2w== + dependencies: + base-64 "^0.1.0" + +b64u-lite@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/b64u-lite/-/b64u-lite-1.1.0.tgz#a581b7df94cbd4bed7cbb19feae816654f0b1bf0" + integrity sha512-929qWGDVCRph7gQVTC6koHqQIpF4vtVaSbwLltFQo44B1bYUquALswZdBKFfrJCPEnsCOvWkJsPdQYZ/Ukhw8A== + dependencies: + b64-lite "^1.4.0" + babel-core@^7.0.0-bridge.0: version "7.0.0-bridge.0" resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece" @@ -3154,9 +3312,16 @@ balanced-match@^1.0.0: base-64@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/base-64/-/base-64-0.1.0.tgz#780a99c84e7d600260361511c4877613bf24f6bb" - integrity sha1-eAqZyE59YAJgNhURxId2E78k9rs= + integrity sha512-Y5gU45svrR5tI2Vt/X9GPd3L0HNIKzGu202EjxrXMpuc2V2CiKgemAbUUsqYmZJvPtCXoUKjNZwBJzsNScUbXA== + +base-x@^3.0.2: + version "3.0.9" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.9.tgz#6349aaabb58526332de9f60995e548a53fe21320" + integrity sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ== + dependencies: + safe-buffer "^5.0.1" -base64-js@^1.1.2, base64-js@^1.3.1, base64-js@^1.5.1: +base64-js@*, base64-js@^1.1.2, base64-js@^1.3.0, base64-js@^1.3.1, base64-js@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== @@ -3177,7 +3342,7 @@ base@^0.11.1: bcrypt-pbkdf@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= + integrity sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w== dependencies: tweetnacl "^0.14.3" @@ -3307,6 +3472,13 @@ bs-logger@0.x: dependencies: fast-json-stable-stringify "2.x" +bs58@4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" + integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== + dependencies: + base-x "^3.0.2" + bser@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" @@ -3330,12 +3502,12 @@ buffer@^6.0.0, buffer@^6.0.2, buffer@^6.0.3: builtins@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" - integrity sha1-y5T662HIaWRR2zZTThQi+U8K7og= + integrity sha512-uYBjakWipfaO/bXI7E8rq6kpwHRZK5cNYrUv2OzZSI/FvmdMyXJ2tG9dKcjEC5YHmHpUAwsargWIZNWdxb/bnQ== byline@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" - integrity sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE= + integrity sha512-s6webAy+R4SR8XVuJWt2V2rGvhnrhxN+9S15GNuTK3wKPOXFF6RNc+8ug2XhH+2s4f+uudG4kUVYmYOQWL2g0Q== byte-size@^7.0.0: version "7.0.1" @@ -3345,7 +3517,7 @@ byte-size@^7.0.0: bytes@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" - integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= + integrity sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw== bytes@3.1.2: version "3.1.2" @@ -3402,21 +3574,21 @@ call-bind@^1.0.0, call-bind@^1.0.2: caller-callsite@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" - integrity sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ= + integrity sha512-JuG3qI4QOftFsZyOn1qq87fq5grLIyk1JYd5lJmdA+fG7aQ9pA/i3JIJGcO3q0MrRcHlOt1U+ZeHW8Dq9axALQ== dependencies: callsites "^2.0.0" caller-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" - integrity sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ= + integrity sha512-MCL3sf6nCSXOwCTzvPKhN18TU7AHTvdtam8DAogxcrJ8Rjfbbg7Lgng64H9Iy+vUV6VGFClN/TyxBkAebLRR4A== dependencies: caller-callsite "^2.0.0" callsites@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" - integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= + integrity sha512-ksWePWBloaWPxJYQ8TL0JHvtci6G5QTKwQ95RcWAa/lzoAKuAOflGdAK92hpHXjkwb8zLxoLNUoNYZgVsaJzvQ== callsites@^3.0.0: version "3.1.0" @@ -3443,9 +3615,14 @@ camelcase@^6.0.0, camelcase@^6.2.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001332: - version "1.0.30001340" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001340.tgz#029a2f8bfc025d4820fafbfaa6259fd7778340c7" - integrity sha512-jUNz+a9blQTQVu4uFcn17uAD8IDizPzQkIKh3LCJfg9BkyIqExYYdyc/ZSlWUSKb8iYiXxKsxbv4zYSvkqjrxw== + version "1.0.30001341" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001341.tgz#59590c8ffa8b5939cf4161f00827b8873ad72498" + integrity sha512-2SodVrFFtvGENGCv0ChVJIDQ0KPaS1cg7/qtfMaICgeMolDdo/Z2OD32F0Aq9yl6F4YFwGPBS5AaPqNYiW4PoA== + +canonicalize@^1.0.1: + version "1.0.8" + resolved "https://registry.yarnpkg.com/canonicalize/-/canonicalize-1.0.8.tgz#24d1f1a00ed202faafd9bf8e63352cd4450c6df1" + integrity sha512-0CNTVCLZggSh7bc5VkX5WWPWO+cyZbNd07IHIsSXLia/eAq+r836hgk+8BKoEh7949Mda87VUOitx5OddVj64A== capture-exit@^2.0.0: version "2.0.0" @@ -3457,7 +3634,7 @@ capture-exit@^2.0.0: caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.2: version "2.4.2" @@ -3556,7 +3733,7 @@ clear@^0.1.0: cli-cursor@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" - integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= + integrity sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw== dependencies: restore-cursor "^2.0.0" @@ -3716,13 +3893,13 @@ command-line-commands@^3.0.1: array-back "^4.0.1" command-line-usage@^6.1.0: - version "6.1.1" - resolved "https://registry.yarnpkg.com/command-line-usage/-/command-line-usage-6.1.1.tgz#c908e28686108917758a49f45efb4f02f76bc03f" - integrity sha512-F59pEuAR9o1SF/bD0dQBDluhpT4jJQNWUHEuVBqpDmCUo6gPjCi+m9fCWnWZVR/oG6cMTUms4h+3NPl74wGXvA== + version "6.1.3" + resolved "https://registry.yarnpkg.com/command-line-usage/-/command-line-usage-6.1.3.tgz#428fa5acde6a838779dfa30e44686f4b6761d957" + integrity sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw== dependencies: - array-back "^4.0.1" + array-back "^4.0.2" chalk "^2.4.2" - table-layout "^1.0.1" + table-layout "^1.0.2" typical "^5.2.0" commander@^2.15.0, commander@^2.19.0: @@ -3730,6 +3907,11 @@ commander@^2.15.0, commander@^2.19.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== +commander@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" + integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== + commander@^8.3.0: version "8.3.0" resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" @@ -3753,6 +3935,11 @@ compare-func@^2.0.0: array-ify "^1.0.0" dot-prop "^5.1.0" +compare-versions@^3.4.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.6.0.tgz#1a5689913685e5a87637b8d3ffca75514ec41d62" + integrity sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA== + component-emitter@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" @@ -3984,6 +4171,11 @@ create-require@^1.1.0: resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== +credentials-context@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/credentials-context/-/credentials-context-2.0.0.tgz#68a9a1a88850c398d3bba4976c8490530af093e8" + integrity sha512-/mFKax6FK26KjgV2KW2D4YqKgoJ5DVJpNt87X2Jc9IxT2HBMy7nEIlc+n7pEi+YFFe721XqrvZPd+jbyyBjsvQ== + cross-fetch@^3.1.2: version "3.1.5" resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" @@ -4029,9 +4221,9 @@ cssstyle@^2.3.0: cssom "~0.3.6" csstype@^3.0.2: - version "3.0.11" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.11.tgz#d66700c5eacfac1940deb4e3ee5642792d85cd33" - integrity sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw== + version "3.1.0" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.0.tgz#4ddcac3718d787cf9df0d1b7d15033925c8f29f2" + integrity sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA== dargs@^7.0.0: version "7.0.0" @@ -4045,6 +4237,11 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" +data-uri-to-buffer@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-3.0.1.tgz#594b8973938c5bc2c33046535785341abc4f3636" + integrity sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og== + data-urls@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" @@ -4402,9 +4599,9 @@ errorhandler@^1.5.0: escape-html "~1.0.3" es-abstract@^1.19.0, es-abstract@^1.19.1, es-abstract@^1.19.2, es-abstract@^1.19.5: - version "1.20.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.0.tgz#b2d526489cceca004588296334726329e0a6bfb6" - integrity sha512-URbD8tgRthKD3YcC39vbvSDrX23upXnPcnGAjQfgxXF5ID75YcENawc9ZX/9iTP9ptUyfCLIxTTuMYoRfiOVKA== + version "1.20.1" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.1.tgz#027292cd6ef44bd12b1913b828116f54787d1814" + integrity sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA== dependencies: call-bind "^1.0.2" es-to-primitive "^1.2.1" @@ -4425,7 +4622,7 @@ es-abstract@^1.19.0, es-abstract@^1.19.1, es-abstract@^1.19.2, es-abstract@^1.19 object-inspect "^1.12.0" object-keys "^1.1.1" object.assign "^4.1.2" - regexp.prototype.flags "^1.4.1" + regexp.prototype.flags "^1.4.3" string.prototype.trimend "^1.0.5" string.prototype.trimstart "^1.0.5" unbox-primitive "^1.0.2" @@ -4619,6 +4816,11 @@ eslint@^7.28.0: text-table "^0.2.0" v8-compile-cache "^2.0.3" +esm@^3.2.22: + version "3.2.25" + resolved "https://registry.yarnpkg.com/esm/-/esm-3.2.25.tgz#342c18c29d56157688ba5ce31f8431fbb795cc10" + integrity sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA== + espree@^7.3.0, espree@^7.3.1: version "7.3.1" resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" @@ -4743,6 +4945,24 @@ expect@^27.5.1: jest-matcher-utils "^27.5.1" jest-message-util "^27.5.1" +expo-modules-autolinking@^0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/expo-modules-autolinking/-/expo-modules-autolinking-0.0.3.tgz#45ba8cb1798f9339347ae35e96e9cc70eafb3727" + integrity sha512-azkCRYj/DxbK4udDuDxA9beYzQTwpJ5a9QA0bBgha2jHtWdFGF4ZZWSY+zNA5mtU3KqzYt8jWHfoqgSvKyu1Aw== + dependencies: + chalk "^4.1.0" + commander "^7.2.0" + fast-glob "^3.2.5" + find-up "~5.0.0" + fs-extra "^9.1.0" + +expo-random@*: + version "12.2.0" + resolved "https://registry.yarnpkg.com/expo-random/-/expo-random-12.2.0.tgz#a3c8a9ce84ef2c85900131d96eea6c7123285482" + integrity sha512-SihCGLmDyDOALzBN8XXpz2hCw0RSx9c4/rvjcS4Bfqhw6luHjL2rHNTLrFYrPrPRmG1jHM6dXXJe/Zm8jdu+2g== + dependencies: + base64-js "^1.3.0" + express@^4.17.1: version "4.18.1" resolved "https://registry.yarnpkg.com/express/-/express-4.18.1.tgz#7797de8b9c72c857b9cd0e14a5eea80666267caf" @@ -4848,7 +5068,7 @@ fast-diff@^1.1.2: resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== -fast-glob@^3.2.9: +fast-glob@^3.2.5, fast-glob@^3.2.9: version "3.2.11" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== @@ -4869,6 +5089,11 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= +fast-text-encoding@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/fast-text-encoding/-/fast-text-encoding-1.0.3.tgz#ec02ac8e01ab8a319af182dae2681213cfe9ce53" + integrity sha512-dtm4QZH9nZtcDt8qJiOH9fcQd1NAgi+K1O2DbE6GG1PPCK/BWfOH3idCTRQ4ImXRUOyopDEgDEnVEE7Y/2Wrig== + fastq@^1.6.0: version "1.13.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" @@ -4883,6 +5108,11 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" +fetch-blob@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-2.1.2.tgz#a7805db1361bd44c1ef62bb57fb5fe8ea173ef3c" + integrity sha512-YKqtUDwqLyfyMnmbw8XD6Q8j9i/HggKtPEI+pZ1+8bvheBu78biSmNaXWusx1TauGqtUUGx/cBb1mKdq2rLYow== + ffi-napi@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/ffi-napi/-/ffi-napi-4.0.3.tgz#27a8d42a8ea938457154895c59761fbf1a10f441" @@ -5005,6 +5235,14 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" +find-up@~5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + flat-cache@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" @@ -5325,14 +5563,14 @@ glob-parent@^5.1.1, glob-parent@^5.1.2: is-glob "^4.0.1" glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" - integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" - minimatch "^3.0.4" + minimatch "^3.1.1" once "^1.3.0" path-is-absolute "^1.0.0" @@ -6060,6 +6298,24 @@ isobject@^3.0.0, isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= +isomorphic-webcrypto@^2.3.8: + version "2.3.8" + resolved "https://registry.yarnpkg.com/isomorphic-webcrypto/-/isomorphic-webcrypto-2.3.8.tgz#4a7493b486ef072b9f11b6f8fd66adde856e3eec" + integrity sha512-XddQSI0WYlSCjxtm1AI8kWQOulf7hAN3k3DclF1sxDJZqOe0pcsOt675zvWW91cZH9hYs3nlA3Ev8QK5i80SxQ== + dependencies: + "@peculiar/webcrypto" "^1.0.22" + asmcrypto.js "^0.22.0" + b64-lite "^1.3.1" + b64u-lite "^1.0.1" + msrcrypto "^1.5.6" + str2buf "^1.3.0" + webcrypto-shim "^0.1.4" + optionalDependencies: + "@unimodules/core" "*" + "@unimodules/react-native-adapter" "*" + expo-random "*" + react-native-securerandom "^0.1.1" + isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" @@ -6783,6 +7039,16 @@ jsonify@~0.0.0: resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= +jsonld@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/jsonld/-/jsonld-5.2.0.tgz#d1e8af38a334cb95edf0f2ae4e2b58baf8d2b5a9" + integrity sha512-JymgT6Xzk5CHEmHuEyvoTNviEPxv6ihLWSPu1gFdtjSAyM6cFqNrv02yS/SIur3BBIkCf0HjizRc24d8/FfQKw== + dependencies: + "@digitalbazaar/http-client" "^1.1.0" + canonicalize "^1.0.1" + lru-cache "^6.0.0" + rdf-canonize "^3.0.0" + jsonparse@^1.2.0, jsonparse@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" @@ -6834,6 +7100,19 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== +ky-universal@^0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/ky-universal/-/ky-universal-0.8.2.tgz#edc398d54cf495d7d6830aa1ab69559a3cc7f824" + integrity sha512-xe0JaOH9QeYxdyGLnzUOVGK4Z6FGvDVzcXFTdrYA1f33MZdEa45sUDaMBy98xQMcsd2XIBrTXRrRYnegcSdgVQ== + dependencies: + abort-controller "^3.0.0" + node-fetch "3.0.0-beta.9" + +ky@^0.25.1: + version "0.25.1" + resolved "https://registry.yarnpkg.com/ky/-/ky-0.25.1.tgz#0df0bd872a9cc57e31acd5dbc1443547c881bfbc" + integrity sha512-PjpCEWlIU7VpiMVrTwssahkYXX1by6NCT0fhTUX34F3DTinARlgMpriuroolugFPcMgpPWrOW4mTb984Qm1RXA== + lerna@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/lerna/-/lerna-4.0.0.tgz#b139d685d50ea0ca1be87713a7c2f44a5b678e9e" @@ -6901,9 +7180,9 @@ libnpmpublish@^4.0.0: ssri "^8.0.1" libphonenumber-js@^1.9.7: - version "1.9.53" - resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.9.53.tgz#f4f3321f8fb0ee62952c2a8df4711236d2626088" - integrity sha512-3cuMrA2CY3TbKVC0wKye5dXYgxmVVi4g13gzotprQSguFHMqf0pIrMM2Z6ZtMsSWqvtIqi5TuQhGjMhxz0O9Mw== + version "1.10.4" + resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.10.4.tgz#90397f0ed620262570a32244c9fbc389cc417ce4" + integrity sha512-9QWxEk4GW5RDnFzt8UtyRENfFpAN8u7Sbf9wf32tcXY9tdtnz1dKHIBwW2Wnfx8ypXJb9zUnTpK9aQJ/B8AlnA== lines-and-columns@^1.1.6: version "1.2.4" @@ -6953,6 +7232,13 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + lodash._reinterpolate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" @@ -7518,7 +7804,7 @@ min-indent@^1.0.0: resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== -minimatch@^3.0.2, minimatch@^3.0.4, minimatch@^3.1.2: +minimatch@^3.0.2, minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -7665,6 +7951,11 @@ ms@2.1.3, ms@^2.0.0, ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== +msrcrypto@^1.5.6: + version "1.5.8" + resolved "https://registry.yarnpkg.com/msrcrypto/-/msrcrypto-1.5.8.tgz#be419be4945bf134d8af52e9d43be7fa261f4a1c" + integrity sha512-ujZ0TRuozHKKm6eGbKHfXef7f+esIhEckmThVnz7RNyiOJd7a6MXj2JGBoL9cnPDW+JMG16MoTUh5X+XXjI66Q== + multimatch@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-5.0.0.tgz#932b800963cea7a31a033328fa1e0c3a1874dbe6" @@ -7776,6 +8067,14 @@ node-fetch@2.6.7, node-fetch@^2.2.0, node-fetch@^2.6.0, node-fetch@^2.6.1, node- dependencies: whatwg-url "^5.0.0" +node-fetch@3.0.0-beta.9: + version "3.0.0-beta.9" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.0.0-beta.9.tgz#0a7554cfb824380dd6812864389923c783c80d9b" + integrity sha512-RdbZCEynH2tH46+tj0ua9caUHVWrd/RHnRfvly2EVdqGmI3ndS1Vn/xjm5KuGejDt2RNDQsVRLPNd2QPwcewVg== + dependencies: + data-uri-to-buffer "^3.0.1" + fetch-blob "^2.1.1" + node-gyp-build@^4.2.1: version "4.4.0" resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.4.0.tgz#42e99687ce87ddeaf3a10b99dc06abc11021f3f4" @@ -8260,6 +8559,13 @@ p-limit@^2.0.0, p-limit@^2.2.0: dependencies: p-try "^2.0.0" +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + p-locate@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" @@ -8281,6 +8587,13 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + p-map-series@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-2.1.0.tgz#7560d4c452d9da0c07e692fdbfe6e2c81a2a91f2" @@ -8665,6 +8978,18 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== +pvtsutils@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/pvtsutils/-/pvtsutils-1.3.2.tgz#9f8570d132cdd3c27ab7d51a2799239bf8d8d5de" + integrity sha512-+Ipe2iNUyrZz+8K/2IOo+kKikdtfhRKzNpQbruF2URmqPtoqAs8g3xS7TJvFF2GcPXjh7DkqMnpVveRFq4PgEQ== + dependencies: + tslib "^2.4.0" + +pvutils@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/pvutils/-/pvutils-1.1.3.tgz#f35fc1d27e7cd3dfbd39c0826d173e806a03f5a3" + integrity sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ== + q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" @@ -8737,6 +9062,13 @@ rc@^1.2.8: minimist "^1.2.0" strip-json-comments "~2.0.1" +rdf-canonize@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/rdf-canonize/-/rdf-canonize-3.0.0.tgz#f5bade563e5e58f5cc5881afcba3c43839e8c747" + integrity sha512-LXRkhab1QaPJnhUIt1gtXXKswQCZ9zpflsSZFczG7mCLAkMvVjdqCGk9VXCUss0aOUeEyV2jtFxGcdX8DSkj9w== + dependencies: + setimmediate "^1.0.5" + react-devtools-core@^4.6.0: version "4.24.6" resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-4.24.6.tgz#3262114f483465179c97a49b7ada845048f4f97e" @@ -8779,6 +9111,13 @@ react-native-get-random-values@^1.7.0: dependencies: fast-base64-decode "^1.0.0" +react-native-securerandom@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/react-native-securerandom/-/react-native-securerandom-0.1.1.tgz#f130623a412c338b0afadedbc204c5cbb8bf2070" + integrity sha1-8TBiOkEsM4sK+t7bwgTFy7i/IHA= + dependencies: + base64-js "*" + react-native@0.64.2: version "0.64.2" resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.64.2.tgz#233b6ed84ac4749c8bc2a2d6cf63577a1c437d18" @@ -9041,7 +9380,7 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexp.prototype.flags@^1.4.1: +regexp.prototype.flags@^1.4.3: version "1.4.3" resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA== @@ -9207,6 +9546,11 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== +rfc4648@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/rfc4648/-/rfc4648-1.4.0.tgz#c75b2856ad2e2d588b6ddb985d556f1f7f2a2abd" + integrity sha512-3qIzGhHlMHA6PoT6+cdPKZ+ZqtxkIvg8DZGKA5z6PQ33/uuhoJ+Ws/D/J9rXW6gXodgH8QYlz2UCl+sdUDmNIg== + rimraf@^2.5.4, rimraf@^2.6.3, rimraf@^2.7.1: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" @@ -9367,6 +9711,13 @@ serialize-error@^2.1.0: resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-2.1.0.tgz#50b679d5635cdf84667bdc8e59af4e5b81d5f60a" integrity sha1-ULZ51WNc34Rme9yOWa9OW4HV9go= +serialize-error@^8.0.1: + version "8.1.0" + resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-8.1.0.tgz#3a069970c712f78634942ddd50fbbc0eaebe2f67" + integrity sha512-3NnuWfM6vBYoy5gZFvHiYsVbafvI9vZv/+jlIigFn4oP4zjNPK3LhcY0xSCgeb1a5L8jO71Mit9LlNoi2UfDDQ== + dependencies: + type-fest "^0.20.2" + serve-static@1.15.0, serve-static@^1.13.1: version "1.15.0" resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" @@ -9392,6 +9743,11 @@ set-value@^2.0.0, set-value@^2.0.1: is-plain-object "^2.0.3" split-string "^3.0.1" +setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= + setprototypeof@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" @@ -9738,6 +10094,11 @@ statuses@~1.5.0: resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= +str2buf@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/str2buf/-/str2buf-1.3.0.tgz#a4172afff4310e67235178e738a2dbb573abead0" + integrity sha512-xIBmHIUHYZDP4HyoXGHYNVmxlXLXDrtFHYT0eV6IOdEj3VO9ccaF1Ejl9Oq8iFjITllpT8FhaXb4KsNmw+3EuA== + stream-buffers@2.2.x: version "2.2.0" resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-2.2.0.tgz#91d5f5130d1cef96dcfa7f726945188741d09ee4" @@ -9917,7 +10278,7 @@ symbol-tree@^3.2.4: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== -table-layout@^1.0.1: +table-layout@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/table-layout/-/table-layout-1.0.2.tgz#c4038a1853b0136d63365a734b6931cf4fad4a04" integrity sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A== @@ -10145,9 +10506,9 @@ trim-newlines@^3.0.0: integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== ts-jest@^27.0.3: - version "27.1.4" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.1.4.tgz#84d42cf0f4e7157a52e7c64b1492c46330943e00" - integrity sha512-qjkZlVPWVctAezwsOD1OPzbZ+k7zA5z3oxII4dGdZo5ggX/PL7kvwTM0pXTr10fAtbiVpJaL3bWd502zAhpgSQ== + version "27.1.5" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.1.5.tgz#0ddf1b163fbaae3d5b7504a1e65c914a95cff297" + integrity sha512-Xv6jBQPoBEvBq/5i2TeSG9tt/nqkbpcurrEG1b+2yfBrcJelOZF9Ml6dmyMh7bcW9JyFbRYpR5rxROSlBLTZHA== dependencies: bs-logger "0.x" fast-json-stable-stringify "2.x" @@ -10197,7 +10558,7 @@ tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.1, tslib@^2.1.0: +tslib@^2.0.0, tslib@^2.0.1, tslib@^2.1.0, tslib@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== @@ -10602,6 +10963,22 @@ web-did-resolver@^2.0.8: cross-fetch "^3.1.2" did-resolver "^3.1.5" +webcrypto-core@^1.7.4: + version "1.7.5" + resolved "https://registry.yarnpkg.com/webcrypto-core/-/webcrypto-core-1.7.5.tgz#c02104c953ca7107557f9c165d194c6316587ca4" + integrity sha512-gaExY2/3EHQlRNNNVSrbG2Cg94Rutl7fAaKILS1w8ZDhGxdFOaw6EbCfHIxPy9vt/xwp5o0VQAx9aySPF6hU1A== + dependencies: + "@peculiar/asn1-schema" "^2.1.6" + "@peculiar/json-schema" "^1.1.12" + asn1js "^3.0.1" + pvtsutils "^1.3.2" + tslib "^2.4.0" + +webcrypto-shim@^0.1.4: + version "0.1.7" + resolved "https://registry.yarnpkg.com/webcrypto-shim/-/webcrypto-shim-0.1.7.tgz#da8be23061a0451cf23b424d4a9b61c10f091c12" + integrity sha512-JAvAQR5mRNRxZW2jKigWMjCMkjSdmP5cColRP1U/pTg69VgHXEi1orv5vVpJ55Zc5MIaPc1aaurzd9pjv2bveg== + webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" @@ -10913,3 +11290,8 @@ yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==