From cd9ea986cd6e566b2a1434b531fc70d287fdfe08 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Thu, 6 Apr 2023 11:07:37 +0100 Subject: [PATCH 001/120] Enable Attestations --- dist/vdxf/classes/Challenge.js | 10 ++++++---- src/vdxf/classes/Challenge.ts | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index 18f4935..971124b 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -107,7 +107,7 @@ class Challenge extends __1.VDXFObject { const _subject = this.subject ? this.subject : []; const _provisioning_info = this.provisioning_info ? this.provisioning_info : []; const _alt_auth_factors = []; - const _attestations = []; + const _attestations = this.attestations; const _redirect_uris = this.redirect_uris ? this.redirect_uris : []; const _context = this.context ? this.context : new Context_1.Context({}); length += _challenge_id.byteLength(); @@ -149,7 +149,7 @@ class Challenge extends __1.VDXFObject { const _subject = this.subject ? this.subject : []; const _provisioning_info = this.provisioning_info ? this.provisioning_info : []; const _alt_auth_factors = []; - const _attestations = []; + const _attestations = this.attestations; const _redirect_uris = this.redirect_uris ? this.redirect_uris : []; const _context = this.context ? this.context : new Context_1.Context({}); writer.writeSlice(_challenge_id.toBuffer()); @@ -221,8 +221,10 @@ class Challenge extends __1.VDXFObject { } this.attestations = []; const attestationsLength = reader.readVarInt(); - if (attestationsLength > 0) { - throw new Error("Attestations currently unsupported"); + for (let i = 0; i < attestationsLength; i++) { + const _att = new Attestation(); + reader.offset = _att.fromBuffer(reader.buffer, reader.offset); + this.attestations.push(_att); } this.redirect_uris = []; const urisLength = reader.readVarInt(); diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index d4c9647..7de1905 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -183,7 +183,7 @@ export class Challenge extends VDXFObject implements ChallengeInterface { const _subject = this.subject ? this.subject : []; const _provisioning_info = this.provisioning_info ? this.provisioning_info : []; const _alt_auth_factors = []; - const _attestations = []; + const _attestations = this.attestations; const _redirect_uris = this.redirect_uris ? this.redirect_uris : []; const _context = this.context ? this.context : new Context({}); @@ -253,7 +253,7 @@ export class Challenge extends VDXFObject implements ChallengeInterface { const _subject = this.subject ? this.subject : []; const _provisioning_info = this.provisioning_info ? this.provisioning_info : []; const _alt_auth_factors = []; - const _attestations = []; + const _attestations = this.attestations; const _redirect_uris = this.redirect_uris ? this.redirect_uris : []; const _context = this.context ? this.context : new Context({}); @@ -364,8 +364,10 @@ export class Challenge extends VDXFObject implements ChallengeInterface { this.attestations = []; const attestationsLength = reader.readVarInt(); - if (attestationsLength > 0) { - throw new Error("Attestations currently unsupported"); + for (let i = 0; i < attestationsLength; i++) { + const _att = new Attestation(); + reader.offset = _att.fromBuffer(reader.buffer, reader.offset); + this.attestations.push(_att); } this.redirect_uris = []; From 4d36210738db73cef17cafa83ec98f202d9ccb03 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Thu, 6 Apr 2023 11:26:40 +0100 Subject: [PATCH 002/120] Correct init of Attestations --- dist/vdxf/classes/Challenge.js | 2 +- src/vdxf/classes/Challenge.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index 971124b..5c04198 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -107,7 +107,7 @@ class Challenge extends __1.VDXFObject { const _subject = this.subject ? this.subject : []; const _provisioning_info = this.provisioning_info ? this.provisioning_info : []; const _alt_auth_factors = []; - const _attestations = this.attestations; + const _attestations = this.attestations ? this.attestations : []; const _redirect_uris = this.redirect_uris ? this.redirect_uris : []; const _context = this.context ? this.context : new Context_1.Context({}); length += _challenge_id.byteLength(); diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index 7de1905..da1b2d0 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -183,7 +183,7 @@ export class Challenge extends VDXFObject implements ChallengeInterface { const _subject = this.subject ? this.subject : []; const _provisioning_info = this.provisioning_info ? this.provisioning_info : []; const _alt_auth_factors = []; - const _attestations = this.attestations; + const _attestations = this.attestations ? this.attestations : []; const _redirect_uris = this.redirect_uris ? this.redirect_uris : []; const _context = this.context ? this.context : new Context({}); From 1af97832917f77129ab5ce71bc8b92467237e642 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Thu, 6 Apr 2023 12:23:17 +0100 Subject: [PATCH 003/120] Typo --- dist/vdxf/classes/Challenge.js | 2 +- src/vdxf/classes/Challenge.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index 5c04198..98e2693 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -149,7 +149,7 @@ class Challenge extends __1.VDXFObject { const _subject = this.subject ? this.subject : []; const _provisioning_info = this.provisioning_info ? this.provisioning_info : []; const _alt_auth_factors = []; - const _attestations = this.attestations; + const _attestations = this.attestations ? this.attestations : []; const _redirect_uris = this.redirect_uris ? this.redirect_uris : []; const _context = this.context ? this.context : new Context_1.Context({}); writer.writeSlice(_challenge_id.toBuffer()); diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index da1b2d0..22a4369 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -253,7 +253,7 @@ export class Challenge extends VDXFObject implements ChallengeInterface { const _subject = this.subject ? this.subject : []; const _provisioning_info = this.provisioning_info ? this.provisioning_info : []; const _alt_auth_factors = []; - const _attestations = this.attestations; + const _attestations = this.attestations ? this.attestations : []; const _redirect_uris = this.redirect_uris ? this.redirect_uris : []; const _context = this.context ? this.context : new Context({}); From 154341c73fc46a1b2ebd1195cae132159645a62a Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Thu, 6 Apr 2023 13:18:10 +0100 Subject: [PATCH 004/120] add more constructors --- dist/vdxf/classes/Challenge.d.ts | 1 + dist/vdxf/classes/Challenge.js | 4 ++++ src/vdxf/classes/Challenge.ts | 10 +++++++++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/dist/vdxf/classes/Challenge.d.ts b/dist/vdxf/classes/Challenge.d.ts index 324e4c3..6ac3c15 100644 --- a/dist/vdxf/classes/Challenge.d.ts +++ b/dist/vdxf/classes/Challenge.d.ts @@ -26,6 +26,7 @@ export declare class Audience extends Utf8DataVdxfObject { export declare class AltAuthFactor extends Utf8DataVdxfObject { } export declare class Attestation extends Utf8DataVdxfObject { + constructor(vdxfkey?: string); } export interface ChallengeInterface { challenge_id: string; diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index 98e2693..8f69f35 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -63,6 +63,9 @@ class AltAuthFactor extends __1.Utf8DataVdxfObject { } exports.AltAuthFactor = AltAuthFactor; class Attestation extends __1.Utf8DataVdxfObject { + constructor(vdxfkey = "") { + super("", vdxfkey); + } } exports.Attestation = Attestation; class Challenge extends __1.VDXFObject { @@ -125,6 +128,7 @@ class Challenge extends __1.VDXFObject { length += _provisioning_info.reduce((sum, current) => sum + current.byteLength(), 0); length += varuint_1.default.encodingLength(_alt_auth_factors.length); length += varuint_1.default.encodingLength(_attestations.length); + length += _attestations.reduce((sum, current) => sum + current.byteLength(), 0); length += varuint_1.default.encodingLength(_redirect_uris.length); length += _redirect_uris.reduce((sum, current) => sum + current.byteLength(), 0); } diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index 22a4369..0e75fc9 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -75,7 +75,11 @@ export class Audience extends Utf8DataVdxfObject {} export class AltAuthFactor extends Utf8DataVdxfObject {} -export class Attestation extends Utf8DataVdxfObject {} +export class Attestation extends Utf8DataVdxfObject { + constructor(vdxfkey: string = "") { + super("", vdxfkey); + } +} export interface ChallengeInterface { // Challenge specific VDXF key @@ -221,6 +225,10 @@ export class Challenge extends VDXFObject implements ChallengeInterface { length += varuint.encodingLength(_alt_auth_factors.length); length += varuint.encodingLength(_attestations.length); + length += _attestations.reduce( + (sum, current) => sum + current.byteLength(), + 0 + ); length += varuint.encodingLength(_redirect_uris.length); length += _redirect_uris.reduce( From 4f556a043505165e83a7f7874cc0b33569eb1d43 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Thu, 6 Apr 2023 15:50:44 +0100 Subject: [PATCH 005/120] add decision --- dist/vdxf/classes/Decision.d.ts | 2 +- dist/vdxf/classes/Decision.js | 12 ++++++++---- src/vdxf/classes/Decision.ts | 18 ++++++++++++------ 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/dist/vdxf/classes/Decision.d.ts b/dist/vdxf/classes/Decision.d.ts index 1e506d1..db61fd0 100644 --- a/dist/vdxf/classes/Decision.d.ts +++ b/dist/vdxf/classes/Decision.d.ts @@ -18,7 +18,7 @@ export declare class Decision extends VDXFObject { request: Request; created_at: number; skipped?: boolean; - attestations: Array; + attestations: Array; salt?: string; constructor(decision?: DecisionInterface, vdxfkey?: string); dataByteLength(): number; diff --git a/dist/vdxf/classes/Decision.js b/dist/vdxf/classes/Decision.js index 1102bad..64a59fd 100644 --- a/dist/vdxf/classes/Decision.js +++ b/dist/vdxf/classes/Decision.js @@ -4,6 +4,7 @@ exports.Decision = void 0; const __1 = require(".."); const bufferutils_1 = require("../../utils/bufferutils"); const varuint_1 = require("../../utils/varuint"); +const Challenge_1 = require("./Challenge"); const Context_1 = require("./Context"); const Hash160_1 = require("./Hash160"); const Request_1 = require("./Request"); @@ -30,13 +31,14 @@ class Decision extends __1.VDXFObject { : Hash160_1.Hash160.getEmpty(); const _request = this.request ? this.request : new Request_1.Request(); const _context = this.context ? this.context : new Context_1.Context(); - const _attestations = []; + const _attestations = this.attestations ? this.attestations : []; length += _challenge_id.byteLength(); length += 8; // created_at length += _salt.byteLength(); if (this.vdxfkey === __1.LOGIN_CONSENT_DECISION_VDXF_KEY.vdxfid) { length += 1; // skipped length += varuint_1.default.encodingLength(_attestations.length); + length += _attestations.reduce((sum, current) => sum + current.byteLength(), 0); } length += _request.byteLength(); length += _context.byteLength(); @@ -52,7 +54,7 @@ class Decision extends __1.VDXFObject { : Hash160_1.Hash160.getEmpty(); const _request = this.request ? this.request : new Request_1.Request(); const _context = this.context ? this.context : new Context_1.Context(); - const _attestations = []; + const _attestations = this.attestations ? this.attestations : []; writer.writeSlice(_decision_id.toBuffer()); writer.writeUInt64(_created_at); writer.writeSlice(_salt.toBuffer()); @@ -82,8 +84,10 @@ class Decision extends __1.VDXFObject { this.skipped = reader.readUInt8() === 1 ? true : false; this.attestations = []; const attestationsLength = reader.readVarInt(); - if (attestationsLength > 0) { - throw new Error("Attestations currently unsupported"); + for (let i = 0; i < attestationsLength; i++) { + const _att = new Challenge_1.Attestation(); + reader.offset = _att.fromBuffer(reader.buffer, reader.offset); + this.attestations.push(_att); } } const _context = new Context_1.Context(); diff --git a/src/vdxf/classes/Decision.ts b/src/vdxf/classes/Decision.ts index 6690b42..40b322a 100644 --- a/src/vdxf/classes/Decision.ts +++ b/src/vdxf/classes/Decision.ts @@ -35,7 +35,7 @@ export class Decision extends VDXFObject { request: Request; created_at: number; skipped?: boolean; - attestations: Array; + attestations: Array; salt?: string; constructor( @@ -66,7 +66,7 @@ export class Decision extends VDXFObject { : Hash160.getEmpty(); const _request = this.request ? this.request : new Request(); const _context = this.context ? this.context : new Context(); - const _attestations = []; + const _attestations = this.attestations ? this.attestations : []; length += _challenge_id.byteLength(); @@ -78,6 +78,10 @@ export class Decision extends VDXFObject { length += 1; // skipped length += varuint.encodingLength(_attestations.length); + length += _attestations.reduce( + (sum, current) => sum + current.byteLength(), + 0 + ); } length += _request.byteLength(); @@ -98,7 +102,7 @@ export class Decision extends VDXFObject { : Hash160.getEmpty(); const _request = this.request ? this.request : new Request(); const _context = this.context ? this.context : new Context(); - const _attestations = []; + const _attestations = this.attestations ? this.attestations : []; writer.writeSlice(_decision_id.toBuffer()); @@ -150,9 +154,11 @@ export class Decision extends VDXFObject { this.attestations = []; const attestationsLength = reader.readVarInt(); - if (attestationsLength > 0) { - throw new Error("Attestations currently unsupported"); - } + for (let i = 0; i < attestationsLength; i++) { + const _att = new Attestation(); + reader.offset = _att.fromBuffer(reader.buffer, reader.offset); + this.attestations.push(_att); + } } const _context = new Context(); From 348be7ae36866da79906ffb10cb22946f3171691 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Thu, 6 Apr 2023 21:06:43 +0100 Subject: [PATCH 006/120] Add attesation reply --- dist/vdxf/classes/Decision.js | 1 + src/vdxf/classes/Decision.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/dist/vdxf/classes/Decision.js b/dist/vdxf/classes/Decision.js index 64a59fd..a8e2de2 100644 --- a/dist/vdxf/classes/Decision.js +++ b/dist/vdxf/classes/Decision.js @@ -13,6 +13,7 @@ class Decision extends __1.VDXFObject { decision_id: "", request: new Request_1.Request(), created_at: 0, + attestations: [], }, vdxfkey = __1.LOGIN_CONSENT_DECISION_VDXF_KEY.vdxfid) { super(vdxfkey); this.decision_id = decision.decision_id; diff --git a/src/vdxf/classes/Decision.ts b/src/vdxf/classes/Decision.ts index 40b322a..8c9f53b 100644 --- a/src/vdxf/classes/Decision.ts +++ b/src/vdxf/classes/Decision.ts @@ -43,6 +43,7 @@ export class Decision extends VDXFObject { decision_id: "", request: new Request(), created_at: 0, + attestations: [], }, vdxfkey: string = LOGIN_CONSENT_DECISION_VDXF_KEY.vdxfid ) { From 818d978ea72475b19ae6340484a82e00f1f4e049 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Wed, 12 Apr 2023 18:24:00 +0100 Subject: [PATCH 007/120] updates for data --- dist/vdxf/classes/Challenge.d.ts | 4 ++-- dist/vdxf/classes/Challenge.js | 12 ++++++------ dist/vdxf/classes/Decision.js | 3 +-- dist/vdxf/scopes.d.ts | 1 + dist/vdxf/scopes.js | 10 +++++++++- src/vdxf/classes/Challenge.ts | 12 ++++++------ src/vdxf/classes/Decision.ts | 3 +-- src/vdxf/scopes.ts | 9 +++++++++ 8 files changed, 35 insertions(+), 19 deletions(-) diff --git a/dist/vdxf/classes/Challenge.d.ts b/dist/vdxf/classes/Challenge.d.ts index 6ac3c15..7a3bdd4 100644 --- a/dist/vdxf/classes/Challenge.d.ts +++ b/dist/vdxf/classes/Challenge.d.ts @@ -19,14 +19,14 @@ export declare class ProvisioningInfo extends Utf8OrBase58Object { constructor(data?: string, vdxfkey?: string); } export declare class RequestedPermission extends Utf8DataVdxfObject { - constructor(vdxfkey?: string); + constructor(data?: string, vdxfkey?: string); } export declare class Audience extends Utf8DataVdxfObject { } export declare class AltAuthFactor extends Utf8DataVdxfObject { } export declare class Attestation extends Utf8DataVdxfObject { - constructor(vdxfkey?: string); + constructor(data?: string, vdxfkey?: string); } export interface ChallengeInterface { challenge_id: string; diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index 8f69f35..410b485 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -51,8 +51,8 @@ class ProvisioningInfo extends __1.Utf8OrBase58Object { } exports.ProvisioningInfo = ProvisioningInfo; class RequestedPermission extends __1.Utf8DataVdxfObject { - constructor(vdxfkey = "") { - super("", vdxfkey); + constructor(data = "", vdxfkey = "") { + super(data, vdxfkey); } } exports.RequestedPermission = RequestedPermission; @@ -63,8 +63,8 @@ class AltAuthFactor extends __1.Utf8DataVdxfObject { } exports.AltAuthFactor = AltAuthFactor; class Attestation extends __1.Utf8DataVdxfObject { - constructor(vdxfkey = "") { - super("", vdxfkey); + constructor(data = "", vdxfkey = "") { + super(data, vdxfkey); } } exports.Attestation = Attestation; @@ -72,7 +72,7 @@ class Challenge extends __1.VDXFObject { constructor(challenge = { challenge_id: "", created_at: 0 }, vdxfkey = __1.LOGIN_CONSENT_CHALLENGE_VDXF_KEY.vdxfid) { super(vdxfkey); this.challenge_id = challenge.challenge_id; - this.requested_access = challenge.requested_access; + this.requested_access = challenge.requested_access ? challenge.requested_access.map((x) => new RequestedPermission(x.data, x.vdxfkey)) : challenge.requested_access; this.requested_access_audience = challenge.requested_access_audience; this.subject = challenge.subject ? challenge.subject.map((x) => new Subject(x.data, x.vdxfkey)) @@ -82,7 +82,7 @@ class Challenge extends __1.VDXFObject { : challenge.provisioning_info; this.alt_auth_factors = challenge.alt_auth_factors; this.session_id = challenge.session_id; - this.attestations = challenge.attestations; + this.attestations = challenge.attestations ? challenge.attestations.map((x) => new Attestation(x.data, x.vdxfkey)) : challenge.attestations; this.redirect_uris = challenge.redirect_uris ? challenge.redirect_uris.map((x) => new RedirectUri(x.uri, x.vdxfkey)) : challenge.redirect_uris; diff --git a/dist/vdxf/classes/Decision.js b/dist/vdxf/classes/Decision.js index a8e2de2..a4502e4 100644 --- a/dist/vdxf/classes/Decision.js +++ b/dist/vdxf/classes/Decision.js @@ -13,14 +13,13 @@ class Decision extends __1.VDXFObject { decision_id: "", request: new Request_1.Request(), created_at: 0, - attestations: [], }, vdxfkey = __1.LOGIN_CONSENT_DECISION_VDXF_KEY.vdxfid) { super(vdxfkey); this.decision_id = decision.decision_id; this.request = new Request_1.Request(decision.request); this.context = decision.context; this.created_at = decision.created_at; - this.attestations = decision.attestations; + this.attestations = decision.attestations ? decision.attestations.map((x) => new Challenge_1.Attestation(x.data, x.vdxfkey)) : decision.attestations; this.salt = decision.salt; this.skipped = decision.skipped ? true : false; } diff --git a/dist/vdxf/scopes.d.ts b/dist/vdxf/scopes.d.ts index fa45b71..3cd6b30 100644 --- a/dist/vdxf/scopes.d.ts +++ b/dist/vdxf/scopes.d.ts @@ -1,3 +1,4 @@ import { VDXFKeyInterface } from "./keys"; export declare const IDENTITY_VIEW: VDXFKeyInterface; export declare const IDENTITY_AGREEMENT: VDXFKeyInterface; +export declare const IDENTITY_DATA_REQUEST: VDXFKeyInterface; diff --git a/dist/vdxf/scopes.js b/dist/vdxf/scopes.js index 59a75f3..837287c 100644 --- a/dist/vdxf/scopes.js +++ b/dist/vdxf/scopes.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.IDENTITY_AGREEMENT = exports.IDENTITY_VIEW = void 0; +exports.IDENTITY_DATA_REQUEST = exports.IDENTITY_AGREEMENT = exports.IDENTITY_VIEW = void 0; exports.IDENTITY_VIEW = { vdxfid: "iLUrA89mDKnwxZcMiPadfNB9TLp58A2TKU", hash160result: "aeab47faa1b2bde2633a63b8284770a8e5c489ba", @@ -17,3 +17,11 @@ exports.IDENTITY_AGREEMENT = { name: "vrsc::identity.authentication.permission.agree" } }; +exports.IDENTITY_DATA_REQUEST = { + vdxfid: "iNqLaiDJjcADGCvXcQZnPqwTqMXzQbDCFu", + hash160result: "fbd8fe825062b19a9bd26dc51b6f768828115ad4", + qualifiedname: { + namespace: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + name: "vrsc::identitydata.request" + } +}; diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index 0e75fc9..43ed996 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -66,8 +66,8 @@ export class ProvisioningInfo extends Utf8OrBase58Object { } export class RequestedPermission extends Utf8DataVdxfObject { - constructor(vdxfkey: string = "") { - super("", vdxfkey); + constructor(data: string = "", vdxfkey: string = "") { + super(data, vdxfkey); } } @@ -76,8 +76,8 @@ export class Audience extends Utf8DataVdxfObject {} export class AltAuthFactor extends Utf8DataVdxfObject {} export class Attestation extends Utf8DataVdxfObject { - constructor(vdxfkey: string = "") { - super("", vdxfkey); + constructor(data: string = "", vdxfkey: string = "") { + super(data, vdxfkey); } } @@ -147,7 +147,7 @@ export class Challenge extends VDXFObject implements ChallengeInterface { super(vdxfkey); this.challenge_id = challenge.challenge_id; - this.requested_access = challenge.requested_access; + this.requested_access = challenge.requested_access ? challenge.requested_access.map((x) => new RequestedPermission(x.data, x.vdxfkey)) : challenge.requested_access; this.requested_access_audience = challenge.requested_access_audience; this.subject = challenge.subject ? challenge.subject.map((x) => new Subject(x.data, x.vdxfkey)) @@ -157,7 +157,7 @@ export class Challenge extends VDXFObject implements ChallengeInterface { : challenge.provisioning_info; this.alt_auth_factors = challenge.alt_auth_factors; this.session_id = challenge.session_id; - this.attestations = challenge.attestations; + this.attestations = challenge.attestations ? challenge.attestations.map((x) => new Attestation(x.data, x.vdxfkey)) : challenge.attestations; this.redirect_uris = challenge.redirect_uris ? challenge.redirect_uris.map((x) => new RedirectUri(x.uri, x.vdxfkey)) : challenge.redirect_uris; diff --git a/src/vdxf/classes/Decision.ts b/src/vdxf/classes/Decision.ts index 8c9f53b..171b5e9 100644 --- a/src/vdxf/classes/Decision.ts +++ b/src/vdxf/classes/Decision.ts @@ -43,7 +43,6 @@ export class Decision extends VDXFObject { decision_id: "", request: new Request(), created_at: 0, - attestations: [], }, vdxfkey: string = LOGIN_CONSENT_DECISION_VDXF_KEY.vdxfid ) { @@ -53,7 +52,7 @@ export class Decision extends VDXFObject { this.request = new Request(decision.request); this.context = decision.context; this.created_at = decision.created_at; - this.attestations = decision.attestations; + this.attestations = decision.attestations ? decision.attestations.map((x) => new Attestation(x.data, x.vdxfkey)) : decision.attestations; this.salt = decision.salt; this.skipped = decision.skipped ? true : false; } diff --git a/src/vdxf/scopes.ts b/src/vdxf/scopes.ts index 49a8335..e820e34 100644 --- a/src/vdxf/scopes.ts +++ b/src/vdxf/scopes.ts @@ -16,4 +16,13 @@ export const IDENTITY_AGREEMENT: VDXFKeyInterface = { namespace: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", name: "vrsc::identity.authentication.permission.agree" } +}; + +export const IDENTITY_DATA_REQUEST: VDXFKeyInterface = { + vdxfid: "iNqLaiDJjcADGCvXcQZnPqwTqMXzQbDCFu", + hash160result: "fbd8fe825062b19a9bd26dc51b6f768828115ad4", + qualifiedname: { + namespace: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + name: "vrsc::identitydata.request" + } }; \ No newline at end of file From 1c998252b674238754bf7219dea420200b10a26a Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Fri, 14 Apr 2023 19:49:43 +0100 Subject: [PATCH 008/120] Updates for types of premissions --- dist/vdxf/classes/Challenge.d.ts | 28 ++++++-- dist/vdxf/classes/Challenge.js | 87 ++++++++++++++++++++--- dist/vdxf/classes/Decision.d.ts | 2 +- dist/vdxf/classes/Request.d.ts | 2 +- dist/vdxf/classes/Response.d.ts | 2 +- src/vdxf/classes/Challenge.ts | 115 ++++++++++++++++++++++++++++--- src/vdxf/index.ts | 11 +-- 7 files changed, 217 insertions(+), 30 deletions(-) diff --git a/dist/vdxf/classes/Challenge.d.ts b/dist/vdxf/classes/Challenge.d.ts index 7a3bdd4..567158b 100644 --- a/dist/vdxf/classes/Challenge.d.ts +++ b/dist/vdxf/classes/Challenge.d.ts @@ -18,9 +18,6 @@ export declare class Subject extends Utf8OrBase58Object { export declare class ProvisioningInfo extends Utf8OrBase58Object { constructor(data?: string, vdxfkey?: string); } -export declare class RequestedPermission extends Utf8DataVdxfObject { - constructor(data?: string, vdxfkey?: string); -} export declare class Audience extends Utf8DataVdxfObject { } export declare class AltAuthFactor extends Utf8DataVdxfObject { @@ -46,7 +43,7 @@ export interface ChallengeInterface { export declare class Challenge extends VDXFObject implements ChallengeInterface { challenge_id: string; requested_access?: Array | null; - requested_access_audience?: Array | null; + requested_access_audience?: Array | null; subject?: Array; provisioning_info?: Array; alt_auth_factors?: Array | null; @@ -65,7 +62,7 @@ export declare class Challenge extends VDXFObject implements ChallengeInterface vdxfkey: string; challenge_id: string; requested_access: RequestedPermission[]; - requested_access_audience: RequestedPermission[]; + requested_access_audience: Audience[]; subject: Subject[]; provisioning_info: ProvisioningInfo[]; alt_auth_factors: AltAuthFactor[]; @@ -81,3 +78,24 @@ export declare class Challenge extends VDXFObject implements ChallengeInterface skip: boolean; }; } +export declare class AttestationRequest extends VDXFObject { + acceptedattestors?: Array; + attestationkeys?: Array; + attestorfilters?: Array; + constructor(vdxfkey: string, data: any); + dataByteLength(): number; + toDataBuffer(): Buffer; + fromDataBuffer(buffer: Buffer, offset?: number): number; + toJson(): { + vdxfkey: string; + acceptedattestors: String[]; + attestationkeys: String[]; + attestorfilters: String[]; + }; +} +export declare class BasicPermission extends Utf8DataVdxfObject { + constructor(data?: string, vdxfkey?: string); +} +export declare class RequestedPermission extends VDXFObject { + constructor(vdxfkey?: string, data?: any); +} diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index 410b485..de52a14 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -1,11 +1,13 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.Challenge = exports.Attestation = exports.AltAuthFactor = exports.Audience = exports.RequestedPermission = exports.ProvisioningInfo = exports.Subject = exports.RedirectUri = void 0; +exports.RequestedPermission = exports.BasicPermission = exports.AttestationRequest = exports.Challenge = exports.Attestation = exports.AltAuthFactor = exports.Audience = exports.ProvisioningInfo = exports.Subject = exports.RedirectUri = void 0; const __1 = require("../"); const bufferutils_1 = require("../../utils/bufferutils"); const varuint_1 = require("../../utils/varuint"); const Context_1 = require("./Context"); const Hash160_1 = require("./Hash160"); +const address_1 = require("../../utils/address"); +const vdxf_1 = require("../../constants/vdxf"); class RedirectUri extends __1.VDXFObject { constructor(uri = "", vdxfkey = "") { super(vdxfkey); @@ -50,12 +52,6 @@ class ProvisioningInfo extends __1.Utf8OrBase58Object { } } exports.ProvisioningInfo = ProvisioningInfo; -class RequestedPermission extends __1.Utf8DataVdxfObject { - constructor(data = "", vdxfkey = "") { - super(data, vdxfkey); - } -} -exports.RequestedPermission = RequestedPermission; class Audience extends __1.Utf8DataVdxfObject { } exports.Audience = Audience; @@ -72,7 +68,7 @@ class Challenge extends __1.VDXFObject { constructor(challenge = { challenge_id: "", created_at: 0 }, vdxfkey = __1.LOGIN_CONSENT_CHALLENGE_VDXF_KEY.vdxfid) { super(vdxfkey); this.challenge_id = challenge.challenge_id; - this.requested_access = challenge.requested_access ? challenge.requested_access.map((x) => new RequestedPermission(x.data, x.vdxfkey)) : challenge.requested_access; + this.requested_access = challenge.requested_access; this.requested_access_audience = challenge.requested_access_audience; this.subject = challenge.subject ? challenge.subject.map((x) => new Subject(x.data, x.vdxfkey)) @@ -266,3 +262,78 @@ class Challenge extends __1.VDXFObject { } } exports.Challenge = Challenge; +class AttestationRequest extends __1.VDXFObject { + constructor(vdxfkey = "", data) { + super(vdxfkey); + for (let key in data) { + this[key] = data[key]; + } + } + dataByteLength() { + let length = 0; + for (const item of Object.getOwnPropertyNames(this)) { + if ((item !== "version") && (item !== "vdxfkey")) { + length += varuint_1.default.encodingLength(this[item].length); + if (this[item].length > 0) { + length += this[item].reduce((sum, current) => sum + (0, address_1.fromBase58Check)(current).hash.byteLength, 0); + } + } + } + return length; + } + toDataBuffer() { + const writer = new bufferutils_1.default.BufferWriter(Buffer.alloc(this.dataByteLength())); + for (const item of Object.getOwnPropertyNames(this)) { + if ((item !== "version") && (item !== "vdxfkey")) { + writer.writeArray(this[item].map((x) => (0, address_1.fromBase58Check)(x).hash)); + } + } + return writer.buffer; + } + fromDataBuffer(buffer, offset) { + const reader = new bufferutils_1.default.BufferReader(buffer, offset); + for (const item of Object.getOwnPropertyNames(this)) { + if ((item !== "version") && (item !== "vdxfkey")) { + const arrayLength = reader.readVarInt(); + for (let i = 0; i < arrayLength; i++) { + this[item].push((0, address_1.toBase58Check)(reader.readSlice(vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION)); + } + if (offset < buffer.length - 1) { + reader.offset = this.fromDataBuffer(reader.buffer, reader.offset); + } + } + } + return reader.offset; + } + toJson() { + return { + vdxfkey: this.vdxfkey, + acceptedattestors: this.acceptedattestors, + attestationkeys: this.attestationkeys, + attestorfilters: this.attestorfilters, + }; + } +} +exports.AttestationRequest = AttestationRequest; +class BasicPermission extends __1.Utf8DataVdxfObject { + constructor(data = "", vdxfkey = "") { + super(data, vdxfkey); + } +} +exports.BasicPermission = BasicPermission; +class RequestedPermission extends __1.VDXFObject { + constructor(vdxfkey = "", data = "") { + super(vdxfkey); + switch (vdxfkey) { + case __1.IDENTITY_DATA_REQUEST.vdxfid: + return new AttestationRequest(vdxfkey, data); + case __1.IDENTITY_VIEW.vdxfid: + return new BasicPermission(vdxfkey); + case __1.IDENTITY_AGREEMENT.vdxfid: + return new BasicPermission(vdxfkey); + default: + throw new Error(`Invalid type: ${vdxfkey}`); + } + } +} +exports.RequestedPermission = RequestedPermission; diff --git a/dist/vdxf/classes/Decision.d.ts b/dist/vdxf/classes/Decision.d.ts index db61fd0..1de7574 100644 --- a/dist/vdxf/classes/Decision.d.ts +++ b/dist/vdxf/classes/Decision.d.ts @@ -46,7 +46,7 @@ export declare class Decision extends VDXFObject { vdxfkey: string; challenge_id: string; requested_access: import("./Challenge").RequestedPermission[]; - requested_access_audience: import("./Challenge").RequestedPermission[]; + requested_access_audience: import("./Challenge").Audience[]; subject: import("./Challenge").Subject[]; provisioning_info: import("./Challenge").ProvisioningInfo[]; alt_auth_factors: import("./Challenge").AltAuthFactor[]; diff --git a/dist/vdxf/classes/Request.d.ts b/dist/vdxf/classes/Request.d.ts index 275a6eb..a744c0c 100644 --- a/dist/vdxf/classes/Request.d.ts +++ b/dist/vdxf/classes/Request.d.ts @@ -26,7 +26,7 @@ export declare class Request extends VDXFObject { vdxfkey: string; challenge_id: string; requested_access: import("./Challenge").RequestedPermission[]; - requested_access_audience: import("./Challenge").RequestedPermission[]; + requested_access_audience: import("./Challenge").Audience[]; subject: import("./Challenge").Subject[]; provisioning_info: import("./Challenge").ProvisioningInfo[]; alt_auth_factors: import("./Challenge").AltAuthFactor[]; diff --git a/dist/vdxf/classes/Response.d.ts b/dist/vdxf/classes/Response.d.ts index f3df6ef..6abd7ef 100644 --- a/dist/vdxf/classes/Response.d.ts +++ b/dist/vdxf/classes/Response.d.ts @@ -44,7 +44,7 @@ export declare class Response extends VDXFObject { vdxfkey: string; challenge_id: string; requested_access: import("./Challenge").RequestedPermission[]; - requested_access_audience: import("./Challenge").RequestedPermission[]; + requested_access_audience: import("./Challenge").Audience[]; subject: import("./Challenge").Subject[]; provisioning_info: import("./Challenge").ProvisioningInfo[]; alt_auth_factors: import("./Challenge").AltAuthFactor[]; diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index 43ed996..0df1511 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -6,12 +6,16 @@ import { Utf8DataVdxfObject, VDXFObject, Utf8OrBase58Object, + IDENTITY_DATA_REQUEST, + IDENTITY_VIEW, + IDENTITY_AGREEMENT, } from "../"; import bufferutils from "../../utils/bufferutils"; import varuint from "../../utils/varuint"; import { Context } from "./Context"; import { Hash160 } from "./Hash160"; - +import { fromBase58Check, toBase58Check } from '../../utils/address'; +import { DEFAULT_VERSION, HASH160_BYTE_LENGTH, I_ADDR_VERSION } from '../../constants/vdxf'; export class RedirectUri extends VDXFObject { uri: string; @@ -65,12 +69,6 @@ export class ProvisioningInfo extends Utf8OrBase58Object { } } -export class RequestedPermission extends Utf8DataVdxfObject { - constructor(data: string = "", vdxfkey: string = "") { - super(data, vdxfkey); - } -} - export class Audience extends Utf8DataVdxfObject {} export class AltAuthFactor extends Utf8DataVdxfObject {} @@ -128,7 +126,7 @@ export interface ChallengeInterface { export class Challenge extends VDXFObject implements ChallengeInterface { challenge_id: string; requested_access?: Array | null; - requested_access_audience?: Array | null; + requested_access_audience?: Array | null; subject?: Array; provisioning_info?: Array; alt_auth_factors?: Array | null; @@ -147,7 +145,7 @@ export class Challenge extends VDXFObject implements ChallengeInterface { super(vdxfkey); this.challenge_id = challenge.challenge_id; - this.requested_access = challenge.requested_access ? challenge.requested_access.map((x) => new RequestedPermission(x.data, x.vdxfkey)) : challenge.requested_access; + this.requested_access = challenge.requested_access; this.requested_access_audience = challenge.requested_access_audience; this.subject = challenge.subject ? challenge.subject.map((x) => new Subject(x.data, x.vdxfkey)) @@ -420,3 +418,102 @@ export class Challenge extends VDXFObject implements ChallengeInterface { }; } } + +export class AttestationRequest extends VDXFObject { + acceptedattestors?: Array; + attestationkeys?: Array; + attestorfilters?: Array; + + constructor( vdxfkey: string = "", data: any + ) { + super(vdxfkey); + for (let key in data) { + this[key] = data[key]; + } + + } + + dataByteLength(): number { + + let length = 0; + + for (const item of Object.getOwnPropertyNames(this)) { + if ((item !== "version") && (item !== "vdxfkey")) { + length += varuint.encodingLength(this[item].length); + if (this[item].length > 0) { + length += this[item].reduce( + (sum, current) => sum + fromBase58Check(current).hash.byteLength, + 0 + ); + } + } + + } + return length; + } + + toDataBuffer(): Buffer { + + const writer = new bufferutils.BufferWriter(Buffer.alloc(this.dataByteLength())) + for (const item of Object.getOwnPropertyNames(this)) { + if ((item !== "version") && (item !== "vdxfkey")) { + writer.writeArray(this[item].map((x) => fromBase58Check(x).hash)); + } + } + return writer.buffer; + } + + fromDataBuffer(buffer: Buffer, offset?: number): number { + + const reader = new bufferutils.BufferReader(buffer, offset); + + for (const item of Object.getOwnPropertyNames(this)) { + if ((item !== "version") && (item !== "vdxfkey")) { + const arrayLength = reader.readVarInt(); + for (let i = 0; i < arrayLength; i++) { + this[item].push(toBase58Check(reader.readSlice(HASH160_BYTE_LENGTH), I_ADDR_VERSION)) + } + + if (offset < buffer.length - 1) { + reader.offset = this.fromDataBuffer(reader.buffer, reader.offset) + } + } + } + return reader.offset; + } + + toJson() { + + return { + vdxfkey: this.vdxfkey, + acceptedattestors: this.acceptedattestors, + attestationkeys: this.attestationkeys, + attestorfilters: this.attestorfilters, + } + } +} + +export class BasicPermission extends Utf8DataVdxfObject { + + + constructor(data: string = "", vdxfkey: string = "") { + super(data, vdxfkey); + } +} + + +export class RequestedPermission extends VDXFObject { + constructor(vdxfkey: string = "", data: any = "") { + super(vdxfkey); + switch (vdxfkey) { + case IDENTITY_DATA_REQUEST.vdxfid: + return new AttestationRequest(vdxfkey, data); + case IDENTITY_VIEW.vdxfid: + return new BasicPermission(vdxfkey); + case IDENTITY_AGREEMENT.vdxfid: + return new BasicPermission(vdxfkey); + default: + throw new Error(`Invalid type: ${vdxfkey}`); + } + } +} diff --git a/src/vdxf/index.ts b/src/vdxf/index.ts index e5e4bd3..ece2283 100644 --- a/src/vdxf/index.ts +++ b/src/vdxf/index.ts @@ -49,7 +49,7 @@ export class VDXFObject implements VDXFObjectInterface { toDataBuffer() { return Buffer.alloc(0); } - + fromDataBuffer(buffer: Buffer, offset: number = 0) { return offset } @@ -88,7 +88,7 @@ export class VDXFObject implements VDXFObjectInterface { writer.writeSlice(key.hash); writer.writeVarInt(this.version); - if (dataLength) { + if (dataLength) { writer.writeVarSlice(this.toDataBuffer()); } @@ -155,7 +155,7 @@ export class Utf8OrBase58Object extends VDXFObject { data: string; // VDXF keys that would cause this object to be base58 instead of utf8 - base58Keys: {[key: string]: boolean} = {}; + base58Keys: { [key: string]: boolean } = {}; constructor(data: string = "", vdxfkey: string = "", base58Keys: Array = []) { super(vdxfkey); @@ -198,7 +198,7 @@ export class Utf8OrBase58Object extends VDXFObject { } else { this.data = reader.readVarSlice().toString('utf-8') } - + return reader.offset } @@ -243,4 +243,5 @@ export class VerusIDSignature extends VDXFObject { signature: this.signature, }; } -} \ No newline at end of file +} + From 5130a1f31100bdc72aa0fa097e34ab3410c7fa73 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Mon, 17 Apr 2023 14:15:53 +0100 Subject: [PATCH 009/120] Refactor Permission Class --- dist/vdxf/classes/Challenge.d.ts | 27 ++++--- dist/vdxf/classes/Challenge.js | 81 +++++++++---------- src/vdxf/classes/Challenge.ts | 131 +++++++++++++++++-------------- 3 files changed, 129 insertions(+), 110 deletions(-) diff --git a/dist/vdxf/classes/Challenge.d.ts b/dist/vdxf/classes/Challenge.d.ts index 567158b..6ba436a 100644 --- a/dist/vdxf/classes/Challenge.d.ts +++ b/dist/vdxf/classes/Challenge.d.ts @@ -1,6 +1,7 @@ /// import { Utf8DataVdxfObject, VDXFObject, Utf8OrBase58Object } from "../"; import { Context } from "./Context"; +import { Hash160 } from "./Hash160"; export declare class RedirectUri extends VDXFObject { uri: string; constructor(uri?: string, vdxfkey?: string); @@ -79,23 +80,27 @@ export declare class Challenge extends VDXFObject implements ChallengeInterface }; } export declare class AttestationRequest extends VDXFObject { - acceptedattestors?: Array; - attestationkeys?: Array; - attestorfilters?: Array; - constructor(vdxfkey: string, data: any); + data: { + accepted_attestors?: Array; + attestation_keys?: Array; + attestor_filters?: Array; + }; + private readonly classMembers; dataByteLength(): number; toDataBuffer(): Buffer; fromDataBuffer(buffer: Buffer, offset?: number): number; toJson(): { vdxfkey: string; - acceptedattestors: String[]; - attestationkeys: String[]; - attestorfilters: String[]; + data: { + accepted_attestors: string[]; + attestation_keys: string[]; + attestor_filters: string[]; + }; }; } -export declare class BasicPermission extends Utf8DataVdxfObject { - constructor(data?: string, vdxfkey?: string); -} export declare class RequestedPermission extends VDXFObject { - constructor(vdxfkey?: string, data?: any); + data: object; + private classMembers; + constructor(data?: object, vdxfkey?: string); + private addPrototypes; } diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index de52a14..c971f24 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.RequestedPermission = exports.BasicPermission = exports.AttestationRequest = exports.Challenge = exports.Attestation = exports.AltAuthFactor = exports.Audience = exports.ProvisioningInfo = exports.Subject = exports.RedirectUri = void 0; +exports.RequestedPermission = exports.AttestationRequest = exports.Challenge = exports.Attestation = exports.AltAuthFactor = exports.Audience = exports.ProvisioningInfo = exports.Subject = exports.RedirectUri = void 0; const __1 = require("../"); const bufferutils_1 = require("../../utils/bufferutils"); const varuint_1 = require("../../utils/varuint"); @@ -68,7 +68,7 @@ class Challenge extends __1.VDXFObject { constructor(challenge = { challenge_id: "", created_at: 0 }, vdxfkey = __1.LOGIN_CONSENT_CHALLENGE_VDXF_KEY.vdxfid) { super(vdxfkey); this.challenge_id = challenge.challenge_id; - this.requested_access = challenge.requested_access; + this.requested_access = challenge.requested_access ? challenge.requested_access.map((x) => new RequestedPermission(x.data, x.vdxfkey)) : challenge.requested_access; this.requested_access_audience = challenge.requested_access_audience; this.subject = challenge.subject ? challenge.subject.map((x) => new Subject(x.data, x.vdxfkey)) @@ -191,7 +191,8 @@ class Challenge extends __1.VDXFObject { this.requested_access = []; const requestedAccessLength = reader.readVarInt(); for (let i = 0; i < requestedAccessLength; i++) { - const _perm = new RequestedPermission(); + const _vdxfkey = (0, address_1.toBase58Check)(reader.buffer.slice(reader.offset, reader.offset + vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION); + const _perm = new RequestedPermission({}, _vdxfkey); reader.offset = _perm.fromBuffer(reader.buffer, reader.offset); this.requested_access.push(_perm); } @@ -263,43 +264,33 @@ class Challenge extends __1.VDXFObject { } exports.Challenge = Challenge; class AttestationRequest extends __1.VDXFObject { - constructor(vdxfkey = "", data) { - super(vdxfkey); - for (let key in data) { - this[key] = data[key]; - } - } dataByteLength() { let length = 0; - for (const item of Object.getOwnPropertyNames(this)) { - if ((item !== "version") && (item !== "vdxfkey")) { - length += varuint_1.default.encodingLength(this[item].length); - if (this[item].length > 0) { - length += this[item].reduce((sum, current) => sum + (0, address_1.fromBase58Check)(current).hash.byteLength, 0); - } + for (const item of this.classMembers) { + length += varuint_1.default.encodingLength(this.data[item].length); + if (this.data[item].length > 0) { + length += this.data[item].reduce((sum, current) => sum + current.byteLength(), 0); } } return length; } toDataBuffer() { const writer = new bufferutils_1.default.BufferWriter(Buffer.alloc(this.dataByteLength())); - for (const item of Object.getOwnPropertyNames(this)) { - if ((item !== "version") && (item !== "vdxfkey")) { - writer.writeArray(this[item].map((x) => (0, address_1.fromBase58Check)(x).hash)); - } + for (const item of this.classMembers) { + writer.writeArray(this.data[item].map((x) => x.toBuffer())); } return writer.buffer; } fromDataBuffer(buffer, offset) { const reader = new bufferutils_1.default.BufferReader(buffer, offset); - for (const item of Object.getOwnPropertyNames(this)) { - if ((item !== "version") && (item !== "vdxfkey")) { + const datalength = reader.readVarInt(); + if (datalength > 0) { + for (const item of this.classMembers) { const arrayLength = reader.readVarInt(); for (let i = 0; i < arrayLength; i++) { - this[item].push((0, address_1.toBase58Check)(reader.readSlice(vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION)); - } - if (offset < buffer.length - 1) { - reader.offset = this.fromDataBuffer(reader.buffer, reader.offset); + const member = new Hash160_1.Hash160(); + reader.offset = member.fromBuffer(reader.buffer, false, reader.offset); + this.data[item].push(member.hash); } } } @@ -308,31 +299,41 @@ class AttestationRequest extends __1.VDXFObject { toJson() { return { vdxfkey: this.vdxfkey, - acceptedattestors: this.acceptedattestors, - attestationkeys: this.attestationkeys, - attestorfilters: this.attestorfilters, + data: { + accepted_attestors: this.data.accepted_attestors ? this.data.accepted_attestors.map((x) => x.toAddress()) : [], + attestation_keys: this.data.attestation_keys ? this.data.attestation_keys.map((x) => x.toAddress()) : [], + attestor_filters: this.data.attestor_filters ? this.data.attestor_filters.map((x) => x.toAddress()) : [] + } }; } } exports.AttestationRequest = AttestationRequest; -class BasicPermission extends __1.Utf8DataVdxfObject { - constructor(data = "", vdxfkey = "") { - super(data, vdxfkey); - } -} -exports.BasicPermission = BasicPermission; class RequestedPermission extends __1.VDXFObject { - constructor(vdxfkey = "", data = "") { + constructor(data = {}, vdxfkey = "") { super(vdxfkey); - switch (vdxfkey) { + this.data = data; + this.addPrototypes(data); + } + addPrototypes(dataIn) { + const prototypes = ['dataByteLength', 'toDataBuffer', 'fromDataBuffer', 'toJson']; + switch (this.vdxfkey) { case __1.IDENTITY_DATA_REQUEST.vdxfid: - return new AttestationRequest(vdxfkey, data); + prototypes.forEach(name => { + Object.defineProperty(this, name, Object.getOwnPropertyDescriptor(AttestationRequest.prototype, name)); + }); + this.classMembers = ['accepted_attestors', 'attestation_keys', 'attestor_filters']; + for (let key of this.classMembers) { + this.data[key] = dataIn[key] + ? dataIn[key].map((x) => Hash160_1.Hash160.fromAddress(x)) + : []; + } + break; case __1.IDENTITY_VIEW.vdxfid: - return new BasicPermission(vdxfkey); + break; case __1.IDENTITY_AGREEMENT.vdxfid: - return new BasicPermission(vdxfkey); + break; default: - throw new Error(`Invalid type: ${vdxfkey}`); + break; } } } diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index 0df1511..63554ca 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -69,9 +69,9 @@ export class ProvisioningInfo extends Utf8OrBase58Object { } } -export class Audience extends Utf8DataVdxfObject {} +export class Audience extends Utf8DataVdxfObject { } -export class AltAuthFactor extends Utf8DataVdxfObject {} +export class AltAuthFactor extends Utf8DataVdxfObject { } export class Attestation extends Utf8DataVdxfObject { constructor(data: string = "", vdxfkey: string = "") { @@ -145,7 +145,7 @@ export class Challenge extends VDXFObject implements ChallengeInterface { super(vdxfkey); this.challenge_id = challenge.challenge_id; - this.requested_access = challenge.requested_access; + this.requested_access = challenge.requested_access ? challenge.requested_access.map((x) => new RequestedPermission(x.data, x.vdxfkey)) : challenge.requested_access; this.requested_access_audience = challenge.requested_access_audience; this.subject = challenge.subject ? challenge.subject.map((x) => new Subject(x.data, x.vdxfkey)) @@ -330,7 +330,11 @@ export class Challenge extends VDXFObject implements ChallengeInterface { const requestedAccessLength = reader.readVarInt(); for (let i = 0; i < requestedAccessLength; i++) { - const _perm = new RequestedPermission(); + + const _vdxfkey = toBase58Check(reader.buffer.slice(reader.offset, + reader.offset + HASH160_BYTE_LENGTH), + I_ADDR_VERSION); + const _perm = new RequestedPermission({}, _vdxfkey); reader.offset = _perm.fromBuffer(reader.buffer, reader.offset); this.requested_access.push(_perm); } @@ -420,34 +424,25 @@ export class Challenge extends VDXFObject implements ChallengeInterface { } export class AttestationRequest extends VDXFObject { - acceptedattestors?: Array; - attestationkeys?: Array; - attestorfilters?: Array; - - constructor( vdxfkey: string = "", data: any - ) { - super(vdxfkey); - for (let key in data) { - this[key] = data[key]; - } - + data: { + accepted_attestors?: Array, + attestation_keys?: Array, + attestor_filters?: Array } + private readonly classMembers: string[]; + dataByteLength(): number { let length = 0; - - for (const item of Object.getOwnPropertyNames(this)) { - if ((item !== "version") && (item !== "vdxfkey")) { - length += varuint.encodingLength(this[item].length); - if (this[item].length > 0) { - length += this[item].reduce( - (sum, current) => sum + fromBase58Check(current).hash.byteLength, - 0 - ); - } - } - + for (const item of this.classMembers) { + length += varuint.encodingLength(this.data[item].length); + if (this.data[item].length > 0) { + length += this.data[item].reduce( + (sum, current) => sum + current.byteLength(), + 0 + ); + } } return length; } @@ -455,10 +450,8 @@ export class AttestationRequest extends VDXFObject { toDataBuffer(): Buffer { const writer = new bufferutils.BufferWriter(Buffer.alloc(this.dataByteLength())) - for (const item of Object.getOwnPropertyNames(this)) { - if ((item !== "version") && (item !== "vdxfkey")) { - writer.writeArray(this[item].map((x) => fromBase58Check(x).hash)); - } + for (const item of this.classMembers) { + writer.writeArray(this.data[item].map((x) => x.toBuffer())); } return writer.buffer; } @@ -466,19 +459,17 @@ export class AttestationRequest extends VDXFObject { fromDataBuffer(buffer: Buffer, offset?: number): number { const reader = new bufferutils.BufferReader(buffer, offset); - - for (const item of Object.getOwnPropertyNames(this)) { - if ((item !== "version") && (item !== "vdxfkey")) { - const arrayLength = reader.readVarInt(); - for (let i = 0; i < arrayLength; i++) { - this[item].push(toBase58Check(reader.readSlice(HASH160_BYTE_LENGTH), I_ADDR_VERSION)) - } - - if (offset < buffer.length - 1) { - reader.offset = this.fromDataBuffer(reader.buffer, reader.offset) + const datalength = reader.readVarInt(); + if (datalength > 0) { + for (const item of this.classMembers) { + const arrayLength = reader.readVarInt(); + for (let i = 0; i < arrayLength; i++) { + const member = new Hash160(); + reader.offset = member.fromBuffer(reader.buffer, false, reader.offset) + this.data[item].push(member.hash); + } } } - } return reader.offset; } @@ -486,34 +477,56 @@ export class AttestationRequest extends VDXFObject { return { vdxfkey: this.vdxfkey, - acceptedattestors: this.acceptedattestors, - attestationkeys: this.attestationkeys, - attestorfilters: this.attestorfilters, - } + data: { + accepted_attestors: this.data.accepted_attestors ? this.data.accepted_attestors.map((x) => x.toAddress()) : [], + attestation_keys: this.data.attestation_keys ? this.data.attestation_keys.map((x) => x.toAddress()) : [], + attestor_filters: this.data.attestor_filters ? this.data.attestor_filters.map((x) => x.toAddress()) : [] + } + } } -} -export class BasicPermission extends Utf8DataVdxfObject { +} +export class RequestedPermission extends VDXFObject { + data: object; + private classMembers: string[]; - constructor(data: string = "", vdxfkey: string = "") { - super(data, vdxfkey); + constructor(data: object = {}, vdxfkey: string = "") { + super(vdxfkey); + this.data = data; + this.addPrototypes(data); } -} + private addPrototypes(dataIn: any): void { + const prototypes = ['dataByteLength', 'toDataBuffer', 'fromDataBuffer', 'toJson']; -export class RequestedPermission extends VDXFObject { - constructor(vdxfkey: string = "", data: any = "") { - super(vdxfkey); - switch (vdxfkey) { + switch (this.vdxfkey) { case IDENTITY_DATA_REQUEST.vdxfid: - return new AttestationRequest(vdxfkey, data); + prototypes.forEach(name => { + Object.defineProperty(this, name, Object.getOwnPropertyDescriptor(AttestationRequest.prototype, name)); + }); + this.classMembers = ['accepted_attestors', 'attestation_keys', 'attestor_filters']; + for (let key of this.classMembers) { + this.data[key] = dataIn[key] + ? dataIn[key].map((x) => Hash160.fromAddress(x)) + : []; + } + break; case IDENTITY_VIEW.vdxfid: - return new BasicPermission(vdxfkey); + break; case IDENTITY_AGREEMENT.vdxfid: - return new BasicPermission(vdxfkey); + prototypes.forEach(name => { + Object.defineProperty(this, name, Object.getOwnPropertyDescriptor(Utf8DataVdxfObject.prototype, name)); + }); + this.classMembers = ['title', 'description']; + for (let key of this.classMembers) { + this.data[key] = dataIn[key] + ? dataIn[key] + : ""; + } + break; default: - throw new Error(`Invalid type: ${vdxfkey}`); + break; } } } From 19d25e1e7b2887e9de92fb25e52d43b72850c1f1 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Mon, 17 Apr 2023 22:52:18 +0100 Subject: [PATCH 010/120] Challenge updated --- dist/vdxf/classes/Challenge.d.ts | 18 ++--- dist/vdxf/classes/Challenge.js | 82 +++++++++++++--------- dist/vdxf/index.js | 6 +- src/vdxf/classes/Challenge.ts | 114 +++++++++++++++++-------------- src/vdxf/index.ts | 8 +-- 5 files changed, 127 insertions(+), 101 deletions(-) diff --git a/dist/vdxf/classes/Challenge.d.ts b/dist/vdxf/classes/Challenge.d.ts index 6ba436a..ed6032e 100644 --- a/dist/vdxf/classes/Challenge.d.ts +++ b/dist/vdxf/classes/Challenge.d.ts @@ -79,13 +79,13 @@ export declare class Challenge extends VDXFObject implements ChallengeInterface skip: boolean; }; } +export interface AttestationRequestInterfaceDataInterface { + accepted_attestors: Array; + attestation_keys: Array; + attestor_filters: Array; +} export declare class AttestationRequest extends VDXFObject { - data: { - accepted_attestors?: Array; - attestation_keys?: Array; - attestor_filters?: Array; - }; - private readonly classMembers; + data: AttestationRequestInterfaceDataInterface; dataByteLength(): number; toDataBuffer(): Buffer; fromDataBuffer(buffer: Buffer, offset?: number): number; @@ -99,8 +99,8 @@ export declare class AttestationRequest extends VDXFObject { }; } export declare class RequestedPermission extends VDXFObject { - data: object; - private classMembers; - constructor(data?: object, vdxfkey?: string); + data: string | AttestationRequestInterfaceDataInterface; + encoding: BufferEncoding; + constructor(data: string | AttestationRequestInterfaceDataInterface, vdxfkey?: string); private addPrototypes; } diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index c971f24..0515c61 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -8,6 +8,7 @@ const Context_1 = require("./Context"); const Hash160_1 = require("./Hash160"); const address_1 = require("../../utils/address"); const vdxf_1 = require("../../constants/vdxf"); +const index_1 = require("../index"); class RedirectUri extends __1.VDXFObject { constructor(uri = "", vdxfkey = "") { super(vdxfkey); @@ -192,7 +193,7 @@ class Challenge extends __1.VDXFObject { const requestedAccessLength = reader.readVarInt(); for (let i = 0; i < requestedAccessLength; i++) { const _vdxfkey = (0, address_1.toBase58Check)(reader.buffer.slice(reader.offset, reader.offset + vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION); - const _perm = new RequestedPermission({}, _vdxfkey); + const _perm = new RequestedPermission("", _vdxfkey); reader.offset = _perm.fromBuffer(reader.buffer, reader.offset); this.requested_access.push(_perm); } @@ -265,72 +266,91 @@ class Challenge extends __1.VDXFObject { exports.Challenge = Challenge; class AttestationRequest extends __1.VDXFObject { dataByteLength() { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; let length = 0; - for (const item of this.classMembers) { - length += varuint_1.default.encodingLength(this.data[item].length); - if (this.data[item].length > 0) { - length += this.data[item].reduce((sum, current) => sum + current.byteLength(), 0); - } - } + length += varuint_1.default.encodingLength((_b = (_a = this.data.accepted_attestors) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0); + length += (_d = (_c = this.data.accepted_attestors) === null || _c === void 0 ? void 0 : _c.reduce((sum, current) => sum + current.byteLength(), 0)) !== null && _d !== void 0 ? _d : 0; + length += varuint_1.default.encodingLength((_f = (_e = this.data.attestation_keys) === null || _e === void 0 ? void 0 : _e.length) !== null && _f !== void 0 ? _f : 0); + length += (_h = (_g = this.data.attestation_keys) === null || _g === void 0 ? void 0 : _g.reduce((sum, current) => sum + current.byteLength(), 0)) !== null && _h !== void 0 ? _h : 0; + length += varuint_1.default.encodingLength((_k = (_j = this.data.attestor_filters) === null || _j === void 0 ? void 0 : _j.length) !== null && _k !== void 0 ? _k : 0); + length += (_m = (_l = this.data.attestor_filters) === null || _l === void 0 ? void 0 : _l.reduce((sum, current) => sum + current.byteLength(), 0)) !== null && _m !== void 0 ? _m : 0; return length; } toDataBuffer() { const writer = new bufferutils_1.default.BufferWriter(Buffer.alloc(this.dataByteLength())); - for (const item of this.classMembers) { - writer.writeArray(this.data[item].map((x) => x.toBuffer())); - } + writer.writeArray(this.data.accepted_attestors.map((x) => x.toBuffer())); + writer.writeArray(this.data.attestation_keys.map((x) => x.toBuffer())); + writer.writeArray(this.data.attestor_filters.map((x) => x.toBuffer())); return writer.buffer; } fromDataBuffer(buffer, offset) { const reader = new bufferutils_1.default.BufferReader(buffer, offset); - const datalength = reader.readVarInt(); - if (datalength > 0) { - for (const item of this.classMembers) { - const arrayLength = reader.readVarInt(); - for (let i = 0; i < arrayLength; i++) { - const member = new Hash160_1.Hash160(); - reader.offset = member.fromBuffer(reader.buffer, false, reader.offset); - this.data[item].push(member.hash); - } + reader.readVarInt(); //skip data length + function readHash160Array(arr) { + const length = reader.readVarInt(); + for (let i = 0; i < length; i++) { + const member = new Hash160_1.Hash160(); + reader.offset = member.fromBuffer(reader.buffer, false, reader.offset); + arr.push(member); } + if (length === 0) + arr.push(new Hash160_1.Hash160()); } + readHash160Array(this.data.accepted_attestors); + readHash160Array(this.data.attestation_keys); + readHash160Array(this.data.attestor_filters); return reader.offset; } toJson() { + const { accepted_attestors, attestation_keys, attestor_filters } = this.data; return { vdxfkey: this.vdxfkey, data: { - accepted_attestors: this.data.accepted_attestors ? this.data.accepted_attestors.map((x) => x.toAddress()) : [], - attestation_keys: this.data.attestation_keys ? this.data.attestation_keys.map((x) => x.toAddress()) : [], - attestor_filters: this.data.attestor_filters ? this.data.attestor_filters.map((x) => x.toAddress()) : [] + accepted_attestors: (accepted_attestors === null || accepted_attestors === void 0 ? void 0 : accepted_attestors.map(x => x.toAddress())) || [], + attestation_keys: (attestation_keys === null || attestation_keys === void 0 ? void 0 : attestation_keys.map(x => x.toAddress())) || [], + attestor_filters: (attestor_filters === null || attestor_filters === void 0 ? void 0 : attestor_filters.map(x => x.toAddress())) || [] } }; } } exports.AttestationRequest = AttestationRequest; class RequestedPermission extends __1.VDXFObject { - constructor(data = {}, vdxfkey = "") { + constructor(data, vdxfkey = "") { super(vdxfkey); - this.data = data; + this.encoding = "hex"; this.addPrototypes(data); } - addPrototypes(dataIn) { + addPrototypes(data) { const prototypes = ['dataByteLength', 'toDataBuffer', 'fromDataBuffer', 'toJson']; switch (this.vdxfkey) { case __1.IDENTITY_DATA_REQUEST.vdxfid: + var temp; + if (typeof data === 'object') { + this.data = { + accepted_attestors: (data.accepted_attestors || []).map((x) => typeof x === 'string' ? Hash160_1.Hash160.fromAddress(x) : x), + attestation_keys: (data.attestation_keys || []).map((x) => typeof x === 'string' ? Hash160_1.Hash160.fromAddress(x) : x), + attestor_filters: (data.attestor_filters || []).map((x) => typeof x === 'string' ? Hash160_1.Hash160.fromAddress(x) : x) + }; + } + else { + this.data = { + accepted_attestors: [], + attestation_keys: [], + attestor_filters: [] + }; + } prototypes.forEach(name => { Object.defineProperty(this, name, Object.getOwnPropertyDescriptor(AttestationRequest.prototype, name)); }); - this.classMembers = ['accepted_attestors', 'attestation_keys', 'attestor_filters']; - for (let key of this.classMembers) { - this.data[key] = dataIn[key] - ? dataIn[key].map((x) => Hash160_1.Hash160.fromAddress(x)) - : []; - } break; case __1.IDENTITY_VIEW.vdxfid: break; case __1.IDENTITY_AGREEMENT.vdxfid: + this.data = data; + this.encoding = "utf-8"; + prototypes.forEach(name => { + Object.defineProperty(this, name, Object.getOwnPropertyDescriptor(index_1.BufferDataVdxfObject.prototype, name)); + }); break; default: break; diff --git a/dist/vdxf/index.js b/dist/vdxf/index.js index 7b82c9b..856133a 100644 --- a/dist/vdxf/index.js +++ b/dist/vdxf/index.js @@ -43,7 +43,7 @@ class VDXFObject { return Buffer.alloc(0); } fromDataBuffer(buffer, offset = 0) { - return offset; + return offset + 1; } fromBuffer(buffer, offset = 0) { const reader = new bufferutils_1.default.BufferReader(buffer, offset); @@ -70,9 +70,7 @@ class VDXFObject { const writer = new bufferutils_1.default.BufferWriter(buffer); writer.writeSlice(key.hash); writer.writeVarInt(this.version); - if (dataLength) { - writer.writeVarSlice(this.toDataBuffer()); - } + writer.writeVarSlice(this.toDataBuffer()); return writer.buffer; } toSha256() { diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index 63554ca..ef922f4 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -16,6 +16,7 @@ import { Context } from "./Context"; import { Hash160 } from "./Hash160"; import { fromBase58Check, toBase58Check } from '../../utils/address'; import { DEFAULT_VERSION, HASH160_BYTE_LENGTH, I_ADDR_VERSION } from '../../constants/vdxf'; +import { BufferDataVdxfObject } from '../index' export class RedirectUri extends VDXFObject { uri: string; @@ -334,7 +335,7 @@ export class Challenge extends VDXFObject implements ChallengeInterface { const _vdxfkey = toBase58Check(reader.buffer.slice(reader.offset, reader.offset + HASH160_BYTE_LENGTH), I_ADDR_VERSION); - const _perm = new RequestedPermission({}, _vdxfkey); + const _perm = new RequestedPermission("", _vdxfkey); reader.offset = _perm.fromBuffer(reader.buffer, reader.offset); this.requested_access.push(_perm); } @@ -423,107 +424,114 @@ export class Challenge extends VDXFObject implements ChallengeInterface { } } +export interface AttestationRequestInterfaceDataInterface { + accepted_attestors: Array, + attestation_keys: Array, + attestor_filters: Array +} export class AttestationRequest extends VDXFObject { - data: { - accepted_attestors?: Array, - attestation_keys?: Array, - attestor_filters?: Array - } - - private readonly classMembers: string[]; + data: AttestationRequestInterfaceDataInterface; dataByteLength(): number { let length = 0; - for (const item of this.classMembers) { - length += varuint.encodingLength(this.data[item].length); - if (this.data[item].length > 0) { - length += this.data[item].reduce( - (sum, current) => sum + current.byteLength(), - 0 - ); - } - } + length += varuint.encodingLength(this.data.accepted_attestors?.length ?? 0); + length += this.data.accepted_attestors?.reduce((sum, current) => sum + current.byteLength(), 0) ?? 0; + length += varuint.encodingLength(this.data.attestation_keys?.length ?? 0); + length += this.data.attestation_keys?.reduce((sum, current) => sum + current.byteLength(), 0) ?? 0; + length += varuint.encodingLength(this.data.attestor_filters?.length ?? 0); + length += this.data.attestor_filters?.reduce((sum, current) => sum + current.byteLength(), 0) ?? 0; + return length; } toDataBuffer(): Buffer { const writer = new bufferutils.BufferWriter(Buffer.alloc(this.dataByteLength())) - for (const item of this.classMembers) { - writer.writeArray(this.data[item].map((x) => x.toBuffer())); - } + + writer.writeArray(this.data.accepted_attestors.map((x) => x.toBuffer())); + writer.writeArray(this.data.attestation_keys.map((x) => x.toBuffer())); + writer.writeArray(this.data.attestor_filters.map((x) => x.toBuffer())); + return writer.buffer; } fromDataBuffer(buffer: Buffer, offset?: number): number { const reader = new bufferutils.BufferReader(buffer, offset); - const datalength = reader.readVarInt(); - if (datalength > 0) { - for (const item of this.classMembers) { - const arrayLength = reader.readVarInt(); - for (let i = 0; i < arrayLength; i++) { - const member = new Hash160(); - reader.offset = member.fromBuffer(reader.buffer, false, reader.offset) - this.data[item].push(member.hash); - } + reader.readVarInt(); //skip data length + + function readHash160Array(arr: Hash160[]): void { + const length = reader.readVarInt(); + for (let i = 0; i < length; i++) { + const member = new Hash160(); + reader.offset = member.fromBuffer(reader.buffer, false, reader.offset); + arr.push(member); } + if (length === 0) arr.push(new Hash160()); } + + readHash160Array(this.data.accepted_attestors); + readHash160Array(this.data.attestation_keys); + readHash160Array(this.data.attestor_filters); return reader.offset; } toJson() { - + const { accepted_attestors, attestation_keys, attestor_filters } = this.data; return { vdxfkey: this.vdxfkey, data: { - accepted_attestors: this.data.accepted_attestors ? this.data.accepted_attestors.map((x) => x.toAddress()) : [], - attestation_keys: this.data.attestation_keys ? this.data.attestation_keys.map((x) => x.toAddress()) : [], - attestor_filters: this.data.attestor_filters ? this.data.attestor_filters.map((x) => x.toAddress()) : [] + accepted_attestors: accepted_attestors?.map(x => x.toAddress()) || [], + attestation_keys: attestation_keys?.map(x => x.toAddress()) || [], + attestor_filters: attestor_filters?.map(x => x.toAddress()) || [] } - } + }; } } export class RequestedPermission extends VDXFObject { - data: object; - private classMembers: string[]; - - constructor(data: object = {}, vdxfkey: string = "") { + data: string | AttestationRequestInterfaceDataInterface ; + encoding: BufferEncoding = "hex"; + constructor(data: string | AttestationRequestInterfaceDataInterface , vdxfkey: string = "") { super(vdxfkey); - this.data = data; this.addPrototypes(data); } - private addPrototypes(dataIn: any): void { + private addPrototypes(data: string | AttestationRequestInterfaceDataInterface ): void { const prototypes = ['dataByteLength', 'toDataBuffer', 'fromDataBuffer', 'toJson']; switch (this.vdxfkey) { case IDENTITY_DATA_REQUEST.vdxfid: + var temp: AttestationRequestInterfaceDataInterface; + + if (typeof data === 'object') { + this.data = { + accepted_attestors: (data.accepted_attestors || []).map((x) => typeof x === 'string' ? Hash160.fromAddress(x) : x), + attestation_keys: (data.attestation_keys || []).map((x) => typeof x === 'string' ? Hash160.fromAddress(x) : x), + attestor_filters: (data.attestor_filters || []).map((x) => typeof x === 'string' ? Hash160.fromAddress(x) : x) + } + } + else { + this.data = { + accepted_attestors: [], + attestation_keys: [], + attestor_filters: [] + } + } prototypes.forEach(name => { Object.defineProperty(this, name, Object.getOwnPropertyDescriptor(AttestationRequest.prototype, name)); }); - this.classMembers = ['accepted_attestors', 'attestation_keys', 'attestor_filters']; - for (let key of this.classMembers) { - this.data[key] = dataIn[key] - ? dataIn[key].map((x) => Hash160.fromAddress(x)) - : []; - } break; case IDENTITY_VIEW.vdxfid: break; case IDENTITY_AGREEMENT.vdxfid: + this.data = data; + this.encoding = "utf-8"; prototypes.forEach(name => { - Object.defineProperty(this, name, Object.getOwnPropertyDescriptor(Utf8DataVdxfObject.prototype, name)); + Object.defineProperty(this, name, Object.getOwnPropertyDescriptor(BufferDataVdxfObject.prototype, name)); }); - this.classMembers = ['title', 'description']; - for (let key of this.classMembers) { - this.data[key] = dataIn[key] - ? dataIn[key] - : ""; - } break; default: break; diff --git a/src/vdxf/index.ts b/src/vdxf/index.ts index ece2283..08f1af6 100644 --- a/src/vdxf/index.ts +++ b/src/vdxf/index.ts @@ -51,7 +51,7 @@ export class VDXFObject implements VDXFObjectInterface { } fromDataBuffer(buffer: Buffer, offset: number = 0) { - return offset + return offset + 1 } fromBuffer(buffer: Buffer, offset: number = 0) { @@ -88,9 +88,9 @@ export class VDXFObject implements VDXFObjectInterface { writer.writeSlice(key.hash); writer.writeVarInt(this.version); - if (dataLength) { - writer.writeVarSlice(this.toDataBuffer()); - } + + writer.writeVarSlice(this.toDataBuffer()); + return writer.buffer; } From 9f5627e055e29e329667bc97c81c086d43275477 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Tue, 18 Apr 2023 10:34:38 +0100 Subject: [PATCH 011/120] Fix for blank array --- dist/vdxf/classes/Challenge.js | 2 +- src/vdxf/classes/Challenge.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index 0515c61..0a9b9d7 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -294,7 +294,7 @@ class AttestationRequest extends __1.VDXFObject { arr.push(member); } if (length === 0) - arr.push(new Hash160_1.Hash160()); + arr = []; } readHash160Array(this.data.accepted_attestors); readHash160Array(this.data.attestation_keys); diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index ef922f4..7f11c78 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -468,7 +468,7 @@ export class AttestationRequest extends VDXFObject { reader.offset = member.fromBuffer(reader.buffer, false, reader.offset); arr.push(member); } - if (length === 0) arr.push(new Hash160()); + if (length === 0) arr = []; } readHash160Array(this.data.accepted_attestors); From eef87704fd45d08e7a24004e7c54a11aebb6a013 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Tue, 18 Apr 2023 11:30:11 +0100 Subject: [PATCH 012/120] Allow empty permission() --- dist/vdxf/classes/Challenge.d.ts | 1 + dist/vdxf/classes/Challenge.js | 10 +++++++++- src/__tests__/vdxf/loginconsent.test.ts | 2 +- src/vdxf/classes/Challenge.ts | 12 +++++++++++- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/dist/vdxf/classes/Challenge.d.ts b/dist/vdxf/classes/Challenge.d.ts index ed6032e..ccaa083 100644 --- a/dist/vdxf/classes/Challenge.d.ts +++ b/dist/vdxf/classes/Challenge.d.ts @@ -103,4 +103,5 @@ export declare class RequestedPermission extends VDXFObject { encoding: BufferEncoding; constructor(data: string | AttestationRequestInterfaceDataInterface, vdxfkey?: string); private addPrototypes; + fromDataBuffer(buffer: Buffer, offset?: number): number; } diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index 0a9b9d7..3a5d346 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -318,7 +318,8 @@ class RequestedPermission extends __1.VDXFObject { constructor(data, vdxfkey = "") { super(vdxfkey); this.encoding = "hex"; - this.addPrototypes(data); + if (vdxfkey) + this.addPrototypes(data); } addPrototypes(data) { const prototypes = ['dataByteLength', 'toDataBuffer', 'fromDataBuffer', 'toJson']; @@ -344,6 +345,9 @@ class RequestedPermission extends __1.VDXFObject { }); break; case __1.IDENTITY_VIEW.vdxfid: + prototypes.forEach(name => { + Object.defineProperty(this, name, Object.getOwnPropertyDescriptor(__1.VDXFObject.prototype, name)); + }); break; case __1.IDENTITY_AGREEMENT.vdxfid: this.data = data; @@ -356,5 +360,9 @@ class RequestedPermission extends __1.VDXFObject { break; } } + fromDataBuffer(buffer, offset) { + this.addPrototypes(""); + return this.fromDataBuffer(buffer, offset); + } } exports.RequestedPermission = RequestedPermission; diff --git a/src/__tests__/vdxf/loginconsent.test.ts b/src/__tests__/vdxf/loginconsent.test.ts index e714900..8542c8e 100644 --- a/src/__tests__/vdxf/loginconsent.test.ts +++ b/src/__tests__/vdxf/loginconsent.test.ts @@ -18,7 +18,7 @@ describe('Serializes and deserializes signature objects properly', () => { }, challenge: { challenge_id: "iKNufKJdLX3Xg8qFru9AuLBvivAEJ88PW4", - requested_access: [new RequestedPermission(IDENTITY_VIEW.vdxfid)], + requested_access: [new RequestedPermission("",IDENTITY_VIEW.vdxfid)], subject: [ new Subject( "fully.qualified.name", diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index 7f11c78..5603eea 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -496,7 +496,7 @@ export class RequestedPermission extends VDXFObject { encoding: BufferEncoding = "hex"; constructor(data: string | AttestationRequestInterfaceDataInterface , vdxfkey: string = "") { super(vdxfkey); - this.addPrototypes(data); + if (vdxfkey) this.addPrototypes(data); } private addPrototypes(data: string | AttestationRequestInterfaceDataInterface ): void { @@ -525,6 +525,9 @@ export class RequestedPermission extends VDXFObject { }); break; case IDENTITY_VIEW.vdxfid: + prototypes.forEach(name => { + Object.defineProperty(this, name, Object.getOwnPropertyDescriptor(VDXFObject.prototype, name)); + }); break; case IDENTITY_AGREEMENT.vdxfid: this.data = data; @@ -537,4 +540,11 @@ export class RequestedPermission extends VDXFObject { break; } } + + fromDataBuffer(buffer: Buffer, offset?: number): number { + this.addPrototypes(""); + return this.fromDataBuffer(buffer, offset) + + } + } From 1fd85f0f0c6ebef0c050f1a90f04d4dab65f24b8 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Tue, 18 Apr 2023 11:54:53 +0100 Subject: [PATCH 013/120] Refactor RequestedPermission --- dist/vdxf/classes/Challenge.d.ts | 1 + dist/vdxf/classes/Challenge.js | 56 ++++++++++++----------- src/vdxf/classes/Challenge.ts | 77 ++++++++++++++++---------------- 3 files changed, 68 insertions(+), 66 deletions(-) diff --git a/dist/vdxf/classes/Challenge.d.ts b/dist/vdxf/classes/Challenge.d.ts index ccaa083..7ce70a5 100644 --- a/dist/vdxf/classes/Challenge.d.ts +++ b/dist/vdxf/classes/Challenge.d.ts @@ -89,6 +89,7 @@ export declare class AttestationRequest extends VDXFObject { dataByteLength(): number; toDataBuffer(): Buffer; fromDataBuffer(buffer: Buffer, offset?: number): number; + static initializeData(data: string | AttestationRequestInterfaceDataInterface): any; toJson(): { vdxfkey: string; data: { diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index 3a5d346..4062b69 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -301,6 +301,24 @@ class AttestationRequest extends __1.VDXFObject { readHash160Array(this.data.attestor_filters); return reader.offset; } + static initializeData(data) { + var retData; + if (typeof data === 'object') { + retData = { + accepted_attestors: (data.accepted_attestors || []).map((x) => typeof x === 'string' ? Hash160_1.Hash160.fromAddress(x) : x), + attestation_keys: (data.attestation_keys || []).map((x) => typeof x === 'string' ? Hash160_1.Hash160.fromAddress(x) : x), + attestor_filters: (data.attestor_filters || []).map((x) => typeof x === 'string' ? Hash160_1.Hash160.fromAddress(x) : x) + }; + } + else { + retData = { + accepted_attestors: [], + attestation_keys: [], + attestor_filters: [] + }; + } + return retData; + } toJson() { const { accepted_attestors, attestation_keys, attestor_filters } = this.data; return { @@ -322,43 +340,27 @@ class RequestedPermission extends __1.VDXFObject { this.addPrototypes(data); } addPrototypes(data) { - const prototypes = ['dataByteLength', 'toDataBuffer', 'fromDataBuffer', 'toJson']; + var classType; switch (this.vdxfkey) { case __1.IDENTITY_DATA_REQUEST.vdxfid: - var temp; - if (typeof data === 'object') { - this.data = { - accepted_attestors: (data.accepted_attestors || []).map((x) => typeof x === 'string' ? Hash160_1.Hash160.fromAddress(x) : x), - attestation_keys: (data.attestation_keys || []).map((x) => typeof x === 'string' ? Hash160_1.Hash160.fromAddress(x) : x), - attestor_filters: (data.attestor_filters || []).map((x) => typeof x === 'string' ? Hash160_1.Hash160.fromAddress(x) : x) - }; - } - else { - this.data = { - accepted_attestors: [], - attestation_keys: [], - attestor_filters: [] - }; - } - prototypes.forEach(name => { - Object.defineProperty(this, name, Object.getOwnPropertyDescriptor(AttestationRequest.prototype, name)); - }); - break; - case __1.IDENTITY_VIEW.vdxfid: - prototypes.forEach(name => { - Object.defineProperty(this, name, Object.getOwnPropertyDescriptor(__1.VDXFObject.prototype, name)); - }); + classType = AttestationRequest; + this.data = AttestationRequest.initializeData(data); break; case __1.IDENTITY_AGREEMENT.vdxfid: + classType = index_1.BufferDataVdxfObject; this.data = data; this.encoding = "utf-8"; - prototypes.forEach(name => { - Object.defineProperty(this, name, Object.getOwnPropertyDescriptor(index_1.BufferDataVdxfObject.prototype, name)); - }); + break; + case __1.IDENTITY_VIEW.vdxfid: + classType = __1.VDXFObject; break; default: break; } + const prototypes = ['dataByteLength', 'toDataBuffer', 'fromDataBuffer', 'toJson']; + prototypes.forEach(name => { + Object.defineProperty(this, name, Object.getOwnPropertyDescriptor(classType.prototype, name)); + }); } fromDataBuffer(buffer, offset) { this.addPrototypes(""); diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index 5603eea..67422fe 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -332,9 +332,9 @@ export class Challenge extends VDXFObject implements ChallengeInterface { for (let i = 0; i < requestedAccessLength; i++) { - const _vdxfkey = toBase58Check(reader.buffer.slice(reader.offset, - reader.offset + HASH160_BYTE_LENGTH), - I_ADDR_VERSION); + const _vdxfkey = toBase58Check(reader.buffer.slice(reader.offset, + reader.offset + HASH160_BYTE_LENGTH), + I_ADDR_VERSION); const _perm = new RequestedPermission("", _vdxfkey); reader.offset = _perm.fromBuffer(reader.buffer, reader.offset); this.requested_access.push(_perm); @@ -441,7 +441,7 @@ export class AttestationRequest extends VDXFObject { length += this.data.attestation_keys?.reduce((sum, current) => sum + current.byteLength(), 0) ?? 0; length += varuint.encodingLength(this.data.attestor_filters?.length ?? 0); length += this.data.attestor_filters?.reduce((sum, current) => sum + current.byteLength(), 0) ?? 0; - + return length; } @@ -477,6 +477,25 @@ export class AttestationRequest extends VDXFObject { return reader.offset; } + static initializeData(data: string | AttestationRequestInterfaceDataInterface) { + var retData; + if (typeof data === 'object') { + retData = { + accepted_attestors: (data.accepted_attestors || []).map((x) => typeof x === 'string' ? Hash160.fromAddress(x) : x), + attestation_keys: (data.attestation_keys || []).map((x) => typeof x === 'string' ? Hash160.fromAddress(x) : x), + attestor_filters: (data.attestor_filters || []).map((x) => typeof x === 'string' ? Hash160.fromAddress(x) : x) + } + } + else { + retData = { + accepted_attestors: [], + attestation_keys: [], + attestor_filters: [] + } + } + return retData; + } + toJson() { const { accepted_attestors, attestation_keys, attestor_filters } = this.data; return { @@ -492,59 +511,39 @@ export class AttestationRequest extends VDXFObject { } export class RequestedPermission extends VDXFObject { - data: string | AttestationRequestInterfaceDataInterface ; + data: string | AttestationRequestInterfaceDataInterface; encoding: BufferEncoding = "hex"; - constructor(data: string | AttestationRequestInterfaceDataInterface , vdxfkey: string = "") { + constructor(data: string | AttestationRequestInterfaceDataInterface, vdxfkey: string = "") { super(vdxfkey); if (vdxfkey) this.addPrototypes(data); } - private addPrototypes(data: string | AttestationRequestInterfaceDataInterface ): void { - const prototypes = ['dataByteLength', 'toDataBuffer', 'fromDataBuffer', 'toJson']; - + addPrototypes(data: string | AttestationRequestInterfaceDataInterface): void { + var classType; switch (this.vdxfkey) { case IDENTITY_DATA_REQUEST.vdxfid: - var temp: AttestationRequestInterfaceDataInterface; - - if (typeof data === 'object') { - this.data = { - accepted_attestors: (data.accepted_attestors || []).map((x) => typeof x === 'string' ? Hash160.fromAddress(x) : x), - attestation_keys: (data.attestation_keys || []).map((x) => typeof x === 'string' ? Hash160.fromAddress(x) : x), - attestor_filters: (data.attestor_filters || []).map((x) => typeof x === 'string' ? Hash160.fromAddress(x) : x) - } - } - else { - this.data = { - accepted_attestors: [], - attestation_keys: [], - attestor_filters: [] - } - } - prototypes.forEach(name => { - Object.defineProperty(this, name, Object.getOwnPropertyDescriptor(AttestationRequest.prototype, name)); - }); - break; - case IDENTITY_VIEW.vdxfid: - prototypes.forEach(name => { - Object.defineProperty(this, name, Object.getOwnPropertyDescriptor(VDXFObject.prototype, name)); - }); + classType = AttestationRequest; + this.data = AttestationRequest.initializeData(data) break; case IDENTITY_AGREEMENT.vdxfid: + classType = BufferDataVdxfObject; this.data = data; this.encoding = "utf-8"; - prototypes.forEach(name => { - Object.defineProperty(this, name, Object.getOwnPropertyDescriptor(BufferDataVdxfObject.prototype, name)); - }); + break; + case IDENTITY_VIEW.vdxfid: + classType = VDXFObject; break; default: break; } + const prototypes = ['dataByteLength', 'toDataBuffer', 'fromDataBuffer', 'toJson']; + prototypes.forEach(name => { + Object.defineProperty(this, name, Object.getOwnPropertyDescriptor(classType.prototype, name)); + }); } fromDataBuffer(buffer: Buffer, offset?: number): number { this.addPrototypes(""); return this.fromDataBuffer(buffer, offset) - } - -} +} \ No newline at end of file From ec0ea105759eb5eaee2e5c5183cac337de370ca4 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Tue, 18 Apr 2023 14:20:26 +0100 Subject: [PATCH 014/120] vdxfkey update --- dist/vdxf/classes/Challenge.d.ts | 4 ++-- dist/vdxf/classes/Challenge.js | 9 +++++---- dist/vdxf/scopes.d.ts | 2 +- dist/vdxf/scopes.js | 6 +++--- src/vdxf/classes/Challenge.ts | 12 +++++++----- src/vdxf/scopes.ts | 4 ++-- 6 files changed, 20 insertions(+), 17 deletions(-) diff --git a/dist/vdxf/classes/Challenge.d.ts b/dist/vdxf/classes/Challenge.d.ts index 7ce70a5..ad94a45 100644 --- a/dist/vdxf/classes/Challenge.d.ts +++ b/dist/vdxf/classes/Challenge.d.ts @@ -101,8 +101,8 @@ export declare class AttestationRequest extends VDXFObject { } export declare class RequestedPermission extends VDXFObject { data: string | AttestationRequestInterfaceDataInterface; - encoding: BufferEncoding; + encoding?: BufferEncoding; constructor(data: string | AttestationRequestInterfaceDataInterface, vdxfkey?: string); - private addPrototypes; + addPrototypes(data: string | AttestationRequestInterfaceDataInterface): void; fromDataBuffer(buffer: Buffer, offset?: number): number; } diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index 4062b69..eb1b277 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -335,14 +335,13 @@ exports.AttestationRequest = AttestationRequest; class RequestedPermission extends __1.VDXFObject { constructor(data, vdxfkey = "") { super(vdxfkey); - this.encoding = "hex"; if (vdxfkey) this.addPrototypes(data); } addPrototypes(data) { var classType; switch (this.vdxfkey) { - case __1.IDENTITY_DATA_REQUEST.vdxfid: + case __1.ATTESTATION_READ_REQUEST.vdxfid: classType = AttestationRequest; this.data = AttestationRequest.initializeData(data); break; @@ -352,10 +351,12 @@ class RequestedPermission extends __1.VDXFObject { this.encoding = "utf-8"; break; case __1.IDENTITY_VIEW.vdxfid: - classType = __1.VDXFObject; + classType = index_1.BufferDataVdxfObject; + this.data = data; + this.encoding = "utf-8"; break; default: - break; + throw new Error("Invalid vdxfkey"); } const prototypes = ['dataByteLength', 'toDataBuffer', 'fromDataBuffer', 'toJson']; prototypes.forEach(name => { diff --git a/dist/vdxf/scopes.d.ts b/dist/vdxf/scopes.d.ts index 3cd6b30..a10d006 100644 --- a/dist/vdxf/scopes.d.ts +++ b/dist/vdxf/scopes.d.ts @@ -1,4 +1,4 @@ import { VDXFKeyInterface } from "./keys"; export declare const IDENTITY_VIEW: VDXFKeyInterface; export declare const IDENTITY_AGREEMENT: VDXFKeyInterface; -export declare const IDENTITY_DATA_REQUEST: VDXFKeyInterface; +export declare const ATTESTATION_READ_REQUEST: VDXFKeyInterface; diff --git a/dist/vdxf/scopes.js b/dist/vdxf/scopes.js index 837287c..55db654 100644 --- a/dist/vdxf/scopes.js +++ b/dist/vdxf/scopes.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.IDENTITY_DATA_REQUEST = exports.IDENTITY_AGREEMENT = exports.IDENTITY_VIEW = void 0; +exports.ATTESTATION_READ_REQUEST = exports.IDENTITY_AGREEMENT = exports.IDENTITY_VIEW = void 0; exports.IDENTITY_VIEW = { vdxfid: "iLUrA89mDKnwxZcMiPadfNB9TLp58A2TKU", hash160result: "aeab47faa1b2bde2633a63b8284770a8e5c489ba", @@ -17,11 +17,11 @@ exports.IDENTITY_AGREEMENT = { name: "vrsc::identity.authentication.permission.agree" } }; -exports.IDENTITY_DATA_REQUEST = { +exports.ATTESTATION_READ_REQUEST = { vdxfid: "iNqLaiDJjcADGCvXcQZnPqwTqMXzQbDCFu", hash160result: "fbd8fe825062b19a9bd26dc51b6f768828115ad4", qualifiedname: { namespace: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - name: "vrsc::identitydata.request" + name: "vrsc::identity.attestation.read" } }; diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index 67422fe..66f9cc4 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -6,7 +6,7 @@ import { Utf8DataVdxfObject, VDXFObject, Utf8OrBase58Object, - IDENTITY_DATA_REQUEST, + ATTESTATION_READ_REQUEST, IDENTITY_VIEW, IDENTITY_AGREEMENT, } from "../"; @@ -512,7 +512,7 @@ export class AttestationRequest extends VDXFObject { export class RequestedPermission extends VDXFObject { data: string | AttestationRequestInterfaceDataInterface; - encoding: BufferEncoding = "hex"; + encoding?: BufferEncoding; constructor(data: string | AttestationRequestInterfaceDataInterface, vdxfkey: string = "") { super(vdxfkey); if (vdxfkey) this.addPrototypes(data); @@ -521,7 +521,7 @@ export class RequestedPermission extends VDXFObject { addPrototypes(data: string | AttestationRequestInterfaceDataInterface): void { var classType; switch (this.vdxfkey) { - case IDENTITY_DATA_REQUEST.vdxfid: + case ATTESTATION_READ_REQUEST.vdxfid: classType = AttestationRequest; this.data = AttestationRequest.initializeData(data) break; @@ -531,10 +531,12 @@ export class RequestedPermission extends VDXFObject { this.encoding = "utf-8"; break; case IDENTITY_VIEW.vdxfid: - classType = VDXFObject; + classType = BufferDataVdxfObject; + this.data = data; + this.encoding = "utf-8"; break; default: - break; + throw new Error("Invalid vdxfkey") } const prototypes = ['dataByteLength', 'toDataBuffer', 'fromDataBuffer', 'toJson']; prototypes.forEach(name => { diff --git a/src/vdxf/scopes.ts b/src/vdxf/scopes.ts index e820e34..cb6753f 100644 --- a/src/vdxf/scopes.ts +++ b/src/vdxf/scopes.ts @@ -18,11 +18,11 @@ export const IDENTITY_AGREEMENT: VDXFKeyInterface = { } }; -export const IDENTITY_DATA_REQUEST: VDXFKeyInterface = { +export const ATTESTATION_READ_REQUEST: VDXFKeyInterface = { vdxfid: "iNqLaiDJjcADGCvXcQZnPqwTqMXzQbDCFu", hash160result: "fbd8fe825062b19a9bd26dc51b6f768828115ad4", qualifiedname: { namespace: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - name: "vrsc::identitydata.request" + name: "vrsc::identity.attestation.read" } }; \ No newline at end of file From 4f22a13787f49971234644b48ce2facceeba6c58 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Fri, 16 Jun 2023 11:15:08 +0100 Subject: [PATCH 015/120] update --- dist/vdxf/classes/Challenge.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index c7d35af..9fb7a7d 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -223,9 +223,6 @@ class Challenge extends __1.VDXFObject { } this.attestations = []; const attestationsLength = reader.readCompactSize(); - if (attestationsLength > 0) { - throw new Error("Attestations currently unsupported"); - const attestationsLength = reader.readVarInt(); for (let i = 0; i < attestationsLength; i++) { const _att = new Attestation(); reader.offset = _att.fromBuffer(reader.buffer, reader.offset); From 4b4c6af17658ba04740d35c5b2283d523ef92a16 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Fri, 16 Jun 2023 15:40:41 +0100 Subject: [PATCH 016/120] Add Principals and TxDestination --- package-lock.json | 8331 ++++++++++++++++++++++++++++++++++++ package.json | 2 +- src/pbaas/Principal.ts | 74 + src/pbaas/TxDestination.ts | 85 + yarn.lock | 4597 ++++++++++---------- 5 files changed, 10768 insertions(+), 2321 deletions(-) create mode 100644 package-lock.json create mode 100644 src/pbaas/Principal.ts create mode 100644 src/pbaas/TxDestination.ts diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..49bdd32 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,8331 @@ +{ + "name": "verus-typescript-primitives", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "verus-typescript-primitives", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "base64url": "3.0.1", + "bn.js": "5.2.1", + "bs58check": "https://github.com/bitcoinjs/bs58check", + "create-hash": "1.2.0" + }, + "devDependencies": { + "@types/bn.js": "5.1.1", + "@types/bs58check": "2.1.0", + "@types/create-hash": "1.2.2", + "@types/jest": "28.1.6", + "@types/node": "^18.7.22", + "@typescript-eslint/eslint-plugin": "5.30.7", + "@typescript-eslint/parser": "5.30.7", + "eslint": "8.20.0", + "eslint-plugin-jest": "26.6.0", + "jest": "28.1.3", + "prettier": "2.7.1", + "ts-jest": "28.0.7", + "typescript": "4.7.4" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", + "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.3.tgz", + "integrity": "sha512-prBHMK4JYYK+wDjJF1q99KK4JLL+egWS4nmNqdlMUgCExMZ+iZW0hGhyC3VEbsPjvaN0TBhW//VIFwBrk8sEiw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.3.tgz", + "integrity": "sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.1.0", + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.19.3", + "@babel/helper-compilation-targets": "^7.19.3", + "@babel/helper-module-transforms": "^7.19.0", + "@babel/helpers": "^7.19.0", + "@babel/parser": "^7.19.3", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.3", + "@babel/types": "^7.19.3", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.1", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.3.tgz", + "integrity": "sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==", + "dev": true, + "dependencies": { + "@babel/types": "^7.19.3", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz", + "integrity": "sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.19.3", + "@babel/helper-validator-option": "^7.18.6", + "browserslist": "^4.21.3", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", + "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", + "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "dev": true, + "dependencies": { + "@babel/template": "^7.18.10", + "@babel/types": "^7.19.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", + "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", + "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", + "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-simple-access": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/helper-validator-identifier": "^7.18.6", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", + "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", + "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", + "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz", + "integrity": "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", + "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.0.tgz", + "integrity": "sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==", + "dev": true, + "dependencies": { + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.18.6", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/parser": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.3.tgz", + "integrity": "sha512-pJ9xOlNWHiy9+FuFP09DEAFbAn4JskgRsVcc169w2xRBC3FRGuQEwjeIMMND9L2zc0iEhO/tGv4Zq+km+hxNpQ==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", + "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", + "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.18.10", + "@babel/types": "^7.18.10" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.3.tgz", + "integrity": "sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.19.3", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.19.3", + "@babel/types": "^7.19.3", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/types": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz", + "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.18.10", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "node_modules/@eslint/eslintrc": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.2.tgz", + "integrity": "sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.4.0", + "globals": "^13.15.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", + "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/console": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-28.1.3.tgz", + "integrity": "sha512-QPAkP5EwKdK/bxIr6C1I4Vs0rm2nHiANzj/Z5X2JQkrZo6IqvC4ldZ9K95tF0HdidhA8Bo6egxSzUFPYKcEXLw==", + "dev": true, + "dependencies": { + "@jest/types": "^28.1.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^28.1.3", + "jest-util": "^28.1.3", + "slash": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/core": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-28.1.3.tgz", + "integrity": "sha512-CIKBrlaKOzA7YG19BEqCw3SLIsEwjZkeJzf5bdooVnW4bH5cktqe3JX+G2YV1aK5vP8N9na1IGWFzYaTp6k6NA==", + "dev": true, + "dependencies": { + "@jest/console": "^28.1.3", + "@jest/reporters": "^28.1.3", + "@jest/test-result": "^28.1.3", + "@jest/transform": "^28.1.3", + "@jest/types": "^28.1.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^28.1.3", + "jest-config": "^28.1.3", + "jest-haste-map": "^28.1.3", + "jest-message-util": "^28.1.3", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.3", + "jest-resolve-dependencies": "^28.1.3", + "jest-runner": "^28.1.3", + "jest-runtime": "^28.1.3", + "jest-snapshot": "^28.1.3", + "jest-util": "^28.1.3", + "jest-validate": "^28.1.3", + "jest-watcher": "^28.1.3", + "micromatch": "^4.0.4", + "pretty-format": "^28.1.3", + "rimraf": "^3.0.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/environment": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.1.3.tgz", + "integrity": "sha512-1bf40cMFTEkKyEf585R9Iz1WayDjHoHqvts0XFYEqyKM3cFWDpeMoqKKTAF9LSYQModPUlh8FKptoM2YcMWAXA==", + "dev": true, + "dependencies": { + "@jest/fake-timers": "^28.1.3", + "@jest/types": "^28.1.3", + "@types/node": "*", + "jest-mock": "^28.1.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-28.1.3.tgz", + "integrity": "sha512-lzc8CpUbSoE4dqT0U+g1qODQjBRHPpCPXissXD4mS9+sWQdmmpeJ9zSH1rS1HEkrsMN0fb7nKrJ9giAR1d3wBw==", + "dev": true, + "dependencies": { + "expect": "^28.1.3", + "jest-snapshot": "^28.1.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.1.3.tgz", + "integrity": "sha512-wvbi9LUrHJLn3NlDW6wF2hvIMtd4JUl2QNVrjq+IBSHirgfrR3o9RnVtxzdEGO2n9JyIWwHnLfby5KzqBGg2YA==", + "dev": true, + "dependencies": { + "jest-get-type": "^28.0.2" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/fake-timers": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.1.3.tgz", + "integrity": "sha512-D/wOkL2POHv52h+ok5Oj/1gOG9HSywdoPtFsRCUmlCILXNn5eIWmcnd3DIiWlJnpGvQtmajqBP95Ei0EimxfLw==", + "dev": true, + "dependencies": { + "@jest/types": "^28.1.3", + "@sinonjs/fake-timers": "^9.1.2", + "@types/node": "*", + "jest-message-util": "^28.1.3", + "jest-mock": "^28.1.3", + "jest-util": "^28.1.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/globals": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-28.1.3.tgz", + "integrity": "sha512-XFU4P4phyryCXu1pbcqMO0GSQcYe1IsalYCDzRNyhetyeyxMcIxa11qPNDpVNLeretItNqEmYYQn1UYz/5x1NA==", + "dev": true, + "dependencies": { + "@jest/environment": "^28.1.3", + "@jest/expect": "^28.1.3", + "@jest/types": "^28.1.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/reporters": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-28.1.3.tgz", + "integrity": "sha512-JuAy7wkxQZVNU/V6g9xKzCGC5LVXx9FDcABKsSXp5MiKPEE2144a/vXTEDoyzjUpZKfVwp08Wqg5A4WfTMAzjg==", + "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^28.1.3", + "@jest/test-result": "^28.1.3", + "@jest/transform": "^28.1.3", + "@jest/types": "^28.1.3", + "@jridgewell/trace-mapping": "^0.3.13", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^28.1.3", + "jest-util": "^28.1.3", + "jest-worker": "^28.1.3", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "terminal-link": "^2.0.0", + "v8-to-istanbul": "^9.0.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/schemas": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-28.1.3.tgz", + "integrity": "sha512-/l/VWsdt/aBXgjshLWOFyFt3IVdYypu5y2Wn2rOO1un6nkqIn8SLXzgIMYXFyYsRWDyF5EthmKJMIdJvk08grg==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.24.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/source-map": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-28.1.2.tgz", + "integrity": "sha512-cV8Lx3BeStJb8ipPHnqVw/IM2VCMWO3crWZzYodSIkxXnRcXJipCdx1JCK0K5MsJJouZQTH73mzf4vgxRaH9ww==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.13", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/test-result": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-28.1.3.tgz", + "integrity": "sha512-kZAkxnSE+FqE8YjW8gNuoVkkC9I7S1qmenl8sGcDOLropASP+BkcGKwhXoyqQuGOGeYY0y/ixjrd/iERpEXHNg==", + "dev": true, + "dependencies": { + "@jest/console": "^28.1.3", + "@jest/types": "^28.1.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.1.3.tgz", + "integrity": "sha512-NIMPEqqa59MWnDi1kvXXpYbqsfQmSJsIbnd85mdVGkiDfQ9WQQTXOLsvISUfonmnBT+w85WEgneCigEEdHDFxw==", + "dev": true, + "dependencies": { + "@jest/test-result": "^28.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.3", + "slash": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.3.tgz", + "integrity": "sha512-u5dT5di+oFI6hfcLOHGTAfmUxFRrjK+vnaP0kkVow9Md/M7V/MxqQMOz/VV25UZO8pzeA9PjfTpOu6BDuwSPQA==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^28.1.3", + "@jridgewell/trace-mapping": "^0.3.13", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.3", + "jest-regex-util": "^28.0.2", + "jest-util": "^28.1.3", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/types": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", + "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^28.1.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", + "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.15", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", + "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@noble/hashes": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", + "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@sinclair/typebox": { + "version": "0.24.43", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.43.tgz", + "integrity": "sha512-1orQTvtazZmsPeBroJjysvsOQCYV2yjWlebkSY38pl5vr2tdLjEJ+LoxITlGNZaH2RE19WlAwQMkH/7C14wLfw==", + "dev": true + }, + "node_modules/@sinonjs/commons": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", + "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", + "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.7.0" + } + }, + "node_modules/@types/babel__core": { + "version": "7.1.19", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", + "integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.6.4", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", + "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", + "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.2.tgz", + "integrity": "sha512-FcFaxOr2V5KZCviw1TnutEMVUVsGt4D2hP1TAfXZAMKuHYW3xQhe3jTxNPWutgCJ3/X1c5yX8ZoGVEItxKbwBg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.3.0" + } + }, + "node_modules/@types/bn.js": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.1.tgz", + "integrity": "sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/bs58check": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@types/bs58check/-/bs58check-2.1.0.tgz", + "integrity": "sha512-OxsysnJQh82vy9DRbOcw9m2j/WiyqZLn0YBhKxdQ+aCwoHj+tWzyCgpwAkr79IfDXZKxc6h7k89T9pwS78CqTQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/create-hash": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@types/create-hash/-/create-hash-1.2.2.tgz", + "integrity": "sha512-Fg8/kfMJObbETFU/Tn+Y0jieYewryLrbKwLCEIwPyklZZVY2qB+64KFjhplGSw+cseZosfFXctXO+PyIYD8iZQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/graceful-fs": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", + "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", + "dev": true + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", + "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/jest": { + "version": "28.1.6", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-28.1.6.tgz", + "integrity": "sha512-0RbGAFMfcBJKOmqRazM8L98uokwuwD5F8rHrv/ZMbrZBwVOWZUyPG6VFNscjYr/vjM3Vu4fRrCPbOs42AfemaQ==", + "dev": true, + "dependencies": { + "jest-matcher-utils": "^28.0.0", + "pretty-format": "^28.0.0" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true + }, + "node_modules/@types/node": { + "version": "18.7.22", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.22.tgz", + "integrity": "sha512-TsmoXYd4zrkkKjJB0URF/mTIKPl+kVcbqClB2F/ykU7vil1BfWZVndOnpEIozPv4fURD28gyPFeIkW2G+KXOvw==", + "dev": true + }, + "node_modules/@types/prettier": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow==", + "dev": true + }, + "node_modules/@types/stack-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", + "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", + "dev": true + }, + "node_modules/@types/yargs": { + "version": "17.0.13", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz", + "integrity": "sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", + "dev": true + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "5.30.7", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.7.tgz", + "integrity": "sha512-l4L6Do+tfeM2OK0GJsU7TUcM/1oN/N25xHm3Jb4z3OiDU4Lj8dIuxX9LpVMS9riSXQs42D1ieX7b85/r16H9Fw==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "5.30.7", + "@typescript-eslint/type-utils": "5.30.7", + "@typescript-eslint/utils": "5.30.7", + "debug": "^4.3.4", + "functional-red-black-tree": "^1.0.1", + "ignore": "^5.2.0", + "regexpp": "^3.2.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "5.30.7", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.30.7.tgz", + "integrity": "sha512-Rg5xwznHWWSy7v2o0cdho6n+xLhK2gntImp0rJroVVFkcYFYQ8C8UJTSuTw/3CnExBmPjycjmUJkxVmjXsld6A==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "5.30.7", + "@typescript-eslint/types": "5.30.7", + "@typescript-eslint/typescript-estree": "5.30.7", + "debug": "^4.3.4" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "5.30.7", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.30.7.tgz", + "integrity": "sha512-7BM1bwvdF1UUvt+b9smhqdc/eniOnCKxQT/kj3oXtj3LqnTWCAM0qHRHfyzCzhEfWX0zrW7KqXXeE4DlchZBKw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.30.7", + "@typescript-eslint/visitor-keys": "5.30.7" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "5.30.7", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.30.7.tgz", + "integrity": "sha512-nD5qAE2aJX/YLyKMvOU5jvJyku4QN5XBVsoTynFrjQZaDgDV6i7QHFiYCx10wvn7hFvfuqIRNBtsgaLe0DbWhw==", + "dev": true, + "dependencies": { + "@typescript-eslint/utils": "5.30.7", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "5.30.7", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.7.tgz", + "integrity": "sha512-ocVkETUs82+U+HowkovV6uxf1AnVRKCmDRNUBUUo46/5SQv1owC/EBFkiu4MOHeZqhKz2ktZ3kvJJ1uFqQ8QPg==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "5.30.7", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.7.tgz", + "integrity": "sha512-tNslqXI1ZdmXXrHER83TJ8OTYl4epUzJC0aj2i4DMDT4iU+UqLT3EJeGQvJ17BMbm31x5scSwo3hPM0nqQ1AEA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.30.7", + "@typescript-eslint/visitor-keys": "5.30.7", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "5.30.7", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.30.7.tgz", + "integrity": "sha512-Z3pHdbFw+ftZiGUnm1GZhkJgVqsDL5CYW2yj+TB2mfXDFOMqtbzQi2dNJIyPqPbx9mv2kUxS1gU+r2gKlKi1rQ==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.30.7", + "@typescript-eslint/types": "5.30.7", + "@typescript-eslint/typescript-estree": "5.30.7", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "5.30.7", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.7.tgz", + "integrity": "sha512-KrRXf8nnjvcpxDFOKej4xkD7657+PClJs5cJVSG7NNoCNnjEdc46juNAQt7AyuWctuCgs6mVRc1xGctEqrjxWw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.30.7", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/acorn": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-jest": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.3.tgz", + "integrity": "sha512-epUaPOEWMk3cWX0M/sPvCHHCe9fMFAa/9hXEgKP8nFfNl/jlGkE9ucq9NqkZGXLDduCJYS0UvSlPUwC0S+rH6Q==", + "dev": true, + "dependencies": { + "@jest/transform": "^28.1.3", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^28.1.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-jest-hoist": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.3.tgz", + "integrity": "sha512-Ys3tUKAmfnkRUpPdpa98eYrAR0nV+sSFUZZEGuQ2EbFd1y4SOLtD5QDNHAq+bb9a+bbXvYQC4b+ID/THIMcU6Q==", + "dev": true, + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "dev": true, + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/babel-preset-jest": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.1.3.tgz", + "integrity": "sha512-L+fupJvlWAHbQfn74coNX3zf60LXMJsezNvvx8eIh7iOR1luJ1poxYgQk1F8PYtNq/6QODDHCqsSnTFSWC491A==", + "dev": true, + "dependencies": { + "babel-plugin-jest-hoist": "^28.1.3", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/base-x": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", + "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" + }, + "node_modules/base64url": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", + "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.21.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", + "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001400", + "electron-to-chromium": "^1.4.251", + "node-releases": "^2.0.6", + "update-browserslist-db": "^1.0.9" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/bs58": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", + "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", + "dependencies": { + "base-x": "^4.0.0" + } + }, + "node_modules/bs58check": { + "version": "3.0.1", + "resolved": "git+ssh://git@github.com/bitcoinjs/bs58check.git", + "integrity": "sha512-baICxaJy1rqIByQPpjsoHVEuaADwsvZqZNlaFtxMHDlWeMHqXKnKYlcor7s+bXrQe0xxnw+exZBmtw/8OAdePA==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "^1.2.0", + "bs58": "^5.0.0" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001412", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001412.tgz", + "integrity": "sha512-+TeEIee1gS5bYOiuf+PS/kp2mrXic37Hl66VY6EAfxasIk5fELTktK2oOezYed12H8w7jt3s512PpulQidPjwA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + } + ] + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/ci-info": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.4.0.tgz", + "integrity": "sha512-t5QdPT5jq3o262DOQ8zA6E1tlH2upmUc4Hlvrbx1pGYJuiiHl7O7rvVNI+l8HTVhd/q3Qc9vqimkNk5yiXsAug==", + "dev": true + }, + "node_modules/cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/cjs-module-lexer": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", + "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", + "dev": true + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true, + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/collect-v8-coverage": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", + "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", + "dev": true + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.1" + } + }, + "node_modules/convert-source-map/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", + "dev": true + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/diff-sequences": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", + "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", + "dev": true, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.4.266", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.266.tgz", + "integrity": "sha512-saJTYECxUSv7eSpnXw0XIEvUkP9x4s/x2mm3TVX7k4rIFS6f5TjBih1B5h437WzIhHQjid+d8ouQzPQskMervQ==", + "dev": true + }, + "node_modules/emittery": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", + "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.20.0.tgz", + "integrity": "sha512-d4ixhz5SKCa1D6SCPrivP7yYVi7nyD6A4vs6HIAul9ujBzcEmZVM3/0NN/yu5nKhmO1wjp5xQ46iRfmDGlOviA==", + "dev": true, + "dependencies": { + "@eslint/eslintrc": "^1.3.0", + "@humanwhocodes/config-array": "^0.9.2", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.2", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^6.0.1", + "globals": "^13.15.0", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-plugin-jest": { + "version": "26.6.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-26.6.0.tgz", + "integrity": "sha512-f8n46/97ZFdU4KqeQYqO8AEVGIhHWvkpgNBWHH3jrM28/y8llnbf3IjfIKv6p2pZIMinK1PCqbbROxs9Eud02Q==", + "dev": true, + "dependencies": { + "@typescript-eslint/utils": "^5.10.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "@typescript-eslint/eslint-plugin": { + "optional": true + }, + "jest": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint/node_modules/eslint-scope": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/espree": { + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", + "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", + "dev": true, + "dependencies": { + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expect": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.3.tgz", + "integrity": "sha512-eEh0xn8HlsuOBxFgIss+2mX85VAS4Qy3OSkjV7rlBWljtA4oWH37glVGyOZSZvErDT/yBywZdPGwCXuTvSG85g==", + "dev": true, + "dependencies": { + "@jest/expect-utils": "^28.1.3", + "jest-get-type": "^28.0.2", + "jest-matcher-utils": "^28.1.3", + "jest-message-util": "^28.1.3", + "jest-util": "^28.1.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "dependencies": { + "bser": "2.1.1" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "dev": true + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", + "dev": true + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "13.17.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", + "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/ignore": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-local": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "dev": true, + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "node_modules/is-core-module": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", + "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz", + "integrity": "sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", + "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest/-/jest-28.1.3.tgz", + "integrity": "sha512-N4GT5on8UkZgH0O5LUavMRV1EDEhNTL0KEfRmDIeZHSV7p2XgLoY9t9VDUgL6o+yfdgYHVxuz81G8oB9VG5uyA==", + "dev": true, + "dependencies": { + "@jest/core": "^28.1.3", + "@jest/types": "^28.1.3", + "import-local": "^3.0.2", + "jest-cli": "^28.1.3" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-changed-files": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-28.1.3.tgz", + "integrity": "sha512-esaOfUWJXk2nfZt9SPyC8gA1kNfdKLkQWyzsMlqq8msYSlNKfmZxfRgZn4Cd4MGVUF+7v6dBs0d5TOAKa7iIiA==", + "dev": true, + "dependencies": { + "execa": "^5.0.0", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-circus": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-28.1.3.tgz", + "integrity": "sha512-cZ+eS5zc79MBwt+IhQhiEp0OeBddpc1n8MBo1nMB8A7oPMKEO+Sre+wHaLJexQUj9Ya/8NOBY0RESUgYjB6fow==", + "dev": true, + "dependencies": { + "@jest/environment": "^28.1.3", + "@jest/expect": "^28.1.3", + "@jest/test-result": "^28.1.3", + "@jest/types": "^28.1.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^0.7.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^28.1.3", + "jest-matcher-utils": "^28.1.3", + "jest-message-util": "^28.1.3", + "jest-runtime": "^28.1.3", + "jest-snapshot": "^28.1.3", + "jest-util": "^28.1.3", + "p-limit": "^3.1.0", + "pretty-format": "^28.1.3", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-cli": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-28.1.3.tgz", + "integrity": "sha512-roY3kvrv57Azn1yPgdTebPAXvdR2xfezaKKYzVxZ6It/5NCxzJym6tUI5P1zkdWhfUYkxEI9uZWcQdaFLo8mJQ==", + "dev": true, + "dependencies": { + "@jest/core": "^28.1.3", + "@jest/test-result": "^28.1.3", + "@jest/types": "^28.1.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "import-local": "^3.0.2", + "jest-config": "^28.1.3", + "jest-util": "^28.1.3", + "jest-validate": "^28.1.3", + "prompts": "^2.0.1", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-config": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-28.1.3.tgz", + "integrity": "sha512-MG3INjByJ0J4AsNBm7T3hsuxKQqFIiRo/AUqb1q9LRKI5UU6Aar9JHbr9Ivn1TVwfUD9KirRoM/T6u8XlcQPHQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^28.1.3", + "@jest/types": "^28.1.3", + "babel-jest": "^28.1.3", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^28.1.3", + "jest-environment-node": "^28.1.3", + "jest-get-type": "^28.0.2", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.3", + "jest-runner": "^28.1.3", + "jest-util": "^28.1.3", + "jest-validate": "^28.1.3", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^28.1.3", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/jest-diff": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.3.tgz", + "integrity": "sha512-8RqP1B/OXzjjTWkqMX67iqgwBVJRgCyKD3L9nq+6ZqJMdvjE8RgHktqZ6jNrkdMT+dJuYNI3rhQpxaz7drJHfw==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^28.1.1", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-docblock": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.1.1.tgz", + "integrity": "sha512-3wayBVNiOYx0cwAbl9rwm5kKFP8yHH3d/fkEaL02NPTkDojPtheGB7HZSFY4wzX+DxyrvhXz0KSCVksmCknCuA==", + "dev": true, + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-each": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-28.1.3.tgz", + "integrity": "sha512-arT1z4sg2yABU5uogObVPvSlSMQlDA48owx07BDPAiasW0yYpYHYOo4HHLz9q0BVzDVU4hILFjzJw0So9aCL/g==", + "dev": true, + "dependencies": { + "@jest/types": "^28.1.3", + "chalk": "^4.0.0", + "jest-get-type": "^28.0.2", + "jest-util": "^28.1.3", + "pretty-format": "^28.1.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-environment-node": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.1.3.tgz", + "integrity": "sha512-ugP6XOhEpjAEhGYvp5Xj989ns5cB1K6ZdjBYuS30umT4CQEETaxSiPcZ/E1kFktX4GkrcM4qu07IIlDYX1gp+A==", + "dev": true, + "dependencies": { + "@jest/environment": "^28.1.3", + "@jest/fake-timers": "^28.1.3", + "@jest/types": "^28.1.3", + "@types/node": "*", + "jest-mock": "^28.1.3", + "jest-util": "^28.1.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-get-type": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "dev": true, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.3.tgz", + "integrity": "sha512-3S+RQWDXccXDKSWnkHa/dPwt+2qwA8CJzR61w3FoYCvoo3Pn8tvGcysmMF0Bj0EX5RYvAI2EIvC57OmotfdtKA==", + "dev": true, + "dependencies": { + "@jest/types": "^28.1.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^28.0.2", + "jest-util": "^28.1.3", + "jest-worker": "^28.1.3", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "node_modules/jest-leak-detector": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.1.3.tgz", + "integrity": "sha512-WFVJhnQsiKtDEo5lG2mM0v40QWnBM+zMdHHyJs8AWZ7J0QZJS59MsyKeJHWhpBZBH32S48FOVvGyOFT1h0DlqA==", + "dev": true, + "dependencies": { + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.3.tgz", + "integrity": "sha512-kQeJ7qHemKfbzKoGjHHrRKH6atgxMk8Enkk2iPQ3XwO6oE/KYD8lMYOziCkeSB9G4adPM4nR1DE8Tf5JeWH6Bw==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^28.1.3", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-message-util": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.3.tgz", + "integrity": "sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^28.1.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^28.1.3", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-mock": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.3.tgz", + "integrity": "sha512-o3J2jr6dMMWYVH4Lh/NKmDXdosrsJgi4AviS8oXLujcjpCMBb1FMsblDnOXKZKfSiHLxYub1eS0IHuRXsio9eA==", + "dev": true, + "dependencies": { + "@jest/types": "^28.1.3", + "@types/node": "*" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", + "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "dev": true, + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", + "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", + "dev": true, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-resolve": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.1.3.tgz", + "integrity": "sha512-Z1W3tTjE6QaNI90qo/BJpfnvpxtaFTFw5CDgwpyE/Kz8U/06N1Hjf4ia9quUhCh39qIGWF1ZuxFiBiJQwSEYKQ==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.3", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^28.1.3", + "jest-validate": "^28.1.3", + "resolve": "^1.20.0", + "resolve.exports": "^1.1.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.3.tgz", + "integrity": "sha512-qa0QO2Q0XzQoNPouMbCc7Bvtsem8eQgVPNkwn9LnS+R2n8DaVDPL/U1gngC0LTl1RYXJU0uJa2BMC2DbTfFrHA==", + "dev": true, + "dependencies": { + "jest-regex-util": "^28.0.2", + "jest-snapshot": "^28.1.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-runner": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-28.1.3.tgz", + "integrity": "sha512-GkMw4D/0USd62OVO0oEgjn23TM+YJa2U2Wu5zz9xsQB1MxWKDOlrnykPxnMsN0tnJllfLPinHTka61u0QhaxBA==", + "dev": true, + "dependencies": { + "@jest/console": "^28.1.3", + "@jest/environment": "^28.1.3", + "@jest/test-result": "^28.1.3", + "@jest/transform": "^28.1.3", + "@jest/types": "^28.1.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.10.2", + "graceful-fs": "^4.2.9", + "jest-docblock": "^28.1.1", + "jest-environment-node": "^28.1.3", + "jest-haste-map": "^28.1.3", + "jest-leak-detector": "^28.1.3", + "jest-message-util": "^28.1.3", + "jest-resolve": "^28.1.3", + "jest-runtime": "^28.1.3", + "jest-util": "^28.1.3", + "jest-watcher": "^28.1.3", + "jest-worker": "^28.1.3", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-runtime": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.1.3.tgz", + "integrity": "sha512-NU+881ScBQQLc1JHG5eJGU7Ui3kLKrmwCPPtYsJtBykixrM2OhVQlpMmFWJjMyDfdkGgBMNjXCGB/ebzsgNGQw==", + "dev": true, + "dependencies": { + "@jest/environment": "^28.1.3", + "@jest/fake-timers": "^28.1.3", + "@jest/globals": "^28.1.3", + "@jest/source-map": "^28.1.2", + "@jest/test-result": "^28.1.3", + "@jest/transform": "^28.1.3", + "@jest/types": "^28.1.3", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "execa": "^5.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.3", + "jest-message-util": "^28.1.3", + "jest-mock": "^28.1.3", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.3", + "jest-snapshot": "^28.1.3", + "jest-util": "^28.1.3", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-snapshot": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.3.tgz", + "integrity": "sha512-4lzMgtiNlc3DU/8lZfmqxN3AYD6GGLbl+72rdBpXvcV+whX7mDrREzkPdp2RnmfIiWBg1YbuFSkXduF2JcafJg==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^28.1.3", + "@jest/transform": "^28.1.3", + "@jest/types": "^28.1.3", + "@types/babel__traverse": "^7.0.6", + "@types/prettier": "^2.1.5", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^28.1.3", + "graceful-fs": "^4.2.9", + "jest-diff": "^28.1.3", + "jest-get-type": "^28.0.2", + "jest-haste-map": "^28.1.3", + "jest-matcher-utils": "^28.1.3", + "jest-message-util": "^28.1.3", + "jest-util": "^28.1.3", + "natural-compare": "^1.4.0", + "pretty-format": "^28.1.3", + "semver": "^7.3.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-util": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.3.tgz", + "integrity": "sha512-XdqfpHwpcSRko/C35uLYFM2emRAltIIKZiJ9eAmhjsj0CqZMa0p1ib0R5fWIqGhn1a103DebTbpqIaP1qCQ6tQ==", + "dev": true, + "dependencies": { + "@jest/types": "^28.1.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-validate": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-28.1.3.tgz", + "integrity": "sha512-SZbOGBWEsaTxBGCOpsRWlXlvNkvTkY0XxRfh7zYmvd8uL5Qzyg0CHAXiXKROflh801quA6+/DsT4ODDthOC/OA==", + "dev": true, + "dependencies": { + "@jest/types": "^28.1.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^28.0.2", + "leven": "^3.1.0", + "pretty-format": "^28.1.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-watcher": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.1.3.tgz", + "integrity": "sha512-t4qcqj9hze+jviFPUN3YAtAEeFnr/azITXQEMARf5cMwKY2SMBRnCQTXLixTl20OR6mLh9KLMrgVJgJISym+1g==", + "dev": true, + "dependencies": { + "@jest/test-result": "^28.1.3", + "@jest/types": "^28.1.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.10.2", + "jest-util": "^28.1.3", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-worker": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.3.tgz", + "integrity": "sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==", + "dev": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "node_modules/json5": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", + "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "dependencies": { + "tmpl": "1.0.5" + } + }, + "node_modules/md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true + }, + "node_modules/node-releases": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", + "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", + "dev": true + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-locate/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pirates": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", + "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/pretty-format": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz", + "integrity": "sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==", + "dev": true, + "dependencies": { + "@jest/schemas": "^28.1.3", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-cwd/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve.exports": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz", + "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "node_modules/stack-utils": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", + "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-hyperlinks": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", + "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/terminal-link": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", + "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", + "dev": true, + "dependencies": { + "ansi-escapes": "^4.2.1", + "supports-hyperlinks": "^2.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "node_modules/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-jest": { + "version": "28.0.7", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-28.0.7.tgz", + "integrity": "sha512-wWXCSmTwBVmdvWrOpYhal79bDpioDy4rTT+0vyUnE3ZzM7LOAAGG9NXwzkEL/a516rQEgnMmS/WKP9jBPCVJyA==", + "dev": true, + "dependencies": { + "bs-logger": "0.x", + "fast-json-stable-stringify": "2.x", + "jest-util": "^28.0.0", + "json5": "^2.2.1", + "lodash.memoize": "4.x", + "make-error": "1.x", + "semver": "7.x", + "yargs-parser": "^21.0.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/types": "^28.0.0", + "babel-jest": "^28.0.0", + "jest": "^28.0.0", + "typescript": ">=4.3" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + } + } + }, + "node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", + "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz", + "integrity": "sha512-/xsqn21EGVdXI3EXSum1Yckj3ZVZugqyOZQ/CxYPBD/R+ko9NSUScf8tFF4dOKY+2pvSSJA/S+5B8s4Zr4kyvg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "browserslist-lint": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, + "node_modules/v8-to-istanbul": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", + "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "dependencies": { + "makeerror": "1.0.12" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/yargs": { + "version": "17.5.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", + "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + }, + "dependencies": { + "@ampproject/remapping": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", + "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "dev": true, + "requires": { + "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@babel/code-frame": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "dev": true, + "requires": { + "@babel/highlight": "^7.18.6" + } + }, + "@babel/compat-data": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.3.tgz", + "integrity": "sha512-prBHMK4JYYK+wDjJF1q99KK4JLL+egWS4nmNqdlMUgCExMZ+iZW0hGhyC3VEbsPjvaN0TBhW//VIFwBrk8sEiw==", + "dev": true + }, + "@babel/core": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.3.tgz", + "integrity": "sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==", + "dev": true, + "requires": { + "@ampproject/remapping": "^2.1.0", + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.19.3", + "@babel/helper-compilation-targets": "^7.19.3", + "@babel/helper-module-transforms": "^7.19.0", + "@babel/helpers": "^7.19.0", + "@babel/parser": "^7.19.3", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.3", + "@babel/types": "^7.19.3", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.1", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "@babel/generator": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.3.tgz", + "integrity": "sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==", + "dev": true, + "requires": { + "@babel/types": "^7.19.3", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + }, + "dependencies": { + "@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + } + } + }, + "@babel/helper-compilation-targets": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz", + "integrity": "sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.19.3", + "@babel/helper-validator-option": "^7.18.6", + "browserslist": "^4.21.3", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "@babel/helper-environment-visitor": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", + "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "dev": true + }, + "@babel/helper-function-name": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", + "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "dev": true, + "requires": { + "@babel/template": "^7.18.10", + "@babel/types": "^7.19.0" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", + "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-module-imports": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", + "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-module-transforms": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", + "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-simple-access": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/helper-validator-identifier": "^7.18.6", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", + "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", + "dev": true + }, + "@babel/helper-simple-access": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", + "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", + "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-string-parser": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz", + "integrity": "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==", + "dev": true + }, + "@babel/helper-validator-identifier": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "dev": true + }, + "@babel/helper-validator-option": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", + "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "dev": true + }, + "@babel/helpers": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.0.tgz", + "integrity": "sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==", + "dev": true, + "requires": { + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" + } + }, + "@babel/highlight": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.18.6", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@babel/parser": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.3.tgz", + "integrity": "sha512-pJ9xOlNWHiy9+FuFP09DEAFbAn4JskgRsVcc169w2xRBC3FRGuQEwjeIMMND9L2zc0iEhO/tGv4Zq+km+hxNpQ==", + "dev": true + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-typescript": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", + "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/template": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", + "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.18.10", + "@babel/types": "^7.18.10" + } + }, + "@babel/traverse": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.3.tgz", + "integrity": "sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.19.3", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.19.3", + "@babel/types": "^7.19.3", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "dependencies": { + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + } + } + }, + "@babel/types": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz", + "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.18.10", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + } + }, + "@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "@eslint/eslintrc": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.2.tgz", + "integrity": "sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.4.0", + "globals": "^13.15.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + } + }, + "@humanwhocodes/config-array": { + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", + "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + } + }, + "@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, + "@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "dependencies": { + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + } + } + }, + "@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true + }, + "@jest/console": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-28.1.3.tgz", + "integrity": "sha512-QPAkP5EwKdK/bxIr6C1I4Vs0rm2nHiANzj/Z5X2JQkrZo6IqvC4ldZ9K95tF0HdidhA8Bo6egxSzUFPYKcEXLw==", + "dev": true, + "requires": { + "@jest/types": "^28.1.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^28.1.3", + "jest-util": "^28.1.3", + "slash": "^3.0.0" + } + }, + "@jest/core": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-28.1.3.tgz", + "integrity": "sha512-CIKBrlaKOzA7YG19BEqCw3SLIsEwjZkeJzf5bdooVnW4bH5cktqe3JX+G2YV1aK5vP8N9na1IGWFzYaTp6k6NA==", + "dev": true, + "requires": { + "@jest/console": "^28.1.3", + "@jest/reporters": "^28.1.3", + "@jest/test-result": "^28.1.3", + "@jest/transform": "^28.1.3", + "@jest/types": "^28.1.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^28.1.3", + "jest-config": "^28.1.3", + "jest-haste-map": "^28.1.3", + "jest-message-util": "^28.1.3", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.3", + "jest-resolve-dependencies": "^28.1.3", + "jest-runner": "^28.1.3", + "jest-runtime": "^28.1.3", + "jest-snapshot": "^28.1.3", + "jest-util": "^28.1.3", + "jest-validate": "^28.1.3", + "jest-watcher": "^28.1.3", + "micromatch": "^4.0.4", + "pretty-format": "^28.1.3", + "rimraf": "^3.0.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "@jest/environment": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.1.3.tgz", + "integrity": "sha512-1bf40cMFTEkKyEf585R9Iz1WayDjHoHqvts0XFYEqyKM3cFWDpeMoqKKTAF9LSYQModPUlh8FKptoM2YcMWAXA==", + "dev": true, + "requires": { + "@jest/fake-timers": "^28.1.3", + "@jest/types": "^28.1.3", + "@types/node": "*", + "jest-mock": "^28.1.3" + } + }, + "@jest/expect": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-28.1.3.tgz", + "integrity": "sha512-lzc8CpUbSoE4dqT0U+g1qODQjBRHPpCPXissXD4mS9+sWQdmmpeJ9zSH1rS1HEkrsMN0fb7nKrJ9giAR1d3wBw==", + "dev": true, + "requires": { + "expect": "^28.1.3", + "jest-snapshot": "^28.1.3" + } + }, + "@jest/expect-utils": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.1.3.tgz", + "integrity": "sha512-wvbi9LUrHJLn3NlDW6wF2hvIMtd4JUl2QNVrjq+IBSHirgfrR3o9RnVtxzdEGO2n9JyIWwHnLfby5KzqBGg2YA==", + "dev": true, + "requires": { + "jest-get-type": "^28.0.2" + } + }, + "@jest/fake-timers": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.1.3.tgz", + "integrity": "sha512-D/wOkL2POHv52h+ok5Oj/1gOG9HSywdoPtFsRCUmlCILXNn5eIWmcnd3DIiWlJnpGvQtmajqBP95Ei0EimxfLw==", + "dev": true, + "requires": { + "@jest/types": "^28.1.3", + "@sinonjs/fake-timers": "^9.1.2", + "@types/node": "*", + "jest-message-util": "^28.1.3", + "jest-mock": "^28.1.3", + "jest-util": "^28.1.3" + } + }, + "@jest/globals": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-28.1.3.tgz", + "integrity": "sha512-XFU4P4phyryCXu1pbcqMO0GSQcYe1IsalYCDzRNyhetyeyxMcIxa11qPNDpVNLeretItNqEmYYQn1UYz/5x1NA==", + "dev": true, + "requires": { + "@jest/environment": "^28.1.3", + "@jest/expect": "^28.1.3", + "@jest/types": "^28.1.3" + } + }, + "@jest/reporters": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-28.1.3.tgz", + "integrity": "sha512-JuAy7wkxQZVNU/V6g9xKzCGC5LVXx9FDcABKsSXp5MiKPEE2144a/vXTEDoyzjUpZKfVwp08Wqg5A4WfTMAzjg==", + "dev": true, + "requires": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^28.1.3", + "@jest/test-result": "^28.1.3", + "@jest/transform": "^28.1.3", + "@jest/types": "^28.1.3", + "@jridgewell/trace-mapping": "^0.3.13", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^28.1.3", + "jest-util": "^28.1.3", + "jest-worker": "^28.1.3", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "terminal-link": "^2.0.0", + "v8-to-istanbul": "^9.0.1" + } + }, + "@jest/schemas": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-28.1.3.tgz", + "integrity": "sha512-/l/VWsdt/aBXgjshLWOFyFt3IVdYypu5y2Wn2rOO1un6nkqIn8SLXzgIMYXFyYsRWDyF5EthmKJMIdJvk08grg==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, + "@jest/source-map": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-28.1.2.tgz", + "integrity": "sha512-cV8Lx3BeStJb8ipPHnqVw/IM2VCMWO3crWZzYodSIkxXnRcXJipCdx1JCK0K5MsJJouZQTH73mzf4vgxRaH9ww==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.13", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + } + }, + "@jest/test-result": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-28.1.3.tgz", + "integrity": "sha512-kZAkxnSE+FqE8YjW8gNuoVkkC9I7S1qmenl8sGcDOLropASP+BkcGKwhXoyqQuGOGeYY0y/ixjrd/iERpEXHNg==", + "dev": true, + "requires": { + "@jest/console": "^28.1.3", + "@jest/types": "^28.1.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + } + }, + "@jest/test-sequencer": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.1.3.tgz", + "integrity": "sha512-NIMPEqqa59MWnDi1kvXXpYbqsfQmSJsIbnd85mdVGkiDfQ9WQQTXOLsvISUfonmnBT+w85WEgneCigEEdHDFxw==", + "dev": true, + "requires": { + "@jest/test-result": "^28.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.3", + "slash": "^3.0.0" + } + }, + "@jest/transform": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.3.tgz", + "integrity": "sha512-u5dT5di+oFI6hfcLOHGTAfmUxFRrjK+vnaP0kkVow9Md/M7V/MxqQMOz/VV25UZO8pzeA9PjfTpOu6BDuwSPQA==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@jest/types": "^28.1.3", + "@jridgewell/trace-mapping": "^0.3.13", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.3", + "jest-regex-util": "^28.0.2", + "jest-util": "^28.1.3", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.1" + } + }, + "@jest/types": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", + "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", + "dev": true, + "requires": { + "@jest/schemas": "^28.1.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@jridgewell/gen-mapping": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", + "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true + }, + "@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.15", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", + "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "@noble/hashes": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", + "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==" + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "@sinclair/typebox": { + "version": "0.24.43", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.43.tgz", + "integrity": "sha512-1orQTvtazZmsPeBroJjysvsOQCYV2yjWlebkSY38pl5vr2tdLjEJ+LoxITlGNZaH2RE19WlAwQMkH/7C14wLfw==", + "dev": true + }, + "@sinonjs/commons": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", + "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/fake-timers": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", + "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + }, + "@types/babel__core": { + "version": "7.1.19", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", + "integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==", + "dev": true, + "requires": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "@types/babel__generator": { + "version": "7.6.4", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", + "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@types/babel__template": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", + "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", + "dev": true, + "requires": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@types/babel__traverse": { + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.2.tgz", + "integrity": "sha512-FcFaxOr2V5KZCviw1TnutEMVUVsGt4D2hP1TAfXZAMKuHYW3xQhe3jTxNPWutgCJ3/X1c5yX8ZoGVEItxKbwBg==", + "dev": true, + "requires": { + "@babel/types": "^7.3.0" + } + }, + "@types/bn.js": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.1.tgz", + "integrity": "sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/bs58check": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@types/bs58check/-/bs58check-2.1.0.tgz", + "integrity": "sha512-OxsysnJQh82vy9DRbOcw9m2j/WiyqZLn0YBhKxdQ+aCwoHj+tWzyCgpwAkr79IfDXZKxc6h7k89T9pwS78CqTQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/create-hash": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@types/create-hash/-/create-hash-1.2.2.tgz", + "integrity": "sha512-Fg8/kfMJObbETFU/Tn+Y0jieYewryLrbKwLCEIwPyklZZVY2qB+64KFjhplGSw+cseZosfFXctXO+PyIYD8iZQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/graceful-fs": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", + "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/istanbul-lib-coverage": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", + "dev": true + }, + "@types/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "*" + } + }, + "@types/istanbul-reports": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", + "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "dev": true, + "requires": { + "@types/istanbul-lib-report": "*" + } + }, + "@types/jest": { + "version": "28.1.6", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-28.1.6.tgz", + "integrity": "sha512-0RbGAFMfcBJKOmqRazM8L98uokwuwD5F8rHrv/ZMbrZBwVOWZUyPG6VFNscjYr/vjM3Vu4fRrCPbOs42AfemaQ==", + "dev": true, + "requires": { + "jest-matcher-utils": "^28.0.0", + "pretty-format": "^28.0.0" + } + }, + "@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true + }, + "@types/node": { + "version": "18.7.22", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.22.tgz", + "integrity": "sha512-TsmoXYd4zrkkKjJB0URF/mTIKPl+kVcbqClB2F/ykU7vil1BfWZVndOnpEIozPv4fURD28gyPFeIkW2G+KXOvw==", + "dev": true + }, + "@types/prettier": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow==", + "dev": true + }, + "@types/stack-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", + "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", + "dev": true + }, + "@types/yargs": { + "version": "17.0.13", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz", + "integrity": "sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "@types/yargs-parser": { + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", + "dev": true + }, + "@typescript-eslint/eslint-plugin": { + "version": "5.30.7", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.7.tgz", + "integrity": "sha512-l4L6Do+tfeM2OK0GJsU7TUcM/1oN/N25xHm3Jb4z3OiDU4Lj8dIuxX9LpVMS9riSXQs42D1ieX7b85/r16H9Fw==", + "dev": true, + "requires": { + "@typescript-eslint/scope-manager": "5.30.7", + "@typescript-eslint/type-utils": "5.30.7", + "@typescript-eslint/utils": "5.30.7", + "debug": "^4.3.4", + "functional-red-black-tree": "^1.0.1", + "ignore": "^5.2.0", + "regexpp": "^3.2.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/parser": { + "version": "5.30.7", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.30.7.tgz", + "integrity": "sha512-Rg5xwznHWWSy7v2o0cdho6n+xLhK2gntImp0rJroVVFkcYFYQ8C8UJTSuTw/3CnExBmPjycjmUJkxVmjXsld6A==", + "dev": true, + "requires": { + "@typescript-eslint/scope-manager": "5.30.7", + "@typescript-eslint/types": "5.30.7", + "@typescript-eslint/typescript-estree": "5.30.7", + "debug": "^4.3.4" + } + }, + "@typescript-eslint/scope-manager": { + "version": "5.30.7", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.30.7.tgz", + "integrity": "sha512-7BM1bwvdF1UUvt+b9smhqdc/eniOnCKxQT/kj3oXtj3LqnTWCAM0qHRHfyzCzhEfWX0zrW7KqXXeE4DlchZBKw==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.30.7", + "@typescript-eslint/visitor-keys": "5.30.7" + } + }, + "@typescript-eslint/type-utils": { + "version": "5.30.7", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.30.7.tgz", + "integrity": "sha512-nD5qAE2aJX/YLyKMvOU5jvJyku4QN5XBVsoTynFrjQZaDgDV6i7QHFiYCx10wvn7hFvfuqIRNBtsgaLe0DbWhw==", + "dev": true, + "requires": { + "@typescript-eslint/utils": "5.30.7", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/types": { + "version": "5.30.7", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.7.tgz", + "integrity": "sha512-ocVkETUs82+U+HowkovV6uxf1AnVRKCmDRNUBUUo46/5SQv1owC/EBFkiu4MOHeZqhKz2ktZ3kvJJ1uFqQ8QPg==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "5.30.7", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.7.tgz", + "integrity": "sha512-tNslqXI1ZdmXXrHER83TJ8OTYl4epUzJC0aj2i4DMDT4iU+UqLT3EJeGQvJ17BMbm31x5scSwo3hPM0nqQ1AEA==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.30.7", + "@typescript-eslint/visitor-keys": "5.30.7", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/utils": { + "version": "5.30.7", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.30.7.tgz", + "integrity": "sha512-Z3pHdbFw+ftZiGUnm1GZhkJgVqsDL5CYW2yj+TB2mfXDFOMqtbzQi2dNJIyPqPbx9mv2kUxS1gU+r2gKlKi1rQ==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.30.7", + "@typescript-eslint/types": "5.30.7", + "@typescript-eslint/typescript-estree": "5.30.7", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.30.7", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.7.tgz", + "integrity": "sha512-KrRXf8nnjvcpxDFOKej4xkD7657+PClJs5cJVSG7NNoCNnjEdc46juNAQt7AyuWctuCgs6mVRc1xGctEqrjxWw==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.30.7", + "eslint-visitor-keys": "^3.3.0" + } + }, + "acorn": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", + "dev": true + }, + "acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "requires": {} + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "requires": { + "type-fest": "^0.21.3" + }, + "dependencies": { + "type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true + } + } + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "babel-jest": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.3.tgz", + "integrity": "sha512-epUaPOEWMk3cWX0M/sPvCHHCe9fMFAa/9hXEgKP8nFfNl/jlGkE9ucq9NqkZGXLDduCJYS0UvSlPUwC0S+rH6Q==", + "dev": true, + "requires": { + "@jest/transform": "^28.1.3", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^28.1.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + } + }, + "babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + } + }, + "babel-plugin-jest-hoist": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.3.tgz", + "integrity": "sha512-Ys3tUKAmfnkRUpPdpa98eYrAR0nV+sSFUZZEGuQ2EbFd1y4SOLtD5QDNHAq+bb9a+bbXvYQC4b+ID/THIMcU6Q==", + "dev": true, + "requires": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + } + }, + "babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "dev": true, + "requires": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + } + }, + "babel-preset-jest": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.1.3.tgz", + "integrity": "sha512-L+fupJvlWAHbQfn74coNX3zf60LXMJsezNvvx8eIh7iOR1luJ1poxYgQk1F8PYtNq/6QODDHCqsSnTFSWC491A==", + "dev": true, + "requires": { + "babel-plugin-jest-hoist": "^28.1.3", + "babel-preset-current-node-syntax": "^1.0.0" + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "base-x": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", + "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" + }, + "base64url": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", + "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==" + }, + "bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "browserslist": { + "version": "4.21.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", + "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001400", + "electron-to-chromium": "^1.4.251", + "node-releases": "^2.0.6", + "update-browserslist-db": "^1.0.9" + } + }, + "bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "requires": { + "fast-json-stable-stringify": "2.x" + } + }, + "bs58": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", + "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", + "requires": { + "base-x": "^4.0.0" + } + }, + "bs58check": { + "version": "git+ssh://git@github.com/bitcoinjs/bs58check.git", + "integrity": "sha512-baICxaJy1rqIByQPpjsoHVEuaADwsvZqZNlaFtxMHDlWeMHqXKnKYlcor7s+bXrQe0xxnw+exZBmtw/8OAdePA==", + "from": "bs58check@https://github.com/bitcoinjs/bs58check", + "requires": { + "@noble/hashes": "^1.2.0", + "bs58": "^5.0.0" + } + }, + "bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "requires": { + "node-int64": "^0.4.0" + } + }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "caniuse-lite": { + "version": "1.0.30001412", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001412.tgz", + "integrity": "sha512-+TeEIee1gS5bYOiuf+PS/kp2mrXic37Hl66VY6EAfxasIk5fELTktK2oOezYed12H8w7jt3s512PpulQidPjwA==", + "dev": true + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true + }, + "ci-info": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.4.0.tgz", + "integrity": "sha512-t5QdPT5jq3o262DOQ8zA6E1tlH2upmUc4Hlvrbx1pGYJuiiHl7O7rvVNI+l8HTVhd/q3Qc9vqimkNk5yiXsAug==", + "dev": true + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "cjs-module-lexer": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", + "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", + "dev": true + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true + }, + "collect-v8-coverage": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", + "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", + "dev": true + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", + "dev": true + }, + "deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "dev": true + }, + "detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true + }, + "diff-sequences": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", + "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", + "dev": true + }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "electron-to-chromium": { + "version": "1.4.266", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.266.tgz", + "integrity": "sha512-saJTYECxUSv7eSpnXw0XIEvUkP9x4s/x2mm3TVX7k4rIFS6f5TjBih1B5h437WzIhHQjid+d8ouQzPQskMervQ==", + "dev": true + }, + "emittery": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", + "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "eslint": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.20.0.tgz", + "integrity": "sha512-d4ixhz5SKCa1D6SCPrivP7yYVi7nyD6A4vs6HIAul9ujBzcEmZVM3/0NN/yu5nKhmO1wjp5xQ46iRfmDGlOviA==", + "dev": true, + "requires": { + "@eslint/eslintrc": "^1.3.0", + "@humanwhocodes/config-array": "^0.9.2", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.2", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^6.0.1", + "globals": "^13.15.0", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "eslint-scope": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + } + } + }, + "eslint-plugin-jest": { + "version": "26.6.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-26.6.0.tgz", + "integrity": "sha512-f8n46/97ZFdU4KqeQYqO8AEVGIhHWvkpgNBWHH3jrM28/y8llnbf3IjfIKv6p2pZIMinK1PCqbbROxs9Eud02Q==", + "dev": true, + "requires": { + "@typescript-eslint/utils": "^5.10.0" + } + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^2.0.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + } + } + }, + "eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true + }, + "espree": { + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", + "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", + "dev": true, + "requires": { + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.3.0" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + } + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + } + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true + }, + "expect": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.3.tgz", + "integrity": "sha512-eEh0xn8HlsuOBxFgIss+2mX85VAS4Qy3OSkjV7rlBWljtA4oWH37glVGyOZSZvErDT/yBywZdPGwCXuTvSG85g==", + "dev": true, + "requires": { + "@jest/expect-utils": "^28.1.3", + "jest-get-type": "^28.0.2", + "jest-matcher-utils": "^28.1.3", + "jest-message-util": "^28.1.3", + "jest-util": "^28.1.3" + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-glob": { + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + } + } + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, + "fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "requires": { + "bser": "2.1.1" + } + }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", + "dev": true + }, + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "requires": { + "is-glob": "^4.0.3" + } + }, + "globals": { + "version": "13.17.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", + "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + } + }, + "graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "requires": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + } + }, + "html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true + }, + "ignore": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "dev": true + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "import-local": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "dev": true, + "requires": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "is-core-module": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", + "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "istanbul-lib-coverage": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "dev": true + }, + "istanbul-lib-instrument": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz", + "integrity": "sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A==", + "dev": true, + "requires": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + } + }, + "istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + } + }, + "istanbul-reports": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", + "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", + "dev": true, + "requires": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + } + }, + "jest": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest/-/jest-28.1.3.tgz", + "integrity": "sha512-N4GT5on8UkZgH0O5LUavMRV1EDEhNTL0KEfRmDIeZHSV7p2XgLoY9t9VDUgL6o+yfdgYHVxuz81G8oB9VG5uyA==", + "dev": true, + "requires": { + "@jest/core": "^28.1.3", + "@jest/types": "^28.1.3", + "import-local": "^3.0.2", + "jest-cli": "^28.1.3" + } + }, + "jest-changed-files": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-28.1.3.tgz", + "integrity": "sha512-esaOfUWJXk2nfZt9SPyC8gA1kNfdKLkQWyzsMlqq8msYSlNKfmZxfRgZn4Cd4MGVUF+7v6dBs0d5TOAKa7iIiA==", + "dev": true, + "requires": { + "execa": "^5.0.0", + "p-limit": "^3.1.0" + } + }, + "jest-circus": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-28.1.3.tgz", + "integrity": "sha512-cZ+eS5zc79MBwt+IhQhiEp0OeBddpc1n8MBo1nMB8A7oPMKEO+Sre+wHaLJexQUj9Ya/8NOBY0RESUgYjB6fow==", + "dev": true, + "requires": { + "@jest/environment": "^28.1.3", + "@jest/expect": "^28.1.3", + "@jest/test-result": "^28.1.3", + "@jest/types": "^28.1.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^0.7.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^28.1.3", + "jest-matcher-utils": "^28.1.3", + "jest-message-util": "^28.1.3", + "jest-runtime": "^28.1.3", + "jest-snapshot": "^28.1.3", + "jest-util": "^28.1.3", + "p-limit": "^3.1.0", + "pretty-format": "^28.1.3", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + } + }, + "jest-cli": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-28.1.3.tgz", + "integrity": "sha512-roY3kvrv57Azn1yPgdTebPAXvdR2xfezaKKYzVxZ6It/5NCxzJym6tUI5P1zkdWhfUYkxEI9uZWcQdaFLo8mJQ==", + "dev": true, + "requires": { + "@jest/core": "^28.1.3", + "@jest/test-result": "^28.1.3", + "@jest/types": "^28.1.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "import-local": "^3.0.2", + "jest-config": "^28.1.3", + "jest-util": "^28.1.3", + "jest-validate": "^28.1.3", + "prompts": "^2.0.1", + "yargs": "^17.3.1" + } + }, + "jest-config": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-28.1.3.tgz", + "integrity": "sha512-MG3INjByJ0J4AsNBm7T3hsuxKQqFIiRo/AUqb1q9LRKI5UU6Aar9JHbr9Ivn1TVwfUD9KirRoM/T6u8XlcQPHQ==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^28.1.3", + "@jest/types": "^28.1.3", + "babel-jest": "^28.1.3", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^28.1.3", + "jest-environment-node": "^28.1.3", + "jest-get-type": "^28.0.2", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.3", + "jest-runner": "^28.1.3", + "jest-util": "^28.1.3", + "jest-validate": "^28.1.3", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^28.1.3", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + } + }, + "jest-diff": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.3.tgz", + "integrity": "sha512-8RqP1B/OXzjjTWkqMX67iqgwBVJRgCyKD3L9nq+6ZqJMdvjE8RgHktqZ6jNrkdMT+dJuYNI3rhQpxaz7drJHfw==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^28.1.1", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.3" + } + }, + "jest-docblock": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.1.1.tgz", + "integrity": "sha512-3wayBVNiOYx0cwAbl9rwm5kKFP8yHH3d/fkEaL02NPTkDojPtheGB7HZSFY4wzX+DxyrvhXz0KSCVksmCknCuA==", + "dev": true, + "requires": { + "detect-newline": "^3.0.0" + } + }, + "jest-each": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-28.1.3.tgz", + "integrity": "sha512-arT1z4sg2yABU5uogObVPvSlSMQlDA48owx07BDPAiasW0yYpYHYOo4HHLz9q0BVzDVU4hILFjzJw0So9aCL/g==", + "dev": true, + "requires": { + "@jest/types": "^28.1.3", + "chalk": "^4.0.0", + "jest-get-type": "^28.0.2", + "jest-util": "^28.1.3", + "pretty-format": "^28.1.3" + } + }, + "jest-environment-node": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.1.3.tgz", + "integrity": "sha512-ugP6XOhEpjAEhGYvp5Xj989ns5cB1K6ZdjBYuS30umT4CQEETaxSiPcZ/E1kFktX4GkrcM4qu07IIlDYX1gp+A==", + "dev": true, + "requires": { + "@jest/environment": "^28.1.3", + "@jest/fake-timers": "^28.1.3", + "@jest/types": "^28.1.3", + "@types/node": "*", + "jest-mock": "^28.1.3", + "jest-util": "^28.1.3" + } + }, + "jest-get-type": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "dev": true + }, + "jest-haste-map": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.3.tgz", + "integrity": "sha512-3S+RQWDXccXDKSWnkHa/dPwt+2qwA8CJzR61w3FoYCvoo3Pn8tvGcysmMF0Bj0EX5RYvAI2EIvC57OmotfdtKA==", + "dev": true, + "requires": { + "@jest/types": "^28.1.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "fsevents": "^2.3.2", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^28.0.2", + "jest-util": "^28.1.3", + "jest-worker": "^28.1.3", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + } + }, + "jest-leak-detector": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.1.3.tgz", + "integrity": "sha512-WFVJhnQsiKtDEo5lG2mM0v40QWnBM+zMdHHyJs8AWZ7J0QZJS59MsyKeJHWhpBZBH32S48FOVvGyOFT1h0DlqA==", + "dev": true, + "requires": { + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.3" + } + }, + "jest-matcher-utils": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.3.tgz", + "integrity": "sha512-kQeJ7qHemKfbzKoGjHHrRKH6atgxMk8Enkk2iPQ3XwO6oE/KYD8lMYOziCkeSB9G4adPM4nR1DE8Tf5JeWH6Bw==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "jest-diff": "^28.1.3", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.3" + } + }, + "jest-message-util": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.3.tgz", + "integrity": "sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^28.1.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^28.1.3", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + } + }, + "jest-mock": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.3.tgz", + "integrity": "sha512-o3J2jr6dMMWYVH4Lh/NKmDXdosrsJgi4AviS8oXLujcjpCMBb1FMsblDnOXKZKfSiHLxYub1eS0IHuRXsio9eA==", + "dev": true, + "requires": { + "@jest/types": "^28.1.3", + "@types/node": "*" + } + }, + "jest-pnp-resolver": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", + "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "dev": true, + "requires": {} + }, + "jest-regex-util": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", + "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", + "dev": true + }, + "jest-resolve": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.1.3.tgz", + "integrity": "sha512-Z1W3tTjE6QaNI90qo/BJpfnvpxtaFTFw5CDgwpyE/Kz8U/06N1Hjf4ia9quUhCh39qIGWF1ZuxFiBiJQwSEYKQ==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.3", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^28.1.3", + "jest-validate": "^28.1.3", + "resolve": "^1.20.0", + "resolve.exports": "^1.1.0", + "slash": "^3.0.0" + } + }, + "jest-resolve-dependencies": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.3.tgz", + "integrity": "sha512-qa0QO2Q0XzQoNPouMbCc7Bvtsem8eQgVPNkwn9LnS+R2n8DaVDPL/U1gngC0LTl1RYXJU0uJa2BMC2DbTfFrHA==", + "dev": true, + "requires": { + "jest-regex-util": "^28.0.2", + "jest-snapshot": "^28.1.3" + } + }, + "jest-runner": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-28.1.3.tgz", + "integrity": "sha512-GkMw4D/0USd62OVO0oEgjn23TM+YJa2U2Wu5zz9xsQB1MxWKDOlrnykPxnMsN0tnJllfLPinHTka61u0QhaxBA==", + "dev": true, + "requires": { + "@jest/console": "^28.1.3", + "@jest/environment": "^28.1.3", + "@jest/test-result": "^28.1.3", + "@jest/transform": "^28.1.3", + "@jest/types": "^28.1.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.10.2", + "graceful-fs": "^4.2.9", + "jest-docblock": "^28.1.1", + "jest-environment-node": "^28.1.3", + "jest-haste-map": "^28.1.3", + "jest-leak-detector": "^28.1.3", + "jest-message-util": "^28.1.3", + "jest-resolve": "^28.1.3", + "jest-runtime": "^28.1.3", + "jest-util": "^28.1.3", + "jest-watcher": "^28.1.3", + "jest-worker": "^28.1.3", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + } + }, + "jest-runtime": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.1.3.tgz", + "integrity": "sha512-NU+881ScBQQLc1JHG5eJGU7Ui3kLKrmwCPPtYsJtBykixrM2OhVQlpMmFWJjMyDfdkGgBMNjXCGB/ebzsgNGQw==", + "dev": true, + "requires": { + "@jest/environment": "^28.1.3", + "@jest/fake-timers": "^28.1.3", + "@jest/globals": "^28.1.3", + "@jest/source-map": "^28.1.2", + "@jest/test-result": "^28.1.3", + "@jest/transform": "^28.1.3", + "@jest/types": "^28.1.3", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "execa": "^5.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.3", + "jest-message-util": "^28.1.3", + "jest-mock": "^28.1.3", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.3", + "jest-snapshot": "^28.1.3", + "jest-util": "^28.1.3", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + } + }, + "jest-snapshot": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.3.tgz", + "integrity": "sha512-4lzMgtiNlc3DU/8lZfmqxN3AYD6GGLbl+72rdBpXvcV+whX7mDrREzkPdp2RnmfIiWBg1YbuFSkXduF2JcafJg==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^28.1.3", + "@jest/transform": "^28.1.3", + "@jest/types": "^28.1.3", + "@types/babel__traverse": "^7.0.6", + "@types/prettier": "^2.1.5", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^28.1.3", + "graceful-fs": "^4.2.9", + "jest-diff": "^28.1.3", + "jest-get-type": "^28.0.2", + "jest-haste-map": "^28.1.3", + "jest-matcher-utils": "^28.1.3", + "jest-message-util": "^28.1.3", + "jest-util": "^28.1.3", + "natural-compare": "^1.4.0", + "pretty-format": "^28.1.3", + "semver": "^7.3.5" + } + }, + "jest-util": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.3.tgz", + "integrity": "sha512-XdqfpHwpcSRko/C35uLYFM2emRAltIIKZiJ9eAmhjsj0CqZMa0p1ib0R5fWIqGhn1a103DebTbpqIaP1qCQ6tQ==", + "dev": true, + "requires": { + "@jest/types": "^28.1.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, + "jest-validate": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-28.1.3.tgz", + "integrity": "sha512-SZbOGBWEsaTxBGCOpsRWlXlvNkvTkY0XxRfh7zYmvd8uL5Qzyg0CHAXiXKROflh801quA6+/DsT4ODDthOC/OA==", + "dev": true, + "requires": { + "@jest/types": "^28.1.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^28.0.2", + "leven": "^3.1.0", + "pretty-format": "^28.1.3" + }, + "dependencies": { + "camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true + } + } + }, + "jest-watcher": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.1.3.tgz", + "integrity": "sha512-t4qcqj9hze+jviFPUN3YAtAEeFnr/azITXQEMARf5cMwKY2SMBRnCQTXLixTl20OR6mLh9KLMrgVJgJISym+1g==", + "dev": true, + "requires": { + "@jest/test-result": "^28.1.3", + "@jest/types": "^28.1.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.10.2", + "jest-util": "^28.1.3", + "string-length": "^4.0.1" + } + }, + "jest-worker": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.3.tgz", + "integrity": "sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "dependencies": { + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "json5": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", + "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "dev": true + }, + "kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true + }, + "leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true + }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "requires": { + "tmpl": "1.0.5" + } + }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true + }, + "node-releases": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", + "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", + "dev": true + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + }, + "dependencies": { + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + } + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, + "pirates": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", + "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", + "dev": true + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, + "prettier": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "dev": true + }, + "pretty-format": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz", + "integrity": "sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==", + "dev": true, + "requires": { + "@jest/schemas": "^28.1.3", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "requires": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true + }, + "resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "requires": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "requires": { + "resolve-from": "^5.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + } + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "resolve.exports": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz", + "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", + "dev": true + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "stack-utils": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", + "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", + "dev": true, + "requires": { + "escape-string-regexp": "^2.0.0" + }, + "dependencies": { + "escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true + } + } + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "requires": { + "safe-buffer": "~5.2.0" + } + }, + "string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "requires": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + } + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "supports-hyperlinks": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", + "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", + "dev": true, + "requires": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, + "terminal-link": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", + "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "supports-hyperlinks": "^2.0.0" + } + }, + "test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "requires": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "ts-jest": { + "version": "28.0.7", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-28.0.7.tgz", + "integrity": "sha512-wWXCSmTwBVmdvWrOpYhal79bDpioDy4rTT+0vyUnE3ZzM7LOAAGG9NXwzkEL/a516rQEgnMmS/WKP9jBPCVJyA==", + "dev": true, + "requires": { + "bs-logger": "0.x", + "fast-json-stable-stringify": "2.x", + "jest-util": "^28.0.0", + "json5": "^2.2.1", + "lodash.memoize": "4.x", + "make-error": "1.x", + "semver": "7.x", + "yargs-parser": "^21.0.1" + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + }, + "typescript": { + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", + "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", + "dev": true + }, + "update-browserslist-db": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz", + "integrity": "sha512-/xsqn21EGVdXI3EXSum1Yckj3ZVZugqyOZQ/CxYPBD/R+ko9NSUScf8tFF4dOKY+2pvSSJA/S+5B8s4Zr4kyvg==", + "dev": true, + "requires": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + } + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, + "v8-to-istanbul": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", + "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0" + } + }, + "walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "requires": { + "makeerror": "1.0.12" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + } + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "yargs": { + "version": "17.5.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", + "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", + "dev": true, + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.0.0" + } + }, + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true + } + } +} diff --git a/package.json b/package.json index 175c783..c4b7313 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "@types/bs58check": "2.1.0", "@types/create-hash": "1.2.2", "@types/jest": "28.1.6", - "@types/node": "18.7.22", + "@types/node": "^18.7.22", "@typescript-eslint/eslint-plugin": "5.30.7", "@typescript-eslint/parser": "5.30.7", "eslint": "8.20.0", diff --git a/src/pbaas/Principal.ts b/src/pbaas/Principal.ts new file mode 100644 index 0000000..9213a76 --- /dev/null +++ b/src/pbaas/Principal.ts @@ -0,0 +1,74 @@ +import varuint from '../utils/varuint' +import bufferutils from '../utils/bufferutils' +import { BigNumber } from '../utils/types/BigNumber'; +import { TxDestination } from './TxDestination'; +import { fromBase58Check, toBase58Check } from '../utils/address'; +import { R_ADDR_VERSION } from '../constants/vdxf'; +import { BN } from 'bn.js'; + +export const VERSION_INVALID = new BN(0, 10) +export const VERSION_CURRENT = new BN(1, 10) + +const { BufferReader, BufferWriter } = bufferutils + +export class Principal { + flags: BigNumber; + version: BigNumber; + min_sigs: BigNumber; + primary_addresses: TxDestination; + + constructor (data?: { + version?: BigNumber, + flags?: BigNumber, + min_sigs?: BigNumber, + primary_addresses?: TxDestination + }) { + + this.flags = VERSION_INVALID; + this.version = VERSION_INVALID; + + if (data != null) { + if (data.flags != null) this.flags = data.flags + if (data.version != null) this.version = data.version + if (data.min_sigs != null) this.min_sigs = data.min_sigs + if (data.primary_addresses != null) this.primary_addresses = data.primary_addresses + + } + } + + dataByteLength() { + let byteLength = 0; + + byteLength += 4; //uint32 version size + byteLength += 4; //uint32 flags size + + byteLength += this.primary_addresses.getByteLength(); + byteLength += 4; //uint32 minimum signatures size + + return byteLength + } + + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())) + + bufferWriter.writeUInt32(this.version.toNumber()) + bufferWriter.writeUInt32(this.flags.toNumber()) + bufferWriter.writeSlice(this.primary_addresses.toBuffer()); + bufferWriter.writeUInt32(this.min_sigs.toNumber()) + + return bufferWriter.buffer + } + + fromBuffer(buffer, offset: number = 0) { + const reader = new BufferReader(buffer, offset); + + this.flags = new BN(reader.readUInt32(), 10); + this.version = new BN(reader.readUInt32(), 10); + + reader.offset = this.primary_addresses.fromBuffer(reader.buffer, reader.offset); + + this.min_sigs = new BN(reader.readUInt32(), 10); + + return reader.offset; + } +} \ No newline at end of file diff --git a/src/pbaas/TxDestination.ts b/src/pbaas/TxDestination.ts new file mode 100644 index 0000000..cb0dc87 --- /dev/null +++ b/src/pbaas/TxDestination.ts @@ -0,0 +1,85 @@ +import varuint from '../utils/varuint' +import bufferutils from '../utils/bufferutils' +import { fromBase58Check, toBase58Check } from '../utils/address'; +import { R_ADDR_VERSION } from '../constants/vdxf'; +import { BN } from 'bn.js'; + +const { BufferReader, BufferWriter } = bufferutils + +export class TxDestination { + primary_addresses: Array; + + constructor(data: { primary_addresses?: Array } = {}) { + + for (const tempAddr of data.primary_addresses) { + + let tempDecoded; + try { + let tempRaddress = fromBase58Check(tempAddr) + tempDecoded = tempRaddress.hash + if (tempDecoded.length != 20 || tempRaddress.version != R_ADDR_VERSION) + throw new Error("Incorrect hex length of pub key") + } catch (e) { + tempDecoded = Buffer.from(tempAddr, 'hex') + if (tempDecoded.length != 33) + throw new Error("Incorrect hex length of pub key") + } + this.primary_addresses.push(tempDecoded) + } + } + + getNumValues() { + return new BN(this.primary_addresses.length, 10) + } + + getAddressString() { + let retval = []; + + for (const addr of this.primary_addresses) + + if (addr.length == 20) { + retval.push(toBase58Check(addr, R_ADDR_VERSION)); + } + else if (addr.length == 33) { + retval.push(addr.toString('hex')); + } + else { + retval.push(""); + } + } + + getByteLength() { + let byteLength = 0; + + byteLength += varuint.encodingLength(this.primary_addresses.length); + + for (const txDest of this.primary_addresses) { + byteLength += varuint.encodingLength(txDest.length); + byteLength += txDest.length; + } + + return byteLength + } + + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) + + bufferWriter.writeVarInt(new BN(this.primary_addresses.length)) + bufferWriter.writeVector(this.primary_addresses); + + return bufferWriter.buffer + } + + fromBuffer(buffer, offset: number = 0) { + const reader = new BufferReader(buffer, offset); + let count: number; + + count = reader.readVarInt().toNumber(); + + for (let i = 0; i < count; i++) { + this.primary_addresses[i] = reader.readVarSlice(); + } + + return reader.offset; + } +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 996937b..bb96ea0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3,29 +3,29 @@ "@ampproject/remapping@^2.1.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d" - integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w== + "integrity" "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==" + "resolved" "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz" + "version" "2.2.0" dependencies: "@jridgewell/gen-mapping" "^0.1.0" "@jridgewell/trace-mapping" "^0.3.9" "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" - integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== + "integrity" "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==" + "resolved" "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz" + "version" "7.18.6" dependencies: "@babel/highlight" "^7.18.6" "@babel/compat-data@^7.19.3": - version "7.19.3" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.19.3.tgz#707b939793f867f5a73b2666e6d9a3396eb03151" - integrity sha512-prBHMK4JYYK+wDjJF1q99KK4JLL+egWS4nmNqdlMUgCExMZ+iZW0hGhyC3VEbsPjvaN0TBhW//VIFwBrk8sEiw== + "integrity" "sha512-prBHMK4JYYK+wDjJF1q99KK4JLL+egWS4nmNqdlMUgCExMZ+iZW0hGhyC3VEbsPjvaN0TBhW//VIFwBrk8sEiw==" + "resolved" "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.3.tgz" + "version" "7.19.3" -"@babel/core@^7.11.6", "@babel/core@^7.12.3": - version "7.19.3" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.19.3.tgz#2519f62a51458f43b682d61583c3810e7dcee64c" - integrity sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ== +"@babel/core@^7.0.0", "@babel/core@^7.0.0-0", "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.8.0", "@babel/core@>=7.0.0-beta.0 <8": + "integrity" "sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==" + "resolved" "https://registry.npmjs.org/@babel/core/-/core-7.19.3.tgz" + "version" "7.19.3" dependencies: "@ampproject/remapping" "^2.1.0" "@babel/code-frame" "^7.18.6" @@ -37,62 +37,62 @@ "@babel/template" "^7.18.10" "@babel/traverse" "^7.19.3" "@babel/types" "^7.19.3" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.1" - semver "^6.3.0" + "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.19.3", "@babel/generator@^7.7.2": - version "7.19.3" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.19.3.tgz#d7f4d1300485b4547cb6f94b27d10d237b42bf59" - integrity sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ== + "integrity" "sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==" + "resolved" "https://registry.npmjs.org/@babel/generator/-/generator-7.19.3.tgz" + "version" "7.19.3" dependencies: "@babel/types" "^7.19.3" "@jridgewell/gen-mapping" "^0.3.2" - jsesc "^2.5.1" + "jsesc" "^2.5.1" "@babel/helper-compilation-targets@^7.19.3": - version "7.19.3" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz#a10a04588125675d7c7ae299af86fa1b2ee038ca" - integrity sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg== + "integrity" "sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==" + "resolved" "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz" + "version" "7.19.3" dependencies: "@babel/compat-data" "^7.19.3" "@babel/helper-validator-option" "^7.18.6" - browserslist "^4.21.3" - semver "^6.3.0" + "browserslist" "^4.21.3" + "semver" "^6.3.0" "@babel/helper-environment-visitor@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be" - integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== + "integrity" "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==" + "resolved" "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz" + "version" "7.18.9" "@babel/helper-function-name@^7.19.0": - version "7.19.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz#941574ed5390682e872e52d3f38ce9d1bef4648c" - integrity sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w== + "integrity" "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==" + "resolved" "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz" + "version" "7.19.0" dependencies: "@babel/template" "^7.18.10" "@babel/types" "^7.19.0" "@babel/helper-hoist-variables@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" - integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== + "integrity" "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==" + "resolved" "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz" + "version" "7.18.6" dependencies: "@babel/types" "^7.18.6" "@babel/helper-module-imports@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e" - integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== + "integrity" "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==" + "resolved" "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz" + "version" "7.18.6" dependencies: "@babel/types" "^7.18.6" "@babel/helper-module-transforms@^7.19.0": - version "7.19.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz#309b230f04e22c58c6a2c0c0c7e50b216d350c30" - integrity sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ== + "integrity" "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==" + "resolved" "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz" + "version" "7.19.0" dependencies: "@babel/helper-environment-visitor" "^7.18.9" "@babel/helper-module-imports" "^7.18.6" @@ -104,166 +104,166 @@ "@babel/types" "^7.19.0" "@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.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.8.0": - version "7.19.0" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz#4796bb14961521f0f8715990bee2fb6e51ce21bf" - integrity sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw== + "integrity" "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==" + "resolved" "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz" + "version" "7.19.0" "@babel/helper-simple-access@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz#d6d8f51f4ac2978068df934b569f08f29788c7ea" - integrity sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g== + "integrity" "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==" + "resolved" "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz" + "version" "7.18.6" dependencies: "@babel/types" "^7.18.6" "@babel/helper-split-export-declaration@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" - integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== + "integrity" "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==" + "resolved" "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz" + "version" "7.18.6" dependencies: "@babel/types" "^7.18.6" "@babel/helper-string-parser@^7.18.10": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz#181f22d28ebe1b3857fa575f5c290b1aaf659b56" - integrity sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw== + "integrity" "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==" + "resolved" "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz" + "version" "7.18.10" "@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": - version "7.19.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" - integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== + "integrity" "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==" + "resolved" "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz" + "version" "7.19.1" "@babel/helper-validator-option@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" - integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== + "integrity" "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==" + "resolved" "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz" + "version" "7.18.6" "@babel/helpers@^7.19.0": - version "7.19.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.19.0.tgz#f30534657faf246ae96551d88dd31e9d1fa1fc18" - integrity sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg== + "integrity" "sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==" + "resolved" "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.0.tgz" + "version" "7.19.0" dependencies: "@babel/template" "^7.18.10" "@babel/traverse" "^7.19.0" "@babel/types" "^7.19.0" "@babel/highlight@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" - integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== + "integrity" "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==" + "resolved" "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz" + "version" "7.18.6" dependencies: "@babel/helper-validator-identifier" "^7.18.6" - chalk "^2.0.0" - js-tokens "^4.0.0" + "chalk" "^2.0.0" + "js-tokens" "^4.0.0" "@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.18.10", "@babel/parser@^7.19.3": - version "7.19.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.19.3.tgz#8dd36d17c53ff347f9e55c328710321b49479a9a" - integrity sha512-pJ9xOlNWHiy9+FuFP09DEAFbAn4JskgRsVcc169w2xRBC3FRGuQEwjeIMMND9L2zc0iEhO/tGv4Zq+km+hxNpQ== + "integrity" "sha512-pJ9xOlNWHiy9+FuFP09DEAFbAn4JskgRsVcc169w2xRBC3FRGuQEwjeIMMND9L2zc0iEhO/tGv4Zq+km+hxNpQ==" + "resolved" "https://registry.npmjs.org/@babel/parser/-/parser-7.19.3.tgz" + "version" "7.19.3" "@babel/plugin-syntax-async-generators@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" - integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== + "integrity" "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==" + "resolved" "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz" + "version" "7.8.4" dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-bigint@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea" - integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== + "integrity" "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==" + "resolved" "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz" + "version" "7.8.3" dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-class-properties@^7.8.3": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" - integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== + "integrity" "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==" + "resolved" "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz" + "version" "7.12.13" dependencies: "@babel/helper-plugin-utils" "^7.12.13" "@babel/plugin-syntax-import-meta@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" - integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== + "integrity" "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==" + "resolved" "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz" + "version" "7.10.4" dependencies: "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-json-strings@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" - integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== + "integrity" "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==" + "resolved" "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz" + "version" "7.8.3" dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" - integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== + "integrity" "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==" + "resolved" "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz" + "version" "7.10.4" dependencies: "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" - integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== + "integrity" "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==" + "resolved" "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz" + "version" "7.8.3" dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-numeric-separator@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" - integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== + "integrity" "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==" + "resolved" "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz" + "version" "7.10.4" dependencies: "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-object-rest-spread@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" - integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== + "integrity" "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==" + "resolved" "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz" + "version" "7.8.3" dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-optional-catch-binding@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" - integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== + "integrity" "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==" + "resolved" "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz" + "version" "7.8.3" dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-optional-chaining@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" - integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== + "integrity" "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==" + "resolved" "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz" + "version" "7.8.3" dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-top-level-await@^7.8.3": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" - integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== + "integrity" "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==" + "resolved" "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz" + "version" "7.14.5" dependencies: "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-typescript@^7.7.2": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz#1c09cd25795c7c2b8a4ba9ae49394576d4133285" - integrity sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA== + "integrity" "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==" + "resolved" "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz" + "version" "7.18.6" dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/template@^7.18.10", "@babel/template@^7.3.3": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71" - integrity sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA== + "integrity" "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==" + "resolved" "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz" + "version" "7.18.10" dependencies: "@babel/code-frame" "^7.18.6" "@babel/parser" "^7.18.10" "@babel/types" "^7.18.10" "@babel/traverse@^7.19.0", "@babel/traverse@^7.19.3", "@babel/traverse@^7.7.2": - version "7.19.3" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.19.3.tgz#3a3c5348d4988ba60884e8494b0592b2f15a04b4" - integrity sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ== + "integrity" "sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==" + "resolved" "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.3.tgz" + "version" "7.19.3" dependencies: "@babel/code-frame" "^7.18.6" "@babel/generator" "^7.19.3" @@ -273,84 +273,84 @@ "@babel/helper-split-export-declaration" "^7.18.6" "@babel/parser" "^7.19.3" "@babel/types" "^7.19.3" - debug "^4.1.0" - globals "^11.1.0" + "debug" "^4.1.0" + "globals" "^11.1.0" "@babel/types@^7.0.0", "@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.19.0", "@babel/types@^7.19.3", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.19.3" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.19.3.tgz#fc420e6bbe54880bce6779ffaf315f5e43ec9624" - integrity sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw== + "integrity" "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==" + "resolved" "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz" + "version" "7.19.3" dependencies: "@babel/helper-string-parser" "^7.18.10" "@babel/helper-validator-identifier" "^7.19.1" - to-fast-properties "^2.0.0" + "to-fast-properties" "^2.0.0" "@bcoe/v8-coverage@^0.2.3": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" - integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== + "integrity" "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==" + "resolved" "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz" + "version" "0.2.3" "@eslint/eslintrc@^1.3.0": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.2.tgz#58b69582f3b7271d8fa67fe5251767a5b38ea356" - integrity sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ== - dependencies: - ajv "^6.12.4" - debug "^4.3.2" - espree "^9.4.0" - globals "^13.15.0" - ignore "^5.2.0" - import-fresh "^3.2.1" - js-yaml "^4.1.0" - minimatch "^3.1.2" - strip-json-comments "^3.1.1" + "integrity" "sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ==" + "resolved" "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.2.tgz" + "version" "1.3.2" + dependencies: + "ajv" "^6.12.4" + "debug" "^4.3.2" + "espree" "^9.4.0" + "globals" "^13.15.0" + "ignore" "^5.2.0" + "import-fresh" "^3.2.1" + "js-yaml" "^4.1.0" + "minimatch" "^3.1.2" + "strip-json-comments" "^3.1.1" "@humanwhocodes/config-array@^0.9.2": - version "0.9.5" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.9.5.tgz#2cbaf9a89460da24b5ca6531b8bbfc23e1df50c7" - integrity sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw== + "integrity" "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==" + "resolved" "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz" + "version" "0.9.5" dependencies: "@humanwhocodes/object-schema" "^1.2.1" - debug "^4.1.1" - minimatch "^3.0.4" + "debug" "^4.1.1" + "minimatch" "^3.0.4" "@humanwhocodes/object-schema@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" - integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== + "integrity" "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==" + "resolved" "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz" + "version" "1.2.1" "@istanbuljs/load-nyc-config@^1.0.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" - integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== + "integrity" "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==" + "resolved" "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz" + "version" "1.1.0" dependencies: - camelcase "^5.3.1" - find-up "^4.1.0" - get-package-type "^0.1.0" - js-yaml "^3.13.1" - resolve-from "^5.0.0" + "camelcase" "^5.3.1" + "find-up" "^4.1.0" + "get-package-type" "^0.1.0" + "js-yaml" "^3.13.1" + "resolve-from" "^5.0.0" "@istanbuljs/schema@^0.1.2": - version "0.1.3" - resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" - integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== + "integrity" "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==" + "resolved" "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz" + "version" "0.1.3" "@jest/console@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-28.1.3.tgz#2030606ec03a18c31803b8a36382762e447655df" - integrity sha512-QPAkP5EwKdK/bxIr6C1I4Vs0rm2nHiANzj/Z5X2JQkrZo6IqvC4ldZ9K95tF0HdidhA8Bo6egxSzUFPYKcEXLw== + "integrity" "sha512-QPAkP5EwKdK/bxIr6C1I4Vs0rm2nHiANzj/Z5X2JQkrZo6IqvC4ldZ9K95tF0HdidhA8Bo6egxSzUFPYKcEXLw==" + "resolved" "https://registry.npmjs.org/@jest/console/-/console-28.1.3.tgz" + "version" "28.1.3" dependencies: "@jest/types" "^28.1.3" "@types/node" "*" - chalk "^4.0.0" - jest-message-util "^28.1.3" - jest-util "^28.1.3" - slash "^3.0.0" + "chalk" "^4.0.0" + "jest-message-util" "^28.1.3" + "jest-util" "^28.1.3" + "slash" "^3.0.0" "@jest/core@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-28.1.3.tgz#0ebf2bd39840f1233cd5f2d1e6fc8b71bd5a1ac7" - integrity sha512-CIKBrlaKOzA7YG19BEqCw3SLIsEwjZkeJzf5bdooVnW4bH5cktqe3JX+G2YV1aK5vP8N9na1IGWFzYaTp6k6NA== + "integrity" "sha512-CIKBrlaKOzA7YG19BEqCw3SLIsEwjZkeJzf5bdooVnW4bH5cktqe3JX+G2YV1aK5vP8N9na1IGWFzYaTp6k6NA==" + "resolved" "https://registry.npmjs.org/@jest/core/-/core-28.1.3.tgz" + "version" "28.1.3" dependencies: "@jest/console" "^28.1.3" "@jest/reporters" "^28.1.3" @@ -358,80 +358,80 @@ "@jest/transform" "^28.1.3" "@jest/types" "^28.1.3" "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - ci-info "^3.2.0" - exit "^0.1.2" - graceful-fs "^4.2.9" - jest-changed-files "^28.1.3" - jest-config "^28.1.3" - jest-haste-map "^28.1.3" - jest-message-util "^28.1.3" - jest-regex-util "^28.0.2" - jest-resolve "^28.1.3" - jest-resolve-dependencies "^28.1.3" - jest-runner "^28.1.3" - jest-runtime "^28.1.3" - jest-snapshot "^28.1.3" - jest-util "^28.1.3" - jest-validate "^28.1.3" - jest-watcher "^28.1.3" - micromatch "^4.0.4" - pretty-format "^28.1.3" - rimraf "^3.0.0" - slash "^3.0.0" - strip-ansi "^6.0.0" + "ansi-escapes" "^4.2.1" + "chalk" "^4.0.0" + "ci-info" "^3.2.0" + "exit" "^0.1.2" + "graceful-fs" "^4.2.9" + "jest-changed-files" "^28.1.3" + "jest-config" "^28.1.3" + "jest-haste-map" "^28.1.3" + "jest-message-util" "^28.1.3" + "jest-regex-util" "^28.0.2" + "jest-resolve" "^28.1.3" + "jest-resolve-dependencies" "^28.1.3" + "jest-runner" "^28.1.3" + "jest-runtime" "^28.1.3" + "jest-snapshot" "^28.1.3" + "jest-util" "^28.1.3" + "jest-validate" "^28.1.3" + "jest-watcher" "^28.1.3" + "micromatch" "^4.0.4" + "pretty-format" "^28.1.3" + "rimraf" "^3.0.0" + "slash" "^3.0.0" + "strip-ansi" "^6.0.0" "@jest/environment@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-28.1.3.tgz#abed43a6b040a4c24fdcb69eab1f97589b2d663e" - integrity sha512-1bf40cMFTEkKyEf585R9Iz1WayDjHoHqvts0XFYEqyKM3cFWDpeMoqKKTAF9LSYQModPUlh8FKptoM2YcMWAXA== + "integrity" "sha512-1bf40cMFTEkKyEf585R9Iz1WayDjHoHqvts0XFYEqyKM3cFWDpeMoqKKTAF9LSYQModPUlh8FKptoM2YcMWAXA==" + "resolved" "https://registry.npmjs.org/@jest/environment/-/environment-28.1.3.tgz" + "version" "28.1.3" dependencies: "@jest/fake-timers" "^28.1.3" "@jest/types" "^28.1.3" "@types/node" "*" - jest-mock "^28.1.3" + "jest-mock" "^28.1.3" "@jest/expect-utils@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-28.1.3.tgz#58561ce5db7cd253a7edddbc051fb39dda50f525" - integrity sha512-wvbi9LUrHJLn3NlDW6wF2hvIMtd4JUl2QNVrjq+IBSHirgfrR3o9RnVtxzdEGO2n9JyIWwHnLfby5KzqBGg2YA== + "integrity" "sha512-wvbi9LUrHJLn3NlDW6wF2hvIMtd4JUl2QNVrjq+IBSHirgfrR3o9RnVtxzdEGO2n9JyIWwHnLfby5KzqBGg2YA==" + "resolved" "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.1.3.tgz" + "version" "28.1.3" dependencies: - jest-get-type "^28.0.2" + "jest-get-type" "^28.0.2" "@jest/expect@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-28.1.3.tgz#9ac57e1d4491baca550f6bdbd232487177ad6a72" - integrity sha512-lzc8CpUbSoE4dqT0U+g1qODQjBRHPpCPXissXD4mS9+sWQdmmpeJ9zSH1rS1HEkrsMN0fb7nKrJ9giAR1d3wBw== + "integrity" "sha512-lzc8CpUbSoE4dqT0U+g1qODQjBRHPpCPXissXD4mS9+sWQdmmpeJ9zSH1rS1HEkrsMN0fb7nKrJ9giAR1d3wBw==" + "resolved" "https://registry.npmjs.org/@jest/expect/-/expect-28.1.3.tgz" + "version" "28.1.3" dependencies: - expect "^28.1.3" - jest-snapshot "^28.1.3" + "expect" "^28.1.3" + "jest-snapshot" "^28.1.3" "@jest/fake-timers@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-28.1.3.tgz#230255b3ad0a3d4978f1d06f70685baea91c640e" - integrity sha512-D/wOkL2POHv52h+ok5Oj/1gOG9HSywdoPtFsRCUmlCILXNn5eIWmcnd3DIiWlJnpGvQtmajqBP95Ei0EimxfLw== + "integrity" "sha512-D/wOkL2POHv52h+ok5Oj/1gOG9HSywdoPtFsRCUmlCILXNn5eIWmcnd3DIiWlJnpGvQtmajqBP95Ei0EimxfLw==" + "resolved" "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.1.3.tgz" + "version" "28.1.3" dependencies: "@jest/types" "^28.1.3" "@sinonjs/fake-timers" "^9.1.2" "@types/node" "*" - jest-message-util "^28.1.3" - jest-mock "^28.1.3" - jest-util "^28.1.3" + "jest-message-util" "^28.1.3" + "jest-mock" "^28.1.3" + "jest-util" "^28.1.3" "@jest/globals@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-28.1.3.tgz#a601d78ddc5fdef542728309894895b4a42dc333" - integrity sha512-XFU4P4phyryCXu1pbcqMO0GSQcYe1IsalYCDzRNyhetyeyxMcIxa11qPNDpVNLeretItNqEmYYQn1UYz/5x1NA== + "integrity" "sha512-XFU4P4phyryCXu1pbcqMO0GSQcYe1IsalYCDzRNyhetyeyxMcIxa11qPNDpVNLeretItNqEmYYQn1UYz/5x1NA==" + "resolved" "https://registry.npmjs.org/@jest/globals/-/globals-28.1.3.tgz" + "version" "28.1.3" dependencies: "@jest/environment" "^28.1.3" "@jest/expect" "^28.1.3" "@jest/types" "^28.1.3" "@jest/reporters@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-28.1.3.tgz#9adf6d265edafc5fc4a434cfb31e2df5a67a369a" - integrity sha512-JuAy7wkxQZVNU/V6g9xKzCGC5LVXx9FDcABKsSXp5MiKPEE2144a/vXTEDoyzjUpZKfVwp08Wqg5A4WfTMAzjg== + "integrity" "sha512-JuAy7wkxQZVNU/V6g9xKzCGC5LVXx9FDcABKsSXp5MiKPEE2144a/vXTEDoyzjUpZKfVwp08Wqg5A4WfTMAzjg==" + "resolved" "https://registry.npmjs.org/@jest/reporters/-/reporters-28.1.3.tgz" + "version" "28.1.3" dependencies: "@bcoe/v8-coverage" "^0.2.3" "@jest/console" "^28.1.3" @@ -440,178 +440,183 @@ "@jest/types" "^28.1.3" "@jridgewell/trace-mapping" "^0.3.13" "@types/node" "*" - chalk "^4.0.0" - collect-v8-coverage "^1.0.0" - exit "^0.1.2" - glob "^7.1.3" - graceful-fs "^4.2.9" - istanbul-lib-coverage "^3.0.0" - istanbul-lib-instrument "^5.1.0" - istanbul-lib-report "^3.0.0" - istanbul-lib-source-maps "^4.0.0" - istanbul-reports "^3.1.3" - jest-message-util "^28.1.3" - jest-util "^28.1.3" - jest-worker "^28.1.3" - slash "^3.0.0" - string-length "^4.0.1" - strip-ansi "^6.0.0" - terminal-link "^2.0.0" - v8-to-istanbul "^9.0.1" + "chalk" "^4.0.0" + "collect-v8-coverage" "^1.0.0" + "exit" "^0.1.2" + "glob" "^7.1.3" + "graceful-fs" "^4.2.9" + "istanbul-lib-coverage" "^3.0.0" + "istanbul-lib-instrument" "^5.1.0" + "istanbul-lib-report" "^3.0.0" + "istanbul-lib-source-maps" "^4.0.0" + "istanbul-reports" "^3.1.3" + "jest-message-util" "^28.1.3" + "jest-util" "^28.1.3" + "jest-worker" "^28.1.3" + "slash" "^3.0.0" + "string-length" "^4.0.1" + "strip-ansi" "^6.0.0" + "terminal-link" "^2.0.0" + "v8-to-istanbul" "^9.0.1" "@jest/schemas@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-28.1.3.tgz#ad8b86a66f11f33619e3d7e1dcddd7f2d40ff905" - integrity sha512-/l/VWsdt/aBXgjshLWOFyFt3IVdYypu5y2Wn2rOO1un6nkqIn8SLXzgIMYXFyYsRWDyF5EthmKJMIdJvk08grg== + "integrity" "sha512-/l/VWsdt/aBXgjshLWOFyFt3IVdYypu5y2Wn2rOO1un6nkqIn8SLXzgIMYXFyYsRWDyF5EthmKJMIdJvk08grg==" + "resolved" "https://registry.npmjs.org/@jest/schemas/-/schemas-28.1.3.tgz" + "version" "28.1.3" dependencies: "@sinclair/typebox" "^0.24.1" "@jest/source-map@^28.1.2": - version "28.1.2" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-28.1.2.tgz#7fe832b172b497d6663cdff6c13b0a920e139e24" - integrity sha512-cV8Lx3BeStJb8ipPHnqVw/IM2VCMWO3crWZzYodSIkxXnRcXJipCdx1JCK0K5MsJJouZQTH73mzf4vgxRaH9ww== + "integrity" "sha512-cV8Lx3BeStJb8ipPHnqVw/IM2VCMWO3crWZzYodSIkxXnRcXJipCdx1JCK0K5MsJJouZQTH73mzf4vgxRaH9ww==" + "resolved" "https://registry.npmjs.org/@jest/source-map/-/source-map-28.1.2.tgz" + "version" "28.1.2" dependencies: "@jridgewell/trace-mapping" "^0.3.13" - callsites "^3.0.0" - graceful-fs "^4.2.9" + "callsites" "^3.0.0" + "graceful-fs" "^4.2.9" "@jest/test-result@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-28.1.3.tgz#5eae945fd9f4b8fcfce74d239e6f725b6bf076c5" - integrity sha512-kZAkxnSE+FqE8YjW8gNuoVkkC9I7S1qmenl8sGcDOLropASP+BkcGKwhXoyqQuGOGeYY0y/ixjrd/iERpEXHNg== + "integrity" "sha512-kZAkxnSE+FqE8YjW8gNuoVkkC9I7S1qmenl8sGcDOLropASP+BkcGKwhXoyqQuGOGeYY0y/ixjrd/iERpEXHNg==" + "resolved" "https://registry.npmjs.org/@jest/test-result/-/test-result-28.1.3.tgz" + "version" "28.1.3" dependencies: "@jest/console" "^28.1.3" "@jest/types" "^28.1.3" "@types/istanbul-lib-coverage" "^2.0.0" - collect-v8-coverage "^1.0.0" + "collect-v8-coverage" "^1.0.0" "@jest/test-sequencer@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-28.1.3.tgz#9d0c283d906ac599c74bde464bc0d7e6a82886c3" - integrity sha512-NIMPEqqa59MWnDi1kvXXpYbqsfQmSJsIbnd85mdVGkiDfQ9WQQTXOLsvISUfonmnBT+w85WEgneCigEEdHDFxw== + "integrity" "sha512-NIMPEqqa59MWnDi1kvXXpYbqsfQmSJsIbnd85mdVGkiDfQ9WQQTXOLsvISUfonmnBT+w85WEgneCigEEdHDFxw==" + "resolved" "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.1.3.tgz" + "version" "28.1.3" dependencies: "@jest/test-result" "^28.1.3" - graceful-fs "^4.2.9" - jest-haste-map "^28.1.3" - slash "^3.0.0" + "graceful-fs" "^4.2.9" + "jest-haste-map" "^28.1.3" + "slash" "^3.0.0" "@jest/transform@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-28.1.3.tgz#59d8098e50ab07950e0f2fc0fc7ec462371281b0" - integrity sha512-u5dT5di+oFI6hfcLOHGTAfmUxFRrjK+vnaP0kkVow9Md/M7V/MxqQMOz/VV25UZO8pzeA9PjfTpOu6BDuwSPQA== + "integrity" "sha512-u5dT5di+oFI6hfcLOHGTAfmUxFRrjK+vnaP0kkVow9Md/M7V/MxqQMOz/VV25UZO8pzeA9PjfTpOu6BDuwSPQA==" + "resolved" "https://registry.npmjs.org/@jest/transform/-/transform-28.1.3.tgz" + "version" "28.1.3" dependencies: "@babel/core" "^7.11.6" "@jest/types" "^28.1.3" "@jridgewell/trace-mapping" "^0.3.13" - babel-plugin-istanbul "^6.1.1" - chalk "^4.0.0" - convert-source-map "^1.4.0" - fast-json-stable-stringify "^2.0.0" - graceful-fs "^4.2.9" - jest-haste-map "^28.1.3" - jest-regex-util "^28.0.2" - jest-util "^28.1.3" - micromatch "^4.0.4" - pirates "^4.0.4" - slash "^3.0.0" - write-file-atomic "^4.0.1" - -"@jest/types@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-28.1.3.tgz#b05de80996ff12512bc5ceb1d208285a7d11748b" - integrity sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ== + "babel-plugin-istanbul" "^6.1.1" + "chalk" "^4.0.0" + "convert-source-map" "^1.4.0" + "fast-json-stable-stringify" "^2.0.0" + "graceful-fs" "^4.2.9" + "jest-haste-map" "^28.1.3" + "jest-regex-util" "^28.0.2" + "jest-util" "^28.1.3" + "micromatch" "^4.0.4" + "pirates" "^4.0.4" + "slash" "^3.0.0" + "write-file-atomic" "^4.0.1" + +"@jest/types@^28.0.0", "@jest/types@^28.1.3": + "integrity" "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==" + "resolved" "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz" + "version" "28.1.3" dependencies: "@jest/schemas" "^28.1.3" "@types/istanbul-lib-coverage" "^2.0.0" "@types/istanbul-reports" "^3.0.0" "@types/node" "*" "@types/yargs" "^17.0.8" - chalk "^4.0.0" + "chalk" "^4.0.0" "@jridgewell/gen-mapping@^0.1.0": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996" - integrity sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w== + "integrity" "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==" + "resolved" "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz" + "version" "0.1.1" dependencies: "@jridgewell/set-array" "^1.0.0" "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/gen-mapping@^0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" - integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== + "integrity" "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==" + "resolved" "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz" + "version" "0.3.2" dependencies: "@jridgewell/set-array" "^1.0.1" "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" "@jridgewell/resolve-uri@^3.0.3": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" - integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== + "integrity" "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==" + "resolved" "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz" + "version" "3.1.0" "@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" - integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== + "integrity" "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==" + "resolved" "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz" + "version" "1.1.2" "@jridgewell/sourcemap-codec@^1.4.10": - version "1.4.14" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" - integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== + "integrity" "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" + "resolved" "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz" + "version" "1.4.14" "@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.13", "@jridgewell/trace-mapping@^0.3.9": - version "0.3.15" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz#aba35c48a38d3fd84b37e66c9c0423f9744f9774" - integrity sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g== + "integrity" "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==" + "resolved" "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz" + "version" "0.3.15" dependencies: "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" +"@noble/hashes@^1.2.0": + "integrity" "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==" + "resolved" "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz" + "version" "1.3.1" + "@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + "integrity" "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==" + "resolved" "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" + "version" "2.1.5" dependencies: "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" + "run-parallel" "^1.1.9" -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== +"@nodelib/fs.stat@^2.0.2", "@nodelib/fs.stat@2.0.5": + "integrity" "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==" + "resolved" "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" + "version" "2.0.5" "@nodelib/fs.walk@^1.2.3": - version "1.2.8" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" - integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + "integrity" "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==" + "resolved" "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz" + "version" "1.2.8" dependencies: "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" + "fastq" "^1.6.0" "@sinclair/typebox@^0.24.1": - version "0.24.43" - resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.43.tgz#2e2bce0e5e493aaf639beed0cd6c88cfde7dd3d7" - integrity sha512-1orQTvtazZmsPeBroJjysvsOQCYV2yjWlebkSY38pl5vr2tdLjEJ+LoxITlGNZaH2RE19WlAwQMkH/7C14wLfw== + "integrity" "sha512-1orQTvtazZmsPeBroJjysvsOQCYV2yjWlebkSY38pl5vr2tdLjEJ+LoxITlGNZaH2RE19WlAwQMkH/7C14wLfw==" + "resolved" "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.43.tgz" + "version" "0.24.43" "@sinonjs/commons@^1.7.0": - version "1.8.3" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.3.tgz#3802ddd21a50a949b6721ddd72da36e67e7f1b2d" - integrity sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ== + "integrity" "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==" + "resolved" "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz" + "version" "1.8.3" dependencies: - type-detect "4.0.8" + "type-detect" "4.0.8" "@sinonjs/fake-timers@^9.1.2": - version "9.1.2" - resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz#4eaab737fab77332ab132d396a3c0d364bd0ea8c" - integrity sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw== + "integrity" "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==" + "resolved" "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz" + "version" "9.1.2" dependencies: "@sinonjs/commons" "^1.7.0" "@types/babel__core@^7.1.14": - version "7.1.19" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.19.tgz#7b497495b7d1b4812bdb9d02804d0576f43ee460" - integrity sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw== + "integrity" "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==" + "resolved" "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz" + "version" "7.1.19" dependencies: "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" @@ -620,359 +625,308 @@ "@types/babel__traverse" "*" "@types/babel__generator@*": - version "7.6.4" - resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.4.tgz#1f20ce4c5b1990b37900b63f050182d28c2439b7" - integrity sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg== + "integrity" "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==" + "resolved" "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz" + "version" "7.6.4" dependencies: "@babel/types" "^7.0.0" "@types/babel__template@*": - version "7.4.1" - resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.1.tgz#3d1a48fd9d6c0edfd56f2ff578daed48f36c8969" - integrity sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g== + "integrity" "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==" + "resolved" "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz" + "version" "7.4.1" dependencies: "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" "@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": - version "7.18.2" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.18.2.tgz#235bf339d17185bdec25e024ca19cce257cc7309" - integrity sha512-FcFaxOr2V5KZCviw1TnutEMVUVsGt4D2hP1TAfXZAMKuHYW3xQhe3jTxNPWutgCJ3/X1c5yX8ZoGVEItxKbwBg== + "integrity" "sha512-FcFaxOr2V5KZCviw1TnutEMVUVsGt4D2hP1TAfXZAMKuHYW3xQhe3jTxNPWutgCJ3/X1c5yX8ZoGVEItxKbwBg==" + "resolved" "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.2.tgz" + "version" "7.18.2" dependencies: "@babel/types" "^7.3.0" "@types/bn.js@5.1.1": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.1.tgz#b51e1b55920a4ca26e9285ff79936bbdec910682" - integrity sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g== + "integrity" "sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g==" + "resolved" "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.1.tgz" + "version" "5.1.1" dependencies: "@types/node" "*" "@types/bs58check@2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@types/bs58check/-/bs58check-2.1.0.tgz#7d25a8b88fe7a9e315d2647335ee3c43c8fdb0c0" - integrity sha512-OxsysnJQh82vy9DRbOcw9m2j/WiyqZLn0YBhKxdQ+aCwoHj+tWzyCgpwAkr79IfDXZKxc6h7k89T9pwS78CqTQ== + "integrity" "sha512-OxsysnJQh82vy9DRbOcw9m2j/WiyqZLn0YBhKxdQ+aCwoHj+tWzyCgpwAkr79IfDXZKxc6h7k89T9pwS78CqTQ==" + "resolved" "https://registry.npmjs.org/@types/bs58check/-/bs58check-2.1.0.tgz" + "version" "2.1.0" dependencies: "@types/node" "*" "@types/create-hash@1.2.2": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@types/create-hash/-/create-hash-1.2.2.tgz#e87247083df8478f6b83655592bde0d709028235" - integrity sha512-Fg8/kfMJObbETFU/Tn+Y0jieYewryLrbKwLCEIwPyklZZVY2qB+64KFjhplGSw+cseZosfFXctXO+PyIYD8iZQ== + "integrity" "sha512-Fg8/kfMJObbETFU/Tn+Y0jieYewryLrbKwLCEIwPyklZZVY2qB+64KFjhplGSw+cseZosfFXctXO+PyIYD8iZQ==" + "resolved" "https://registry.npmjs.org/@types/create-hash/-/create-hash-1.2.2.tgz" + "version" "1.2.2" dependencies: "@types/node" "*" "@types/graceful-fs@^4.1.3": - version "4.1.5" - resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.5.tgz#21ffba0d98da4350db64891f92a9e5db3cdb4e15" - integrity sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw== + "integrity" "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==" + "resolved" "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz" + "version" "4.1.5" dependencies: "@types/node" "*" "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44" - integrity sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g== + "integrity" "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==" + "resolved" "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz" + "version" "2.0.4" "@types/istanbul-lib-report@*": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#c14c24f18ea8190c118ee7562b7ff99a36552686" - integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg== + "integrity" "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==" + "resolved" "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz" + "version" "3.0.0" dependencies: "@types/istanbul-lib-coverage" "*" "@types/istanbul-reports@^3.0.0": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz#9153fe98bba2bd565a63add9436d6f0d7f8468ff" - integrity sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw== + "integrity" "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==" + "resolved" "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz" + "version" "3.0.1" dependencies: "@types/istanbul-lib-report" "*" "@types/jest@28.1.6": - version "28.1.6" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-28.1.6.tgz#d6a9cdd38967d2d746861fb5be6b120e38284dd4" - integrity sha512-0RbGAFMfcBJKOmqRazM8L98uokwuwD5F8rHrv/ZMbrZBwVOWZUyPG6VFNscjYr/vjM3Vu4fRrCPbOs42AfemaQ== + "integrity" "sha512-0RbGAFMfcBJKOmqRazM8L98uokwuwD5F8rHrv/ZMbrZBwVOWZUyPG6VFNscjYr/vjM3Vu4fRrCPbOs42AfemaQ==" + "resolved" "https://registry.npmjs.org/@types/jest/-/jest-28.1.6.tgz" + "version" "28.1.6" dependencies: - jest-matcher-utils "^28.0.0" - pretty-format "^28.0.0" + "jest-matcher-utils" "^28.0.0" + "pretty-format" "^28.0.0" "@types/json-schema@^7.0.9": - version "7.0.11" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" - integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== - -"@types/node@*": - version "18.7.23" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.23.tgz#75c580983846181ebe5f4abc40fe9dfb2d65665f" - integrity sha512-DWNcCHolDq0ZKGizjx2DZjR/PqsYwAcYUJmfMWqtVU2MBMG5Mo+xFZrhGId5r/O5HOuMPyQEcM6KUBp5lBZZBg== + "integrity" "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==" + "resolved" "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz" + "version" "7.0.11" -"@types/node@18.7.22": - version "18.7.22" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.22.tgz#76f7401362ad63d9d7eefa7dcdfa5fcd9baddff3" - integrity sha512-TsmoXYd4zrkkKjJB0URF/mTIKPl+kVcbqClB2F/ykU7vil1BfWZVndOnpEIozPv4fURD28gyPFeIkW2G+KXOvw== +"@types/node@*", "@types/node@^18.7.22": + "integrity" "sha512-TsmoXYd4zrkkKjJB0URF/mTIKPl+kVcbqClB2F/ykU7vil1BfWZVndOnpEIozPv4fURD28gyPFeIkW2G+KXOvw==" + "resolved" "https://registry.npmjs.org/@types/node/-/node-18.7.22.tgz" + "version" "18.7.22" "@types/prettier@^2.1.5": - version "2.7.1" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.1.tgz#dfd20e2dc35f027cdd6c1908e80a5ddc7499670e" - integrity sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow== + "integrity" "sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow==" + "resolved" "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.1.tgz" + "version" "2.7.1" "@types/stack-utils@^2.0.0": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" - integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== + "integrity" "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==" + "resolved" "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz" + "version" "2.0.1" "@types/yargs-parser@*": - version "21.0.0" - resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b" - integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA== + "integrity" "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==" + "resolved" "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz" + "version" "21.0.0" "@types/yargs@^17.0.8": - version "17.0.13" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.13.tgz#34cced675ca1b1d51fcf4d34c3c6f0fa142a5c76" - integrity sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg== + "integrity" "sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg==" + "resolved" "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz" + "version" "17.0.13" dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@5.30.7": - version "5.30.7" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.7.tgz#1621dabc1ae4084310e19e9efc80dfdbb97e7493" - integrity sha512-l4L6Do+tfeM2OK0GJsU7TUcM/1oN/N25xHm3Jb4z3OiDU4Lj8dIuxX9LpVMS9riSXQs42D1ieX7b85/r16H9Fw== +"@typescript-eslint/eslint-plugin@^5.0.0", "@typescript-eslint/eslint-plugin@5.30.7": + "integrity" "sha512-l4L6Do+tfeM2OK0GJsU7TUcM/1oN/N25xHm3Jb4z3OiDU4Lj8dIuxX9LpVMS9riSXQs42D1ieX7b85/r16H9Fw==" + "resolved" "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.7.tgz" + "version" "5.30.7" dependencies: "@typescript-eslint/scope-manager" "5.30.7" "@typescript-eslint/type-utils" "5.30.7" "@typescript-eslint/utils" "5.30.7" - debug "^4.3.4" - functional-red-black-tree "^1.0.1" - ignore "^5.2.0" - regexpp "^3.2.0" - semver "^7.3.7" - tsutils "^3.21.0" - -"@typescript-eslint/parser@5.30.7": - version "5.30.7" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.30.7.tgz#99d09729392aec9e64b1de45cd63cb81a4ddd980" - integrity sha512-Rg5xwznHWWSy7v2o0cdho6n+xLhK2gntImp0rJroVVFkcYFYQ8C8UJTSuTw/3CnExBmPjycjmUJkxVmjXsld6A== + "debug" "^4.3.4" + "functional-red-black-tree" "^1.0.1" + "ignore" "^5.2.0" + "regexpp" "^3.2.0" + "semver" "^7.3.7" + "tsutils" "^3.21.0" + +"@typescript-eslint/parser@^5.0.0", "@typescript-eslint/parser@5.30.7": + "integrity" "sha512-Rg5xwznHWWSy7v2o0cdho6n+xLhK2gntImp0rJroVVFkcYFYQ8C8UJTSuTw/3CnExBmPjycjmUJkxVmjXsld6A==" + "resolved" "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.30.7.tgz" + "version" "5.30.7" dependencies: "@typescript-eslint/scope-manager" "5.30.7" "@typescript-eslint/types" "5.30.7" "@typescript-eslint/typescript-estree" "5.30.7" - debug "^4.3.4" + "debug" "^4.3.4" "@typescript-eslint/scope-manager@5.30.7": - version "5.30.7" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.30.7.tgz#8269a931ef1e5ae68b5eb80743cc515c4ffe3dd7" - integrity sha512-7BM1bwvdF1UUvt+b9smhqdc/eniOnCKxQT/kj3oXtj3LqnTWCAM0qHRHfyzCzhEfWX0zrW7KqXXeE4DlchZBKw== + "integrity" "sha512-7BM1bwvdF1UUvt+b9smhqdc/eniOnCKxQT/kj3oXtj3LqnTWCAM0qHRHfyzCzhEfWX0zrW7KqXXeE4DlchZBKw==" + "resolved" "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.30.7.tgz" + "version" "5.30.7" dependencies: "@typescript-eslint/types" "5.30.7" "@typescript-eslint/visitor-keys" "5.30.7" -"@typescript-eslint/scope-manager@5.38.1": - version "5.38.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.38.1.tgz#f87b289ef8819b47189351814ad183e8801d5764" - integrity sha512-BfRDq5RidVU3RbqApKmS7RFMtkyWMM50qWnDAkKgQiezRtLKsoyRKIvz1Ok5ilRWeD9IuHvaidaLxvGx/2eqTQ== - dependencies: - "@typescript-eslint/types" "5.38.1" - "@typescript-eslint/visitor-keys" "5.38.1" - "@typescript-eslint/type-utils@5.30.7": - version "5.30.7" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.30.7.tgz#5693dc3db6f313f302764282d614cfdbc8a9fcfd" - integrity sha512-nD5qAE2aJX/YLyKMvOU5jvJyku4QN5XBVsoTynFrjQZaDgDV6i7QHFiYCx10wvn7hFvfuqIRNBtsgaLe0DbWhw== + "integrity" "sha512-nD5qAE2aJX/YLyKMvOU5jvJyku4QN5XBVsoTynFrjQZaDgDV6i7QHFiYCx10wvn7hFvfuqIRNBtsgaLe0DbWhw==" + "resolved" "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.30.7.tgz" + "version" "5.30.7" dependencies: "@typescript-eslint/utils" "5.30.7" - debug "^4.3.4" - tsutils "^3.21.0" + "debug" "^4.3.4" + "tsutils" "^3.21.0" "@typescript-eslint/types@5.30.7": - version "5.30.7" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.30.7.tgz#18331487cc92d0f1fb1a6f580c8ec832528079d0" - integrity sha512-ocVkETUs82+U+HowkovV6uxf1AnVRKCmDRNUBUUo46/5SQv1owC/EBFkiu4MOHeZqhKz2ktZ3kvJJ1uFqQ8QPg== - -"@typescript-eslint/types@5.38.1": - version "5.38.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.38.1.tgz#74f9d6dcb8dc7c58c51e9fbc6653ded39e2e225c" - integrity sha512-QTW1iHq1Tffp9lNfbfPm4WJabbvpyaehQ0SrvVK2yfV79SytD9XDVxqiPvdrv2LK7DGSFo91TB2FgWanbJAZXg== + "integrity" "sha512-ocVkETUs82+U+HowkovV6uxf1AnVRKCmDRNUBUUo46/5SQv1owC/EBFkiu4MOHeZqhKz2ktZ3kvJJ1uFqQ8QPg==" + "resolved" "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.7.tgz" + "version" "5.30.7" "@typescript-eslint/typescript-estree@5.30.7": - version "5.30.7" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.7.tgz#05da9f1b281985bfedcf62349847f8d168eecc07" - integrity sha512-tNslqXI1ZdmXXrHER83TJ8OTYl4epUzJC0aj2i4DMDT4iU+UqLT3EJeGQvJ17BMbm31x5scSwo3hPM0nqQ1AEA== + "integrity" "sha512-tNslqXI1ZdmXXrHER83TJ8OTYl4epUzJC0aj2i4DMDT4iU+UqLT3EJeGQvJ17BMbm31x5scSwo3hPM0nqQ1AEA==" + "resolved" "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.7.tgz" + "version" "5.30.7" dependencies: "@typescript-eslint/types" "5.30.7" "@typescript-eslint/visitor-keys" "5.30.7" - debug "^4.3.4" - globby "^11.1.0" - is-glob "^4.0.3" - semver "^7.3.7" - tsutils "^3.21.0" - -"@typescript-eslint/typescript-estree@5.38.1": - version "5.38.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.38.1.tgz#657d858d5d6087f96b638ee383ee1cff52605a1e" - integrity sha512-99b5e/Enoe8fKMLdSuwrfH/C0EIbpUWmeEKHmQlGZb8msY33qn1KlkFww0z26o5Omx7EVjzVDCWEfrfCDHfE7g== - dependencies: - "@typescript-eslint/types" "5.38.1" - "@typescript-eslint/visitor-keys" "5.38.1" - debug "^4.3.4" - globby "^11.1.0" - is-glob "^4.0.3" - semver "^7.3.7" - tsutils "^3.21.0" - -"@typescript-eslint/utils@5.30.7": - version "5.30.7" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.30.7.tgz#7135be070349e9f7caa262b0ca59dc96123351bb" - integrity sha512-Z3pHdbFw+ftZiGUnm1GZhkJgVqsDL5CYW2yj+TB2mfXDFOMqtbzQi2dNJIyPqPbx9mv2kUxS1gU+r2gKlKi1rQ== + "debug" "^4.3.4" + "globby" "^11.1.0" + "is-glob" "^4.0.3" + "semver" "^7.3.7" + "tsutils" "^3.21.0" + +"@typescript-eslint/utils@^5.10.0", "@typescript-eslint/utils@5.30.7": + "integrity" "sha512-Z3pHdbFw+ftZiGUnm1GZhkJgVqsDL5CYW2yj+TB2mfXDFOMqtbzQi2dNJIyPqPbx9mv2kUxS1gU+r2gKlKi1rQ==" + "resolved" "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.30.7.tgz" + "version" "5.30.7" dependencies: "@types/json-schema" "^7.0.9" "@typescript-eslint/scope-manager" "5.30.7" "@typescript-eslint/types" "5.30.7" "@typescript-eslint/typescript-estree" "5.30.7" - eslint-scope "^5.1.1" - eslint-utils "^3.0.0" - -"@typescript-eslint/utils@^5.10.0": - version "5.38.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.38.1.tgz#e3ac37d7b33d1362bb5adf4acdbe00372fb813ef" - integrity sha512-oIuUiVxPBsndrN81oP8tXnFa/+EcZ03qLqPDfSZ5xIJVm7A9V0rlkQwwBOAGtrdN70ZKDlKv+l1BeT4eSFxwXA== - dependencies: - "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.38.1" - "@typescript-eslint/types" "5.38.1" - "@typescript-eslint/typescript-estree" "5.38.1" - eslint-scope "^5.1.1" - eslint-utils "^3.0.0" + "eslint-scope" "^5.1.1" + "eslint-utils" "^3.0.0" "@typescript-eslint/visitor-keys@5.30.7": - version "5.30.7" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.7.tgz#c093abae75b4fd822bfbad9fc337f38a7a14909a" - integrity sha512-KrRXf8nnjvcpxDFOKej4xkD7657+PClJs5cJVSG7NNoCNnjEdc46juNAQt7AyuWctuCgs6mVRc1xGctEqrjxWw== + "integrity" "sha512-KrRXf8nnjvcpxDFOKej4xkD7657+PClJs5cJVSG7NNoCNnjEdc46juNAQt7AyuWctuCgs6mVRc1xGctEqrjxWw==" + "resolved" "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.7.tgz" + "version" "5.30.7" dependencies: "@typescript-eslint/types" "5.30.7" - eslint-visitor-keys "^3.3.0" - -"@typescript-eslint/visitor-keys@5.38.1": - version "5.38.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.38.1.tgz#508071bfc6b96d194c0afe6a65ad47029059edbc" - integrity sha512-bSHr1rRxXt54+j2n4k54p4fj8AHJ49VDWtjpImOpzQj4qjAiOpPni+V1Tyajh19Api1i844F757cur8wH3YvOA== - dependencies: - "@typescript-eslint/types" "5.38.1" - eslint-visitor-keys "^3.3.0" + "eslint-visitor-keys" "^3.3.0" -acorn-jsx@^5.3.2: - version "5.3.2" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" - integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== +"acorn-jsx@^5.3.2": + "integrity" "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==" + "resolved" "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" + "version" "5.3.2" -acorn@^8.8.0: - version "8.8.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8" - integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== +"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", "acorn@^8.8.0": + "integrity" "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==" + "resolved" "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz" + "version" "8.8.0" -ajv@^6.10.0, ajv@^6.12.4: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== +"ajv@^6.10.0", "ajv@^6.12.4": + "integrity" "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==" + "resolved" "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" + "version" "6.12.6" dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" + "fast-deep-equal" "^3.1.1" + "fast-json-stable-stringify" "^2.0.0" + "json-schema-traverse" "^0.4.1" + "uri-js" "^4.2.2" -ansi-escapes@^4.2.1: - version "4.3.2" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" - integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== +"ansi-escapes@^4.2.1": + "integrity" "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==" + "resolved" "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz" + "version" "4.3.2" dependencies: - type-fest "^0.21.3" + "type-fest" "^0.21.3" -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== +"ansi-regex@^5.0.1": + "integrity" "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + "resolved" "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" + "version" "5.0.1" -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== +"ansi-styles@^3.2.1": + "integrity" "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==" + "resolved" "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz" + "version" "3.2.1" dependencies: - color-convert "^1.9.0" + "color-convert" "^1.9.0" -ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== +"ansi-styles@^4.0.0", "ansi-styles@^4.1.0": + "integrity" "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==" + "resolved" "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" + "version" "4.3.0" dependencies: - color-convert "^2.0.1" + "color-convert" "^2.0.1" -ansi-styles@^5.0.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" - integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== +"ansi-styles@^5.0.0": + "integrity" "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==" + "resolved" "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz" + "version" "5.2.0" -anymatch@^3.0.3: - version "3.1.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" - integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== +"anymatch@^3.0.3": + "integrity" "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==" + "resolved" "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz" + "version" "3.1.2" dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" + "normalize-path" "^3.0.0" + "picomatch" "^2.0.4" -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== +"argparse@^1.0.7": + "integrity" "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==" + "resolved" "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz" + "version" "1.0.10" dependencies: - sprintf-js "~1.0.2" + "sprintf-js" "~1.0.2" -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== +"argparse@^2.0.1": + "integrity" "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + "resolved" "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" + "version" "2.0.1" -array-union@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" - integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== +"array-union@^2.1.0": + "integrity" "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==" + "resolved" "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz" + "version" "2.1.0" -babel-jest@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-28.1.3.tgz#c1187258197c099072156a0a121c11ee1e3917d5" - integrity sha512-epUaPOEWMk3cWX0M/sPvCHHCe9fMFAa/9hXEgKP8nFfNl/jlGkE9ucq9NqkZGXLDduCJYS0UvSlPUwC0S+rH6Q== +"babel-jest@^28.0.0", "babel-jest@^28.1.3": + "integrity" "sha512-epUaPOEWMk3cWX0M/sPvCHHCe9fMFAa/9hXEgKP8nFfNl/jlGkE9ucq9NqkZGXLDduCJYS0UvSlPUwC0S+rH6Q==" + "resolved" "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.3.tgz" + "version" "28.1.3" dependencies: "@jest/transform" "^28.1.3" "@types/babel__core" "^7.1.14" - babel-plugin-istanbul "^6.1.1" - babel-preset-jest "^28.1.3" - chalk "^4.0.0" - graceful-fs "^4.2.9" - slash "^3.0.0" + "babel-plugin-istanbul" "^6.1.1" + "babel-preset-jest" "^28.1.3" + "chalk" "^4.0.0" + "graceful-fs" "^4.2.9" + "slash" "^3.0.0" -babel-plugin-istanbul@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" - integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== +"babel-plugin-istanbul@^6.1.1": + "integrity" "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==" + "resolved" "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz" + "version" "6.1.1" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@istanbuljs/load-nyc-config" "^1.0.0" "@istanbuljs/schema" "^0.1.2" - istanbul-lib-instrument "^5.0.4" - test-exclude "^6.0.0" + "istanbul-lib-instrument" "^5.0.4" + "test-exclude" "^6.0.0" -babel-plugin-jest-hoist@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.3.tgz#1952c4d0ea50f2d6d794353762278d1d8cca3fbe" - integrity sha512-Ys3tUKAmfnkRUpPdpa98eYrAR0nV+sSFUZZEGuQ2EbFd1y4SOLtD5QDNHAq+bb9a+bbXvYQC4b+ID/THIMcU6Q== +"babel-plugin-jest-hoist@^28.1.3": + "integrity" "sha512-Ys3tUKAmfnkRUpPdpa98eYrAR0nV+sSFUZZEGuQ2EbFd1y4SOLtD5QDNHAq+bb9a+bbXvYQC4b+ID/THIMcU6Q==" + "resolved" "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.3.tgz" + "version" "28.1.3" dependencies: "@babel/template" "^7.3.3" "@babel/types" "^7.3.3" "@types/babel__core" "^7.1.14" "@types/babel__traverse" "^7.0.6" -babel-preset-current-node-syntax@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" - integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ== +"babel-preset-current-node-syntax@^1.0.0": + "integrity" "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==" + "resolved" "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz" + "version" "1.0.1" dependencies: "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-syntax-bigint" "^7.8.3" @@ -987,1030 +941,1028 @@ babel-preset-current-node-syntax@^1.0.0: "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-top-level-await" "^7.8.3" -babel-preset-jest@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-28.1.3.tgz#5dfc20b99abed5db994406c2b9ab94c73aaa419d" - integrity sha512-L+fupJvlWAHbQfn74coNX3zf60LXMJsezNvvx8eIh7iOR1luJ1poxYgQk1F8PYtNq/6QODDHCqsSnTFSWC491A== +"babel-preset-jest@^28.1.3": + "integrity" "sha512-L+fupJvlWAHbQfn74coNX3zf60LXMJsezNvvx8eIh7iOR1luJ1poxYgQk1F8PYtNq/6QODDHCqsSnTFSWC491A==" + "resolved" "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.1.3.tgz" + "version" "28.1.3" dependencies: - babel-plugin-jest-hoist "^28.1.3" - babel-preset-current-node-syntax "^1.0.0" + "babel-plugin-jest-hoist" "^28.1.3" + "babel-preset-current-node-syntax" "^1.0.0" -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== +"balanced-match@^1.0.0": + "integrity" "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + "resolved" "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" + "version" "1.0.2" -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" +"base-x@^4.0.0": + "integrity" "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" + "resolved" "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz" + "version" "4.0.0" -base64url@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/base64url/-/base64url-3.0.1.tgz#6399d572e2bc3f90a9a8b22d5dbb0a32d33f788d" - integrity sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A== +"base64url@3.0.1": + "integrity" "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==" + "resolved" "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz" + "version" "3.0.1" -bn.js@5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" - integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== +"bn.js@5.2.1": + "integrity" "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + "resolved" "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz" + "version" "5.2.1" -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== +"brace-expansion@^1.1.7": + "integrity" "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==" + "resolved" "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" + "version" "1.1.11" dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" + "balanced-match" "^1.0.0" + "concat-map" "0.0.1" -braces@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== +"braces@^3.0.2": + "integrity" "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==" + "resolved" "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz" + "version" "3.0.2" dependencies: - fill-range "^7.0.1" + "fill-range" "^7.0.1" -browserslist@^4.21.3: - version "4.21.4" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.4.tgz#e7496bbc67b9e39dd0f98565feccdcb0d4ff6987" - integrity sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw== +"browserslist@^4.21.3", "browserslist@>= 4.21.0": + "integrity" "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==" + "resolved" "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz" + "version" "4.21.4" dependencies: - caniuse-lite "^1.0.30001400" - electron-to-chromium "^1.4.251" - node-releases "^2.0.6" - update-browserslist-db "^1.0.9" + "caniuse-lite" "^1.0.30001400" + "electron-to-chromium" "^1.4.251" + "node-releases" "^2.0.6" + "update-browserslist-db" "^1.0.9" -bs-logger@0.x: - version "0.2.6" - resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" - integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== +"bs-logger@0.x": + "integrity" "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==" + "resolved" "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz" + "version" "0.2.6" dependencies: - fast-json-stable-stringify "2.x" + "fast-json-stable-stringify" "2.x" -bs58@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" - integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== +"bs58@^5.0.0": + "integrity" "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==" + "resolved" "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz" + "version" "5.0.0" dependencies: - base-x "^3.0.2" + "base-x" "^4.0.0" "bs58check@https://github.com/bitcoinjs/bs58check": - version "2.1.2" - resolved "https://github.com/bitcoinjs/bs58check#12b3e700f355c5c49d0be3f8fc29be6c66e753e9" - dependencies: - bs58 "^4.0.0" - create-hash "^1.1.0" - safe-buffer "^5.1.2" - -bser@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" - integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== - dependencies: - node-int64 "^0.4.0" - -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - -callsites@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -camelcase@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -camelcase@^6.2.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" - integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== - -caniuse-lite@^1.0.30001400: - version "1.0.30001412" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001412.tgz#30f67d55a865da43e0aeec003f073ea8764d5d7c" - integrity sha512-+TeEIee1gS5bYOiuf+PS/kp2mrXic37Hl66VY6EAfxasIk5fELTktK2oOezYed12H8w7jt3s512PpulQidPjwA== - -chalk@^2.0.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^4.0.0: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -char-regex@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" - integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== - -ci-info@^3.2.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.4.0.tgz#b28484fd436cbc267900364f096c9dc185efb251" - integrity sha512-t5QdPT5jq3o262DOQ8zA6E1tlH2upmUc4Hlvrbx1pGYJuiiHl7O7rvVNI+l8HTVhd/q3Qc9vqimkNk5yiXsAug== - -cipher-base@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -cjs-module-lexer@^1.0.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40" - integrity sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA== - -cliui@^7.0.2: - version "7.0.4" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" - integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^7.0.0" - -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== - -collect-v8-coverage@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59" - integrity sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg== - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369" - integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA== - dependencies: - safe-buffer "~5.1.1" - -create-hash@1.2.0, create-hash@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" - integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - md5.js "^1.3.4" - ripemd160 "^2.0.1" - sha.js "^2.4.0" - -cross-spawn@^7.0.2, cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - -dedent@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" - integrity sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA== - -deep-is@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" - integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== - -deepmerge@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" - integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== - -detect-newline@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" - integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== - -diff-sequences@^28.1.1: - version "28.1.1" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-28.1.1.tgz#9989dc731266dc2903457a70e996f3a041913ac6" - integrity sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw== - -dir-glob@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" - integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== - dependencies: - path-type "^4.0.0" - -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - -electron-to-chromium@^1.4.251: - version "1.4.266" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.266.tgz#b2ce973eedbff309e2b98d1ed348e447bd4681fe" - integrity sha512-saJTYECxUSv7eSpnXw0XIEvUkP9x4s/x2mm3TVX7k4rIFS6f5TjBih1B5h437WzIhHQjid+d8ouQzPQskMervQ== - -emittery@^0.10.2: - version "0.10.2" - resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.10.2.tgz#902eec8aedb8c41938c46e9385e9db7e03182933" - integrity sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw== - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== - -escape-string-regexp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" - integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== - -escape-string-regexp@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - -eslint-plugin-jest@26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.6.0.tgz#546804fa42da75d7d58d4d3b278d5186abd3f6c0" - integrity sha512-f8n46/97ZFdU4KqeQYqO8AEVGIhHWvkpgNBWHH3jrM28/y8llnbf3IjfIKv6p2pZIMinK1PCqbbROxs9Eud02Q== + "integrity" "sha512-baICxaJy1rqIByQPpjsoHVEuaADwsvZqZNlaFtxMHDlWeMHqXKnKYlcor7s+bXrQe0xxnw+exZBmtw/8OAdePA==" + "resolved" "git+ssh://git@github.com/bitcoinjs/bs58check.git" + "version" "3.0.1" + dependencies: + "@noble/hashes" "^1.2.0" + "bs58" "^5.0.0" + +"bser@2.1.1": + "integrity" "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==" + "resolved" "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz" + "version" "2.1.1" + dependencies: + "node-int64" "^0.4.0" + +"buffer-from@^1.0.0": + "integrity" "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + "resolved" "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" + "version" "1.1.2" + +"callsites@^3.0.0": + "integrity" "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" + "resolved" "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" + "version" "3.1.0" + +"camelcase@^5.3.1": + "integrity" "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + "resolved" "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz" + "version" "5.3.1" + +"camelcase@^6.2.0": + "integrity" "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==" + "resolved" "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz" + "version" "6.3.0" + +"caniuse-lite@^1.0.30001400": + "integrity" "sha512-+TeEIee1gS5bYOiuf+PS/kp2mrXic37Hl66VY6EAfxasIk5fELTktK2oOezYed12H8w7jt3s512PpulQidPjwA==" + "resolved" "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001412.tgz" + "version" "1.0.30001412" + +"chalk@^2.0.0": + "integrity" "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==" + "resolved" "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" + "version" "2.4.2" + dependencies: + "ansi-styles" "^3.2.1" + "escape-string-regexp" "^1.0.5" + "supports-color" "^5.3.0" + +"chalk@^4.0.0": + "integrity" "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==" + "resolved" "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" + "version" "4.1.2" + dependencies: + "ansi-styles" "^4.1.0" + "supports-color" "^7.1.0" + +"char-regex@^1.0.2": + "integrity" "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==" + "resolved" "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz" + "version" "1.0.2" + +"ci-info@^3.2.0": + "integrity" "sha512-t5QdPT5jq3o262DOQ8zA6E1tlH2upmUc4Hlvrbx1pGYJuiiHl7O7rvVNI+l8HTVhd/q3Qc9vqimkNk5yiXsAug==" + "resolved" "https://registry.npmjs.org/ci-info/-/ci-info-3.4.0.tgz" + "version" "3.4.0" + +"cipher-base@^1.0.1": + "integrity" "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==" + "resolved" "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz" + "version" "1.0.4" + dependencies: + "inherits" "^2.0.1" + "safe-buffer" "^5.0.1" + +"cjs-module-lexer@^1.0.0": + "integrity" "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==" + "resolved" "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz" + "version" "1.2.2" + +"cliui@^7.0.2": + "integrity" "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==" + "resolved" "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz" + "version" "7.0.4" + dependencies: + "string-width" "^4.2.0" + "strip-ansi" "^6.0.0" + "wrap-ansi" "^7.0.0" + +"co@^4.6.0": + "integrity" "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==" + "resolved" "https://registry.npmjs.org/co/-/co-4.6.0.tgz" + "version" "4.6.0" + +"collect-v8-coverage@^1.0.0": + "integrity" "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==" + "resolved" "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz" + "version" "1.0.1" + +"color-convert@^1.9.0": + "integrity" "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==" + "resolved" "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz" + "version" "1.9.3" + dependencies: + "color-name" "1.1.3" + +"color-convert@^2.0.1": + "integrity" "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==" + "resolved" "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" + "version" "2.0.1" + dependencies: + "color-name" "~1.1.4" + +"color-name@~1.1.4": + "integrity" "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "resolved" "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" + "version" "1.1.4" + +"color-name@1.1.3": + "integrity" "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + "resolved" "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" + "version" "1.1.3" + +"concat-map@0.0.1": + "integrity" "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + "resolved" "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + "version" "0.0.1" + +"convert-source-map@^1.4.0", "convert-source-map@^1.6.0", "convert-source-map@^1.7.0": + "integrity" "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==" + "resolved" "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz" + "version" "1.8.0" + dependencies: + "safe-buffer" "~5.1.1" + +"create-hash@1.2.0": + "integrity" "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==" + "resolved" "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz" + "version" "1.2.0" + dependencies: + "cipher-base" "^1.0.1" + "inherits" "^2.0.1" + "md5.js" "^1.3.4" + "ripemd160" "^2.0.1" + "sha.js" "^2.4.0" + +"cross-spawn@^7.0.2", "cross-spawn@^7.0.3": + "integrity" "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==" + "resolved" "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" + "version" "7.0.3" + dependencies: + "path-key" "^3.1.0" + "shebang-command" "^2.0.0" + "which" "^2.0.1" + +"debug@^4.1.0", "debug@^4.1.1", "debug@^4.3.2", "debug@^4.3.4": + "integrity" "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==" + "resolved" "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" + "version" "4.3.4" + dependencies: + "ms" "2.1.2" + +"dedent@^0.7.0": + "integrity" "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==" + "resolved" "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz" + "version" "0.7.0" + +"deep-is@^0.1.3": + "integrity" "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" + "resolved" "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" + "version" "0.1.4" + +"deepmerge@^4.2.2": + "integrity" "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==" + "resolved" "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz" + "version" "4.2.2" + +"detect-newline@^3.0.0": + "integrity" "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==" + "resolved" "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz" + "version" "3.1.0" + +"diff-sequences@^28.1.1": + "integrity" "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==" + "resolved" "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz" + "version" "28.1.1" + +"dir-glob@^3.0.1": + "integrity" "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==" + "resolved" "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz" + "version" "3.0.1" + dependencies: + "path-type" "^4.0.0" + +"doctrine@^3.0.0": + "integrity" "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==" + "resolved" "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz" + "version" "3.0.0" + dependencies: + "esutils" "^2.0.2" + +"electron-to-chromium@^1.4.251": + "integrity" "sha512-saJTYECxUSv7eSpnXw0XIEvUkP9x4s/x2mm3TVX7k4rIFS6f5TjBih1B5h437WzIhHQjid+d8ouQzPQskMervQ==" + "resolved" "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.266.tgz" + "version" "1.4.266" + +"emittery@^0.10.2": + "integrity" "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==" + "resolved" "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz" + "version" "0.10.2" + +"emoji-regex@^8.0.0": + "integrity" "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + "resolved" "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" + "version" "8.0.0" + +"error-ex@^1.3.1": + "integrity" "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==" + "resolved" "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz" + "version" "1.3.2" + dependencies: + "is-arrayish" "^0.2.1" + +"escalade@^3.1.1": + "integrity" "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + "resolved" "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" + "version" "3.1.1" + +"escape-string-regexp@^1.0.5": + "integrity" "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==" + "resolved" "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" + "version" "1.0.5" + +"escape-string-regexp@^2.0.0": + "integrity" "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==" + "resolved" "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz" + "version" "2.0.0" + +"escape-string-regexp@^4.0.0": + "integrity" "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" + "resolved" "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" + "version" "4.0.0" + +"eslint-plugin-jest@26.6.0": + "integrity" "sha512-f8n46/97ZFdU4KqeQYqO8AEVGIhHWvkpgNBWHH3jrM28/y8llnbf3IjfIKv6p2pZIMinK1PCqbbROxs9Eud02Q==" + "resolved" "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-26.6.0.tgz" + "version" "26.6.0" dependencies: "@typescript-eslint/utils" "^5.10.0" -eslint-scope@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" - integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== +"eslint-scope@^5.1.1": + "integrity" "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==" + "resolved" "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz" + "version" "5.1.1" dependencies: - esrecurse "^4.3.0" - estraverse "^4.1.1" + "esrecurse" "^4.3.0" + "estraverse" "^4.1.1" -eslint-scope@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" - integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== +"eslint-scope@^7.1.1": + "integrity" "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==" + "resolved" "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz" + "version" "7.1.1" dependencies: - esrecurse "^4.3.0" - estraverse "^5.2.0" + "esrecurse" "^4.3.0" + "estraverse" "^5.2.0" -eslint-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" - integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== +"eslint-utils@^3.0.0": + "integrity" "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==" + "resolved" "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz" + "version" "3.0.0" dependencies: - eslint-visitor-keys "^2.0.0" + "eslint-visitor-keys" "^2.0.0" -eslint-visitor-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" - integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== +"eslint-visitor-keys@^2.0.0": + "integrity" "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==" + "resolved" "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz" + "version" "2.1.0" -eslint-visitor-keys@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" - integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== +"eslint-visitor-keys@^3.3.0": + "integrity" "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==" + "resolved" "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz" + "version" "3.3.0" -eslint@8.20.0: - version "8.20.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.20.0.tgz#048ac56aa18529967da8354a478be4ec0a2bc81b" - integrity sha512-d4ixhz5SKCa1D6SCPrivP7yYVi7nyD6A4vs6HIAul9ujBzcEmZVM3/0NN/yu5nKhmO1wjp5xQ46iRfmDGlOviA== +"eslint@*", "eslint@^6.0.0 || ^7.0.0 || ^8.0.0", "eslint@>=5", "eslint@8.20.0": + "integrity" "sha512-d4ixhz5SKCa1D6SCPrivP7yYVi7nyD6A4vs6HIAul9ujBzcEmZVM3/0NN/yu5nKhmO1wjp5xQ46iRfmDGlOviA==" + "resolved" "https://registry.npmjs.org/eslint/-/eslint-8.20.0.tgz" + "version" "8.20.0" dependencies: "@eslint/eslintrc" "^1.3.0" "@humanwhocodes/config-array" "^0.9.2" - ajv "^6.10.0" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.3.2" - doctrine "^3.0.0" - escape-string-regexp "^4.0.0" - eslint-scope "^7.1.1" - eslint-utils "^3.0.0" - eslint-visitor-keys "^3.3.0" - espree "^9.3.2" - esquery "^1.4.0" - esutils "^2.0.2" - fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" - functional-red-black-tree "^1.0.1" - glob-parent "^6.0.1" - globals "^13.15.0" - ignore "^5.2.0" - import-fresh "^3.0.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - js-yaml "^4.1.0" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash.merge "^4.6.2" - minimatch "^3.1.2" - natural-compare "^1.4.0" - optionator "^0.9.1" - regexpp "^3.2.0" - strip-ansi "^6.0.1" - strip-json-comments "^3.1.0" - text-table "^0.2.0" - v8-compile-cache "^2.0.3" - -espree@^9.3.2, espree@^9.4.0: - version "9.4.0" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.0.tgz#cd4bc3d6e9336c433265fc0aa016fc1aaf182f8a" - integrity sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw== - dependencies: - acorn "^8.8.0" - acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.3.0" - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -esquery@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" - integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== - dependencies: - estraverse "^5.1.0" - -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^4.1.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - -estraverse@^5.1.0, estraverse@^5.2.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -execa@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" - integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.0" - human-signals "^2.1.0" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.1" - onetime "^5.1.2" - signal-exit "^3.0.3" - strip-final-newline "^2.0.0" - -exit@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" - integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== - -expect@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/expect/-/expect-28.1.3.tgz#90a7c1a124f1824133dd4533cce2d2bdcb6603ec" - integrity sha512-eEh0xn8HlsuOBxFgIss+2mX85VAS4Qy3OSkjV7rlBWljtA4oWH37glVGyOZSZvErDT/yBywZdPGwCXuTvSG85g== + "ajv" "^6.10.0" + "chalk" "^4.0.0" + "cross-spawn" "^7.0.2" + "debug" "^4.3.2" + "doctrine" "^3.0.0" + "escape-string-regexp" "^4.0.0" + "eslint-scope" "^7.1.1" + "eslint-utils" "^3.0.0" + "eslint-visitor-keys" "^3.3.0" + "espree" "^9.3.2" + "esquery" "^1.4.0" + "esutils" "^2.0.2" + "fast-deep-equal" "^3.1.3" + "file-entry-cache" "^6.0.1" + "functional-red-black-tree" "^1.0.1" + "glob-parent" "^6.0.1" + "globals" "^13.15.0" + "ignore" "^5.2.0" + "import-fresh" "^3.0.0" + "imurmurhash" "^0.1.4" + "is-glob" "^4.0.0" + "js-yaml" "^4.1.0" + "json-stable-stringify-without-jsonify" "^1.0.1" + "levn" "^0.4.1" + "lodash.merge" "^4.6.2" + "minimatch" "^3.1.2" + "natural-compare" "^1.4.0" + "optionator" "^0.9.1" + "regexpp" "^3.2.0" + "strip-ansi" "^6.0.1" + "strip-json-comments" "^3.1.0" + "text-table" "^0.2.0" + "v8-compile-cache" "^2.0.3" + +"espree@^9.3.2", "espree@^9.4.0": + "integrity" "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==" + "resolved" "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz" + "version" "9.4.0" + dependencies: + "acorn" "^8.8.0" + "acorn-jsx" "^5.3.2" + "eslint-visitor-keys" "^3.3.0" + +"esprima@^4.0.0": + "integrity" "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + "resolved" "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz" + "version" "4.0.1" + +"esquery@^1.4.0": + "integrity" "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==" + "resolved" "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz" + "version" "1.4.0" + dependencies: + "estraverse" "^5.1.0" + +"esrecurse@^4.3.0": + "integrity" "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==" + "resolved" "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz" + "version" "4.3.0" + dependencies: + "estraverse" "^5.2.0" + +"estraverse@^4.1.1": + "integrity" "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" + "resolved" "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz" + "version" "4.3.0" + +"estraverse@^5.1.0": + "integrity" "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" + "resolved" "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" + "version" "5.3.0" + +"estraverse@^5.2.0": + "integrity" "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" + "resolved" "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" + "version" "5.3.0" + +"esutils@^2.0.2": + "integrity" "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" + "resolved" "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" + "version" "2.0.3" + +"execa@^5.0.0": + "integrity" "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==" + "resolved" "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz" + "version" "5.1.1" + dependencies: + "cross-spawn" "^7.0.3" + "get-stream" "^6.0.0" + "human-signals" "^2.1.0" + "is-stream" "^2.0.0" + "merge-stream" "^2.0.0" + "npm-run-path" "^4.0.1" + "onetime" "^5.1.2" + "signal-exit" "^3.0.3" + "strip-final-newline" "^2.0.0" + +"exit@^0.1.2": + "integrity" "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==" + "resolved" "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz" + "version" "0.1.2" + +"expect@^28.1.3": + "integrity" "sha512-eEh0xn8HlsuOBxFgIss+2mX85VAS4Qy3OSkjV7rlBWljtA4oWH37glVGyOZSZvErDT/yBywZdPGwCXuTvSG85g==" + "resolved" "https://registry.npmjs.org/expect/-/expect-28.1.3.tgz" + "version" "28.1.3" dependencies: "@jest/expect-utils" "^28.1.3" - jest-get-type "^28.0.2" - jest-matcher-utils "^28.1.3" - jest-message-util "^28.1.3" - jest-util "^28.1.3" + "jest-get-type" "^28.0.2" + "jest-matcher-utils" "^28.1.3" + "jest-message-util" "^28.1.3" + "jest-util" "^28.1.3" -fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== +"fast-deep-equal@^3.1.1", "fast-deep-equal@^3.1.3": + "integrity" "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + "resolved" "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" + "version" "3.1.3" -fast-glob@^3.2.9: - version "3.2.12" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" - integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== +"fast-glob@^3.2.9": + "integrity" "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==" + "resolved" "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz" + "version" "3.2.12" dependencies: "@nodelib/fs.stat" "^2.0.2" "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.2" - merge2 "^1.3.0" - micromatch "^4.0.4" - -fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fast-levenshtein@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== - -fastq@^1.6.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" - integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== - dependencies: - reusify "^1.0.4" - -fb-watchman@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c" - integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA== - dependencies: - bser "2.1.1" - -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== - dependencies: - flat-cache "^3.0.4" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -find-up@^4.0.0, find-up@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.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" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== - dependencies: - flatted "^3.1.0" - rimraf "^3.0.2" - -flatted@^3.1.0: - version "3.2.7" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" - integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -fsevents@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -functional-red-black-tree@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" - integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== - -gensync@^1.0.0-beta.2: - version "1.0.0-beta.2" - resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" - integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== - -get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-package-type@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" - integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== - -get-stream@^6.0.0: - version "6.0.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" - integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== - -glob-parent@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob-parent@^6.0.1: - version "6.0.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" - integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== - dependencies: - is-glob "^4.0.3" - -glob@^7.1.3, glob@^7.1.4: - 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.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - -globals@^13.15.0: - version "13.17.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.17.0.tgz#902eb1e680a41da93945adbdcb5a9f361ba69bd4" - integrity sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw== - dependencies: - type-fest "^0.20.2" - -globby@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" - integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== - dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.2.9" - ignore "^5.2.0" - merge2 "^1.4.1" - slash "^3.0.0" - -graceful-fs@^4.2.9: - version "4.2.10" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" - integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -hash-base@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" - integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== - dependencies: - inherits "^2.0.4" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -html-escaper@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" - integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== - -human-signals@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" - integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== - -ignore@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" - integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== - -import-fresh@^3.0.0, import-fresh@^3.2.1: - version "3.3.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" - integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - -import-local@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" - integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== - dependencies: - pkg-dir "^4.2.0" - resolve-cwd "^3.0.0" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== - -is-core-module@^2.9.0: - version "2.10.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.10.0.tgz#9012ede0a91c69587e647514e1d5277019e728ed" - integrity sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg== - dependencies: - has "^1.0.3" - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-generator-fn@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" - integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== - -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-stream@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" - integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - -istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" - integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== - -istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz#31d18bdd127f825dd02ea7bfdfd906f8ab840e9f" - integrity sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A== + "glob-parent" "^5.1.2" + "merge2" "^1.3.0" + "micromatch" "^4.0.4" + +"fast-json-stable-stringify@^2.0.0", "fast-json-stable-stringify@2.x": + "integrity" "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + "resolved" "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" + "version" "2.1.0" + +"fast-levenshtein@^2.0.6": + "integrity" "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" + "resolved" "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" + "version" "2.0.6" + +"fastq@^1.6.0": + "integrity" "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==" + "resolved" "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz" + "version" "1.13.0" + dependencies: + "reusify" "^1.0.4" + +"fb-watchman@^2.0.0": + "integrity" "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==" + "resolved" "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz" + "version" "2.0.2" + dependencies: + "bser" "2.1.1" + +"file-entry-cache@^6.0.1": + "integrity" "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==" + "resolved" "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz" + "version" "6.0.1" + dependencies: + "flat-cache" "^3.0.4" + +"fill-range@^7.0.1": + "integrity" "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==" + "resolved" "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz" + "version" "7.0.1" + dependencies: + "to-regex-range" "^5.0.1" + +"find-up@^4.0.0", "find-up@^4.1.0": + "integrity" "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==" + "resolved" "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" + "version" "4.1.0" + dependencies: + "locate-path" "^5.0.0" + "path-exists" "^4.0.0" + +"flat-cache@^3.0.4": + "integrity" "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==" + "resolved" "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz" + "version" "3.0.4" + dependencies: + "flatted" "^3.1.0" + "rimraf" "^3.0.2" + +"flatted@^3.1.0": + "integrity" "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==" + "resolved" "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz" + "version" "3.2.7" + +"fs.realpath@^1.0.0": + "integrity" "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + "resolved" "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" + "version" "1.0.0" + +"function-bind@^1.1.1": + "integrity" "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + "resolved" "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" + "version" "1.1.1" + +"functional-red-black-tree@^1.0.1": + "integrity" "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==" + "resolved" "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz" + "version" "1.0.1" + +"gensync@^1.0.0-beta.2": + "integrity" "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==" + "resolved" "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" + "version" "1.0.0-beta.2" + +"get-caller-file@^2.0.5": + "integrity" "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + "resolved" "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" + "version" "2.0.5" + +"get-package-type@^0.1.0": + "integrity" "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==" + "resolved" "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz" + "version" "0.1.0" + +"get-stream@^6.0.0": + "integrity" "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==" + "resolved" "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz" + "version" "6.0.1" + +"glob-parent@^5.1.2": + "integrity" "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==" + "resolved" "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" + "version" "5.1.2" + dependencies: + "is-glob" "^4.0.1" + +"glob-parent@^6.0.1": + "integrity" "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==" + "resolved" "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz" + "version" "6.0.2" + dependencies: + "is-glob" "^4.0.3" + +"glob@^7.1.3", "glob@^7.1.4": + "integrity" "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==" + "resolved" "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" + "version" "7.2.3" + dependencies: + "fs.realpath" "^1.0.0" + "inflight" "^1.0.4" + "inherits" "2" + "minimatch" "^3.1.1" + "once" "^1.3.0" + "path-is-absolute" "^1.0.0" + +"globals@^11.1.0": + "integrity" "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" + "resolved" "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz" + "version" "11.12.0" + +"globals@^13.15.0": + "integrity" "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==" + "resolved" "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz" + "version" "13.17.0" + dependencies: + "type-fest" "^0.20.2" + +"globby@^11.1.0": + "integrity" "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==" + "resolved" "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz" + "version" "11.1.0" + dependencies: + "array-union" "^2.1.0" + "dir-glob" "^3.0.1" + "fast-glob" "^3.2.9" + "ignore" "^5.2.0" + "merge2" "^1.4.1" + "slash" "^3.0.0" + +"graceful-fs@^4.2.9": + "integrity" "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + "resolved" "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz" + "version" "4.2.10" + +"has-flag@^3.0.0": + "integrity" "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==" + "resolved" "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz" + "version" "3.0.0" + +"has-flag@^4.0.0": + "integrity" "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + "resolved" "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" + "version" "4.0.0" + +"has@^1.0.3": + "integrity" "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==" + "resolved" "https://registry.npmjs.org/has/-/has-1.0.3.tgz" + "version" "1.0.3" + dependencies: + "function-bind" "^1.1.1" + +"hash-base@^3.0.0": + "integrity" "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==" + "resolved" "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz" + "version" "3.1.0" + dependencies: + "inherits" "^2.0.4" + "readable-stream" "^3.6.0" + "safe-buffer" "^5.2.0" + +"html-escaper@^2.0.0": + "integrity" "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==" + "resolved" "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz" + "version" "2.0.2" + +"human-signals@^2.1.0": + "integrity" "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==" + "resolved" "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz" + "version" "2.1.0" + +"ignore@^5.2.0": + "integrity" "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==" + "resolved" "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz" + "version" "5.2.0" + +"import-fresh@^3.0.0", "import-fresh@^3.2.1": + "integrity" "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==" + "resolved" "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" + "version" "3.3.0" + dependencies: + "parent-module" "^1.0.0" + "resolve-from" "^4.0.0" + +"import-local@^3.0.2": + "integrity" "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==" + "resolved" "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz" + "version" "3.1.0" + dependencies: + "pkg-dir" "^4.2.0" + "resolve-cwd" "^3.0.0" + +"imurmurhash@^0.1.4": + "integrity" "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==" + "resolved" "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" + "version" "0.1.4" + +"inflight@^1.0.4": + "integrity" "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==" + "resolved" "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" + "version" "1.0.6" + dependencies: + "once" "^1.3.0" + "wrappy" "1" + +"inherits@^2.0.1", "inherits@^2.0.3", "inherits@^2.0.4", "inherits@2": + "integrity" "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "resolved" "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" + "version" "2.0.4" + +"is-arrayish@^0.2.1": + "integrity" "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" + "resolved" "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" + "version" "0.2.1" + +"is-core-module@^2.9.0": + "integrity" "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==" + "resolved" "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz" + "version" "2.10.0" + dependencies: + "has" "^1.0.3" + +"is-extglob@^2.1.1": + "integrity" "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==" + "resolved" "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" + "version" "2.1.1" + +"is-fullwidth-code-point@^3.0.0": + "integrity" "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + "resolved" "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" + "version" "3.0.0" + +"is-generator-fn@^2.0.0": + "integrity" "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==" + "resolved" "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz" + "version" "2.1.0" + +"is-glob@^4.0.0", "is-glob@^4.0.1", "is-glob@^4.0.3": + "integrity" "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==" + "resolved" "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" + "version" "4.0.3" + dependencies: + "is-extglob" "^2.1.1" + +"is-number@^7.0.0": + "integrity" "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + "resolved" "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" + "version" "7.0.0" + +"is-stream@^2.0.0": + "integrity" "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==" + "resolved" "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz" + "version" "2.0.1" + +"isexe@^2.0.0": + "integrity" "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + "resolved" "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" + "version" "2.0.0" + +"istanbul-lib-coverage@^3.0.0", "istanbul-lib-coverage@^3.2.0": + "integrity" "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==" + "resolved" "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz" + "version" "3.2.0" + +"istanbul-lib-instrument@^5.0.4", "istanbul-lib-instrument@^5.1.0": + "integrity" "sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A==" + "resolved" "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz" + "version" "5.2.0" dependencies: "@babel/core" "^7.12.3" "@babel/parser" "^7.14.7" "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.2.0" - semver "^6.3.0" + "istanbul-lib-coverage" "^3.2.0" + "semver" "^6.3.0" -istanbul-lib-report@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#7518fe52ea44de372f460a76b5ecda9ffb73d8a6" - integrity sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw== +"istanbul-lib-report@^3.0.0": + "integrity" "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==" + "resolved" "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz" + "version" "3.0.0" dependencies: - istanbul-lib-coverage "^3.0.0" - make-dir "^3.0.0" - supports-color "^7.1.0" + "istanbul-lib-coverage" "^3.0.0" + "make-dir" "^3.0.0" + "supports-color" "^7.1.0" -istanbul-lib-source-maps@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" - integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== +"istanbul-lib-source-maps@^4.0.0": + "integrity" "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==" + "resolved" "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz" + "version" "4.0.1" dependencies: - debug "^4.1.1" - istanbul-lib-coverage "^3.0.0" - source-map "^0.6.1" + "debug" "^4.1.1" + "istanbul-lib-coverage" "^3.0.0" + "source-map" "^0.6.1" -istanbul-reports@^3.1.3: - version "3.1.5" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.5.tgz#cc9a6ab25cb25659810e4785ed9d9fb742578bae" - integrity sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w== +"istanbul-reports@^3.1.3": + "integrity" "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==" + "resolved" "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz" + "version" "3.1.5" dependencies: - html-escaper "^2.0.0" - istanbul-lib-report "^3.0.0" + "html-escaper" "^2.0.0" + "istanbul-lib-report" "^3.0.0" -jest-changed-files@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-28.1.3.tgz#d9aeee6792be3686c47cb988a8eaf82ff4238831" - integrity sha512-esaOfUWJXk2nfZt9SPyC8gA1kNfdKLkQWyzsMlqq8msYSlNKfmZxfRgZn4Cd4MGVUF+7v6dBs0d5TOAKa7iIiA== +"jest-changed-files@^28.1.3": + "integrity" "sha512-esaOfUWJXk2nfZt9SPyC8gA1kNfdKLkQWyzsMlqq8msYSlNKfmZxfRgZn4Cd4MGVUF+7v6dBs0d5TOAKa7iIiA==" + "resolved" "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-28.1.3.tgz" + "version" "28.1.3" dependencies: - execa "^5.0.0" - p-limit "^3.1.0" + "execa" "^5.0.0" + "p-limit" "^3.1.0" -jest-circus@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-28.1.3.tgz#d14bd11cf8ee1a03d69902dc47b6bd4634ee00e4" - integrity sha512-cZ+eS5zc79MBwt+IhQhiEp0OeBddpc1n8MBo1nMB8A7oPMKEO+Sre+wHaLJexQUj9Ya/8NOBY0RESUgYjB6fow== +"jest-circus@^28.1.3": + "integrity" "sha512-cZ+eS5zc79MBwt+IhQhiEp0OeBddpc1n8MBo1nMB8A7oPMKEO+Sre+wHaLJexQUj9Ya/8NOBY0RESUgYjB6fow==" + "resolved" "https://registry.npmjs.org/jest-circus/-/jest-circus-28.1.3.tgz" + "version" "28.1.3" dependencies: "@jest/environment" "^28.1.3" "@jest/expect" "^28.1.3" "@jest/test-result" "^28.1.3" "@jest/types" "^28.1.3" "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - dedent "^0.7.0" - is-generator-fn "^2.0.0" - jest-each "^28.1.3" - jest-matcher-utils "^28.1.3" - jest-message-util "^28.1.3" - jest-runtime "^28.1.3" - jest-snapshot "^28.1.3" - jest-util "^28.1.3" - p-limit "^3.1.0" - pretty-format "^28.1.3" - slash "^3.0.0" - stack-utils "^2.0.3" - -jest-cli@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-28.1.3.tgz#558b33c577d06de55087b8448d373b9f654e46b2" - integrity sha512-roY3kvrv57Azn1yPgdTebPAXvdR2xfezaKKYzVxZ6It/5NCxzJym6tUI5P1zkdWhfUYkxEI9uZWcQdaFLo8mJQ== + "chalk" "^4.0.0" + "co" "^4.6.0" + "dedent" "^0.7.0" + "is-generator-fn" "^2.0.0" + "jest-each" "^28.1.3" + "jest-matcher-utils" "^28.1.3" + "jest-message-util" "^28.1.3" + "jest-runtime" "^28.1.3" + "jest-snapshot" "^28.1.3" + "jest-util" "^28.1.3" + "p-limit" "^3.1.0" + "pretty-format" "^28.1.3" + "slash" "^3.0.0" + "stack-utils" "^2.0.3" + +"jest-cli@^28.1.3": + "integrity" "sha512-roY3kvrv57Azn1yPgdTebPAXvdR2xfezaKKYzVxZ6It/5NCxzJym6tUI5P1zkdWhfUYkxEI9uZWcQdaFLo8mJQ==" + "resolved" "https://registry.npmjs.org/jest-cli/-/jest-cli-28.1.3.tgz" + "version" "28.1.3" dependencies: "@jest/core" "^28.1.3" "@jest/test-result" "^28.1.3" "@jest/types" "^28.1.3" - chalk "^4.0.0" - exit "^0.1.2" - graceful-fs "^4.2.9" - import-local "^3.0.2" - jest-config "^28.1.3" - jest-util "^28.1.3" - jest-validate "^28.1.3" - prompts "^2.0.1" - yargs "^17.3.1" - -jest-config@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-28.1.3.tgz#e315e1f73df3cac31447eed8b8740a477392ec60" - integrity sha512-MG3INjByJ0J4AsNBm7T3hsuxKQqFIiRo/AUqb1q9LRKI5UU6Aar9JHbr9Ivn1TVwfUD9KirRoM/T6u8XlcQPHQ== + "chalk" "^4.0.0" + "exit" "^0.1.2" + "graceful-fs" "^4.2.9" + "import-local" "^3.0.2" + "jest-config" "^28.1.3" + "jest-util" "^28.1.3" + "jest-validate" "^28.1.3" + "prompts" "^2.0.1" + "yargs" "^17.3.1" + +"jest-config@^28.1.3": + "integrity" "sha512-MG3INjByJ0J4AsNBm7T3hsuxKQqFIiRo/AUqb1q9LRKI5UU6Aar9JHbr9Ivn1TVwfUD9KirRoM/T6u8XlcQPHQ==" + "resolved" "https://registry.npmjs.org/jest-config/-/jest-config-28.1.3.tgz" + "version" "28.1.3" dependencies: "@babel/core" "^7.11.6" "@jest/test-sequencer" "^28.1.3" "@jest/types" "^28.1.3" - babel-jest "^28.1.3" - chalk "^4.0.0" - ci-info "^3.2.0" - deepmerge "^4.2.2" - glob "^7.1.3" - graceful-fs "^4.2.9" - jest-circus "^28.1.3" - jest-environment-node "^28.1.3" - jest-get-type "^28.0.2" - jest-regex-util "^28.0.2" - jest-resolve "^28.1.3" - jest-runner "^28.1.3" - jest-util "^28.1.3" - jest-validate "^28.1.3" - micromatch "^4.0.4" - parse-json "^5.2.0" - pretty-format "^28.1.3" - slash "^3.0.0" - strip-json-comments "^3.1.1" - -jest-diff@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-28.1.3.tgz#948a192d86f4e7a64c5264ad4da4877133d8792f" - integrity sha512-8RqP1B/OXzjjTWkqMX67iqgwBVJRgCyKD3L9nq+6ZqJMdvjE8RgHktqZ6jNrkdMT+dJuYNI3rhQpxaz7drJHfw== - dependencies: - chalk "^4.0.0" - diff-sequences "^28.1.1" - jest-get-type "^28.0.2" - pretty-format "^28.1.3" - -jest-docblock@^28.1.1: - version "28.1.1" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-28.1.1.tgz#6f515c3bf841516d82ecd57a62eed9204c2f42a8" - integrity sha512-3wayBVNiOYx0cwAbl9rwm5kKFP8yHH3d/fkEaL02NPTkDojPtheGB7HZSFY4wzX+DxyrvhXz0KSCVksmCknCuA== - dependencies: - detect-newline "^3.0.0" - -jest-each@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-28.1.3.tgz#bdd1516edbe2b1f3569cfdad9acd543040028f81" - integrity sha512-arT1z4sg2yABU5uogObVPvSlSMQlDA48owx07BDPAiasW0yYpYHYOo4HHLz9q0BVzDVU4hILFjzJw0So9aCL/g== + "babel-jest" "^28.1.3" + "chalk" "^4.0.0" + "ci-info" "^3.2.0" + "deepmerge" "^4.2.2" + "glob" "^7.1.3" + "graceful-fs" "^4.2.9" + "jest-circus" "^28.1.3" + "jest-environment-node" "^28.1.3" + "jest-get-type" "^28.0.2" + "jest-regex-util" "^28.0.2" + "jest-resolve" "^28.1.3" + "jest-runner" "^28.1.3" + "jest-util" "^28.1.3" + "jest-validate" "^28.1.3" + "micromatch" "^4.0.4" + "parse-json" "^5.2.0" + "pretty-format" "^28.1.3" + "slash" "^3.0.0" + "strip-json-comments" "^3.1.1" + +"jest-diff@^28.1.3": + "integrity" "sha512-8RqP1B/OXzjjTWkqMX67iqgwBVJRgCyKD3L9nq+6ZqJMdvjE8RgHktqZ6jNrkdMT+dJuYNI3rhQpxaz7drJHfw==" + "resolved" "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.3.tgz" + "version" "28.1.3" + dependencies: + "chalk" "^4.0.0" + "diff-sequences" "^28.1.1" + "jest-get-type" "^28.0.2" + "pretty-format" "^28.1.3" + +"jest-docblock@^28.1.1": + "integrity" "sha512-3wayBVNiOYx0cwAbl9rwm5kKFP8yHH3d/fkEaL02NPTkDojPtheGB7HZSFY4wzX+DxyrvhXz0KSCVksmCknCuA==" + "resolved" "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.1.1.tgz" + "version" "28.1.1" + dependencies: + "detect-newline" "^3.0.0" + +"jest-each@^28.1.3": + "integrity" "sha512-arT1z4sg2yABU5uogObVPvSlSMQlDA48owx07BDPAiasW0yYpYHYOo4HHLz9q0BVzDVU4hILFjzJw0So9aCL/g==" + "resolved" "https://registry.npmjs.org/jest-each/-/jest-each-28.1.3.tgz" + "version" "28.1.3" dependencies: "@jest/types" "^28.1.3" - chalk "^4.0.0" - jest-get-type "^28.0.2" - jest-util "^28.1.3" - pretty-format "^28.1.3" + "chalk" "^4.0.0" + "jest-get-type" "^28.0.2" + "jest-util" "^28.1.3" + "pretty-format" "^28.1.3" -jest-environment-node@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-28.1.3.tgz#7e74fe40eb645b9d56c0c4b70ca4357faa349be5" - integrity sha512-ugP6XOhEpjAEhGYvp5Xj989ns5cB1K6ZdjBYuS30umT4CQEETaxSiPcZ/E1kFktX4GkrcM4qu07IIlDYX1gp+A== +"jest-environment-node@^28.1.3": + "integrity" "sha512-ugP6XOhEpjAEhGYvp5Xj989ns5cB1K6ZdjBYuS30umT4CQEETaxSiPcZ/E1kFktX4GkrcM4qu07IIlDYX1gp+A==" + "resolved" "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.1.3.tgz" + "version" "28.1.3" dependencies: "@jest/environment" "^28.1.3" "@jest/fake-timers" "^28.1.3" "@jest/types" "^28.1.3" "@types/node" "*" - jest-mock "^28.1.3" - jest-util "^28.1.3" + "jest-mock" "^28.1.3" + "jest-util" "^28.1.3" -jest-get-type@^28.0.2: - version "28.0.2" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-28.0.2.tgz#34622e628e4fdcd793d46db8a242227901fcf203" - integrity sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA== +"jest-get-type@^28.0.2": + "integrity" "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==" + "resolved" "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz" + "version" "28.0.2" -jest-haste-map@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-28.1.3.tgz#abd5451129a38d9841049644f34b034308944e2b" - integrity sha512-3S+RQWDXccXDKSWnkHa/dPwt+2qwA8CJzR61w3FoYCvoo3Pn8tvGcysmMF0Bj0EX5RYvAI2EIvC57OmotfdtKA== +"jest-haste-map@^28.1.3": + "integrity" "sha512-3S+RQWDXccXDKSWnkHa/dPwt+2qwA8CJzR61w3FoYCvoo3Pn8tvGcysmMF0Bj0EX5RYvAI2EIvC57OmotfdtKA==" + "resolved" "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.3.tgz" + "version" "28.1.3" dependencies: "@jest/types" "^28.1.3" "@types/graceful-fs" "^4.1.3" "@types/node" "*" - anymatch "^3.0.3" - fb-watchman "^2.0.0" - graceful-fs "^4.2.9" - jest-regex-util "^28.0.2" - jest-util "^28.1.3" - jest-worker "^28.1.3" - micromatch "^4.0.4" - walker "^1.0.8" + "anymatch" "^3.0.3" + "fb-watchman" "^2.0.0" + "graceful-fs" "^4.2.9" + "jest-regex-util" "^28.0.2" + "jest-util" "^28.1.3" + "jest-worker" "^28.1.3" + "micromatch" "^4.0.4" + "walker" "^1.0.8" optionalDependencies: - fsevents "^2.3.2" + "fsevents" "^2.3.2" -jest-leak-detector@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-28.1.3.tgz#a6685d9b074be99e3adee816ce84fd30795e654d" - integrity sha512-WFVJhnQsiKtDEo5lG2mM0v40QWnBM+zMdHHyJs8AWZ7J0QZJS59MsyKeJHWhpBZBH32S48FOVvGyOFT1h0DlqA== +"jest-leak-detector@^28.1.3": + "integrity" "sha512-WFVJhnQsiKtDEo5lG2mM0v40QWnBM+zMdHHyJs8AWZ7J0QZJS59MsyKeJHWhpBZBH32S48FOVvGyOFT1h0DlqA==" + "resolved" "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.1.3.tgz" + "version" "28.1.3" dependencies: - jest-get-type "^28.0.2" - pretty-format "^28.1.3" + "jest-get-type" "^28.0.2" + "pretty-format" "^28.1.3" -jest-matcher-utils@^28.0.0, jest-matcher-utils@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-28.1.3.tgz#5a77f1c129dd5ba3b4d7fc20728806c78893146e" - integrity sha512-kQeJ7qHemKfbzKoGjHHrRKH6atgxMk8Enkk2iPQ3XwO6oE/KYD8lMYOziCkeSB9G4adPM4nR1DE8Tf5JeWH6Bw== +"jest-matcher-utils@^28.0.0", "jest-matcher-utils@^28.1.3": + "integrity" "sha512-kQeJ7qHemKfbzKoGjHHrRKH6atgxMk8Enkk2iPQ3XwO6oE/KYD8lMYOziCkeSB9G4adPM4nR1DE8Tf5JeWH6Bw==" + "resolved" "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.3.tgz" + "version" "28.1.3" dependencies: - chalk "^4.0.0" - jest-diff "^28.1.3" - jest-get-type "^28.0.2" - pretty-format "^28.1.3" + "chalk" "^4.0.0" + "jest-diff" "^28.1.3" + "jest-get-type" "^28.0.2" + "pretty-format" "^28.1.3" -jest-message-util@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-28.1.3.tgz#232def7f2e333f1eecc90649b5b94b0055e7c43d" - integrity sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g== +"jest-message-util@^28.1.3": + "integrity" "sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==" + "resolved" "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.3.tgz" + "version" "28.1.3" dependencies: "@babel/code-frame" "^7.12.13" "@jest/types" "^28.1.3" "@types/stack-utils" "^2.0.0" - chalk "^4.0.0" - graceful-fs "^4.2.9" - micromatch "^4.0.4" - pretty-format "^28.1.3" - slash "^3.0.0" - stack-utils "^2.0.3" - -jest-mock@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-28.1.3.tgz#d4e9b1fc838bea595c77ab73672ebf513ab249da" - integrity sha512-o3J2jr6dMMWYVH4Lh/NKmDXdosrsJgi4AviS8oXLujcjpCMBb1FMsblDnOXKZKfSiHLxYub1eS0IHuRXsio9eA== + "chalk" "^4.0.0" + "graceful-fs" "^4.2.9" + "micromatch" "^4.0.4" + "pretty-format" "^28.1.3" + "slash" "^3.0.0" + "stack-utils" "^2.0.3" + +"jest-mock@^28.1.3": + "integrity" "sha512-o3J2jr6dMMWYVH4Lh/NKmDXdosrsJgi4AviS8oXLujcjpCMBb1FMsblDnOXKZKfSiHLxYub1eS0IHuRXsio9eA==" + "resolved" "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.3.tgz" + "version" "28.1.3" dependencies: "@jest/types" "^28.1.3" "@types/node" "*" -jest-pnp-resolver@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c" - integrity sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w== - -jest-regex-util@^28.0.2: - version "28.0.2" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-28.0.2.tgz#afdc377a3b25fb6e80825adcf76c854e5bf47ead" - integrity sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw== - -jest-resolve-dependencies@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.3.tgz#8c65d7583460df7275c6ea2791901fa975c1fe66" - integrity sha512-qa0QO2Q0XzQoNPouMbCc7Bvtsem8eQgVPNkwn9LnS+R2n8DaVDPL/U1gngC0LTl1RYXJU0uJa2BMC2DbTfFrHA== - dependencies: - jest-regex-util "^28.0.2" - jest-snapshot "^28.1.3" - -jest-resolve@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-28.1.3.tgz#cfb36100341ddbb061ec781426b3c31eb51aa0a8" - integrity sha512-Z1W3tTjE6QaNI90qo/BJpfnvpxtaFTFw5CDgwpyE/Kz8U/06N1Hjf4ia9quUhCh39qIGWF1ZuxFiBiJQwSEYKQ== - dependencies: - chalk "^4.0.0" - graceful-fs "^4.2.9" - jest-haste-map "^28.1.3" - jest-pnp-resolver "^1.2.2" - jest-util "^28.1.3" - jest-validate "^28.1.3" - resolve "^1.20.0" - resolve.exports "^1.1.0" - slash "^3.0.0" - -jest-runner@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-28.1.3.tgz#5eee25febd730b4713a2cdfd76bdd5557840f9a1" - integrity sha512-GkMw4D/0USd62OVO0oEgjn23TM+YJa2U2Wu5zz9xsQB1MxWKDOlrnykPxnMsN0tnJllfLPinHTka61u0QhaxBA== +"jest-pnp-resolver@^1.2.2": + "integrity" "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==" + "resolved" "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz" + "version" "1.2.2" + +"jest-regex-util@^28.0.2": + "integrity" "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==" + "resolved" "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz" + "version" "28.0.2" + +"jest-resolve-dependencies@^28.1.3": + "integrity" "sha512-qa0QO2Q0XzQoNPouMbCc7Bvtsem8eQgVPNkwn9LnS+R2n8DaVDPL/U1gngC0LTl1RYXJU0uJa2BMC2DbTfFrHA==" + "resolved" "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.3.tgz" + "version" "28.1.3" + dependencies: + "jest-regex-util" "^28.0.2" + "jest-snapshot" "^28.1.3" + +"jest-resolve@*", "jest-resolve@^28.1.3": + "integrity" "sha512-Z1W3tTjE6QaNI90qo/BJpfnvpxtaFTFw5CDgwpyE/Kz8U/06N1Hjf4ia9quUhCh39qIGWF1ZuxFiBiJQwSEYKQ==" + "resolved" "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.1.3.tgz" + "version" "28.1.3" + dependencies: + "chalk" "^4.0.0" + "graceful-fs" "^4.2.9" + "jest-haste-map" "^28.1.3" + "jest-pnp-resolver" "^1.2.2" + "jest-util" "^28.1.3" + "jest-validate" "^28.1.3" + "resolve" "^1.20.0" + "resolve.exports" "^1.1.0" + "slash" "^3.0.0" + +"jest-runner@^28.1.3": + "integrity" "sha512-GkMw4D/0USd62OVO0oEgjn23TM+YJa2U2Wu5zz9xsQB1MxWKDOlrnykPxnMsN0tnJllfLPinHTka61u0QhaxBA==" + "resolved" "https://registry.npmjs.org/jest-runner/-/jest-runner-28.1.3.tgz" + "version" "28.1.3" dependencies: "@jest/console" "^28.1.3" "@jest/environment" "^28.1.3" @@ -2018,26 +1970,26 @@ jest-runner@^28.1.3: "@jest/transform" "^28.1.3" "@jest/types" "^28.1.3" "@types/node" "*" - chalk "^4.0.0" - emittery "^0.10.2" - graceful-fs "^4.2.9" - jest-docblock "^28.1.1" - jest-environment-node "^28.1.3" - jest-haste-map "^28.1.3" - jest-leak-detector "^28.1.3" - jest-message-util "^28.1.3" - jest-resolve "^28.1.3" - jest-runtime "^28.1.3" - jest-util "^28.1.3" - jest-watcher "^28.1.3" - jest-worker "^28.1.3" - p-limit "^3.1.0" - source-map-support "0.5.13" - -jest-runtime@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-28.1.3.tgz#a57643458235aa53e8ec7821949e728960d0605f" - integrity sha512-NU+881ScBQQLc1JHG5eJGU7Ui3kLKrmwCPPtYsJtBykixrM2OhVQlpMmFWJjMyDfdkGgBMNjXCGB/ebzsgNGQw== + "chalk" "^4.0.0" + "emittery" "^0.10.2" + "graceful-fs" "^4.2.9" + "jest-docblock" "^28.1.1" + "jest-environment-node" "^28.1.3" + "jest-haste-map" "^28.1.3" + "jest-leak-detector" "^28.1.3" + "jest-message-util" "^28.1.3" + "jest-resolve" "^28.1.3" + "jest-runtime" "^28.1.3" + "jest-util" "^28.1.3" + "jest-watcher" "^28.1.3" + "jest-worker" "^28.1.3" + "p-limit" "^3.1.0" + "source-map-support" "0.5.13" + +"jest-runtime@^28.1.3": + "integrity" "sha512-NU+881ScBQQLc1JHG5eJGU7Ui3kLKrmwCPPtYsJtBykixrM2OhVQlpMmFWJjMyDfdkGgBMNjXCGB/ebzsgNGQw==" + "resolved" "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.1.3.tgz" + "version" "28.1.3" dependencies: "@jest/environment" "^28.1.3" "@jest/fake-timers" "^28.1.3" @@ -2046,26 +1998,26 @@ jest-runtime@^28.1.3: "@jest/test-result" "^28.1.3" "@jest/transform" "^28.1.3" "@jest/types" "^28.1.3" - chalk "^4.0.0" - cjs-module-lexer "^1.0.0" - collect-v8-coverage "^1.0.0" - execa "^5.0.0" - glob "^7.1.3" - graceful-fs "^4.2.9" - jest-haste-map "^28.1.3" - jest-message-util "^28.1.3" - jest-mock "^28.1.3" - jest-regex-util "^28.0.2" - jest-resolve "^28.1.3" - jest-snapshot "^28.1.3" - jest-util "^28.1.3" - slash "^3.0.0" - strip-bom "^4.0.0" - -jest-snapshot@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-28.1.3.tgz#17467b3ab8ddb81e2f605db05583d69388fc0668" - integrity sha512-4lzMgtiNlc3DU/8lZfmqxN3AYD6GGLbl+72rdBpXvcV+whX7mDrREzkPdp2RnmfIiWBg1YbuFSkXduF2JcafJg== + "chalk" "^4.0.0" + "cjs-module-lexer" "^1.0.0" + "collect-v8-coverage" "^1.0.0" + "execa" "^5.0.0" + "glob" "^7.1.3" + "graceful-fs" "^4.2.9" + "jest-haste-map" "^28.1.3" + "jest-message-util" "^28.1.3" + "jest-mock" "^28.1.3" + "jest-regex-util" "^28.0.2" + "jest-resolve" "^28.1.3" + "jest-snapshot" "^28.1.3" + "jest-util" "^28.1.3" + "slash" "^3.0.0" + "strip-bom" "^4.0.0" + +"jest-snapshot@^28.1.3": + "integrity" "sha512-4lzMgtiNlc3DU/8lZfmqxN3AYD6GGLbl+72rdBpXvcV+whX7mDrREzkPdp2RnmfIiWBg1YbuFSkXduF2JcafJg==" + "resolved" "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.3.tgz" + "version" "28.1.3" dependencies: "@babel/core" "^7.11.6" "@babel/generator" "^7.7.2" @@ -2077,853 +2029,858 @@ jest-snapshot@^28.1.3: "@jest/types" "^28.1.3" "@types/babel__traverse" "^7.0.6" "@types/prettier" "^2.1.5" - babel-preset-current-node-syntax "^1.0.0" - chalk "^4.0.0" - expect "^28.1.3" - graceful-fs "^4.2.9" - jest-diff "^28.1.3" - jest-get-type "^28.0.2" - jest-haste-map "^28.1.3" - jest-matcher-utils "^28.1.3" - jest-message-util "^28.1.3" - jest-util "^28.1.3" - natural-compare "^1.4.0" - pretty-format "^28.1.3" - semver "^7.3.5" - -jest-util@^28.0.0, jest-util@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-28.1.3.tgz#f4f932aa0074f0679943220ff9cbba7e497028b0" - integrity sha512-XdqfpHwpcSRko/C35uLYFM2emRAltIIKZiJ9eAmhjsj0CqZMa0p1ib0R5fWIqGhn1a103DebTbpqIaP1qCQ6tQ== + "babel-preset-current-node-syntax" "^1.0.0" + "chalk" "^4.0.0" + "expect" "^28.1.3" + "graceful-fs" "^4.2.9" + "jest-diff" "^28.1.3" + "jest-get-type" "^28.0.2" + "jest-haste-map" "^28.1.3" + "jest-matcher-utils" "^28.1.3" + "jest-message-util" "^28.1.3" + "jest-util" "^28.1.3" + "natural-compare" "^1.4.0" + "pretty-format" "^28.1.3" + "semver" "^7.3.5" + +"jest-util@^28.0.0", "jest-util@^28.1.3": + "integrity" "sha512-XdqfpHwpcSRko/C35uLYFM2emRAltIIKZiJ9eAmhjsj0CqZMa0p1ib0R5fWIqGhn1a103DebTbpqIaP1qCQ6tQ==" + "resolved" "https://registry.npmjs.org/jest-util/-/jest-util-28.1.3.tgz" + "version" "28.1.3" dependencies: "@jest/types" "^28.1.3" "@types/node" "*" - chalk "^4.0.0" - ci-info "^3.2.0" - graceful-fs "^4.2.9" - picomatch "^2.2.3" + "chalk" "^4.0.0" + "ci-info" "^3.2.0" + "graceful-fs" "^4.2.9" + "picomatch" "^2.2.3" -jest-validate@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-28.1.3.tgz#e322267fd5e7c64cea4629612c357bbda96229df" - integrity sha512-SZbOGBWEsaTxBGCOpsRWlXlvNkvTkY0XxRfh7zYmvd8uL5Qzyg0CHAXiXKROflh801quA6+/DsT4ODDthOC/OA== +"jest-validate@^28.1.3": + "integrity" "sha512-SZbOGBWEsaTxBGCOpsRWlXlvNkvTkY0XxRfh7zYmvd8uL5Qzyg0CHAXiXKROflh801quA6+/DsT4ODDthOC/OA==" + "resolved" "https://registry.npmjs.org/jest-validate/-/jest-validate-28.1.3.tgz" + "version" "28.1.3" dependencies: "@jest/types" "^28.1.3" - camelcase "^6.2.0" - chalk "^4.0.0" - jest-get-type "^28.0.2" - leven "^3.1.0" - pretty-format "^28.1.3" + "camelcase" "^6.2.0" + "chalk" "^4.0.0" + "jest-get-type" "^28.0.2" + "leven" "^3.1.0" + "pretty-format" "^28.1.3" -jest-watcher@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-28.1.3.tgz#c6023a59ba2255e3b4c57179fc94164b3e73abd4" - integrity sha512-t4qcqj9hze+jviFPUN3YAtAEeFnr/azITXQEMARf5cMwKY2SMBRnCQTXLixTl20OR6mLh9KLMrgVJgJISym+1g== +"jest-watcher@^28.1.3": + "integrity" "sha512-t4qcqj9hze+jviFPUN3YAtAEeFnr/azITXQEMARf5cMwKY2SMBRnCQTXLixTl20OR6mLh9KLMrgVJgJISym+1g==" + "resolved" "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.1.3.tgz" + "version" "28.1.3" dependencies: "@jest/test-result" "^28.1.3" "@jest/types" "^28.1.3" "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - emittery "^0.10.2" - jest-util "^28.1.3" - string-length "^4.0.1" + "ansi-escapes" "^4.2.1" + "chalk" "^4.0.0" + "emittery" "^0.10.2" + "jest-util" "^28.1.3" + "string-length" "^4.0.1" -jest-worker@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-28.1.3.tgz#7e3c4ce3fa23d1bb6accb169e7f396f98ed4bb98" - integrity sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g== +"jest-worker@^28.1.3": + "integrity" "sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==" + "resolved" "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.3.tgz" + "version" "28.1.3" dependencies: "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^8.0.0" + "merge-stream" "^2.0.0" + "supports-color" "^8.0.0" -jest@28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest/-/jest-28.1.3.tgz#e9c6a7eecdebe3548ca2b18894a50f45b36dfc6b" - integrity sha512-N4GT5on8UkZgH0O5LUavMRV1EDEhNTL0KEfRmDIeZHSV7p2XgLoY9t9VDUgL6o+yfdgYHVxuz81G8oB9VG5uyA== +"jest@^28.0.0", "jest@28.1.3": + "integrity" "sha512-N4GT5on8UkZgH0O5LUavMRV1EDEhNTL0KEfRmDIeZHSV7p2XgLoY9t9VDUgL6o+yfdgYHVxuz81G8oB9VG5uyA==" + "resolved" "https://registry.npmjs.org/jest/-/jest-28.1.3.tgz" + "version" "28.1.3" dependencies: "@jest/core" "^28.1.3" "@jest/types" "^28.1.3" - import-local "^3.0.2" - jest-cli "^28.1.3" - -js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-yaml@^3.13.1: - version "3.14.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - -json-parse-even-better-errors@^2.3.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" - integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" - integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== - -json5@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" - integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== - -kleur@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" - integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== - -leven@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" - integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== - -levn@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" - integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== - dependencies: - prelude-ls "^1.2.1" - type-check "~0.4.0" - -lines-and-columns@^1.1.6: - version "1.2.4" - resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" - integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== - -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - -lodash.memoize@4.x: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" - integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== - -lodash.merge@^4.6.2: - version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - -make-dir@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== - dependencies: - semver "^6.0.0" - -make-error@1.x: - version "1.3.6" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" - integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== - -makeerror@1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" - integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg== - dependencies: - tmpl "1.0.5" - -md5.js@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" - integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -merge2@^1.3.0, merge2@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" - integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== - -micromatch@^4.0.4: - version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== - dependencies: - braces "^3.0.2" - picomatch "^2.3.1" - -mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - -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== - dependencies: - brace-expansion "^1.1.7" - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + "import-local" "^3.0.2" + "jest-cli" "^28.1.3" + +"js-tokens@^4.0.0": + "integrity" "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + "resolved" "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" + "version" "4.0.0" + +"js-yaml@^3.13.1": + "integrity" "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==" + "resolved" "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz" + "version" "3.14.1" + dependencies: + "argparse" "^1.0.7" + "esprima" "^4.0.0" + +"js-yaml@^4.1.0": + "integrity" "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==" + "resolved" "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" + "version" "4.1.0" + dependencies: + "argparse" "^2.0.1" + +"jsesc@^2.5.1": + "integrity" "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==" + "resolved" "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz" + "version" "2.5.2" + +"json-parse-even-better-errors@^2.3.0": + "integrity" "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + "resolved" "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz" + "version" "2.3.1" + +"json-schema-traverse@^0.4.1": + "integrity" "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "resolved" "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" + "version" "0.4.1" + +"json-stable-stringify-without-jsonify@^1.0.1": + "integrity" "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==" + "resolved" "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" + "version" "1.0.1" + +"json5@^2.2.1": + "integrity" "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==" + "resolved" "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz" + "version" "2.2.1" + +"kleur@^3.0.3": + "integrity" "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==" + "resolved" "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz" + "version" "3.0.3" + +"leven@^3.1.0": + "integrity" "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==" + "resolved" "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz" + "version" "3.1.0" + +"levn@^0.4.1": + "integrity" "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==" + "resolved" "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz" + "version" "0.4.1" + dependencies: + "prelude-ls" "^1.2.1" + "type-check" "~0.4.0" + +"lines-and-columns@^1.1.6": + "integrity" "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" + "resolved" "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz" + "version" "1.2.4" + +"locate-path@^5.0.0": + "integrity" "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==" + "resolved" "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz" + "version" "5.0.0" + dependencies: + "p-locate" "^4.1.0" + +"lodash.memoize@4.x": + "integrity" "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==" + "resolved" "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz" + "version" "4.1.2" + +"lodash.merge@^4.6.2": + "integrity" "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" + "resolved" "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" + "version" "4.6.2" + +"lru-cache@^6.0.0": + "integrity" "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==" + "resolved" "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz" + "version" "6.0.0" + dependencies: + "yallist" "^4.0.0" + +"make-dir@^3.0.0": + "integrity" "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==" + "resolved" "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz" + "version" "3.1.0" + dependencies: + "semver" "^6.0.0" + +"make-error@1.x": + "integrity" "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" + "resolved" "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz" + "version" "1.3.6" + +"makeerror@1.0.12": + "integrity" "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==" + "resolved" "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz" + "version" "1.0.12" + dependencies: + "tmpl" "1.0.5" + +"md5.js@^1.3.4": + "integrity" "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==" + "resolved" "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz" + "version" "1.3.5" + dependencies: + "hash-base" "^3.0.0" + "inherits" "^2.0.1" + "safe-buffer" "^5.1.2" + +"merge-stream@^2.0.0": + "integrity" "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + "resolved" "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz" + "version" "2.0.0" + +"merge2@^1.3.0", "merge2@^1.4.1": + "integrity" "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" + "resolved" "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" + "version" "1.4.1" + +"micromatch@^4.0.4": + "integrity" "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==" + "resolved" "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz" + "version" "4.0.5" + dependencies: + "braces" "^3.0.2" + "picomatch" "^2.3.1" + +"mimic-fn@^2.1.0": + "integrity" "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + "resolved" "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz" + "version" "2.1.0" + +"minimatch@^3.0.4", "minimatch@^3.1.1", "minimatch@^3.1.2": + "integrity" "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==" + "resolved" "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" + "version" "3.1.2" + dependencies: + "brace-expansion" "^1.1.7" + +"ms@2.1.2": + "integrity" "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "resolved" "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" + "version" "2.1.2" + +"natural-compare@^1.4.0": + "integrity" "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" + "resolved" "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" + "version" "1.4.0" -node-int64@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" - integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== - -node-releases@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" - integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg== - -normalize-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -npm-run-path@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== +"node-int64@^0.4.0": + "integrity" "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==" + "resolved" "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz" + "version" "0.4.0" + +"node-releases@^2.0.6": + "integrity" "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==" + "resolved" "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz" + "version" "2.0.6" + +"normalize-path@^3.0.0": + "integrity" "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + "resolved" "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" + "version" "3.0.0" + +"npm-run-path@^4.0.1": + "integrity" "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==" + "resolved" "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz" + "version" "4.0.1" dependencies: - path-key "^3.0.0" - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" + "path-key" "^3.0.0" + +"once@^1.3.0": + "integrity" "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==" + "resolved" "https://registry.npmjs.org/once/-/once-1.4.0.tgz" + "version" "1.4.0" + dependencies: + "wrappy" "1" -onetime@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" +"onetime@^5.1.2": + "integrity" "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==" + "resolved" "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz" + "version" "5.1.2" + dependencies: + "mimic-fn" "^2.1.0" -optionator@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" - integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== - dependencies: - deep-is "^0.1.3" - fast-levenshtein "^2.0.6" - levn "^0.4.1" - prelude-ls "^1.2.1" - type-check "^0.4.0" - word-wrap "^1.2.3" +"optionator@^0.9.1": + "integrity" "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==" + "resolved" "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz" + "version" "0.9.1" + dependencies: + "deep-is" "^0.1.3" + "fast-levenshtein" "^2.0.6" + "levn" "^0.4.1" + "prelude-ls" "^1.2.1" + "type-check" "^0.4.0" + "word-wrap" "^1.2.3" -p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -p-limit@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== +"p-limit@^2.2.0": + "integrity" "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==" + "resolved" "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz" + "version" "2.3.0" + dependencies: + "p-try" "^2.0.0" + +"p-limit@^3.1.0": + "integrity" "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==" + "resolved" "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" + "version" "3.1.0" dependencies: - yocto-queue "^0.1.0" - -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" + "yocto-queue" "^0.1.0" + +"p-locate@^4.1.0": + "integrity" "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==" + "resolved" "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz" + "version" "4.1.0" + dependencies: + "p-limit" "^2.2.0" -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== +"p-try@^2.0.0": + "integrity" "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + "resolved" "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" + "version" "2.2.0" -parent-module@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" - integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== - dependencies: - callsites "^3.0.0" +"parent-module@^1.0.0": + "integrity" "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==" + "resolved" "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" + "version" "1.0.1" + dependencies: + "callsites" "^3.0.0" -parse-json@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" - integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== +"parse-json@^5.2.0": + "integrity" "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==" + "resolved" "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz" + "version" "5.2.0" dependencies: "@babel/code-frame" "^7.0.0" - error-ex "^1.3.1" - json-parse-even-better-errors "^2.3.0" - lines-and-columns "^1.1.6" - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - -path-key@^3.0.0, path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -path-type@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" - integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== - -picocolors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" - integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== - -picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -pirates@^4.0.4: - version "4.0.5" - resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" - integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== - -pkg-dir@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - -prelude-ls@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" - integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== - -prettier@2.7.1: - version "2.7.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" - integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== - -pretty-format@^28.0.0, pretty-format@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-28.1.3.tgz#c9fba8cedf99ce50963a11b27d982a9ae90970d5" - integrity sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q== + "error-ex" "^1.3.1" + "json-parse-even-better-errors" "^2.3.0" + "lines-and-columns" "^1.1.6" + +"path-exists@^4.0.0": + "integrity" "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + "resolved" "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" + "version" "4.0.0" + +"path-is-absolute@^1.0.0": + "integrity" "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" + "resolved" "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + "version" "1.0.1" + +"path-key@^3.0.0", "path-key@^3.1.0": + "integrity" "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + "resolved" "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" + "version" "3.1.1" + +"path-parse@^1.0.7": + "integrity" "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + "resolved" "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" + "version" "1.0.7" + +"path-type@^4.0.0": + "integrity" "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" + "resolved" "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" + "version" "4.0.0" + +"picocolors@^1.0.0": + "integrity" "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + "resolved" "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz" + "version" "1.0.0" + +"picomatch@^2.0.4", "picomatch@^2.2.3", "picomatch@^2.3.1": + "integrity" "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" + "resolved" "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" + "version" "2.3.1" + +"pirates@^4.0.4": + "integrity" "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==" + "resolved" "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz" + "version" "4.0.5" + +"pkg-dir@^4.2.0": + "integrity" "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==" + "resolved" "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz" + "version" "4.2.0" + dependencies: + "find-up" "^4.0.0" + +"prelude-ls@^1.2.1": + "integrity" "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==" + "resolved" "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" + "version" "1.2.1" + +"prettier@2.7.1": + "integrity" "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==" + "resolved" "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz" + "version" "2.7.1" + +"pretty-format@^28.0.0", "pretty-format@^28.1.3": + "integrity" "sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==" + "resolved" "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz" + "version" "28.1.3" dependencies: "@jest/schemas" "^28.1.3" - ansi-regex "^5.0.1" - ansi-styles "^5.0.0" - react-is "^18.0.0" - -prompts@^2.0.1: - version "2.4.2" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" - integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== - dependencies: - kleur "^3.0.3" - sisteransi "^1.0.5" - -punycode@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -queue-microtask@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - -react-is@^18.0.0: - version "18.2.0" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" - integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== - -readable-stream@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -regexpp@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" - integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== - -resolve-cwd@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" - integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== - dependencies: - resolve-from "^5.0.0" - -resolve-from@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" - integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== - -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - -resolve.exports@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.0.tgz#5ce842b94b05146c0e03076985d1d0e7e48c90c9" - integrity sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ== - -resolve@^1.20.0: - version "1.22.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" - integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== - dependencies: - is-core-module "^2.9.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -reusify@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - -rimraf@^3.0.0, rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -ripemd160@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" - integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - -safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -semver@7.x, semver@^7.3.5, semver@^7.3.7: - version "7.3.7" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" - integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== - dependencies: - lru-cache "^6.0.0" - -semver@^6.0.0, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -sha.js@^2.4.0: - version "2.4.11" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" - integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -signal-exit@^3.0.3, signal-exit@^3.0.7: - version "3.0.7" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - -sisteransi@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" - integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== - -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - -source-map-support@0.5.13: - version "0.5.13" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" - integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map@^0.6.0, source-map@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== - -stack-utils@^2.0.3: - version "2.0.5" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.5.tgz#d25265fca995154659dbbfba3b49254778d2fdd5" - integrity sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA== - dependencies: - escape-string-regexp "^2.0.0" - -string-length@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" - integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== - dependencies: - char-regex "^1.0.2" - strip-ansi "^6.0.0" + "ansi-regex" "^5.0.1" + "ansi-styles" "^5.0.0" + "react-is" "^18.0.0" + +"prompts@^2.0.1": + "integrity" "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==" + "resolved" "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz" + "version" "2.4.2" + dependencies: + "kleur" "^3.0.3" + "sisteransi" "^1.0.5" + +"punycode@^2.1.0": + "integrity" "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + "resolved" "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz" + "version" "2.1.1" + +"queue-microtask@^1.2.2": + "integrity" "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" + "resolved" "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" + "version" "1.2.3" + +"react-is@^18.0.0": + "integrity" "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + "resolved" "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz" + "version" "18.2.0" + +"readable-stream@^3.6.0": + "integrity" "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==" + "resolved" "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz" + "version" "3.6.0" + dependencies: + "inherits" "^2.0.3" + "string_decoder" "^1.1.1" + "util-deprecate" "^1.0.1" + +"regexpp@^3.2.0": + "integrity" "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==" + "resolved" "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz" + "version" "3.2.0" + +"require-directory@^2.1.1": + "integrity" "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==" + "resolved" "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" + "version" "2.1.1" + +"resolve-cwd@^3.0.0": + "integrity" "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==" + "resolved" "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz" + "version" "3.0.0" + dependencies: + "resolve-from" "^5.0.0" + +"resolve-from@^4.0.0": + "integrity" "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" + "resolved" "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" + "version" "4.0.0" + +"resolve-from@^5.0.0": + "integrity" "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==" + "resolved" "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz" + "version" "5.0.0" + +"resolve.exports@^1.1.0": + "integrity" "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==" + "resolved" "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz" + "version" "1.1.0" + +"resolve@^1.20.0": + "integrity" "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==" + "resolved" "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz" + "version" "1.22.1" + dependencies: + "is-core-module" "^2.9.0" + "path-parse" "^1.0.7" + "supports-preserve-symlinks-flag" "^1.0.0" + +"reusify@^1.0.4": + "integrity" "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==" + "resolved" "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" + "version" "1.0.4" + +"rimraf@^3.0.0", "rimraf@^3.0.2": + "integrity" "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==" + "resolved" "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" + "version" "3.0.2" + dependencies: + "glob" "^7.1.3" + +"ripemd160@^2.0.1": + "integrity" "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==" + "resolved" "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz" + "version" "2.0.2" + dependencies: + "hash-base" "^3.0.0" + "inherits" "^2.0.1" + +"run-parallel@^1.1.9": + "integrity" "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==" + "resolved" "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" + "version" "1.2.0" + dependencies: + "queue-microtask" "^1.2.2" + +"safe-buffer@^5.0.1", "safe-buffer@^5.1.2", "safe-buffer@^5.2.0", "safe-buffer@~5.2.0": + "integrity" "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + "resolved" "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" + "version" "5.2.1" + +"safe-buffer@~5.1.1": + "integrity" "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "resolved" "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" + "version" "5.1.2" + +"semver@^6.0.0": + "integrity" "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "resolved" "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" + "version" "6.3.0" + +"semver@^6.3.0": + "integrity" "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "resolved" "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" + "version" "6.3.0" + +"semver@^7.3.5", "semver@^7.3.7", "semver@7.x": + "integrity" "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==" + "resolved" "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz" + "version" "7.3.7" + dependencies: + "lru-cache" "^6.0.0" + +"sha.js@^2.4.0": + "integrity" "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==" + "resolved" "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz" + "version" "2.4.11" + dependencies: + "inherits" "^2.0.1" + "safe-buffer" "^5.0.1" + +"shebang-command@^2.0.0": + "integrity" "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==" + "resolved" "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" + "version" "2.0.0" + dependencies: + "shebang-regex" "^3.0.0" + +"shebang-regex@^3.0.0": + "integrity" "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + "resolved" "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" + "version" "3.0.0" + +"signal-exit@^3.0.3", "signal-exit@^3.0.7": + "integrity" "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + "resolved" "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" + "version" "3.0.7" + +"sisteransi@^1.0.5": + "integrity" "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==" + "resolved" "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz" + "version" "1.0.5" + +"slash@^3.0.0": + "integrity" "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" + "resolved" "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" + "version" "3.0.0" + +"source-map-support@0.5.13": + "integrity" "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==" + "resolved" "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz" + "version" "0.5.13" + dependencies: + "buffer-from" "^1.0.0" + "source-map" "^0.6.0" + +"source-map@^0.6.0", "source-map@^0.6.1": + "integrity" "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "resolved" "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" + "version" "0.6.1" + +"sprintf-js@~1.0.2": + "integrity" "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" + "resolved" "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" + "version" "1.0.3" + +"stack-utils@^2.0.3": + "integrity" "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==" + "resolved" "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz" + "version" "2.0.5" + dependencies: + "escape-string-regexp" "^2.0.0" + +"string_decoder@^1.1.1": + "integrity" "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==" + "resolved" "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" + "version" "1.3.0" + dependencies: + "safe-buffer" "~5.2.0" + +"string-length@^4.0.1": + "integrity" "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==" + "resolved" "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz" + "version" "4.0.2" + dependencies: + "char-regex" "^1.0.2" + "strip-ansi" "^6.0.0" + +"string-width@^4.1.0", "string-width@^4.2.0", "string-width@^4.2.3": + "integrity" "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==" + "resolved" "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" + "version" "4.2.3" + dependencies: + "emoji-regex" "^8.0.0" + "is-fullwidth-code-point" "^3.0.0" + "strip-ansi" "^6.0.1" + +"strip-ansi@^6.0.0", "strip-ansi@^6.0.1": + "integrity" "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==" + "resolved" "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" + "version" "6.0.1" + dependencies: + "ansi-regex" "^5.0.1" -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" +"strip-bom@^4.0.0": + "integrity" "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==" + "resolved" "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz" + "version" "4.0.0" -strip-bom@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" - integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== - -strip-final-newline@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" - integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== - -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== +"strip-final-newline@^2.0.0": + "integrity" "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==" + "resolved" "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz" + "version" "2.0.0" + +"strip-json-comments@^3.1.0", "strip-json-comments@^3.1.1": + "integrity" "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" + "resolved" "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" + "version" "3.1.1" + +"supports-color@^5.3.0": + "integrity" "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==" + "resolved" "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" + "version" "5.5.0" dependencies: - has-flag "^3.0.0" + "has-flag" "^3.0.0" -supports-color@^7.0.0, supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" +"supports-color@^7.0.0", "supports-color@^7.1.0": + "integrity" "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==" + "resolved" "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" + "version" "7.2.0" + dependencies: + "has-flag" "^4.0.0" -supports-color@^8.0.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== +"supports-color@^8.0.0": + "integrity" "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==" + "resolved" "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" + "version" "8.1.1" dependencies: - has-flag "^4.0.0" + "has-flag" "^4.0.0" -supports-hyperlinks@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz#3943544347c1ff90b15effb03fc14ae45ec10624" - integrity sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA== +"supports-hyperlinks@^2.0.0": + "integrity" "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==" + "resolved" "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz" + "version" "2.3.0" dependencies: - has-flag "^4.0.0" - supports-color "^7.0.0" + "has-flag" "^4.0.0" + "supports-color" "^7.0.0" -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +"supports-preserve-symlinks-flag@^1.0.0": + "integrity" "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" + "resolved" "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz" + "version" "1.0.0" -terminal-link@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994" - integrity sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ== +"terminal-link@^2.0.0": + "integrity" "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==" + "resolved" "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz" + "version" "2.1.1" dependencies: - ansi-escapes "^4.2.1" - supports-hyperlinks "^2.0.0" + "ansi-escapes" "^4.2.1" + "supports-hyperlinks" "^2.0.0" -test-exclude@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" - integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== +"test-exclude@^6.0.0": + "integrity" "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==" + "resolved" "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz" + "version" "6.0.0" dependencies: "@istanbuljs/schema" "^0.1.2" - glob "^7.1.4" - minimatch "^3.0.4" - -text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== - -tmpl@1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" - integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -ts-jest@28.0.7: - version "28.0.7" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-28.0.7.tgz#e18757a9e44693da9980a79127e5df5a98b37ac6" - integrity sha512-wWXCSmTwBVmdvWrOpYhal79bDpioDy4rTT+0vyUnE3ZzM7LOAAGG9NXwzkEL/a516rQEgnMmS/WKP9jBPCVJyA== - dependencies: - bs-logger "0.x" - fast-json-stable-stringify "2.x" - jest-util "^28.0.0" - json5 "^2.2.1" - lodash.memoize "4.x" - make-error "1.x" - semver "7.x" - yargs-parser "^21.0.1" - -tslib@^1.8.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - -tsutils@^3.21.0: - version "3.21.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" - integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== - dependencies: - tslib "^1.8.1" - -type-check@^0.4.0, type-check@~0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" - integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== - dependencies: - prelude-ls "^1.2.1" - -type-detect@4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" - integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== - -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== - -type-fest@^0.21.3: - version "0.21.3" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" - integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== - -typescript@4.7.4: - version "4.7.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" - integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== - -update-browserslist-db@^1.0.9: - version "1.0.9" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz#2924d3927367a38d5c555413a7ce138fc95fcb18" - integrity sha512-/xsqn21EGVdXI3EXSum1Yckj3ZVZugqyOZQ/CxYPBD/R+ko9NSUScf8tFF4dOKY+2pvSSJA/S+5B8s4Zr4kyvg== - dependencies: - escalade "^3.1.1" - picocolors "^1.0.0" - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -util-deprecate@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== - -v8-compile-cache@^2.0.3: - version "2.3.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" - integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== - -v8-to-istanbul@^9.0.1: - version "9.0.1" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz#b6f994b0b5d4ef255e17a0d17dc444a9f5132fa4" - integrity sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w== + "glob" "^7.1.4" + "minimatch" "^3.0.4" + +"text-table@^0.2.0": + "integrity" "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" + "resolved" "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" + "version" "0.2.0" + +"tmpl@1.0.5": + "integrity" "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==" + "resolved" "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz" + "version" "1.0.5" + +"to-fast-properties@^2.0.0": + "integrity" "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==" + "resolved" "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz" + "version" "2.0.0" + +"to-regex-range@^5.0.1": + "integrity" "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==" + "resolved" "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" + "version" "5.0.1" + dependencies: + "is-number" "^7.0.0" + +"ts-jest@28.0.7": + "integrity" "sha512-wWXCSmTwBVmdvWrOpYhal79bDpioDy4rTT+0vyUnE3ZzM7LOAAGG9NXwzkEL/a516rQEgnMmS/WKP9jBPCVJyA==" + "resolved" "https://registry.npmjs.org/ts-jest/-/ts-jest-28.0.7.tgz" + "version" "28.0.7" + dependencies: + "bs-logger" "0.x" + "fast-json-stable-stringify" "2.x" + "jest-util" "^28.0.0" + "json5" "^2.2.1" + "lodash.memoize" "4.x" + "make-error" "1.x" + "semver" "7.x" + "yargs-parser" "^21.0.1" + +"tslib@^1.8.1": + "integrity" "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + "resolved" "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" + "version" "1.14.1" + +"tsutils@^3.21.0": + "integrity" "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==" + "resolved" "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz" + "version" "3.21.0" + dependencies: + "tslib" "^1.8.1" + +"type-check@^0.4.0", "type-check@~0.4.0": + "integrity" "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==" + "resolved" "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz" + "version" "0.4.0" + dependencies: + "prelude-ls" "^1.2.1" + +"type-detect@4.0.8": + "integrity" "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" + "resolved" "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz" + "version" "4.0.8" + +"type-fest@^0.20.2": + "integrity" "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==" + "resolved" "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" + "version" "0.20.2" + +"type-fest@^0.21.3": + "integrity" "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==" + "resolved" "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz" + "version" "0.21.3" + +"typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta", "typescript@>=4.3", "typescript@4.7.4": + "integrity" "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==" + "resolved" "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz" + "version" "4.7.4" + +"update-browserslist-db@^1.0.9": + "integrity" "sha512-/xsqn21EGVdXI3EXSum1Yckj3ZVZugqyOZQ/CxYPBD/R+ko9NSUScf8tFF4dOKY+2pvSSJA/S+5B8s4Zr4kyvg==" + "resolved" "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz" + "version" "1.0.9" + dependencies: + "escalade" "^3.1.1" + "picocolors" "^1.0.0" + +"uri-js@^4.2.2": + "integrity" "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==" + "resolved" "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" + "version" "4.4.1" + dependencies: + "punycode" "^2.1.0" + +"util-deprecate@^1.0.1": + "integrity" "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + "resolved" "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + "version" "1.0.2" + +"v8-compile-cache@^2.0.3": + "integrity" "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==" + "resolved" "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz" + "version" "2.3.0" + +"v8-to-istanbul@^9.0.1": + "integrity" "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==" + "resolved" "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz" + "version" "9.0.1" dependencies: "@jridgewell/trace-mapping" "^0.3.12" "@types/istanbul-lib-coverage" "^2.0.1" - convert-source-map "^1.6.0" - -walker@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" - integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== - dependencies: - makeerror "1.0.12" - -which@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -word-wrap@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - -write-file-atomic@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd" - integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== - dependencies: - imurmurhash "^0.1.4" - signal-exit "^3.0.7" - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - -yargs-parser@^21.0.0, yargs-parser@^21.0.1: - version "21.1.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" - integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== - -yargs@^17.3.1: - version "17.5.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.5.1.tgz#e109900cab6fcb7fd44b1d8249166feb0b36e58e" - integrity sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.0.0" - -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== + "convert-source-map" "^1.6.0" + +"walker@^1.0.8": + "integrity" "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==" + "resolved" "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz" + "version" "1.0.8" + dependencies: + "makeerror" "1.0.12" + +"which@^2.0.1": + "integrity" "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==" + "resolved" "https://registry.npmjs.org/which/-/which-2.0.2.tgz" + "version" "2.0.2" + dependencies: + "isexe" "^2.0.0" + +"word-wrap@^1.2.3": + "integrity" "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" + "resolved" "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz" + "version" "1.2.3" + +"wrap-ansi@^7.0.0": + "integrity" "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==" + "resolved" "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" + "version" "7.0.0" + dependencies: + "ansi-styles" "^4.0.0" + "string-width" "^4.1.0" + "strip-ansi" "^6.0.0" + +"wrappy@1": + "integrity" "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + "resolved" "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + "version" "1.0.2" + +"write-file-atomic@^4.0.1": + "integrity" "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==" + "resolved" "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz" + "version" "4.0.2" + dependencies: + "imurmurhash" "^0.1.4" + "signal-exit" "^3.0.7" + +"y18n@^5.0.5": + "integrity" "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" + "resolved" "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" + "version" "5.0.8" + +"yallist@^4.0.0": + "integrity" "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + "resolved" "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" + "version" "4.0.0" + +"yargs-parser@^21.0.0", "yargs-parser@^21.0.1": + "integrity" "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==" + "resolved" "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz" + "version" "21.1.1" + +"yargs@^17.3.1": + "integrity" "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==" + "resolved" "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz" + "version" "17.5.1" + dependencies: + "cliui" "^7.0.2" + "escalade" "^3.1.1" + "get-caller-file" "^2.0.5" + "require-directory" "^2.1.1" + "string-width" "^4.2.3" + "y18n" "^5.0.5" + "yargs-parser" "^21.0.0" + +"yocto-queue@^0.1.0": + "integrity" "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==" + "resolved" "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" + "version" "0.1.0" From 09ecb414e0aefc6dd1ace2d9eed4ef2f80408390 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Fri, 16 Jun 2023 16:37:37 +0100 Subject: [PATCH 017/120] Start adding in the Identity Serializer --- src/pbaas/Identity.ts | 83 ++++++++++++++++++++++++++++++++++++++++++ src/pbaas/Principal.ts | 12 +++--- 2 files changed, 89 insertions(+), 6 deletions(-) create mode 100644 src/pbaas/Identity.ts diff --git a/src/pbaas/Identity.ts b/src/pbaas/Identity.ts new file mode 100644 index 0000000..0c69a92 --- /dev/null +++ b/src/pbaas/Identity.ts @@ -0,0 +1,83 @@ +import varuint from '../utils/varuint' +import bufferutils from '../utils/bufferutils' +import { BigNumber } from '../utils/types/BigNumber'; +import { Principal } from './Principal'; +import { TxDestination } from './TxDestination'; +import { fromBase58Check, toBase58Check } from '../utils/address'; +import { R_ADDR_VERSION } from '../constants/vdxf'; +import { BN } from 'bn.js'; + +export const VERSION_INVALID = new BN(0, 10) +export const VERSION_CURRENT = new BN(1, 10) + +const { BufferReader, BufferWriter } = bufferutils + +export class Identity extends Principal { + + parent: string; + system_id: string; + name: string; + contentmap: Map; + contentmultimap: Map; + revocation_authority: string; + recovery_authority: string; + timelock: number; + + constructor (data?: { + version?: BigNumber, + flags?: BigNumber, + primary_addresses?: Array, + min_sigs?: BigNumber, + parent?: string, + system_id?: string, + name?: string, + contentmap?: Map; + contentmultimap?: Map; + revocation_authority?: string; + recovery_authority?: string; + timelock?: number; + + }) { + + super (data) + + if (data != null) { + if (data.parent != null) this.parent = data.parent + if (data.system_id != null) this.system_id = data.system_id + if (data.min_sigs != null) this.min_sigs = data.min_sigs + if (data.contentmap != null) this.contentmap = new Map(data.contentmap || []); + if (data.contentmultimap != null) this.contentmultimap = new Map(data.contentmultimap || []); + if (data.revocation_authority != null) this.revocation_authority = data.revocation_authority + if (data.timelock != null) this.timelock = data.timelock + } + } + + dataByteLength() { + let byteLength = 0; + + byteLength += this._dataByteLength(); //get the principal byte length + length += fromBase58Check(this.parent).hash.length; // parent + + length += varuint.encodingLength(this.name.length) // name compact size + length += this.name.length; // name_bytes + + //TODO: + + return byteLength + } + + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this._dataByteLength())) + + //TODO: + + return bufferWriter.buffer + } + + fromBuffer(buffer, offset: number = 0) { + const reader = new BufferReader(buffer, offset); + //TODO: + + return reader.offset; + } +} \ No newline at end of file diff --git a/src/pbaas/Principal.ts b/src/pbaas/Principal.ts index 9213a76..f297fd3 100644 --- a/src/pbaas/Principal.ts +++ b/src/pbaas/Principal.ts @@ -21,7 +21,7 @@ export class Principal { version?: BigNumber, flags?: BigNumber, min_sigs?: BigNumber, - primary_addresses?: TxDestination + primary_addresses?: Array; }) { this.flags = VERSION_INVALID; @@ -31,12 +31,12 @@ export class Principal { if (data.flags != null) this.flags = data.flags if (data.version != null) this.version = data.version if (data.min_sigs != null) this.min_sigs = data.min_sigs - if (data.primary_addresses != null) this.primary_addresses = data.primary_addresses + if (data.primary_addresses != null) this.primary_addresses = new TxDestination({primary_addresses: data.primary_addresses}); } } - dataByteLength() { + _dataByteLength() { let byteLength = 0; byteLength += 4; //uint32 version size @@ -48,8 +48,8 @@ export class Principal { return byteLength } - toBuffer() { - const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())) + _toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this._dataByteLength())) bufferWriter.writeUInt32(this.version.toNumber()) bufferWriter.writeUInt32(this.flags.toNumber()) @@ -59,7 +59,7 @@ export class Principal { return bufferWriter.buffer } - fromBuffer(buffer, offset: number = 0) { + _fromBuffer(buffer, offset: number = 0) { const reader = new BufferReader(buffer, offset); this.flags = new BN(reader.readUInt32(), 10); From 917c6d0cc4f577c12aaa1382758d55fc750f4faf Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Fri, 16 Jun 2023 16:58:15 +0100 Subject: [PATCH 018/120] Remove dupliacate and add to index --- src/pbaas/Identity.ts | 2 -- src/pbaas/index.ts | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pbaas/Identity.ts b/src/pbaas/Identity.ts index 0c69a92..65e41a2 100644 --- a/src/pbaas/Identity.ts +++ b/src/pbaas/Identity.ts @@ -7,8 +7,6 @@ import { fromBase58Check, toBase58Check } from '../utils/address'; import { R_ADDR_VERSION } from '../constants/vdxf'; import { BN } from 'bn.js'; -export const VERSION_INVALID = new BN(0, 10) -export const VERSION_CURRENT = new BN(1, 10) const { BufferReader, BufferWriter } = bufferutils diff --git a/src/pbaas/index.ts b/src/pbaas/index.ts index 805ff8d..7d18df1 100644 --- a/src/pbaas/index.ts +++ b/src/pbaas/index.ts @@ -1,4 +1,5 @@ export * from './CurrencyValueMap' +export * from './Identity' export * from './ReserveTransfer' export * from './TokenOutput' export * from './TransferDestination' \ No newline at end of file From c7e00c7733332e0fa3741bba00f329eef1f61146 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Wed, 21 Jun 2023 13:44:16 +0100 Subject: [PATCH 019/120] Autosave 1:44 21/06/2023 --- package-lock.json | 8331 -------------------------- package.json | 1 + src/__tests__/pbaas/identity.test.ts | 19 + src/pbaas/Identity.ts | 179 +- src/pbaas/Principal.ts | 87 +- src/pbaas/TxDestination.ts | 85 - src/vdxf/classes/Challenge.ts | 4 +- yarn.lock | 4854 +++++++-------- 8 files changed, 2736 insertions(+), 10824 deletions(-) delete mode 100644 package-lock.json create mode 100644 src/__tests__/pbaas/identity.test.ts delete mode 100644 src/pbaas/TxDestination.ts diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 49bdd32..0000000 --- a/package-lock.json +++ /dev/null @@ -1,8331 +0,0 @@ -{ - "name": "verus-typescript-primitives", - "version": "1.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "verus-typescript-primitives", - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "base64url": "3.0.1", - "bn.js": "5.2.1", - "bs58check": "https://github.com/bitcoinjs/bs58check", - "create-hash": "1.2.0" - }, - "devDependencies": { - "@types/bn.js": "5.1.1", - "@types/bs58check": "2.1.0", - "@types/create-hash": "1.2.2", - "@types/jest": "28.1.6", - "@types/node": "^18.7.22", - "@typescript-eslint/eslint-plugin": "5.30.7", - "@typescript-eslint/parser": "5.30.7", - "eslint": "8.20.0", - "eslint-plugin-jest": "26.6.0", - "jest": "28.1.3", - "prettier": "2.7.1", - "ts-jest": "28.0.7", - "typescript": "4.7.4" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", - "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.1.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.3.tgz", - "integrity": "sha512-prBHMK4JYYK+wDjJF1q99KK4JLL+egWS4nmNqdlMUgCExMZ+iZW0hGhyC3VEbsPjvaN0TBhW//VIFwBrk8sEiw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.3.tgz", - "integrity": "sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==", - "dev": true, - "dependencies": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.3", - "@babel/helper-compilation-targets": "^7.19.3", - "@babel/helper-module-transforms": "^7.19.0", - "@babel/helpers": "^7.19.0", - "@babel/parser": "^7.19.3", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.3", - "@babel/types": "^7.19.3", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.1", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/generator": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.3.tgz", - "integrity": "sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.19.3", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz", - "integrity": "sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.19.3", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", - "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", - "dev": true, - "dependencies": { - "@babel/template": "^7.18.10", - "@babel/types": "^7.19.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", - "dev": true, - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", - "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", - "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", - "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.18.6", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", - "@babel/types": "^7.19.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", - "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", - "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", - "dev": true, - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz", - "integrity": "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", - "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", - "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.0.tgz", - "integrity": "sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==", - "dev": true, - "dependencies": { - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", - "@babel/types": "^7.19.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/parser": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.3.tgz", - "integrity": "sha512-pJ9xOlNWHiy9+FuFP09DEAFbAn4JskgRsVcc169w2xRBC3FRGuQEwjeIMMND9L2zc0iEhO/tGv4Zq+km+hxNpQ==", - "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", - "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", - "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/template": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", - "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.18.10", - "@babel/types": "^7.18.10" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.3.tgz", - "integrity": "sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.3", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.19.3", - "@babel/types": "^7.19.3", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse/node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/types": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz", - "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", - "dev": true, - "dependencies": { - "@babel/helper-string-parser": "^7.18.10", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true - }, - "node_modules/@eslint/eslintrc": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.2.tgz", - "integrity": "sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.4.0", - "globals": "^13.15.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", - "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", - "dev": true, - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true - }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/console": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-28.1.3.tgz", - "integrity": "sha512-QPAkP5EwKdK/bxIr6C1I4Vs0rm2nHiANzj/Z5X2JQkrZo6IqvC4ldZ9K95tF0HdidhA8Bo6egxSzUFPYKcEXLw==", - "dev": true, - "dependencies": { - "@jest/types": "^28.1.3", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^28.1.3", - "jest-util": "^28.1.3", - "slash": "^3.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/core": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-28.1.3.tgz", - "integrity": "sha512-CIKBrlaKOzA7YG19BEqCw3SLIsEwjZkeJzf5bdooVnW4bH5cktqe3JX+G2YV1aK5vP8N9na1IGWFzYaTp6k6NA==", - "dev": true, - "dependencies": { - "@jest/console": "^28.1.3", - "@jest/reporters": "^28.1.3", - "@jest/test-result": "^28.1.3", - "@jest/transform": "^28.1.3", - "@jest/types": "^28.1.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^28.1.3", - "jest-config": "^28.1.3", - "jest-haste-map": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.3", - "jest-resolve-dependencies": "^28.1.3", - "jest-runner": "^28.1.3", - "jest-runtime": "^28.1.3", - "jest-snapshot": "^28.1.3", - "jest-util": "^28.1.3", - "jest-validate": "^28.1.3", - "jest-watcher": "^28.1.3", - "micromatch": "^4.0.4", - "pretty-format": "^28.1.3", - "rimraf": "^3.0.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/environment": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.1.3.tgz", - "integrity": "sha512-1bf40cMFTEkKyEf585R9Iz1WayDjHoHqvts0XFYEqyKM3cFWDpeMoqKKTAF9LSYQModPUlh8FKptoM2YcMWAXA==", - "dev": true, - "dependencies": { - "@jest/fake-timers": "^28.1.3", - "@jest/types": "^28.1.3", - "@types/node": "*", - "jest-mock": "^28.1.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/expect": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-28.1.3.tgz", - "integrity": "sha512-lzc8CpUbSoE4dqT0U+g1qODQjBRHPpCPXissXD4mS9+sWQdmmpeJ9zSH1rS1HEkrsMN0fb7nKrJ9giAR1d3wBw==", - "dev": true, - "dependencies": { - "expect": "^28.1.3", - "jest-snapshot": "^28.1.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/expect-utils": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.1.3.tgz", - "integrity": "sha512-wvbi9LUrHJLn3NlDW6wF2hvIMtd4JUl2QNVrjq+IBSHirgfrR3o9RnVtxzdEGO2n9JyIWwHnLfby5KzqBGg2YA==", - "dev": true, - "dependencies": { - "jest-get-type": "^28.0.2" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/fake-timers": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.1.3.tgz", - "integrity": "sha512-D/wOkL2POHv52h+ok5Oj/1gOG9HSywdoPtFsRCUmlCILXNn5eIWmcnd3DIiWlJnpGvQtmajqBP95Ei0EimxfLw==", - "dev": true, - "dependencies": { - "@jest/types": "^28.1.3", - "@sinonjs/fake-timers": "^9.1.2", - "@types/node": "*", - "jest-message-util": "^28.1.3", - "jest-mock": "^28.1.3", - "jest-util": "^28.1.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/globals": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-28.1.3.tgz", - "integrity": "sha512-XFU4P4phyryCXu1pbcqMO0GSQcYe1IsalYCDzRNyhetyeyxMcIxa11qPNDpVNLeretItNqEmYYQn1UYz/5x1NA==", - "dev": true, - "dependencies": { - "@jest/environment": "^28.1.3", - "@jest/expect": "^28.1.3", - "@jest/types": "^28.1.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/reporters": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-28.1.3.tgz", - "integrity": "sha512-JuAy7wkxQZVNU/V6g9xKzCGC5LVXx9FDcABKsSXp5MiKPEE2144a/vXTEDoyzjUpZKfVwp08Wqg5A4WfTMAzjg==", - "dev": true, - "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^28.1.3", - "@jest/test-result": "^28.1.3", - "@jest/transform": "^28.1.3", - "@jest/types": "^28.1.3", - "@jridgewell/trace-mapping": "^0.3.13", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "^28.1.3", - "jest-util": "^28.1.3", - "jest-worker": "^28.1.3", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "terminal-link": "^2.0.0", - "v8-to-istanbul": "^9.0.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/schemas": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-28.1.3.tgz", - "integrity": "sha512-/l/VWsdt/aBXgjshLWOFyFt3IVdYypu5y2Wn2rOO1un6nkqIn8SLXzgIMYXFyYsRWDyF5EthmKJMIdJvk08grg==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.24.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/source-map": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-28.1.2.tgz", - "integrity": "sha512-cV8Lx3BeStJb8ipPHnqVw/IM2VCMWO3crWZzYodSIkxXnRcXJipCdx1JCK0K5MsJJouZQTH73mzf4vgxRaH9ww==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.13", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/test-result": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-28.1.3.tgz", - "integrity": "sha512-kZAkxnSE+FqE8YjW8gNuoVkkC9I7S1qmenl8sGcDOLropASP+BkcGKwhXoyqQuGOGeYY0y/ixjrd/iERpEXHNg==", - "dev": true, - "dependencies": { - "@jest/console": "^28.1.3", - "@jest/types": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/test-sequencer": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.1.3.tgz", - "integrity": "sha512-NIMPEqqa59MWnDi1kvXXpYbqsfQmSJsIbnd85mdVGkiDfQ9WQQTXOLsvISUfonmnBT+w85WEgneCigEEdHDFxw==", - "dev": true, - "dependencies": { - "@jest/test-result": "^28.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.3", - "slash": "^3.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/transform": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.3.tgz", - "integrity": "sha512-u5dT5di+oFI6hfcLOHGTAfmUxFRrjK+vnaP0kkVow9Md/M7V/MxqQMOz/VV25UZO8pzeA9PjfTpOu6BDuwSPQA==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^28.1.3", - "@jridgewell/trace-mapping": "^0.3.13", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.3", - "jest-regex-util": "^28.0.2", - "jest-util": "^28.1.3", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/types": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", - "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", - "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.15", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", - "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "node_modules/@noble/hashes": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", - "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@sinclair/typebox": { - "version": "0.24.43", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.43.tgz", - "integrity": "sha512-1orQTvtazZmsPeBroJjysvsOQCYV2yjWlebkSY38pl5vr2tdLjEJ+LoxITlGNZaH2RE19WlAwQMkH/7C14wLfw==", - "dev": true - }, - "node_modules/@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", - "dev": true, - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", - "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.7.0" - } - }, - "node_modules/@types/babel__core": { - "version": "7.1.19", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", - "integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "node_modules/@types/babel__generator": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", - "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__template": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", - "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__traverse": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.2.tgz", - "integrity": "sha512-FcFaxOr2V5KZCviw1TnutEMVUVsGt4D2hP1TAfXZAMKuHYW3xQhe3jTxNPWutgCJ3/X1c5yX8ZoGVEItxKbwBg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.3.0" - } - }, - "node_modules/@types/bn.js": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.1.tgz", - "integrity": "sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/bs58check": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@types/bs58check/-/bs58check-2.1.0.tgz", - "integrity": "sha512-OxsysnJQh82vy9DRbOcw9m2j/WiyqZLn0YBhKxdQ+aCwoHj+tWzyCgpwAkr79IfDXZKxc6h7k89T9pwS78CqTQ==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/create-hash": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@types/create-hash/-/create-hash-1.2.2.tgz", - "integrity": "sha512-Fg8/kfMJObbETFU/Tn+Y0jieYewryLrbKwLCEIwPyklZZVY2qB+64KFjhplGSw+cseZosfFXctXO+PyIYD8iZQ==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/graceful-fs": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", - "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", - "dev": true - }, - "node_modules/@types/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", - "dev": true, - "dependencies": { - "@types/istanbul-lib-coverage": "*" - } - }, - "node_modules/@types/istanbul-reports": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", - "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", - "dev": true, - "dependencies": { - "@types/istanbul-lib-report": "*" - } - }, - "node_modules/@types/jest": { - "version": "28.1.6", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-28.1.6.tgz", - "integrity": "sha512-0RbGAFMfcBJKOmqRazM8L98uokwuwD5F8rHrv/ZMbrZBwVOWZUyPG6VFNscjYr/vjM3Vu4fRrCPbOs42AfemaQ==", - "dev": true, - "dependencies": { - "jest-matcher-utils": "^28.0.0", - "pretty-format": "^28.0.0" - } - }, - "node_modules/@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", - "dev": true - }, - "node_modules/@types/node": { - "version": "18.7.22", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.22.tgz", - "integrity": "sha512-TsmoXYd4zrkkKjJB0URF/mTIKPl+kVcbqClB2F/ykU7vil1BfWZVndOnpEIozPv4fURD28gyPFeIkW2G+KXOvw==", - "dev": true - }, - "node_modules/@types/prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow==", - "dev": true - }, - "node_modules/@types/stack-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", - "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", - "dev": true - }, - "node_modules/@types/yargs": { - "version": "17.0.13", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz", - "integrity": "sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg==", - "dev": true, - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@types/yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", - "dev": true - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.7.tgz", - "integrity": "sha512-l4L6Do+tfeM2OK0GJsU7TUcM/1oN/N25xHm3Jb4z3OiDU4Lj8dIuxX9LpVMS9riSXQs42D1ieX7b85/r16H9Fw==", - "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "5.30.7", - "@typescript-eslint/type-utils": "5.30.7", - "@typescript-eslint/utils": "5.30.7", - "debug": "^4.3.4", - "functional-red-black-tree": "^1.0.1", - "ignore": "^5.2.0", - "regexpp": "^3.2.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.30.7.tgz", - "integrity": "sha512-Rg5xwznHWWSy7v2o0cdho6n+xLhK2gntImp0rJroVVFkcYFYQ8C8UJTSuTw/3CnExBmPjycjmUJkxVmjXsld6A==", - "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "5.30.7", - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/typescript-estree": "5.30.7", - "debug": "^4.3.4" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.30.7.tgz", - "integrity": "sha512-7BM1bwvdF1UUvt+b9smhqdc/eniOnCKxQT/kj3oXtj3LqnTWCAM0qHRHfyzCzhEfWX0zrW7KqXXeE4DlchZBKw==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/visitor-keys": "5.30.7" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.30.7.tgz", - "integrity": "sha512-nD5qAE2aJX/YLyKMvOU5jvJyku4QN5XBVsoTynFrjQZaDgDV6i7QHFiYCx10wvn7hFvfuqIRNBtsgaLe0DbWhw==", - "dev": true, - "dependencies": { - "@typescript-eslint/utils": "5.30.7", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/types": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.7.tgz", - "integrity": "sha512-ocVkETUs82+U+HowkovV6uxf1AnVRKCmDRNUBUUo46/5SQv1owC/EBFkiu4MOHeZqhKz2ktZ3kvJJ1uFqQ8QPg==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.7.tgz", - "integrity": "sha512-tNslqXI1ZdmXXrHER83TJ8OTYl4epUzJC0aj2i4DMDT4iU+UqLT3EJeGQvJ17BMbm31x5scSwo3hPM0nqQ1AEA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/visitor-keys": "5.30.7", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.30.7.tgz", - "integrity": "sha512-Z3pHdbFw+ftZiGUnm1GZhkJgVqsDL5CYW2yj+TB2mfXDFOMqtbzQi2dNJIyPqPbx9mv2kUxS1gU+r2gKlKi1rQ==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.30.7", - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/typescript-estree": "5.30.7", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.7.tgz", - "integrity": "sha512-KrRXf8nnjvcpxDFOKej4xkD7657+PClJs5cJVSG7NNoCNnjEdc46juNAQt7AyuWctuCgs6mVRc1xGctEqrjxWw==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.30.7", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-escapes/node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-jest": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.3.tgz", - "integrity": "sha512-epUaPOEWMk3cWX0M/sPvCHHCe9fMFAa/9hXEgKP8nFfNl/jlGkE9ucq9NqkZGXLDduCJYS0UvSlPUwC0S+rH6Q==", - "dev": true, - "dependencies": { - "@jest/transform": "^28.1.3", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^28.1.3", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.8.0" - } - }, - "node_modules/babel-plugin-istanbul": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", - "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-jest-hoist": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.3.tgz", - "integrity": "sha512-Ys3tUKAmfnkRUpPdpa98eYrAR0nV+sSFUZZEGuQ2EbFd1y4SOLtD5QDNHAq+bb9a+bbXvYQC4b+ID/THIMcU6Q==", - "dev": true, - "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", - "dev": true, - "dependencies": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/babel-preset-jest": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.1.3.tgz", - "integrity": "sha512-L+fupJvlWAHbQfn74coNX3zf60LXMJsezNvvx8eIh7iOR1luJ1poxYgQk1F8PYtNq/6QODDHCqsSnTFSWC491A==", - "dev": true, - "dependencies": { - "babel-plugin-jest-hoist": "^28.1.3", - "babel-preset-current-node-syntax": "^1.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/base-x": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", - "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" - }, - "node_modules/base64url": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", - "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.21.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", - "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - } - ], - "dependencies": { - "caniuse-lite": "^1.0.30001400", - "electron-to-chromium": "^1.4.251", - "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.9" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/bs-logger": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", - "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", - "dev": true, - "dependencies": { - "fast-json-stable-stringify": "2.x" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/bs58": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", - "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", - "dependencies": { - "base-x": "^4.0.0" - } - }, - "node_modules/bs58check": { - "version": "3.0.1", - "resolved": "git+ssh://git@github.com/bitcoinjs/bs58check.git", - "integrity": "sha512-baICxaJy1rqIByQPpjsoHVEuaADwsvZqZNlaFtxMHDlWeMHqXKnKYlcor7s+bXrQe0xxnw+exZBmtw/8OAdePA==", - "license": "MIT", - "dependencies": { - "@noble/hashes": "^1.2.0", - "bs58": "^5.0.0" - } - }, - "node_modules/bser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", - "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", - "dev": true, - "dependencies": { - "node-int64": "^0.4.0" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001412", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001412.tgz", - "integrity": "sha512-+TeEIee1gS5bYOiuf+PS/kp2mrXic37Hl66VY6EAfxasIk5fELTktK2oOezYed12H8w7jt3s512PpulQidPjwA==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - } - ] - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/char-regex": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", - "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/ci-info": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.4.0.tgz", - "integrity": "sha512-t5QdPT5jq3o262DOQ8zA6E1tlH2upmUc4Hlvrbx1pGYJuiiHl7O7rvVNI+l8HTVhd/q3Qc9vqimkNk5yiXsAug==", - "dev": true - }, - "node_modules/cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/cjs-module-lexer": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", - "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", - "dev": true - }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", - "dev": true, - "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" - } - }, - "node_modules/collect-v8-coverage": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", - "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", - "dev": true - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.1" - } - }, - "node_modules/convert-source-map/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dependencies": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", - "dev": true - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "node_modules/deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/detect-newline": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", - "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/diff-sequences": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", - "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.4.266", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.266.tgz", - "integrity": "sha512-saJTYECxUSv7eSpnXw0XIEvUkP9x4s/x2mm3TVX7k4rIFS6f5TjBih1B5h437WzIhHQjid+d8ouQzPQskMervQ==", - "dev": true - }, - "node_modules/emittery": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", - "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "8.20.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.20.0.tgz", - "integrity": "sha512-d4ixhz5SKCa1D6SCPrivP7yYVi7nyD6A4vs6HIAul9ujBzcEmZVM3/0NN/yu5nKhmO1wjp5xQ46iRfmDGlOviA==", - "dev": true, - "dependencies": { - "@eslint/eslintrc": "^1.3.0", - "@humanwhocodes/config-array": "^0.9.2", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.2", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^6.0.1", - "globals": "^13.15.0", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-plugin-jest": { - "version": "26.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-26.6.0.tgz", - "integrity": "sha512-f8n46/97ZFdU4KqeQYqO8AEVGIhHWvkpgNBWHH3jrM28/y8llnbf3IjfIKv6p2pZIMinK1PCqbbROxs9Eud02Q==", - "dev": true, - "dependencies": { - "@typescript-eslint/utils": "^5.10.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "@typescript-eslint/eslint-plugin": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "@typescript-eslint/eslint-plugin": { - "optional": true - }, - "jest": { - "optional": true - } - } - }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/eslint/node_modules/eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/eslint/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/espree": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", - "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", - "dev": true, - "dependencies": { - "acorn": "^8.8.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", - "dev": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/expect": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.3.tgz", - "integrity": "sha512-eEh0xn8HlsuOBxFgIss+2mX85VAS4Qy3OSkjV7rlBWljtA4oWH37glVGyOZSZvErDT/yBywZdPGwCXuTvSG85g==", - "dev": true, - "dependencies": { - "@jest/expect-utils": "^28.1.3", - "jest-get-type": "^28.0.2", - "jest-matcher-utils": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-util": "^28.1.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "node_modules/fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fb-watchman": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", - "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", - "dev": true, - "dependencies": { - "bser": "2.1.1" - } - }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "dependencies": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", - "dev": true - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "dev": true - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/hash-base": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", - "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", - "dependencies": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true - }, - "node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true, - "engines": { - "node": ">=10.17.0" - } - }, - "node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", - "dev": true, - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true - }, - "node_modules/is-core-module": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", - "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-generator-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", - "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz", - "integrity": "sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A==", - "dev": true, - "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", - "dev": true, - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-reports": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", - "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", - "dev": true, - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest/-/jest-28.1.3.tgz", - "integrity": "sha512-N4GT5on8UkZgH0O5LUavMRV1EDEhNTL0KEfRmDIeZHSV7p2XgLoY9t9VDUgL6o+yfdgYHVxuz81G8oB9VG5uyA==", - "dev": true, - "dependencies": { - "@jest/core": "^28.1.3", - "@jest/types": "^28.1.3", - "import-local": "^3.0.2", - "jest-cli": "^28.1.3" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-changed-files": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-28.1.3.tgz", - "integrity": "sha512-esaOfUWJXk2nfZt9SPyC8gA1kNfdKLkQWyzsMlqq8msYSlNKfmZxfRgZn4Cd4MGVUF+7v6dBs0d5TOAKa7iIiA==", - "dev": true, - "dependencies": { - "execa": "^5.0.0", - "p-limit": "^3.1.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-circus": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-28.1.3.tgz", - "integrity": "sha512-cZ+eS5zc79MBwt+IhQhiEp0OeBddpc1n8MBo1nMB8A7oPMKEO+Sre+wHaLJexQUj9Ya/8NOBY0RESUgYjB6fow==", - "dev": true, - "dependencies": { - "@jest/environment": "^28.1.3", - "@jest/expect": "^28.1.3", - "@jest/test-result": "^28.1.3", - "@jest/types": "^28.1.3", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^0.7.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^28.1.3", - "jest-matcher-utils": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-runtime": "^28.1.3", - "jest-snapshot": "^28.1.3", - "jest-util": "^28.1.3", - "p-limit": "^3.1.0", - "pretty-format": "^28.1.3", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-cli": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-28.1.3.tgz", - "integrity": "sha512-roY3kvrv57Azn1yPgdTebPAXvdR2xfezaKKYzVxZ6It/5NCxzJym6tUI5P1zkdWhfUYkxEI9uZWcQdaFLo8mJQ==", - "dev": true, - "dependencies": { - "@jest/core": "^28.1.3", - "@jest/test-result": "^28.1.3", - "@jest/types": "^28.1.3", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "import-local": "^3.0.2", - "jest-config": "^28.1.3", - "jest-util": "^28.1.3", - "jest-validate": "^28.1.3", - "prompts": "^2.0.1", - "yargs": "^17.3.1" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-config": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-28.1.3.tgz", - "integrity": "sha512-MG3INjByJ0J4AsNBm7T3hsuxKQqFIiRo/AUqb1q9LRKI5UU6Aar9JHbr9Ivn1TVwfUD9KirRoM/T6u8XlcQPHQ==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^28.1.3", - "@jest/types": "^28.1.3", - "babel-jest": "^28.1.3", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^28.1.3", - "jest-environment-node": "^28.1.3", - "jest-get-type": "^28.0.2", - "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.3", - "jest-runner": "^28.1.3", - "jest-util": "^28.1.3", - "jest-validate": "^28.1.3", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^28.1.3", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "node_modules/jest-diff": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.3.tgz", - "integrity": "sha512-8RqP1B/OXzjjTWkqMX67iqgwBVJRgCyKD3L9nq+6ZqJMdvjE8RgHktqZ6jNrkdMT+dJuYNI3rhQpxaz7drJHfw==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^28.1.1", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-docblock": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.1.1.tgz", - "integrity": "sha512-3wayBVNiOYx0cwAbl9rwm5kKFP8yHH3d/fkEaL02NPTkDojPtheGB7HZSFY4wzX+DxyrvhXz0KSCVksmCknCuA==", - "dev": true, - "dependencies": { - "detect-newline": "^3.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-each": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-28.1.3.tgz", - "integrity": "sha512-arT1z4sg2yABU5uogObVPvSlSMQlDA48owx07BDPAiasW0yYpYHYOo4HHLz9q0BVzDVU4hILFjzJw0So9aCL/g==", - "dev": true, - "dependencies": { - "@jest/types": "^28.1.3", - "chalk": "^4.0.0", - "jest-get-type": "^28.0.2", - "jest-util": "^28.1.3", - "pretty-format": "^28.1.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-environment-node": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.1.3.tgz", - "integrity": "sha512-ugP6XOhEpjAEhGYvp5Xj989ns5cB1K6ZdjBYuS30umT4CQEETaxSiPcZ/E1kFktX4GkrcM4qu07IIlDYX1gp+A==", - "dev": true, - "dependencies": { - "@jest/environment": "^28.1.3", - "@jest/fake-timers": "^28.1.3", - "@jest/types": "^28.1.3", - "@types/node": "*", - "jest-mock": "^28.1.3", - "jest-util": "^28.1.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-haste-map": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.3.tgz", - "integrity": "sha512-3S+RQWDXccXDKSWnkHa/dPwt+2qwA8CJzR61w3FoYCvoo3Pn8tvGcysmMF0Bj0EX5RYvAI2EIvC57OmotfdtKA==", - "dev": true, - "dependencies": { - "@jest/types": "^28.1.3", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^28.0.2", - "jest-util": "^28.1.3", - "jest-worker": "^28.1.3", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" - } - }, - "node_modules/jest-leak-detector": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.1.3.tgz", - "integrity": "sha512-WFVJhnQsiKtDEo5lG2mM0v40QWnBM+zMdHHyJs8AWZ7J0QZJS59MsyKeJHWhpBZBH32S48FOVvGyOFT1h0DlqA==", - "dev": true, - "dependencies": { - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-matcher-utils": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.3.tgz", - "integrity": "sha512-kQeJ7qHemKfbzKoGjHHrRKH6atgxMk8Enkk2iPQ3XwO6oE/KYD8lMYOziCkeSB9G4adPM4nR1DE8Tf5JeWH6Bw==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^28.1.3", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-message-util": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.3.tgz", - "integrity": "sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^28.1.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^28.1.3", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-mock": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.3.tgz", - "integrity": "sha512-o3J2jr6dMMWYVH4Lh/NKmDXdosrsJgi4AviS8oXLujcjpCMBb1FMsblDnOXKZKfSiHLxYub1eS0IHuRXsio9eA==", - "dev": true, - "dependencies": { - "@jest/types": "^28.1.3", - "@types/node": "*" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-pnp-resolver": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", - "dev": true, - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" - }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } - } - }, - "node_modules/jest-regex-util": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", - "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-resolve": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.1.3.tgz", - "integrity": "sha512-Z1W3tTjE6QaNI90qo/BJpfnvpxtaFTFw5CDgwpyE/Kz8U/06N1Hjf4ia9quUhCh39qIGWF1ZuxFiBiJQwSEYKQ==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.3", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^28.1.3", - "jest-validate": "^28.1.3", - "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-resolve-dependencies": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.3.tgz", - "integrity": "sha512-qa0QO2Q0XzQoNPouMbCc7Bvtsem8eQgVPNkwn9LnS+R2n8DaVDPL/U1gngC0LTl1RYXJU0uJa2BMC2DbTfFrHA==", - "dev": true, - "dependencies": { - "jest-regex-util": "^28.0.2", - "jest-snapshot": "^28.1.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-runner": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-28.1.3.tgz", - "integrity": "sha512-GkMw4D/0USd62OVO0oEgjn23TM+YJa2U2Wu5zz9xsQB1MxWKDOlrnykPxnMsN0tnJllfLPinHTka61u0QhaxBA==", - "dev": true, - "dependencies": { - "@jest/console": "^28.1.3", - "@jest/environment": "^28.1.3", - "@jest/test-result": "^28.1.3", - "@jest/transform": "^28.1.3", - "@jest/types": "^28.1.3", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.10.2", - "graceful-fs": "^4.2.9", - "jest-docblock": "^28.1.1", - "jest-environment-node": "^28.1.3", - "jest-haste-map": "^28.1.3", - "jest-leak-detector": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-resolve": "^28.1.3", - "jest-runtime": "^28.1.3", - "jest-util": "^28.1.3", - "jest-watcher": "^28.1.3", - "jest-worker": "^28.1.3", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-runtime": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.1.3.tgz", - "integrity": "sha512-NU+881ScBQQLc1JHG5eJGU7Ui3kLKrmwCPPtYsJtBykixrM2OhVQlpMmFWJjMyDfdkGgBMNjXCGB/ebzsgNGQw==", - "dev": true, - "dependencies": { - "@jest/environment": "^28.1.3", - "@jest/fake-timers": "^28.1.3", - "@jest/globals": "^28.1.3", - "@jest/source-map": "^28.1.2", - "@jest/test-result": "^28.1.3", - "@jest/transform": "^28.1.3", - "@jest/types": "^28.1.3", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "execa": "^5.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-mock": "^28.1.3", - "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.3", - "jest-snapshot": "^28.1.3", - "jest-util": "^28.1.3", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-snapshot": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.3.tgz", - "integrity": "sha512-4lzMgtiNlc3DU/8lZfmqxN3AYD6GGLbl+72rdBpXvcV+whX7mDrREzkPdp2RnmfIiWBg1YbuFSkXduF2JcafJg==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^28.1.3", - "@jest/transform": "^28.1.3", - "@jest/types": "^28.1.3", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^28.1.3", - "graceful-fs": "^4.2.9", - "jest-diff": "^28.1.3", - "jest-get-type": "^28.0.2", - "jest-haste-map": "^28.1.3", - "jest-matcher-utils": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-util": "^28.1.3", - "natural-compare": "^1.4.0", - "pretty-format": "^28.1.3", - "semver": "^7.3.5" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-util": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.3.tgz", - "integrity": "sha512-XdqfpHwpcSRko/C35uLYFM2emRAltIIKZiJ9eAmhjsj0CqZMa0p1ib0R5fWIqGhn1a103DebTbpqIaP1qCQ6tQ==", - "dev": true, - "dependencies": { - "@jest/types": "^28.1.3", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-validate": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-28.1.3.tgz", - "integrity": "sha512-SZbOGBWEsaTxBGCOpsRWlXlvNkvTkY0XxRfh7zYmvd8uL5Qzyg0CHAXiXKROflh801quA6+/DsT4ODDthOC/OA==", - "dev": true, - "dependencies": { - "@jest/types": "^28.1.3", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^28.0.2", - "leven": "^3.1.0", - "pretty-format": "^28.1.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-validate/node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-watcher": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.1.3.tgz", - "integrity": "sha512-t4qcqj9hze+jviFPUN3YAtAEeFnr/azITXQEMARf5cMwKY2SMBRnCQTXLixTl20OR6mLh9KLMrgVJgJISym+1g==", - "dev": true, - "dependencies": { - "@jest/test-result": "^28.1.3", - "@jest/types": "^28.1.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.10.2", - "jest-util": "^28.1.3", - "string-length": "^4.0.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-worker": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.3.tgz", - "integrity": "sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==", - "dev": true, - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", - "dev": true, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true - }, - "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", - "dev": true - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true - }, - "node_modules/makeerror": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", - "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", - "dev": true, - "dependencies": { - "tmpl": "1.0.5" - } - }, - "node_modules/md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "node_modules/node-int64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", - "dev": true - }, - "node_modules/node-releases": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", - "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", - "dev": true - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-locate/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pirates": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", - "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", - "dev": true, - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/pretty-format": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz", - "integrity": "sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==", - "dev": true, - "dependencies": { - "@jest/schemas": "^28.1.3", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "dev": true, - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, - "node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dev": true, - "dependencies": { - "is-core-module": "^2.9.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-cwd/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/resolve.exports": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz", - "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "bin": { - "sha.js": "bin.js" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "node_modules/sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, - "node_modules/stack-utils": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", - "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", - "dev": true, - "dependencies": { - "escape-string-regexp": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/stack-utils/node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-length": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", - "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", - "dev": true, - "dependencies": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-hyperlinks": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", - "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/terminal-link": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", - "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", - "dev": true, - "dependencies": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, - "node_modules/tmpl": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", - "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", - "dev": true - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/ts-jest": { - "version": "28.0.7", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-28.0.7.tgz", - "integrity": "sha512-wWXCSmTwBVmdvWrOpYhal79bDpioDy4rTT+0vyUnE3ZzM7LOAAGG9NXwzkEL/a516rQEgnMmS/WKP9jBPCVJyA==", - "dev": true, - "dependencies": { - "bs-logger": "0.x", - "fast-json-stable-stringify": "2.x", - "jest-util": "^28.0.0", - "json5": "^2.2.1", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "7.x", - "yargs-parser": "^21.0.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/types": "^28.0.0", - "babel-jest": "^28.0.0", - "jest": "^28.0.0", - "typescript": ">=4.3" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - } - } - }, - "node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typescript": { - "version": "4.7.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", - "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz", - "integrity": "sha512-/xsqn21EGVdXI3EXSum1Yckj3ZVZugqyOZQ/CxYPBD/R+ko9NSUScf8tFF4dOKY+2pvSSJA/S+5B8s4Zr4kyvg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - } - ], - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "browserslist-lint": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" - }, - "node_modules/v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, - "node_modules/v8-to-istanbul": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", - "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0" - }, - "engines": { - "node": ">=10.12.0" - } - }, - "node_modules/walker": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", - "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", - "dev": true, - "dependencies": { - "makeerror": "1.0.12" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "node_modules/write-file-atomic": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", - "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", - "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/yargs": { - "version": "17.5.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", - "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", - "dev": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - }, - "dependencies": { - "@ampproject/remapping": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", - "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", - "dev": true, - "requires": { - "@jridgewell/gen-mapping": "^0.1.0", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", - "dev": true, - "requires": { - "@babel/highlight": "^7.18.6" - } - }, - "@babel/compat-data": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.3.tgz", - "integrity": "sha512-prBHMK4JYYK+wDjJF1q99KK4JLL+egWS4nmNqdlMUgCExMZ+iZW0hGhyC3VEbsPjvaN0TBhW//VIFwBrk8sEiw==", - "dev": true - }, - "@babel/core": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.3.tgz", - "integrity": "sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==", - "dev": true, - "requires": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.3", - "@babel/helper-compilation-targets": "^7.19.3", - "@babel/helper-module-transforms": "^7.19.0", - "@babel/helpers": "^7.19.0", - "@babel/parser": "^7.19.3", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.3", - "@babel/types": "^7.19.3", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.1", - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "@babel/generator": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.3.tgz", - "integrity": "sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==", - "dev": true, - "requires": { - "@babel/types": "^7.19.3", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" - }, - "dependencies": { - "@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - } - } - } - }, - "@babel/helper-compilation-targets": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz", - "integrity": "sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.19.3", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", - "dev": true - }, - "@babel/helper-function-name": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", - "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", - "dev": true, - "requires": { - "@babel/template": "^7.18.10", - "@babel/types": "^7.19.0" - } - }, - "@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", - "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-module-imports": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", - "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", - "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-module-transforms": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", - "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", - "dev": true, - "requires": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.18.6", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", - "@babel/types": "^7.19.0" - } - }, - "@babel/helper-plugin-utils": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", - "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", - "dev": true - }, - "@babel/helper-simple-access": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", - "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", - "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", - "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-string-parser": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz", - "integrity": "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==", - "dev": true - }, - "@babel/helper-validator-identifier": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", - "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", - "dev": true - }, - "@babel/helper-validator-option": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", - "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", - "dev": true - }, - "@babel/helpers": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.0.tgz", - "integrity": "sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==", - "dev": true, - "requires": { - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", - "@babel/types": "^7.19.0" - } - }, - "@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "@babel/parser": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.3.tgz", - "integrity": "sha512-pJ9xOlNWHiy9+FuFP09DEAFbAn4JskgRsVcc169w2xRBC3FRGuQEwjeIMMND9L2zc0iEhO/tGv4Zq+km+hxNpQ==", - "dev": true - }, - "@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", - "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.14.5" - } - }, - "@babel/plugin-syntax-typescript": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", - "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/template": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", - "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.18.10", - "@babel/types": "^7.18.10" - } - }, - "@babel/traverse": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.3.tgz", - "integrity": "sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.3", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.19.3", - "@babel/types": "^7.19.3", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "dependencies": { - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - } - } - }, - "@babel/types": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz", - "integrity": "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==", - "dev": true, - "requires": { - "@babel/helper-string-parser": "^7.18.10", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - } - }, - "@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true - }, - "@eslint/eslintrc": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.2.tgz", - "integrity": "sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ==", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.4.0", - "globals": "^13.15.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - } - }, - "@humanwhocodes/config-array": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", - "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - } - }, - "@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true - }, - "@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, - "requires": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "dependencies": { - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - } - } - }, - "@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true - }, - "@jest/console": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-28.1.3.tgz", - "integrity": "sha512-QPAkP5EwKdK/bxIr6C1I4Vs0rm2nHiANzj/Z5X2JQkrZo6IqvC4ldZ9K95tF0HdidhA8Bo6egxSzUFPYKcEXLw==", - "dev": true, - "requires": { - "@jest/types": "^28.1.3", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^28.1.3", - "jest-util": "^28.1.3", - "slash": "^3.0.0" - } - }, - "@jest/core": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-28.1.3.tgz", - "integrity": "sha512-CIKBrlaKOzA7YG19BEqCw3SLIsEwjZkeJzf5bdooVnW4bH5cktqe3JX+G2YV1aK5vP8N9na1IGWFzYaTp6k6NA==", - "dev": true, - "requires": { - "@jest/console": "^28.1.3", - "@jest/reporters": "^28.1.3", - "@jest/test-result": "^28.1.3", - "@jest/transform": "^28.1.3", - "@jest/types": "^28.1.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^28.1.3", - "jest-config": "^28.1.3", - "jest-haste-map": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.3", - "jest-resolve-dependencies": "^28.1.3", - "jest-runner": "^28.1.3", - "jest-runtime": "^28.1.3", - "jest-snapshot": "^28.1.3", - "jest-util": "^28.1.3", - "jest-validate": "^28.1.3", - "jest-watcher": "^28.1.3", - "micromatch": "^4.0.4", - "pretty-format": "^28.1.3", - "rimraf": "^3.0.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "@jest/environment": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.1.3.tgz", - "integrity": "sha512-1bf40cMFTEkKyEf585R9Iz1WayDjHoHqvts0XFYEqyKM3cFWDpeMoqKKTAF9LSYQModPUlh8FKptoM2YcMWAXA==", - "dev": true, - "requires": { - "@jest/fake-timers": "^28.1.3", - "@jest/types": "^28.1.3", - "@types/node": "*", - "jest-mock": "^28.1.3" - } - }, - "@jest/expect": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-28.1.3.tgz", - "integrity": "sha512-lzc8CpUbSoE4dqT0U+g1qODQjBRHPpCPXissXD4mS9+sWQdmmpeJ9zSH1rS1HEkrsMN0fb7nKrJ9giAR1d3wBw==", - "dev": true, - "requires": { - "expect": "^28.1.3", - "jest-snapshot": "^28.1.3" - } - }, - "@jest/expect-utils": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.1.3.tgz", - "integrity": "sha512-wvbi9LUrHJLn3NlDW6wF2hvIMtd4JUl2QNVrjq+IBSHirgfrR3o9RnVtxzdEGO2n9JyIWwHnLfby5KzqBGg2YA==", - "dev": true, - "requires": { - "jest-get-type": "^28.0.2" - } - }, - "@jest/fake-timers": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.1.3.tgz", - "integrity": "sha512-D/wOkL2POHv52h+ok5Oj/1gOG9HSywdoPtFsRCUmlCILXNn5eIWmcnd3DIiWlJnpGvQtmajqBP95Ei0EimxfLw==", - "dev": true, - "requires": { - "@jest/types": "^28.1.3", - "@sinonjs/fake-timers": "^9.1.2", - "@types/node": "*", - "jest-message-util": "^28.1.3", - "jest-mock": "^28.1.3", - "jest-util": "^28.1.3" - } - }, - "@jest/globals": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-28.1.3.tgz", - "integrity": "sha512-XFU4P4phyryCXu1pbcqMO0GSQcYe1IsalYCDzRNyhetyeyxMcIxa11qPNDpVNLeretItNqEmYYQn1UYz/5x1NA==", - "dev": true, - "requires": { - "@jest/environment": "^28.1.3", - "@jest/expect": "^28.1.3", - "@jest/types": "^28.1.3" - } - }, - "@jest/reporters": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-28.1.3.tgz", - "integrity": "sha512-JuAy7wkxQZVNU/V6g9xKzCGC5LVXx9FDcABKsSXp5MiKPEE2144a/vXTEDoyzjUpZKfVwp08Wqg5A4WfTMAzjg==", - "dev": true, - "requires": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^28.1.3", - "@jest/test-result": "^28.1.3", - "@jest/transform": "^28.1.3", - "@jest/types": "^28.1.3", - "@jridgewell/trace-mapping": "^0.3.13", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "^28.1.3", - "jest-util": "^28.1.3", - "jest-worker": "^28.1.3", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "terminal-link": "^2.0.0", - "v8-to-istanbul": "^9.0.1" - } - }, - "@jest/schemas": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-28.1.3.tgz", - "integrity": "sha512-/l/VWsdt/aBXgjshLWOFyFt3IVdYypu5y2Wn2rOO1un6nkqIn8SLXzgIMYXFyYsRWDyF5EthmKJMIdJvk08grg==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.24.1" - } - }, - "@jest/source-map": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-28.1.2.tgz", - "integrity": "sha512-cV8Lx3BeStJb8ipPHnqVw/IM2VCMWO3crWZzYodSIkxXnRcXJipCdx1JCK0K5MsJJouZQTH73mzf4vgxRaH9ww==", - "dev": true, - "requires": { - "@jridgewell/trace-mapping": "^0.3.13", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" - } - }, - "@jest/test-result": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-28.1.3.tgz", - "integrity": "sha512-kZAkxnSE+FqE8YjW8gNuoVkkC9I7S1qmenl8sGcDOLropASP+BkcGKwhXoyqQuGOGeYY0y/ixjrd/iERpEXHNg==", - "dev": true, - "requires": { - "@jest/console": "^28.1.3", - "@jest/types": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - } - }, - "@jest/test-sequencer": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.1.3.tgz", - "integrity": "sha512-NIMPEqqa59MWnDi1kvXXpYbqsfQmSJsIbnd85mdVGkiDfQ9WQQTXOLsvISUfonmnBT+w85WEgneCigEEdHDFxw==", - "dev": true, - "requires": { - "@jest/test-result": "^28.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.3", - "slash": "^3.0.0" - } - }, - "@jest/transform": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.3.tgz", - "integrity": "sha512-u5dT5di+oFI6hfcLOHGTAfmUxFRrjK+vnaP0kkVow9Md/M7V/MxqQMOz/VV25UZO8pzeA9PjfTpOu6BDuwSPQA==", - "dev": true, - "requires": { - "@babel/core": "^7.11.6", - "@jest/types": "^28.1.3", - "@jridgewell/trace-mapping": "^0.3.13", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.3", - "jest-regex-util": "^28.0.2", - "jest-util": "^28.1.3", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.1" - } - }, - "@jest/types": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", - "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", - "dev": true, - "requires": { - "@jest/schemas": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, - "@jridgewell/gen-mapping": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", - "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true - }, - "@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true - }, - "@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true - }, - "@jridgewell/trace-mapping": { - "version": "0.3.15", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", - "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", - "dev": true, - "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "@noble/hashes": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", - "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==" - }, - "@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - } - }, - "@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true - }, - "@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - } - }, - "@sinclair/typebox": { - "version": "0.24.43", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.43.tgz", - "integrity": "sha512-1orQTvtazZmsPeBroJjysvsOQCYV2yjWlebkSY38pl5vr2tdLjEJ+LoxITlGNZaH2RE19WlAwQMkH/7C14wLfw==", - "dev": true - }, - "@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - }, - "@sinonjs/fake-timers": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", - "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0" - } - }, - "@types/babel__core": { - "version": "7.1.19", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", - "integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==", - "dev": true, - "requires": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "@types/babel__generator": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", - "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@types/babel__template": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", - "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", - "dev": true, - "requires": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@types/babel__traverse": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.2.tgz", - "integrity": "sha512-FcFaxOr2V5KZCviw1TnutEMVUVsGt4D2hP1TAfXZAMKuHYW3xQhe3jTxNPWutgCJ3/X1c5yX8ZoGVEItxKbwBg==", - "dev": true, - "requires": { - "@babel/types": "^7.3.0" - } - }, - "@types/bn.js": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.1.tgz", - "integrity": "sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/bs58check": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@types/bs58check/-/bs58check-2.1.0.tgz", - "integrity": "sha512-OxsysnJQh82vy9DRbOcw9m2j/WiyqZLn0YBhKxdQ+aCwoHj+tWzyCgpwAkr79IfDXZKxc6h7k89T9pwS78CqTQ==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/create-hash": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@types/create-hash/-/create-hash-1.2.2.tgz", - "integrity": "sha512-Fg8/kfMJObbETFU/Tn+Y0jieYewryLrbKwLCEIwPyklZZVY2qB+64KFjhplGSw+cseZosfFXctXO+PyIYD8iZQ==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/graceful-fs": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", - "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/istanbul-lib-coverage": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", - "dev": true - }, - "@types/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "*" - } - }, - "@types/istanbul-reports": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", - "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", - "dev": true, - "requires": { - "@types/istanbul-lib-report": "*" - } - }, - "@types/jest": { - "version": "28.1.6", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-28.1.6.tgz", - "integrity": "sha512-0RbGAFMfcBJKOmqRazM8L98uokwuwD5F8rHrv/ZMbrZBwVOWZUyPG6VFNscjYr/vjM3Vu4fRrCPbOs42AfemaQ==", - "dev": true, - "requires": { - "jest-matcher-utils": "^28.0.0", - "pretty-format": "^28.0.0" - } - }, - "@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", - "dev": true - }, - "@types/node": { - "version": "18.7.22", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.22.tgz", - "integrity": "sha512-TsmoXYd4zrkkKjJB0URF/mTIKPl+kVcbqClB2F/ykU7vil1BfWZVndOnpEIozPv4fURD28gyPFeIkW2G+KXOvw==", - "dev": true - }, - "@types/prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow==", - "dev": true - }, - "@types/stack-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", - "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", - "dev": true - }, - "@types/yargs": { - "version": "17.0.13", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz", - "integrity": "sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, - "@types/yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", - "dev": true - }, - "@typescript-eslint/eslint-plugin": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.7.tgz", - "integrity": "sha512-l4L6Do+tfeM2OK0GJsU7TUcM/1oN/N25xHm3Jb4z3OiDU4Lj8dIuxX9LpVMS9riSXQs42D1ieX7b85/r16H9Fw==", - "dev": true, - "requires": { - "@typescript-eslint/scope-manager": "5.30.7", - "@typescript-eslint/type-utils": "5.30.7", - "@typescript-eslint/utils": "5.30.7", - "debug": "^4.3.4", - "functional-red-black-tree": "^1.0.1", - "ignore": "^5.2.0", - "regexpp": "^3.2.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/parser": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.30.7.tgz", - "integrity": "sha512-Rg5xwznHWWSy7v2o0cdho6n+xLhK2gntImp0rJroVVFkcYFYQ8C8UJTSuTw/3CnExBmPjycjmUJkxVmjXsld6A==", - "dev": true, - "requires": { - "@typescript-eslint/scope-manager": "5.30.7", - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/typescript-estree": "5.30.7", - "debug": "^4.3.4" - } - }, - "@typescript-eslint/scope-manager": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.30.7.tgz", - "integrity": "sha512-7BM1bwvdF1UUvt+b9smhqdc/eniOnCKxQT/kj3oXtj3LqnTWCAM0qHRHfyzCzhEfWX0zrW7KqXXeE4DlchZBKw==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/visitor-keys": "5.30.7" - } - }, - "@typescript-eslint/type-utils": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.30.7.tgz", - "integrity": "sha512-nD5qAE2aJX/YLyKMvOU5jvJyku4QN5XBVsoTynFrjQZaDgDV6i7QHFiYCx10wvn7hFvfuqIRNBtsgaLe0DbWhw==", - "dev": true, - "requires": { - "@typescript-eslint/utils": "5.30.7", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/types": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.7.tgz", - "integrity": "sha512-ocVkETUs82+U+HowkovV6uxf1AnVRKCmDRNUBUUo46/5SQv1owC/EBFkiu4MOHeZqhKz2ktZ3kvJJ1uFqQ8QPg==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.7.tgz", - "integrity": "sha512-tNslqXI1ZdmXXrHER83TJ8OTYl4epUzJC0aj2i4DMDT4iU+UqLT3EJeGQvJ17BMbm31x5scSwo3hPM0nqQ1AEA==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/visitor-keys": "5.30.7", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/utils": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.30.7.tgz", - "integrity": "sha512-Z3pHdbFw+ftZiGUnm1GZhkJgVqsDL5CYW2yj+TB2mfXDFOMqtbzQi2dNJIyPqPbx9mv2kUxS1gU+r2gKlKi1rQ==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.30.7", - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/typescript-estree": "5.30.7", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.7.tgz", - "integrity": "sha512-KrRXf8nnjvcpxDFOKej4xkD7657+PClJs5cJVSG7NNoCNnjEdc46juNAQt7AyuWctuCgs6mVRc1xGctEqrjxWw==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.30.7", - "eslint-visitor-keys": "^3.3.0" - } - }, - "acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", - "dev": true - }, - "acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "requires": {} - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, - "requires": { - "type-fest": "^0.21.3" - }, - "dependencies": { - "type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true - } - } - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true - }, - "babel-jest": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.3.tgz", - "integrity": "sha512-epUaPOEWMk3cWX0M/sPvCHHCe9fMFAa/9hXEgKP8nFfNl/jlGkE9ucq9NqkZGXLDduCJYS0UvSlPUwC0S+rH6Q==", - "dev": true, - "requires": { - "@jest/transform": "^28.1.3", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^28.1.3", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - } - }, - "babel-plugin-istanbul": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", - "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" - } - }, - "babel-plugin-jest-hoist": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.3.tgz", - "integrity": "sha512-Ys3tUKAmfnkRUpPdpa98eYrAR0nV+sSFUZZEGuQ2EbFd1y4SOLtD5QDNHAq+bb9a+bbXvYQC4b+ID/THIMcU6Q==", - "dev": true, - "requires": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" - } - }, - "babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", - "dev": true, - "requires": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" - } - }, - "babel-preset-jest": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.1.3.tgz", - "integrity": "sha512-L+fupJvlWAHbQfn74coNX3zf60LXMJsezNvvx8eIh7iOR1luJ1poxYgQk1F8PYtNq/6QODDHCqsSnTFSWC491A==", - "dev": true, - "requires": { - "babel-plugin-jest-hoist": "^28.1.3", - "babel-preset-current-node-syntax": "^1.0.0" - } - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "base-x": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", - "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" - }, - "base64url": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", - "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==" - }, - "bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "browserslist": { - "version": "4.21.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", - "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001400", - "electron-to-chromium": "^1.4.251", - "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.9" - } - }, - "bs-logger": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", - "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", - "dev": true, - "requires": { - "fast-json-stable-stringify": "2.x" - } - }, - "bs58": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", - "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", - "requires": { - "base-x": "^4.0.0" - } - }, - "bs58check": { - "version": "git+ssh://git@github.com/bitcoinjs/bs58check.git", - "integrity": "sha512-baICxaJy1rqIByQPpjsoHVEuaADwsvZqZNlaFtxMHDlWeMHqXKnKYlcor7s+bXrQe0xxnw+exZBmtw/8OAdePA==", - "from": "bs58check@https://github.com/bitcoinjs/bs58check", - "requires": { - "@noble/hashes": "^1.2.0", - "bs58": "^5.0.0" - } - }, - "bser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", - "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", - "dev": true, - "requires": { - "node-int64": "^0.4.0" - } - }, - "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "caniuse-lite": { - "version": "1.0.30001412", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001412.tgz", - "integrity": "sha512-+TeEIee1gS5bYOiuf+PS/kp2mrXic37Hl66VY6EAfxasIk5fELTktK2oOezYed12H8w7jt3s512PpulQidPjwA==", - "dev": true - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "char-regex": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", - "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", - "dev": true - }, - "ci-info": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.4.0.tgz", - "integrity": "sha512-t5QdPT5jq3o262DOQ8zA6E1tlH2upmUc4Hlvrbx1pGYJuiiHl7O7rvVNI+l8HTVhd/q3Qc9vqimkNk5yiXsAug==", - "dev": true - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "cjs-module-lexer": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", - "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", - "dev": true - }, - "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", - "dev": true - }, - "collect-v8-coverage": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", - "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", - "dev": true - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", - "dev": true - }, - "deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", - "dev": true - }, - "detect-newline": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", - "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", - "dev": true - }, - "diff-sequences": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", - "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", - "dev": true - }, - "dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "requires": { - "path-type": "^4.0.0" - } - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "electron-to-chromium": { - "version": "1.4.266", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.266.tgz", - "integrity": "sha512-saJTYECxUSv7eSpnXw0XIEvUkP9x4s/x2mm3TVX7k4rIFS6f5TjBih1B5h437WzIhHQjid+d8ouQzPQskMervQ==", - "dev": true - }, - "emittery": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", - "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", - "dev": true - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "eslint": { - "version": "8.20.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.20.0.tgz", - "integrity": "sha512-d4ixhz5SKCa1D6SCPrivP7yYVi7nyD6A4vs6HIAul9ujBzcEmZVM3/0NN/yu5nKhmO1wjp5xQ46iRfmDGlOviA==", - "dev": true, - "requires": { - "@eslint/eslintrc": "^1.3.0", - "@humanwhocodes/config-array": "^0.9.2", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.2", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^6.0.1", - "globals": "^13.15.0", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - }, - "dependencies": { - "eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - } - }, - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - } - } - }, - "eslint-plugin-jest": { - "version": "26.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-26.6.0.tgz", - "integrity": "sha512-f8n46/97ZFdU4KqeQYqO8AEVGIhHWvkpgNBWHH3jrM28/y8llnbf3IjfIKv6p2pZIMinK1PCqbbROxs9Eud02Q==", - "dev": true, - "requires": { - "@typescript-eslint/utils": "^5.10.0" - } - }, - "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^2.0.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true - } - } - }, - "eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", - "dev": true - }, - "espree": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", - "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", - "dev": true, - "requires": { - "acorn": "^8.8.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", - "dev": true, - "requires": { - "estraverse": "^5.1.0" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - } - } - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "requires": { - "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - } - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true - }, - "execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - } - }, - "exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "dev": true - }, - "expect": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.3.tgz", - "integrity": "sha512-eEh0xn8HlsuOBxFgIss+2mX85VAS4Qy3OSkjV7rlBWljtA4oWH37glVGyOZSZvErDT/yBywZdPGwCXuTvSG85g==", - "dev": true, - "requires": { - "@jest/expect-utils": "^28.1.3", - "jest-get-type": "^28.0.2", - "jest-matcher-utils": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-util": "^28.1.3" - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "dependencies": { - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - } - } - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", - "dev": true, - "requires": { - "reusify": "^1.0.4" - } - }, - "fb-watchman": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", - "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", - "dev": true, - "requires": { - "bser": "2.1.1" - } - }, - "file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "requires": { - "flat-cache": "^3.0.4" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "requires": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - } - }, - "flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", - "dev": true - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true - }, - "gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true - }, - "get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true - }, - "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "requires": { - "is-glob": "^4.0.3" - } - }, - "globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } - }, - "globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "requires": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - } - }, - "graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "dev": true - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "hash-base": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", - "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", - "requires": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - } - }, - "html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true - }, - "human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true - }, - "ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true - }, - "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", - "dev": true, - "requires": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true - }, - "is-core-module": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", - "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "is-generator-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", - "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", - "dev": true - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", - "dev": true - }, - "istanbul-lib-instrument": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz", - "integrity": "sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A==", - "dev": true, - "requires": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", - "dev": true, - "requires": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" - } - }, - "istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - } - }, - "istanbul-reports": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", - "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", - "dev": true, - "requires": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - } - }, - "jest": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest/-/jest-28.1.3.tgz", - "integrity": "sha512-N4GT5on8UkZgH0O5LUavMRV1EDEhNTL0KEfRmDIeZHSV7p2XgLoY9t9VDUgL6o+yfdgYHVxuz81G8oB9VG5uyA==", - "dev": true, - "requires": { - "@jest/core": "^28.1.3", - "@jest/types": "^28.1.3", - "import-local": "^3.0.2", - "jest-cli": "^28.1.3" - } - }, - "jest-changed-files": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-28.1.3.tgz", - "integrity": "sha512-esaOfUWJXk2nfZt9SPyC8gA1kNfdKLkQWyzsMlqq8msYSlNKfmZxfRgZn4Cd4MGVUF+7v6dBs0d5TOAKa7iIiA==", - "dev": true, - "requires": { - "execa": "^5.0.0", - "p-limit": "^3.1.0" - } - }, - "jest-circus": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-28.1.3.tgz", - "integrity": "sha512-cZ+eS5zc79MBwt+IhQhiEp0OeBddpc1n8MBo1nMB8A7oPMKEO+Sre+wHaLJexQUj9Ya/8NOBY0RESUgYjB6fow==", - "dev": true, - "requires": { - "@jest/environment": "^28.1.3", - "@jest/expect": "^28.1.3", - "@jest/test-result": "^28.1.3", - "@jest/types": "^28.1.3", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^0.7.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^28.1.3", - "jest-matcher-utils": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-runtime": "^28.1.3", - "jest-snapshot": "^28.1.3", - "jest-util": "^28.1.3", - "p-limit": "^3.1.0", - "pretty-format": "^28.1.3", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - } - }, - "jest-cli": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-28.1.3.tgz", - "integrity": "sha512-roY3kvrv57Azn1yPgdTebPAXvdR2xfezaKKYzVxZ6It/5NCxzJym6tUI5P1zkdWhfUYkxEI9uZWcQdaFLo8mJQ==", - "dev": true, - "requires": { - "@jest/core": "^28.1.3", - "@jest/test-result": "^28.1.3", - "@jest/types": "^28.1.3", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "import-local": "^3.0.2", - "jest-config": "^28.1.3", - "jest-util": "^28.1.3", - "jest-validate": "^28.1.3", - "prompts": "^2.0.1", - "yargs": "^17.3.1" - } - }, - "jest-config": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-28.1.3.tgz", - "integrity": "sha512-MG3INjByJ0J4AsNBm7T3hsuxKQqFIiRo/AUqb1q9LRKI5UU6Aar9JHbr9Ivn1TVwfUD9KirRoM/T6u8XlcQPHQ==", - "dev": true, - "requires": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^28.1.3", - "@jest/types": "^28.1.3", - "babel-jest": "^28.1.3", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^28.1.3", - "jest-environment-node": "^28.1.3", - "jest-get-type": "^28.0.2", - "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.3", - "jest-runner": "^28.1.3", - "jest-util": "^28.1.3", - "jest-validate": "^28.1.3", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^28.1.3", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - } - }, - "jest-diff": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.3.tgz", - "integrity": "sha512-8RqP1B/OXzjjTWkqMX67iqgwBVJRgCyKD3L9nq+6ZqJMdvjE8RgHktqZ6jNrkdMT+dJuYNI3rhQpxaz7drJHfw==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "diff-sequences": "^28.1.1", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.3" - } - }, - "jest-docblock": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.1.1.tgz", - "integrity": "sha512-3wayBVNiOYx0cwAbl9rwm5kKFP8yHH3d/fkEaL02NPTkDojPtheGB7HZSFY4wzX+DxyrvhXz0KSCVksmCknCuA==", - "dev": true, - "requires": { - "detect-newline": "^3.0.0" - } - }, - "jest-each": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-28.1.3.tgz", - "integrity": "sha512-arT1z4sg2yABU5uogObVPvSlSMQlDA48owx07BDPAiasW0yYpYHYOo4HHLz9q0BVzDVU4hILFjzJw0So9aCL/g==", - "dev": true, - "requires": { - "@jest/types": "^28.1.3", - "chalk": "^4.0.0", - "jest-get-type": "^28.0.2", - "jest-util": "^28.1.3", - "pretty-format": "^28.1.3" - } - }, - "jest-environment-node": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.1.3.tgz", - "integrity": "sha512-ugP6XOhEpjAEhGYvp5Xj989ns5cB1K6ZdjBYuS30umT4CQEETaxSiPcZ/E1kFktX4GkrcM4qu07IIlDYX1gp+A==", - "dev": true, - "requires": { - "@jest/environment": "^28.1.3", - "@jest/fake-timers": "^28.1.3", - "@jest/types": "^28.1.3", - "@types/node": "*", - "jest-mock": "^28.1.3", - "jest-util": "^28.1.3" - } - }, - "jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", - "dev": true - }, - "jest-haste-map": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.3.tgz", - "integrity": "sha512-3S+RQWDXccXDKSWnkHa/dPwt+2qwA8CJzR61w3FoYCvoo3Pn8tvGcysmMF0Bj0EX5RYvAI2EIvC57OmotfdtKA==", - "dev": true, - "requires": { - "@jest/types": "^28.1.3", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "fsevents": "^2.3.2", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^28.0.2", - "jest-util": "^28.1.3", - "jest-worker": "^28.1.3", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - } - }, - "jest-leak-detector": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.1.3.tgz", - "integrity": "sha512-WFVJhnQsiKtDEo5lG2mM0v40QWnBM+zMdHHyJs8AWZ7J0QZJS59MsyKeJHWhpBZBH32S48FOVvGyOFT1h0DlqA==", - "dev": true, - "requires": { - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.3" - } - }, - "jest-matcher-utils": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.3.tgz", - "integrity": "sha512-kQeJ7qHemKfbzKoGjHHrRKH6atgxMk8Enkk2iPQ3XwO6oE/KYD8lMYOziCkeSB9G4adPM4nR1DE8Tf5JeWH6Bw==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "jest-diff": "^28.1.3", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.3" - } - }, - "jest-message-util": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.3.tgz", - "integrity": "sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^28.1.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^28.1.3", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - } - }, - "jest-mock": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.3.tgz", - "integrity": "sha512-o3J2jr6dMMWYVH4Lh/NKmDXdosrsJgi4AviS8oXLujcjpCMBb1FMsblDnOXKZKfSiHLxYub1eS0IHuRXsio9eA==", - "dev": true, - "requires": { - "@jest/types": "^28.1.3", - "@types/node": "*" - } - }, - "jest-pnp-resolver": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", - "dev": true, - "requires": {} - }, - "jest-regex-util": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", - "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", - "dev": true - }, - "jest-resolve": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.1.3.tgz", - "integrity": "sha512-Z1W3tTjE6QaNI90qo/BJpfnvpxtaFTFw5CDgwpyE/Kz8U/06N1Hjf4ia9quUhCh39qIGWF1ZuxFiBiJQwSEYKQ==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.3", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^28.1.3", - "jest-validate": "^28.1.3", - "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", - "slash": "^3.0.0" - } - }, - "jest-resolve-dependencies": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.3.tgz", - "integrity": "sha512-qa0QO2Q0XzQoNPouMbCc7Bvtsem8eQgVPNkwn9LnS+R2n8DaVDPL/U1gngC0LTl1RYXJU0uJa2BMC2DbTfFrHA==", - "dev": true, - "requires": { - "jest-regex-util": "^28.0.2", - "jest-snapshot": "^28.1.3" - } - }, - "jest-runner": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-28.1.3.tgz", - "integrity": "sha512-GkMw4D/0USd62OVO0oEgjn23TM+YJa2U2Wu5zz9xsQB1MxWKDOlrnykPxnMsN0tnJllfLPinHTka61u0QhaxBA==", - "dev": true, - "requires": { - "@jest/console": "^28.1.3", - "@jest/environment": "^28.1.3", - "@jest/test-result": "^28.1.3", - "@jest/transform": "^28.1.3", - "@jest/types": "^28.1.3", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.10.2", - "graceful-fs": "^4.2.9", - "jest-docblock": "^28.1.1", - "jest-environment-node": "^28.1.3", - "jest-haste-map": "^28.1.3", - "jest-leak-detector": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-resolve": "^28.1.3", - "jest-runtime": "^28.1.3", - "jest-util": "^28.1.3", - "jest-watcher": "^28.1.3", - "jest-worker": "^28.1.3", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" - } - }, - "jest-runtime": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.1.3.tgz", - "integrity": "sha512-NU+881ScBQQLc1JHG5eJGU7Ui3kLKrmwCPPtYsJtBykixrM2OhVQlpMmFWJjMyDfdkGgBMNjXCGB/ebzsgNGQw==", - "dev": true, - "requires": { - "@jest/environment": "^28.1.3", - "@jest/fake-timers": "^28.1.3", - "@jest/globals": "^28.1.3", - "@jest/source-map": "^28.1.2", - "@jest/test-result": "^28.1.3", - "@jest/transform": "^28.1.3", - "@jest/types": "^28.1.3", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "execa": "^5.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-mock": "^28.1.3", - "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.3", - "jest-snapshot": "^28.1.3", - "jest-util": "^28.1.3", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - } - }, - "jest-snapshot": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.3.tgz", - "integrity": "sha512-4lzMgtiNlc3DU/8lZfmqxN3AYD6GGLbl+72rdBpXvcV+whX7mDrREzkPdp2RnmfIiWBg1YbuFSkXduF2JcafJg==", - "dev": true, - "requires": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^28.1.3", - "@jest/transform": "^28.1.3", - "@jest/types": "^28.1.3", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^28.1.3", - "graceful-fs": "^4.2.9", - "jest-diff": "^28.1.3", - "jest-get-type": "^28.0.2", - "jest-haste-map": "^28.1.3", - "jest-matcher-utils": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-util": "^28.1.3", - "natural-compare": "^1.4.0", - "pretty-format": "^28.1.3", - "semver": "^7.3.5" - } - }, - "jest-util": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.3.tgz", - "integrity": "sha512-XdqfpHwpcSRko/C35uLYFM2emRAltIIKZiJ9eAmhjsj0CqZMa0p1ib0R5fWIqGhn1a103DebTbpqIaP1qCQ6tQ==", - "dev": true, - "requires": { - "@jest/types": "^28.1.3", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - } - }, - "jest-validate": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-28.1.3.tgz", - "integrity": "sha512-SZbOGBWEsaTxBGCOpsRWlXlvNkvTkY0XxRfh7zYmvd8uL5Qzyg0CHAXiXKROflh801quA6+/DsT4ODDthOC/OA==", - "dev": true, - "requires": { - "@jest/types": "^28.1.3", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^28.0.2", - "leven": "^3.1.0", - "pretty-format": "^28.1.3" - }, - "dependencies": { - "camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true - } - } - }, - "jest-watcher": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.1.3.tgz", - "integrity": "sha512-t4qcqj9hze+jviFPUN3YAtAEeFnr/azITXQEMARf5cMwKY2SMBRnCQTXLixTl20OR6mLh9KLMrgVJgJISym+1g==", - "dev": true, - "requires": { - "@jest/test-result": "^28.1.3", - "@jest/types": "^28.1.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.10.2", - "jest-util": "^28.1.3", - "string-length": "^4.0.1" - } - }, - "jest-worker": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.3.tgz", - "integrity": "sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==", - "dev": true, - "requires": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "dependencies": { - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, - "json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", - "dev": true - }, - "kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "dev": true - }, - "leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true - }, - "levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - } - }, - "lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", - "dev": true - }, - "lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true - }, - "makeerror": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", - "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", - "dev": true, - "requires": { - "tmpl": "1.0.5" - } - }, - "md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true - }, - "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "requires": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - } - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "node-int64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", - "dev": true - }, - "node-releases": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", - "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", - "dev": true - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "requires": { - "path-key": "^3.0.0" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, - "requires": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - } - }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "requires": { - "yocto-queue": "^0.1.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - }, - "dependencies": { - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - } - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "requires": { - "callsites": "^3.0.0" - } - }, - "parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - }, - "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true - }, - "pirates": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", - "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", - "dev": true - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - } - }, - "prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true - }, - "prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", - "dev": true - }, - "pretty-format": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz", - "integrity": "sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==", - "dev": true, - "requires": { - "@jest/schemas": "^28.1.3", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - } - } - }, - "prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "dev": true, - "requires": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, - "queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true - }, - "react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true - }, - "resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dev": true, - "requires": { - "is-core-module": "^2.9.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - }, - "resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "requires": { - "resolve-from": "^5.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - } - } - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - }, - "resolve.exports": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz", - "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", - "dev": true - }, - "reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "requires": { - "queue-microtask": "^1.2.2" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, - "stack-utils": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", - "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", - "dev": true, - "requires": { - "escape-string-regexp": "^2.0.0" - }, - "dependencies": { - "escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true - } - } - }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "requires": { - "safe-buffer": "~5.2.0" - } - }, - "string-length": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", - "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", - "dev": true, - "requires": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" - } - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true - }, - "strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "supports-hyperlinks": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", - "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", - "dev": true, - "requires": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - } - }, - "supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true - }, - "terminal-link": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", - "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", - "dev": true, - "requires": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - } - }, - "test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "requires": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, - "tmpl": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", - "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", - "dev": true - }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - }, - "ts-jest": { - "version": "28.0.7", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-28.0.7.tgz", - "integrity": "sha512-wWXCSmTwBVmdvWrOpYhal79bDpioDy4rTT+0vyUnE3ZzM7LOAAGG9NXwzkEL/a516rQEgnMmS/WKP9jBPCVJyA==", - "dev": true, - "requires": { - "bs-logger": "0.x", - "fast-json-stable-stringify": "2.x", - "jest-util": "^28.0.0", - "json5": "^2.2.1", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "7.x", - "yargs-parser": "^21.0.1" - } - }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, - "type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1" - } - }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - }, - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true - }, - "typescript": { - "version": "4.7.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", - "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", - "dev": true - }, - "update-browserslist-db": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz", - "integrity": "sha512-/xsqn21EGVdXI3EXSum1Yckj3ZVZugqyOZQ/CxYPBD/R+ko9NSUScf8tFF4dOKY+2pvSSJA/S+5B8s4Zr4kyvg==", - "dev": true, - "requires": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - } - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" - }, - "v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, - "v8-to-istanbul": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", - "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", - "dev": true, - "requires": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0" - } - }, - "walker": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", - "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", - "dev": true, - "requires": { - "makeerror": "1.0.12" - } - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "write-file-atomic": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", - "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - } - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "yargs": { - "version": "17.5.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", - "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", - "dev": true, - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" - } - }, - "yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true - }, - "yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true - } - } -} diff --git a/package.json b/package.json index c4b7313..32ab27a 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "license": "MIT", "dependencies": { "base64url": "3.0.1", + "bech32": "^2.0.0", "bn.js": "5.2.1", "bs58check": "https://github.com/bitcoinjs/bs58check", "create-hash": "1.2.0" diff --git a/src/__tests__/pbaas/identity.test.ts b/src/__tests__/pbaas/identity.test.ts new file mode 100644 index 0000000..790170c --- /dev/null +++ b/src/__tests__/pbaas/identity.test.ts @@ -0,0 +1,19 @@ +import { BN } from "bn.js"; +import { CurrencyValueMap } from "../../pbaas/CurrencyValueMap"; +import { Identity } from "../../pbaas/Identity"; +import { BigNumber } from "../../utils/types/BigNumber"; +import { TransferDestination } from "../../pbaas/TransferDestination"; +import { fromBase58Check } from "../../utils/address"; + +describe('Serializes and deserializes identity properly', () => { + test('deserialize id with contentmultimap', async () => { + const vdata = "0300000000000000011472aa70e6a4c0d0ff07541c5fbe4f08cacd89d35b01000000a6ef9ea235635e328124ff3429db9f9e91b64e2d0543687269730250d65f0c3aea3fd55eadf3b6f31f123fe8f9dbe001fdda02ab8b7b8b4418de66e611921699a328126461c0e5018443fdc0027b226172746973744e616d65223a20226976616e40222c2022616c62756d4e616d65223a202274657374416c62756d222c202267656e7265223a2022726f636b222c202275726c223a202268747470733a2f2f2f6a756b65626f78222c20226e6574776f726b4964223a2022726f6f6d66756c222c20227369676e6174757265223a20224167586d4567414141554567774c45516a534f4d44477651394f715859433654706d766c536a2b6c596731374d57336161494d3538634539756657376746344a7966364d2f6e4a4a564d3377466f64496d344972622f545565466a654b43616e35673d3d222c2022747261636b73223a205b7b227265736f757263654964223a20223139343564633964717472673231222c20226e616d65223a20225c75303431325c75303433655c75303433665c75303433625c7530343536205c75303431325c75303435365c75303433345c75303433655c75303433665c75303433625c75303434665c75303434315c75303433655c75303433325c7530343330202d205c75303431325c75303433355c75303434315c75303433645c75303433302028436f766572206279204772616e646d615c7320536d757a6929222c20226475726174696f6e223a203234302e3433327d5d2c2022616c62756d436f766572223a207b227265736f757263654964223a20223931647370387471367273713176227d2c20226172746973744c6f676f223a207b227265736f757263654964223a202272326630366267747a6872386276227d2c2022736c65657665446f63756d656e74223a207b227265736f757263654964223a202235706336307773713335337a736d227d2c2022636f70696573536f6c64223a20302c202272656c6561736554696d657374616d70223a202231363832353539323132222c20227072696365223a207b2256414c55223a20312c202255534443223a203230307d7d652741687b7ab1473754858d7b8b10886945eaf801fddc02ab8b7b8b4418de66e611921699a328126461c0e5018445fdc2027b22616c62756d436f766572223a207b227265736f757263654964223a20223931647370387471367273713176227d2c2022616c62756d4e616d65223a202274657374416c62756d3131222c20226172746973744c6f676f223a207b227265736f757263654964223a202272326630366267747a6872386276227d2c20226172746973744e616d65223a20226976616e40222c202267656e7265223a2022726f636b222c20226e6574776f726b4964223a2022726f6f6d66756c222c20227369676e6174757265223a20224167586d4567414141554567774c45516a534f4d44477651394f715859433654706d766c536a2b6c596731374d57336161494d3538634539756657376746344a7966364d2f6e4a4a564d3377466f64496d344972622f545565466a654b43616e35673d3d222c2022736c65657665446f63756d656e74223a207b227265736f757263654964223a202235706336307773713335337a736d227d2c2022747261636b73223a205b7b226475726174696f6e223a203234302e3433322c20226e616d65223a20225c75303431325c75303433655c75303433665c75303433625c7530343536205c75303431325c75303435365c75303433345c75303433655c75303433665c75303433625c75303434665c75303434315c75303433655c75303433325c7530343330202d205c75303431325c75303433355c75303434315c75303433645c75303433302028436f766572206279204772616e646d615c7320536d757a6929222c20227265736f757263654964223a20223139343564633964717472673231227d5d2c202275726c223a202268747470733a2f2f2f6a756b65626f78222c2022636f70696573536f6c64223a20302c202272656c6561736554696d657374616d70223a202231363832353336313730222c20227072696365223a207b2256414c55223a20312c202255534443223a203230307d7d00dfae84e93ab133b739076354e9fbb2de42887212dfae84e93ab133b739076354e9fbb2de4288721200a6ef9ea235635e328124ff3429db9f9e91b64e2d000000001b04030f01011504dfae84e93ab133b739076354e9fbb2de428872121b04031001011504dfae84e93ab133b739076354e9fbb2de42887212" + + const identity_frombuf = new Identity() + identity_frombuf.fromBuffer(Buffer.from(vdata, 'hex')) + + + }); + + +}); \ No newline at end of file diff --git a/src/pbaas/Identity.ts b/src/pbaas/Identity.ts index 65e41a2..42f4416 100644 --- a/src/pbaas/Identity.ts +++ b/src/pbaas/Identity.ts @@ -2,23 +2,77 @@ import varuint from '../utils/varuint' import bufferutils from '../utils/bufferutils' import { BigNumber } from '../utils/types/BigNumber'; import { Principal } from './Principal'; -import { TxDestination } from './TxDestination'; import { fromBase58Check, toBase58Check } from '../utils/address'; +import { I_ADDR_VERSION } from '../constants/vdxf'; import { R_ADDR_VERSION } from '../constants/vdxf'; import { BN } from 'bn.js'; +const bech32 = require('bech32') +const VERSION_PBAAS = 3; const { BufferReader, BufferWriter } = bufferutils +function fromBech32 (address) { + var result = bech32.decode(address) + var data = bech32.fromWords(result.words.slice(1)) + + return { + version: result.words[0], + prefix: result.prefix, + data: Buffer.from(data) + } +} + +function convertBits(data, from, to, strictMode) { + const length = strictMode + ? Math.floor((data.length * from) / to) + : Math.ceil((data.length * from) / to); + const mask = (1 << to) - 1; + const result = Buffer.alloc(length); + let index = 0; + let accumulator = 0; + let bits = 0; + for (const value of data) { + accumulator = (accumulator << from) | value; + bits += from; + while (bits >= to) { + bits -= to; + result[index] = (accumulator >> bits) & mask; + ++index; + } + } + if (!strictMode) { + if (bits > 0) { + result[index] = (accumulator << (to - bits)) & mask; + ++index; + } + } else { + throw new Error("Input cannot be converted") + } + return result; +} + +function decodeSaplingAddress (address) { + + + const result = fromBech32(address) + + const data = convertBits(result.data, 5, 8, false); + + return {d: data.slice(0,10), pk_d: data.slice(10)} + +} + export class Identity extends Principal { parent: string; system_id: string; name: string; - contentmap: Map; - contentmultimap: Map; + contentmap: Map; + contentmultimap: Map>; revocation_authority: string; recovery_authority: string; + private_addresses: Array<{d: Buffer, pk_d: Buffer}>; timelock: number; constructor (data?: { @@ -29,10 +83,11 @@ export class Identity extends Principal { parent?: string, system_id?: string, name?: string, - contentmap?: Map; - contentmultimap?: Map; + contentmap?: Map; + contentmultimap?: Map>; revocation_authority?: string; recovery_authority?: string; + private_addresses: Array<{d: Buffer, pk_d: Buffer}>; timelock?: number; }) { @@ -47,6 +102,7 @@ export class Identity extends Principal { if (data.contentmultimap != null) this.contentmultimap = new Map(data.contentmultimap || []); if (data.revocation_authority != null) this.revocation_authority = data.revocation_authority if (data.timelock != null) this.timelock = data.timelock + if (data.private_addresses != null) this.private_addresses = data.private_addresses.map ( (addr) => {return decodeSaplingAddress(addr)}) } } @@ -54,12 +110,57 @@ export class Identity extends Principal { let byteLength = 0; byteLength += this._dataByteLength(); //get the principal byte length - length += fromBase58Check(this.parent).hash.length; // parent + byteLength += 20; //uint160 parent + byteLength += varuint.encodingLength(Buffer.from(this.name, "utf8").length); // name compact size + byteLength += Buffer.from(this.name, "utf8").length; // name_in_utf8_bytes + + // contentmultimap + if (this.version.toNumber() >= VERSION_PBAAS) { + + byteLength += varuint.encodingLength(this.contentmultimap.size) + + for (const [key, value] of this.contentmultimap.entries()) { + byteLength += 20; //uint160 key + byteLength += varuint.encodingLength(value.length) + for (const n of value) { + byteLength += varuint.encodingLength(n.length); + byteLength += n.length; + } + } + } - length += varuint.encodingLength(this.name.length) // name compact size - length += this.name.length; // name_bytes + //contentmap + if (this.version.toNumber() < VERSION_PBAAS) { + byteLength += varuint.encodingLength(this.contentmap.size) + for (const m in this.contentmap) { + byteLength += 20; //uint160 key + byteLength += 32; //uint256 hash + } + } + //contentmap2 + byteLength += varuint.encodingLength(this.contentmap.size) + for (const m in this.contentmap) { + byteLength += 20; //uint160 key + byteLength += 32; //uint256 hash + } - //TODO: + byteLength += 20; //uint160 revocation authority + byteLength += 20; //uint160 recovery authority + + // privateaddresses + byteLength += varuint.encodingLength(this.private_addresses.length); + + for (const n of this.private_addresses) { + byteLength += varuint.encodingLength(n.d.length); + byteLength += n.d.length; // const 11 + byteLength += 32; //pk_d hash + } + + // post PBAAS + if (this.version.toNumber() >= VERSION_PBAAS) { + byteLength += 20; //uint160 systemid + byteLength += 4; //uint32 unlockafter + } return byteLength } @@ -67,14 +168,70 @@ export class Identity extends Principal { toBuffer() { const bufferWriter = new BufferWriter(Buffer.alloc(this._dataByteLength())) - //TODO: + bufferWriter.writeSlice(this._toBuffer()); + bufferWriter.writeSlice(fromBase58Check(this.parent).hash); + bufferWriter.writeCompactSize(Buffer.from(this.name, "utf8").length) + bufferWriter.writeSlice(Buffer.from(this.name, "utf8")); + + //contentmultimap + if (this.version.toNumber() < VERSION_PBAAS) { + + bufferWriter.writeCompactSize(this.contentmultimap.size) + + for (const [key, value] of this.contentmultimap.entries()) { + + bufferWriter.writeSlice(fromBase58Check(key).hash) + bufferWriter.writeCompactSize(value.length) + + for (const n of value) { + bufferWriter.writeCompactSize(n.length) + bufferWriter.writeSlice(n); + + } + } + } + + //contentmap + if (this.version.toNumber() < VERSION_PBAAS) { + bufferWriter.writeCompactSize(this.contentmap.size) + for (const [key, value] of this.contentmap.entries()) { + bufferWriter.writeSlice(value); + } + } + + //contentmap2 + bufferWriter.writeCompactSize(this.contentmap.size) + for (const [key, value] of this.contentmap.entries()) { + bufferWriter.writeSlice(value); + } + + bufferWriter.writeSlice(fromBase58Check(this.revocation_authority).hash) + bufferWriter.writeSlice(fromBase58Check(this.recovery_authority).hash) + + // privateaddresses + bufferWriter.writeCompactSize(this.private_addresses.length); + + for (const n of this.private_addresses) { + bufferWriter.writeCompactSize(n.d.length); + bufferWriter.writeSlice(n.d); + bufferWriter.writeSlice(n.pk_d); + } + // post PBAAS + if (this.version.toNumber() >= VERSION_PBAAS) { + bufferWriter.writeSlice(fromBase58Check(this.system_id).hash) + bufferWriter.writeUInt32(this.timelock) + } return bufferWriter.buffer } fromBuffer(buffer, offset: number = 0) { const reader = new BufferReader(buffer, offset); - //TODO: + + reader.offset = this._fromBuffer(reader.buffer, reader.offset); + + this.parent = toBase58Check(reader.readSlice(20), I_ADDR_VERSION) + //TODO: return reader.offset; } diff --git a/src/pbaas/Principal.ts b/src/pbaas/Principal.ts index f297fd3..7ca385d 100644 --- a/src/pbaas/Principal.ts +++ b/src/pbaas/Principal.ts @@ -1,7 +1,6 @@ import varuint from '../utils/varuint' import bufferutils from '../utils/bufferutils' import { BigNumber } from '../utils/types/BigNumber'; -import { TxDestination } from './TxDestination'; import { fromBase58Check, toBase58Check } from '../utils/address'; import { R_ADDR_VERSION } from '../constants/vdxf'; import { BN } from 'bn.js'; @@ -62,13 +61,97 @@ export class Principal { _fromBuffer(buffer, offset: number = 0) { const reader = new BufferReader(buffer, offset); - this.flags = new BN(reader.readUInt32(), 10); this.version = new BN(reader.readUInt32(), 10); + this.flags = new BN(reader.readUInt32(), 10); + this.primary_addresses = new TxDestination(); reader.offset = this.primary_addresses.fromBuffer(reader.buffer, reader.offset); this.min_sigs = new BN(reader.readUInt32(), 10); return reader.offset; } +} + +class TxDestination { + primary_addresses: Array; + + constructor(data: { primary_addresses?: Array } = null) { + + if(data != null) { + for (const tempAddr of data.primary_addresses) { + + let tempDecoded; + try { + let tempRaddress = fromBase58Check(tempAddr) + tempDecoded = tempRaddress.hash + if (tempDecoded.length != 20 || tempRaddress.version != R_ADDR_VERSION) + throw new Error("R address Error") + } catch (e) { + + if (e.message === "R address Error") + throw new Error(e.message) + tempDecoded = Buffer.from(tempAddr, 'hex') + if (tempDecoded.length != 33) + throw new Error("Incorrect hex length of pub key") + } + this.primary_addresses.push(tempDecoded) + } + } + } + + getNumValues() { + return new BN(this.primary_addresses.length, 10) + } + + getAddressString() { + let retval = []; + + for (const addr of this.primary_addresses) + + if (addr.length == 20) { + retval.push(toBase58Check(addr, R_ADDR_VERSION)); + } + else if (addr.length == 33) { + retval.push(addr.toString('hex')); + } + else { + retval.push(""); + } + } + + getByteLength() { + let byteLength = 0; + + byteLength += varuint.encodingLength(this.primary_addresses.length); + + for (const txDest of this.primary_addresses) { + byteLength += varuint.encodingLength(txDest.length); + byteLength += txDest.length; + } + + return byteLength + } + + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) + + bufferWriter.writeVarInt(new BN(this.primary_addresses.length)) + bufferWriter.writeVector(this.primary_addresses); + + return bufferWriter.buffer + } + + fromBuffer(buffer, offset: number = 0) { + const reader = new BufferReader(buffer, offset); + let count: number; + + count = reader.readVarInt().toNumber(); + + for (let i = 0; i < count; i++) { + this.primary_addresses[i] = reader.readVarSlice(); + } + + return reader.offset; + } } \ No newline at end of file diff --git a/src/pbaas/TxDestination.ts b/src/pbaas/TxDestination.ts deleted file mode 100644 index cb0dc87..0000000 --- a/src/pbaas/TxDestination.ts +++ /dev/null @@ -1,85 +0,0 @@ -import varuint from '../utils/varuint' -import bufferutils from '../utils/bufferutils' -import { fromBase58Check, toBase58Check } from '../utils/address'; -import { R_ADDR_VERSION } from '../constants/vdxf'; -import { BN } from 'bn.js'; - -const { BufferReader, BufferWriter } = bufferutils - -export class TxDestination { - primary_addresses: Array; - - constructor(data: { primary_addresses?: Array } = {}) { - - for (const tempAddr of data.primary_addresses) { - - let tempDecoded; - try { - let tempRaddress = fromBase58Check(tempAddr) - tempDecoded = tempRaddress.hash - if (tempDecoded.length != 20 || tempRaddress.version != R_ADDR_VERSION) - throw new Error("Incorrect hex length of pub key") - } catch (e) { - tempDecoded = Buffer.from(tempAddr, 'hex') - if (tempDecoded.length != 33) - throw new Error("Incorrect hex length of pub key") - } - this.primary_addresses.push(tempDecoded) - } - } - - getNumValues() { - return new BN(this.primary_addresses.length, 10) - } - - getAddressString() { - let retval = []; - - for (const addr of this.primary_addresses) - - if (addr.length == 20) { - retval.push(toBase58Check(addr, R_ADDR_VERSION)); - } - else if (addr.length == 33) { - retval.push(addr.toString('hex')); - } - else { - retval.push(""); - } - } - - getByteLength() { - let byteLength = 0; - - byteLength += varuint.encodingLength(this.primary_addresses.length); - - for (const txDest of this.primary_addresses) { - byteLength += varuint.encodingLength(txDest.length); - byteLength += txDest.length; - } - - return byteLength - } - - toBuffer() { - const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) - - bufferWriter.writeVarInt(new BN(this.primary_addresses.length)) - bufferWriter.writeVector(this.primary_addresses); - - return bufferWriter.buffer - } - - fromBuffer(buffer, offset: number = 0) { - const reader = new BufferReader(buffer, offset); - let count: number; - - count = reader.readVarInt().toNumber(); - - for (let i = 0; i < count; i++) { - this.primary_addresses[i] = reader.readVarSlice(); - } - - return reader.offset; - } -} \ No newline at end of file diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index 7b2c12c..389a77c 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -463,12 +463,12 @@ export class AttestationRequest extends VDXFObject { function readHash160Array(arr: Hash160[]): void { const length = reader.readVarInt(); - for (let i = 0; i < length; i++) { + for (let i = 0; i < length.toNumber(); i++) { const member = new Hash160(); reader.offset = member.fromBuffer(reader.buffer, false, reader.offset); arr.push(member); } - if (length === 0) arr = []; + if (length.toNumber() === 0) arr = []; } readHash160Array(this.data.accepted_attestors); diff --git a/yarn.lock b/yarn.lock index bb96ea0..b819dda 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,355 +2,364 @@ # yarn lockfile v1 -"@ampproject/remapping@^2.1.0": - "integrity" "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==" - "resolved" "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz" - "version" "2.2.0" +"@ampproject/remapping@^2.2.0": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630" + integrity sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg== dependencies: - "@jridgewell/gen-mapping" "^0.1.0" + "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.18.6": - "integrity" "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==" - "resolved" "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz" - "version" "7.18.6" - dependencies: - "@babel/highlight" "^7.18.6" - -"@babel/compat-data@^7.19.3": - "integrity" "sha512-prBHMK4JYYK+wDjJF1q99KK4JLL+egWS4nmNqdlMUgCExMZ+iZW0hGhyC3VEbsPjvaN0TBhW//VIFwBrk8sEiw==" - "resolved" "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.3.tgz" - "version" "7.19.3" - -"@babel/core@^7.0.0", "@babel/core@^7.0.0-0", "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.8.0", "@babel/core@>=7.0.0-beta.0 <8": - "integrity" "sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==" - "resolved" "https://registry.npmjs.org/@babel/core/-/core-7.19.3.tgz" - "version" "7.19.3" - dependencies: - "@ampproject/remapping" "^2.1.0" - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.19.3" - "@babel/helper-compilation-targets" "^7.19.3" - "@babel/helper-module-transforms" "^7.19.0" - "@babel/helpers" "^7.19.0" - "@babel/parser" "^7.19.3" - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.19.3" - "@babel/types" "^7.19.3" - "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.19.3", "@babel/generator@^7.7.2": - "integrity" "sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==" - "resolved" "https://registry.npmjs.org/@babel/generator/-/generator-7.19.3.tgz" - "version" "7.19.3" - dependencies: - "@babel/types" "^7.19.3" +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.5.tgz#234d98e1551960604f1246e6475891a570ad5658" + integrity sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ== + dependencies: + "@babel/highlight" "^7.22.5" + +"@babel/compat-data@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.5.tgz#b1f6c86a02d85d2dd3368a2b67c09add8cd0c255" + integrity sha512-4Jc/YuIaYqKnDDz892kPIledykKg12Aw1PYX5i/TY28anJtacvM1Rrr8wbieB9GfEJwlzqT0hUEao0CxEebiDA== + +"@babel/core@^7.11.6", "@babel/core@^7.12.3": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.5.tgz#d67d9747ecf26ee7ecd3ebae1ee22225fe902a89" + integrity sha512-SBuTAjg91A3eKOvD+bPEz3LlhHZRNu1nFOVts9lzDJTXshHTjII0BAtDS3Y2DAkdZdDKWVZGVwkDfc4Clxn1dg== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.22.5" + "@babel/generator" "^7.22.5" + "@babel/helper-compilation-targets" "^7.22.5" + "@babel/helper-module-transforms" "^7.22.5" + "@babel/helpers" "^7.22.5" + "@babel/parser" "^7.22.5" + "@babel/template" "^7.22.5" + "@babel/traverse" "^7.22.5" + "@babel/types" "^7.22.5" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.2" + semver "^6.3.0" + +"@babel/generator@^7.22.5", "@babel/generator@^7.7.2": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.5.tgz#1e7bf768688acfb05cf30b2369ef855e82d984f7" + integrity sha512-+lcUbnTRhd0jOewtFSedLyiPsD5tswKkbgcezOqqWFUVNEwoUTlpPOBmvhG7OXWLR4jMdv0czPGH5XbflnD1EA== + dependencies: + "@babel/types" "^7.22.5" "@jridgewell/gen-mapping" "^0.3.2" - "jsesc" "^2.5.1" - -"@babel/helper-compilation-targets@^7.19.3": - "integrity" "sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==" - "resolved" "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz" - "version" "7.19.3" - dependencies: - "@babel/compat-data" "^7.19.3" - "@babel/helper-validator-option" "^7.18.6" - "browserslist" "^4.21.3" - "semver" "^6.3.0" - -"@babel/helper-environment-visitor@^7.18.9": - "integrity" "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==" - "resolved" "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz" - "version" "7.18.9" - -"@babel/helper-function-name@^7.19.0": - "integrity" "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==" - "resolved" "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz" - "version" "7.19.0" - dependencies: - "@babel/template" "^7.18.10" - "@babel/types" "^7.19.0" - -"@babel/helper-hoist-variables@^7.18.6": - "integrity" "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==" - "resolved" "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz" - "version" "7.18.6" - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-module-imports@^7.18.6": - "integrity" "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==" - "resolved" "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz" - "version" "7.18.6" - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-module-transforms@^7.19.0": - "integrity" "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==" - "resolved" "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz" - "version" "7.19.0" - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-simple-access" "^7.18.6" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/helper-validator-identifier" "^7.18.6" - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.19.0" - "@babel/types" "^7.19.0" - -"@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.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.8.0": - "integrity" "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==" - "resolved" "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz" - "version" "7.19.0" - -"@babel/helper-simple-access@^7.18.6": - "integrity" "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==" - "resolved" "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz" - "version" "7.18.6" - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-split-export-declaration@^7.18.6": - "integrity" "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==" - "resolved" "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz" - "version" "7.18.6" - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-string-parser@^7.18.10": - "integrity" "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==" - "resolved" "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz" - "version" "7.18.10" - -"@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": - "integrity" "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==" - "resolved" "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz" - "version" "7.19.1" - -"@babel/helper-validator-option@^7.18.6": - "integrity" "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==" - "resolved" "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz" - "version" "7.18.6" - -"@babel/helpers@^7.19.0": - "integrity" "sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==" - "resolved" "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.0.tgz" - "version" "7.19.0" - dependencies: - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.19.0" - "@babel/types" "^7.19.0" - -"@babel/highlight@^7.18.6": - "integrity" "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==" - "resolved" "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz" - "version" "7.18.6" - dependencies: - "@babel/helper-validator-identifier" "^7.18.6" - "chalk" "^2.0.0" - "js-tokens" "^4.0.0" - -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.18.10", "@babel/parser@^7.19.3": - "integrity" "sha512-pJ9xOlNWHiy9+FuFP09DEAFbAn4JskgRsVcc169w2xRBC3FRGuQEwjeIMMND9L2zc0iEhO/tGv4Zq+km+hxNpQ==" - "resolved" "https://registry.npmjs.org/@babel/parser/-/parser-7.19.3.tgz" - "version" "7.19.3" + "@jridgewell/trace-mapping" "^0.3.17" + jsesc "^2.5.1" + +"@babel/helper-compilation-targets@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.5.tgz#fc7319fc54c5e2fa14b2909cf3c5fd3046813e02" + integrity sha512-Ji+ywpHeuqxB8WDxraCiqR0xfhYjiDE/e6k7FuIaANnoOFxAHskHChz4vA1mJC9Lbm01s1PVAGhQY4FUKSkGZw== + dependencies: + "@babel/compat-data" "^7.22.5" + "@babel/helper-validator-option" "^7.22.5" + browserslist "^4.21.3" + lru-cache "^5.1.1" + semver "^6.3.0" + +"@babel/helper-environment-visitor@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz#f06dd41b7c1f44e1f8da6c4055b41ab3a09a7e98" + integrity sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q== + +"@babel/helper-function-name@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz#ede300828905bb15e582c037162f99d5183af1be" + integrity sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ== + dependencies: + "@babel/template" "^7.22.5" + "@babel/types" "^7.22.5" + +"@babel/helper-hoist-variables@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb" + integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-module-imports@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz#1a8f4c9f4027d23f520bd76b364d44434a72660c" + integrity sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-module-transforms@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.22.5.tgz#0f65daa0716961b6e96b164034e737f60a80d2ef" + integrity sha512-+hGKDt/Ze8GFExiVHno/2dvG5IdstpzCq0y4Qc9OJ25D4q3pKfiIP/4Vp3/JvhDkLKsDK2api3q3fpIgiIF5bw== + dependencies: + "@babel/helper-environment-visitor" "^7.22.5" + "@babel/helper-module-imports" "^7.22.5" + "@babel/helper-simple-access" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.5" + "@babel/helper-validator-identifier" "^7.22.5" + "@babel/template" "^7.22.5" + "@babel/traverse" "^7.22.5" + "@babel/types" "^7.22.5" + +"@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.14.5", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.8.0": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz#dd7ee3735e8a313b9f7b05a773d892e88e6d7295" + integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg== + +"@babel/helper-simple-access@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz#4938357dc7d782b80ed6dbb03a0fba3d22b1d5de" + integrity sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-split-export-declaration@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.5.tgz#88cf11050edb95ed08d596f7a044462189127a08" + integrity sha512-thqK5QFghPKWLhAV321lxF95yCg2K3Ob5yw+M3VHWfdia0IkPXUtoLH8x/6Fh486QUvzhb8YOWHChTVen2/PoQ== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-string-parser@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f" + integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw== + +"@babel/helper-validator-identifier@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz#9544ef6a33999343c8740fa51350f30eeaaaf193" + integrity sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ== + +"@babel/helper-validator-option@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz#de52000a15a177413c8234fa3a8af4ee8102d0ac" + integrity sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw== + +"@babel/helpers@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.22.5.tgz#74bb4373eb390d1ceed74a15ef97767e63120820" + integrity sha512-pSXRmfE1vzcUIDFQcSGA5Mr+GxBV9oiRKDuDxXvWQQBCh8HoIjs/2DlDB7H8smac1IVrB9/xdXj2N3Wol9Cr+Q== + dependencies: + "@babel/template" "^7.22.5" + "@babel/traverse" "^7.22.5" + "@babel/types" "^7.22.5" + +"@babel/highlight@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.5.tgz#aa6c05c5407a67ebce408162b7ede789b4d22031" + integrity sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw== + dependencies: + "@babel/helper-validator-identifier" "^7.22.5" + chalk "^2.0.0" + js-tokens "^4.0.0" + +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.5.tgz#721fd042f3ce1896238cf1b341c77eb7dee7dbea" + integrity sha512-DFZMC9LJUG9PLOclRC32G63UXwzqS2koQC8dkx+PLdmt1xSePYpbT/NbsrJy8Q/muXz7o/h/d4A7Fuyixm559Q== "@babel/plugin-syntax-async-generators@^7.8.4": - "integrity" "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==" - "resolved" "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz" - "version" "7.8.4" + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" + integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-bigint@^7.8.3": - "integrity" "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==" - "resolved" "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz" - "version" "7.8.3" + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea" + integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-class-properties@^7.8.3": - "integrity" "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==" - "resolved" "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz" - "version" "7.12.13" + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" + integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== dependencies: "@babel/helper-plugin-utils" "^7.12.13" "@babel/plugin-syntax-import-meta@^7.8.3": - "integrity" "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==" - "resolved" "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz" - "version" "7.10.4" + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" + integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== dependencies: "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-json-strings@^7.8.3": - "integrity" "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==" - "resolved" "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz" - "version" "7.8.3" + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" + integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": - "integrity" "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==" - "resolved" "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz" - "version" "7.10.4" + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" + integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== dependencies: "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": - "integrity" "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==" - "resolved" "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz" - "version" "7.8.3" + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" + integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-numeric-separator@^7.8.3": - "integrity" "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==" - "resolved" "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz" - "version" "7.10.4" + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" + integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== dependencies: "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-object-rest-spread@^7.8.3": - "integrity" "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==" - "resolved" "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz" - "version" "7.8.3" + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" + integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-optional-catch-binding@^7.8.3": - "integrity" "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==" - "resolved" "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz" - "version" "7.8.3" + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" + integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-optional-chaining@^7.8.3": - "integrity" "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==" - "resolved" "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz" - "version" "7.8.3" + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" + integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-top-level-await@^7.8.3": - "integrity" "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==" - "resolved" "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz" - "version" "7.14.5" + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" + integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== dependencies: "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-typescript@^7.7.2": - "integrity" "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==" - "resolved" "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz" - "version" "7.18.6" - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/template@^7.18.10", "@babel/template@^7.3.3": - "integrity" "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==" - "resolved" "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz" - "version" "7.18.10" - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/parser" "^7.18.10" - "@babel/types" "^7.18.10" - -"@babel/traverse@^7.19.0", "@babel/traverse@^7.19.3", "@babel/traverse@^7.7.2": - "integrity" "sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==" - "resolved" "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.3.tgz" - "version" "7.19.3" - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.19.3" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.19.0" - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.19.3" - "@babel/types" "^7.19.3" - "debug" "^4.1.0" - "globals" "^11.1.0" - -"@babel/types@^7.0.0", "@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.19.0", "@babel/types@^7.19.3", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - "integrity" "sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==" - "resolved" "https://registry.npmjs.org/@babel/types/-/types-7.19.3.tgz" - "version" "7.19.3" - dependencies: - "@babel/helper-string-parser" "^7.18.10" - "@babel/helper-validator-identifier" "^7.19.1" - "to-fast-properties" "^2.0.0" + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz#aac8d383b062c5072c647a31ef990c1d0af90272" + integrity sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/template@^7.22.5", "@babel/template@^7.3.3": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.5.tgz#0c8c4d944509875849bd0344ff0050756eefc6ec" + integrity sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw== + dependencies: + "@babel/code-frame" "^7.22.5" + "@babel/parser" "^7.22.5" + "@babel/types" "^7.22.5" + +"@babel/traverse@^7.22.5", "@babel/traverse@^7.7.2": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.22.5.tgz#44bd276690db6f4940fdb84e1cb4abd2f729ccd1" + integrity sha512-7DuIjPgERaNo6r+PZwItpjCZEa5vyw4eJGufeLxrPdBXBoLcCJCIasvK6pK/9DVNrLZTLFhUGqaC6X/PA007TQ== + dependencies: + "@babel/code-frame" "^7.22.5" + "@babel/generator" "^7.22.5" + "@babel/helper-environment-visitor" "^7.22.5" + "@babel/helper-function-name" "^7.22.5" + "@babel/helper-hoist-variables" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.5" + "@babel/parser" "^7.22.5" + "@babel/types" "^7.22.5" + debug "^4.1.0" + globals "^11.1.0" + +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.5", "@babel/types@^7.3.3": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.5.tgz#cd93eeaab025880a3a47ec881f4b096a5b786fbe" + integrity sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA== + dependencies: + "@babel/helper-string-parser" "^7.22.5" + "@babel/helper-validator-identifier" "^7.22.5" + to-fast-properties "^2.0.0" "@bcoe/v8-coverage@^0.2.3": - "integrity" "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==" - "resolved" "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz" - "version" "0.2.3" + version "0.2.3" + resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" + integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== + +"@eslint-community/eslint-utils@^4.2.0": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" + integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== + dependencies: + eslint-visitor-keys "^3.3.0" "@eslint/eslintrc@^1.3.0": - "integrity" "sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ==" - "resolved" "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.2.tgz" - "version" "1.3.2" - dependencies: - "ajv" "^6.12.4" - "debug" "^4.3.2" - "espree" "^9.4.0" - "globals" "^13.15.0" - "ignore" "^5.2.0" - "import-fresh" "^3.2.1" - "js-yaml" "^4.1.0" - "minimatch" "^3.1.2" - "strip-json-comments" "^3.1.1" + version "1.4.1" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.4.1.tgz#af58772019a2d271b7e2d4c23ff4ddcba3ccfb3e" + integrity sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^9.4.0" + globals "^13.19.0" + ignore "^5.2.0" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + minimatch "^3.1.2" + strip-json-comments "^3.1.1" "@humanwhocodes/config-array@^0.9.2": - "integrity" "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==" - "resolved" "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz" - "version" "0.9.5" + version "0.9.5" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.9.5.tgz#2cbaf9a89460da24b5ca6531b8bbfc23e1df50c7" + integrity sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw== dependencies: "@humanwhocodes/object-schema" "^1.2.1" - "debug" "^4.1.1" - "minimatch" "^3.0.4" + debug "^4.1.1" + minimatch "^3.0.4" "@humanwhocodes/object-schema@^1.2.1": - "integrity" "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==" - "resolved" "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz" - "version" "1.2.1" + version "1.2.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" + integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== "@istanbuljs/load-nyc-config@^1.0.0": - "integrity" "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==" - "resolved" "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz" - "version" "1.1.0" + version "1.1.0" + resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" + integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== dependencies: - "camelcase" "^5.3.1" - "find-up" "^4.1.0" - "get-package-type" "^0.1.0" - "js-yaml" "^3.13.1" - "resolve-from" "^5.0.0" + camelcase "^5.3.1" + find-up "^4.1.0" + get-package-type "^0.1.0" + js-yaml "^3.13.1" + resolve-from "^5.0.0" "@istanbuljs/schema@^0.1.2": - "integrity" "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==" - "resolved" "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz" - "version" "0.1.3" + version "0.1.3" + resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" + integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== "@jest/console@^28.1.3": - "integrity" "sha512-QPAkP5EwKdK/bxIr6C1I4Vs0rm2nHiANzj/Z5X2JQkrZo6IqvC4ldZ9K95tF0HdidhA8Bo6egxSzUFPYKcEXLw==" - "resolved" "https://registry.npmjs.org/@jest/console/-/console-28.1.3.tgz" - "version" "28.1.3" + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-28.1.3.tgz#2030606ec03a18c31803b8a36382762e447655df" + integrity sha512-QPAkP5EwKdK/bxIr6C1I4Vs0rm2nHiANzj/Z5X2JQkrZo6IqvC4ldZ9K95tF0HdidhA8Bo6egxSzUFPYKcEXLw== dependencies: "@jest/types" "^28.1.3" "@types/node" "*" - "chalk" "^4.0.0" - "jest-message-util" "^28.1.3" - "jest-util" "^28.1.3" - "slash" "^3.0.0" + chalk "^4.0.0" + jest-message-util "^28.1.3" + jest-util "^28.1.3" + slash "^3.0.0" "@jest/core@^28.1.3": - "integrity" "sha512-CIKBrlaKOzA7YG19BEqCw3SLIsEwjZkeJzf5bdooVnW4bH5cktqe3JX+G2YV1aK5vP8N9na1IGWFzYaTp6k6NA==" - "resolved" "https://registry.npmjs.org/@jest/core/-/core-28.1.3.tgz" - "version" "28.1.3" + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-28.1.3.tgz#0ebf2bd39840f1233cd5f2d1e6fc8b71bd5a1ac7" + integrity sha512-CIKBrlaKOzA7YG19BEqCw3SLIsEwjZkeJzf5bdooVnW4bH5cktqe3JX+G2YV1aK5vP8N9na1IGWFzYaTp6k6NA== dependencies: "@jest/console" "^28.1.3" "@jest/reporters" "^28.1.3" @@ -358,80 +367,80 @@ "@jest/transform" "^28.1.3" "@jest/types" "^28.1.3" "@types/node" "*" - "ansi-escapes" "^4.2.1" - "chalk" "^4.0.0" - "ci-info" "^3.2.0" - "exit" "^0.1.2" - "graceful-fs" "^4.2.9" - "jest-changed-files" "^28.1.3" - "jest-config" "^28.1.3" - "jest-haste-map" "^28.1.3" - "jest-message-util" "^28.1.3" - "jest-regex-util" "^28.0.2" - "jest-resolve" "^28.1.3" - "jest-resolve-dependencies" "^28.1.3" - "jest-runner" "^28.1.3" - "jest-runtime" "^28.1.3" - "jest-snapshot" "^28.1.3" - "jest-util" "^28.1.3" - "jest-validate" "^28.1.3" - "jest-watcher" "^28.1.3" - "micromatch" "^4.0.4" - "pretty-format" "^28.1.3" - "rimraf" "^3.0.0" - "slash" "^3.0.0" - "strip-ansi" "^6.0.0" + ansi-escapes "^4.2.1" + chalk "^4.0.0" + ci-info "^3.2.0" + exit "^0.1.2" + graceful-fs "^4.2.9" + jest-changed-files "^28.1.3" + jest-config "^28.1.3" + jest-haste-map "^28.1.3" + jest-message-util "^28.1.3" + jest-regex-util "^28.0.2" + jest-resolve "^28.1.3" + jest-resolve-dependencies "^28.1.3" + jest-runner "^28.1.3" + jest-runtime "^28.1.3" + jest-snapshot "^28.1.3" + jest-util "^28.1.3" + jest-validate "^28.1.3" + jest-watcher "^28.1.3" + micromatch "^4.0.4" + pretty-format "^28.1.3" + rimraf "^3.0.0" + slash "^3.0.0" + strip-ansi "^6.0.0" "@jest/environment@^28.1.3": - "integrity" "sha512-1bf40cMFTEkKyEf585R9Iz1WayDjHoHqvts0XFYEqyKM3cFWDpeMoqKKTAF9LSYQModPUlh8FKptoM2YcMWAXA==" - "resolved" "https://registry.npmjs.org/@jest/environment/-/environment-28.1.3.tgz" - "version" "28.1.3" + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-28.1.3.tgz#abed43a6b040a4c24fdcb69eab1f97589b2d663e" + integrity sha512-1bf40cMFTEkKyEf585R9Iz1WayDjHoHqvts0XFYEqyKM3cFWDpeMoqKKTAF9LSYQModPUlh8FKptoM2YcMWAXA== dependencies: "@jest/fake-timers" "^28.1.3" "@jest/types" "^28.1.3" "@types/node" "*" - "jest-mock" "^28.1.3" + jest-mock "^28.1.3" "@jest/expect-utils@^28.1.3": - "integrity" "sha512-wvbi9LUrHJLn3NlDW6wF2hvIMtd4JUl2QNVrjq+IBSHirgfrR3o9RnVtxzdEGO2n9JyIWwHnLfby5KzqBGg2YA==" - "resolved" "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.1.3.tgz" - "version" "28.1.3" + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-28.1.3.tgz#58561ce5db7cd253a7edddbc051fb39dda50f525" + integrity sha512-wvbi9LUrHJLn3NlDW6wF2hvIMtd4JUl2QNVrjq+IBSHirgfrR3o9RnVtxzdEGO2n9JyIWwHnLfby5KzqBGg2YA== dependencies: - "jest-get-type" "^28.0.2" + jest-get-type "^28.0.2" "@jest/expect@^28.1.3": - "integrity" "sha512-lzc8CpUbSoE4dqT0U+g1qODQjBRHPpCPXissXD4mS9+sWQdmmpeJ9zSH1rS1HEkrsMN0fb7nKrJ9giAR1d3wBw==" - "resolved" "https://registry.npmjs.org/@jest/expect/-/expect-28.1.3.tgz" - "version" "28.1.3" + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-28.1.3.tgz#9ac57e1d4491baca550f6bdbd232487177ad6a72" + integrity sha512-lzc8CpUbSoE4dqT0U+g1qODQjBRHPpCPXissXD4mS9+sWQdmmpeJ9zSH1rS1HEkrsMN0fb7nKrJ9giAR1d3wBw== dependencies: - "expect" "^28.1.3" - "jest-snapshot" "^28.1.3" + expect "^28.1.3" + jest-snapshot "^28.1.3" "@jest/fake-timers@^28.1.3": - "integrity" "sha512-D/wOkL2POHv52h+ok5Oj/1gOG9HSywdoPtFsRCUmlCILXNn5eIWmcnd3DIiWlJnpGvQtmajqBP95Ei0EimxfLw==" - "resolved" "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.1.3.tgz" - "version" "28.1.3" + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-28.1.3.tgz#230255b3ad0a3d4978f1d06f70685baea91c640e" + integrity sha512-D/wOkL2POHv52h+ok5Oj/1gOG9HSywdoPtFsRCUmlCILXNn5eIWmcnd3DIiWlJnpGvQtmajqBP95Ei0EimxfLw== dependencies: "@jest/types" "^28.1.3" "@sinonjs/fake-timers" "^9.1.2" "@types/node" "*" - "jest-message-util" "^28.1.3" - "jest-mock" "^28.1.3" - "jest-util" "^28.1.3" + jest-message-util "^28.1.3" + jest-mock "^28.1.3" + jest-util "^28.1.3" "@jest/globals@^28.1.3": - "integrity" "sha512-XFU4P4phyryCXu1pbcqMO0GSQcYe1IsalYCDzRNyhetyeyxMcIxa11qPNDpVNLeretItNqEmYYQn1UYz/5x1NA==" - "resolved" "https://registry.npmjs.org/@jest/globals/-/globals-28.1.3.tgz" - "version" "28.1.3" + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-28.1.3.tgz#a601d78ddc5fdef542728309894895b4a42dc333" + integrity sha512-XFU4P4phyryCXu1pbcqMO0GSQcYe1IsalYCDzRNyhetyeyxMcIxa11qPNDpVNLeretItNqEmYYQn1UYz/5x1NA== dependencies: "@jest/environment" "^28.1.3" "@jest/expect" "^28.1.3" "@jest/types" "^28.1.3" "@jest/reporters@^28.1.3": - "integrity" "sha512-JuAy7wkxQZVNU/V6g9xKzCGC5LVXx9FDcABKsSXp5MiKPEE2144a/vXTEDoyzjUpZKfVwp08Wqg5A4WfTMAzjg==" - "resolved" "https://registry.npmjs.org/@jest/reporters/-/reporters-28.1.3.tgz" - "version" "28.1.3" + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-28.1.3.tgz#9adf6d265edafc5fc4a434cfb31e2df5a67a369a" + integrity sha512-JuAy7wkxQZVNU/V6g9xKzCGC5LVXx9FDcABKsSXp5MiKPEE2144a/vXTEDoyzjUpZKfVwp08Wqg5A4WfTMAzjg== dependencies: "@bcoe/v8-coverage" "^0.2.3" "@jest/console" "^28.1.3" @@ -440,493 +449,548 @@ "@jest/types" "^28.1.3" "@jridgewell/trace-mapping" "^0.3.13" "@types/node" "*" - "chalk" "^4.0.0" - "collect-v8-coverage" "^1.0.0" - "exit" "^0.1.2" - "glob" "^7.1.3" - "graceful-fs" "^4.2.9" - "istanbul-lib-coverage" "^3.0.0" - "istanbul-lib-instrument" "^5.1.0" - "istanbul-lib-report" "^3.0.0" - "istanbul-lib-source-maps" "^4.0.0" - "istanbul-reports" "^3.1.3" - "jest-message-util" "^28.1.3" - "jest-util" "^28.1.3" - "jest-worker" "^28.1.3" - "slash" "^3.0.0" - "string-length" "^4.0.1" - "strip-ansi" "^6.0.0" - "terminal-link" "^2.0.0" - "v8-to-istanbul" "^9.0.1" + chalk "^4.0.0" + collect-v8-coverage "^1.0.0" + exit "^0.1.2" + glob "^7.1.3" + graceful-fs "^4.2.9" + istanbul-lib-coverage "^3.0.0" + istanbul-lib-instrument "^5.1.0" + istanbul-lib-report "^3.0.0" + istanbul-lib-source-maps "^4.0.0" + istanbul-reports "^3.1.3" + jest-message-util "^28.1.3" + jest-util "^28.1.3" + jest-worker "^28.1.3" + slash "^3.0.0" + string-length "^4.0.1" + strip-ansi "^6.0.0" + terminal-link "^2.0.0" + v8-to-istanbul "^9.0.1" "@jest/schemas@^28.1.3": - "integrity" "sha512-/l/VWsdt/aBXgjshLWOFyFt3IVdYypu5y2Wn2rOO1un6nkqIn8SLXzgIMYXFyYsRWDyF5EthmKJMIdJvk08grg==" - "resolved" "https://registry.npmjs.org/@jest/schemas/-/schemas-28.1.3.tgz" - "version" "28.1.3" + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-28.1.3.tgz#ad8b86a66f11f33619e3d7e1dcddd7f2d40ff905" + integrity sha512-/l/VWsdt/aBXgjshLWOFyFt3IVdYypu5y2Wn2rOO1un6nkqIn8SLXzgIMYXFyYsRWDyF5EthmKJMIdJvk08grg== dependencies: "@sinclair/typebox" "^0.24.1" "@jest/source-map@^28.1.2": - "integrity" "sha512-cV8Lx3BeStJb8ipPHnqVw/IM2VCMWO3crWZzYodSIkxXnRcXJipCdx1JCK0K5MsJJouZQTH73mzf4vgxRaH9ww==" - "resolved" "https://registry.npmjs.org/@jest/source-map/-/source-map-28.1.2.tgz" - "version" "28.1.2" + version "28.1.2" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-28.1.2.tgz#7fe832b172b497d6663cdff6c13b0a920e139e24" + integrity sha512-cV8Lx3BeStJb8ipPHnqVw/IM2VCMWO3crWZzYodSIkxXnRcXJipCdx1JCK0K5MsJJouZQTH73mzf4vgxRaH9ww== dependencies: "@jridgewell/trace-mapping" "^0.3.13" - "callsites" "^3.0.0" - "graceful-fs" "^4.2.9" + callsites "^3.0.0" + graceful-fs "^4.2.9" "@jest/test-result@^28.1.3": - "integrity" "sha512-kZAkxnSE+FqE8YjW8gNuoVkkC9I7S1qmenl8sGcDOLropASP+BkcGKwhXoyqQuGOGeYY0y/ixjrd/iERpEXHNg==" - "resolved" "https://registry.npmjs.org/@jest/test-result/-/test-result-28.1.3.tgz" - "version" "28.1.3" + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-28.1.3.tgz#5eae945fd9f4b8fcfce74d239e6f725b6bf076c5" + integrity sha512-kZAkxnSE+FqE8YjW8gNuoVkkC9I7S1qmenl8sGcDOLropASP+BkcGKwhXoyqQuGOGeYY0y/ixjrd/iERpEXHNg== dependencies: "@jest/console" "^28.1.3" "@jest/types" "^28.1.3" "@types/istanbul-lib-coverage" "^2.0.0" - "collect-v8-coverage" "^1.0.0" + collect-v8-coverage "^1.0.0" "@jest/test-sequencer@^28.1.3": - "integrity" "sha512-NIMPEqqa59MWnDi1kvXXpYbqsfQmSJsIbnd85mdVGkiDfQ9WQQTXOLsvISUfonmnBT+w85WEgneCigEEdHDFxw==" - "resolved" "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.1.3.tgz" - "version" "28.1.3" + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-28.1.3.tgz#9d0c283d906ac599c74bde464bc0d7e6a82886c3" + integrity sha512-NIMPEqqa59MWnDi1kvXXpYbqsfQmSJsIbnd85mdVGkiDfQ9WQQTXOLsvISUfonmnBT+w85WEgneCigEEdHDFxw== dependencies: "@jest/test-result" "^28.1.3" - "graceful-fs" "^4.2.9" - "jest-haste-map" "^28.1.3" - "slash" "^3.0.0" + graceful-fs "^4.2.9" + jest-haste-map "^28.1.3" + slash "^3.0.0" "@jest/transform@^28.1.3": - "integrity" "sha512-u5dT5di+oFI6hfcLOHGTAfmUxFRrjK+vnaP0kkVow9Md/M7V/MxqQMOz/VV25UZO8pzeA9PjfTpOu6BDuwSPQA==" - "resolved" "https://registry.npmjs.org/@jest/transform/-/transform-28.1.3.tgz" - "version" "28.1.3" + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-28.1.3.tgz#59d8098e50ab07950e0f2fc0fc7ec462371281b0" + integrity sha512-u5dT5di+oFI6hfcLOHGTAfmUxFRrjK+vnaP0kkVow9Md/M7V/MxqQMOz/VV25UZO8pzeA9PjfTpOu6BDuwSPQA== dependencies: "@babel/core" "^7.11.6" "@jest/types" "^28.1.3" "@jridgewell/trace-mapping" "^0.3.13" - "babel-plugin-istanbul" "^6.1.1" - "chalk" "^4.0.0" - "convert-source-map" "^1.4.0" - "fast-json-stable-stringify" "^2.0.0" - "graceful-fs" "^4.2.9" - "jest-haste-map" "^28.1.3" - "jest-regex-util" "^28.0.2" - "jest-util" "^28.1.3" - "micromatch" "^4.0.4" - "pirates" "^4.0.4" - "slash" "^3.0.0" - "write-file-atomic" "^4.0.1" - -"@jest/types@^28.0.0", "@jest/types@^28.1.3": - "integrity" "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==" - "resolved" "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz" - "version" "28.1.3" + babel-plugin-istanbul "^6.1.1" + chalk "^4.0.0" + convert-source-map "^1.4.0" + fast-json-stable-stringify "^2.0.0" + graceful-fs "^4.2.9" + jest-haste-map "^28.1.3" + jest-regex-util "^28.0.2" + jest-util "^28.1.3" + micromatch "^4.0.4" + pirates "^4.0.4" + slash "^3.0.0" + write-file-atomic "^4.0.1" + +"@jest/types@^28.1.3": + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-28.1.3.tgz#b05de80996ff12512bc5ceb1d208285a7d11748b" + integrity sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ== dependencies: "@jest/schemas" "^28.1.3" "@types/istanbul-lib-coverage" "^2.0.0" "@types/istanbul-reports" "^3.0.0" "@types/node" "*" "@types/yargs" "^17.0.8" - "chalk" "^4.0.0" + chalk "^4.0.0" -"@jridgewell/gen-mapping@^0.1.0": - "integrity" "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==" - "resolved" "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz" - "version" "0.1.1" - dependencies: - "@jridgewell/set-array" "^1.0.0" - "@jridgewell/sourcemap-codec" "^1.4.10" - -"@jridgewell/gen-mapping@^0.3.2": - "integrity" "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==" - "resolved" "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz" - "version" "0.3.2" +"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" + integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ== dependencies: "@jridgewell/set-array" "^1.0.1" "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" -"@jridgewell/resolve-uri@^3.0.3": - "integrity" "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==" - "resolved" "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz" - "version" "3.1.0" +"@jridgewell/resolve-uri@3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" + integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== + +"@jridgewell/set-array@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" + integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== -"@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1": - "integrity" "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==" - "resolved" "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz" - "version" "1.1.2" +"@jridgewell/sourcemap-codec@1.4.14": + version "1.4.14" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" + integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== "@jridgewell/sourcemap-codec@^1.4.10": - "integrity" "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" - "resolved" "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz" - "version" "1.4.14" + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== -"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.13", "@jridgewell/trace-mapping@^0.3.9": - "integrity" "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==" - "resolved" "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz" - "version" "0.3.15" +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.13", "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": + version "0.3.18" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz#25783b2086daf6ff1dcb53c9249ae480e4dd4cd6" + integrity sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA== dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/resolve-uri" "3.1.0" + "@jridgewell/sourcemap-codec" "1.4.14" "@noble/hashes@^1.2.0": - "integrity" "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==" - "resolved" "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz" - "version" "1.3.1" + version "1.3.1" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.1.tgz#8831ef002114670c603c458ab8b11328406953a9" + integrity sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA== "@nodelib/fs.scandir@2.1.5": - "integrity" "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==" - "resolved" "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" - "version" "2.1.5" + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== dependencies: "@nodelib/fs.stat" "2.0.5" - "run-parallel" "^1.1.9" + run-parallel "^1.1.9" -"@nodelib/fs.stat@^2.0.2", "@nodelib/fs.stat@2.0.5": - "integrity" "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==" - "resolved" "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" - "version" "2.0.5" +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== "@nodelib/fs.walk@^1.2.3": - "integrity" "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==" - "resolved" "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz" - "version" "1.2.8" + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== dependencies: "@nodelib/fs.scandir" "2.1.5" - "fastq" "^1.6.0" + fastq "^1.6.0" "@sinclair/typebox@^0.24.1": - "integrity" "sha512-1orQTvtazZmsPeBroJjysvsOQCYV2yjWlebkSY38pl5vr2tdLjEJ+LoxITlGNZaH2RE19WlAwQMkH/7C14wLfw==" - "resolved" "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.43.tgz" - "version" "0.24.43" + version "0.24.51" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.51.tgz#645f33fe4e02defe26f2f5c0410e1c094eac7f5f" + integrity sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA== "@sinonjs/commons@^1.7.0": - "integrity" "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==" - "resolved" "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz" - "version" "1.8.3" + version "1.8.6" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.6.tgz#80c516a4dc264c2a69115e7578d62581ff455ed9" + integrity sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ== dependencies: - "type-detect" "4.0.8" + type-detect "4.0.8" "@sinonjs/fake-timers@^9.1.2": - "integrity" "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==" - "resolved" "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz" - "version" "9.1.2" + version "9.1.2" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz#4eaab737fab77332ab132d396a3c0d364bd0ea8c" + integrity sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw== dependencies: "@sinonjs/commons" "^1.7.0" "@types/babel__core@^7.1.14": - "integrity" "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==" - "resolved" "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz" - "version" "7.1.19" + version "7.20.1" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.1.tgz#916ecea274b0c776fec721e333e55762d3a9614b" + integrity sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw== dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" + "@babel/parser" "^7.20.7" + "@babel/types" "^7.20.7" "@types/babel__generator" "*" "@types/babel__template" "*" "@types/babel__traverse" "*" "@types/babel__generator@*": - "integrity" "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==" - "resolved" "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz" - "version" "7.6.4" + version "7.6.4" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.4.tgz#1f20ce4c5b1990b37900b63f050182d28c2439b7" + integrity sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg== dependencies: "@babel/types" "^7.0.0" "@types/babel__template@*": - "integrity" "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==" - "resolved" "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz" - "version" "7.4.1" + version "7.4.1" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.1.tgz#3d1a48fd9d6c0edfd56f2ff578daed48f36c8969" + integrity sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g== dependencies: "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" "@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": - "integrity" "sha512-FcFaxOr2V5KZCviw1TnutEMVUVsGt4D2hP1TAfXZAMKuHYW3xQhe3jTxNPWutgCJ3/X1c5yX8ZoGVEItxKbwBg==" - "resolved" "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.2.tgz" - "version" "7.18.2" + version "7.20.1" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.1.tgz#dd6f1d2411ae677dcb2db008c962598be31d6acf" + integrity sha512-MitHFXnhtgwsGZWtT68URpOvLN4EREih1u3QtQiN4VdAxWKRVvGCSvw/Qth0M0Qq3pJpnGOu5JaM/ydK7OGbqg== dependencies: - "@babel/types" "^7.3.0" + "@babel/types" "^7.20.7" "@types/bn.js@5.1.1": - "integrity" "sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g==" - "resolved" "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.1.tgz" - "version" "5.1.1" + version "5.1.1" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.1.tgz#b51e1b55920a4ca26e9285ff79936bbdec910682" + integrity sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g== dependencies: "@types/node" "*" "@types/bs58check@2.1.0": - "integrity" "sha512-OxsysnJQh82vy9DRbOcw9m2j/WiyqZLn0YBhKxdQ+aCwoHj+tWzyCgpwAkr79IfDXZKxc6h7k89T9pwS78CqTQ==" - "resolved" "https://registry.npmjs.org/@types/bs58check/-/bs58check-2.1.0.tgz" - "version" "2.1.0" + version "2.1.0" + resolved "https://registry.yarnpkg.com/@types/bs58check/-/bs58check-2.1.0.tgz#7d25a8b88fe7a9e315d2647335ee3c43c8fdb0c0" + integrity sha512-OxsysnJQh82vy9DRbOcw9m2j/WiyqZLn0YBhKxdQ+aCwoHj+tWzyCgpwAkr79IfDXZKxc6h7k89T9pwS78CqTQ== dependencies: "@types/node" "*" "@types/create-hash@1.2.2": - "integrity" "sha512-Fg8/kfMJObbETFU/Tn+Y0jieYewryLrbKwLCEIwPyklZZVY2qB+64KFjhplGSw+cseZosfFXctXO+PyIYD8iZQ==" - "resolved" "https://registry.npmjs.org/@types/create-hash/-/create-hash-1.2.2.tgz" - "version" "1.2.2" + version "1.2.2" + resolved "https://registry.yarnpkg.com/@types/create-hash/-/create-hash-1.2.2.tgz#e87247083df8478f6b83655592bde0d709028235" + integrity sha512-Fg8/kfMJObbETFU/Tn+Y0jieYewryLrbKwLCEIwPyklZZVY2qB+64KFjhplGSw+cseZosfFXctXO+PyIYD8iZQ== dependencies: "@types/node" "*" "@types/graceful-fs@^4.1.3": - "integrity" "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==" - "resolved" "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz" - "version" "4.1.5" + version "4.1.6" + resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.6.tgz#e14b2576a1c25026b7f02ede1de3b84c3a1efeae" + integrity sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw== dependencies: "@types/node" "*" "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": - "integrity" "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==" - "resolved" "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz" - "version" "2.0.4" + version "2.0.4" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44" + integrity sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g== "@types/istanbul-lib-report@*": - "integrity" "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==" - "resolved" "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz" - "version" "3.0.0" + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#c14c24f18ea8190c118ee7562b7ff99a36552686" + integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg== dependencies: "@types/istanbul-lib-coverage" "*" "@types/istanbul-reports@^3.0.0": - "integrity" "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==" - "resolved" "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz" - "version" "3.0.1" + version "3.0.1" + resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz#9153fe98bba2bd565a63add9436d6f0d7f8468ff" + integrity sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw== dependencies: "@types/istanbul-lib-report" "*" "@types/jest@28.1.6": - "integrity" "sha512-0RbGAFMfcBJKOmqRazM8L98uokwuwD5F8rHrv/ZMbrZBwVOWZUyPG6VFNscjYr/vjM3Vu4fRrCPbOs42AfemaQ==" - "resolved" "https://registry.npmjs.org/@types/jest/-/jest-28.1.6.tgz" - "version" "28.1.6" + version "28.1.6" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-28.1.6.tgz#d6a9cdd38967d2d746861fb5be6b120e38284dd4" + integrity sha512-0RbGAFMfcBJKOmqRazM8L98uokwuwD5F8rHrv/ZMbrZBwVOWZUyPG6VFNscjYr/vjM3Vu4fRrCPbOs42AfemaQ== dependencies: - "jest-matcher-utils" "^28.0.0" - "pretty-format" "^28.0.0" + jest-matcher-utils "^28.0.0" + pretty-format "^28.0.0" "@types/json-schema@^7.0.9": - "integrity" "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==" - "resolved" "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz" - "version" "7.0.11" + version "7.0.12" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.12.tgz#d70faba7039d5fca54c83c7dbab41051d2b6f6cb" + integrity sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA== -"@types/node@*", "@types/node@^18.7.22": - "integrity" "sha512-TsmoXYd4zrkkKjJB0URF/mTIKPl+kVcbqClB2F/ykU7vil1BfWZVndOnpEIozPv4fURD28gyPFeIkW2G+KXOvw==" - "resolved" "https://registry.npmjs.org/@types/node/-/node-18.7.22.tgz" - "version" "18.7.22" +"@types/node@*": + version "20.3.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.3.1.tgz#e8a83f1aa8b649377bb1fb5d7bac5cb90e784dfe" + integrity sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg== + +"@types/node@^18.7.22": + version "18.16.18" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.16.18.tgz#85da09bafb66d4bc14f7c899185336d0c1736390" + integrity sha512-/aNaQZD0+iSBAGnvvN2Cx92HqE5sZCPZtx2TsK+4nvV23fFe09jVDvpArXr2j9DnYlzuU9WuoykDDc6wqvpNcw== "@types/prettier@^2.1.5": - "integrity" "sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow==" - "resolved" "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.1.tgz" - "version" "2.7.1" + version "2.7.3" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.3.tgz#3e51a17e291d01d17d3fc61422015a933af7a08f" + integrity sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA== + +"@types/semver@^7.3.12": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.0.tgz#591c1ce3a702c45ee15f47a42ade72c2fd78978a" + integrity sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw== "@types/stack-utils@^2.0.0": - "integrity" "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==" - "resolved" "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz" - "version" "2.0.1" + version "2.0.1" + resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" + integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== "@types/yargs-parser@*": - "integrity" "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==" - "resolved" "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz" - "version" "21.0.0" + version "21.0.0" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b" + integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA== "@types/yargs@^17.0.8": - "integrity" "sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg==" - "resolved" "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz" - "version" "17.0.13" + version "17.0.24" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.24.tgz#b3ef8d50ad4aa6aecf6ddc97c580a00f5aa11902" + integrity sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw== dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^5.0.0", "@typescript-eslint/eslint-plugin@5.30.7": - "integrity" "sha512-l4L6Do+tfeM2OK0GJsU7TUcM/1oN/N25xHm3Jb4z3OiDU4Lj8dIuxX9LpVMS9riSXQs42D1ieX7b85/r16H9Fw==" - "resolved" "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.7.tgz" - "version" "5.30.7" +"@typescript-eslint/eslint-plugin@5.30.7": + version "5.30.7" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.7.tgz#1621dabc1ae4084310e19e9efc80dfdbb97e7493" + integrity sha512-l4L6Do+tfeM2OK0GJsU7TUcM/1oN/N25xHm3Jb4z3OiDU4Lj8dIuxX9LpVMS9riSXQs42D1ieX7b85/r16H9Fw== dependencies: "@typescript-eslint/scope-manager" "5.30.7" "@typescript-eslint/type-utils" "5.30.7" "@typescript-eslint/utils" "5.30.7" - "debug" "^4.3.4" - "functional-red-black-tree" "^1.0.1" - "ignore" "^5.2.0" - "regexpp" "^3.2.0" - "semver" "^7.3.7" - "tsutils" "^3.21.0" - -"@typescript-eslint/parser@^5.0.0", "@typescript-eslint/parser@5.30.7": - "integrity" "sha512-Rg5xwznHWWSy7v2o0cdho6n+xLhK2gntImp0rJroVVFkcYFYQ8C8UJTSuTw/3CnExBmPjycjmUJkxVmjXsld6A==" - "resolved" "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.30.7.tgz" - "version" "5.30.7" + debug "^4.3.4" + functional-red-black-tree "^1.0.1" + ignore "^5.2.0" + regexpp "^3.2.0" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/parser@5.30.7": + version "5.30.7" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.30.7.tgz#99d09729392aec9e64b1de45cd63cb81a4ddd980" + integrity sha512-Rg5xwznHWWSy7v2o0cdho6n+xLhK2gntImp0rJroVVFkcYFYQ8C8UJTSuTw/3CnExBmPjycjmUJkxVmjXsld6A== dependencies: "@typescript-eslint/scope-manager" "5.30.7" "@typescript-eslint/types" "5.30.7" "@typescript-eslint/typescript-estree" "5.30.7" - "debug" "^4.3.4" + debug "^4.3.4" "@typescript-eslint/scope-manager@5.30.7": - "integrity" "sha512-7BM1bwvdF1UUvt+b9smhqdc/eniOnCKxQT/kj3oXtj3LqnTWCAM0qHRHfyzCzhEfWX0zrW7KqXXeE4DlchZBKw==" - "resolved" "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.30.7.tgz" - "version" "5.30.7" + version "5.30.7" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.30.7.tgz#8269a931ef1e5ae68b5eb80743cc515c4ffe3dd7" + integrity sha512-7BM1bwvdF1UUvt+b9smhqdc/eniOnCKxQT/kj3oXtj3LqnTWCAM0qHRHfyzCzhEfWX0zrW7KqXXeE4DlchZBKw== dependencies: "@typescript-eslint/types" "5.30.7" "@typescript-eslint/visitor-keys" "5.30.7" +"@typescript-eslint/scope-manager@5.60.0": + version "5.60.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.60.0.tgz#ae511967b4bd84f1d5e179bb2c82857334941c1c" + integrity sha512-hakuzcxPwXi2ihf9WQu1BbRj1e/Pd8ZZwVTG9kfbxAMZstKz8/9OoexIwnmLzShtsdap5U/CoQGRCWlSuPbYxQ== + dependencies: + "@typescript-eslint/types" "5.60.0" + "@typescript-eslint/visitor-keys" "5.60.0" + "@typescript-eslint/type-utils@5.30.7": - "integrity" "sha512-nD5qAE2aJX/YLyKMvOU5jvJyku4QN5XBVsoTynFrjQZaDgDV6i7QHFiYCx10wvn7hFvfuqIRNBtsgaLe0DbWhw==" - "resolved" "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.30.7.tgz" - "version" "5.30.7" + version "5.30.7" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.30.7.tgz#5693dc3db6f313f302764282d614cfdbc8a9fcfd" + integrity sha512-nD5qAE2aJX/YLyKMvOU5jvJyku4QN5XBVsoTynFrjQZaDgDV6i7QHFiYCx10wvn7hFvfuqIRNBtsgaLe0DbWhw== dependencies: "@typescript-eslint/utils" "5.30.7" - "debug" "^4.3.4" - "tsutils" "^3.21.0" + debug "^4.3.4" + tsutils "^3.21.0" "@typescript-eslint/types@5.30.7": - "integrity" "sha512-ocVkETUs82+U+HowkovV6uxf1AnVRKCmDRNUBUUo46/5SQv1owC/EBFkiu4MOHeZqhKz2ktZ3kvJJ1uFqQ8QPg==" - "resolved" "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.7.tgz" - "version" "5.30.7" + version "5.30.7" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.30.7.tgz#18331487cc92d0f1fb1a6f580c8ec832528079d0" + integrity sha512-ocVkETUs82+U+HowkovV6uxf1AnVRKCmDRNUBUUo46/5SQv1owC/EBFkiu4MOHeZqhKz2ktZ3kvJJ1uFqQ8QPg== + +"@typescript-eslint/types@5.60.0": + version "5.60.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.60.0.tgz#3179962b28b4790de70e2344465ec97582ce2558" + integrity sha512-ascOuoCpNZBccFVNJRSC6rPq4EmJ2NkuoKnd6LDNyAQmdDnziAtxbCGWCbefG1CNzmDvd05zO36AmB7H8RzKPA== "@typescript-eslint/typescript-estree@5.30.7": - "integrity" "sha512-tNslqXI1ZdmXXrHER83TJ8OTYl4epUzJC0aj2i4DMDT4iU+UqLT3EJeGQvJ17BMbm31x5scSwo3hPM0nqQ1AEA==" - "resolved" "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.7.tgz" - "version" "5.30.7" + version "5.30.7" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.7.tgz#05da9f1b281985bfedcf62349847f8d168eecc07" + integrity sha512-tNslqXI1ZdmXXrHER83TJ8OTYl4epUzJC0aj2i4DMDT4iU+UqLT3EJeGQvJ17BMbm31x5scSwo3hPM0nqQ1AEA== dependencies: "@typescript-eslint/types" "5.30.7" "@typescript-eslint/visitor-keys" "5.30.7" - "debug" "^4.3.4" - "globby" "^11.1.0" - "is-glob" "^4.0.3" - "semver" "^7.3.7" - "tsutils" "^3.21.0" - -"@typescript-eslint/utils@^5.10.0", "@typescript-eslint/utils@5.30.7": - "integrity" "sha512-Z3pHdbFw+ftZiGUnm1GZhkJgVqsDL5CYW2yj+TB2mfXDFOMqtbzQi2dNJIyPqPbx9mv2kUxS1gU+r2gKlKi1rQ==" - "resolved" "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.30.7.tgz" - "version" "5.30.7" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/typescript-estree@5.60.0": + version "5.60.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.60.0.tgz#4ddf1a81d32a850de66642d9b3ad1e3254fb1600" + integrity sha512-R43thAuwarC99SnvrBmh26tc7F6sPa2B3evkXp/8q954kYL6Ro56AwASYWtEEi+4j09GbiNAHqYwNNZuNlARGQ== + dependencies: + "@typescript-eslint/types" "5.60.0" + "@typescript-eslint/visitor-keys" "5.60.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/utils@5.30.7": + version "5.30.7" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.30.7.tgz#7135be070349e9f7caa262b0ca59dc96123351bb" + integrity sha512-Z3pHdbFw+ftZiGUnm1GZhkJgVqsDL5CYW2yj+TB2mfXDFOMqtbzQi2dNJIyPqPbx9mv2kUxS1gU+r2gKlKi1rQ== dependencies: "@types/json-schema" "^7.0.9" "@typescript-eslint/scope-manager" "5.30.7" "@typescript-eslint/types" "5.30.7" "@typescript-eslint/typescript-estree" "5.30.7" - "eslint-scope" "^5.1.1" - "eslint-utils" "^3.0.0" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" + +"@typescript-eslint/utils@^5.10.0": + version "5.60.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.60.0.tgz#4667c5aece82f9d4f24a667602f0f300864b554c" + integrity sha512-ba51uMqDtfLQ5+xHtwlO84vkdjrqNzOnqrnwbMHMRY8Tqeme8C2Q8Fc7LajfGR+e3/4LoYiWXUM6BpIIbHJ4hQ== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@types/json-schema" "^7.0.9" + "@types/semver" "^7.3.12" + "@typescript-eslint/scope-manager" "5.60.0" + "@typescript-eslint/types" "5.60.0" + "@typescript-eslint/typescript-estree" "5.60.0" + eslint-scope "^5.1.1" + semver "^7.3.7" "@typescript-eslint/visitor-keys@5.30.7": - "integrity" "sha512-KrRXf8nnjvcpxDFOKej4xkD7657+PClJs5cJVSG7NNoCNnjEdc46juNAQt7AyuWctuCgs6mVRc1xGctEqrjxWw==" - "resolved" "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.7.tgz" - "version" "5.30.7" + version "5.30.7" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.7.tgz#c093abae75b4fd822bfbad9fc337f38a7a14909a" + integrity sha512-KrRXf8nnjvcpxDFOKej4xkD7657+PClJs5cJVSG7NNoCNnjEdc46juNAQt7AyuWctuCgs6mVRc1xGctEqrjxWw== dependencies: "@typescript-eslint/types" "5.30.7" - "eslint-visitor-keys" "^3.3.0" + eslint-visitor-keys "^3.3.0" -"acorn-jsx@^5.3.2": - "integrity" "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==" - "resolved" "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" - "version" "5.3.2" +"@typescript-eslint/visitor-keys@5.60.0": + version "5.60.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.60.0.tgz#b48b29da3f5f31dd1656281727004589d2722a66" + integrity sha512-wm9Uz71SbCyhUKgcaPRauBdTegUyY/ZWl8gLwD/i/ybJqscrrdVSFImpvUz16BLPChIeKBK5Fa9s6KDQjsjyWw== + dependencies: + "@typescript-eslint/types" "5.60.0" + eslint-visitor-keys "^3.3.0" + +acorn-jsx@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", "acorn@^8.8.0": - "integrity" "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==" - "resolved" "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz" - "version" "8.8.0" +acorn@^8.8.0: + version "8.9.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.9.0.tgz#78a16e3b2bcc198c10822786fa6679e245db5b59" + integrity sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ== -"ajv@^6.10.0", "ajv@^6.12.4": - "integrity" "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==" - "resolved" "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" - "version" "6.12.6" +ajv@^6.10.0, ajv@^6.12.4: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== dependencies: - "fast-deep-equal" "^3.1.1" - "fast-json-stable-stringify" "^2.0.0" - "json-schema-traverse" "^0.4.1" - "uri-js" "^4.2.2" + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" -"ansi-escapes@^4.2.1": - "integrity" "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==" - "resolved" "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz" - "version" "4.3.2" +ansi-escapes@^4.2.1: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== dependencies: - "type-fest" "^0.21.3" + type-fest "^0.21.3" -"ansi-regex@^5.0.1": - "integrity" "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" - "resolved" "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" - "version" "5.0.1" +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== -"ansi-styles@^3.2.1": - "integrity" "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==" - "resolved" "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz" - "version" "3.2.1" +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== dependencies: - "color-convert" "^1.9.0" + color-convert "^1.9.0" -"ansi-styles@^4.0.0", "ansi-styles@^4.1.0": - "integrity" "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==" - "resolved" "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" - "version" "4.3.0" +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: - "color-convert" "^2.0.1" + color-convert "^2.0.1" -"ansi-styles@^5.0.0": - "integrity" "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==" - "resolved" "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz" - "version" "5.2.0" +ansi-styles@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" + integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== -"anymatch@^3.0.3": - "integrity" "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==" - "resolved" "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz" - "version" "3.1.2" +anymatch@^3.0.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== dependencies: - "normalize-path" "^3.0.0" - "picomatch" "^2.0.4" + normalize-path "^3.0.0" + picomatch "^2.0.4" -"argparse@^1.0.7": - "integrity" "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==" - "resolved" "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz" - "version" "1.0.10" +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== dependencies: - "sprintf-js" "~1.0.2" + sprintf-js "~1.0.2" -"argparse@^2.0.1": - "integrity" "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" - "resolved" "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" - "version" "2.0.1" +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== -"array-union@^2.1.0": - "integrity" "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==" - "resolved" "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz" - "version" "2.1.0" +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== -"babel-jest@^28.0.0", "babel-jest@^28.1.3": - "integrity" "sha512-epUaPOEWMk3cWX0M/sPvCHHCe9fMFAa/9hXEgKP8nFfNl/jlGkE9ucq9NqkZGXLDduCJYS0UvSlPUwC0S+rH6Q==" - "resolved" "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.3.tgz" - "version" "28.1.3" +babel-jest@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-28.1.3.tgz#c1187258197c099072156a0a121c11ee1e3917d5" + integrity sha512-epUaPOEWMk3cWX0M/sPvCHHCe9fMFAa/9hXEgKP8nFfNl/jlGkE9ucq9NqkZGXLDduCJYS0UvSlPUwC0S+rH6Q== dependencies: "@jest/transform" "^28.1.3" "@types/babel__core" "^7.1.14" - "babel-plugin-istanbul" "^6.1.1" - "babel-preset-jest" "^28.1.3" - "chalk" "^4.0.0" - "graceful-fs" "^4.2.9" - "slash" "^3.0.0" + babel-plugin-istanbul "^6.1.1" + babel-preset-jest "^28.1.3" + chalk "^4.0.0" + graceful-fs "^4.2.9" + slash "^3.0.0" -"babel-plugin-istanbul@^6.1.1": - "integrity" "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==" - "resolved" "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz" - "version" "6.1.1" +babel-plugin-istanbul@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" + integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@istanbuljs/load-nyc-config" "^1.0.0" "@istanbuljs/schema" "^0.1.2" - "istanbul-lib-instrument" "^5.0.4" - "test-exclude" "^6.0.0" + istanbul-lib-instrument "^5.0.4" + test-exclude "^6.0.0" -"babel-plugin-jest-hoist@^28.1.3": - "integrity" "sha512-Ys3tUKAmfnkRUpPdpa98eYrAR0nV+sSFUZZEGuQ2EbFd1y4SOLtD5QDNHAq+bb9a+bbXvYQC4b+ID/THIMcU6Q==" - "resolved" "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.3.tgz" - "version" "28.1.3" +babel-plugin-jest-hoist@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.3.tgz#1952c4d0ea50f2d6d794353762278d1d8cca3fbe" + integrity sha512-Ys3tUKAmfnkRUpPdpa98eYrAR0nV+sSFUZZEGuQ2EbFd1y4SOLtD5QDNHAq+bb9a+bbXvYQC4b+ID/THIMcU6Q== dependencies: "@babel/template" "^7.3.3" "@babel/types" "^7.3.3" "@types/babel__core" "^7.1.14" "@types/babel__traverse" "^7.0.6" -"babel-preset-current-node-syntax@^1.0.0": - "integrity" "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==" - "resolved" "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz" - "version" "1.0.1" +babel-preset-current-node-syntax@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" + integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ== dependencies: "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-syntax-bigint" "^7.8.3" @@ -941,1028 +1005,1030 @@ "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-top-level-await" "^7.8.3" -"babel-preset-jest@^28.1.3": - "integrity" "sha512-L+fupJvlWAHbQfn74coNX3zf60LXMJsezNvvx8eIh7iOR1luJ1poxYgQk1F8PYtNq/6QODDHCqsSnTFSWC491A==" - "resolved" "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.1.3.tgz" - "version" "28.1.3" +babel-preset-jest@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-28.1.3.tgz#5dfc20b99abed5db994406c2b9ab94c73aaa419d" + integrity sha512-L+fupJvlWAHbQfn74coNX3zf60LXMJsezNvvx8eIh7iOR1luJ1poxYgQk1F8PYtNq/6QODDHCqsSnTFSWC491A== dependencies: - "babel-plugin-jest-hoist" "^28.1.3" - "babel-preset-current-node-syntax" "^1.0.0" + babel-plugin-jest-hoist "^28.1.3" + babel-preset-current-node-syntax "^1.0.0" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -"balanced-match@^1.0.0": - "integrity" "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - "resolved" "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" - "version" "1.0.2" +base-x@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-4.0.0.tgz#d0e3b7753450c73f8ad2389b5c018a4af7b2224a" + integrity sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw== -"base-x@^4.0.0": - "integrity" "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" - "resolved" "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz" - "version" "4.0.0" +base64url@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/base64url/-/base64url-3.0.1.tgz#6399d572e2bc3f90a9a8b22d5dbb0a32d33f788d" + integrity sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A== -"base64url@3.0.1": - "integrity" "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==" - "resolved" "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz" - "version" "3.0.1" +bech32@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/bech32/-/bech32-2.0.0.tgz#078d3686535075c8c79709f054b1b226a133b355" + integrity sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg== -"bn.js@5.2.1": - "integrity" "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" - "resolved" "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz" - "version" "5.2.1" +bn.js@5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" + integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== -"brace-expansion@^1.1.7": - "integrity" "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==" - "resolved" "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" - "version" "1.1.11" +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== dependencies: - "balanced-match" "^1.0.0" - "concat-map" "0.0.1" + balanced-match "^1.0.0" + concat-map "0.0.1" -"braces@^3.0.2": - "integrity" "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==" - "resolved" "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz" - "version" "3.0.2" +braces@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== dependencies: - "fill-range" "^7.0.1" + fill-range "^7.0.1" -"browserslist@^4.21.3", "browserslist@>= 4.21.0": - "integrity" "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==" - "resolved" "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz" - "version" "4.21.4" +browserslist@^4.21.3: + version "4.21.9" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.9.tgz#e11bdd3c313d7e2a9e87e8b4b0c7872b13897635" + integrity sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg== dependencies: - "caniuse-lite" "^1.0.30001400" - "electron-to-chromium" "^1.4.251" - "node-releases" "^2.0.6" - "update-browserslist-db" "^1.0.9" + caniuse-lite "^1.0.30001503" + electron-to-chromium "^1.4.431" + node-releases "^2.0.12" + update-browserslist-db "^1.0.11" -"bs-logger@0.x": - "integrity" "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==" - "resolved" "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz" - "version" "0.2.6" +bs-logger@0.x: + version "0.2.6" + resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" + integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== dependencies: - "fast-json-stable-stringify" "2.x" + fast-json-stable-stringify "2.x" -"bs58@^5.0.0": - "integrity" "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==" - "resolved" "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz" - "version" "5.0.0" +bs58@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-5.0.0.tgz#865575b4d13c09ea2a84622df6c8cbeb54ffc279" + integrity sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ== dependencies: - "base-x" "^4.0.0" + base-x "^4.0.0" "bs58check@https://github.com/bitcoinjs/bs58check": - "integrity" "sha512-baICxaJy1rqIByQPpjsoHVEuaADwsvZqZNlaFtxMHDlWeMHqXKnKYlcor7s+bXrQe0xxnw+exZBmtw/8OAdePA==" - "resolved" "git+ssh://git@github.com/bitcoinjs/bs58check.git" - "version" "3.0.1" + version "3.0.1" + resolved "https://github.com/bitcoinjs/bs58check#0ddbd3e0813c22a6aef85313916fdab71f479aa9" dependencies: "@noble/hashes" "^1.2.0" - "bs58" "^5.0.0" - -"bser@2.1.1": - "integrity" "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==" - "resolved" "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz" - "version" "2.1.1" - dependencies: - "node-int64" "^0.4.0" - -"buffer-from@^1.0.0": - "integrity" "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" - "resolved" "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" - "version" "1.1.2" - -"callsites@^3.0.0": - "integrity" "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" - "resolved" "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" - "version" "3.1.0" - -"camelcase@^5.3.1": - "integrity" "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" - "resolved" "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz" - "version" "5.3.1" - -"camelcase@^6.2.0": - "integrity" "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==" - "resolved" "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz" - "version" "6.3.0" - -"caniuse-lite@^1.0.30001400": - "integrity" "sha512-+TeEIee1gS5bYOiuf+PS/kp2mrXic37Hl66VY6EAfxasIk5fELTktK2oOezYed12H8w7jt3s512PpulQidPjwA==" - "resolved" "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001412.tgz" - "version" "1.0.30001412" - -"chalk@^2.0.0": - "integrity" "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==" - "resolved" "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" - "version" "2.4.2" - dependencies: - "ansi-styles" "^3.2.1" - "escape-string-regexp" "^1.0.5" - "supports-color" "^5.3.0" - -"chalk@^4.0.0": - "integrity" "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==" - "resolved" "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" - "version" "4.1.2" - dependencies: - "ansi-styles" "^4.1.0" - "supports-color" "^7.1.0" - -"char-regex@^1.0.2": - "integrity" "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==" - "resolved" "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz" - "version" "1.0.2" - -"ci-info@^3.2.0": - "integrity" "sha512-t5QdPT5jq3o262DOQ8zA6E1tlH2upmUc4Hlvrbx1pGYJuiiHl7O7rvVNI+l8HTVhd/q3Qc9vqimkNk5yiXsAug==" - "resolved" "https://registry.npmjs.org/ci-info/-/ci-info-3.4.0.tgz" - "version" "3.4.0" - -"cipher-base@^1.0.1": - "integrity" "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==" - "resolved" "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz" - "version" "1.0.4" - dependencies: - "inherits" "^2.0.1" - "safe-buffer" "^5.0.1" - -"cjs-module-lexer@^1.0.0": - "integrity" "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==" - "resolved" "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz" - "version" "1.2.2" - -"cliui@^7.0.2": - "integrity" "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==" - "resolved" "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz" - "version" "7.0.4" - dependencies: - "string-width" "^4.2.0" - "strip-ansi" "^6.0.0" - "wrap-ansi" "^7.0.0" - -"co@^4.6.0": - "integrity" "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==" - "resolved" "https://registry.npmjs.org/co/-/co-4.6.0.tgz" - "version" "4.6.0" - -"collect-v8-coverage@^1.0.0": - "integrity" "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==" - "resolved" "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz" - "version" "1.0.1" - -"color-convert@^1.9.0": - "integrity" "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==" - "resolved" "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz" - "version" "1.9.3" - dependencies: - "color-name" "1.1.3" - -"color-convert@^2.0.1": - "integrity" "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==" - "resolved" "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" - "version" "2.0.1" - dependencies: - "color-name" "~1.1.4" - -"color-name@~1.1.4": - "integrity" "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - "resolved" "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" - "version" "1.1.4" - -"color-name@1.1.3": - "integrity" "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" - "resolved" "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" - "version" "1.1.3" - -"concat-map@0.0.1": - "integrity" "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" - "resolved" "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" - "version" "0.0.1" - -"convert-source-map@^1.4.0", "convert-source-map@^1.6.0", "convert-source-map@^1.7.0": - "integrity" "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==" - "resolved" "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz" - "version" "1.8.0" - dependencies: - "safe-buffer" "~5.1.1" - -"create-hash@1.2.0": - "integrity" "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==" - "resolved" "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz" - "version" "1.2.0" - dependencies: - "cipher-base" "^1.0.1" - "inherits" "^2.0.1" - "md5.js" "^1.3.4" - "ripemd160" "^2.0.1" - "sha.js" "^2.4.0" - -"cross-spawn@^7.0.2", "cross-spawn@^7.0.3": - "integrity" "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==" - "resolved" "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" - "version" "7.0.3" - dependencies: - "path-key" "^3.1.0" - "shebang-command" "^2.0.0" - "which" "^2.0.1" - -"debug@^4.1.0", "debug@^4.1.1", "debug@^4.3.2", "debug@^4.3.4": - "integrity" "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==" - "resolved" "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" - "version" "4.3.4" - dependencies: - "ms" "2.1.2" - -"dedent@^0.7.0": - "integrity" "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==" - "resolved" "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz" - "version" "0.7.0" - -"deep-is@^0.1.3": - "integrity" "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" - "resolved" "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" - "version" "0.1.4" - -"deepmerge@^4.2.2": - "integrity" "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==" - "resolved" "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz" - "version" "4.2.2" - -"detect-newline@^3.0.0": - "integrity" "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==" - "resolved" "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz" - "version" "3.1.0" - -"diff-sequences@^28.1.1": - "integrity" "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==" - "resolved" "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz" - "version" "28.1.1" - -"dir-glob@^3.0.1": - "integrity" "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==" - "resolved" "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz" - "version" "3.0.1" - dependencies: - "path-type" "^4.0.0" - -"doctrine@^3.0.0": - "integrity" "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==" - "resolved" "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz" - "version" "3.0.0" - dependencies: - "esutils" "^2.0.2" - -"electron-to-chromium@^1.4.251": - "integrity" "sha512-saJTYECxUSv7eSpnXw0XIEvUkP9x4s/x2mm3TVX7k4rIFS6f5TjBih1B5h437WzIhHQjid+d8ouQzPQskMervQ==" - "resolved" "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.266.tgz" - "version" "1.4.266" - -"emittery@^0.10.2": - "integrity" "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==" - "resolved" "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz" - "version" "0.10.2" - -"emoji-regex@^8.0.0": - "integrity" "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - "resolved" "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" - "version" "8.0.0" - -"error-ex@^1.3.1": - "integrity" "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==" - "resolved" "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz" - "version" "1.3.2" - dependencies: - "is-arrayish" "^0.2.1" - -"escalade@^3.1.1": - "integrity" "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" - "resolved" "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" - "version" "3.1.1" - -"escape-string-regexp@^1.0.5": - "integrity" "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==" - "resolved" "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" - "version" "1.0.5" - -"escape-string-regexp@^2.0.0": - "integrity" "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==" - "resolved" "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz" - "version" "2.0.0" - -"escape-string-regexp@^4.0.0": - "integrity" "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" - "resolved" "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" - "version" "4.0.0" - -"eslint-plugin-jest@26.6.0": - "integrity" "sha512-f8n46/97ZFdU4KqeQYqO8AEVGIhHWvkpgNBWHH3jrM28/y8llnbf3IjfIKv6p2pZIMinK1PCqbbROxs9Eud02Q==" - "resolved" "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-26.6.0.tgz" - "version" "26.6.0" + bs58 "^5.0.0" + +bser@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" + integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== + dependencies: + node-int64 "^0.4.0" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +camelcase@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +camelcase@^6.2.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + +caniuse-lite@^1.0.30001503: + version "1.0.30001506" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001506.tgz#35bd814b310a487970c585430e9e80ee23faf14b" + integrity sha512-6XNEcpygZMCKaufIcgpQNZNf00GEqc7VQON+9Rd0K1bMYo8xhMZRAo5zpbnbMNizi4YNgIDAFrdykWsvY3H4Hw== + +chalk@^2.0.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^4.0.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +char-regex@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" + integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== + +ci-info@^3.2.0: + version "3.8.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.8.0.tgz#81408265a5380c929f0bc665d62256628ce9ef91" + integrity sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw== + +cipher-base@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +cjs-module-lexer@^1.0.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz#6c370ab19f8a3394e318fe682686ec0ac684d107" + integrity sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ== + +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== + +collect-v8-coverage@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59" + integrity sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg== + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" + integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== + +create-hash@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + +cross-spawn@^7.0.2, cross-spawn@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +dedent@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" + integrity sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA== + +deep-is@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + +deepmerge@^4.2.2: + version "4.3.1" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" + integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== + +detect-newline@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" + integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== + +diff-sequences@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-28.1.1.tgz#9989dc731266dc2903457a70e996f3a041913ac6" + integrity sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw== + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + +electron-to-chromium@^1.4.431: + version "1.4.435" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.435.tgz#761c34300603b9f1234f0b6155870d3002435db6" + integrity sha512-B0CBWVFhvoQCW/XtjRzgrmqcgVWg6RXOEM/dK59+wFV93BFGR6AeNKc4OyhM+T3IhJaOOG8o/V+33Y2mwJWtzw== + +emittery@^0.10.2: + version "0.10.2" + resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.10.2.tgz#902eec8aedb8c41938c46e9385e9db7e03182933" + integrity sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + +escape-string-regexp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" + integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== + +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +eslint-plugin-jest@26.6.0: + version "26.6.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.6.0.tgz#546804fa42da75d7d58d4d3b278d5186abd3f6c0" + integrity sha512-f8n46/97ZFdU4KqeQYqO8AEVGIhHWvkpgNBWHH3jrM28/y8llnbf3IjfIKv6p2pZIMinK1PCqbbROxs9Eud02Q== dependencies: "@typescript-eslint/utils" "^5.10.0" -"eslint-scope@^5.1.1": - "integrity" "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==" - "resolved" "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz" - "version" "5.1.1" +eslint-scope@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== dependencies: - "esrecurse" "^4.3.0" - "estraverse" "^4.1.1" + esrecurse "^4.3.0" + estraverse "^4.1.1" -"eslint-scope@^7.1.1": - "integrity" "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==" - "resolved" "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz" - "version" "7.1.1" +eslint-scope@^7.1.1: + version "7.2.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.0.tgz#f21ebdafda02352f103634b96dd47d9f81ca117b" + integrity sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw== dependencies: - "esrecurse" "^4.3.0" - "estraverse" "^5.2.0" + esrecurse "^4.3.0" + estraverse "^5.2.0" -"eslint-utils@^3.0.0": - "integrity" "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==" - "resolved" "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz" - "version" "3.0.0" +eslint-utils@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" + integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== dependencies: - "eslint-visitor-keys" "^2.0.0" + eslint-visitor-keys "^2.0.0" -"eslint-visitor-keys@^2.0.0": - "integrity" "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==" - "resolved" "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz" - "version" "2.1.0" +eslint-visitor-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" + integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== -"eslint-visitor-keys@^3.3.0": - "integrity" "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==" - "resolved" "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz" - "version" "3.3.0" +eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1: + version "3.4.1" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz#c22c48f48942d08ca824cc526211ae400478a994" + integrity sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA== -"eslint@*", "eslint@^6.0.0 || ^7.0.0 || ^8.0.0", "eslint@>=5", "eslint@8.20.0": - "integrity" "sha512-d4ixhz5SKCa1D6SCPrivP7yYVi7nyD6A4vs6HIAul9ujBzcEmZVM3/0NN/yu5nKhmO1wjp5xQ46iRfmDGlOviA==" - "resolved" "https://registry.npmjs.org/eslint/-/eslint-8.20.0.tgz" - "version" "8.20.0" +eslint@8.20.0: + version "8.20.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.20.0.tgz#048ac56aa18529967da8354a478be4ec0a2bc81b" + integrity sha512-d4ixhz5SKCa1D6SCPrivP7yYVi7nyD6A4vs6HIAul9ujBzcEmZVM3/0NN/yu5nKhmO1wjp5xQ46iRfmDGlOviA== dependencies: "@eslint/eslintrc" "^1.3.0" "@humanwhocodes/config-array" "^0.9.2" - "ajv" "^6.10.0" - "chalk" "^4.0.0" - "cross-spawn" "^7.0.2" - "debug" "^4.3.2" - "doctrine" "^3.0.0" - "escape-string-regexp" "^4.0.0" - "eslint-scope" "^7.1.1" - "eslint-utils" "^3.0.0" - "eslint-visitor-keys" "^3.3.0" - "espree" "^9.3.2" - "esquery" "^1.4.0" - "esutils" "^2.0.2" - "fast-deep-equal" "^3.1.3" - "file-entry-cache" "^6.0.1" - "functional-red-black-tree" "^1.0.1" - "glob-parent" "^6.0.1" - "globals" "^13.15.0" - "ignore" "^5.2.0" - "import-fresh" "^3.0.0" - "imurmurhash" "^0.1.4" - "is-glob" "^4.0.0" - "js-yaml" "^4.1.0" - "json-stable-stringify-without-jsonify" "^1.0.1" - "levn" "^0.4.1" - "lodash.merge" "^4.6.2" - "minimatch" "^3.1.2" - "natural-compare" "^1.4.0" - "optionator" "^0.9.1" - "regexpp" "^3.2.0" - "strip-ansi" "^6.0.1" - "strip-json-comments" "^3.1.0" - "text-table" "^0.2.0" - "v8-compile-cache" "^2.0.3" - -"espree@^9.3.2", "espree@^9.4.0": - "integrity" "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==" - "resolved" "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz" - "version" "9.4.0" - dependencies: - "acorn" "^8.8.0" - "acorn-jsx" "^5.3.2" - "eslint-visitor-keys" "^3.3.0" - -"esprima@^4.0.0": - "integrity" "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" - "resolved" "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz" - "version" "4.0.1" - -"esquery@^1.4.0": - "integrity" "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==" - "resolved" "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz" - "version" "1.4.0" - dependencies: - "estraverse" "^5.1.0" - -"esrecurse@^4.3.0": - "integrity" "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==" - "resolved" "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz" - "version" "4.3.0" - dependencies: - "estraverse" "^5.2.0" - -"estraverse@^4.1.1": - "integrity" "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" - "resolved" "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz" - "version" "4.3.0" - -"estraverse@^5.1.0": - "integrity" "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" - "resolved" "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" - "version" "5.3.0" - -"estraverse@^5.2.0": - "integrity" "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" - "resolved" "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" - "version" "5.3.0" - -"esutils@^2.0.2": - "integrity" "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" - "resolved" "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" - "version" "2.0.3" - -"execa@^5.0.0": - "integrity" "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==" - "resolved" "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz" - "version" "5.1.1" - dependencies: - "cross-spawn" "^7.0.3" - "get-stream" "^6.0.0" - "human-signals" "^2.1.0" - "is-stream" "^2.0.0" - "merge-stream" "^2.0.0" - "npm-run-path" "^4.0.1" - "onetime" "^5.1.2" - "signal-exit" "^3.0.3" - "strip-final-newline" "^2.0.0" - -"exit@^0.1.2": - "integrity" "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==" - "resolved" "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz" - "version" "0.1.2" - -"expect@^28.1.3": - "integrity" "sha512-eEh0xn8HlsuOBxFgIss+2mX85VAS4Qy3OSkjV7rlBWljtA4oWH37glVGyOZSZvErDT/yBywZdPGwCXuTvSG85g==" - "resolved" "https://registry.npmjs.org/expect/-/expect-28.1.3.tgz" - "version" "28.1.3" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.3.2" + doctrine "^3.0.0" + escape-string-regexp "^4.0.0" + eslint-scope "^7.1.1" + eslint-utils "^3.0.0" + eslint-visitor-keys "^3.3.0" + espree "^9.3.2" + esquery "^1.4.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^6.0.1" + globals "^13.15.0" + ignore "^5.2.0" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + js-yaml "^4.1.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.1.2" + natural-compare "^1.4.0" + optionator "^0.9.1" + regexpp "^3.2.0" + strip-ansi "^6.0.1" + strip-json-comments "^3.1.0" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + +espree@^9.3.2, espree@^9.4.0: + version "9.5.2" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.5.2.tgz#e994e7dc33a082a7a82dceaf12883a829353215b" + integrity sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw== + dependencies: + acorn "^8.8.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.4.1" + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +esquery@^1.4.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" + integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.1.0, estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +execa@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + +exit@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== + +expect@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/expect/-/expect-28.1.3.tgz#90a7c1a124f1824133dd4533cce2d2bdcb6603ec" + integrity sha512-eEh0xn8HlsuOBxFgIss+2mX85VAS4Qy3OSkjV7rlBWljtA4oWH37glVGyOZSZvErDT/yBywZdPGwCXuTvSG85g== dependencies: "@jest/expect-utils" "^28.1.3" - "jest-get-type" "^28.0.2" - "jest-matcher-utils" "^28.1.3" - "jest-message-util" "^28.1.3" - "jest-util" "^28.1.3" + jest-get-type "^28.0.2" + jest-matcher-utils "^28.1.3" + jest-message-util "^28.1.3" + jest-util "^28.1.3" -"fast-deep-equal@^3.1.1", "fast-deep-equal@^3.1.3": - "integrity" "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - "resolved" "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" - "version" "3.1.3" +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -"fast-glob@^3.2.9": - "integrity" "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==" - "resolved" "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz" - "version" "3.2.12" +fast-glob@^3.2.9: + version "3.2.12" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" + integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== dependencies: "@nodelib/fs.stat" "^2.0.2" "@nodelib/fs.walk" "^1.2.3" - "glob-parent" "^5.1.2" - "merge2" "^1.3.0" - "micromatch" "^4.0.4" - -"fast-json-stable-stringify@^2.0.0", "fast-json-stable-stringify@2.x": - "integrity" "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - "resolved" "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" - "version" "2.1.0" - -"fast-levenshtein@^2.0.6": - "integrity" "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" - "resolved" "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" - "version" "2.0.6" - -"fastq@^1.6.0": - "integrity" "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==" - "resolved" "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz" - "version" "1.13.0" - dependencies: - "reusify" "^1.0.4" - -"fb-watchman@^2.0.0": - "integrity" "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==" - "resolved" "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz" - "version" "2.0.2" - dependencies: - "bser" "2.1.1" - -"file-entry-cache@^6.0.1": - "integrity" "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==" - "resolved" "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz" - "version" "6.0.1" - dependencies: - "flat-cache" "^3.0.4" - -"fill-range@^7.0.1": - "integrity" "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==" - "resolved" "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz" - "version" "7.0.1" - dependencies: - "to-regex-range" "^5.0.1" - -"find-up@^4.0.0", "find-up@^4.1.0": - "integrity" "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==" - "resolved" "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" - "version" "4.1.0" - dependencies: - "locate-path" "^5.0.0" - "path-exists" "^4.0.0" - -"flat-cache@^3.0.4": - "integrity" "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==" - "resolved" "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz" - "version" "3.0.4" - dependencies: - "flatted" "^3.1.0" - "rimraf" "^3.0.2" - -"flatted@^3.1.0": - "integrity" "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==" - "resolved" "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz" - "version" "3.2.7" - -"fs.realpath@^1.0.0": - "integrity" "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" - "resolved" "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" - "version" "1.0.0" - -"function-bind@^1.1.1": - "integrity" "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - "resolved" "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" - "version" "1.1.1" - -"functional-red-black-tree@^1.0.1": - "integrity" "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==" - "resolved" "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz" - "version" "1.0.1" - -"gensync@^1.0.0-beta.2": - "integrity" "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==" - "resolved" "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" - "version" "1.0.0-beta.2" - -"get-caller-file@^2.0.5": - "integrity" "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" - "resolved" "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" - "version" "2.0.5" - -"get-package-type@^0.1.0": - "integrity" "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==" - "resolved" "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz" - "version" "0.1.0" - -"get-stream@^6.0.0": - "integrity" "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==" - "resolved" "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz" - "version" "6.0.1" - -"glob-parent@^5.1.2": - "integrity" "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==" - "resolved" "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" - "version" "5.1.2" - dependencies: - "is-glob" "^4.0.1" - -"glob-parent@^6.0.1": - "integrity" "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==" - "resolved" "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz" - "version" "6.0.2" - dependencies: - "is-glob" "^4.0.3" - -"glob@^7.1.3", "glob@^7.1.4": - "integrity" "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==" - "resolved" "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" - "version" "7.2.3" - dependencies: - "fs.realpath" "^1.0.0" - "inflight" "^1.0.4" - "inherits" "2" - "minimatch" "^3.1.1" - "once" "^1.3.0" - "path-is-absolute" "^1.0.0" - -"globals@^11.1.0": - "integrity" "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" - "resolved" "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz" - "version" "11.12.0" - -"globals@^13.15.0": - "integrity" "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==" - "resolved" "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz" - "version" "13.17.0" - dependencies: - "type-fest" "^0.20.2" - -"globby@^11.1.0": - "integrity" "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==" - "resolved" "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz" - "version" "11.1.0" - dependencies: - "array-union" "^2.1.0" - "dir-glob" "^3.0.1" - "fast-glob" "^3.2.9" - "ignore" "^5.2.0" - "merge2" "^1.4.1" - "slash" "^3.0.0" - -"graceful-fs@^4.2.9": - "integrity" "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" - "resolved" "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz" - "version" "4.2.10" - -"has-flag@^3.0.0": - "integrity" "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==" - "resolved" "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz" - "version" "3.0.0" - -"has-flag@^4.0.0": - "integrity" "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - "resolved" "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" - "version" "4.0.0" - -"has@^1.0.3": - "integrity" "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==" - "resolved" "https://registry.npmjs.org/has/-/has-1.0.3.tgz" - "version" "1.0.3" - dependencies: - "function-bind" "^1.1.1" - -"hash-base@^3.0.0": - "integrity" "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==" - "resolved" "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz" - "version" "3.1.0" - dependencies: - "inherits" "^2.0.4" - "readable-stream" "^3.6.0" - "safe-buffer" "^5.2.0" - -"html-escaper@^2.0.0": - "integrity" "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==" - "resolved" "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz" - "version" "2.0.2" - -"human-signals@^2.1.0": - "integrity" "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==" - "resolved" "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz" - "version" "2.1.0" - -"ignore@^5.2.0": - "integrity" "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==" - "resolved" "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz" - "version" "5.2.0" - -"import-fresh@^3.0.0", "import-fresh@^3.2.1": - "integrity" "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==" - "resolved" "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" - "version" "3.3.0" - dependencies: - "parent-module" "^1.0.0" - "resolve-from" "^4.0.0" - -"import-local@^3.0.2": - "integrity" "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==" - "resolved" "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz" - "version" "3.1.0" - dependencies: - "pkg-dir" "^4.2.0" - "resolve-cwd" "^3.0.0" - -"imurmurhash@^0.1.4": - "integrity" "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==" - "resolved" "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" - "version" "0.1.4" - -"inflight@^1.0.4": - "integrity" "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==" - "resolved" "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" - "version" "1.0.6" - dependencies: - "once" "^1.3.0" - "wrappy" "1" - -"inherits@^2.0.1", "inherits@^2.0.3", "inherits@^2.0.4", "inherits@2": - "integrity" "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - "resolved" "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" - "version" "2.0.4" - -"is-arrayish@^0.2.1": - "integrity" "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" - "resolved" "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" - "version" "0.2.1" - -"is-core-module@^2.9.0": - "integrity" "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==" - "resolved" "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz" - "version" "2.10.0" - dependencies: - "has" "^1.0.3" - -"is-extglob@^2.1.1": - "integrity" "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==" - "resolved" "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" - "version" "2.1.1" - -"is-fullwidth-code-point@^3.0.0": - "integrity" "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" - "resolved" "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" - "version" "3.0.0" - -"is-generator-fn@^2.0.0": - "integrity" "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==" - "resolved" "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz" - "version" "2.1.0" - -"is-glob@^4.0.0", "is-glob@^4.0.1", "is-glob@^4.0.3": - "integrity" "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==" - "resolved" "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" - "version" "4.0.3" - dependencies: - "is-extglob" "^2.1.1" - -"is-number@^7.0.0": - "integrity" "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" - "resolved" "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" - "version" "7.0.0" - -"is-stream@^2.0.0": - "integrity" "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==" - "resolved" "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz" - "version" "2.0.1" - -"isexe@^2.0.0": - "integrity" "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" - "resolved" "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" - "version" "2.0.0" - -"istanbul-lib-coverage@^3.0.0", "istanbul-lib-coverage@^3.2.0": - "integrity" "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==" - "resolved" "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz" - "version" "3.2.0" - -"istanbul-lib-instrument@^5.0.4", "istanbul-lib-instrument@^5.1.0": - "integrity" "sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A==" - "resolved" "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz" - "version" "5.2.0" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + +fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + +fastq@^1.6.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" + integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== + dependencies: + reusify "^1.0.4" + +fb-watchman@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c" + integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA== + dependencies: + bser "2.1.1" + +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== + dependencies: + flat-cache "^3.0.4" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +find-up@^4.0.0, find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.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" + integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + dependencies: + flatted "^3.1.0" + rimraf "^3.0.2" + +flatted@^3.1.0: + version "3.2.7" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" + integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== + +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-package-type@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" + integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== + +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + +glob-parent@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob-parent@^6.0.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + +glob@^7.1.3, glob@^7.1.4: + 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.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + +globals@^13.15.0, globals@^13.19.0: + version "13.20.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.20.0.tgz#ea276a1e508ffd4f1612888f9d1bad1e2717bf82" + integrity sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ== + dependencies: + type-fest "^0.20.2" + +globby@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + +graceful-fs@^4.2.9: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +hash-base@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" + integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== + dependencies: + inherits "^2.0.4" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +html-escaper@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" + integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== + +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + +ignore@^5.2.0: + version "5.2.4" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" + integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== + +import-fresh@^3.0.0, import-fresh@^3.2.1: + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +import-local@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" + integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== + dependencies: + pkg-dir "^4.2.0" + resolve-cwd "^3.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== + +is-core-module@^2.11.0: + version "2.12.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.12.1.tgz#0c0b6885b6f80011c71541ce15c8d66cf5a4f9fd" + integrity sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg== + dependencies: + has "^1.0.3" + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-generator-fn@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" + integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== + +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" + integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== + +istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" + integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== dependencies: "@babel/core" "^7.12.3" "@babel/parser" "^7.14.7" "@istanbuljs/schema" "^0.1.2" - "istanbul-lib-coverage" "^3.2.0" - "semver" "^6.3.0" + istanbul-lib-coverage "^3.2.0" + semver "^6.3.0" -"istanbul-lib-report@^3.0.0": - "integrity" "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==" - "resolved" "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz" - "version" "3.0.0" +istanbul-lib-report@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#7518fe52ea44de372f460a76b5ecda9ffb73d8a6" + integrity sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw== dependencies: - "istanbul-lib-coverage" "^3.0.0" - "make-dir" "^3.0.0" - "supports-color" "^7.1.0" + istanbul-lib-coverage "^3.0.0" + make-dir "^3.0.0" + supports-color "^7.1.0" -"istanbul-lib-source-maps@^4.0.0": - "integrity" "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==" - "resolved" "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz" - "version" "4.0.1" +istanbul-lib-source-maps@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" + integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== dependencies: - "debug" "^4.1.1" - "istanbul-lib-coverage" "^3.0.0" - "source-map" "^0.6.1" + debug "^4.1.1" + istanbul-lib-coverage "^3.0.0" + source-map "^0.6.1" -"istanbul-reports@^3.1.3": - "integrity" "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==" - "resolved" "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz" - "version" "3.1.5" +istanbul-reports@^3.1.3: + version "3.1.5" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.5.tgz#cc9a6ab25cb25659810e4785ed9d9fb742578bae" + integrity sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w== dependencies: - "html-escaper" "^2.0.0" - "istanbul-lib-report" "^3.0.0" + html-escaper "^2.0.0" + istanbul-lib-report "^3.0.0" -"jest-changed-files@^28.1.3": - "integrity" "sha512-esaOfUWJXk2nfZt9SPyC8gA1kNfdKLkQWyzsMlqq8msYSlNKfmZxfRgZn4Cd4MGVUF+7v6dBs0d5TOAKa7iIiA==" - "resolved" "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-28.1.3.tgz" - "version" "28.1.3" +jest-changed-files@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-28.1.3.tgz#d9aeee6792be3686c47cb988a8eaf82ff4238831" + integrity sha512-esaOfUWJXk2nfZt9SPyC8gA1kNfdKLkQWyzsMlqq8msYSlNKfmZxfRgZn4Cd4MGVUF+7v6dBs0d5TOAKa7iIiA== dependencies: - "execa" "^5.0.0" - "p-limit" "^3.1.0" + execa "^5.0.0" + p-limit "^3.1.0" -"jest-circus@^28.1.3": - "integrity" "sha512-cZ+eS5zc79MBwt+IhQhiEp0OeBddpc1n8MBo1nMB8A7oPMKEO+Sre+wHaLJexQUj9Ya/8NOBY0RESUgYjB6fow==" - "resolved" "https://registry.npmjs.org/jest-circus/-/jest-circus-28.1.3.tgz" - "version" "28.1.3" +jest-circus@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-28.1.3.tgz#d14bd11cf8ee1a03d69902dc47b6bd4634ee00e4" + integrity sha512-cZ+eS5zc79MBwt+IhQhiEp0OeBddpc1n8MBo1nMB8A7oPMKEO+Sre+wHaLJexQUj9Ya/8NOBY0RESUgYjB6fow== dependencies: "@jest/environment" "^28.1.3" "@jest/expect" "^28.1.3" "@jest/test-result" "^28.1.3" "@jest/types" "^28.1.3" "@types/node" "*" - "chalk" "^4.0.0" - "co" "^4.6.0" - "dedent" "^0.7.0" - "is-generator-fn" "^2.0.0" - "jest-each" "^28.1.3" - "jest-matcher-utils" "^28.1.3" - "jest-message-util" "^28.1.3" - "jest-runtime" "^28.1.3" - "jest-snapshot" "^28.1.3" - "jest-util" "^28.1.3" - "p-limit" "^3.1.0" - "pretty-format" "^28.1.3" - "slash" "^3.0.0" - "stack-utils" "^2.0.3" - -"jest-cli@^28.1.3": - "integrity" "sha512-roY3kvrv57Azn1yPgdTebPAXvdR2xfezaKKYzVxZ6It/5NCxzJym6tUI5P1zkdWhfUYkxEI9uZWcQdaFLo8mJQ==" - "resolved" "https://registry.npmjs.org/jest-cli/-/jest-cli-28.1.3.tgz" - "version" "28.1.3" + chalk "^4.0.0" + co "^4.6.0" + dedent "^0.7.0" + is-generator-fn "^2.0.0" + jest-each "^28.1.3" + jest-matcher-utils "^28.1.3" + jest-message-util "^28.1.3" + jest-runtime "^28.1.3" + jest-snapshot "^28.1.3" + jest-util "^28.1.3" + p-limit "^3.1.0" + pretty-format "^28.1.3" + slash "^3.0.0" + stack-utils "^2.0.3" + +jest-cli@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-28.1.3.tgz#558b33c577d06de55087b8448d373b9f654e46b2" + integrity sha512-roY3kvrv57Azn1yPgdTebPAXvdR2xfezaKKYzVxZ6It/5NCxzJym6tUI5P1zkdWhfUYkxEI9uZWcQdaFLo8mJQ== dependencies: "@jest/core" "^28.1.3" "@jest/test-result" "^28.1.3" "@jest/types" "^28.1.3" - "chalk" "^4.0.0" - "exit" "^0.1.2" - "graceful-fs" "^4.2.9" - "import-local" "^3.0.2" - "jest-config" "^28.1.3" - "jest-util" "^28.1.3" - "jest-validate" "^28.1.3" - "prompts" "^2.0.1" - "yargs" "^17.3.1" - -"jest-config@^28.1.3": - "integrity" "sha512-MG3INjByJ0J4AsNBm7T3hsuxKQqFIiRo/AUqb1q9LRKI5UU6Aar9JHbr9Ivn1TVwfUD9KirRoM/T6u8XlcQPHQ==" - "resolved" "https://registry.npmjs.org/jest-config/-/jest-config-28.1.3.tgz" - "version" "28.1.3" + chalk "^4.0.0" + exit "^0.1.2" + graceful-fs "^4.2.9" + import-local "^3.0.2" + jest-config "^28.1.3" + jest-util "^28.1.3" + jest-validate "^28.1.3" + prompts "^2.0.1" + yargs "^17.3.1" + +jest-config@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-28.1.3.tgz#e315e1f73df3cac31447eed8b8740a477392ec60" + integrity sha512-MG3INjByJ0J4AsNBm7T3hsuxKQqFIiRo/AUqb1q9LRKI5UU6Aar9JHbr9Ivn1TVwfUD9KirRoM/T6u8XlcQPHQ== dependencies: "@babel/core" "^7.11.6" "@jest/test-sequencer" "^28.1.3" "@jest/types" "^28.1.3" - "babel-jest" "^28.1.3" - "chalk" "^4.0.0" - "ci-info" "^3.2.0" - "deepmerge" "^4.2.2" - "glob" "^7.1.3" - "graceful-fs" "^4.2.9" - "jest-circus" "^28.1.3" - "jest-environment-node" "^28.1.3" - "jest-get-type" "^28.0.2" - "jest-regex-util" "^28.0.2" - "jest-resolve" "^28.1.3" - "jest-runner" "^28.1.3" - "jest-util" "^28.1.3" - "jest-validate" "^28.1.3" - "micromatch" "^4.0.4" - "parse-json" "^5.2.0" - "pretty-format" "^28.1.3" - "slash" "^3.0.0" - "strip-json-comments" "^3.1.1" - -"jest-diff@^28.1.3": - "integrity" "sha512-8RqP1B/OXzjjTWkqMX67iqgwBVJRgCyKD3L9nq+6ZqJMdvjE8RgHktqZ6jNrkdMT+dJuYNI3rhQpxaz7drJHfw==" - "resolved" "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.3.tgz" - "version" "28.1.3" - dependencies: - "chalk" "^4.0.0" - "diff-sequences" "^28.1.1" - "jest-get-type" "^28.0.2" - "pretty-format" "^28.1.3" - -"jest-docblock@^28.1.1": - "integrity" "sha512-3wayBVNiOYx0cwAbl9rwm5kKFP8yHH3d/fkEaL02NPTkDojPtheGB7HZSFY4wzX+DxyrvhXz0KSCVksmCknCuA==" - "resolved" "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.1.1.tgz" - "version" "28.1.1" - dependencies: - "detect-newline" "^3.0.0" - -"jest-each@^28.1.3": - "integrity" "sha512-arT1z4sg2yABU5uogObVPvSlSMQlDA48owx07BDPAiasW0yYpYHYOo4HHLz9q0BVzDVU4hILFjzJw0So9aCL/g==" - "resolved" "https://registry.npmjs.org/jest-each/-/jest-each-28.1.3.tgz" - "version" "28.1.3" + babel-jest "^28.1.3" + chalk "^4.0.0" + ci-info "^3.2.0" + deepmerge "^4.2.2" + glob "^7.1.3" + graceful-fs "^4.2.9" + jest-circus "^28.1.3" + jest-environment-node "^28.1.3" + jest-get-type "^28.0.2" + jest-regex-util "^28.0.2" + jest-resolve "^28.1.3" + jest-runner "^28.1.3" + jest-util "^28.1.3" + jest-validate "^28.1.3" + micromatch "^4.0.4" + parse-json "^5.2.0" + pretty-format "^28.1.3" + slash "^3.0.0" + strip-json-comments "^3.1.1" + +jest-diff@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-28.1.3.tgz#948a192d86f4e7a64c5264ad4da4877133d8792f" + integrity sha512-8RqP1B/OXzjjTWkqMX67iqgwBVJRgCyKD3L9nq+6ZqJMdvjE8RgHktqZ6jNrkdMT+dJuYNI3rhQpxaz7drJHfw== + dependencies: + chalk "^4.0.0" + diff-sequences "^28.1.1" + jest-get-type "^28.0.2" + pretty-format "^28.1.3" + +jest-docblock@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-28.1.1.tgz#6f515c3bf841516d82ecd57a62eed9204c2f42a8" + integrity sha512-3wayBVNiOYx0cwAbl9rwm5kKFP8yHH3d/fkEaL02NPTkDojPtheGB7HZSFY4wzX+DxyrvhXz0KSCVksmCknCuA== + dependencies: + detect-newline "^3.0.0" + +jest-each@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-28.1.3.tgz#bdd1516edbe2b1f3569cfdad9acd543040028f81" + integrity sha512-arT1z4sg2yABU5uogObVPvSlSMQlDA48owx07BDPAiasW0yYpYHYOo4HHLz9q0BVzDVU4hILFjzJw0So9aCL/g== dependencies: "@jest/types" "^28.1.3" - "chalk" "^4.0.0" - "jest-get-type" "^28.0.2" - "jest-util" "^28.1.3" - "pretty-format" "^28.1.3" + chalk "^4.0.0" + jest-get-type "^28.0.2" + jest-util "^28.1.3" + pretty-format "^28.1.3" -"jest-environment-node@^28.1.3": - "integrity" "sha512-ugP6XOhEpjAEhGYvp5Xj989ns5cB1K6ZdjBYuS30umT4CQEETaxSiPcZ/E1kFktX4GkrcM4qu07IIlDYX1gp+A==" - "resolved" "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.1.3.tgz" - "version" "28.1.3" +jest-environment-node@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-28.1.3.tgz#7e74fe40eb645b9d56c0c4b70ca4357faa349be5" + integrity sha512-ugP6XOhEpjAEhGYvp5Xj989ns5cB1K6ZdjBYuS30umT4CQEETaxSiPcZ/E1kFktX4GkrcM4qu07IIlDYX1gp+A== dependencies: "@jest/environment" "^28.1.3" "@jest/fake-timers" "^28.1.3" "@jest/types" "^28.1.3" "@types/node" "*" - "jest-mock" "^28.1.3" - "jest-util" "^28.1.3" + jest-mock "^28.1.3" + jest-util "^28.1.3" -"jest-get-type@^28.0.2": - "integrity" "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==" - "resolved" "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz" - "version" "28.0.2" +jest-get-type@^28.0.2: + version "28.0.2" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-28.0.2.tgz#34622e628e4fdcd793d46db8a242227901fcf203" + integrity sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA== -"jest-haste-map@^28.1.3": - "integrity" "sha512-3S+RQWDXccXDKSWnkHa/dPwt+2qwA8CJzR61w3FoYCvoo3Pn8tvGcysmMF0Bj0EX5RYvAI2EIvC57OmotfdtKA==" - "resolved" "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.3.tgz" - "version" "28.1.3" +jest-haste-map@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-28.1.3.tgz#abd5451129a38d9841049644f34b034308944e2b" + integrity sha512-3S+RQWDXccXDKSWnkHa/dPwt+2qwA8CJzR61w3FoYCvoo3Pn8tvGcysmMF0Bj0EX5RYvAI2EIvC57OmotfdtKA== dependencies: "@jest/types" "^28.1.3" "@types/graceful-fs" "^4.1.3" "@types/node" "*" - "anymatch" "^3.0.3" - "fb-watchman" "^2.0.0" - "graceful-fs" "^4.2.9" - "jest-regex-util" "^28.0.2" - "jest-util" "^28.1.3" - "jest-worker" "^28.1.3" - "micromatch" "^4.0.4" - "walker" "^1.0.8" + anymatch "^3.0.3" + fb-watchman "^2.0.0" + graceful-fs "^4.2.9" + jest-regex-util "^28.0.2" + jest-util "^28.1.3" + jest-worker "^28.1.3" + micromatch "^4.0.4" + walker "^1.0.8" optionalDependencies: - "fsevents" "^2.3.2" + fsevents "^2.3.2" -"jest-leak-detector@^28.1.3": - "integrity" "sha512-WFVJhnQsiKtDEo5lG2mM0v40QWnBM+zMdHHyJs8AWZ7J0QZJS59MsyKeJHWhpBZBH32S48FOVvGyOFT1h0DlqA==" - "resolved" "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.1.3.tgz" - "version" "28.1.3" +jest-leak-detector@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-28.1.3.tgz#a6685d9b074be99e3adee816ce84fd30795e654d" + integrity sha512-WFVJhnQsiKtDEo5lG2mM0v40QWnBM+zMdHHyJs8AWZ7J0QZJS59MsyKeJHWhpBZBH32S48FOVvGyOFT1h0DlqA== dependencies: - "jest-get-type" "^28.0.2" - "pretty-format" "^28.1.3" + jest-get-type "^28.0.2" + pretty-format "^28.1.3" -"jest-matcher-utils@^28.0.0", "jest-matcher-utils@^28.1.3": - "integrity" "sha512-kQeJ7qHemKfbzKoGjHHrRKH6atgxMk8Enkk2iPQ3XwO6oE/KYD8lMYOziCkeSB9G4adPM4nR1DE8Tf5JeWH6Bw==" - "resolved" "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.3.tgz" - "version" "28.1.3" +jest-matcher-utils@^28.0.0, jest-matcher-utils@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-28.1.3.tgz#5a77f1c129dd5ba3b4d7fc20728806c78893146e" + integrity sha512-kQeJ7qHemKfbzKoGjHHrRKH6atgxMk8Enkk2iPQ3XwO6oE/KYD8lMYOziCkeSB9G4adPM4nR1DE8Tf5JeWH6Bw== dependencies: - "chalk" "^4.0.0" - "jest-diff" "^28.1.3" - "jest-get-type" "^28.0.2" - "pretty-format" "^28.1.3" + chalk "^4.0.0" + jest-diff "^28.1.3" + jest-get-type "^28.0.2" + pretty-format "^28.1.3" -"jest-message-util@^28.1.3": - "integrity" "sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==" - "resolved" "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.3.tgz" - "version" "28.1.3" +jest-message-util@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-28.1.3.tgz#232def7f2e333f1eecc90649b5b94b0055e7c43d" + integrity sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g== dependencies: "@babel/code-frame" "^7.12.13" "@jest/types" "^28.1.3" "@types/stack-utils" "^2.0.0" - "chalk" "^4.0.0" - "graceful-fs" "^4.2.9" - "micromatch" "^4.0.4" - "pretty-format" "^28.1.3" - "slash" "^3.0.0" - "stack-utils" "^2.0.3" - -"jest-mock@^28.1.3": - "integrity" "sha512-o3J2jr6dMMWYVH4Lh/NKmDXdosrsJgi4AviS8oXLujcjpCMBb1FMsblDnOXKZKfSiHLxYub1eS0IHuRXsio9eA==" - "resolved" "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.3.tgz" - "version" "28.1.3" + chalk "^4.0.0" + graceful-fs "^4.2.9" + micromatch "^4.0.4" + pretty-format "^28.1.3" + slash "^3.0.0" + stack-utils "^2.0.3" + +jest-mock@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-28.1.3.tgz#d4e9b1fc838bea595c77ab73672ebf513ab249da" + integrity sha512-o3J2jr6dMMWYVH4Lh/NKmDXdosrsJgi4AviS8oXLujcjpCMBb1FMsblDnOXKZKfSiHLxYub1eS0IHuRXsio9eA== dependencies: "@jest/types" "^28.1.3" "@types/node" "*" -"jest-pnp-resolver@^1.2.2": - "integrity" "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==" - "resolved" "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz" - "version" "1.2.2" - -"jest-regex-util@^28.0.2": - "integrity" "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==" - "resolved" "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz" - "version" "28.0.2" - -"jest-resolve-dependencies@^28.1.3": - "integrity" "sha512-qa0QO2Q0XzQoNPouMbCc7Bvtsem8eQgVPNkwn9LnS+R2n8DaVDPL/U1gngC0LTl1RYXJU0uJa2BMC2DbTfFrHA==" - "resolved" "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.3.tgz" - "version" "28.1.3" - dependencies: - "jest-regex-util" "^28.0.2" - "jest-snapshot" "^28.1.3" - -"jest-resolve@*", "jest-resolve@^28.1.3": - "integrity" "sha512-Z1W3tTjE6QaNI90qo/BJpfnvpxtaFTFw5CDgwpyE/Kz8U/06N1Hjf4ia9quUhCh39qIGWF1ZuxFiBiJQwSEYKQ==" - "resolved" "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.1.3.tgz" - "version" "28.1.3" - dependencies: - "chalk" "^4.0.0" - "graceful-fs" "^4.2.9" - "jest-haste-map" "^28.1.3" - "jest-pnp-resolver" "^1.2.2" - "jest-util" "^28.1.3" - "jest-validate" "^28.1.3" - "resolve" "^1.20.0" - "resolve.exports" "^1.1.0" - "slash" "^3.0.0" - -"jest-runner@^28.1.3": - "integrity" "sha512-GkMw4D/0USd62OVO0oEgjn23TM+YJa2U2Wu5zz9xsQB1MxWKDOlrnykPxnMsN0tnJllfLPinHTka61u0QhaxBA==" - "resolved" "https://registry.npmjs.org/jest-runner/-/jest-runner-28.1.3.tgz" - "version" "28.1.3" +jest-pnp-resolver@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" + integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== + +jest-regex-util@^28.0.2: + version "28.0.2" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-28.0.2.tgz#afdc377a3b25fb6e80825adcf76c854e5bf47ead" + integrity sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw== + +jest-resolve-dependencies@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.3.tgz#8c65d7583460df7275c6ea2791901fa975c1fe66" + integrity sha512-qa0QO2Q0XzQoNPouMbCc7Bvtsem8eQgVPNkwn9LnS+R2n8DaVDPL/U1gngC0LTl1RYXJU0uJa2BMC2DbTfFrHA== + dependencies: + jest-regex-util "^28.0.2" + jest-snapshot "^28.1.3" + +jest-resolve@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-28.1.3.tgz#cfb36100341ddbb061ec781426b3c31eb51aa0a8" + integrity sha512-Z1W3tTjE6QaNI90qo/BJpfnvpxtaFTFw5CDgwpyE/Kz8U/06N1Hjf4ia9quUhCh39qIGWF1ZuxFiBiJQwSEYKQ== + dependencies: + chalk "^4.0.0" + graceful-fs "^4.2.9" + jest-haste-map "^28.1.3" + jest-pnp-resolver "^1.2.2" + jest-util "^28.1.3" + jest-validate "^28.1.3" + resolve "^1.20.0" + resolve.exports "^1.1.0" + slash "^3.0.0" + +jest-runner@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-28.1.3.tgz#5eee25febd730b4713a2cdfd76bdd5557840f9a1" + integrity sha512-GkMw4D/0USd62OVO0oEgjn23TM+YJa2U2Wu5zz9xsQB1MxWKDOlrnykPxnMsN0tnJllfLPinHTka61u0QhaxBA== dependencies: "@jest/console" "^28.1.3" "@jest/environment" "^28.1.3" @@ -1970,26 +2036,26 @@ "@jest/transform" "^28.1.3" "@jest/types" "^28.1.3" "@types/node" "*" - "chalk" "^4.0.0" - "emittery" "^0.10.2" - "graceful-fs" "^4.2.9" - "jest-docblock" "^28.1.1" - "jest-environment-node" "^28.1.3" - "jest-haste-map" "^28.1.3" - "jest-leak-detector" "^28.1.3" - "jest-message-util" "^28.1.3" - "jest-resolve" "^28.1.3" - "jest-runtime" "^28.1.3" - "jest-util" "^28.1.3" - "jest-watcher" "^28.1.3" - "jest-worker" "^28.1.3" - "p-limit" "^3.1.0" - "source-map-support" "0.5.13" - -"jest-runtime@^28.1.3": - "integrity" "sha512-NU+881ScBQQLc1JHG5eJGU7Ui3kLKrmwCPPtYsJtBykixrM2OhVQlpMmFWJjMyDfdkGgBMNjXCGB/ebzsgNGQw==" - "resolved" "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.1.3.tgz" - "version" "28.1.3" + chalk "^4.0.0" + emittery "^0.10.2" + graceful-fs "^4.2.9" + jest-docblock "^28.1.1" + jest-environment-node "^28.1.3" + jest-haste-map "^28.1.3" + jest-leak-detector "^28.1.3" + jest-message-util "^28.1.3" + jest-resolve "^28.1.3" + jest-runtime "^28.1.3" + jest-util "^28.1.3" + jest-watcher "^28.1.3" + jest-worker "^28.1.3" + p-limit "^3.1.0" + source-map-support "0.5.13" + +jest-runtime@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-28.1.3.tgz#a57643458235aa53e8ec7821949e728960d0605f" + integrity sha512-NU+881ScBQQLc1JHG5eJGU7Ui3kLKrmwCPPtYsJtBykixrM2OhVQlpMmFWJjMyDfdkGgBMNjXCGB/ebzsgNGQw== dependencies: "@jest/environment" "^28.1.3" "@jest/fake-timers" "^28.1.3" @@ -1998,26 +2064,26 @@ "@jest/test-result" "^28.1.3" "@jest/transform" "^28.1.3" "@jest/types" "^28.1.3" - "chalk" "^4.0.0" - "cjs-module-lexer" "^1.0.0" - "collect-v8-coverage" "^1.0.0" - "execa" "^5.0.0" - "glob" "^7.1.3" - "graceful-fs" "^4.2.9" - "jest-haste-map" "^28.1.3" - "jest-message-util" "^28.1.3" - "jest-mock" "^28.1.3" - "jest-regex-util" "^28.0.2" - "jest-resolve" "^28.1.3" - "jest-snapshot" "^28.1.3" - "jest-util" "^28.1.3" - "slash" "^3.0.0" - "strip-bom" "^4.0.0" - -"jest-snapshot@^28.1.3": - "integrity" "sha512-4lzMgtiNlc3DU/8lZfmqxN3AYD6GGLbl+72rdBpXvcV+whX7mDrREzkPdp2RnmfIiWBg1YbuFSkXduF2JcafJg==" - "resolved" "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.3.tgz" - "version" "28.1.3" + chalk "^4.0.0" + cjs-module-lexer "^1.0.0" + collect-v8-coverage "^1.0.0" + execa "^5.0.0" + glob "^7.1.3" + graceful-fs "^4.2.9" + jest-haste-map "^28.1.3" + jest-message-util "^28.1.3" + jest-mock "^28.1.3" + jest-regex-util "^28.0.2" + jest-resolve "^28.1.3" + jest-snapshot "^28.1.3" + jest-util "^28.1.3" + slash "^3.0.0" + strip-bom "^4.0.0" + +jest-snapshot@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-28.1.3.tgz#17467b3ab8ddb81e2f605db05583d69388fc0668" + integrity sha512-4lzMgtiNlc3DU/8lZfmqxN3AYD6GGLbl+72rdBpXvcV+whX7mDrREzkPdp2RnmfIiWBg1YbuFSkXduF2JcafJg== dependencies: "@babel/core" "^7.11.6" "@babel/generator" "^7.7.2" @@ -2029,858 +2095,860 @@ "@jest/types" "^28.1.3" "@types/babel__traverse" "^7.0.6" "@types/prettier" "^2.1.5" - "babel-preset-current-node-syntax" "^1.0.0" - "chalk" "^4.0.0" - "expect" "^28.1.3" - "graceful-fs" "^4.2.9" - "jest-diff" "^28.1.3" - "jest-get-type" "^28.0.2" - "jest-haste-map" "^28.1.3" - "jest-matcher-utils" "^28.1.3" - "jest-message-util" "^28.1.3" - "jest-util" "^28.1.3" - "natural-compare" "^1.4.0" - "pretty-format" "^28.1.3" - "semver" "^7.3.5" - -"jest-util@^28.0.0", "jest-util@^28.1.3": - "integrity" "sha512-XdqfpHwpcSRko/C35uLYFM2emRAltIIKZiJ9eAmhjsj0CqZMa0p1ib0R5fWIqGhn1a103DebTbpqIaP1qCQ6tQ==" - "resolved" "https://registry.npmjs.org/jest-util/-/jest-util-28.1.3.tgz" - "version" "28.1.3" + babel-preset-current-node-syntax "^1.0.0" + chalk "^4.0.0" + expect "^28.1.3" + graceful-fs "^4.2.9" + jest-diff "^28.1.3" + jest-get-type "^28.0.2" + jest-haste-map "^28.1.3" + jest-matcher-utils "^28.1.3" + jest-message-util "^28.1.3" + jest-util "^28.1.3" + natural-compare "^1.4.0" + pretty-format "^28.1.3" + semver "^7.3.5" + +jest-util@^28.0.0, jest-util@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-28.1.3.tgz#f4f932aa0074f0679943220ff9cbba7e497028b0" + integrity sha512-XdqfpHwpcSRko/C35uLYFM2emRAltIIKZiJ9eAmhjsj0CqZMa0p1ib0R5fWIqGhn1a103DebTbpqIaP1qCQ6tQ== dependencies: "@jest/types" "^28.1.3" "@types/node" "*" - "chalk" "^4.0.0" - "ci-info" "^3.2.0" - "graceful-fs" "^4.2.9" - "picomatch" "^2.2.3" + chalk "^4.0.0" + ci-info "^3.2.0" + graceful-fs "^4.2.9" + picomatch "^2.2.3" -"jest-validate@^28.1.3": - "integrity" "sha512-SZbOGBWEsaTxBGCOpsRWlXlvNkvTkY0XxRfh7zYmvd8uL5Qzyg0CHAXiXKROflh801quA6+/DsT4ODDthOC/OA==" - "resolved" "https://registry.npmjs.org/jest-validate/-/jest-validate-28.1.3.tgz" - "version" "28.1.3" +jest-validate@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-28.1.3.tgz#e322267fd5e7c64cea4629612c357bbda96229df" + integrity sha512-SZbOGBWEsaTxBGCOpsRWlXlvNkvTkY0XxRfh7zYmvd8uL5Qzyg0CHAXiXKROflh801quA6+/DsT4ODDthOC/OA== dependencies: "@jest/types" "^28.1.3" - "camelcase" "^6.2.0" - "chalk" "^4.0.0" - "jest-get-type" "^28.0.2" - "leven" "^3.1.0" - "pretty-format" "^28.1.3" + camelcase "^6.2.0" + chalk "^4.0.0" + jest-get-type "^28.0.2" + leven "^3.1.0" + pretty-format "^28.1.3" -"jest-watcher@^28.1.3": - "integrity" "sha512-t4qcqj9hze+jviFPUN3YAtAEeFnr/azITXQEMARf5cMwKY2SMBRnCQTXLixTl20OR6mLh9KLMrgVJgJISym+1g==" - "resolved" "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.1.3.tgz" - "version" "28.1.3" +jest-watcher@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-28.1.3.tgz#c6023a59ba2255e3b4c57179fc94164b3e73abd4" + integrity sha512-t4qcqj9hze+jviFPUN3YAtAEeFnr/azITXQEMARf5cMwKY2SMBRnCQTXLixTl20OR6mLh9KLMrgVJgJISym+1g== dependencies: "@jest/test-result" "^28.1.3" "@jest/types" "^28.1.3" "@types/node" "*" - "ansi-escapes" "^4.2.1" - "chalk" "^4.0.0" - "emittery" "^0.10.2" - "jest-util" "^28.1.3" - "string-length" "^4.0.1" + ansi-escapes "^4.2.1" + chalk "^4.0.0" + emittery "^0.10.2" + jest-util "^28.1.3" + string-length "^4.0.1" -"jest-worker@^28.1.3": - "integrity" "sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==" - "resolved" "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.3.tgz" - "version" "28.1.3" +jest-worker@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-28.1.3.tgz#7e3c4ce3fa23d1bb6accb169e7f396f98ed4bb98" + integrity sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g== dependencies: "@types/node" "*" - "merge-stream" "^2.0.0" - "supports-color" "^8.0.0" + merge-stream "^2.0.0" + supports-color "^8.0.0" -"jest@^28.0.0", "jest@28.1.3": - "integrity" "sha512-N4GT5on8UkZgH0O5LUavMRV1EDEhNTL0KEfRmDIeZHSV7p2XgLoY9t9VDUgL6o+yfdgYHVxuz81G8oB9VG5uyA==" - "resolved" "https://registry.npmjs.org/jest/-/jest-28.1.3.tgz" - "version" "28.1.3" +jest@28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest/-/jest-28.1.3.tgz#e9c6a7eecdebe3548ca2b18894a50f45b36dfc6b" + integrity sha512-N4GT5on8UkZgH0O5LUavMRV1EDEhNTL0KEfRmDIeZHSV7p2XgLoY9t9VDUgL6o+yfdgYHVxuz81G8oB9VG5uyA== dependencies: "@jest/core" "^28.1.3" "@jest/types" "^28.1.3" - "import-local" "^3.0.2" - "jest-cli" "^28.1.3" - -"js-tokens@^4.0.0": - "integrity" "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - "resolved" "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" - "version" "4.0.0" - -"js-yaml@^3.13.1": - "integrity" "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==" - "resolved" "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz" - "version" "3.14.1" - dependencies: - "argparse" "^1.0.7" - "esprima" "^4.0.0" - -"js-yaml@^4.1.0": - "integrity" "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==" - "resolved" "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" - "version" "4.1.0" - dependencies: - "argparse" "^2.0.1" - -"jsesc@^2.5.1": - "integrity" "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==" - "resolved" "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz" - "version" "2.5.2" - -"json-parse-even-better-errors@^2.3.0": - "integrity" "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" - "resolved" "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz" - "version" "2.3.1" - -"json-schema-traverse@^0.4.1": - "integrity" "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - "resolved" "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" - "version" "0.4.1" - -"json-stable-stringify-without-jsonify@^1.0.1": - "integrity" "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==" - "resolved" "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" - "version" "1.0.1" - -"json5@^2.2.1": - "integrity" "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==" - "resolved" "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz" - "version" "2.2.1" - -"kleur@^3.0.3": - "integrity" "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==" - "resolved" "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz" - "version" "3.0.3" - -"leven@^3.1.0": - "integrity" "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==" - "resolved" "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz" - "version" "3.1.0" - -"levn@^0.4.1": - "integrity" "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==" - "resolved" "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz" - "version" "0.4.1" - dependencies: - "prelude-ls" "^1.2.1" - "type-check" "~0.4.0" - -"lines-and-columns@^1.1.6": - "integrity" "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" - "resolved" "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz" - "version" "1.2.4" - -"locate-path@^5.0.0": - "integrity" "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==" - "resolved" "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz" - "version" "5.0.0" - dependencies: - "p-locate" "^4.1.0" - -"lodash.memoize@4.x": - "integrity" "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==" - "resolved" "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz" - "version" "4.1.2" - -"lodash.merge@^4.6.2": - "integrity" "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" - "resolved" "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" - "version" "4.6.2" - -"lru-cache@^6.0.0": - "integrity" "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==" - "resolved" "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz" - "version" "6.0.0" - dependencies: - "yallist" "^4.0.0" - -"make-dir@^3.0.0": - "integrity" "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==" - "resolved" "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz" - "version" "3.1.0" - dependencies: - "semver" "^6.0.0" - -"make-error@1.x": - "integrity" "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" - "resolved" "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz" - "version" "1.3.6" - -"makeerror@1.0.12": - "integrity" "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==" - "resolved" "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz" - "version" "1.0.12" - dependencies: - "tmpl" "1.0.5" - -"md5.js@^1.3.4": - "integrity" "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==" - "resolved" "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz" - "version" "1.3.5" - dependencies: - "hash-base" "^3.0.0" - "inherits" "^2.0.1" - "safe-buffer" "^5.1.2" - -"merge-stream@^2.0.0": - "integrity" "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" - "resolved" "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz" - "version" "2.0.0" - -"merge2@^1.3.0", "merge2@^1.4.1": - "integrity" "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" - "resolved" "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" - "version" "1.4.1" - -"micromatch@^4.0.4": - "integrity" "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==" - "resolved" "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz" - "version" "4.0.5" - dependencies: - "braces" "^3.0.2" - "picomatch" "^2.3.1" - -"mimic-fn@^2.1.0": - "integrity" "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" - "resolved" "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz" - "version" "2.1.0" - -"minimatch@^3.0.4", "minimatch@^3.1.1", "minimatch@^3.1.2": - "integrity" "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==" - "resolved" "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" - "version" "3.1.2" - dependencies: - "brace-expansion" "^1.1.7" - -"ms@2.1.2": - "integrity" "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - "resolved" "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" - "version" "2.1.2" - -"natural-compare@^1.4.0": - "integrity" "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" - "resolved" "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" - "version" "1.4.0" + import-local "^3.0.2" + jest-cli "^28.1.3" + +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@^3.13.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + +json-parse-even-better-errors@^2.3.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + +json5@^2.2.1, json5@^2.2.2: + version "2.2.3" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== + +kleur@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" + integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== + +leven@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" + integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== + +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + +lines-and-columns@^1.1.6: + version "1.2.4" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +lodash.memoize@4.x: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== + +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +make-dir@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" + integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== + dependencies: + semver "^6.0.0" + +make-error@1.x: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +makeerror@1.0.12: + version "1.0.12" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" + integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg== + dependencies: + tmpl "1.0.5" + +md5.js@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +merge2@^1.3.0, merge2@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +micromatch@^4.0.4: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +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== + dependencies: + brace-expansion "^1.1.7" + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== -"node-int64@^0.4.0": - "integrity" "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==" - "resolved" "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz" - "version" "0.4.0" - -"node-releases@^2.0.6": - "integrity" "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==" - "resolved" "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz" - "version" "2.0.6" - -"normalize-path@^3.0.0": - "integrity" "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" - "resolved" "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" - "version" "3.0.0" - -"npm-run-path@^4.0.1": - "integrity" "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==" - "resolved" "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz" - "version" "4.0.1" +node-releases@^2.0.12: + version "2.0.12" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.12.tgz#35627cc224a23bfb06fb3380f2b3afaaa7eb1039" + integrity sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ== + +normalize-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== dependencies: - "path-key" "^3.0.0" - -"once@^1.3.0": - "integrity" "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==" - "resolved" "https://registry.npmjs.org/once/-/once-1.4.0.tgz" - "version" "1.4.0" - dependencies: - "wrappy" "1" + path-key "^3.0.0" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" -"onetime@^5.1.2": - "integrity" "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==" - "resolved" "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz" - "version" "5.1.2" - dependencies: - "mimic-fn" "^2.1.0" +onetime@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" -"optionator@^0.9.1": - "integrity" "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==" - "resolved" "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz" - "version" "0.9.1" - dependencies: - "deep-is" "^0.1.3" - "fast-levenshtein" "^2.0.6" - "levn" "^0.4.1" - "prelude-ls" "^1.2.1" - "type-check" "^0.4.0" - "word-wrap" "^1.2.3" +optionator@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" + integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== + dependencies: + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.3" -"p-limit@^2.2.0": - "integrity" "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==" - "resolved" "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz" - "version" "2.3.0" - dependencies: - "p-try" "^2.0.0" - -"p-limit@^3.1.0": - "integrity" "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==" - "resolved" "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" - "version" "3.1.0" +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-limit@^3.1.0: + 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@^4.1.0": - "integrity" "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==" - "resolved" "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz" - "version" "4.1.0" - dependencies: - "p-limit" "^2.2.0" + yocto-queue "^0.1.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" -"p-try@^2.0.0": - "integrity" "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - "resolved" "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" - "version" "2.2.0" +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== -"parent-module@^1.0.0": - "integrity" "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==" - "resolved" "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" - "version" "1.0.1" - dependencies: - "callsites" "^3.0.0" +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" -"parse-json@^5.2.0": - "integrity" "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==" - "resolved" "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz" - "version" "5.2.0" +parse-json@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== dependencies: "@babel/code-frame" "^7.0.0" - "error-ex" "^1.3.1" - "json-parse-even-better-errors" "^2.3.0" - "lines-and-columns" "^1.1.6" - -"path-exists@^4.0.0": - "integrity" "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" - "resolved" "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" - "version" "4.0.0" - -"path-is-absolute@^1.0.0": - "integrity" "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" - "resolved" "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" - "version" "1.0.1" - -"path-key@^3.0.0", "path-key@^3.1.0": - "integrity" "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" - "resolved" "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" - "version" "3.1.1" - -"path-parse@^1.0.7": - "integrity" "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" - "resolved" "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" - "version" "1.0.7" - -"path-type@^4.0.0": - "integrity" "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" - "resolved" "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" - "version" "4.0.0" - -"picocolors@^1.0.0": - "integrity" "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" - "resolved" "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz" - "version" "1.0.0" - -"picomatch@^2.0.4", "picomatch@^2.2.3", "picomatch@^2.3.1": - "integrity" "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" - "resolved" "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" - "version" "2.3.1" - -"pirates@^4.0.4": - "integrity" "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==" - "resolved" "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz" - "version" "4.0.5" - -"pkg-dir@^4.2.0": - "integrity" "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==" - "resolved" "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz" - "version" "4.2.0" - dependencies: - "find-up" "^4.0.0" - -"prelude-ls@^1.2.1": - "integrity" "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==" - "resolved" "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" - "version" "1.2.1" - -"prettier@2.7.1": - "integrity" "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==" - "resolved" "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz" - "version" "2.7.1" - -"pretty-format@^28.0.0", "pretty-format@^28.1.3": - "integrity" "sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==" - "resolved" "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz" - "version" "28.1.3" + error-ex "^1.3.1" + json-parse-even-better-errors "^2.3.0" + lines-and-columns "^1.1.6" + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + +picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pirates@^4.0.4: + version "4.0.6" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" + integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== + +pkg-dir@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + +prettier@2.7.1: + version "2.7.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" + integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== + +pretty-format@^28.0.0, pretty-format@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-28.1.3.tgz#c9fba8cedf99ce50963a11b27d982a9ae90970d5" + integrity sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q== dependencies: "@jest/schemas" "^28.1.3" - "ansi-regex" "^5.0.1" - "ansi-styles" "^5.0.0" - "react-is" "^18.0.0" - -"prompts@^2.0.1": - "integrity" "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==" - "resolved" "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz" - "version" "2.4.2" - dependencies: - "kleur" "^3.0.3" - "sisteransi" "^1.0.5" - -"punycode@^2.1.0": - "integrity" "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" - "resolved" "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz" - "version" "2.1.1" - -"queue-microtask@^1.2.2": - "integrity" "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" - "resolved" "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" - "version" "1.2.3" - -"react-is@^18.0.0": - "integrity" "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" - "resolved" "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz" - "version" "18.2.0" - -"readable-stream@^3.6.0": - "integrity" "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==" - "resolved" "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz" - "version" "3.6.0" - dependencies: - "inherits" "^2.0.3" - "string_decoder" "^1.1.1" - "util-deprecate" "^1.0.1" - -"regexpp@^3.2.0": - "integrity" "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==" - "resolved" "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz" - "version" "3.2.0" - -"require-directory@^2.1.1": - "integrity" "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==" - "resolved" "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" - "version" "2.1.1" - -"resolve-cwd@^3.0.0": - "integrity" "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==" - "resolved" "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz" - "version" "3.0.0" - dependencies: - "resolve-from" "^5.0.0" - -"resolve-from@^4.0.0": - "integrity" "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" - "resolved" "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" - "version" "4.0.0" - -"resolve-from@^5.0.0": - "integrity" "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==" - "resolved" "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz" - "version" "5.0.0" - -"resolve.exports@^1.1.0": - "integrity" "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==" - "resolved" "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz" - "version" "1.1.0" - -"resolve@^1.20.0": - "integrity" "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==" - "resolved" "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz" - "version" "1.22.1" - dependencies: - "is-core-module" "^2.9.0" - "path-parse" "^1.0.7" - "supports-preserve-symlinks-flag" "^1.0.0" - -"reusify@^1.0.4": - "integrity" "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==" - "resolved" "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" - "version" "1.0.4" - -"rimraf@^3.0.0", "rimraf@^3.0.2": - "integrity" "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==" - "resolved" "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" - "version" "3.0.2" - dependencies: - "glob" "^7.1.3" - -"ripemd160@^2.0.1": - "integrity" "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==" - "resolved" "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz" - "version" "2.0.2" - dependencies: - "hash-base" "^3.0.0" - "inherits" "^2.0.1" - -"run-parallel@^1.1.9": - "integrity" "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==" - "resolved" "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" - "version" "1.2.0" - dependencies: - "queue-microtask" "^1.2.2" - -"safe-buffer@^5.0.1", "safe-buffer@^5.1.2", "safe-buffer@^5.2.0", "safe-buffer@~5.2.0": - "integrity" "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - "resolved" "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" - "version" "5.2.1" - -"safe-buffer@~5.1.1": - "integrity" "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - "resolved" "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" - "version" "5.1.2" - -"semver@^6.0.0": - "integrity" "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - "resolved" "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" - "version" "6.3.0" - -"semver@^6.3.0": - "integrity" "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - "resolved" "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" - "version" "6.3.0" - -"semver@^7.3.5", "semver@^7.3.7", "semver@7.x": - "integrity" "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==" - "resolved" "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz" - "version" "7.3.7" - dependencies: - "lru-cache" "^6.0.0" - -"sha.js@^2.4.0": - "integrity" "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==" - "resolved" "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz" - "version" "2.4.11" - dependencies: - "inherits" "^2.0.1" - "safe-buffer" "^5.0.1" - -"shebang-command@^2.0.0": - "integrity" "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==" - "resolved" "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" - "version" "2.0.0" - dependencies: - "shebang-regex" "^3.0.0" - -"shebang-regex@^3.0.0": - "integrity" "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" - "resolved" "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" - "version" "3.0.0" - -"signal-exit@^3.0.3", "signal-exit@^3.0.7": - "integrity" "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" - "resolved" "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" - "version" "3.0.7" - -"sisteransi@^1.0.5": - "integrity" "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==" - "resolved" "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz" - "version" "1.0.5" - -"slash@^3.0.0": - "integrity" "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" - "resolved" "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" - "version" "3.0.0" - -"source-map-support@0.5.13": - "integrity" "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==" - "resolved" "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz" - "version" "0.5.13" - dependencies: - "buffer-from" "^1.0.0" - "source-map" "^0.6.0" - -"source-map@^0.6.0", "source-map@^0.6.1": - "integrity" "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - "resolved" "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" - "version" "0.6.1" - -"sprintf-js@~1.0.2": - "integrity" "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" - "resolved" "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" - "version" "1.0.3" - -"stack-utils@^2.0.3": - "integrity" "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==" - "resolved" "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz" - "version" "2.0.5" - dependencies: - "escape-string-regexp" "^2.0.0" - -"string_decoder@^1.1.1": - "integrity" "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==" - "resolved" "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" - "version" "1.3.0" - dependencies: - "safe-buffer" "~5.2.0" - -"string-length@^4.0.1": - "integrity" "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==" - "resolved" "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz" - "version" "4.0.2" - dependencies: - "char-regex" "^1.0.2" - "strip-ansi" "^6.0.0" - -"string-width@^4.1.0", "string-width@^4.2.0", "string-width@^4.2.3": - "integrity" "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==" - "resolved" "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" - "version" "4.2.3" - dependencies: - "emoji-regex" "^8.0.0" - "is-fullwidth-code-point" "^3.0.0" - "strip-ansi" "^6.0.1" - -"strip-ansi@^6.0.0", "strip-ansi@^6.0.1": - "integrity" "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==" - "resolved" "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" - "version" "6.0.1" - dependencies: - "ansi-regex" "^5.0.1" + ansi-regex "^5.0.1" + ansi-styles "^5.0.0" + react-is "^18.0.0" + +prompts@^2.0.1: + version "2.4.2" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" + integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== + dependencies: + kleur "^3.0.3" + sisteransi "^1.0.5" + +punycode@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" + integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +react-is@^18.0.0: + version "18.2.0" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" + integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== + +readable-stream@^3.6.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +regexpp@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" + integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +resolve-cwd@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" + integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== + dependencies: + resolve-from "^5.0.0" + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve.exports@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.1.tgz#05cfd5b3edf641571fd46fa608b610dda9ead999" + integrity sha512-/NtpHNDN7jWhAaQ9BvBUYZ6YTXsRBgfqWFWP7BZBaoMJO/I3G5OFzvTuWNlZC3aPjins1F+TNrLKsGbH4rfsRQ== + +resolve@^1.20.0: + version "1.22.2" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f" + integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== + dependencies: + is-core-module "^2.11.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +rimraf@^3.0.0, rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +ripemd160@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +semver@7.x, semver@^7.3.5, semver@^7.3.7: + version "7.5.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.2.tgz#5b851e66d1be07c1cdaf37dfc856f543325a2beb" + integrity sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ== + dependencies: + lru-cache "^6.0.0" + +semver@^6.0.0, semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +sha.js@^2.4.0: + version "2.4.11" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +signal-exit@^3.0.3, signal-exit@^3.0.7: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +sisteransi@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" + integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +source-map-support@0.5.13: + version "0.5.13" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" + integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0, source-map@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== + +stack-utils@^2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" + integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== + dependencies: + escape-string-regexp "^2.0.0" -"strip-bom@^4.0.0": - "integrity" "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==" - "resolved" "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz" - "version" "4.0.0" +string-length@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" + integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== + dependencies: + char-regex "^1.0.2" + strip-ansi "^6.0.0" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" -"strip-final-newline@^2.0.0": - "integrity" "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==" - "resolved" "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz" - "version" "2.0.0" - -"strip-json-comments@^3.1.0", "strip-json-comments@^3.1.1": - "integrity" "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" - "resolved" "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" - "version" "3.1.1" - -"supports-color@^5.3.0": - "integrity" "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==" - "resolved" "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" - "version" "5.5.0" +strip-bom@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" + integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== + +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + +strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== dependencies: - "has-flag" "^3.0.0" + has-flag "^3.0.0" -"supports-color@^7.0.0", "supports-color@^7.1.0": - "integrity" "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==" - "resolved" "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" - "version" "7.2.0" - dependencies: - "has-flag" "^4.0.0" +supports-color@^7.0.0, supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" -"supports-color@^8.0.0": - "integrity" "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==" - "resolved" "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" - "version" "8.1.1" +supports-color@^8.0.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== dependencies: - "has-flag" "^4.0.0" + has-flag "^4.0.0" -"supports-hyperlinks@^2.0.0": - "integrity" "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==" - "resolved" "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz" - "version" "2.3.0" +supports-hyperlinks@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz#3943544347c1ff90b15effb03fc14ae45ec10624" + integrity sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA== dependencies: - "has-flag" "^4.0.0" - "supports-color" "^7.0.0" + has-flag "^4.0.0" + supports-color "^7.0.0" -"supports-preserve-symlinks-flag@^1.0.0": - "integrity" "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" - "resolved" "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz" - "version" "1.0.0" +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -"terminal-link@^2.0.0": - "integrity" "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==" - "resolved" "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz" - "version" "2.1.1" +terminal-link@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994" + integrity sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ== dependencies: - "ansi-escapes" "^4.2.1" - "supports-hyperlinks" "^2.0.0" + ansi-escapes "^4.2.1" + supports-hyperlinks "^2.0.0" -"test-exclude@^6.0.0": - "integrity" "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==" - "resolved" "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz" - "version" "6.0.0" +test-exclude@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" + integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== dependencies: "@istanbuljs/schema" "^0.1.2" - "glob" "^7.1.4" - "minimatch" "^3.0.4" - -"text-table@^0.2.0": - "integrity" "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" - "resolved" "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" - "version" "0.2.0" - -"tmpl@1.0.5": - "integrity" "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==" - "resolved" "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz" - "version" "1.0.5" - -"to-fast-properties@^2.0.0": - "integrity" "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==" - "resolved" "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz" - "version" "2.0.0" - -"to-regex-range@^5.0.1": - "integrity" "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==" - "resolved" "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" - "version" "5.0.1" - dependencies: - "is-number" "^7.0.0" - -"ts-jest@28.0.7": - "integrity" "sha512-wWXCSmTwBVmdvWrOpYhal79bDpioDy4rTT+0vyUnE3ZzM7LOAAGG9NXwzkEL/a516rQEgnMmS/WKP9jBPCVJyA==" - "resolved" "https://registry.npmjs.org/ts-jest/-/ts-jest-28.0.7.tgz" - "version" "28.0.7" - dependencies: - "bs-logger" "0.x" - "fast-json-stable-stringify" "2.x" - "jest-util" "^28.0.0" - "json5" "^2.2.1" - "lodash.memoize" "4.x" - "make-error" "1.x" - "semver" "7.x" - "yargs-parser" "^21.0.1" - -"tslib@^1.8.1": - "integrity" "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - "resolved" "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" - "version" "1.14.1" - -"tsutils@^3.21.0": - "integrity" "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==" - "resolved" "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz" - "version" "3.21.0" - dependencies: - "tslib" "^1.8.1" - -"type-check@^0.4.0", "type-check@~0.4.0": - "integrity" "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==" - "resolved" "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz" - "version" "0.4.0" - dependencies: - "prelude-ls" "^1.2.1" - -"type-detect@4.0.8": - "integrity" "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" - "resolved" "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz" - "version" "4.0.8" - -"type-fest@^0.20.2": - "integrity" "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==" - "resolved" "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" - "version" "0.20.2" - -"type-fest@^0.21.3": - "integrity" "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==" - "resolved" "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz" - "version" "0.21.3" - -"typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta", "typescript@>=4.3", "typescript@4.7.4": - "integrity" "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==" - "resolved" "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz" - "version" "4.7.4" - -"update-browserslist-db@^1.0.9": - "integrity" "sha512-/xsqn21EGVdXI3EXSum1Yckj3ZVZugqyOZQ/CxYPBD/R+ko9NSUScf8tFF4dOKY+2pvSSJA/S+5B8s4Zr4kyvg==" - "resolved" "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz" - "version" "1.0.9" - dependencies: - "escalade" "^3.1.1" - "picocolors" "^1.0.0" - -"uri-js@^4.2.2": - "integrity" "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==" - "resolved" "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" - "version" "4.4.1" - dependencies: - "punycode" "^2.1.0" - -"util-deprecate@^1.0.1": - "integrity" "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" - "resolved" "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" - "version" "1.0.2" - -"v8-compile-cache@^2.0.3": - "integrity" "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==" - "resolved" "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz" - "version" "2.3.0" - -"v8-to-istanbul@^9.0.1": - "integrity" "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==" - "resolved" "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz" - "version" "9.0.1" + glob "^7.1.4" + minimatch "^3.0.4" + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== + +tmpl@1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" + integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +ts-jest@28.0.7: + version "28.0.7" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-28.0.7.tgz#e18757a9e44693da9980a79127e5df5a98b37ac6" + integrity sha512-wWXCSmTwBVmdvWrOpYhal79bDpioDy4rTT+0vyUnE3ZzM7LOAAGG9NXwzkEL/a516rQEgnMmS/WKP9jBPCVJyA== + dependencies: + bs-logger "0.x" + fast-json-stable-stringify "2.x" + jest-util "^28.0.0" + json5 "^2.2.1" + lodash.memoize "4.x" + make-error "1.x" + semver "7.x" + yargs-parser "^21.0.1" + +tslib@^1.8.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +tsutils@^3.21.0: + version "3.21.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" + integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== + dependencies: + tslib "^1.8.1" + +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + +type-detect@4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + +typescript@4.7.4: + version "4.7.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" + integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== + +update-browserslist-db@^1.0.11: + version "1.0.11" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz#9a2a641ad2907ae7b3616506f4b977851db5b940" + integrity sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA== + dependencies: + escalade "^3.1.1" + picocolors "^1.0.0" + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +util-deprecate@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + +v8-compile-cache@^2.0.3: + version "2.3.0" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" + integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== + +v8-to-istanbul@^9.0.1: + version "9.1.0" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz#1b83ed4e397f58c85c266a570fc2558b5feb9265" + integrity sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA== dependencies: "@jridgewell/trace-mapping" "^0.3.12" "@types/istanbul-lib-coverage" "^2.0.1" - "convert-source-map" "^1.6.0" - -"walker@^1.0.8": - "integrity" "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==" - "resolved" "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz" - "version" "1.0.8" - dependencies: - "makeerror" "1.0.12" - -"which@^2.0.1": - "integrity" "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==" - "resolved" "https://registry.npmjs.org/which/-/which-2.0.2.tgz" - "version" "2.0.2" - dependencies: - "isexe" "^2.0.0" - -"word-wrap@^1.2.3": - "integrity" "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" - "resolved" "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz" - "version" "1.2.3" - -"wrap-ansi@^7.0.0": - "integrity" "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==" - "resolved" "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" - "version" "7.0.0" - dependencies: - "ansi-styles" "^4.0.0" - "string-width" "^4.1.0" - "strip-ansi" "^6.0.0" - -"wrappy@1": - "integrity" "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" - "resolved" "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" - "version" "1.0.2" - -"write-file-atomic@^4.0.1": - "integrity" "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==" - "resolved" "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz" - "version" "4.0.2" - dependencies: - "imurmurhash" "^0.1.4" - "signal-exit" "^3.0.7" - -"y18n@^5.0.5": - "integrity" "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" - "resolved" "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" - "version" "5.0.8" - -"yallist@^4.0.0": - "integrity" "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - "resolved" "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" - "version" "4.0.0" - -"yargs-parser@^21.0.0", "yargs-parser@^21.0.1": - "integrity" "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==" - "resolved" "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz" - "version" "21.1.1" - -"yargs@^17.3.1": - "integrity" "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==" - "resolved" "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz" - "version" "17.5.1" - dependencies: - "cliui" "^7.0.2" - "escalade" "^3.1.1" - "get-caller-file" "^2.0.5" - "require-directory" "^2.1.1" - "string-width" "^4.2.3" - "y18n" "^5.0.5" - "yargs-parser" "^21.0.0" - -"yocto-queue@^0.1.0": - "integrity" "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==" - "resolved" "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" - "version" "0.1.0" + convert-source-map "^1.6.0" + +walker@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" + integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== + dependencies: + makeerror "1.0.12" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +word-wrap@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +write-file-atomic@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd" + integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== + dependencies: + imurmurhash "^0.1.4" + signal-exit "^3.0.7" + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yallist@^3.0.2: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yargs-parser@^21.0.1, yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + +yargs@^17.3.1: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + +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== From 3b8bb5c9231a63f6b92ce36e3292a3999426c2f4 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Wed, 21 Jun 2023 13:51:02 +0100 Subject: [PATCH 020/120] Push to principal addresses array --- src/pbaas/Principal.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pbaas/Principal.ts b/src/pbaas/Principal.ts index 7ca385d..5d52f45 100644 --- a/src/pbaas/Principal.ts +++ b/src/pbaas/Principal.ts @@ -148,8 +148,10 @@ class TxDestination { count = reader.readVarInt().toNumber(); + this.primary_addresses = new Array; + for (let i = 0; i < count; i++) { - this.primary_addresses[i] = reader.readVarSlice(); + this.primary_addresses.push(reader.readVarSlice()); } return reader.offset; From 527453955f11b311bcfd079d2a2fb06e6da8d2de Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Wed, 21 Jun 2023 16:23:25 +0100 Subject: [PATCH 021/120] Adding contentmultimap processing --- src/__tests__/pbaas/identity.test.ts | 31 ++++- src/pbaas/Identity.ts | 169 ++++++++++++++++++++++++--- src/pbaas/Principal.ts | 12 +- 3 files changed, 192 insertions(+), 20 deletions(-) diff --git a/src/__tests__/pbaas/identity.test.ts b/src/__tests__/pbaas/identity.test.ts index 790170c..3a28a31 100644 --- a/src/__tests__/pbaas/identity.test.ts +++ b/src/__tests__/pbaas/identity.test.ts @@ -13,7 +13,36 @@ describe('Serializes and deserializes identity properly', () => { identity_frombuf.fromBuffer(Buffer.from(vdata, 'hex')) + const identity_tobuf = new Identity({ + "version":3, + "flags":0, + "primaryaddresses":[ + "RKjVHqM4VF2pCfVcwGzKH7CxvfMUE4H6o8" + ], + "minimumsignatures":1, + "name":"Chris", + "identityaddress":"iPsFBfFoCcxtuZNzE8yxPQhXVn4dmytf8j", + "parent":"iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq", + "systemid":"iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq", + "contentmultimap":{ + "iAqxJCbv2veLLHGdantvrzJRupyh3dkT6B":[ + { + "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c":"{\"artistName\": \"ivan@\", \"albumName\": \"testAlbum\", \"genre\": \"rock\", \"url\": \"https:///jukebox\", \"networkId\": \"roomful\", \"signature\": \"AgXmEgAAAUEgwLEQjSOMDGvQ9OqXYC6TpmvlSj+lYg17MW3aaIM58cE9ufW7gF4Jyf6M/nJJVM3wFodIm4Irb/TUeFjeKCan5g==\", \"tracks\": [{\"resourceId\": \"1945dc9dqtrg21\", \"name\": \"\\u0412\\u043e\\u043f\\u043b\\u0456 \\u0412\\u0456\\u0434\\u043e\\u043f\\u043b\\u044f\\u0441\\u043e\\u0432\\u0430 - \\u0412\\u0435\\u0441\\u043d\\u0430 (Cover by Grandma\\s Smuzi)\", \"duration\": 240.432}], \"albumCover\": {\"resourceId\": \"91dsp8tq6rsq1v\"}, \"artistLogo\": {\"resourceId\": \"r2f06bgtzhr8bv\"}, \"sleeveDocument\": {\"resourceId\": \"5pc60wsq353zsm\"}, \"copiesSold\": 0, \"releaseTimestamp\": \"1682559212\", \"price\": {\"VALU\": 1, \"USDC\": 200}}" + } + ], + "iChNhyJiQSZ3HumofCBhuASjgupq1m1NgP":[ + { + "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c":"{\"albumCover\": {\"resourceId\": \"91dsp8tq6rsq1v\"}, \"albumName\": \"testAlbum11\", \"artistLogo\": {\"resourceId\": \"r2f06bgtzhr8bv\"}, \"artistName\": \"ivan@\", \"genre\": \"rock\", \"networkId\": \"roomful\", \"signature\": \"AgXmEgAAAUEgwLEQjSOMDGvQ9OqXYC6TpmvlSj+lYg17MW3aaIM58cE9ufW7gF4Jyf6M/nJJVM3wFodIm4Irb/TUeFjeKCan5g==\", \"sleeveDocument\": {\"resourceId\": \"5pc60wsq353zsm\"}, \"tracks\": [{\"duration\": 240.432, \"name\": \"\\u0412\\u043e\\u043f\\u043b\\u0456 \\u0412\\u0456\\u0434\\u043e\\u043f\\u043b\\u044f\\u0441\\u043e\\u0432\\u0430 - \\u0412\\u0435\\u0441\\u043d\\u0430 (Cover by Grandma\\s Smuzi)\", \"resourceId\": \"1945dc9dqtrg21\"}], \"url\": \"https:///jukebox\", \"copiesSold\": 0, \"releaseTimestamp\": \"1682536170\", \"price\": {\"VALU\": 1, \"USDC\": 200}}" + } + ] + }, + "revocationauthority":"iPsFBfFoCcxtuZNzE8yxPQhXVn4dmytf8j", + "recoveryauthority":"iPsFBfFoCcxtuZNzE8yxPQhXVn4dmytf8j", + "timelock":0 + }) + + }); - + }); \ No newline at end of file diff --git a/src/pbaas/Identity.ts b/src/pbaas/Identity.ts index 42f4416..913c17f 100644 --- a/src/pbaas/Identity.ts +++ b/src/pbaas/Identity.ts @@ -76,19 +76,20 @@ export class Identity extends Principal { timelock: number; constructor (data?: { - version?: BigNumber, - flags?: BigNumber, - primary_addresses?: Array, - min_sigs?: BigNumber, + version?: BigNumber | number, + flags?: BigNumber | number, + primaryaddresses?: Array, + minimumsignatures?: BigNumber | number, parent?: string, - system_id?: string, + systemid?: string, name?: string, contentmap?: Map; - contentmultimap?: Map>; - revocation_authority?: string; - recovery_authority?: string; - private_addresses: Array<{d: Buffer, pk_d: Buffer}>; + contentmultimap?: Map> | {[name: string]: Array<{[name: string]: string}>}; + revocationauthority?: string; + recoveryauthority?: string; + private_addresses?: Array<{d: Buffer, pk_d: Buffer}>; timelock?: number; + identityaddress?: string; }) { @@ -96,11 +97,30 @@ export class Identity extends Principal { if (data != null) { if (data.parent != null) this.parent = data.parent - if (data.system_id != null) this.system_id = data.system_id - if (data.min_sigs != null) this.min_sigs = data.min_sigs + if (data.systemid != null) this.system_id = data.systemid if (data.contentmap != null) this.contentmap = new Map(data.contentmap || []); - if (data.contentmultimap != null) this.contentmultimap = new Map(data.contentmultimap || []); - if (data.revocation_authority != null) this.revocation_authority = data.revocation_authority + if (data.contentmultimap != null) { + + if (typeof data.contentmultimap == "object") { + + const keys = Object.keys(data.contentmultimap); + this.contentmultimap = new Map>; + + for (const key in keys ) { + const itemkeys = Object.keys(data.contentmultimap[key]) + const multivalue = itemkeys.map((item) => {return {[Object.keys(item)[0]]: Buffer.from(item, "utf8")}}); + + this.contentmultimap.set(key, multivalue) + } + + } + else { + this.contentmultimap = new Map(data.contentmultimap || []); + } + + } + if (data.revocationauthority != null) this.revocation_authority = data.revocationauthority + if (data.recoveryauthority != null) this.recovery_authority = data.recoveryauthority if (data.timelock != null) this.timelock = data.timelock if (data.private_addresses != null) this.private_addresses = data.private_addresses.map ( (addr) => {return decodeSaplingAddress(addr)}) } @@ -235,4 +255,127 @@ export class Identity extends Principal { return reader.offset; } +} + +function contentmultimapFromObject (input) { + + var contentmultimap = new Map; + var nVersion = 1; + const keys = Object.keys(input); + const values = keys.map((item) => input[item]); + + for (var i = 0; i < keys.length; i++) + { + try + { + const key = fromBase58Check(keys[i]).hash; + + + if (key != null) + { + if (Array.isArray(values[i])) + { + for (var j = 0; j < values[i].length; j++) + { + const oneValue = values[i][j]; + var items = []; + if (typeof oneValue == "string") + { + + items.push(Buffer.from(oneValue, 'hex')); + } + else if (typeof oneValue == "object") + { + const mapBytesValue = VectorEncodeVDXFUni(oneValue); + if (mapBytesValue.length === 0 || nVersion == VERSION_INVALID) + { + nVersion = VERSION_INVALID; + break; + } + contentMultiMap.insert(std::make_pair(key, mapBytesValue)); + } + } + contentmultimap.set(key ,items); + } + else if (values[i].isStr()) + { + std::string valueString; + if (IsHex(valueString = uni_get_str(values[i]))) + { + contentMultiMap.insert(std::make_pair(key, ParseHex(valueString))); + } + else + { + nVersion = VERSION_INVALID; + break; + } + } + else if (values[i].isObject()) + { + std::vector mapBytesValue = VectorEncodeVDXFUni(values[i]); + if (!mapBytesValue.size() || nVersion == VERSION_INVALID) + { + nVersion = VERSION_INVALID; + break; + } + contentMultiMap.insert(std::make_pair(key, mapBytesValue)); + } + else + { + nVersion = VERSION_INVALID; + break; + } + } + else + { + nVersion = VERSION_INVALID; + break; + } + } + catch (const std::exception &e) + { + nVersion = VERSION_INVALID; + } + if (nVersion == VERSION_INVALID) + { + LogPrint("contentmap", "%s: contentmultimap entry is not valid keys: %s, values: %s\n", __func__, keys[i].c_str(), values[i].write().c_str()); + break; + } + } +} + + +const CVDXF_Data = { + iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c: + { + "vdxfid": "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c", + "indexid": "xPwgY6oPdusaAgNK3u5yHCQG5NsHEcBpi5", + "hash160result": "e5c061641228a399169211e666de18448b7b8bab", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.string" + } + } +} + +function VectorEncodeVDXFUni (obj) { + + const bufferWriter = new BufferWriter(Buffer.from('')) + + const keys = Object.keys(obj); + const values = keys.map((item) => obj[item]); + + for (var i = 0; i < keys.length; i++) { + if (CVDXF_Data[keys[i]] && CVDXF_Data[keys[i]].qualifiedname.name === "vrsc::data.type.string" ) { + bufferWriter.writeVarInt(new BN(1)); + bufferWriter.writeSlice(Buffer.from(CVDXF_Data[keys[i]].hash160result.hash, 'hex')) + bufferWriter.writeCompactSize(Buffer.from(values[i], 'utf8').length); + bufferWriter.writeSlice(Buffer.from(values[i], 'utf8')) + } + + // TODO: add alltypes + } + + return bufferWriter.buffer; + } \ No newline at end of file diff --git a/src/pbaas/Principal.ts b/src/pbaas/Principal.ts index 5d52f45..fb685fc 100644 --- a/src/pbaas/Principal.ts +++ b/src/pbaas/Principal.ts @@ -17,9 +17,9 @@ export class Principal { primary_addresses: TxDestination; constructor (data?: { - version?: BigNumber, - flags?: BigNumber, - min_sigs?: BigNumber, + version?: BigNumber | number, + flags?: BigNumber | number, + minimumsignatures?: BigNumber | number, primary_addresses?: Array; }) { @@ -27,9 +27,9 @@ export class Principal { this.version = VERSION_INVALID; if (data != null) { - if (data.flags != null) this.flags = data.flags - if (data.version != null) this.version = data.version - if (data.min_sigs != null) this.min_sigs = data.min_sigs + if (data.flags != null) this.flags = new BN(data.flags) + if (data.version != null) this.version = new BN(data.version) + if (data.minimumsignatures != null) this.min_sigs = new BN(data.minimumsignatures) if (data.primary_addresses != null) this.primary_addresses = new TxDestination({primary_addresses: data.primary_addresses}); } From 14f0505cfb72969ca9cb968c5d64be3886aa40af Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Wed, 21 Jun 2023 16:55:57 +0100 Subject: [PATCH 022/120] Updates to contentmultimap --- src/pbaas/Identity.ts | 57 ++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 30 deletions(-) diff --git a/src/pbaas/Identity.ts b/src/pbaas/Identity.ts index 913c17f..a66cf1f 100644 --- a/src/pbaas/Identity.ts +++ b/src/pbaas/Identity.ts @@ -9,6 +9,7 @@ import { BN } from 'bn.js'; const bech32 = require('bech32') const VERSION_PBAAS = 3; +const VERSION_INVALID = 0; const { BufferReader, BufferWriter } = bufferutils @@ -103,19 +104,11 @@ export class Identity extends Principal { if (typeof data.contentmultimap == "object") { - const keys = Object.keys(data.contentmultimap); - this.contentmultimap = new Map>; - - for (const key in keys ) { - const itemkeys = Object.keys(data.contentmultimap[key]) - const multivalue = itemkeys.map((item) => {return {[Object.keys(item)[0]]: Buffer.from(item, "utf8")}}); - - this.contentmultimap.set(key, multivalue) - } + this.contentmultimap = contentmultimapFromObject(data.contentmultimap); } else { - this.contentmultimap = new Map(data.contentmultimap || []); + throw new Error("multimap root not an object") } } @@ -290,58 +283,57 @@ function contentmultimapFromObject (input) { if (mapBytesValue.length === 0 || nVersion == VERSION_INVALID) { nVersion = VERSION_INVALID; - break; + throw new Error("object not as expected") } - contentMultiMap.insert(std::make_pair(key, mapBytesValue)); + items.push(mapBytesValue, 'hex'); } } contentmultimap.set(key ,items); } - else if (values[i].isStr()) + else if (typeof values[i] === "string") { - std::string valueString; - if (IsHex(valueString = uni_get_str(values[i]))) + if (isHexByteString(values[i])) { - contentMultiMap.insert(std::make_pair(key, ParseHex(valueString))); + contentmultimap.set(key, Buffer.from(items)); } else { nVersion = VERSION_INVALID; - break; + throw new Error("string not formatted as hex") + } } - else if (values[i].isObject()) + else if (typeof values[i] === "object") { - std::vector mapBytesValue = VectorEncodeVDXFUni(values[i]); - if (!mapBytesValue.size() || nVersion == VERSION_INVALID) + const mapBytesValue = VectorEncodeVDXFUni(values[i]); + var item = []; + if (mapBytesValue.length === 0 || nVersion == VERSION_INVALID) { nVersion = VERSION_INVALID; - break; + throw new Error("object not as expected") } - contentMultiMap.insert(std::make_pair(key, mapBytesValue)); + item.push(mapBytesValue, 'hex'); + contentmultimap.set(key ,item); } else { nVersion = VERSION_INVALID; - break; + throw new Error("not valid content multimap sub type") } } else { nVersion = VERSION_INVALID; - break; + throw new Error("key in multimap == null") } } - catch (const std::exception &e) + catch (e) { nVersion = VERSION_INVALID; - } - if (nVersion == VERSION_INVALID) - { - LogPrint("contentmap", "%s: contentmultimap entry is not valid keys: %s, values: %s\n", __func__, keys[i].c_str(), values[i].write().c_str()); - break; + throw new Error(e.message) } } + return contentmultimap; } @@ -378,4 +370,9 @@ function VectorEncodeVDXFUni (obj) { return bufferWriter.buffer; +} + +function isHexByteString(str: string): boolean { + const hexByteRegex = /^[0-9a-fA-F]{2}$/; + return hexByteRegex.test(str); } \ No newline at end of file From 5fc9631be563ca47982f7ea389a9e1a81d7cc788 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Wed, 21 Jun 2023 17:26:41 +0100 Subject: [PATCH 023/120] update addresses --- src/pbaas/Principal.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pbaas/Principal.ts b/src/pbaas/Principal.ts index fb685fc..aa3f96c 100644 --- a/src/pbaas/Principal.ts +++ b/src/pbaas/Principal.ts @@ -20,7 +20,7 @@ export class Principal { version?: BigNumber | number, flags?: BigNumber | number, minimumsignatures?: BigNumber | number, - primary_addresses?: Array; + primaryaddresses?: Array; }) { this.flags = VERSION_INVALID; @@ -30,7 +30,7 @@ export class Principal { if (data.flags != null) this.flags = new BN(data.flags) if (data.version != null) this.version = new BN(data.version) if (data.minimumsignatures != null) this.min_sigs = new BN(data.minimumsignatures) - if (data.primary_addresses != null) this.primary_addresses = new TxDestination({primary_addresses: data.primary_addresses}); + if (data.primaryaddresses != null) this.primary_addresses = new TxDestination({primary_addresses: data.primaryaddresses}); } } From 1aa4cad0b39e8d3a57355e238f9d55df3493efab Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:02:05 +0100 Subject: [PATCH 024/120] Updates to Identity SErializer --- src/__tests__/pbaas/identity.test.ts | 2 +- src/pbaas/Identity.ts | 76 +++++++----- src/pbaas/Principal.ts | 178 +++++++++++++-------------- 3 files changed, 132 insertions(+), 124 deletions(-) diff --git a/src/__tests__/pbaas/identity.test.ts b/src/__tests__/pbaas/identity.test.ts index 3a28a31..0159ce5 100644 --- a/src/__tests__/pbaas/identity.test.ts +++ b/src/__tests__/pbaas/identity.test.ts @@ -40,7 +40,7 @@ describe('Serializes and deserializes identity properly', () => { "recoveryauthority":"iPsFBfFoCcxtuZNzE8yxPQhXVn4dmytf8j", "timelock":0 }) - + console.log(identity_tobuf.toBuffer().toString('hex')) }); diff --git a/src/pbaas/Identity.ts b/src/pbaas/Identity.ts index a66cf1f..15688bc 100644 --- a/src/pbaas/Identity.ts +++ b/src/pbaas/Identity.ts @@ -88,7 +88,7 @@ export class Identity extends Principal { contentmultimap?: Map> | {[name: string]: Array<{[name: string]: string}>}; revocationauthority?: string; recoveryauthority?: string; - private_addresses?: Array<{d: Buffer, pk_d: Buffer}>; + private_addresses?: Array<{d: Buffer, pk_d: Buffer}> | []; timelock?: number; identityaddress?: string; @@ -97,9 +97,10 @@ export class Identity extends Principal { super (data) if (data != null) { - if (data.parent != null) this.parent = data.parent - if (data.systemid != null) this.system_id = data.systemid - if (data.contentmap != null) this.contentmap = new Map(data.contentmap || []); + if (data.parent != null) this.parent = data.parent; + if (data.name != null) this.name = data.name; + if (data.systemid != null) this.system_id = data.systemid; + this.contentmap = data.contentmap ? new Map(data.contentmap) : new Map(); if (data.contentmultimap != null) { if (typeof data.contentmultimap == "object") { @@ -115,7 +116,7 @@ export class Identity extends Principal { if (data.revocationauthority != null) this.revocation_authority = data.revocationauthority if (data.recoveryauthority != null) this.recovery_authority = data.recoveryauthority if (data.timelock != null) this.timelock = data.timelock - if (data.private_addresses != null) this.private_addresses = data.private_addresses.map ( (addr) => {return decodeSaplingAddress(addr)}) + this.private_addresses = data.private_addresses?.map ( (addr) => {return decodeSaplingAddress(addr)}) || new Array(); } } @@ -130,15 +131,17 @@ export class Identity extends Principal { // contentmultimap if (this.version.toNumber() >= VERSION_PBAAS) { - byteLength += varuint.encodingLength(this.contentmultimap.size) + byteLength += this.contentmultimap ? varuint.encodingLength(this.contentmultimap.size) : 0 - for (const [key, value] of this.contentmultimap.entries()) { - byteLength += 20; //uint160 key - byteLength += varuint.encodingLength(value.length) - for (const n of value) { - byteLength += varuint.encodingLength(n.length); - byteLength += n.length; - } + if (this.contentmultimap) { + for (const [key, value] of this.contentmultimap.entries()) { + byteLength += 20; //uint160 key + byteLength += varuint.encodingLength(value.length) + for (const n of value) { + byteLength += varuint.encodingLength(n.length); + byteLength += n.length; + } + } } } @@ -179,7 +182,7 @@ export class Identity extends Principal { } toBuffer() { - const bufferWriter = new BufferWriter(Buffer.alloc(this._dataByteLength())) + const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())) bufferWriter.writeSlice(this._toBuffer()); bufferWriter.writeSlice(fromBase58Check(this.parent).hash); @@ -187,7 +190,7 @@ export class Identity extends Principal { bufferWriter.writeSlice(Buffer.from(this.name, "utf8")); //contentmultimap - if (this.version.toNumber() < VERSION_PBAAS) { + if (this.version.toNumber() >= VERSION_PBAAS) { bufferWriter.writeCompactSize(this.contentmultimap.size) @@ -285,16 +288,16 @@ function contentmultimapFromObject (input) { nVersion = VERSION_INVALID; throw new Error("object not as expected") } - items.push(mapBytesValue, 'hex'); + items.push(mapBytesValue); } } - contentmultimap.set(key ,items); + contentmultimap.set(keys[i] ,items); } else if (typeof values[i] === "string") { if (isHexByteString(values[i])) { - contentmultimap.set(key, Buffer.from(items)); + contentmultimap.set(keys[i], Buffer.from(items)); } else { @@ -312,8 +315,8 @@ function contentmultimapFromObject (input) { nVersion = VERSION_INVALID; throw new Error("object not as expected") } - item.push(mapBytesValue, 'hex'); - contentmultimap.set(key ,item); + item.push(mapBytesValue); + contentmultimap.set(keys[i] ,item); } else { @@ -336,9 +339,15 @@ function contentmultimapFromObject (input) { return contentmultimap; } - +const getbytes_std = function (data){ + var length = 1; + length += 20; + length += varuint.encodingLength(Buffer.from(data, 'utf8').length); + length += Buffer.from(data, 'utf8').length; + return length; + } const CVDXF_Data = { - iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c: + iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c: //CVDXF_Data::DataStringKey() { "vdxfid": "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c", "indexid": "xPwgY6oPdusaAgNK3u5yHCQG5NsHEcBpi5", @@ -346,30 +355,35 @@ const CVDXF_Data = { "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", "name": "vrsc::data.type.string" - } + }, + getbytes: getbytes_std } } function VectorEncodeVDXFUni (obj) { - - const bufferWriter = new BufferWriter(Buffer.from('')) - + const keys = Object.keys(obj); const values = keys.map((item) => obj[item]); + var bufsize = 0; + for (var i = 0; i < keys.length; i++) { + if (CVDXF_Data[keys[i]] ) { + bufsize+= CVDXF_Data[keys[i]].getbytes(values[i]); + } else { + throw new Error("VDXF key not found: " + keys[i]) + } + } + const bufferWriter = new BufferWriter(Buffer.alloc(bufsize)) for (var i = 0; i < keys.length; i++) { if (CVDXF_Data[keys[i]] && CVDXF_Data[keys[i]].qualifiedname.name === "vrsc::data.type.string" ) { bufferWriter.writeVarInt(new BN(1)); - bufferWriter.writeSlice(Buffer.from(CVDXF_Data[keys[i]].hash160result.hash, 'hex')) + bufferWriter.writeSlice(Buffer.from(CVDXF_Data[keys[i]].hash160result, 'hex')) bufferWriter.writeCompactSize(Buffer.from(values[i], 'utf8').length); bufferWriter.writeSlice(Buffer.from(values[i], 'utf8')) - } - + } // TODO: add alltypes } - return bufferWriter.buffer; - } function isHexByteString(str: string): boolean { diff --git a/src/pbaas/Principal.ts b/src/pbaas/Principal.ts index aa3f96c..2ed8db0 100644 --- a/src/pbaas/Principal.ts +++ b/src/pbaas/Principal.ts @@ -10,11 +10,90 @@ export const VERSION_CURRENT = new BN(1, 10) const { BufferReader, BufferWriter } = bufferutils -export class Principal { +class TxDestination { + primary_addresses: Array; + + constructor(data: { primaryaddresses?: Array } = null) { + + if(data != null) { + for (const tempAddr of data.primaryaddresses) { + + let tempDecoded; + try { + let tempRaddress = fromBase58Check(tempAddr) + tempDecoded = tempRaddress.hash + if (tempDecoded.length != 20 || tempRaddress.version != R_ADDR_VERSION) + throw new Error("R address Error") + } catch (e) { + + if (e.message === "R address Error") + throw new Error(e.message) + tempDecoded = Buffer.from(tempAddr, 'hex') + if (tempDecoded.length != 33) + throw new Error("Incorrect hex length of pub key") + } + this.primary_addresses = new Array; + this.primary_addresses.push(tempDecoded) + } + } + } + + getAddressString() { + let retval = []; + + for (const addr of this.primary_addresses) + + if (addr.length == 20) { + retval.push(toBase58Check(addr, R_ADDR_VERSION)); + } + else if (addr.length == 33) { + retval.push(addr.toString('hex')); + } + else { + retval.push(""); + } + } + + txgetByteLength() { + let byteLength = 0; + + byteLength += varuint.encodingLength(this.primary_addresses.length); + + for (const txDest of this.primary_addresses) { + byteLength += varuint.encodingLength(txDest.length); + byteLength += txDest.length; + } + + return byteLength + } + + txtoBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.txgetByteLength())) + + bufferWriter.writeVector(this.primary_addresses); + + return bufferWriter.buffer + } + + txfromBuffer(buffer, offset: number = 0) { + const reader = new BufferReader(buffer, offset); + let count: number; + + count = reader.readVarInt().toNumber(); + + this.primary_addresses = new Array; + + for (let i = 0; i < count; i++) { + this.primary_addresses.push(reader.readVarSlice()); + } + + return reader.offset; + } + } +export class Principal extends TxDestination{ flags: BigNumber; version: BigNumber; min_sigs: BigNumber; - primary_addresses: TxDestination; constructor (data?: { version?: BigNumber | number, @@ -22,6 +101,8 @@ export class Principal { minimumsignatures?: BigNumber | number, primaryaddresses?: Array; }) { + + super(data); this.flags = VERSION_INVALID; this.version = VERSION_INVALID; @@ -30,8 +111,6 @@ export class Principal { if (data.flags != null) this.flags = new BN(data.flags) if (data.version != null) this.version = new BN(data.version) if (data.minimumsignatures != null) this.min_sigs = new BN(data.minimumsignatures) - if (data.primaryaddresses != null) this.primary_addresses = new TxDestination({primary_addresses: data.primaryaddresses}); - } } @@ -41,7 +120,7 @@ export class Principal { byteLength += 4; //uint32 version size byteLength += 4; //uint32 flags size - byteLength += this.primary_addresses.getByteLength(); + byteLength += this.txgetByteLength(); byteLength += 4; //uint32 minimum signatures size return byteLength @@ -52,7 +131,7 @@ export class Principal { bufferWriter.writeUInt32(this.version.toNumber()) bufferWriter.writeUInt32(this.flags.toNumber()) - bufferWriter.writeSlice(this.primary_addresses.toBuffer()); + bufferWriter.writeSlice(this.txtoBuffer()); bufferWriter.writeUInt32(this.min_sigs.toNumber()) return bufferWriter.buffer @@ -64,8 +143,7 @@ export class Principal { this.version = new BN(reader.readUInt32(), 10); this.flags = new BN(reader.readUInt32(), 10); - this.primary_addresses = new TxDestination(); - reader.offset = this.primary_addresses.fromBuffer(reader.buffer, reader.offset); + reader.offset = this.txfromBuffer(reader.buffer, reader.offset); this.min_sigs = new BN(reader.readUInt32(), 10); @@ -73,87 +151,3 @@ export class Principal { } } -class TxDestination { - primary_addresses: Array; - - constructor(data: { primary_addresses?: Array } = null) { - - if(data != null) { - for (const tempAddr of data.primary_addresses) { - - let tempDecoded; - try { - let tempRaddress = fromBase58Check(tempAddr) - tempDecoded = tempRaddress.hash - if (tempDecoded.length != 20 || tempRaddress.version != R_ADDR_VERSION) - throw new Error("R address Error") - } catch (e) { - - if (e.message === "R address Error") - throw new Error(e.message) - tempDecoded = Buffer.from(tempAddr, 'hex') - if (tempDecoded.length != 33) - throw new Error("Incorrect hex length of pub key") - } - this.primary_addresses.push(tempDecoded) - } - } - } - - getNumValues() { - return new BN(this.primary_addresses.length, 10) - } - - getAddressString() { - let retval = []; - - for (const addr of this.primary_addresses) - - if (addr.length == 20) { - retval.push(toBase58Check(addr, R_ADDR_VERSION)); - } - else if (addr.length == 33) { - retval.push(addr.toString('hex')); - } - else { - retval.push(""); - } - } - - getByteLength() { - let byteLength = 0; - - byteLength += varuint.encodingLength(this.primary_addresses.length); - - for (const txDest of this.primary_addresses) { - byteLength += varuint.encodingLength(txDest.length); - byteLength += txDest.length; - } - - return byteLength - } - - toBuffer() { - const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) - - bufferWriter.writeVarInt(new BN(this.primary_addresses.length)) - bufferWriter.writeVector(this.primary_addresses); - - return bufferWriter.buffer - } - - fromBuffer(buffer, offset: number = 0) { - const reader = new BufferReader(buffer, offset); - let count: number; - - count = reader.readVarInt().toNumber(); - - this.primary_addresses = new Array; - - for (let i = 0; i < count; i++) { - this.primary_addresses.push(reader.readVarSlice()); - } - - return reader.offset; - } -} \ No newline at end of file From e447c41663a34864db412707eb8f31fbb40c0f46 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Fri, 23 Jun 2023 11:12:11 +0100 Subject: [PATCH 025/120] From object to buffer test pass --- src/__tests__/pbaas/identity.test.ts | 5 +++-- src/pbaas/Identity.ts | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/__tests__/pbaas/identity.test.ts b/src/__tests__/pbaas/identity.test.ts index 0159ce5..3f69356 100644 --- a/src/__tests__/pbaas/identity.test.ts +++ b/src/__tests__/pbaas/identity.test.ts @@ -7,10 +7,11 @@ import { fromBase58Check } from "../../utils/address"; describe('Serializes and deserializes identity properly', () => { test('deserialize id with contentmultimap', async () => { - const vdata = "0300000000000000011472aa70e6a4c0d0ff07541c5fbe4f08cacd89d35b01000000a6ef9ea235635e328124ff3429db9f9e91b64e2d0543687269730250d65f0c3aea3fd55eadf3b6f31f123fe8f9dbe001fdda02ab8b7b8b4418de66e611921699a328126461c0e5018443fdc0027b226172746973744e616d65223a20226976616e40222c2022616c62756d4e616d65223a202274657374416c62756d222c202267656e7265223a2022726f636b222c202275726c223a202268747470733a2f2f2f6a756b65626f78222c20226e6574776f726b4964223a2022726f6f6d66756c222c20227369676e6174757265223a20224167586d4567414141554567774c45516a534f4d44477651394f715859433654706d766c536a2b6c596731374d57336161494d3538634539756657376746344a7966364d2f6e4a4a564d3377466f64496d344972622f545565466a654b43616e35673d3d222c2022747261636b73223a205b7b227265736f757263654964223a20223139343564633964717472673231222c20226e616d65223a20225c75303431325c75303433655c75303433665c75303433625c7530343536205c75303431325c75303435365c75303433345c75303433655c75303433665c75303433625c75303434665c75303434315c75303433655c75303433325c7530343330202d205c75303431325c75303433355c75303434315c75303433645c75303433302028436f766572206279204772616e646d615c7320536d757a6929222c20226475726174696f6e223a203234302e3433327d5d2c2022616c62756d436f766572223a207b227265736f757263654964223a20223931647370387471367273713176227d2c20226172746973744c6f676f223a207b227265736f757263654964223a202272326630366267747a6872386276227d2c2022736c65657665446f63756d656e74223a207b227265736f757263654964223a202235706336307773713335337a736d227d2c2022636f70696573536f6c64223a20302c202272656c6561736554696d657374616d70223a202231363832353539323132222c20227072696365223a207b2256414c55223a20312c202255534443223a203230307d7d652741687b7ab1473754858d7b8b10886945eaf801fddc02ab8b7b8b4418de66e611921699a328126461c0e5018445fdc2027b22616c62756d436f766572223a207b227265736f757263654964223a20223931647370387471367273713176227d2c2022616c62756d4e616d65223a202274657374416c62756d3131222c20226172746973744c6f676f223a207b227265736f757263654964223a202272326630366267747a6872386276227d2c20226172746973744e616d65223a20226976616e40222c202267656e7265223a2022726f636b222c20226e6574776f726b4964223a2022726f6f6d66756c222c20227369676e6174757265223a20224167586d4567414141554567774c45516a534f4d44477651394f715859433654706d766c536a2b6c596731374d57336161494d3538634539756657376746344a7966364d2f6e4a4a564d3377466f64496d344972622f545565466a654b43616e35673d3d222c2022736c65657665446f63756d656e74223a207b227265736f757263654964223a202235706336307773713335337a736d227d2c2022747261636b73223a205b7b226475726174696f6e223a203234302e3433322c20226e616d65223a20225c75303431325c75303433655c75303433665c75303433625c7530343536205c75303431325c75303435365c75303433345c75303433655c75303433665c75303433625c75303434665c75303434315c75303433655c75303433325c7530343330202d205c75303431325c75303433355c75303434315c75303433645c75303433302028436f766572206279204772616e646d615c7320536d757a6929222c20227265736f757263654964223a20223139343564633964717472673231227d5d2c202275726c223a202268747470733a2f2f2f6a756b65626f78222c2022636f70696573536f6c64223a20302c202272656c6561736554696d657374616d70223a202231363832353336313730222c20227072696365223a207b2256414c55223a20312c202255534443223a203230307d7d00dfae84e93ab133b739076354e9fbb2de42887212dfae84e93ab133b739076354e9fbb2de4288721200a6ef9ea235635e328124ff3429db9f9e91b64e2d000000001b04030f01011504dfae84e93ab133b739076354e9fbb2de428872121b04031001011504dfae84e93ab133b739076354e9fbb2de42887212" + const vdata = "0300000000000000011472aa70e6a4c0d0ff07541c5fbe4f08cacd89d35b01000000a6ef9ea235635e328124ff3429db9f9e91b64e2d0543687269730250d65f0c3aea3fd55eadf3b6f31f123fe8f9dbe001fdda02ab8b7b8b4418de66e611921699a328126461c0e5018443fdc0027b226172746973744e616d65223a20226976616e40222c2022616c62756d4e616d65223a202274657374416c62756d222c202267656e7265223a2022726f636b222c202275726c223a202268747470733a2f2f2f6a756b65626f78222c20226e6574776f726b4964223a2022726f6f6d66756c222c20227369676e6174757265223a20224167586d4567414141554567774c45516a534f4d44477651394f715859433654706d766c536a2b6c596731374d57336161494d3538634539756657376746344a7966364d2f6e4a4a564d3377466f64496d344972622f545565466a654b43616e35673d3d222c2022747261636b73223a205b7b227265736f757263654964223a20223139343564633964717472673231222c20226e616d65223a20225c75303431325c75303433655c75303433665c75303433625c7530343536205c75303431325c75303435365c75303433345c75303433655c75303433665c75303433625c75303434665c75303434315c75303433655c75303433325c7530343330202d205c75303431325c75303433355c75303434315c75303433645c75303433302028436f766572206279204772616e646d615c7320536d757a6929222c20226475726174696f6e223a203234302e3433327d5d2c2022616c62756d436f766572223a207b227265736f757263654964223a20223931647370387471367273713176227d2c20226172746973744c6f676f223a207b227265736f757263654964223a202272326630366267747a6872386276227d2c2022736c65657665446f63756d656e74223a207b227265736f757263654964223a202235706336307773713335337a736d227d2c2022636f70696573536f6c64223a20302c202272656c6561736554696d657374616d70223a202231363832353539323132222c20227072696365223a207b2256414c55223a20312c202255534443223a203230307d7d652741687b7ab1473754858d7b8b10886945eaf801fddc02ab8b7b8b4418de66e611921699a328126461c0e5018445fdc2027b22616c62756d436f766572223a207b227265736f757263654964223a20223931647370387471367273713176227d2c2022616c62756d4e616d65223a202274657374416c62756d3131222c20226172746973744c6f676f223a207b227265736f757263654964223a202272326630366267747a6872386276227d2c20226172746973744e616d65223a20226976616e40222c202267656e7265223a2022726f636b222c20226e6574776f726b4964223a2022726f6f6d66756c222c20227369676e6174757265223a20224167586d4567414141554567774c45516a534f4d44477651394f715859433654706d766c536a2b6c596731374d57336161494d3538634539756657376746344a7966364d2f6e4a4a564d3377466f64496d344972622f545565466a654b43616e35673d3d222c2022736c65657665446f63756d656e74223a207b227265736f757263654964223a202235706336307773713335337a736d227d2c2022747261636b73223a205b7b226475726174696f6e223a203234302e3433322c20226e616d65223a20225c75303431325c75303433655c75303433665c75303433625c7530343536205c75303431325c75303435365c75303433345c75303433655c75303433665c75303433625c75303434665c75303434315c75303433655c75303433325c7530343330202d205c75303431325c75303433355c75303434315c75303433645c75303433302028436f766572206279204772616e646d615c7320536d757a6929222c20227265736f757263654964223a20223139343564633964717472673231227d5d2c202275726c223a202268747470733a2f2f2f6a756b65626f78222c2022636f70696573536f6c64223a20302c202272656c6561736554696d657374616d70223a202231363832353336313730222c20227072696365223a207b2256414c55223a20312c202255534443223a203230307d7d00dfae84e93ab133b739076354e9fbb2de42887212dfae84e93ab133b739076354e9fbb2de4288721200a6ef9ea235635e328124ff3429db9f9e91b64e2d00000000" const identity_frombuf = new Identity() identity_frombuf.fromBuffer(Buffer.from(vdata, 'hex')) + // TODO: expect(identity_frombuf.toBuffer().toString('hex')).toBe(vdata) const identity_tobuf = new Identity({ @@ -40,7 +41,7 @@ describe('Serializes and deserializes identity properly', () => { "recoveryauthority":"iPsFBfFoCcxtuZNzE8yxPQhXVn4dmytf8j", "timelock":0 }) - console.log(identity_tobuf.toBuffer().toString('hex')) + expect(identity_tobuf.toBuffer().toString('hex')).toBe(vdata) }); diff --git a/src/pbaas/Identity.ts b/src/pbaas/Identity.ts index 15688bc..d798b62 100644 --- a/src/pbaas/Identity.ts +++ b/src/pbaas/Identity.ts @@ -340,8 +340,9 @@ function contentmultimapFromObject (input) { } const getbytes_std = function (data){ - var length = 1; - length += 20; + var length = 20; + length += 1; // varint length 1 + length += 2; // ss type + ver (lengths) length += varuint.encodingLength(Buffer.from(data, 'utf8').length); length += Buffer.from(data, 'utf8').length; return length; @@ -376,8 +377,9 @@ function VectorEncodeVDXFUni (obj) { for (var i = 0; i < keys.length; i++) { if (CVDXF_Data[keys[i]] && CVDXF_Data[keys[i]].qualifiedname.name === "vrsc::data.type.string" ) { + bufferWriter.writeSlice(fromBase58Check(CVDXF_Data[keys[i]].vdxfid).hash) bufferWriter.writeVarInt(new BN(1)); - bufferWriter.writeSlice(Buffer.from(CVDXF_Data[keys[i]].hash160result, 'hex')) + bufferWriter.writeVarInt(new BN(Buffer.from(values[i], 'utf8').length + 3)) //NOTE 3 is from ss type + ver + vdxfidver bufferWriter.writeCompactSize(Buffer.from(values[i], 'utf8').length); bufferWriter.writeSlice(Buffer.from(values[i], 'utf8')) } From 9994c93f5c5384394c883452a778e29c82c4f592 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Fri, 23 Jun 2023 16:13:13 +0100 Subject: [PATCH 026/120] Identity Serializer passing --- src/__tests__/pbaas/identity.test.ts | 3 +- src/pbaas/Identity.ts | 91 ++++++++++++++++++++++------ 2 files changed, 73 insertions(+), 21 deletions(-) diff --git a/src/__tests__/pbaas/identity.test.ts b/src/__tests__/pbaas/identity.test.ts index 3f69356..07481ce 100644 --- a/src/__tests__/pbaas/identity.test.ts +++ b/src/__tests__/pbaas/identity.test.ts @@ -11,8 +11,7 @@ describe('Serializes and deserializes identity properly', () => { const identity_frombuf = new Identity() identity_frombuf.fromBuffer(Buffer.from(vdata, 'hex')) - // TODO: expect(identity_frombuf.toBuffer().toString('hex')).toBe(vdata) - + expect(identity_frombuf.toBuffer().toString('hex')).toBe(vdata) const identity_tobuf = new Identity({ "version":3, diff --git a/src/pbaas/Identity.ts b/src/pbaas/Identity.ts index d798b62..b0c5bbe 100644 --- a/src/pbaas/Identity.ts +++ b/src/pbaas/Identity.ts @@ -96,28 +96,27 @@ export class Identity extends Principal { super (data) - if (data != null) { - if (data.parent != null) this.parent = data.parent; - if (data.name != null) this.name = data.name; - if (data.systemid != null) this.system_id = data.systemid; - this.contentmap = data.contentmap ? new Map(data.contentmap) : new Map(); - if (data.contentmultimap != null) { + if (data?.parent) this.parent = data.parent; + if (data?.name) this.name = data.name; + if (data?.systemid) this.system_id = data.systemid; + this.contentmap = data?.contentmap ? new Map(data.contentmap) : new Map(); + if (data?.contentmultimap) { - if (typeof data.contentmultimap == "object") { + if (typeof data.contentmultimap == "object") { - this.contentmultimap = contentmultimapFromObject(data.contentmultimap); + this.contentmultimap = contentmultimapFromObject(data.contentmultimap); - } - else { - throw new Error("multimap root not an object") - } + } + else { + throw new Error("multimap root not an object") + } - } - if (data.revocationauthority != null) this.revocation_authority = data.revocationauthority - if (data.recoveryauthority != null) this.recovery_authority = data.recoveryauthority - if (data.timelock != null) this.timelock = data.timelock - this.private_addresses = data.private_addresses?.map ( (addr) => {return decodeSaplingAddress(addr)}) || new Array(); } + if (data?.revocationauthority) this.revocation_authority = data.revocationauthority + if (data?.recoveryauthority) this.recovery_authority = data.recoveryauthority + if (data?.timelock) this.timelock = data.timelock + + this.private_addresses = data?.private_addresses?.map ( (addr) => {return decodeSaplingAddress(addr)}) || new Array(); } dataByteLength() { @@ -164,7 +163,7 @@ export class Identity extends Principal { byteLength += 20; //uint160 recovery authority // privateaddresses - byteLength += varuint.encodingLength(this.private_addresses.length); + byteLength += varuint.encodingLength(this.private_addresses.length | 0); for (const n of this.private_addresses) { byteLength += varuint.encodingLength(n.d.length); @@ -247,7 +246,61 @@ export class Identity extends Principal { reader.offset = this._fromBuffer(reader.buffer, reader.offset); this.parent = toBase58Check(reader.readSlice(20), I_ADDR_VERSION) - //TODO: + + this.name = Buffer.from(reader.readVarSlice()).toString('utf8') + + //contentmultimap + if (this.version.toNumber() >= VERSION_PBAAS) { + + const contentMapSize = reader.readVarInt(); + this.contentmultimap = new Map(); + + for (var i = 0; i < contentMapSize.toNumber(); i++) { + + const contentMapKey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION) + var innervector = reader.readVector(); + + this.contentmultimap.set(contentMapKey, innervector); + + } + } + + // contentmap + if (this.version.toNumber() < VERSION_PBAAS) { + + const contentMultiMapSize = reader.readVarInt(); + this.contentmap = new Map(); + + for (var i = 0; i < contentMultiMapSize.toNumber(); i++) { + + const contentMapKey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION) + const hash = reader.readSlice(32); + this.contentmap.set(contentMapKey, hash); + } + } + + const contentMapSize = reader.readVarInt(); + this.contentmap = new Map(); + + for (var i = 0; i < contentMapSize.toNumber(); i++) { + const contentMapKey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION) + const hash = reader.readSlice(32); + this.contentmap.set(contentMapKey, hash); + } + + this.revocation_authority = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + this.recovery_authority = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + + const numPrivateAddresses = reader.readVarInt(); + + for (var i = 0; i < numPrivateAddresses.toNumber(); i++) { + this.private_addresses.push({d: Buffer.from(reader.readVector()), pk_d: reader.readSlice(20)}) + } + + if (this.version.toNumber() >= VERSION_PBAAS) { + this.system_id = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + this.timelock = reader.readUInt32(); + } return reader.offset; } From 7d2581b94462372df039c2be6b8e96b85597905d Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Fri, 23 Jun 2023 17:10:41 +0100 Subject: [PATCH 027/120] Build and add attestation tests --- dist/pbaas/Identity.d.ts | 43 +++ dist/pbaas/Identity.js | 338 ++++++++++++++++++++++++ dist/pbaas/Principal.d.ts | 30 +++ dist/pbaas/Principal.js | 112 ++++++++ dist/pbaas/index.d.ts | 1 + dist/pbaas/index.js | 1 + dist/vdxf/classes/Challenge.d.ts | 8 +- dist/vdxf/classes/Challenge.js | 16 +- dist/vdxf/index.js | 4 +- package.json | 2 +- src/__tests__/vdxf/loginconsent.test.ts | 70 ++++- src/vdxf/classes/Challenge.ts | 32 +-- src/vdxf/index.ts | 5 +- yarn.lock | 8 +- 14 files changed, 629 insertions(+), 41 deletions(-) create mode 100644 dist/pbaas/Identity.d.ts create mode 100644 dist/pbaas/Identity.js create mode 100644 dist/pbaas/Principal.d.ts create mode 100644 dist/pbaas/Principal.js diff --git a/dist/pbaas/Identity.d.ts b/dist/pbaas/Identity.d.ts new file mode 100644 index 0000000..6e26977 --- /dev/null +++ b/dist/pbaas/Identity.d.ts @@ -0,0 +1,43 @@ +/// +import { BigNumber } from '../utils/types/BigNumber'; +import { Principal } from './Principal'; +export declare class Identity extends Principal { + parent: string; + system_id: string; + name: string; + contentmap: Map; + contentmultimap: Map>; + revocation_authority: string; + recovery_authority: string; + private_addresses: Array<{ + d: Buffer; + pk_d: Buffer; + }>; + timelock: number; + constructor(data?: { + version?: BigNumber | number; + flags?: BigNumber | number; + primaryaddresses?: Array; + minimumsignatures?: BigNumber | number; + parent?: string; + systemid?: string; + name?: string; + contentmap?: Map; + contentmultimap?: Map> | { + [name: string]: Array<{ + [name: string]: string; + }>; + }; + revocationauthority?: string; + recoveryauthority?: string; + private_addresses?: Array<{ + d: Buffer; + pk_d: Buffer; + }> | []; + timelock?: number; + identityaddress?: string; + }); + dataByteLength(): number; + toBuffer(): Buffer; + fromBuffer(buffer: any, offset?: number): number; +} diff --git a/dist/pbaas/Identity.js b/dist/pbaas/Identity.js new file mode 100644 index 0000000..2c6471c --- /dev/null +++ b/dist/pbaas/Identity.js @@ -0,0 +1,338 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Identity = void 0; +const varuint_1 = require("../utils/varuint"); +const bufferutils_1 = require("../utils/bufferutils"); +const Principal_1 = require("./Principal"); +const address_1 = require("../utils/address"); +const vdxf_1 = require("../constants/vdxf"); +const bn_js_1 = require("bn.js"); +const bech32 = require('bech32'); +const VERSION_PBAAS = 3; +const VERSION_INVALID = 0; +const { BufferReader, BufferWriter } = bufferutils_1.default; +function fromBech32(address) { + var result = bech32.decode(address); + var data = bech32.fromWords(result.words.slice(1)); + return { + version: result.words[0], + prefix: result.prefix, + data: Buffer.from(data) + }; +} +function convertBits(data, from, to, strictMode) { + const length = strictMode + ? Math.floor((data.length * from) / to) + : Math.ceil((data.length * from) / to); + const mask = (1 << to) - 1; + const result = Buffer.alloc(length); + let index = 0; + let accumulator = 0; + let bits = 0; + for (const value of data) { + accumulator = (accumulator << from) | value; + bits += from; + while (bits >= to) { + bits -= to; + result[index] = (accumulator >> bits) & mask; + ++index; + } + } + if (!strictMode) { + if (bits > 0) { + result[index] = (accumulator << (to - bits)) & mask; + ++index; + } + } + else { + throw new Error("Input cannot be converted"); + } + return result; +} +function decodeSaplingAddress(address) { + const result = fromBech32(address); + const data = convertBits(result.data, 5, 8, false); + return { d: data.slice(0, 10), pk_d: data.slice(10) }; +} +class Identity extends Principal_1.Principal { + constructor(data) { + var _a; + super(data); + if (data === null || data === void 0 ? void 0 : data.parent) + this.parent = data.parent; + if (data === null || data === void 0 ? void 0 : data.name) + this.name = data.name; + if (data === null || data === void 0 ? void 0 : data.systemid) + this.system_id = data.systemid; + this.contentmap = (data === null || data === void 0 ? void 0 : data.contentmap) ? new Map(data.contentmap) : new Map(); + if (data === null || data === void 0 ? void 0 : data.contentmultimap) { + if (typeof data.contentmultimap == "object") { + this.contentmultimap = contentmultimapFromObject(data.contentmultimap); + } + else { + throw new Error("multimap root not an object"); + } + } + if (data === null || data === void 0 ? void 0 : data.revocationauthority) + this.revocation_authority = data.revocationauthority; + if (data === null || data === void 0 ? void 0 : data.recoveryauthority) + this.recovery_authority = data.recoveryauthority; + if (data === null || data === void 0 ? void 0 : data.timelock) + this.timelock = data.timelock; + this.private_addresses = ((_a = data === null || data === void 0 ? void 0 : data.private_addresses) === null || _a === void 0 ? void 0 : _a.map((addr) => { return decodeSaplingAddress(addr); })) || new Array(); + } + dataByteLength() { + let byteLength = 0; + byteLength += this._dataByteLength(); //get the principal byte length + byteLength += 20; //uint160 parent + byteLength += varuint_1.default.encodingLength(Buffer.from(this.name, "utf8").length); // name compact size + byteLength += Buffer.from(this.name, "utf8").length; // name_in_utf8_bytes + // contentmultimap + if (this.version.toNumber() >= VERSION_PBAAS) { + byteLength += this.contentmultimap ? varuint_1.default.encodingLength(this.contentmultimap.size) : 0; + if (this.contentmultimap) { + for (const [key, value] of this.contentmultimap.entries()) { + byteLength += 20; //uint160 key + byteLength += varuint_1.default.encodingLength(value.length); + for (const n of value) { + byteLength += varuint_1.default.encodingLength(n.length); + byteLength += n.length; + } + } + } + } + //contentmap + if (this.version.toNumber() < VERSION_PBAAS) { + byteLength += varuint_1.default.encodingLength(this.contentmap.size); + for (const m in this.contentmap) { + byteLength += 20; //uint160 key + byteLength += 32; //uint256 hash + } + } + //contentmap2 + byteLength += varuint_1.default.encodingLength(this.contentmap.size); + for (const m in this.contentmap) { + byteLength += 20; //uint160 key + byteLength += 32; //uint256 hash + } + byteLength += 20; //uint160 revocation authority + byteLength += 20; //uint160 recovery authority + // privateaddresses + byteLength += varuint_1.default.encodingLength(this.private_addresses.length | 0); + for (const n of this.private_addresses) { + byteLength += varuint_1.default.encodingLength(n.d.length); + byteLength += n.d.length; // const 11 + byteLength += 32; //pk_d hash + } + // post PBAAS + if (this.version.toNumber() >= VERSION_PBAAS) { + byteLength += 20; //uint160 systemid + byteLength += 4; //uint32 unlockafter + } + return byteLength; + } + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); + bufferWriter.writeSlice(this._toBuffer()); + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.parent).hash); + bufferWriter.writeCompactSize(Buffer.from(this.name, "utf8").length); + bufferWriter.writeSlice(Buffer.from(this.name, "utf8")); + //contentmultimap + if (this.version.toNumber() >= VERSION_PBAAS) { + bufferWriter.writeCompactSize(this.contentmultimap.size); + for (const [key, value] of this.contentmultimap.entries()) { + bufferWriter.writeSlice((0, address_1.fromBase58Check)(key).hash); + bufferWriter.writeCompactSize(value.length); + for (const n of value) { + bufferWriter.writeCompactSize(n.length); + bufferWriter.writeSlice(n); + } + } + } + //contentmap + if (this.version.toNumber() < VERSION_PBAAS) { + bufferWriter.writeCompactSize(this.contentmap.size); + for (const [key, value] of this.contentmap.entries()) { + bufferWriter.writeSlice(value); + } + } + //contentmap2 + bufferWriter.writeCompactSize(this.contentmap.size); + for (const [key, value] of this.contentmap.entries()) { + bufferWriter.writeSlice(value); + } + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.revocation_authority).hash); + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.recovery_authority).hash); + // privateaddresses + bufferWriter.writeCompactSize(this.private_addresses.length); + for (const n of this.private_addresses) { + bufferWriter.writeCompactSize(n.d.length); + bufferWriter.writeSlice(n.d); + bufferWriter.writeSlice(n.pk_d); + } + // post PBAAS + if (this.version.toNumber() >= VERSION_PBAAS) { + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.system_id).hash); + bufferWriter.writeUInt32(this.timelock); + } + return bufferWriter.buffer; + } + fromBuffer(buffer, offset = 0) { + const reader = new BufferReader(buffer, offset); + reader.offset = this._fromBuffer(reader.buffer, reader.offset); + this.parent = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + this.name = Buffer.from(reader.readVarSlice()).toString('utf8'); + //contentmultimap + if (this.version.toNumber() >= VERSION_PBAAS) { + const contentMapSize = reader.readVarInt(); + this.contentmultimap = new Map(); + for (var i = 0; i < contentMapSize.toNumber(); i++) { + const contentMapKey = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + var innervector = reader.readVector(); + this.contentmultimap.set(contentMapKey, innervector); + } + } + // contentmap + if (this.version.toNumber() < VERSION_PBAAS) { + const contentMultiMapSize = reader.readVarInt(); + this.contentmap = new Map(); + for (var i = 0; i < contentMultiMapSize.toNumber(); i++) { + const contentMapKey = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + const hash = reader.readSlice(32); + this.contentmap.set(contentMapKey, hash); + } + } + const contentMapSize = reader.readVarInt(); + this.contentmap = new Map(); + for (var i = 0; i < contentMapSize.toNumber(); i++) { + const contentMapKey = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + const hash = reader.readSlice(32); + this.contentmap.set(contentMapKey, hash); + } + this.revocation_authority = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + this.recovery_authority = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + const numPrivateAddresses = reader.readVarInt(); + for (var i = 0; i < numPrivateAddresses.toNumber(); i++) { + this.private_addresses.push({ d: Buffer.from(reader.readVector()), pk_d: reader.readSlice(20) }); + } + if (this.version.toNumber() >= VERSION_PBAAS) { + this.system_id = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + this.timelock = reader.readUInt32(); + } + return reader.offset; + } +} +exports.Identity = Identity; +function contentmultimapFromObject(input) { + var contentmultimap = new Map; + var nVersion = 1; + const keys = Object.keys(input); + const values = keys.map((item) => input[item]); + for (var i = 0; i < keys.length; i++) { + try { + const key = (0, address_1.fromBase58Check)(keys[i]).hash; + if (key != null) { + if (Array.isArray(values[i])) { + for (var j = 0; j < values[i].length; j++) { + const oneValue = values[i][j]; + var items = []; + if (typeof oneValue == "string") { + items.push(Buffer.from(oneValue, 'hex')); + } + else if (typeof oneValue == "object") { + const mapBytesValue = VectorEncodeVDXFUni(oneValue); + if (mapBytesValue.length === 0 || nVersion == VERSION_INVALID) { + nVersion = VERSION_INVALID; + throw new Error("object not as expected"); + } + items.push(mapBytesValue); + } + } + contentmultimap.set(keys[i], items); + } + else if (typeof values[i] === "string") { + if (isHexByteString(values[i])) { + contentmultimap.set(keys[i], Buffer.from(items)); + } + else { + nVersion = VERSION_INVALID; + throw new Error("string not formatted as hex"); + } + } + else if (typeof values[i] === "object") { + const mapBytesValue = VectorEncodeVDXFUni(values[i]); + var item = []; + if (mapBytesValue.length === 0 || nVersion == VERSION_INVALID) { + nVersion = VERSION_INVALID; + throw new Error("object not as expected"); + } + item.push(mapBytesValue); + contentmultimap.set(keys[i], item); + } + else { + nVersion = VERSION_INVALID; + throw new Error("not valid content multimap sub type"); + } + } + else { + nVersion = VERSION_INVALID; + throw new Error("key in multimap == null"); + } + } + catch (e) { + nVersion = VERSION_INVALID; + throw new Error(e.message); + } + } + return contentmultimap; +} +const getbytes_std = function (data) { + var length = 20; + length += 1; // varint length 1 + length += 2; // ss type + ver (lengths) + length += varuint_1.default.encodingLength(Buffer.from(data, 'utf8').length); + length += Buffer.from(data, 'utf8').length; + return length; +}; +const CVDXF_Data = { + iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c: //CVDXF_Data::DataStringKey() + { + "vdxfid": "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c", + "indexid": "xPwgY6oPdusaAgNK3u5yHCQG5NsHEcBpi5", + "hash160result": "e5c061641228a399169211e666de18448b7b8bab", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.string" + }, + getbytes: getbytes_std + } +}; +function VectorEncodeVDXFUni(obj) { + const keys = Object.keys(obj); + const values = keys.map((item) => obj[item]); + var bufsize = 0; + for (var i = 0; i < keys.length; i++) { + if (CVDXF_Data[keys[i]]) { + bufsize += CVDXF_Data[keys[i]].getbytes(values[i]); + } + else { + throw new Error("VDXF key not found: " + keys[i]); + } + } + const bufferWriter = new BufferWriter(Buffer.alloc(bufsize)); + for (var i = 0; i < keys.length; i++) { + if (CVDXF_Data[keys[i]] && CVDXF_Data[keys[i]].qualifiedname.name === "vrsc::data.type.string") { + bufferWriter.writeSlice((0, address_1.fromBase58Check)(CVDXF_Data[keys[i]].vdxfid).hash); + bufferWriter.writeVarInt(new bn_js_1.BN(1)); + bufferWriter.writeVarInt(new bn_js_1.BN(Buffer.from(values[i], 'utf8').length + 3)); //NOTE 3 is from ss type + ver + vdxfidver + bufferWriter.writeCompactSize(Buffer.from(values[i], 'utf8').length); + bufferWriter.writeSlice(Buffer.from(values[i], 'utf8')); + } + // TODO: add alltypes + } + return bufferWriter.buffer; +} +function isHexByteString(str) { + const hexByteRegex = /^[0-9a-fA-F]{2}$/; + return hexByteRegex.test(str); +} diff --git a/dist/pbaas/Principal.d.ts b/dist/pbaas/Principal.d.ts new file mode 100644 index 0000000..caef658 --- /dev/null +++ b/dist/pbaas/Principal.d.ts @@ -0,0 +1,30 @@ +/// +/// +import { BigNumber } from '../utils/types/BigNumber'; +export declare const VERSION_INVALID: import("bn.js"); +export declare const VERSION_CURRENT: import("bn.js"); +declare class TxDestination { + primary_addresses: Array; + constructor(data?: { + primaryaddresses?: Array; + }); + getAddressString(): void; + txgetByteLength(): number; + txtoBuffer(): Buffer; + txfromBuffer(buffer: any, offset?: number): number; +} +export declare class Principal extends TxDestination { + flags: BigNumber; + version: BigNumber; + min_sigs: BigNumber; + constructor(data?: { + version?: BigNumber | number; + flags?: BigNumber | number; + minimumsignatures?: BigNumber | number; + primaryaddresses?: Array; + }); + _dataByteLength(): number; + _toBuffer(): Buffer; + _fromBuffer(buffer: any, offset?: number): number; +} +export {}; diff --git a/dist/pbaas/Principal.js b/dist/pbaas/Principal.js new file mode 100644 index 0000000..dee538d --- /dev/null +++ b/dist/pbaas/Principal.js @@ -0,0 +1,112 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Principal = exports.VERSION_CURRENT = exports.VERSION_INVALID = void 0; +const varuint_1 = require("../utils/varuint"); +const bufferutils_1 = require("../utils/bufferutils"); +const address_1 = require("../utils/address"); +const vdxf_1 = require("../constants/vdxf"); +const bn_js_1 = require("bn.js"); +exports.VERSION_INVALID = new bn_js_1.BN(0, 10); +exports.VERSION_CURRENT = new bn_js_1.BN(1, 10); +const { BufferReader, BufferWriter } = bufferutils_1.default; +class TxDestination { + constructor(data = null) { + if (data != null) { + for (const tempAddr of data.primaryaddresses) { + let tempDecoded; + try { + let tempRaddress = (0, address_1.fromBase58Check)(tempAddr); + tempDecoded = tempRaddress.hash; + if (tempDecoded.length != 20 || tempRaddress.version != vdxf_1.R_ADDR_VERSION) + throw new Error("R address Error"); + } + catch (e) { + if (e.message === "R address Error") + throw new Error(e.message); + tempDecoded = Buffer.from(tempAddr, 'hex'); + if (tempDecoded.length != 33) + throw new Error("Incorrect hex length of pub key"); + } + this.primary_addresses = new Array; + this.primary_addresses.push(tempDecoded); + } + } + } + getAddressString() { + let retval = []; + for (const addr of this.primary_addresses) + if (addr.length == 20) { + retval.push((0, address_1.toBase58Check)(addr, vdxf_1.R_ADDR_VERSION)); + } + else if (addr.length == 33) { + retval.push(addr.toString('hex')); + } + else { + retval.push(""); + } + } + txgetByteLength() { + let byteLength = 0; + byteLength += varuint_1.default.encodingLength(this.primary_addresses.length); + for (const txDest of this.primary_addresses) { + byteLength += varuint_1.default.encodingLength(txDest.length); + byteLength += txDest.length; + } + return byteLength; + } + txtoBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.txgetByteLength())); + bufferWriter.writeVector(this.primary_addresses); + return bufferWriter.buffer; + } + txfromBuffer(buffer, offset = 0) { + const reader = new BufferReader(buffer, offset); + let count; + count = reader.readVarInt().toNumber(); + this.primary_addresses = new Array; + for (let i = 0; i < count; i++) { + this.primary_addresses.push(reader.readVarSlice()); + } + return reader.offset; + } +} +class Principal extends TxDestination { + constructor(data) { + super(data); + this.flags = exports.VERSION_INVALID; + this.version = exports.VERSION_INVALID; + if (data != null) { + if (data.flags != null) + this.flags = new bn_js_1.BN(data.flags); + if (data.version != null) + this.version = new bn_js_1.BN(data.version); + if (data.minimumsignatures != null) + this.min_sigs = new bn_js_1.BN(data.minimumsignatures); + } + } + _dataByteLength() { + let byteLength = 0; + byteLength += 4; //uint32 version size + byteLength += 4; //uint32 flags size + byteLength += this.txgetByteLength(); + byteLength += 4; //uint32 minimum signatures size + return byteLength; + } + _toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this._dataByteLength())); + bufferWriter.writeUInt32(this.version.toNumber()); + bufferWriter.writeUInt32(this.flags.toNumber()); + bufferWriter.writeSlice(this.txtoBuffer()); + bufferWriter.writeUInt32(this.min_sigs.toNumber()); + return bufferWriter.buffer; + } + _fromBuffer(buffer, offset = 0) { + const reader = new BufferReader(buffer, offset); + this.version = new bn_js_1.BN(reader.readUInt32(), 10); + this.flags = new bn_js_1.BN(reader.readUInt32(), 10); + reader.offset = this.txfromBuffer(reader.buffer, reader.offset); + this.min_sigs = new bn_js_1.BN(reader.readUInt32(), 10); + return reader.offset; + } +} +exports.Principal = Principal; diff --git a/dist/pbaas/index.d.ts b/dist/pbaas/index.d.ts index b665eda..809e8d4 100644 --- a/dist/pbaas/index.d.ts +++ b/dist/pbaas/index.d.ts @@ -1,4 +1,5 @@ export * from './CurrencyValueMap'; +export * from './Identity'; export * from './ReserveTransfer'; export * from './TokenOutput'; export * from './TransferDestination'; diff --git a/dist/pbaas/index.js b/dist/pbaas/index.js index 27f8ff8..a16a73b 100644 --- a/dist/pbaas/index.js +++ b/dist/pbaas/index.js @@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./CurrencyValueMap"), exports); +__exportStar(require("./Identity"), exports); __exportStar(require("./ReserveTransfer"), exports); __exportStar(require("./TokenOutput"), exports); __exportStar(require("./TransferDestination"), exports); diff --git a/dist/vdxf/classes/Challenge.d.ts b/dist/vdxf/classes/Challenge.d.ts index ad94a45..6c6fd78 100644 --- a/dist/vdxf/classes/Challenge.d.ts +++ b/dist/vdxf/classes/Challenge.d.ts @@ -80,9 +80,9 @@ export declare class Challenge extends VDXFObject implements ChallengeInterface }; } export interface AttestationRequestInterfaceDataInterface { - accepted_attestors: Array; - attestation_keys: Array; - attestor_filters: Array; + accepted_attestors: Array; + attestation_keys: Array; + attestor_filters?: Array; } export declare class AttestationRequest extends VDXFObject { data: AttestationRequestInterfaceDataInterface; @@ -102,7 +102,7 @@ export declare class AttestationRequest extends VDXFObject { export declare class RequestedPermission extends VDXFObject { data: string | AttestationRequestInterfaceDataInterface; encoding?: BufferEncoding; - constructor(data: string | AttestationRequestInterfaceDataInterface, vdxfkey?: string); + constructor(vdxfkey?: string, data?: string | AttestationRequestInterfaceDataInterface); addPrototypes(data: string | AttestationRequestInterfaceDataInterface): void; fromDataBuffer(buffer: Buffer, offset?: number): number; } diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index 9fb7a7d..beb9ecd 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -69,7 +69,7 @@ class Challenge extends __1.VDXFObject { constructor(challenge = { challenge_id: "", created_at: 0 }, vdxfkey = __1.LOGIN_CONSENT_CHALLENGE_VDXF_KEY.vdxfid) { super(vdxfkey); this.challenge_id = challenge.challenge_id; - this.requested_access = challenge.requested_access ? challenge.requested_access.map((x) => new RequestedPermission(x.data, x.vdxfkey)) : challenge.requested_access; + this.requested_access = challenge.requested_access ? challenge.requested_access.map((x) => new RequestedPermission(x.vdxfkey, x.data)) : challenge.requested_access; this.requested_access_audience = challenge.requested_access_audience; this.subject = challenge.subject ? challenge.subject.map((x) => new Subject(x.data, x.vdxfkey)) @@ -193,7 +193,7 @@ class Challenge extends __1.VDXFObject { const requestedAccessLength = reader.readCompactSize(); for (let i = 0; i < requestedAccessLength; i++) { const _vdxfkey = (0, address_1.toBase58Check)(reader.buffer.slice(reader.offset, reader.offset + vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION); - const _perm = new RequestedPermission("", _vdxfkey); + const _perm = new RequestedPermission(_vdxfkey, ""); reader.offset = _perm.fromBuffer(reader.buffer, reader.offset); this.requested_access.push(_perm); } @@ -288,12 +288,12 @@ class AttestationRequest extends __1.VDXFObject { reader.readVarInt(); //skip data length function readHash160Array(arr) { const length = reader.readVarInt(); - for (let i = 0; i < length; i++) { + for (let i = 0; i < length.toNumber(); i++) { const member = new Hash160_1.Hash160(); reader.offset = member.fromBuffer(reader.buffer, false, reader.offset); arr.push(member); } - if (length === 0) + if (length.toNumber() === 0) arr = []; } readHash160Array(this.data.accepted_attestors); @@ -324,16 +324,16 @@ class AttestationRequest extends __1.VDXFObject { return { vdxfkey: this.vdxfkey, data: { - accepted_attestors: (accepted_attestors === null || accepted_attestors === void 0 ? void 0 : accepted_attestors.map(x => x.toAddress())) || [], - attestation_keys: (attestation_keys === null || attestation_keys === void 0 ? void 0 : attestation_keys.map(x => x.toAddress())) || [], - attestor_filters: (attestor_filters === null || attestor_filters === void 0 ? void 0 : attestor_filters.map(x => x.toAddress())) || [] + accepted_attestors: (accepted_attestors === null || accepted_attestors === void 0 ? void 0 : accepted_attestors.map((x) => x.toAddress())) || [], + attestation_keys: (attestation_keys === null || attestation_keys === void 0 ? void 0 : attestation_keys.map((x) => x.toAddress())) || [], + attestor_filters: (attestor_filters === null || attestor_filters === void 0 ? void 0 : attestor_filters.map((x) => x.toAddress())) || [] } }; } } exports.AttestationRequest = AttestationRequest; class RequestedPermission extends __1.VDXFObject { - constructor(data, vdxfkey = "") { + constructor(vdxfkey = "", data = "") { super(vdxfkey); if (vdxfkey) this.addPrototypes(data); diff --git a/dist/vdxf/index.js b/dist/vdxf/index.js index deffca9..88ed28e 100644 --- a/dist/vdxf/index.js +++ b/dist/vdxf/index.js @@ -72,9 +72,7 @@ class VDXFObject { const writer = new bufferutils_1.default.BufferWriter(buffer); writer.writeSlice(key.hash); writer.writeVarInt(new bn_js_1.BN(this.version, 10)); - if (dataLength) { - writer.writeVarSlice(this.toDataBuffer()); - } + writer.writeVarSlice(this.toDataBuffer()); return writer.buffer; } toSha256() { diff --git a/package.json b/package.json index 32ab27a..83f2a76 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "@types/bs58check": "2.1.0", "@types/create-hash": "1.2.2", "@types/jest": "28.1.6", - "@types/node": "^18.7.22", + "@types/node": "18.7.22", "@typescript-eslint/eslint-plugin": "5.30.7", "@typescript-eslint/parser": "5.30.7", "eslint": "8.20.0", diff --git a/src/__tests__/vdxf/loginconsent.test.ts b/src/__tests__/vdxf/loginconsent.test.ts index 8542c8e..30f4347 100644 --- a/src/__tests__/vdxf/loginconsent.test.ts +++ b/src/__tests__/vdxf/loginconsent.test.ts @@ -1,5 +1,5 @@ import { Hash160 } from "../../vdxf/classes/Hash160"; -import { IDENTITY_NAME_COMMITMENT_TXID, IDENTITY_REGISTRATION_TXID, IDENTITY_VIEW, ID_ADDRESS_VDXF_KEY, ID_FULLYQUALIFIEDNAME_VDXF_KEY, ID_PARENT_VDXF_KEY, ID_SYSTEMID_VDXF_KEY, LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY, LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN, LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL, LOGIN_CONSENT_REDIRECT_VDXF_KEY } from "../../vdxf"; +import { ATTESTATION_READ_REQUEST, IDENTITY_NAME_COMMITMENT_TXID, IDENTITY_REGISTRATION_TXID, IDENTITY_VIEW, ID_ADDRESS_VDXF_KEY, ID_FULLYQUALIFIEDNAME_VDXF_KEY, ID_PARENT_VDXF_KEY, ID_SYSTEMID_VDXF_KEY, LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY, LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN, LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL, LOGIN_CONSENT_REDIRECT_VDXF_KEY } from "../../vdxf"; import { LoginConsentRequest, LoginConsentResponse } from "../../vdxf/classes"; import { ProvisioningInfo, RedirectUri, RequestedPermission, Subject } from "../../vdxf/classes/Challenge"; import { Context } from "../../vdxf/classes/Context"; @@ -18,7 +18,7 @@ describe('Serializes and deserializes signature objects properly', () => { }, challenge: { challenge_id: "iKNufKJdLX3Xg8qFru9AuLBvivAEJ88PW4", - requested_access: [new RequestedPermission("",IDENTITY_VIEW.vdxfid)], + requested_access: [new RequestedPermission(IDENTITY_VIEW.vdxfid)], subject: [ new Subject( "fully.qualified.name", @@ -215,4 +215,70 @@ describe('Serializes and deserializes signature objects properly', () => { expect(_res.getDecisionHash(10000).toString('hex')).toBe(res.getDecisionHash(10000).toString('hex')) expect(_req.getChallengeHash().toString('hex')).toBe(req.getChallengeHash().toString('hex')) }); + + test('attestation request', async () => { + const req = new LoginConsentRequest({ + system_id: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + signing_id: "iB5PRXMHLYcNtM8dfLB6KwfJrHU2mKDYuU", + signature: { + signature: + "AYG2IQABQSAN1fp6A9NIVbxvKuOVLLU+0I+G3oQGbRtS6u4Eampfb217Cdf5FCMScQhV9kMxtjI9GWzpchmjuiTB2tctk6qT", + }, + challenge: { + challenge_id: "iKNufKJdLX3Xg8qFru9AuLBvivAEJ88PW4", + requested_access: [new RequestedPermission(IDENTITY_VIEW.vdxfid), + new RequestedPermission( ATTESTATION_READ_REQUEST.vdxfid, {accepted_attestors:["iC9x9VZ2XMop7spFzeXqSKX8WqmrG9cu41"], attestation_keys:["iSSxdyTcCp8VALGBGKy8R7ATYSRuK15NkL","i3jWsqLVnYyJu78E7mw6pbD3TazwZJpuk4","i9MRw6YUhXtP6DT8eufGnB5oRQ34TjDsdb","iJvFSXk2EDeEu9BkJQSwAVeiochF6AYpfF"]})], + session_id: "iRQZGW36o3RcVR1xyVT1qWdAKdxp3wUyrh", + redirect_uris: [ + new RedirectUri( + "https://www.verus.io", + LOGIN_CONSENT_REDIRECT_VDXF_KEY.vdxfid + ), + ], + created_at: 1664382484, + salt: "i6NawEzHMocZnU4h8pPkGpHApvsrHjxwXE", + context: new Context({ + ["i4KyLCxWZXeSkw15dF95CUKytEK3HU7em9"]: "test", + }), + }, + }); + + const res = new LoginConsentResponse({ + system_id: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + signing_id: "iB5PRXMHLYcNtM8dfLB6KwfJrHU2mKDYuU", + signature: { + signature: + "AYG2IQABQSAN1fp6A9NIVbxvKuOVLLU+0I+G3oQGbRtS6u4Eampfb217Cdf5FCMScQhV9kMxtjI9GWzpchmjuiTB2tctk6qT", + }, + decision: { + decision_id: "iBTMBHzDbsW3QG1MLBoYtmo6c1xuzn6xxb", + context: new Context({ + ["i4KyLCxWZXeSkw15dF95CUKytEK3HU7em9"]: "test", + }), + request: req, + created_at: 1664392484 + } + }) + + const reqbuf = req.toBuffer() + const _req = new LoginConsentRequest() + _req.fromBuffer(reqbuf) + + const resbuf = res.toBuffer() + const _res = new LoginConsentResponse() + _res.fromBuffer(resbuf) + + + expect(_res.toBuffer().toString('hex')).toBe(resbuf.toString('hex')); + expect(_req.toBuffer().toString('hex')).toBe(reqbuf.toString('hex')); + + expect(_res.getDecisionHash(10000, 1).toString('hex')).toBe(res.getDecisionHash(10000, 1).toString('hex')) + expect(_req.getChallengeHash(10000, 1).toString('hex')).toBe(req.getChallengeHash(10000, 1).toString('hex')) + expect(_res.getDecisionHash(10000, 2).toString('hex')).toBe(res.getDecisionHash(10000, 2).toString('hex')) + expect(_req.getChallengeHash(10000, 2).toString('hex')).toBe(req.getChallengeHash(10000, 2).toString('hex')) + + const uri = _req.toWalletDeeplinkUri() + + expect(uri).toBe(LoginConsentRequest.fromWalletDeeplinkUri(uri).toWalletDeeplinkUri()); + }); }); diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index 389a77c..682758b 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -146,7 +146,7 @@ export class Challenge extends VDXFObject implements ChallengeInterface { super(vdxfkey); this.challenge_id = challenge.challenge_id; - this.requested_access = challenge.requested_access ? challenge.requested_access.map((x) => new RequestedPermission(x.data, x.vdxfkey)) : challenge.requested_access; + this.requested_access = challenge.requested_access ? challenge.requested_access.map((x) => new RequestedPermission(x.vdxfkey,x.data)) : challenge.requested_access; this.requested_access_audience = challenge.requested_access_audience; this.subject = challenge.subject ? challenge.subject.map((x) => new Subject(x.data, x.vdxfkey)) @@ -335,7 +335,7 @@ export class Challenge extends VDXFObject implements ChallengeInterface { const _vdxfkey = toBase58Check(reader.buffer.slice(reader.offset, reader.offset + HASH160_BYTE_LENGTH), I_ADDR_VERSION); - const _perm = new RequestedPermission("", _vdxfkey); + const _perm = new RequestedPermission(_vdxfkey,""); reader.offset = _perm.fromBuffer(reader.buffer, reader.offset); this.requested_access.push(_perm); } @@ -425,9 +425,9 @@ export class Challenge extends VDXFObject implements ChallengeInterface { } export interface AttestationRequestInterfaceDataInterface { - accepted_attestors: Array, - attestation_keys: Array, - attestor_filters: Array + accepted_attestors: Array, + attestation_keys: Array, + attestor_filters?: Array } export class AttestationRequest extends VDXFObject { data: AttestationRequestInterfaceDataInterface; @@ -436,11 +436,11 @@ export class AttestationRequest extends VDXFObject { let length = 0; length += varuint.encodingLength(this.data.accepted_attestors?.length ?? 0); - length += this.data.accepted_attestors?.reduce((sum, current) => sum + current.byteLength(), 0) ?? 0; + length += this.data.accepted_attestors?.reduce((sum, current: Hash160) => sum + current.byteLength(), 0) ?? 0; length += varuint.encodingLength(this.data.attestation_keys?.length ?? 0); - length += this.data.attestation_keys?.reduce((sum, current) => sum + current.byteLength(), 0) ?? 0; + length += this.data.attestation_keys?.reduce((sum, current: Hash160) => sum + current.byteLength(), 0) ?? 0; length += varuint.encodingLength(this.data.attestor_filters?.length ?? 0); - length += this.data.attestor_filters?.reduce((sum, current) => sum + current.byteLength(), 0) ?? 0; + length += this.data.attestor_filters?.reduce((sum, current: Hash160) => sum + current.byteLength(), 0) ?? 0; return length; } @@ -449,9 +449,9 @@ export class AttestationRequest extends VDXFObject { const writer = new bufferutils.BufferWriter(Buffer.alloc(this.dataByteLength())) - writer.writeArray(this.data.accepted_attestors.map((x) => x.toBuffer())); - writer.writeArray(this.data.attestation_keys.map((x) => x.toBuffer())); - writer.writeArray(this.data.attestor_filters.map((x) => x.toBuffer())); + writer.writeArray(this.data.accepted_attestors.map((x: Hash160) => x.toBuffer())); + writer.writeArray(this.data.attestation_keys.map((x: Hash160) => x.toBuffer())); + writer.writeArray(this.data.attestor_filters.map((x: Hash160) => x.toBuffer())); return writer.buffer; } @@ -461,7 +461,7 @@ export class AttestationRequest extends VDXFObject { const reader = new bufferutils.BufferReader(buffer, offset); reader.readVarInt(); //skip data length - function readHash160Array(arr: Hash160[]): void { + function readHash160Array(arr: (Hash160 | string)[]): void { const length = reader.readVarInt(); for (let i = 0; i < length.toNumber(); i++) { const member = new Hash160(); @@ -501,9 +501,9 @@ export class AttestationRequest extends VDXFObject { return { vdxfkey: this.vdxfkey, data: { - accepted_attestors: accepted_attestors?.map(x => x.toAddress()) || [], - attestation_keys: attestation_keys?.map(x => x.toAddress()) || [], - attestor_filters: attestor_filters?.map(x => x.toAddress()) || [] + accepted_attestors: accepted_attestors?.map((x: Hash160) => x.toAddress()) || [], + attestation_keys: attestation_keys?.map((x: Hash160) => x.toAddress()) || [], + attestor_filters: attestor_filters?.map((x: Hash160) => x.toAddress()) || [] } }; } @@ -513,7 +513,7 @@ export class AttestationRequest extends VDXFObject { export class RequestedPermission extends VDXFObject { data: string | AttestationRequestInterfaceDataInterface; encoding?: BufferEncoding; - constructor(data: string | AttestationRequestInterfaceDataInterface, vdxfkey: string = "") { + constructor(vdxfkey: string = "", data: string | AttestationRequestInterfaceDataInterface = "") { super(vdxfkey); if (vdxfkey) this.addPrototypes(data); } diff --git a/src/vdxf/index.ts b/src/vdxf/index.ts index 9a9f2f7..eb7d615 100644 --- a/src/vdxf/index.ts +++ b/src/vdxf/index.ts @@ -157,7 +157,7 @@ export class Utf8OrBase58Object extends VDXFObject { data: string; // VDXF keys that would cause this object to be base58 instead of utf8 - base58Keys: { [key: string]: boolean } = {}; + base58Keys: {[key: string]: boolean} = {}; constructor(data: string = "", vdxfkey: string = "", base58Keys: Array = []) { super(vdxfkey); @@ -245,5 +245,4 @@ export class VerusIDSignature extends VDXFObject { signature: this.signature, }; } -} - +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index b819dda..a8d20d0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -717,10 +717,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-20.3.1.tgz#e8a83f1aa8b649377bb1fb5d7bac5cb90e784dfe" integrity sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg== -"@types/node@^18.7.22": - version "18.16.18" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.16.18.tgz#85da09bafb66d4bc14f7c899185336d0c1736390" - integrity sha512-/aNaQZD0+iSBAGnvvN2Cx92HqE5sZCPZtx2TsK+4nvV23fFe09jVDvpArXr2j9DnYlzuU9WuoykDDc6wqvpNcw== +"@types/node@18.7.22": + version "18.7.22" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.22.tgz#76f7401362ad63d9d7eefa7dcdfa5fcd9baddff3" + integrity sha512-TsmoXYd4zrkkKjJB0URF/mTIKPl+kVcbqClB2F/ykU7vil1BfWZVndOnpEIozPv4fURD28gyPFeIkW2G+KXOvw== "@types/prettier@^2.1.5": version "2.7.3" From cd4c2363d35039ad28a9ee35b1087d6aa0ecdbfe Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Wed, 28 Jun 2023 09:36:29 +0100 Subject: [PATCH 028/120] Partial build of attestation class for review --- dist/vdxf/classes/Attestation.d.ts | 23 +++++ dist/vdxf/classes/Attestation.js | 10 +++ dist/vdxf/classes/Challenge.d.ts | 4 +- dist/vdxf/classes/Challenge.js | 13 +-- dist/vdxf/classes/Decision.d.ts | 2 +- dist/vdxf/classes/Decision.js | 6 +- dist/vdxf/classes/Request.d.ts | 2 +- dist/vdxf/classes/Response.d.ts | 2 +- dist/vdxf/classes/index.d.ts | 3 +- dist/vdxf/classes/index.js | 3 +- dist/vdxf/keys.d.ts | 1 + dist/vdxf/keys.js | 52 +++++++++++- src/__tests__/attestation/attestation.test.ts | 83 +++++++++++++++++++ src/vdxf/classes/Attestation.ts | 35 ++++++++ src/vdxf/classes/Challenge.ts | 7 +- src/vdxf/classes/Decision.ts | 2 +- src/vdxf/classes/index.ts | 2 +- src/vdxf/keys.ts | 67 +++++++++++++-- 18 files changed, 283 insertions(+), 34 deletions(-) create mode 100644 dist/vdxf/classes/Attestation.d.ts create mode 100644 dist/vdxf/classes/Attestation.js create mode 100644 src/__tests__/attestation/attestation.test.ts create mode 100644 src/vdxf/classes/Attestation.ts diff --git a/dist/vdxf/classes/Attestation.d.ts b/dist/vdxf/classes/Attestation.d.ts new file mode 100644 index 0000000..44d4434 --- /dev/null +++ b/dist/vdxf/classes/Attestation.d.ts @@ -0,0 +1,23 @@ +import { VDXFObject } from "../"; +export interface MerkleBranch { + nIndex?: number; + branch?: Array; +} +export interface AttestationData extends VDXFObject { + type?: number; + key?: string; + salt?: string; + value?: string; + hash?: string; +} +export interface AttestationSignature extends VDXFObject { + signatures: Array; + attestors: Array; +} +export declare class Attestation extends VDXFObject { + type: number; + branch: MerkleBranch; + components: Array; + proof: AttestationSignature; + constructor(vdxfkey?: string); +} diff --git a/dist/vdxf/classes/Attestation.js b/dist/vdxf/classes/Attestation.js new file mode 100644 index 0000000..27d0e3d --- /dev/null +++ b/dist/vdxf/classes/Attestation.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Attestation = void 0; +const __1 = require("../"); +class Attestation extends __1.VDXFObject { + constructor(vdxfkey = "") { + super(vdxfkey); + } +} +exports.Attestation = Attestation; diff --git a/dist/vdxf/classes/Challenge.d.ts b/dist/vdxf/classes/Challenge.d.ts index 6c6fd78..32a4e4f 100644 --- a/dist/vdxf/classes/Challenge.d.ts +++ b/dist/vdxf/classes/Challenge.d.ts @@ -2,6 +2,7 @@ import { Utf8DataVdxfObject, VDXFObject, Utf8OrBase58Object } from "../"; import { Context } from "./Context"; import { Hash160 } from "./Hash160"; +import { Attestation } from "./Attestation"; export declare class RedirectUri extends VDXFObject { uri: string; constructor(uri?: string, vdxfkey?: string); @@ -23,9 +24,6 @@ export declare class Audience extends Utf8DataVdxfObject { } export declare class AltAuthFactor extends Utf8DataVdxfObject { } -export declare class Attestation extends Utf8DataVdxfObject { - constructor(data?: string, vdxfkey?: string); -} export interface ChallengeInterface { challenge_id: string; requested_access?: Array | null; diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index beb9ecd..abe6c59 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -1,11 +1,12 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.RequestedPermission = exports.AttestationRequest = exports.Challenge = exports.Attestation = exports.AltAuthFactor = exports.Audience = exports.ProvisioningInfo = exports.Subject = exports.RedirectUri = void 0; +exports.RequestedPermission = exports.AttestationRequest = exports.Challenge = exports.AltAuthFactor = exports.Audience = exports.ProvisioningInfo = exports.Subject = exports.RedirectUri = void 0; const __1 = require("../"); const bufferutils_1 = require("../../utils/bufferutils"); const varuint_1 = require("../../utils/varuint"); const Context_1 = require("./Context"); const Hash160_1 = require("./Hash160"); +const Attestation_1 = require("./Attestation"); const address_1 = require("../../utils/address"); const vdxf_1 = require("../../constants/vdxf"); const index_1 = require("../index"); @@ -59,12 +60,6 @@ exports.Audience = Audience; class AltAuthFactor extends __1.Utf8DataVdxfObject { } exports.AltAuthFactor = AltAuthFactor; -class Attestation extends __1.Utf8DataVdxfObject { - constructor(data = "", vdxfkey = "") { - super(data, vdxfkey); - } -} -exports.Attestation = Attestation; class Challenge extends __1.VDXFObject { constructor(challenge = { challenge_id: "", created_at: 0 }, vdxfkey = __1.LOGIN_CONSENT_CHALLENGE_VDXF_KEY.vdxfid) { super(vdxfkey); @@ -79,7 +74,7 @@ class Challenge extends __1.VDXFObject { : challenge.provisioning_info; this.alt_auth_factors = challenge.alt_auth_factors; this.session_id = challenge.session_id; - this.attestations = challenge.attestations ? challenge.attestations.map((x) => new Attestation(x.data, x.vdxfkey)) : challenge.attestations; + this.attestations = challenge.attestations ? challenge.attestations.map((x) => new Attestation_1.Attestation(x.data, x.vdxfkey)) : challenge.attestations; this.redirect_uris = challenge.redirect_uris ? challenge.redirect_uris.map((x) => new RedirectUri(x.uri, x.vdxfkey)) : challenge.redirect_uris; @@ -224,7 +219,7 @@ class Challenge extends __1.VDXFObject { this.attestations = []; const attestationsLength = reader.readCompactSize(); for (let i = 0; i < attestationsLength; i++) { - const _att = new Attestation(); + const _att = new Attestation_1.Attestation(); reader.offset = _att.fromBuffer(reader.buffer, reader.offset); this.attestations.push(_att); } diff --git a/dist/vdxf/classes/Decision.d.ts b/dist/vdxf/classes/Decision.d.ts index 1de7574..35611f5 100644 --- a/dist/vdxf/classes/Decision.d.ts +++ b/dist/vdxf/classes/Decision.d.ts @@ -1,6 +1,6 @@ /// import { VDXFObject } from ".."; -import { Attestation } from "./Challenge"; +import { Attestation } from "./Attestation"; import { Context } from "./Context"; import { Request, RequestInterface } from "./Request"; export interface DecisionInterface { diff --git a/dist/vdxf/classes/Decision.js b/dist/vdxf/classes/Decision.js index e5bee83..70dd193 100644 --- a/dist/vdxf/classes/Decision.js +++ b/dist/vdxf/classes/Decision.js @@ -4,7 +4,7 @@ exports.Decision = void 0; const __1 = require(".."); const bufferutils_1 = require("../../utils/bufferutils"); const varuint_1 = require("../../utils/varuint"); -const Challenge_1 = require("./Challenge"); +const Attestation_1 = require("./Attestation"); const Context_1 = require("./Context"); const Hash160_1 = require("./Hash160"); const Request_1 = require("./Request"); @@ -19,7 +19,7 @@ class Decision extends __1.VDXFObject { this.request = new Request_1.Request(decision.request); this.context = decision.context; this.created_at = decision.created_at; - this.attestations = decision.attestations ? decision.attestations.map((x) => new Challenge_1.Attestation(x.data, x.vdxfkey)) : decision.attestations; + this.attestations = decision.attestations ? decision.attestations.map((x) => new Attestation_1.Attestation(x.data, x.vdxfkey)) : decision.attestations; this.salt = decision.salt; this.skipped = decision.skipped ? true : false; } @@ -85,7 +85,7 @@ class Decision extends __1.VDXFObject { this.attestations = []; const attestationsLength = reader.readCompactSize(); for (let i = 0; i < attestationsLength; i++) { - const _att = new Challenge_1.Attestation(); + const _att = new Attestation_1.Attestation(); reader.offset = _att.fromBuffer(reader.buffer, reader.offset); this.attestations.push(_att); } diff --git a/dist/vdxf/classes/Request.d.ts b/dist/vdxf/classes/Request.d.ts index a744c0c..b680f8b 100644 --- a/dist/vdxf/classes/Request.d.ts +++ b/dist/vdxf/classes/Request.d.ts @@ -31,7 +31,7 @@ export declare class Request extends VDXFObject { provisioning_info: import("./Challenge").ProvisioningInfo[]; alt_auth_factors: import("./Challenge").AltAuthFactor[]; session_id: string; - attestations: import("./Challenge").Attestation[]; + attestations: import("./Attestation").Attestation[]; redirect_uris: { uri: string; vdxfkey: string; diff --git a/dist/vdxf/classes/Response.d.ts b/dist/vdxf/classes/Response.d.ts index 6abd7ef..6bb3c29 100644 --- a/dist/vdxf/classes/Response.d.ts +++ b/dist/vdxf/classes/Response.d.ts @@ -49,7 +49,7 @@ export declare class Response extends VDXFObject { provisioning_info: import("./Challenge").ProvisioningInfo[]; alt_auth_factors: import("./Challenge").AltAuthFactor[]; session_id: string; - attestations: import("./Challenge").Attestation[]; + attestations: import("./Attestation").Attestation[]; redirect_uris: { uri: string; vdxfkey: string; diff --git a/dist/vdxf/classes/index.d.ts b/dist/vdxf/classes/index.d.ts index db320de..a027d57 100644 --- a/dist/vdxf/classes/index.d.ts +++ b/dist/vdxf/classes/index.d.ts @@ -19,6 +19,7 @@ export { ProvisioningResponseInterface as LoginConsentProvisioningResponseInterf export { ProvisioningDecisionInterface as LoginConsentProvisioningDecisionInterface } from "./provisioning/ProvisioningDecision"; export { ProvisioningResultInterface as LoginConsentProvisioningResultInterface } from "./provisioning/ProvisioningResult"; export { Hash160 } from './Hash160'; -export { RedirectUri, Subject, ProvisioningInfo, RequestedPermission, Audience, AltAuthFactor, Attestation, } from "./Challenge"; +export { RedirectUri, Subject, ProvisioningInfo, RequestedPermission, Audience, AltAuthFactor, } from "./Challenge"; +export { Attestation } from './Attestation'; export { ProvisioningTxid } from './provisioning/ProvisioningResult'; export { Context } from './Context'; diff --git a/dist/vdxf/classes/index.js b/dist/vdxf/classes/index.js index dfadffd..459681c 100644 --- a/dist/vdxf/classes/index.js +++ b/dist/vdxf/classes/index.js @@ -32,7 +32,8 @@ Object.defineProperty(exports, "ProvisioningInfo", { enumerable: true, get: func Object.defineProperty(exports, "RequestedPermission", { enumerable: true, get: function () { return Challenge_2.RequestedPermission; } }); Object.defineProperty(exports, "Audience", { enumerable: true, get: function () { return Challenge_2.Audience; } }); Object.defineProperty(exports, "AltAuthFactor", { enumerable: true, get: function () { return Challenge_2.AltAuthFactor; } }); -Object.defineProperty(exports, "Attestation", { enumerable: true, get: function () { return Challenge_2.Attestation; } }); +var Attestation_1 = require("./Attestation"); +Object.defineProperty(exports, "Attestation", { enumerable: true, get: function () { return Attestation_1.Attestation; } }); var ProvisioningResult_2 = require("./provisioning/ProvisioningResult"); Object.defineProperty(exports, "ProvisioningTxid", { enumerable: true, get: function () { return ProvisioningResult_2.ProvisioningTxid; } }); var Context_1 = require("./Context"); diff --git a/dist/vdxf/keys.d.ts b/dist/vdxf/keys.d.ts index 98a6e57..eb6412c 100644 --- a/dist/vdxf/keys.d.ts +++ b/dist/vdxf/keys.d.ts @@ -41,3 +41,4 @@ export declare const LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED: VDXFK export declare const SIGNED_SESSION_OBJECT_DATA: VDXFKeyInterface; export declare const SIGNED_SESSION_OBJECT: VDXFKeyInterface; export declare const CURRENCY_ADDRESS: VDXFKeyInterface; +export declare const ATTESTATION_IDENTITY_DATA: {}; diff --git a/dist/vdxf/keys.js b/dist/vdxf/keys.js index 9e7d3f4..d41e45d 100644 --- a/dist/vdxf/keys.js +++ b/dist/vdxf/keys.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_SIG_VDXF_KEY = void 0; +exports.ATTESTATION_IDENTITY_DATA = exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_SIG_VDXF_KEY = void 0; exports.LOGIN_CONSENT_REQUEST_SIG_VDXF_KEY = { vdxfid: "iPi1DPgDDu7hP1mAp5xJ8rHBWwXSzc6yA8", hash160result: "06d4b963da3dcf17f00905b0720f7a4c241defdd", @@ -281,3 +281,53 @@ exports.CURRENCY_ADDRESS = { "name": "vrsc::currency.address" } }; +const IDENTITY_DATA = [ + { + "vdxfid": "iSSxdyTcCp8VALGBGKy8R7ATYSRuK15NkL", + "hash160result": "92cb346dd5c5886898a7ebcab6a0e4dded19fffb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestations.identitydata.firstname" + }, + "detail": "First Name" + }, + { + "vdxfid": "i3jWsqLVnYyJu78E7mw6pbD3TazwZJpuk4", + "hash160result": "03d10a9768234e11d4cc2f73238cad4e7fc6d502", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestations.identitydata.lastname" + }, + "detail": "Last Name" + }, + { + "vdxfid": "i9MRw6YUhXtP6DT8eufGnB5oRQ34TjDsdb", + "hash160result": "c886a8db81a891f9fc017001b6f6949588407940", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestations.identitydata.attestor" + }, + "detail": "Attestor" + }, + { + "vdxfid": "iJvFSXk2EDeEu9BkJQSwAVeiochF6AYpfF", + "hash160result": "cac8e0c062de7abf4fd0a606c2b83eea275a67a9", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestations.identitydata.identity" + }, + "detail": "Identity" + }, + { + "vdxfid": "iLY58rsr39UB8BptNGYX63qPhcpv5N5yuC", + "hash160result": "ab812395536444a22463318c2691e886c6d925bb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestations.type" + }, + "detail": "Document Type" + } +]; +exports.ATTESTATION_IDENTITY_DATA = {}; +IDENTITY_DATA.forEach((item) => exports.ATTESTATION_IDENTITY_DATA[item.vdxfid] = item); +IDENTITY_DATA.forEach((item) => exports.ATTESTATION_IDENTITY_DATA[item.detail] = item); diff --git a/src/__tests__/attestation/attestation.test.ts b/src/__tests__/attestation/attestation.test.ts new file mode 100644 index 0000000..dcef5f7 --- /dev/null +++ b/src/__tests__/attestation/attestation.test.ts @@ -0,0 +1,83 @@ +import { Hash160 } from "../../vdxf/classes/Hash160"; +import { ATTESTATION_READ_REQUEST, IDENTITY_NAME_COMMITMENT_TXID, IDENTITY_REGISTRATION_TXID, IDENTITY_VIEW, ATTESTATION_IDENTITY_DATA, LOGIN_CONSENT_REDIRECT_VDXF_KEY } from "../../vdxf"; +import { Attestation, LoginConsentRequest, LoginConsentResponse } from "../../vdxf/classes"; +import { ProvisioningInfo, RedirectUri, RequestedPermission, Subject } from "../../vdxf/classes/Challenge"; +import { Context } from "../../vdxf/classes/Context"; +import { ProvisioningRequest } from "../../vdxf/classes/provisioning/ProvisioningRequest"; +import { ProvisioningResponse } from "../../vdxf/classes/provisioning/ProvisioningResponse"; +import { ProvisioningResult, ProvisioningTxid } from "../../vdxf/classes/provisioning/ProvisioningResult"; + +describe('Serializes and deserializes attestation request', () => { + test('attestation request with reply', async () => { + const req = new LoginConsentRequest({ + system_id: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + signing_id: "iB5PRXMHLYcNtM8dfLB6KwfJrHU2mKDYuU", + signature: { + signature: + "AYG2IQABQSAN1fp6A9NIVbxvKuOVLLU+0I+G3oQGbRtS6u4Eampfb217Cdf5FCMScQhV9kMxtjI9GWzpchmjuiTB2tctk6qT", + }, + challenge: { + challenge_id: "iKNufKJdLX3Xg8qFru9AuLBvivAEJ88PW4", + requested_access: [new RequestedPermission(IDENTITY_VIEW.vdxfid), + new RequestedPermission( ATTESTATION_READ_REQUEST.vdxfid, {accepted_attestors:["iC9x9VZ2XMop7spFzeXqSKX8WqmrG9cu41"], + attestation_keys:[ + ATTESTATION_IDENTITY_DATA["First Name"].vdxfid, + ATTESTATION_IDENTITY_DATA["Last Name"].vdxfid, + ATTESTATION_IDENTITY_DATA["Attestor"].vdxfid, + ATTESTATION_IDENTITY_DATA["Identity"].vdxfid, + ATTESTATION_IDENTITY_DATA["Document Type"].vdxfid] + })], + session_id: "iRQZGW36o3RcVR1xyVT1qWdAKdxp3wUyrh", + redirect_uris: [ + new RedirectUri( + "https://www.verus.io", + LOGIN_CONSENT_REDIRECT_VDXF_KEY.vdxfid + ), + ], + created_at: 1664382484, + salt: "i6NawEzHMocZnU4h8pPkGpHApvsrHjxwXE", + context: new Context({ + ["i4KyLCxWZXeSkw15dF95CUKytEK3HU7em9"]: "test", + }), + }, + }); + + const test = {"firstname": "John", "lastname": "Doe", + "identity":"jdoe123@", + "attestor": "valu attestation@", + "type":"simple name attestation v1" } + + const attestationResponse = new Attestation({data: {type: SIMPLE_ATTESTATION, components: {} }}); + + const res = new LoginConsentResponse({ + system_id: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + signing_id: "iB5PRXMHLYcNtM8dfLB6KwfJrHU2mKDYuU", + signature: { + signature: + "AYG2IQABQSAN1fp6A9NIVbxvKuOVLLU+0I+G3oQGbRtS6u4Eampfb217Cdf5FCMScQhV9kMxtjI9GWzpchmjuiTB2tctk6qT", + }, + decision: { + decision_id: "iBTMBHzDbsW3QG1MLBoYtmo6c1xuzn6xxb", + context: new Context({ + ["i4KyLCxWZXeSkw15dF95CUKytEK3HU7em9"]: "test", + }), + request: req, + created_at: 1664392484 + } + }) + + const reqbuf = req.toBuffer() + const _req = new LoginConsentRequest() + _req.fromBuffer(reqbuf) + + const resbuf = res.toBuffer() + const _res = new LoginConsentResponse() + _res.fromBuffer(resbuf) + + const uri = _req.toWalletDeeplinkUri() + + expect(uri).toBe(LoginConsentRequest.fromWalletDeeplinkUri(uri).toWalletDeeplinkUri()); + }); + + +}); diff --git a/src/vdxf/classes/Attestation.ts b/src/vdxf/classes/Attestation.ts new file mode 100644 index 0000000..e8e1f94 --- /dev/null +++ b/src/vdxf/classes/Attestation.ts @@ -0,0 +1,35 @@ +import { + ATTESTATION_IDENTITY_DATA, + Utf8DataVdxfObject, + VDXFObject + } from "../"; + +export interface MerkleBranch { + nIndex?: number; + branch?: Array; +} + +export interface AttestationData extends VDXFObject { + type?: number; + key?: string; + salt?: string; + value?: string; + hash?: string; +} + +export interface AttestationSignature extends VDXFObject { + signatures: Array; + attestors: Array; +} + +export class Attestation extends VDXFObject { + type: number; + branch: MerkleBranch; + components: Array; + proof: AttestationSignature; + + constructor(vdxfkey: string = "") { + super(vdxfkey); + } + } + diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index 682758b..e87d72f 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -14,6 +14,7 @@ import bufferutils from "../../utils/bufferutils"; import varuint from "../../utils/varuint"; import { Context } from "./Context"; import { Hash160 } from "./Hash160"; +import { Attestation } from "./Attestation"; import { fromBase58Check, toBase58Check } from '../../utils/address'; import { DEFAULT_VERSION, HASH160_BYTE_LENGTH, I_ADDR_VERSION } from '../../constants/vdxf'; import { BufferDataVdxfObject } from '../index' @@ -74,12 +75,6 @@ export class Audience extends Utf8DataVdxfObject { } export class AltAuthFactor extends Utf8DataVdxfObject { } -export class Attestation extends Utf8DataVdxfObject { - constructor(data: string = "", vdxfkey: string = "") { - super(data, vdxfkey); - } -} - export interface ChallengeInterface { // Challenge specific VDXF key challenge_id: string; diff --git a/src/vdxf/classes/Decision.ts b/src/vdxf/classes/Decision.ts index af1a5aa..3fb597d 100644 --- a/src/vdxf/classes/Decision.ts +++ b/src/vdxf/classes/Decision.ts @@ -1,7 +1,7 @@ import { LOGIN_CONSENT_DECISION_VDXF_KEY, VDXFObject } from ".."; import bufferutils from "../../utils/bufferutils"; import varuint from "../../utils/varuint"; -import { Attestation } from "./Challenge"; +import { Attestation } from "./Attestation"; import { Context } from "./Context"; import { Hash160 } from "./Hash160"; import { Request, RequestInterface } from "./Request"; diff --git a/src/vdxf/classes/index.ts b/src/vdxf/classes/index.ts index 3cec641..54cc144 100644 --- a/src/vdxf/classes/index.ts +++ b/src/vdxf/classes/index.ts @@ -29,8 +29,8 @@ export { RequestedPermission, Audience, AltAuthFactor, - Attestation, } from "./Challenge"; +export {Attestation } from './Attestation' export { ProvisioningTxid } from './provisioning/ProvisioningResult' diff --git a/src/vdxf/keys.ts b/src/vdxf/keys.ts index 9cdbb9c..8edfc6f 100644 --- a/src/vdxf/keys.ts +++ b/src/vdxf/keys.ts @@ -323,10 +323,67 @@ export const SIGNED_SESSION_OBJECT: VDXFKeyInterface = { }; export const CURRENCY_ADDRESS: VDXFKeyInterface = { - "vdxfid":"iBy2s9cQL9RadMVPjog6bbSV5ityBxTuNR", - "hash160result":"4fb4c86b8ce18e596e28f62bc9a78f43d738255d", + "vdxfid": "iBy2s9cQL9RadMVPjog6bbSV5ityBxTuNR", + "hash160result": "4fb4c86b8ce18e596e28f62bc9a78f43d738255d", "qualifiedname": { - "namespace":"i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name":"vrsc::currency.address" + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::currency.address" + } +} + + +interface VDXFIdentityData extends VDXFKeyInterface { + detail: string; +} + +const IDENTITY_DATA: VDXFIdentityData[] = [ + { + "vdxfid": "iSSxdyTcCp8VALGBGKy8R7ATYSRuK15NkL", + "hash160result": "92cb346dd5c5886898a7ebcab6a0e4dded19fffb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestations.identitydata.firstname" + }, + "detail": "First Name" + }, + { + "vdxfid": "i3jWsqLVnYyJu78E7mw6pbD3TazwZJpuk4", + "hash160result": "03d10a9768234e11d4cc2f73238cad4e7fc6d502", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestations.identitydata.lastname" + }, + "detail": "Last Name" + }, + { + "vdxfid": "i9MRw6YUhXtP6DT8eufGnB5oRQ34TjDsdb", + "hash160result": "c886a8db81a891f9fc017001b6f6949588407940", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestations.identitydata.attestor" + }, + "detail": "Attestor" + }, + { + "vdxfid": "iJvFSXk2EDeEu9BkJQSwAVeiochF6AYpfF", + "hash160result": "cac8e0c062de7abf4fd0a606c2b83eea275a67a9", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestations.identitydata.identity" + }, + "detail": "Identity" + }, + { + "vdxfid": "iLY58rsr39UB8BptNGYX63qPhcpv5N5yuC", + "hash160result": "ab812395536444a22463318c2691e886c6d925bb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestations.type" + }, + "detail": "Document Type" } -} \ No newline at end of file +] + +export const ATTESTATION_IDENTITY_DATA = {}; +IDENTITY_DATA.forEach((item) => ATTESTATION_IDENTITY_DATA[item.vdxfid] = item) +IDENTITY_DATA.forEach((item) => ATTESTATION_IDENTITY_DATA[item.detail] = item) \ No newline at end of file From f8e7ef47ac81a9d4bc9c0711f0761002d656293b Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Fri, 7 Jul 2023 16:11:28 +0100 Subject: [PATCH 029/120] Add Attestation functions --- src/__tests__/attestation/attestation.test.ts | 23 ++- src/vdxf/classes/Attestation.ts | 150 ++++++++++++++++-- src/vdxf/classes/Challenge.ts | 2 +- src/vdxf/classes/Decision.ts | 2 +- 4 files changed, 156 insertions(+), 21 deletions(-) diff --git a/src/__tests__/attestation/attestation.test.ts b/src/__tests__/attestation/attestation.test.ts index dcef5f7..31eb07a 100644 --- a/src/__tests__/attestation/attestation.test.ts +++ b/src/__tests__/attestation/attestation.test.ts @@ -6,6 +6,9 @@ import { Context } from "../../vdxf/classes/Context"; import { ProvisioningRequest } from "../../vdxf/classes/provisioning/ProvisioningRequest"; import { ProvisioningResponse } from "../../vdxf/classes/provisioning/ProvisioningResponse"; import { ProvisioningResult, ProvisioningTxid } from "../../vdxf/classes/provisioning/ProvisioningResult"; +import { AttestationData } from "../../vdxf/classes/Attestation"; + +const SIMPLE_ATTESTATION = 1; describe('Serializes and deserializes attestation request', () => { test('attestation request with reply', async () => { @@ -42,12 +45,19 @@ describe('Serializes and deserializes attestation request', () => { }, }); - const test = {"firstname": "John", "lastname": "Doe", - "identity":"jdoe123@", - "attestor": "valu attestation@", - "type":"simple name attestation v1" } + const componentsArray = new Array; + + componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["First Name"].vdxfid, salt: "8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210", value: "Chris"}) + componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["Last Name"].vdxfid, salt: "8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210", value: "Monkins"}) + componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["Attestor"].vdxfid, salt: "8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210", value: "valu attestation@"}) + componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["Identity"].vdxfid, salt: "8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210", value: "chad@"}) + componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["Document Type"].vdxfid, salt: "8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210", value: "KYC Attestation v1"}) + componentsArray.push({type: 2, hash: "8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210"}) + componentsArray.push({type: 2, hash: "8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210"}) + + const signaturesForAttestation = {"i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV": "AYG2IQABQSAN1fp6A9NIVbxvKuOVLLU+0I+G3oQGbRtS6u4Eampfb217Cdf5FCMScQhV9kMxtjI9GWzpchmjuiTB2tctk6qT"}; - const attestationResponse = new Attestation({data: {type: SIMPLE_ATTESTATION, components: {} }}); + const attestationResponse = new Attestation("",{type: SIMPLE_ATTESTATION, nIndex: 123,components: componentsArray, signatures: signaturesForAttestation}); const res = new LoginConsentResponse({ system_id: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", @@ -62,7 +72,8 @@ describe('Serializes and deserializes attestation request', () => { ["i4KyLCxWZXeSkw15dF95CUKytEK3HU7em9"]: "test", }), request: req, - created_at: 1664392484 + created_at: 1664392484, + attestations: [attestationResponse] } }) diff --git a/src/vdxf/classes/Attestation.ts b/src/vdxf/classes/Attestation.ts index e8e1f94..8734fe3 100644 --- a/src/vdxf/classes/Attestation.ts +++ b/src/vdxf/classes/Attestation.ts @@ -1,35 +1,159 @@ +import varuint from '../../utils/varuint' +import bufferutils from '../../utils/bufferutils' +import { fromBase58Check, toBase58Check } from '../../utils/address'; +import { I_ADDR_VERSION } from '../../constants/vdxf'; import { ATTESTATION_IDENTITY_DATA, Utf8DataVdxfObject, VDXFObject } from "../"; -export interface MerkleBranch { - nIndex?: number; - branch?: Array; -} +const { BufferReader, BufferWriter } = bufferutils; + +const ATTESTATION_TYPE_DATA = 1; +const ATTESTATION_TYPE_HASH = 2; -export interface AttestationData extends VDXFObject { +export interface AttestationData{ type?: number; - key?: string; + attestationKey?: string; salt?: string; value?: string; hash?: string; } -export interface AttestationSignature extends VDXFObject { - signatures: Array; - attestors: Array; -} export class Attestation extends VDXFObject { type: number; - branch: MerkleBranch; + nIndex: number; components: Array; - proof: AttestationSignature; + signatures: {[attestor: string]: string}; + + constructor(vdxfkey: string = "", data?: { + type?: number; + nIndex?: number; + components?: Array; + signatures?: {[attestor: string]: string}; - constructor(vdxfkey: string = "") { + }) { super(vdxfkey); + + if (data) { + if (data?.type) this.type = data.type; + if (data?.nIndex) this.nIndex = data.nIndex; + if (data?.components) this.components = data.components; + if (data?.signatures) this.signatures = data.signatures; + } + + } + + + dataByteLength(): number { + + let byteLength = 0; + byteLength += varuint.encodingLength(this.type); + byteLength += varuint.encodingLength(this.nIndex); + + byteLength += varuint.encodingLength(this.components.length) + for (const n of this.components) { + + byteLength += varuint.encodingLength(n.type); + + if (n.type === ATTESTATION_TYPE_DATA) { + byteLength += 20; //key + byteLength += 32; //salt + byteLength += varuint.encodingLength(Buffer.from(n.value, "utf8").length); + byteLength += Buffer.from(n.value, "utf8").length; + } else if (n.type === ATTESTATION_TYPE_HASH) { + byteLength += 32; //hash + } else { + throw new Error("Attestation Type not supported") + } + } + + const objKeys = Object.keys(this.signatures); + byteLength += varuint.encodingLength(objKeys.length); + + for (const item of objKeys) { + byteLength += 20; //key + byteLength += varuint.encodingLength(Buffer.from(this.signatures[item], "base64").length); + byteLength += Buffer.from(this.signatures[item], "base64").length; + + } + return byteLength; + } + + toBuffer(): Buffer { + const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); + bufferWriter.writeCompactSize(this.type); + bufferWriter.writeCompactSize(this.nIndex); + bufferWriter.writeCompactSize(this.components.length); + for (const n of this.components) { + + bufferWriter.writeCompactSize(n.type); + + if (n.type === ATTESTATION_TYPE_DATA) { + bufferWriter.writeSlice(fromBase58Check(n.attestationKey).hash); + bufferWriter.writeSlice(Buffer.from(n.salt, "hex")); + bufferWriter.writeCompactSize(Buffer.from(n.value, "utf8").length) + bufferWriter.writeSlice(Buffer.from(n.value, "utf8")); + } else if (n.type === ATTESTATION_TYPE_HASH) { + bufferWriter.writeSlice(Buffer.from(n.hash, "hex")); + } else { + throw new Error("Attestation Type not supported") + } + } + + const objKeys = Object.keys(this.signatures); + bufferWriter.writeCompactSize(objKeys.length); + + for (const item of objKeys) { + + bufferWriter.writeSlice(fromBase58Check(item).hash); + bufferWriter.writeVarSlice(Buffer.from(this.signatures[item], "base64")) + + } + + return bufferWriter.buffer + } + + fromBuffer(buffer: Buffer, offset?: number): number { + + const reader = new bufferutils.BufferReader(buffer, offset); + this.type = reader.readVarInt().toNumber(); + this.nIndex = reader.readVarInt().toNumber(); + + this.components = new Array(); + + const componentsMapSize = reader.readVarInt(); + + for (var i = 0; i < componentsMapSize.toNumber(); i++) { + + const type = reader.readVarInt().toNumber(); + + if (type === ATTESTATION_TYPE_DATA) { + const attestationKey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + const salt = Buffer.from(reader.readVarSlice()).toString('hex'); + const value = Buffer.from(reader.readVarSlice()).toString('utf8'); + this.components.push({type, attestationKey, salt, value}); + } else if (type === ATTESTATION_TYPE_HASH) { + const hash = Buffer.from(reader.readVarSlice()).toString('hex'); + this.components.push({type, hash}); + } else { + throw new Error("Attestation Type not supported") + } + } + + const signaturesSize = reader.readVarInt(); + this.signatures = {}; + + for (var i = 0; i < signaturesSize.toNumber(); i++) { + + const attestor = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + const signature = reader.readVarSlice().toString('base64'); + this.signatures[attestor] = signature; + } + + return reader.offset; } } diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index e87d72f..9a3f968 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -151,7 +151,7 @@ export class Challenge extends VDXFObject implements ChallengeInterface { : challenge.provisioning_info; this.alt_auth_factors = challenge.alt_auth_factors; this.session_id = challenge.session_id; - this.attestations = challenge.attestations ? challenge.attestations.map((x) => new Attestation(x.data, x.vdxfkey)) : challenge.attestations; + this.attestations = challenge.attestations; this.redirect_uris = challenge.redirect_uris ? challenge.redirect_uris.map((x) => new RedirectUri(x.uri, x.vdxfkey)) : challenge.redirect_uris; diff --git a/src/vdxf/classes/Decision.ts b/src/vdxf/classes/Decision.ts index 3fb597d..534aa25 100644 --- a/src/vdxf/classes/Decision.ts +++ b/src/vdxf/classes/Decision.ts @@ -52,7 +52,7 @@ export class Decision extends VDXFObject { this.request = new Request(decision.request); this.context = decision.context; this.created_at = decision.created_at; - this.attestations = decision.attestations ? decision.attestations.map((x) => new Attestation(x.data, x.vdxfkey)) : decision.attestations; + this.attestations = decision.attestations; this.salt = decision.salt; this.skipped = decision.skipped ? true : false; } From 8a75bbcd42afbad0091ec6b34c2f0b9028d8b217 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Mon, 10 Jul 2023 11:57:09 +0100 Subject: [PATCH 030/120] Fix Attestation Serialization --- src/__tests__/attestation/attestation.test.ts | 2 +- src/vdxf/classes/Attestation.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/__tests__/attestation/attestation.test.ts b/src/__tests__/attestation/attestation.test.ts index 31eb07a..4a30d00 100644 --- a/src/__tests__/attestation/attestation.test.ts +++ b/src/__tests__/attestation/attestation.test.ts @@ -57,7 +57,7 @@ describe('Serializes and deserializes attestation request', () => { const signaturesForAttestation = {"i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV": "AYG2IQABQSAN1fp6A9NIVbxvKuOVLLU+0I+G3oQGbRtS6u4Eampfb217Cdf5FCMScQhV9kMxtjI9GWzpchmjuiTB2tctk6qT"}; - const attestationResponse = new Attestation("",{type: SIMPLE_ATTESTATION, nIndex: 123,components: componentsArray, signatures: signaturesForAttestation}); + const attestationResponse = new Attestation("i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV",{type: SIMPLE_ATTESTATION, nIndex: 123,components: componentsArray, signatures: signaturesForAttestation}); const res = new LoginConsentResponse({ system_id: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", diff --git a/src/vdxf/classes/Attestation.ts b/src/vdxf/classes/Attestation.ts index 8734fe3..c7c6207 100644 --- a/src/vdxf/classes/Attestation.ts +++ b/src/vdxf/classes/Attestation.ts @@ -132,11 +132,11 @@ export class Attestation extends VDXFObject { if (type === ATTESTATION_TYPE_DATA) { const attestationKey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); - const salt = Buffer.from(reader.readVarSlice()).toString('hex'); + const salt = Buffer.from(reader.readSlice(32)).toString('hex'); const value = Buffer.from(reader.readVarSlice()).toString('utf8'); this.components.push({type, attestationKey, salt, value}); } else if (type === ATTESTATION_TYPE_HASH) { - const hash = Buffer.from(reader.readVarSlice()).toString('hex'); + const hash = Buffer.from(reader.readSlice(32)).toString('hex'); this.components.push({type, hash}); } else { throw new Error("Attestation Type not supported") From 91ed3f75fb20a512a5bc25185f81fdba0b42a913 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Mon, 10 Jul 2023 14:11:53 +0100 Subject: [PATCH 031/120] Read byteLength Attestations --- src/__tests__/attestation/attestation.test.ts | 4 +++- src/vdxf/classes/Attestation.ts | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/__tests__/attestation/attestation.test.ts b/src/__tests__/attestation/attestation.test.ts index 4a30d00..d2ab535 100644 --- a/src/__tests__/attestation/attestation.test.ts +++ b/src/__tests__/attestation/attestation.test.ts @@ -84,7 +84,9 @@ describe('Serializes and deserializes attestation request', () => { const resbuf = res.toBuffer() const _res = new LoginConsentResponse() _res.fromBuffer(resbuf) - + + const checkres = _res.toBuffer() + expect(checkres).toStrictEqual(resbuf); const uri = _req.toWalletDeeplinkUri() expect(uri).toBe(LoginConsentRequest.fromWalletDeeplinkUri(uri).toWalletDeeplinkUri()); diff --git a/src/vdxf/classes/Attestation.ts b/src/vdxf/classes/Attestation.ts index c7c6207..5ac153c 100644 --- a/src/vdxf/classes/Attestation.ts +++ b/src/vdxf/classes/Attestation.ts @@ -82,7 +82,7 @@ export class Attestation extends VDXFObject { return byteLength; } - toBuffer(): Buffer { + toDataBuffer(): Buffer { const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); bufferWriter.writeCompactSize(this.type); bufferWriter.writeCompactSize(this.nIndex); @@ -116,9 +116,10 @@ export class Attestation extends VDXFObject { return bufferWriter.buffer } - fromBuffer(buffer: Buffer, offset?: number): number { + fromDataBuffer(buffer: Buffer, offset?: number): number { const reader = new bufferutils.BufferReader(buffer, offset); + const attestationsByteLength = reader.readCompactSize(); this.type = reader.readVarInt().toNumber(); this.nIndex = reader.readVarInt().toNumber(); From 5c82882be9a10b519bc2576d1b972494ccc1c20c Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Mon, 10 Jul 2023 15:48:51 +0100 Subject: [PATCH 032/120] Start Adding MMR Functions to Attestations --- src/vdxf/classes/Attestation.ts | 39 +++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/src/vdxf/classes/Attestation.ts b/src/vdxf/classes/Attestation.ts index 5ac153c..dcbe734 100644 --- a/src/vdxf/classes/Attestation.ts +++ b/src/vdxf/classes/Attestation.ts @@ -1,5 +1,6 @@ import varuint from '../../utils/varuint' import bufferutils from '../../utils/bufferutils' +import createHash = require("create-hash"); import { fromBase58Check, toBase58Check } from '../../utils/address'; import { I_ADDR_VERSION } from '../../constants/vdxf'; import { @@ -156,5 +157,43 @@ export class Attestation extends VDXFObject { return reader.offset; } + + routeHash() { + + const attestationHashes = this.sortHashes(); + + //TODO: sort into MMR + + } + + getHash(n: AttestationData): Buffer { + + if (n.type === ATTESTATION_TYPE_DATA) { + const bufferWriter = new BufferWriter(Buffer.alloc(20 + + 32 + + varuint.encodingLength(Buffer.from(n.value, "utf8").length) + + Buffer.from(n.value, "utf8").length )); + bufferWriter.writeSlice(fromBase58Check(n.attestationKey).hash); + bufferWriter.writeSlice(Buffer.from(n.salt, "hex")); + bufferWriter.writeCompactSize(Buffer.from(n.value, "utf8").length) + bufferWriter.writeSlice(Buffer.from(n.value, "utf8")); + + return createHash("sha256").update(bufferWriter.buffer).digest(); + } else if (n.type === ATTESTATION_TYPE_HASH) { + return Buffer.from(n.hash, "hex"); + } else { + throw new Error("Attestation Type not supported") + } + + } + + sortHashes(): Array { + + const hashArray = this.components.map((item) => this.getHash(item) ) + const sortedHashArray = hashArray.sort((a, b) => (BigInt(`0x${a.toString('hex')}`) > BigInt(`0x${b.toString('hex')}`))? 0 : -1 ); + + return sortedHashArray; + } + } From c6a617d29b324aa4595f5c8e79398370f971595b Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Wed, 12 Jul 2023 15:42:43 +0100 Subject: [PATCH 033/120] Add MMR --- package.json | 3 +- src/__tests__/attestation/attestation.test.ts | 17 +- src/vdxf/classes/Attestation.ts | 26 +- src/vdxf/classes/MMR.ts | 350 ++++++++++++++++++ yarn.lock | 5 + 5 files changed, 387 insertions(+), 14 deletions(-) create mode 100644 src/vdxf/classes/MMR.ts diff --git a/package.json b/package.json index 83f2a76..b6c2c6e 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,8 @@ "bech32": "^2.0.0", "bn.js": "5.2.1", "bs58check": "https://github.com/bitcoinjs/bs58check", - "create-hash": "1.2.0" + "create-hash": "1.2.0", + "semaphore-async-await": "^1.5.1" }, "devDependencies": { "@types/bn.js": "5.1.1", diff --git a/src/__tests__/attestation/attestation.test.ts b/src/__tests__/attestation/attestation.test.ts index d2ab535..b697c37 100644 --- a/src/__tests__/attestation/attestation.test.ts +++ b/src/__tests__/attestation/attestation.test.ts @@ -48,12 +48,12 @@ describe('Serializes and deserializes attestation request', () => { const componentsArray = new Array; componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["First Name"].vdxfid, salt: "8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210", value: "Chris"}) - componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["Last Name"].vdxfid, salt: "8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210", value: "Monkins"}) - componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["Attestor"].vdxfid, salt: "8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210", value: "valu attestation@"}) - componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["Identity"].vdxfid, salt: "8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210", value: "chad@"}) - componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["Document Type"].vdxfid, salt: "8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210", value: "KYC Attestation v1"}) - componentsArray.push({type: 2, hash: "8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210"}) - componentsArray.push({type: 2, hash: "8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210"}) + componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["Last Name"].vdxfid, salt: "7c3920940db4385cd305557a57a8df33346712096e76b58d7c4ace05e17b90a2", value: "Monkins"}) + componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["Identity"].vdxfid, salt: "ce662d61a20ae211728cdb1b924628c84edfe0fcbd59a86f56a125ad73689ac1", value: "chad@"}) + componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["Attestor"].vdxfid, salt: "9067dc6a9b38dd15f985770bb819eb62de39a5d1f0e12f9a4807f78968794af4", value: "valu attestation@"}) + componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["Document Type"].vdxfid, salt: "338b6ad44179f46fc24f3ed01fd247c9664384a71ba5465aebceece8d7c45a0a", value: "KYC Attestation v1"}) + componentsArray.push({type: 2, hash: "b5223370abb0b6d718d03fbef2d68b4b132b48045f3bc20f6d9322f2df74ddc5"}) + componentsArray.push({type: 2, hash: "6f2820034cfe309dd66d4503f1e5c06345c6aa3b2b00393a59a19b347ca187ab"}) const signaturesForAttestation = {"i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV": "AYG2IQABQSAN1fp6A9NIVbxvKuOVLLU+0I+G3oQGbRtS6u4Eampfb217Cdf5FCMScQhV9kMxtjI9GWzpchmjuiTB2tctk6qT"}; @@ -90,6 +90,11 @@ describe('Serializes and deserializes attestation request', () => { const uri = _req.toWalletDeeplinkUri() expect(uri).toBe(LoginConsentRequest.fromWalletDeeplinkUri(uri).toWalletDeeplinkUri()); + + const mmr = await _res.decision.attestations[0].getMMR(); + + const root = await mmr.getRoot(); + expect(Buffer.from(root).toString('hex')).toStrictEqual("65ee95e0a3eea24f3590aff4765736ee61547e42e8df960cc85c3f6d6bc00fc5") }); diff --git a/src/vdxf/classes/Attestation.ts b/src/vdxf/classes/Attestation.ts index dcbe734..0e9efed 100644 --- a/src/vdxf/classes/Attestation.ts +++ b/src/vdxf/classes/Attestation.ts @@ -3,11 +3,9 @@ import bufferutils from '../../utils/bufferutils' import createHash = require("create-hash"); import { fromBase58Check, toBase58Check } from '../../utils/address'; import { I_ADDR_VERSION } from '../../constants/vdxf'; -import { - ATTESTATION_IDENTITY_DATA, - Utf8DataVdxfObject, - VDXFObject - } from "../"; +import { VDXFObject } from "../"; +import { MMR } from "./MMR" + const { BufferReader, BufferWriter } = bufferutils; @@ -28,6 +26,7 @@ export class Attestation extends VDXFObject { nIndex: number; components: Array; signatures: {[attestor: string]: string}; + mmr: MMR; constructor(vdxfkey: string = "", data?: { type?: number; @@ -158,12 +157,25 @@ export class Attestation extends VDXFObject { return reader.offset; } - routeHash() { + async getMMR() { const attestationHashes = this.sortHashes(); - //TODO: sort into MMR + if (!this.mmr) { + this.mmr = new MMR(); + } + + for (var i = 0; i < attestationHashes.length; i++) { + await this.mmr.append(attestationHashes[i], i) + } + + return this.mmr; + } + + async routeHash() { + this.getMMR(); + return this.mmr.getRoot(); } getHash(n: AttestationData): Buffer { diff --git a/src/vdxf/classes/MMR.ts b/src/vdxf/classes/MMR.ts new file mode 100644 index 0000000..a0e4c50 --- /dev/null +++ b/src/vdxf/classes/MMR.ts @@ -0,0 +1,350 @@ +const { Lock } = require('semaphore-async-await') +import { blake2b } from '@noble/hashes/blake2b' + +class Position{ + i: any + h: any + r: any + constructor(index, height, rightness){ + this.i = index + this.h = height + this.r = rightness // inherent unchanging property of every node index + } + } + + +export class MMR{ + lock: any; + _leafLength: number; + db: any; + + constructor(db = new MemoryBasedDb()){ + this.db = db + this.lock = new Lock(1) + + } + + digest(input){ + return blake2b(Buffer.concat([...input]), {dkLen: 32, personalization: "VerusDefaultHash"}) + + } + + async get(leafIndex){ + let leafValue + await this.lock.acquire() + try{ + let leafLength = await this.getLeafLength() + if(leafIndex >= leafLength){ throw new Error('Leaf not in tree') } + let leafPosition = MMR.getNodePosition(leafIndex) + let localPeakPosition = MMR.localPeakPosition(leafIndex, leafLength) + let localPeakValue = await this._getNodeValue(localPeakPosition) + leafValue = await this._verifyPath(localPeakPosition, localPeakValue, leafPosition) + }finally{ + this.lock.release() + } + return leafValue + } + async _get(nodePosition){ + let nodeValue + await this.lock.acquire() + try{ + let nodeLength = await this.getNodeLength() + let leafLength = await this.getLeafLength() + if(nodePosition.i >= nodeLength){ throw new Error('Node not in tree') } + let peakPositions = MMR.peakPositions(leafLength - 1) + let localPeakPosition + for (let i = 0; i < peakPositions.length; i++) { + if(peakPositions[i].i >= nodePosition.i){ + localPeakPosition = peakPositions[i] + break + } + } + let localPeakValue = await this._getNodeValue(localPeakPosition) + nodeValue = await this._verifyPath(localPeakPosition, localPeakValue, nodePosition) + }finally{ + this.lock.release() + } + return nodeValue + } + async append(value, leafIndex){ + await this.lock.acquire() + try{ + let leafLength = await this.getLeafLength() + if(leafIndex == undefined || leafIndex == leafLength){ + let nodePosition = MMR.getNodePosition(leafLength) + let mountainPositions = MMR.mountainPositions(MMR.localPeakPosition(leafLength, leafLength), nodePosition.i) + await this.db.set(value, nodePosition.i) + await this._hashUp(mountainPositions) + await this._setLeafLength(leafLength + 1) + } else{ + throw new Error('Can only append to end of MMR (leaf '+leafLength+'). Index '+leafIndex+' given.') + } + }finally{ + this.lock.release() + } + } + async appendMany(values, startLeafIndex){ + if(startLeafIndex == undefined){ + startLeafIndex = await this.getLeafLength() + } + for (let i = 0; i < values.length; i++) { + await this.append(values[i], startLeafIndex + i) + } + } + async getRoot(leafIndex?: number){ + let peakValues = [] + await this.lock.acquire() + try{ + if(!leafIndex){ + leafIndex = await this.getLeafLength() - 1 + } + let peakPositions = MMR.peakPositions(leafIndex) + for (let i = 0; i < peakPositions.length; i++) { + peakValues.push(await this._getNodeValue(peakPositions[i])) + } + }finally{ + this.lock.release() + } + // note: a single peak differs from its MMR root in that it gets hashed a second time + return this.digest([...peakValues]) + } + async getNodeLength(){ return MMR.getNodePosition(await this.getLeafLength()).i } + async getLeafLength(){ // caching + if(this._leafLength == undefined){ // dirty length + this._leafLength = await this.db.getLeafLength() + } + return this._leafLength + } + async delete(leafIndex){ // logically deletes everything after (and including) leafIndex + await this.lock.acquire() + try{ + let leafLength = await this.getLeafLength() + if(leafIndex < leafLength){ + await this._setLeafLength(leafIndex) + } + }finally{ + this.lock.release() + } + } + async getProof(leafIndexes, referenceTreeLength){ // returns a sparse MMR containing the leaves specified + let proofMmr + await this.lock.acquire() + try{ + referenceTreeLength = referenceTreeLength || await this.getLeafLength() + + let positions = MMR.proofPositions(leafIndexes, referenceTreeLength) + let nodes = {} + + let nodeIndexes = Object.keys(positions) + await Promise.all(nodeIndexes.map( async (i) => { + let nodeValue = await this._getNodeValue(positions[i]) + nodes[i] = nodeValue + })) + proofMmr = new MMR(new MemoryBasedDb(referenceTreeLength, nodes)) + + }finally{ + this.lock.release() + return proofMmr + } + } + + async _getNodeValue(position){ + // caller's responsibility to request a position within leafLength + let nodeValue = await this.db.get(position.i) + if(nodeValue){ + return nodeValue + }else if(position.h > 0){ // implied node + let leftChildValue = await this._getNodeValue(MMR.leftChildPosition(position)) + let rightChildValue = await this._getNodeValue(MMR.rightChildPosition(position)) + return this.digest([leftChildValue, rightChildValue]) + }else{ + throw new Error('Missing node in db') + } + } + async _verifyPath(currentPosition, currentValue, destinationPosition) { // verifies as it walks + if (currentPosition.i == destinationPosition.i) { // base case + return currentValue + } else { + let leftChildPosition = MMR.leftChildPosition(currentPosition) + let rightChildPosition = MMR.rightChildPosition(currentPosition) + let leftValue = await this._getNodeValue(leftChildPosition) + let rightValue = await this._getNodeValue(rightChildPosition) + if (!currentValue.equals(this.digest([leftValue, rightValue]))) { + throw new Error('Hash mismatch of node #' + currentPosition.i + ' and its children') + } + if (destinationPosition.i > currentPosition.i - 2 ** currentPosition.h - currentPosition.h + 1) { //umm yeah, check this line + return this._verifyPath(rightChildPosition, rightValue, destinationPosition) + } else { + return this._verifyPath(leftChildPosition, leftValue, destinationPosition) + } + } + } + async _setLeafLength(leafLength){ + await this.db.setLeafLength(leafLength) + this._leafLength = leafLength + } + async _hashUp(positionPairs){ + for (let i = positionPairs.length - 1; i >= 0 ; i--) { + let leftValue = await this._getNodeValue(positionPairs[i][0]) + let rightValue = await this._getNodeValue(positionPairs[i][1]) + let writeIndex = MMR.parentIndex(positionPairs[i][0]) + await this.db.set(this.digest([leftValue, rightValue]), writeIndex) + } + } + + + static leftChildPosition(position){ + if(position.h <= 0){ throw new Error('Height 0 does not have child')} + return new Position(position.i - 2**position.h, position.h - 1, false) + } + static rightChildPosition(position){ + if (position.h <= 0) { throw new Error('Height 0 does not have child') } + return new Position(position.i - 1, position.h - 1, true) + } + static siblingPosition(position){ + let multiplier = position.r ? -1 : 1 + return new Position (position.i + multiplier * (2**(position.h + 1) - 1), position.h, !position.r) + } + static parentIndex(position){ + if(position.r){ + return position.i + 1 + }else{ + return position.i + 2**(position.h + 1) + } + } + static peakPositions(leafIndex){ + let currentPosition = this.godPeakFromLeafIndex(leafIndex) + let peakPositions = [] + while(leafIndex >= 0){ + currentPosition = this.leftChildPosition(currentPosition) + if(leafIndex >= 2**currentPosition.h - 1){ + peakPositions.push(currentPosition) + currentPosition = this.siblingPosition(currentPosition) + leafIndex -= 2**currentPosition.h // leafIndex becomes a kindof accumulator + } + } + return peakPositions + } + static localPeakPosition(leafIndex, leafLength){ + let lastLeafIndex = leafLength <= leafIndex ? leafIndex : leafLength - 1 + return MMR._localPeakPosition(leafIndex, MMR.peakPositions(lastLeafIndex)) + } + static _localPeakPosition(leafIndex, peakPositions){ + for (let i = 0; i < peakPositions.length; i++) { + let currentRange = 2**(peakPositions[i].h) + if(leafIndex < currentRange){ + return peakPositions[i] + }else{ + leafIndex -= currentRange + } + } + } + static mountainPositions(currentPosition, targetNodeIndex){ // positions to hash after appending + let mountainPositions = [] + while (currentPosition.h > 0) { + let children = [this.leftChildPosition(currentPosition), this.rightChildPosition(currentPosition)] + mountainPositions.push(children) + if(targetNodeIndex > currentPosition.i - 2**currentPosition.h - currentPosition.h + 1){ + currentPosition = children[1] + }else{ + currentPosition = children[0] + } + } + return mountainPositions + } + static godPeakFromLeafIndex(leafIndex){ // imaginary peak that is above all nodes + let peakHeight = 0 + while(2**peakHeight <= leafIndex + 1){ peakHeight++ } + return new Position(2**(peakHeight + 1) - 2, peakHeight, false) + } + static getNodePosition(leafIndex){ + let currentPosition = this.godPeakFromLeafIndex(leafIndex) + let accumulator = 0 + while(currentPosition.h > 0){ + let serviceRange = 2**(currentPosition.h - 1) + if(leafIndex >= accumulator + serviceRange){ + currentPosition = this.rightChildPosition(currentPosition) + accumulator += serviceRange + }else{ + currentPosition = this.leftChildPosition(currentPosition) + } + } + return currentPosition + } + static proofPositions(leafIndexes, referenceTreeLength){ + let positions = {} + let finalPeakPositions = MMR.peakPositions(referenceTreeLength - 1) + // add peak positions + for (let i = 0; i < finalPeakPositions.length; i++) { // log(n)/2 + positions[finalPeakPositions[i].i] = finalPeakPositions[i] + } + //add local mountain proof positions for each leaf + for (let i = 0; i < leafIndexes.length; i++) { // k*2log(n) + let nodePosition = MMR.getNodePosition(leafIndexes[i]) + let finalLocalPeak = MMR._localPeakPosition(leafIndexes[i], finalPeakPositions) + // positions[finalLocalPeak.i] = finalLocalPeak // ?? should already have all peaks + let mountainPositions = MMR.mountainPositions(finalLocalPeak, nodePosition.i) + for (let j = 0; j < mountainPositions.length; j++) { + positions[mountainPositions[j][0].i] = mountainPositions[j][0] + positions[mountainPositions[j][1].i] = mountainPositions[j][1] + } + } + // find implied positions (ones which can be calculated based on child positions that are present) + let positionIndexes = Object.keys(positions) + let impliedIndexes = [] + for (let j = 0; j < positionIndexes.length; j++) { // k*log(n) + if(positions[positionIndexes[j]].h > 0){ + let hasLeftChild = MMR._hasPosition(positions, MMR.leftChildPosition(positions[positionIndexes[j]])) + let hasRightChild = MMR._hasPosition(positions, MMR.rightChildPosition(positions[positionIndexes[j]])) + if(hasLeftChild && hasRightChild){ + impliedIndexes.push(positionIndexes[j]) // don't remove them yet because recursion will be slower + } + } + } + // finally remove implied nodes + for (var i = 0; i < impliedIndexes.length; i++) { // k*log(n) + impliedIndexes[i] + delete positions[impliedIndexes[i]] + } + return positions + } + static _hasPosition(nodes, position){ + let has = !!nodes[position.i] + if (!has && position.h > 0){ + if(MMR._hasPosition(nodes, MMR.leftChildPosition(position)) + && MMR._hasPosition(nodes, MMR.rightChildPosition(position)) + ){ + has = true + } + } + return has + } +} + +class MemoryBasedDb { + + leafLength: any; + nodes: {[number: number]: Buffer}; + constructor(...args){ + if(args[0] == undefined || typeof args[0] == 'number'){ + this.leafLength = args[0] || 0 + this.nodes = args[1] || {} + + } + } + async get(index){ + return this.nodes[index] + } + async set(value, index){ + this.nodes[index] = value + } + async getLeafLength(){ + return this.leafLength + } + async setLeafLength(leafLength){ + return this.leafLength = leafLength + } + async getNodes(){ + return this.nodes + } + } diff --git a/yarn.lock b/yarn.lock index a8d20d0..2288350 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2596,6 +2596,11 @@ safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== +semaphore-async-await@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/semaphore-async-await/-/semaphore-async-await-1.5.1.tgz#857bef5e3644601ca4b9570b87e9df5ca12974fa" + integrity sha512-b/ptP11hETwYWpeilHXXQiV5UJNJl7ZWWooKRE5eBIYWoom6dZ0SluCIdCtKycsMtZgKWE01/qAw6jblw1YVhg== + semver@7.x, semver@^7.3.5, semver@^7.3.7: version "7.5.2" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.2.tgz#5b851e66d1be07c1cdaf37dfc856f543325a2beb" From f9682571883b7bd348f1e00dd94704f81a4a008b Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Fri, 14 Jul 2023 11:08:44 +0100 Subject: [PATCH 034/120] Builds updated --- dist/vdxf/classes/Attestation.d.ts | 37 ++- dist/vdxf/classes/Attestation.js | 161 +++++++++++- dist/vdxf/classes/Challenge.js | 2 +- dist/vdxf/classes/Decision.js | 2 +- dist/vdxf/classes/MMR.d.ts | 54 ++++ dist/vdxf/classes/MMR.js | 398 +++++++++++++++++++++++++++++ 6 files changed, 638 insertions(+), 16 deletions(-) create mode 100644 dist/vdxf/classes/MMR.d.ts create mode 100644 dist/vdxf/classes/MMR.js diff --git a/dist/vdxf/classes/Attestation.d.ts b/dist/vdxf/classes/Attestation.d.ts index 44d4434..a488f74 100644 --- a/dist/vdxf/classes/Attestation.d.ts +++ b/dist/vdxf/classes/Attestation.d.ts @@ -1,23 +1,34 @@ +/// import { VDXFObject } from "../"; -export interface MerkleBranch { - nIndex?: number; - branch?: Array; -} -export interface AttestationData extends VDXFObject { +import { MMR } from "./MMR"; +export interface AttestationData { type?: number; - key?: string; + attestationKey?: string; salt?: string; value?: string; hash?: string; } -export interface AttestationSignature extends VDXFObject { - signatures: Array; - attestors: Array; -} export declare class Attestation extends VDXFObject { type: number; - branch: MerkleBranch; + nIndex: number; components: Array; - proof: AttestationSignature; - constructor(vdxfkey?: string); + signatures: { + [attestor: string]: string; + }; + mmr: MMR; + constructor(vdxfkey?: string, data?: { + type?: number; + nIndex?: number; + components?: Array; + signatures?: { + [attestor: string]: string; + }; + }); + dataByteLength(): number; + toDataBuffer(): Buffer; + fromDataBuffer(buffer: Buffer, offset?: number): number; + getMMR(): Promise; + routeHash(): Promise; + getHash(n: AttestationData): Buffer; + sortHashes(): Array; } diff --git a/dist/vdxf/classes/Attestation.js b/dist/vdxf/classes/Attestation.js index 27d0e3d..b22e91e 100644 --- a/dist/vdxf/classes/Attestation.js +++ b/dist/vdxf/classes/Attestation.js @@ -1,10 +1,169 @@ "use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; Object.defineProperty(exports, "__esModule", { value: true }); exports.Attestation = void 0; +const varuint_1 = require("../../utils/varuint"); +const bufferutils_1 = require("../../utils/bufferutils"); +const createHash = require("create-hash"); +const address_1 = require("../../utils/address"); +const vdxf_1 = require("../../constants/vdxf"); const __1 = require("../"); +const MMR_1 = require("./MMR"); +const { BufferReader, BufferWriter } = bufferutils_1.default; +const ATTESTATION_TYPE_DATA = 1; +const ATTESTATION_TYPE_HASH = 2; class Attestation extends __1.VDXFObject { - constructor(vdxfkey = "") { + constructor(vdxfkey = "", data) { super(vdxfkey); + if (data) { + if (data === null || data === void 0 ? void 0 : data.type) + this.type = data.type; + if (data === null || data === void 0 ? void 0 : data.nIndex) + this.nIndex = data.nIndex; + if (data === null || data === void 0 ? void 0 : data.components) + this.components = data.components; + if (data === null || data === void 0 ? void 0 : data.signatures) + this.signatures = data.signatures; + } + } + dataByteLength() { + let byteLength = 0; + byteLength += varuint_1.default.encodingLength(this.type); + byteLength += varuint_1.default.encodingLength(this.nIndex); + byteLength += varuint_1.default.encodingLength(this.components.length); + for (const n of this.components) { + byteLength += varuint_1.default.encodingLength(n.type); + if (n.type === ATTESTATION_TYPE_DATA) { + byteLength += 20; //key + byteLength += 32; //salt + byteLength += varuint_1.default.encodingLength(Buffer.from(n.value, "utf8").length); + byteLength += Buffer.from(n.value, "utf8").length; + } + else if (n.type === ATTESTATION_TYPE_HASH) { + byteLength += 32; //hash + } + else { + throw new Error("Attestation Type not supported"); + } + } + const objKeys = Object.keys(this.signatures); + byteLength += varuint_1.default.encodingLength(objKeys.length); + for (const item of objKeys) { + byteLength += 20; //key + byteLength += varuint_1.default.encodingLength(Buffer.from(this.signatures[item], "base64").length); + byteLength += Buffer.from(this.signatures[item], "base64").length; + } + return byteLength; + } + toDataBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); + bufferWriter.writeCompactSize(this.type); + bufferWriter.writeCompactSize(this.nIndex); + bufferWriter.writeCompactSize(this.components.length); + for (const n of this.components) { + bufferWriter.writeCompactSize(n.type); + if (n.type === ATTESTATION_TYPE_DATA) { + bufferWriter.writeSlice((0, address_1.fromBase58Check)(n.attestationKey).hash); + bufferWriter.writeSlice(Buffer.from(n.salt, "hex")); + bufferWriter.writeCompactSize(Buffer.from(n.value, "utf8").length); + bufferWriter.writeSlice(Buffer.from(n.value, "utf8")); + } + else if (n.type === ATTESTATION_TYPE_HASH) { + bufferWriter.writeSlice(Buffer.from(n.hash, "hex")); + } + else { + throw new Error("Attestation Type not supported"); + } + } + const objKeys = Object.keys(this.signatures); + bufferWriter.writeCompactSize(objKeys.length); + for (const item of objKeys) { + bufferWriter.writeSlice((0, address_1.fromBase58Check)(item).hash); + bufferWriter.writeVarSlice(Buffer.from(this.signatures[item], "base64")); + } + return bufferWriter.buffer; + } + fromDataBuffer(buffer, offset) { + const reader = new bufferutils_1.default.BufferReader(buffer, offset); + const attestationsByteLength = reader.readCompactSize(); + this.type = reader.readVarInt().toNumber(); + this.nIndex = reader.readVarInt().toNumber(); + this.components = new Array(); + const componentsMapSize = reader.readVarInt(); + for (var i = 0; i < componentsMapSize.toNumber(); i++) { + const type = reader.readVarInt().toNumber(); + if (type === ATTESTATION_TYPE_DATA) { + const attestationKey = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + const salt = Buffer.from(reader.readSlice(32)).toString('hex'); + const value = Buffer.from(reader.readVarSlice()).toString('utf8'); + this.components.push({ type, attestationKey, salt, value }); + } + else if (type === ATTESTATION_TYPE_HASH) { + const hash = Buffer.from(reader.readSlice(32)).toString('hex'); + this.components.push({ type, hash }); + } + else { + throw new Error("Attestation Type not supported"); + } + } + const signaturesSize = reader.readVarInt(); + this.signatures = {}; + for (var i = 0; i < signaturesSize.toNumber(); i++) { + const attestor = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + const signature = reader.readVarSlice().toString('base64'); + this.signatures[attestor] = signature; + } + return reader.offset; + } + getMMR() { + return __awaiter(this, void 0, void 0, function* () { + const attestationHashes = this.sortHashes(); + if (!this.mmr) { + this.mmr = new MMR_1.MMR(); + } + for (var i = 0; i < attestationHashes.length; i++) { + yield this.mmr.append(attestationHashes[i], i); + } + return this.mmr; + }); + } + routeHash() { + return __awaiter(this, void 0, void 0, function* () { + this.getMMR(); + return this.mmr.getRoot(); + }); + } + getHash(n) { + if (n.type === ATTESTATION_TYPE_DATA) { + const bufferWriter = new BufferWriter(Buffer.alloc(20 + + 32 + + varuint_1.default.encodingLength(Buffer.from(n.value, "utf8").length) + + Buffer.from(n.value, "utf8").length)); + bufferWriter.writeSlice((0, address_1.fromBase58Check)(n.attestationKey).hash); + bufferWriter.writeSlice(Buffer.from(n.salt, "hex")); + bufferWriter.writeCompactSize(Buffer.from(n.value, "utf8").length); + bufferWriter.writeSlice(Buffer.from(n.value, "utf8")); + return createHash("sha256").update(bufferWriter.buffer).digest(); + } + else if (n.type === ATTESTATION_TYPE_HASH) { + return Buffer.from(n.hash, "hex"); + } + else { + throw new Error("Attestation Type not supported"); + } + } + sortHashes() { + const hashArray = this.components.map((item) => this.getHash(item)); + const sortedHashArray = hashArray.sort((a, b) => (BigInt(`0x${a.toString('hex')}`) > BigInt(`0x${b.toString('hex')}`)) ? 0 : -1); + return sortedHashArray; } } exports.Attestation = Attestation; diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index abe6c59..93a3492 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -74,7 +74,7 @@ class Challenge extends __1.VDXFObject { : challenge.provisioning_info; this.alt_auth_factors = challenge.alt_auth_factors; this.session_id = challenge.session_id; - this.attestations = challenge.attestations ? challenge.attestations.map((x) => new Attestation_1.Attestation(x.data, x.vdxfkey)) : challenge.attestations; + this.attestations = challenge.attestations; this.redirect_uris = challenge.redirect_uris ? challenge.redirect_uris.map((x) => new RedirectUri(x.uri, x.vdxfkey)) : challenge.redirect_uris; diff --git a/dist/vdxf/classes/Decision.js b/dist/vdxf/classes/Decision.js index 70dd193..083e028 100644 --- a/dist/vdxf/classes/Decision.js +++ b/dist/vdxf/classes/Decision.js @@ -19,7 +19,7 @@ class Decision extends __1.VDXFObject { this.request = new Request_1.Request(decision.request); this.context = decision.context; this.created_at = decision.created_at; - this.attestations = decision.attestations ? decision.attestations.map((x) => new Attestation_1.Attestation(x.data, x.vdxfkey)) : decision.attestations; + this.attestations = decision.attestations; this.salt = decision.salt; this.skipped = decision.skipped ? true : false; } diff --git a/dist/vdxf/classes/MMR.d.ts b/dist/vdxf/classes/MMR.d.ts new file mode 100644 index 0000000..775bdba --- /dev/null +++ b/dist/vdxf/classes/MMR.d.ts @@ -0,0 +1,54 @@ +/// +declare class Position { + i: any; + h: any; + r: any; + constructor(index: any, height: any, rightness: any); +} +export declare class MMR { + lock: any; + _leafLength: number; + db: any; + constructor(db?: MemoryBasedDb); + digest(input: any): Uint8Array; + get(leafIndex: any): Promise; + _get(nodePosition: any): Promise; + append(value: any, leafIndex: any): Promise; + appendMany(values: any, startLeafIndex: any): Promise; + getRoot(leafIndex?: number): Promise; + getNodeLength(): Promise; + getLeafLength(): Promise; + delete(leafIndex: any): Promise; + getProof(leafIndexes: any, referenceTreeLength: any): Promise; + _getNodeValue(position: any): any; + _verifyPath(currentPosition: any, currentValue: any, destinationPosition: any): any; + _setLeafLength(leafLength: any): Promise; + _hashUp(positionPairs: any): Promise; + static leftChildPosition(position: any): Position; + static rightChildPosition(position: any): Position; + static siblingPosition(position: any): Position; + static parentIndex(position: any): any; + static peakPositions(leafIndex: any): any[]; + static localPeakPosition(leafIndex: any, leafLength: any): any; + static _localPeakPosition(leafIndex: any, peakPositions: any): any; + static mountainPositions(currentPosition: any, targetNodeIndex: any): any[]; + static godPeakFromLeafIndex(leafIndex: any): Position; + static getNodePosition(leafIndex: any): Position; + static proofPositions(leafIndexes: any, referenceTreeLength: any): {}; + static _hasPosition(nodes: any, position: any): boolean; +} +declare class MemoryBasedDb { + leafLength: any; + nodes: { + [number: number]: Buffer; + }; + constructor(...args: any[]); + get(index: any): Promise; + set(value: any, index: any): Promise; + getLeafLength(): Promise; + setLeafLength(leafLength: any): Promise; + getNodes(): Promise<{ + [number: number]: Buffer; + }>; +} +export {}; diff --git a/dist/vdxf/classes/MMR.js b/dist/vdxf/classes/MMR.js new file mode 100644 index 0000000..d9f5624 --- /dev/null +++ b/dist/vdxf/classes/MMR.js @@ -0,0 +1,398 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MMR = void 0; +const { Lock } = require('semaphore-async-await'); +const blake2b_1 = require("@noble/hashes/blake2b"); +class Position { + constructor(index, height, rightness) { + this.i = index; + this.h = height; + this.r = rightness; // inherent unchanging property of every node index + } +} +class MMR { + constructor(db = new MemoryBasedDb()) { + this.db = db; + this.lock = new Lock(1); + } + digest(input) { + return (0, blake2b_1.blake2b)(Buffer.concat([...input]), { dkLen: 32, personalization: "VerusDefaultHash" }); + } + get(leafIndex) { + return __awaiter(this, void 0, void 0, function* () { + let leafValue; + yield this.lock.acquire(); + try { + let leafLength = yield this.getLeafLength(); + if (leafIndex >= leafLength) { + throw new Error('Leaf not in tree'); + } + let leafPosition = MMR.getNodePosition(leafIndex); + let localPeakPosition = MMR.localPeakPosition(leafIndex, leafLength); + let localPeakValue = yield this._getNodeValue(localPeakPosition); + leafValue = yield this._verifyPath(localPeakPosition, localPeakValue, leafPosition); + } + finally { + this.lock.release(); + } + return leafValue; + }); + } + _get(nodePosition) { + return __awaiter(this, void 0, void 0, function* () { + let nodeValue; + yield this.lock.acquire(); + try { + let nodeLength = yield this.getNodeLength(); + let leafLength = yield this.getLeafLength(); + if (nodePosition.i >= nodeLength) { + throw new Error('Node not in tree'); + } + let peakPositions = MMR.peakPositions(leafLength - 1); + let localPeakPosition; + for (let i = 0; i < peakPositions.length; i++) { + if (peakPositions[i].i >= nodePosition.i) { + localPeakPosition = peakPositions[i]; + break; + } + } + let localPeakValue = yield this._getNodeValue(localPeakPosition); + nodeValue = yield this._verifyPath(localPeakPosition, localPeakValue, nodePosition); + } + finally { + this.lock.release(); + } + return nodeValue; + }); + } + append(value, leafIndex) { + return __awaiter(this, void 0, void 0, function* () { + yield this.lock.acquire(); + try { + let leafLength = yield this.getLeafLength(); + if (leafIndex == undefined || leafIndex == leafLength) { + let nodePosition = MMR.getNodePosition(leafLength); + let mountainPositions = MMR.mountainPositions(MMR.localPeakPosition(leafLength, leafLength), nodePosition.i); + yield this.db.set(value, nodePosition.i); + yield this._hashUp(mountainPositions); + yield this._setLeafLength(leafLength + 1); + } + else { + throw new Error('Can only append to end of MMR (leaf ' + leafLength + '). Index ' + leafIndex + ' given.'); + } + } + finally { + this.lock.release(); + } + }); + } + appendMany(values, startLeafIndex) { + return __awaiter(this, void 0, void 0, function* () { + if (startLeafIndex == undefined) { + startLeafIndex = yield this.getLeafLength(); + } + for (let i = 0; i < values.length; i++) { + yield this.append(values[i], startLeafIndex + i); + } + }); + } + getRoot(leafIndex) { + return __awaiter(this, void 0, void 0, function* () { + let peakValues = []; + yield this.lock.acquire(); + try { + if (!leafIndex) { + leafIndex = (yield this.getLeafLength()) - 1; + } + let peakPositions = MMR.peakPositions(leafIndex); + for (let i = 0; i < peakPositions.length; i++) { + peakValues.push(yield this._getNodeValue(peakPositions[i])); + } + } + finally { + this.lock.release(); + } + // note: a single peak differs from its MMR root in that it gets hashed a second time + return this.digest([...peakValues]); + }); + } + getNodeLength() { + return __awaiter(this, void 0, void 0, function* () { return MMR.getNodePosition(yield this.getLeafLength()).i; }); + } + getLeafLength() { + return __awaiter(this, void 0, void 0, function* () { + if (this._leafLength == undefined) { // dirty length + this._leafLength = yield this.db.getLeafLength(); + } + return this._leafLength; + }); + } + delete(leafIndex) { + return __awaiter(this, void 0, void 0, function* () { + yield this.lock.acquire(); + try { + let leafLength = yield this.getLeafLength(); + if (leafIndex < leafLength) { + yield this._setLeafLength(leafIndex); + } + } + finally { + this.lock.release(); + } + }); + } + getProof(leafIndexes, referenceTreeLength) { + return __awaiter(this, void 0, void 0, function* () { + let proofMmr; + yield this.lock.acquire(); + try { + referenceTreeLength = referenceTreeLength || (yield this.getLeafLength()); + let positions = MMR.proofPositions(leafIndexes, referenceTreeLength); + let nodes = {}; + let nodeIndexes = Object.keys(positions); + yield Promise.all(nodeIndexes.map((i) => __awaiter(this, void 0, void 0, function* () { + let nodeValue = yield this._getNodeValue(positions[i]); + nodes[i] = nodeValue; + }))); + proofMmr = new MMR(new MemoryBasedDb(referenceTreeLength, nodes)); + } + finally { + this.lock.release(); + return proofMmr; + } + }); + } + _getNodeValue(position) { + return __awaiter(this, void 0, void 0, function* () { + // caller's responsibility to request a position within leafLength + let nodeValue = yield this.db.get(position.i); + if (nodeValue) { + return nodeValue; + } + else if (position.h > 0) { // implied node + let leftChildValue = yield this._getNodeValue(MMR.leftChildPosition(position)); + let rightChildValue = yield this._getNodeValue(MMR.rightChildPosition(position)); + return this.digest([leftChildValue, rightChildValue]); + } + else { + throw new Error('Missing node in db'); + } + }); + } + _verifyPath(currentPosition, currentValue, destinationPosition) { + return __awaiter(this, void 0, void 0, function* () { + if (currentPosition.i == destinationPosition.i) { // base case + return currentValue; + } + else { + let leftChildPosition = MMR.leftChildPosition(currentPosition); + let rightChildPosition = MMR.rightChildPosition(currentPosition); + let leftValue = yield this._getNodeValue(leftChildPosition); + let rightValue = yield this._getNodeValue(rightChildPosition); + if (!currentValue.equals(this.digest([leftValue, rightValue]))) { + throw new Error('Hash mismatch of node #' + currentPosition.i + ' and its children'); + } + if (destinationPosition.i > currentPosition.i - Math.pow(2, currentPosition.h) - currentPosition.h + 1) { //umm yeah, check this line + return this._verifyPath(rightChildPosition, rightValue, destinationPosition); + } + else { + return this._verifyPath(leftChildPosition, leftValue, destinationPosition); + } + } + }); + } + _setLeafLength(leafLength) { + return __awaiter(this, void 0, void 0, function* () { + yield this.db.setLeafLength(leafLength); + this._leafLength = leafLength; + }); + } + _hashUp(positionPairs) { + return __awaiter(this, void 0, void 0, function* () { + for (let i = positionPairs.length - 1; i >= 0; i--) { + let leftValue = yield this._getNodeValue(positionPairs[i][0]); + let rightValue = yield this._getNodeValue(positionPairs[i][1]); + let writeIndex = MMR.parentIndex(positionPairs[i][0]); + yield this.db.set(this.digest([leftValue, rightValue]), writeIndex); + } + }); + } + static leftChildPosition(position) { + if (position.h <= 0) { + throw new Error('Height 0 does not have child'); + } + return new Position(position.i - Math.pow(2, position.h), position.h - 1, false); + } + static rightChildPosition(position) { + if (position.h <= 0) { + throw new Error('Height 0 does not have child'); + } + return new Position(position.i - 1, position.h - 1, true); + } + static siblingPosition(position) { + let multiplier = position.r ? -1 : 1; + return new Position(position.i + multiplier * (Math.pow(2, (position.h + 1)) - 1), position.h, !position.r); + } + static parentIndex(position) { + if (position.r) { + return position.i + 1; + } + else { + return position.i + Math.pow(2, (position.h + 1)); + } + } + static peakPositions(leafIndex) { + let currentPosition = this.godPeakFromLeafIndex(leafIndex); + let peakPositions = []; + while (leafIndex >= 0) { + currentPosition = this.leftChildPosition(currentPosition); + if (leafIndex >= Math.pow(2, currentPosition.h) - 1) { + peakPositions.push(currentPosition); + currentPosition = this.siblingPosition(currentPosition); + leafIndex -= Math.pow(2, currentPosition.h); // leafIndex becomes a kindof accumulator + } + } + return peakPositions; + } + static localPeakPosition(leafIndex, leafLength) { + let lastLeafIndex = leafLength <= leafIndex ? leafIndex : leafLength - 1; + return MMR._localPeakPosition(leafIndex, MMR.peakPositions(lastLeafIndex)); + } + static _localPeakPosition(leafIndex, peakPositions) { + for (let i = 0; i < peakPositions.length; i++) { + let currentRange = Math.pow(2, (peakPositions[i].h)); + if (leafIndex < currentRange) { + return peakPositions[i]; + } + else { + leafIndex -= currentRange; + } + } + } + static mountainPositions(currentPosition, targetNodeIndex) { + let mountainPositions = []; + while (currentPosition.h > 0) { + let children = [this.leftChildPosition(currentPosition), this.rightChildPosition(currentPosition)]; + mountainPositions.push(children); + if (targetNodeIndex > currentPosition.i - Math.pow(2, currentPosition.h) - currentPosition.h + 1) { + currentPosition = children[1]; + } + else { + currentPosition = children[0]; + } + } + return mountainPositions; + } + static godPeakFromLeafIndex(leafIndex) { + let peakHeight = 0; + while (Math.pow(2, peakHeight) <= leafIndex + 1) { + peakHeight++; + } + return new Position(Math.pow(2, (peakHeight + 1)) - 2, peakHeight, false); + } + static getNodePosition(leafIndex) { + let currentPosition = this.godPeakFromLeafIndex(leafIndex); + let accumulator = 0; + while (currentPosition.h > 0) { + let serviceRange = Math.pow(2, (currentPosition.h - 1)); + if (leafIndex >= accumulator + serviceRange) { + currentPosition = this.rightChildPosition(currentPosition); + accumulator += serviceRange; + } + else { + currentPosition = this.leftChildPosition(currentPosition); + } + } + return currentPosition; + } + static proofPositions(leafIndexes, referenceTreeLength) { + let positions = {}; + let finalPeakPositions = MMR.peakPositions(referenceTreeLength - 1); + // add peak positions + for (let i = 0; i < finalPeakPositions.length; i++) { // log(n)/2 + positions[finalPeakPositions[i].i] = finalPeakPositions[i]; + } + //add local mountain proof positions for each leaf + for (let i = 0; i < leafIndexes.length; i++) { // k*2log(n) + let nodePosition = MMR.getNodePosition(leafIndexes[i]); + let finalLocalPeak = MMR._localPeakPosition(leafIndexes[i], finalPeakPositions); + // positions[finalLocalPeak.i] = finalLocalPeak // ?? should already have all peaks + let mountainPositions = MMR.mountainPositions(finalLocalPeak, nodePosition.i); + for (let j = 0; j < mountainPositions.length; j++) { + positions[mountainPositions[j][0].i] = mountainPositions[j][0]; + positions[mountainPositions[j][1].i] = mountainPositions[j][1]; + } + } + // find implied positions (ones which can be calculated based on child positions that are present) + let positionIndexes = Object.keys(positions); + let impliedIndexes = []; + for (let j = 0; j < positionIndexes.length; j++) { // k*log(n) + if (positions[positionIndexes[j]].h > 0) { + let hasLeftChild = MMR._hasPosition(positions, MMR.leftChildPosition(positions[positionIndexes[j]])); + let hasRightChild = MMR._hasPosition(positions, MMR.rightChildPosition(positions[positionIndexes[j]])); + if (hasLeftChild && hasRightChild) { + impliedIndexes.push(positionIndexes[j]); // don't remove them yet because recursion will be slower + } + } + } + // finally remove implied nodes + for (var i = 0; i < impliedIndexes.length; i++) { // k*log(n) + impliedIndexes[i]; + delete positions[impliedIndexes[i]]; + } + return positions; + } + static _hasPosition(nodes, position) { + let has = !!nodes[position.i]; + if (!has && position.h > 0) { + if (MMR._hasPosition(nodes, MMR.leftChildPosition(position)) + && MMR._hasPosition(nodes, MMR.rightChildPosition(position))) { + has = true; + } + } + return has; + } +} +exports.MMR = MMR; +class MemoryBasedDb { + constructor(...args) { + if (args[0] == undefined || typeof args[0] == 'number') { + this.leafLength = args[0] || 0; + this.nodes = args[1] || {}; + } + } + get(index) { + return __awaiter(this, void 0, void 0, function* () { + return this.nodes[index]; + }); + } + set(value, index) { + return __awaiter(this, void 0, void 0, function* () { + this.nodes[index] = value; + }); + } + getLeafLength() { + return __awaiter(this, void 0, void 0, function* () { + return this.leafLength; + }); + } + setLeafLength(leafLength) { + return __awaiter(this, void 0, void 0, function* () { + return this.leafLength = leafLength; + }); + } + getNodes() { + return __awaiter(this, void 0, void 0, function* () { + return this.nodes; + }); + } +} From 4db33b4f594fc7bcada9867678856e8ff38adcb9 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Fri, 20 Oct 2023 14:10:38 +0100 Subject: [PATCH 035/120] Update Attestation Keys --- dist/pbaas/Identity.js | 30 ++--------- dist/pbaas/TransferDestination.js | 17 +++++-- dist/vdxf/classes/MMR.js | 8 +++ dist/vdxf/keys.d.ts | 1 + dist/vdxf/keys.js | 44 +++++++++++++--- src/__tests__/attestation/attestation.test.ts | 29 +++++------ src/__tests__/pbaas/identity.test.ts | 5 -- src/pbaas/Identity.ts | 28 +--------- src/pbaas/TransferDestination.ts | 16 ++++-- src/vdxf/classes/Attestation.ts | 1 - src/vdxf/classes/MMR.ts | 14 ++++- src/vdxf/keys.ts | 51 ++++++++++++++++--- 12 files changed, 149 insertions(+), 95 deletions(-) diff --git a/dist/pbaas/Identity.js b/dist/pbaas/Identity.js index 2c6471c..ce5cced 100644 --- a/dist/pbaas/Identity.js +++ b/dist/pbaas/Identity.js @@ -6,6 +6,7 @@ const bufferutils_1 = require("../utils/bufferutils"); const Principal_1 = require("./Principal"); const address_1 = require("../utils/address"); const vdxf_1 = require("../constants/vdxf"); +const vdxf_2 = require("../vdxf"); const bn_js_1 = require("bn.js"); const bech32 = require('bech32'); const VERSION_PBAAS = 3; @@ -286,34 +287,13 @@ function contentmultimapFromObject(input) { } return contentmultimap; } -const getbytes_std = function (data) { - var length = 20; - length += 1; // varint length 1 - length += 2; // ss type + ver (lengths) - length += varuint_1.default.encodingLength(Buffer.from(data, 'utf8').length); - length += Buffer.from(data, 'utf8').length; - return length; -}; -const CVDXF_Data = { - iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c: //CVDXF_Data::DataStringKey() - { - "vdxfid": "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c", - "indexid": "xPwgY6oPdusaAgNK3u5yHCQG5NsHEcBpi5", - "hash160result": "e5c061641228a399169211e666de18448b7b8bab", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.string" - }, - getbytes: getbytes_std - } -}; function VectorEncodeVDXFUni(obj) { const keys = Object.keys(obj); const values = keys.map((item) => obj[item]); var bufsize = 0; for (var i = 0; i < keys.length; i++) { - if (CVDXF_Data[keys[i]]) { - bufsize += CVDXF_Data[keys[i]].getbytes(values[i]); + if (vdxf_2.CVDXF_Data[keys[i]]) { + bufsize += vdxf_2.CVDXF_Data[keys[i]].getbytes(values[i]); } else { throw new Error("VDXF key not found: " + keys[i]); @@ -321,8 +301,8 @@ function VectorEncodeVDXFUni(obj) { } const bufferWriter = new BufferWriter(Buffer.alloc(bufsize)); for (var i = 0; i < keys.length; i++) { - if (CVDXF_Data[keys[i]] && CVDXF_Data[keys[i]].qualifiedname.name === "vrsc::data.type.string") { - bufferWriter.writeSlice((0, address_1.fromBase58Check)(CVDXF_Data[keys[i]].vdxfid).hash); + if (vdxf_2.CVDXF_Data[keys[i]] && vdxf_2.CVDXF_Data[keys[i]].qualifiedname.name === "vrsc::data.type.string") { + bufferWriter.writeSlice((0, address_1.fromBase58Check)(vdxf_2.CVDXF_Data[keys[i]].vdxfid).hash); bufferWriter.writeVarInt(new bn_js_1.BN(1)); bufferWriter.writeVarInt(new bn_js_1.BN(Buffer.from(values[i], 'utf8').length + 3)); //NOTE 3 is from ss type + ver + vdxfidver bufferWriter.writeCompactSize(Buffer.from(values[i], 'utf8').length); diff --git a/dist/pbaas/TransferDestination.js b/dist/pbaas/TransferDestination.js index 03145ae..a9b7f41 100644 --- a/dist/pbaas/TransferDestination.js +++ b/dist/pbaas/TransferDestination.js @@ -23,6 +23,7 @@ exports.AST_VALID_TYPE_NO_FLAGS = exports.DEST_RAW; exports.FLAG_DEST_AUX = new bn_js_1.BN(64, 10); exports.FLAG_DEST_GATEWAY = new bn_js_1.BN(128, 10); exports.FLAG_MASK = exports.FLAG_DEST_AUX.add(exports.FLAG_DEST_GATEWAY); +const UINT160_BYTE_SIZE = 20; class TransferDestination { constructor(data) { this.type = exports.DEST_INVALID; @@ -85,8 +86,13 @@ class TransferDestination { length += this.destination_bytes.length; // destination_bytes if (this.isGateway()) { length += (0, address_1.fromBase58Check)(this.gateway_id).hash.length; // gateway_id - length += (0, address_1.fromBase58Check)(this.gateway_code).hash.length; // gateway_code - length += 8; // fees + if (this.gateway_code) { + length += (0, address_1.fromBase58Check)(this.gateway_code).hash.length; // gateway_code + } + else { + length += UINT160_BYTE_SIZE; + } + length += 8; // fees int64 } if (this.hasAuxDests()) { length += varuint_1.default.encodingLength(this.aux_dests.length); // aux dests compact size @@ -104,7 +110,12 @@ class TransferDestination { writer.writeVarSlice(this.destination_bytes); if (this.isGateway()) { writer.writeSlice((0, address_1.fromBase58Check)(this.gateway_id).hash); - writer.writeSlice((0, address_1.fromBase58Check)(this.gateway_code).hash); + if (this.gateway_code) { + writer.writeSlice((0, address_1.fromBase58Check)(this.gateway_code).hash); + } + else { + writer.writeSlice(Buffer.alloc(UINT160_BYTE_SIZE)); + } writer.writeInt64(this.fees); } if (this.hasAuxDests()) { diff --git a/dist/vdxf/classes/MMR.js b/dist/vdxf/classes/MMR.js index d9f5624..ce57712 100644 --- a/dist/vdxf/classes/MMR.js +++ b/dist/vdxf/classes/MMR.js @@ -1,4 +1,12 @@ "use strict"; +// Licence MIT +// Adapted to Verus Blake2b MMR. +// MMR Code is from +//Copyright (c) 2019 Zac Mitton under MIT License +//Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +//documentation files (the "Software"), to deal in the Software without restriction, including without limitation +//the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and +//to permit persons to whom the Software is furnished to do so, subject to the following conditions: var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { diff --git a/dist/vdxf/keys.d.ts b/dist/vdxf/keys.d.ts index eb6412c..dd845b1 100644 --- a/dist/vdxf/keys.d.ts +++ b/dist/vdxf/keys.d.ts @@ -42,3 +42,4 @@ export declare const SIGNED_SESSION_OBJECT_DATA: VDXFKeyInterface; export declare const SIGNED_SESSION_OBJECT: VDXFKeyInterface; export declare const CURRENCY_ADDRESS: VDXFKeyInterface; export declare const ATTESTATION_IDENTITY_DATA: {}; +export declare const CVDXF_Data: {}; diff --git a/dist/vdxf/keys.js b/dist/vdxf/keys.js index d41e45d..bf00b42 100644 --- a/dist/vdxf/keys.js +++ b/dist/vdxf/keys.js @@ -1,6 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.ATTESTATION_IDENTITY_DATA = exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_SIG_VDXF_KEY = void 0; +exports.CVDXF_Data = exports.ATTESTATION_IDENTITY_DATA = exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_SIG_VDXF_KEY = void 0; +const varuint_1 = require("../utils/varuint"); exports.LOGIN_CONSENT_REQUEST_SIG_VDXF_KEY = { vdxfid: "iPi1DPgDDu7hP1mAp5xJ8rHBWwXSzc6yA8", hash160result: "06d4b963da3dcf17f00905b0720f7a4c241defdd", @@ -289,7 +290,8 @@ const IDENTITY_DATA = [ "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", "name": "vrsc::attestations.identitydata.firstname" }, - "detail": "First Name" + "detail": "First Name", + "name": "firstname" }, { "vdxfid": "i3jWsqLVnYyJu78E7mw6pbD3TazwZJpuk4", @@ -298,7 +300,8 @@ const IDENTITY_DATA = [ "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", "name": "vrsc::attestations.identitydata.lastname" }, - "detail": "Last Name" + "detail": "Last Name", + "name": "lastname" }, { "vdxfid": "i9MRw6YUhXtP6DT8eufGnB5oRQ34TjDsdb", @@ -307,7 +310,8 @@ const IDENTITY_DATA = [ "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", "name": "vrsc::attestations.identitydata.attestor" }, - "detail": "Attestor" + "detail": "Attestor", + "name": "attestor" }, { "vdxfid": "iJvFSXk2EDeEu9BkJQSwAVeiochF6AYpfF", @@ -316,7 +320,8 @@ const IDENTITY_DATA = [ "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", "name": "vrsc::attestations.identitydata.identity" }, - "detail": "Identity" + "detail": "Identity", + "name": "identity" }, { "vdxfid": "iLY58rsr39UB8BptNGYX63qPhcpv5N5yuC", @@ -325,9 +330,34 @@ const IDENTITY_DATA = [ "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", "name": "vrsc::attestations.type" }, - "detail": "Document Type" + "detail": "Document Type", + "name": "documenttype" } ]; +// Allow lookup by vdxfid or name exports.ATTESTATION_IDENTITY_DATA = {}; IDENTITY_DATA.forEach((item) => exports.ATTESTATION_IDENTITY_DATA[item.vdxfid] = item); -IDENTITY_DATA.forEach((item) => exports.ATTESTATION_IDENTITY_DATA[item.detail] = item); +IDENTITY_DATA.forEach((item) => exports.ATTESTATION_IDENTITY_DATA[item.name] = item); +const getbytes_std = function (data) { + var length = 20; + length += 1; // varint length 1 + length += 2; // ss type + ver (lengths) + length += varuint_1.default.encodingLength(Buffer.from(data, 'utf8').length); + length += Buffer.from(data, 'utf8').length; + return length; +}; +// Defined CVDXF_Data from main Verus Daemon. +const CVDXF_Data_objects = [ + { + "vdxfid": "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c", + "hash160result": "e5c061641228a399169211e666de18448b7b8bab", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.string" + }, + getbytes: getbytes_std + }, + //TODO: add more types +]; +exports.CVDXF_Data = {}; +CVDXF_Data_objects.forEach((item) => exports.CVDXF_Data[item.vdxfid] = item); diff --git a/src/__tests__/attestation/attestation.test.ts b/src/__tests__/attestation/attestation.test.ts index b697c37..f3c8662 100644 --- a/src/__tests__/attestation/attestation.test.ts +++ b/src/__tests__/attestation/attestation.test.ts @@ -1,11 +1,8 @@ -import { Hash160 } from "../../vdxf/classes/Hash160"; -import { ATTESTATION_READ_REQUEST, IDENTITY_NAME_COMMITMENT_TXID, IDENTITY_REGISTRATION_TXID, IDENTITY_VIEW, ATTESTATION_IDENTITY_DATA, LOGIN_CONSENT_REDIRECT_VDXF_KEY } from "../../vdxf"; +import { ATTESTATION_READ_REQUEST, IDENTITY_VIEW, ATTESTATION_IDENTITY_DATA, LOGIN_CONSENT_REDIRECT_VDXF_KEY } from "../../vdxf"; import { Attestation, LoginConsentRequest, LoginConsentResponse } from "../../vdxf/classes"; -import { ProvisioningInfo, RedirectUri, RequestedPermission, Subject } from "../../vdxf/classes/Challenge"; +import { RedirectUri, RequestedPermission } from "../../vdxf/classes/Challenge"; import { Context } from "../../vdxf/classes/Context"; -import { ProvisioningRequest } from "../../vdxf/classes/provisioning/ProvisioningRequest"; -import { ProvisioningResponse } from "../../vdxf/classes/provisioning/ProvisioningResponse"; -import { ProvisioningResult, ProvisioningTxid } from "../../vdxf/classes/provisioning/ProvisioningResult"; + import { AttestationData } from "../../vdxf/classes/Attestation"; const SIMPLE_ATTESTATION = 1; @@ -24,11 +21,11 @@ describe('Serializes and deserializes attestation request', () => { requested_access: [new RequestedPermission(IDENTITY_VIEW.vdxfid), new RequestedPermission( ATTESTATION_READ_REQUEST.vdxfid, {accepted_attestors:["iC9x9VZ2XMop7spFzeXqSKX8WqmrG9cu41"], attestation_keys:[ - ATTESTATION_IDENTITY_DATA["First Name"].vdxfid, - ATTESTATION_IDENTITY_DATA["Last Name"].vdxfid, - ATTESTATION_IDENTITY_DATA["Attestor"].vdxfid, - ATTESTATION_IDENTITY_DATA["Identity"].vdxfid, - ATTESTATION_IDENTITY_DATA["Document Type"].vdxfid] + ATTESTATION_IDENTITY_DATA["firstname"].vdxfid, + ATTESTATION_IDENTITY_DATA["lastname"].vdxfid, + ATTESTATION_IDENTITY_DATA["attestor"].vdxfid, + ATTESTATION_IDENTITY_DATA["identity"].vdxfid, + ATTESTATION_IDENTITY_DATA["documenttype"].vdxfid] })], session_id: "iRQZGW36o3RcVR1xyVT1qWdAKdxp3wUyrh", redirect_uris: [ @@ -47,11 +44,11 @@ describe('Serializes and deserializes attestation request', () => { const componentsArray = new Array; - componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["First Name"].vdxfid, salt: "8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210", value: "Chris"}) - componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["Last Name"].vdxfid, salt: "7c3920940db4385cd305557a57a8df33346712096e76b58d7c4ace05e17b90a2", value: "Monkins"}) - componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["Identity"].vdxfid, salt: "ce662d61a20ae211728cdb1b924628c84edfe0fcbd59a86f56a125ad73689ac1", value: "chad@"}) - componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["Attestor"].vdxfid, salt: "9067dc6a9b38dd15f985770bb819eb62de39a5d1f0e12f9a4807f78968794af4", value: "valu attestation@"}) - componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["Document Type"].vdxfid, salt: "338b6ad44179f46fc24f3ed01fd247c9664384a71ba5465aebceece8d7c45a0a", value: "KYC Attestation v1"}) + componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["firstname"].vdxfid, salt: "8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210", value: "Chris"}) + componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["lastname"].vdxfid, salt: "7c3920940db4385cd305557a57a8df33346712096e76b58d7c4ace05e17b90a2", value: "Monkins"}) + componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["identity"].vdxfid, salt: "ce662d61a20ae211728cdb1b924628c84edfe0fcbd59a86f56a125ad73689ac1", value: "chad@"}) + componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["attestor"].vdxfid, salt: "9067dc6a9b38dd15f985770bb819eb62de39a5d1f0e12f9a4807f78968794af4", value: "valu attestation@"}) + componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["documenttype"].vdxfid, salt: "338b6ad44179f46fc24f3ed01fd247c9664384a71ba5465aebceece8d7c45a0a", value: "KYC Attestation v1"}) componentsArray.push({type: 2, hash: "b5223370abb0b6d718d03fbef2d68b4b132b48045f3bc20f6d9322f2df74ddc5"}) componentsArray.push({type: 2, hash: "6f2820034cfe309dd66d4503f1e5c06345c6aa3b2b00393a59a19b347ca187ab"}) diff --git a/src/__tests__/pbaas/identity.test.ts b/src/__tests__/pbaas/identity.test.ts index 07481ce..9a6e57a 100644 --- a/src/__tests__/pbaas/identity.test.ts +++ b/src/__tests__/pbaas/identity.test.ts @@ -1,9 +1,4 @@ -import { BN } from "bn.js"; -import { CurrencyValueMap } from "../../pbaas/CurrencyValueMap"; import { Identity } from "../../pbaas/Identity"; -import { BigNumber } from "../../utils/types/BigNumber"; -import { TransferDestination } from "../../pbaas/TransferDestination"; -import { fromBase58Check } from "../../utils/address"; describe('Serializes and deserializes identity properly', () => { test('deserialize id with contentmultimap', async () => { diff --git a/src/pbaas/Identity.ts b/src/pbaas/Identity.ts index b0c5bbe..f45c8c3 100644 --- a/src/pbaas/Identity.ts +++ b/src/pbaas/Identity.ts @@ -4,6 +4,7 @@ import { BigNumber } from '../utils/types/BigNumber'; import { Principal } from './Principal'; import { fromBase58Check, toBase58Check } from '../utils/address'; import { I_ADDR_VERSION } from '../constants/vdxf'; +import { CVDXF_Data } from "../vdxf"; import { R_ADDR_VERSION } from '../constants/vdxf'; import { BN } from 'bn.js'; const bech32 = require('bech32') @@ -318,8 +319,6 @@ function contentmultimapFromObject (input) { try { const key = fromBase58Check(keys[i]).hash; - - if (key != null) { if (Array.isArray(values[i])) @@ -330,7 +329,6 @@ function contentmultimapFromObject (input) { var items = []; if (typeof oneValue == "string") { - items.push(Buffer.from(oneValue, 'hex')); } else if (typeof oneValue == "object") @@ -392,28 +390,6 @@ function contentmultimapFromObject (input) { return contentmultimap; } -const getbytes_std = function (data){ - var length = 20; - length += 1; // varint length 1 - length += 2; // ss type + ver (lengths) - length += varuint.encodingLength(Buffer.from(data, 'utf8').length); - length += Buffer.from(data, 'utf8').length; - return length; - } -const CVDXF_Data = { - iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c: //CVDXF_Data::DataStringKey() - { - "vdxfid": "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c", - "indexid": "xPwgY6oPdusaAgNK3u5yHCQG5NsHEcBpi5", - "hash160result": "e5c061641228a399169211e666de18448b7b8bab", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.string" - }, - getbytes: getbytes_std - } -} - function VectorEncodeVDXFUni (obj) { const keys = Object.keys(obj); @@ -421,7 +397,7 @@ function VectorEncodeVDXFUni (obj) { var bufsize = 0; for (var i = 0; i < keys.length; i++) { if (CVDXF_Data[keys[i]] ) { - bufsize+= CVDXF_Data[keys[i]].getbytes(values[i]); + bufsize += CVDXF_Data[keys[i]].getbytes(values[i]); } else { throw new Error("VDXF key not found: " + keys[i]) } diff --git a/src/pbaas/TransferDestination.ts b/src/pbaas/TransferDestination.ts index bc8c5d2..a65c092 100644 --- a/src/pbaas/TransferDestination.ts +++ b/src/pbaas/TransferDestination.ts @@ -23,6 +23,8 @@ export const FLAG_DEST_AUX = new BN(64, 10) export const FLAG_DEST_GATEWAY = new BN(128, 10) export const FLAG_MASK = FLAG_DEST_AUX.add(FLAG_DEST_GATEWAY) +const UINT160_BYTE_SIZE = 20; + export class TransferDestination { type: BigNumber; destination_bytes: Buffer; @@ -94,8 +96,12 @@ export class TransferDestination { if (this.isGateway()) { length += fromBase58Check(this.gateway_id).hash.length; // gateway_id - length += fromBase58Check(this.gateway_code).hash.length; // gateway_code - length += 8 // fees + if (this.gateway_code) { + length += fromBase58Check(this.gateway_code).hash.length; // gateway_code + } else { + length += UINT160_BYTE_SIZE + } + length += 8 // fees int64 } if (this.hasAuxDests()) { @@ -120,7 +126,11 @@ export class TransferDestination { if (this.isGateway()) { writer.writeSlice(fromBase58Check(this.gateway_id).hash); - writer.writeSlice(fromBase58Check(this.gateway_code).hash); + if (this.gateway_code) { + writer.writeSlice(fromBase58Check(this.gateway_code).hash); + } else { + writer.writeSlice(Buffer.alloc(UINT160_BYTE_SIZE)); + } writer.writeInt64(this.fees); } diff --git a/src/vdxf/classes/Attestation.ts b/src/vdxf/classes/Attestation.ts index 0e9efed..45df531 100644 --- a/src/vdxf/classes/Attestation.ts +++ b/src/vdxf/classes/Attestation.ts @@ -46,7 +46,6 @@ export class Attestation extends VDXFObject { } - dataByteLength(): number { let byteLength = 0; diff --git a/src/vdxf/classes/MMR.ts b/src/vdxf/classes/MMR.ts index a0e4c50..249d8f4 100644 --- a/src/vdxf/classes/MMR.ts +++ b/src/vdxf/classes/MMR.ts @@ -1,3 +1,13 @@ +// Licence MIT +// Adapted to Verus Blake2b MMR. +// MMR Code is from +//Copyright (c) 2019 Zac Mitton under MIT License +//Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +//documentation files (the "Software"), to deal in the Software without restriction, including without limitation +//the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and +//to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + const { Lock } = require('semaphore-async-await') import { blake2b } from '@noble/hashes/blake2b' @@ -12,7 +22,6 @@ class Position{ } } - export class MMR{ lock: any; _leafLength: number; @@ -26,7 +35,6 @@ export class MMR{ digest(input){ return blake2b(Buffer.concat([...input]), {dkLen: 32, personalization: "VerusDefaultHash"}) - } async get(leafIndex){ @@ -44,6 +52,7 @@ export class MMR{ } return leafValue } + async _get(nodePosition){ let nodeValue await this.lock.acquire() @@ -66,6 +75,7 @@ export class MMR{ } return nodeValue } + async append(value, leafIndex){ await this.lock.acquire() try{ diff --git a/src/vdxf/keys.ts b/src/vdxf/keys.ts index 8edfc6f..bab33b5 100644 --- a/src/vdxf/keys.ts +++ b/src/vdxf/keys.ts @@ -1,3 +1,4 @@ +import varuint from '../utils/varuint' export interface VDXFKeyInterface { vdxfid: string; hash160result: string; @@ -334,6 +335,7 @@ export const CURRENCY_ADDRESS: VDXFKeyInterface = { interface VDXFIdentityData extends VDXFKeyInterface { detail: string; + name: string; } const IDENTITY_DATA: VDXFIdentityData[] = [ @@ -344,7 +346,8 @@ const IDENTITY_DATA: VDXFIdentityData[] = [ "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", "name": "vrsc::attestations.identitydata.firstname" }, - "detail": "First Name" + "detail": "First Name", + "name": "firstname" }, { "vdxfid": "i3jWsqLVnYyJu78E7mw6pbD3TazwZJpuk4", @@ -353,7 +356,8 @@ const IDENTITY_DATA: VDXFIdentityData[] = [ "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", "name": "vrsc::attestations.identitydata.lastname" }, - "detail": "Last Name" + "detail": "Last Name", + "name": "lastname" }, { "vdxfid": "i9MRw6YUhXtP6DT8eufGnB5oRQ34TjDsdb", @@ -362,7 +366,8 @@ const IDENTITY_DATA: VDXFIdentityData[] = [ "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", "name": "vrsc::attestations.identitydata.attestor" }, - "detail": "Attestor" + "detail": "Attestor", + "name": "attestor" }, { "vdxfid": "iJvFSXk2EDeEu9BkJQSwAVeiochF6AYpfF", @@ -371,7 +376,8 @@ const IDENTITY_DATA: VDXFIdentityData[] = [ "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", "name": "vrsc::attestations.identitydata.identity" }, - "detail": "Identity" + "detail": "Identity", + "name": "identity" }, { "vdxfid": "iLY58rsr39UB8BptNGYX63qPhcpv5N5yuC", @@ -380,10 +386,41 @@ const IDENTITY_DATA: VDXFIdentityData[] = [ "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", "name": "vrsc::attestations.type" }, - "detail": "Document Type" + "detail": "Document Type", + "name": "documenttype" } ] - +// Allow lookup by vdxfid or name export const ATTESTATION_IDENTITY_DATA = {}; IDENTITY_DATA.forEach((item) => ATTESTATION_IDENTITY_DATA[item.vdxfid] = item) -IDENTITY_DATA.forEach((item) => ATTESTATION_IDENTITY_DATA[item.detail] = item) \ No newline at end of file +IDENTITY_DATA.forEach((item) => ATTESTATION_IDENTITY_DATA[item.name] = item) + +const getbytes_std = function (data){ + var length = 20; + length += 1; // varint length 1 + length += 2; // ss type + ver (lengths) + length += varuint.encodingLength(Buffer.from(data, 'utf8').length); + length += Buffer.from(data, 'utf8').length; + return length; +} + +interface CVDXFData extends VDXFKeyInterface { + getbytes: Function +} + +// Defined CVDXF_Data from main Verus Daemon. +const CVDXF_Data_objects: CVDXFData[] = [ + { + "vdxfid": "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c", + "hash160result": "e5c061641228a399169211e666de18448b7b8bab", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.string" + }, + getbytes: getbytes_std + }, + //TODO: add more types +] + +export const CVDXF_Data = {}; +CVDXF_Data_objects.forEach((item) => CVDXF_Data[item.vdxfid] = item); From ad6359229ccd41998f7ffe49c2d5c7b666d5d57f Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Fri, 20 Oct 2023 14:13:30 +0100 Subject: [PATCH 036/120] Updates to Compactsize --- dist/vdxf/classes/Challenge.js | 3 +-- dist/vdxf/classes/Decision.js | 3 +-- dist/vdxf/index.js | 5 +---- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index 34ef044..93a3492 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -217,8 +217,7 @@ class Challenge extends __1.VDXFObject { throw new Error("Alt auth factors currently unsupported"); } this.attestations = []; - - const attestationsLength = reader.readVarInt(); + const attestationsLength = reader.readCompactSize(); for (let i = 0; i < attestationsLength; i++) { const _att = new Attestation_1.Attestation(); reader.offset = _att.fromBuffer(reader.buffer, reader.offset); diff --git a/dist/vdxf/classes/Decision.js b/dist/vdxf/classes/Decision.js index 83c6996..083e028 100644 --- a/dist/vdxf/classes/Decision.js +++ b/dist/vdxf/classes/Decision.js @@ -83,8 +83,7 @@ class Decision extends __1.VDXFObject { if (this.vdxfkey === __1.LOGIN_CONSENT_DECISION_VDXF_KEY.vdxfid) { this.skipped = reader.readUInt8() === 1 ? true : false; this.attestations = []; - - const attestationsLength = reader.readVarInt(); + const attestationsLength = reader.readCompactSize(); for (let i = 0; i < attestationsLength; i++) { const _att = new Attestation_1.Attestation(); reader.offset = _att.fromBuffer(reader.buffer, reader.offset); diff --git a/dist/vdxf/index.js b/dist/vdxf/index.js index 92baa7b..88ed28e 100644 --- a/dist/vdxf/index.js +++ b/dist/vdxf/index.js @@ -72,10 +72,7 @@ class VDXFObject { const writer = new bufferutils_1.default.BufferWriter(buffer); writer.writeSlice(key.hash); writer.writeVarInt(new bn_js_1.BN(this.version, 10)); - if (dataLength) { - writer.writeVarSlice(this.toDataBuffer()); - } - + writer.writeVarSlice(this.toDataBuffer()); return writer.buffer; } toSha256() { From 50264f0c5a1a1fd8f822fb208b2e707d9bba9880 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Mon, 6 Nov 2023 19:51:11 +0000 Subject: [PATCH 037/120] Updates from merge --- dist/vdxf/classes/Challenge.js | 3 +-- dist/vdxf/classes/Decision.js | 3 +-- dist/vdxf/index.js | 5 +---- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index 34ef044..93a3492 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -217,8 +217,7 @@ class Challenge extends __1.VDXFObject { throw new Error("Alt auth factors currently unsupported"); } this.attestations = []; - - const attestationsLength = reader.readVarInt(); + const attestationsLength = reader.readCompactSize(); for (let i = 0; i < attestationsLength; i++) { const _att = new Attestation_1.Attestation(); reader.offset = _att.fromBuffer(reader.buffer, reader.offset); diff --git a/dist/vdxf/classes/Decision.js b/dist/vdxf/classes/Decision.js index 83c6996..083e028 100644 --- a/dist/vdxf/classes/Decision.js +++ b/dist/vdxf/classes/Decision.js @@ -83,8 +83,7 @@ class Decision extends __1.VDXFObject { if (this.vdxfkey === __1.LOGIN_CONSENT_DECISION_VDXF_KEY.vdxfid) { this.skipped = reader.readUInt8() === 1 ? true : false; this.attestations = []; - - const attestationsLength = reader.readVarInt(); + const attestationsLength = reader.readCompactSize(); for (let i = 0; i < attestationsLength; i++) { const _att = new Attestation_1.Attestation(); reader.offset = _att.fromBuffer(reader.buffer, reader.offset); diff --git a/dist/vdxf/index.js b/dist/vdxf/index.js index 92baa7b..88ed28e 100644 --- a/dist/vdxf/index.js +++ b/dist/vdxf/index.js @@ -72,10 +72,7 @@ class VDXFObject { const writer = new bufferutils_1.default.BufferWriter(buffer); writer.writeSlice(key.hash); writer.writeVarInt(new bn_js_1.BN(this.version, 10)); - if (dataLength) { - writer.writeVarSlice(this.toDataBuffer()); - } - + writer.writeVarSlice(this.toDataBuffer()); return writer.buffer; } toSha256() { From b790b507b4a48e02975bbca476be2a2529436081 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Tue, 7 Nov 2023 10:22:20 +0000 Subject: [PATCH 038/120] Update Blake2b library --- dist/vdxf/classes/Attestation.d.ts | 2 +- dist/vdxf/classes/MMR.d.ts | 4 +- dist/vdxf/classes/MMR.js | 5 +- package.json | 4 +- src/vdxf/classes/MMR.ts | 5 +- yarn.lock | 402 ++++++++++++++++++++++++++++- 6 files changed, 408 insertions(+), 14 deletions(-) diff --git a/dist/vdxf/classes/Attestation.d.ts b/dist/vdxf/classes/Attestation.d.ts index a488f74..f6dd8ca 100644 --- a/dist/vdxf/classes/Attestation.d.ts +++ b/dist/vdxf/classes/Attestation.d.ts @@ -28,7 +28,7 @@ export declare class Attestation extends VDXFObject { toDataBuffer(): Buffer; fromDataBuffer(buffer: Buffer, offset?: number): number; getMMR(): Promise; - routeHash(): Promise; + routeHash(): Promise; getHash(n: AttestationData): Buffer; sortHashes(): Array; } diff --git a/dist/vdxf/classes/MMR.d.ts b/dist/vdxf/classes/MMR.d.ts index 775bdba..c5305e0 100644 --- a/dist/vdxf/classes/MMR.d.ts +++ b/dist/vdxf/classes/MMR.d.ts @@ -10,12 +10,12 @@ export declare class MMR { _leafLength: number; db: any; constructor(db?: MemoryBasedDb); - digest(input: any): Uint8Array; + digest(input: any): any; get(leafIndex: any): Promise; _get(nodePosition: any): Promise; append(value: any, leafIndex: any): Promise; appendMany(values: any, startLeafIndex: any): Promise; - getRoot(leafIndex?: number): Promise; + getRoot(leafIndex?: number): Promise; getNodeLength(): Promise; getLeafLength(): Promise; delete(leafIndex: any): Promise; diff --git a/dist/vdxf/classes/MMR.js b/dist/vdxf/classes/MMR.js index ce57712..7835c21 100644 --- a/dist/vdxf/classes/MMR.js +++ b/dist/vdxf/classes/MMR.js @@ -19,7 +19,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge Object.defineProperty(exports, "__esModule", { value: true }); exports.MMR = void 0; const { Lock } = require('semaphore-async-await'); -const blake2b_1 = require("@noble/hashes/blake2b"); +const blake2b = require('@bitgo/blake2b'); class Position { constructor(index, height, rightness) { this.i = index; @@ -33,7 +33,8 @@ class MMR { this.lock = new Lock(1); } digest(input) { - return (0, blake2b_1.blake2b)(Buffer.concat([...input]), { dkLen: 32, personalization: "VerusDefaultHash" }); + var out = Buffer.allocUnsafe(32); + return blake2b(out.length, null, null, Buffer.from("VerusDefaultHash")).update(Buffer.concat([...input])).digest(out); } get(leafIndex) { return __awaiter(this, void 0, void 0, function* () { diff --git a/package.json b/package.json index b6c2c6e..71ea757 100644 --- a/package.json +++ b/package.json @@ -24,8 +24,8 @@ "bech32": "^2.0.0", "bn.js": "5.2.1", "bs58check": "https://github.com/bitcoinjs/bs58check", - "create-hash": "1.2.0", - "semaphore-async-await": "^1.5.1" + "semaphore-async-await": "^1.5.1", + "@bitgo/utxo-lib": "git+https://github.com/VerusCoin/BitGoJS.git#7c754d4a5920198d9fe6827d3e23bd5cf431f264" }, "devDependencies": { "@types/bn.js": "5.1.1", diff --git a/src/vdxf/classes/MMR.ts b/src/vdxf/classes/MMR.ts index 249d8f4..15c059d 100644 --- a/src/vdxf/classes/MMR.ts +++ b/src/vdxf/classes/MMR.ts @@ -9,7 +9,7 @@ const { Lock } = require('semaphore-async-await') -import { blake2b } from '@noble/hashes/blake2b' +const blake2b = require('@bitgo/blake2b') class Position{ i: any @@ -34,7 +34,8 @@ export class MMR{ } digest(input){ - return blake2b(Buffer.concat([...input]), {dkLen: 32, personalization: "VerusDefaultHash"}) + var out = Buffer.allocUnsafe(32) + return blake2b(out.length, null, null, Buffer.from("VerusDefaultHash")).update(Buffer.concat([...input])).digest(out) } async get(leafIndex){ diff --git a/yarn.lock b/yarn.lock index 2288350..da04239 100644 --- a/yarn.lock +++ b/yarn.lock @@ -292,6 +292,47 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== +"@bitgo/blake2b-wasm@^3.0.1": + version "3.2.3" + resolved "https://registry.yarnpkg.com/@bitgo/blake2b-wasm/-/blake2b-wasm-3.2.3.tgz#6ae5e942f2a5fd5b3ed27103af5df0ed50adfbc9" + integrity sha512-NaurBrMaEpjfg7EdUJgW/c6byt27O6q1ZaxB5Ita10MjjYjUu0SyYF4q7JPNxpHF/lMxb0YZakOxigbDBu9Jjw== + dependencies: + nanoassert "^1.0.0" + +"@bitgo/blake2b@3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@bitgo/blake2b/-/blake2b-3.0.1.tgz#d9f2893420c1d4861fea0e05d775afd99a191b00" + integrity sha512-+Neg+nsqUhYOPlvyITHXYzKUTJofyxYdLQTzNjufamifBzxLGTpgn2KKUfvGNsGovlUYzlyPZj+CB6je2D7mhw== + dependencies: + "@bitgo/blake2b-wasm" "^3.0.1" + nanoassert "^2.0.0" + +"@bitgo/utxo-lib@git+https://github.com/VerusCoin/BitGoJS.git#7c754d4a5920198d9fe6827d3e23bd5cf431f264": + version "1.9.6" + resolved "git+https://github.com/VerusCoin/BitGoJS.git#7c754d4a5920198d9fe6827d3e23bd5cf431f264" + dependencies: + "@bitgo/blake2b" "3.0.1" + bech32 "0.0.3" + bigi "1.4.0" + bip32 "2.0.6" + bip66 "1.1.0" + bitcoin-ops "git+https://github.com/VerusCoin/bitcoin-ops" + bs58check "2.0.0" + create-hash "1.1.0" + create-hmac "1.1.3" + debug "~3.1.0" + ecurve "1.0.0" + merkle-lib "2.0.10" + pushdata-bitcoin "1.0.1" + randombytes "2.0.1" + safe-buffer "5.0.1" + typeforce "1.11.3" + varuint-bitcoin "1.0.4" + verus-typescript-primitives "https://github.com/VerusCoin/verus-typescript-primitives.git" + wif "2.0.1" + optionalDependencies: + secp256k1 "3.5.2" + "@eslint-community/eslint-utils@^4.2.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" @@ -717,6 +758,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-20.3.1.tgz#e8a83f1aa8b649377bb1fb5d7bac5cb90e784dfe" integrity sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg== +"@types/node@10.12.18": + version "10.12.18" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.18.tgz#1d3ca764718915584fcd9f6344621b7672665c67" + integrity sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ== + "@types/node@18.7.22": version "18.7.22" resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.22.tgz#76f7401362ad63d9d7eefa7dcdfa5fcd9baddff3" @@ -1018,6 +1064,18 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== +base-x@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-1.1.0.tgz#42d3d717474f9ea02207f6d1aa1f426913eeb7ac" + integrity sha512-c0WLeG3K5OlL4Skz2/LVdS+MjggByKhowxQpG+JpCLA48s/bGwIDyzA1naFjywtNvp/37fLK0p0FpjTNNLLUXQ== + +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" + base-x@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/base-x/-/base-x-4.0.0.tgz#d0e3b7753450c73f8ad2389b5c018a4af7b2224a" @@ -1028,16 +1086,72 @@ base64url@3.0.1: resolved "https://registry.yarnpkg.com/base64url/-/base64url-3.0.1.tgz#6399d572e2bc3f90a9a8b22d5dbb0a32d33f788d" integrity sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A== +bech32@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/bech32/-/bech32-0.0.3.tgz#736747c4a6531c5d8937d0400498de30e93b2f9c" + integrity sha512-O+K1w8P/aAOLcYwwQ4sbiPYZ51ZIW95lnS4/6nE8Aib/z+OOddQIIPdu2qi94qGDp4HhYy/wJotttXKkak1lXg== + bech32@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/bech32/-/bech32-2.0.0.tgz#078d3686535075c8c79709f054b1b226a133b355" integrity sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg== +bigi@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/bigi/-/bigi-1.4.0.tgz#90ac1aeac0a531216463bdb58f42c1e05c8407ac" + integrity sha512-TUFZGBZiOE98fuGBot6SKLQPFmRkXyeyOybmE8XMUDsrwP380cFh8qs7VX8C2CLj73OYW7+sgCStfL3ySy+Ozg== + +bigi@^1.1.0: + version "1.4.2" + resolved "https://registry.yarnpkg.com/bigi/-/bigi-1.4.2.tgz#9c665a95f88b8b08fc05cfd731f561859d725825" + integrity sha512-ddkU+dFIuEIW8lE7ZwdIAf2UPoM90eaprg5m3YXAVVTmKlqV/9BX4A2M8BOK2yOq6/VgZFVhK6QAxJebhlbhzw== + +bindings@^1.2.1, bindings@^1.3.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + +bip32@2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/bip32/-/bip32-2.0.6.tgz#6a81d9f98c4cd57d05150c60d8f9e75121635134" + integrity sha512-HpV5OMLLGTjSVblmrtYRfFFKuQB+GArM0+XP8HGWfJ5vxYBqo+DesvJwOdC2WJ3bCkZShGf0QIfoIpeomVzVdA== + dependencies: + "@types/node" "10.12.18" + bs58check "^2.1.1" + create-hash "^1.2.0" + create-hmac "^1.1.7" + tiny-secp256k1 "^1.1.3" + typeforce "^1.11.5" + wif "^2.0.6" + +bip66@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/bip66/-/bip66-1.1.0.tgz#c5551d49d1696d78211be047e997fe7aac8820c5" + integrity sha512-dBoAPJYg6HaaQeJGr4cNiqat1meGzlrv2qX+EJcW5q0zEdryMSLKlQKdTaCtDnrzEUPkwmlYqsD7ANaye4BEfg== + +bip66@^1.1.3: + version "1.1.5" + resolved "https://registry.yarnpkg.com/bip66/-/bip66-1.1.5.tgz#01fa8748785ca70955d5011217d1b3139969ca22" + integrity sha512-nemMHz95EmS38a26XbbdxIYj5csHd3RMP3H5bwQknX0WYHF01qhpufP42mLOwVICuH2JmhIhXiWs89MfUGL7Xw== + dependencies: + safe-buffer "^5.0.1" + +bitcoin-ops@^1.3.0, "bitcoin-ops@git+https://github.com/VerusCoin/bitcoin-ops": + version "1.4.1" + resolved "git+https://github.com/VerusCoin/bitcoin-ops#a5f8f56e658301bc39881d41740b3a0010530efd" + bn.js@5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== +bn.js@^4.11.3, bn.js@^4.11.8, bn.js@^4.11.9: + version "4.12.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" + integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -1053,6 +1167,23 @@ braces@^3.0.2: dependencies: fill-range "^7.0.1" +brorand@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== + +browserify-aes@^1.0.6: + version "1.2.0" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + browserslist@^4.21.3: version "4.21.9" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.9.tgz#e11bdd3c313d7e2a9e87e8b4b0c7872b13897635" @@ -1070,6 +1201,20 @@ bs-logger@0.x: dependencies: fast-json-stable-stringify "2.x" +bs58@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-3.1.0.tgz#d4c26388bf4804cac714141b1945aa47e5eb248e" + integrity sha512-9C2bRFTGy3meqO65O9jLvVTyawvhLVp4h2ECm5KlRPuV5KPDNJZcJIj3gl+aA0ENXcYrUSLCkPAeqbTcI2uWyQ== + dependencies: + base-x "^1.1.0" + +bs58@^4.0.0: + 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" + bs58@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/bs58/-/bs58-5.0.0.tgz#865575b4d13c09ea2a84622df6c8cbeb54ffc279" @@ -1077,6 +1222,31 @@ bs58@^5.0.0: dependencies: base-x "^4.0.0" +bs58check@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.0.0.tgz#b70fffd80bc72de18a040a547d7e5e08ce1b1e4e" + integrity sha512-afttdRHvL1HCgBJqcMtoRXe8xCQ7fbUidoLp1JTRXT4bAvtfDyZx7mb79w82XkcdIFFstG3A4NhKOBdEsLbQbw== + dependencies: + bs58 "^4.0.0" + create-hash "^1.1.0" + +bs58check@<3.0.0, bs58check@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" + integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== + dependencies: + bs58 "^4.0.0" + create-hash "^1.1.0" + safe-buffer "^5.1.2" + +bs58check@^1.0.6: + version "1.3.4" + resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-1.3.4.tgz#c52540073749117714fa042c3047eb8f9151cbf8" + integrity sha512-+cZ/mYuyfHboELKvDTYF6onDT4XEgbM9kBsKW91q2YlyDsGRpgT/O6pU4ws5n+LD38XAiD7LChgB3+NBqMGk6g== + dependencies: + bs58 "^3.1.0" + create-hash "^1.1.0" + "bs58check@https://github.com/bitcoinjs/bs58check": version "3.0.1" resolved "https://github.com/bitcoinjs/bs58check#0ddbd3e0813c22a6aef85313916fdab71f479aa9" @@ -1096,6 +1266,11 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== + callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -1143,7 +1318,7 @@ ci-info@^3.2.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.8.0.tgz#81408265a5380c929f0bc665d62256628ce9ef91" integrity sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw== -cipher-base@^1.0.1: +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== @@ -1209,7 +1384,16 @@ convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== -create-hash@1.2.0: +create-hash@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.0.tgz#c2ab96b5d4ece5f22df2ef4306803d14da6931e7" + integrity sha512-We+Cyev4lG5VlvuSRkNkOhSMu8l2QoMgQR8e/j/fYUQvleXXtF/9apzzLZF9plriySKWQ5cW/PUx3RSTcKMqTA== + dependencies: + inherits "^2.0.1" + ripemd160 "^1.0.0" + sha.js "^2.3.6" + +create-hash@1.2.0, create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== @@ -1220,6 +1404,26 @@ create-hash@1.2.0: ripemd160 "^2.0.1" sha.js "^2.4.0" +create-hmac@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.3.tgz#29843e9c191ba412ab001bc55ac8b8b9ae54b670" + integrity sha512-WAh5X07rFIM0EZ166unEOAMdrPWcg7A6alzdqIRNnMn8woJnZfKUFOBpAIzOEzrn1ouRjRv+O+gcESddnN/Xlw== + dependencies: + create-hash "^1.1.0" + inherits "^2.0.1" + +create-hmac@^1.1.4, create-hmac@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" @@ -1236,6 +1440,13 @@ debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: dependencies: ms "2.1.2" +debug@~3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" + dedent@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" @@ -1275,11 +1486,40 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" +drbg.js@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/drbg.js/-/drbg.js-1.0.1.tgz#3e36b6c42b37043823cdbc332d58f31e2445480b" + integrity sha512-F4wZ06PvqxYLFEZKkFxTDcns9oFNk34hvmJSEwdzsxVQ8YI5YaxtACgQatkYgv2VI2CFkUd2Y+xosPQnHv809g== + dependencies: + browserify-aes "^1.0.6" + create-hash "^1.1.2" + create-hmac "^1.1.4" + +ecurve@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/ecurve/-/ecurve-1.0.0.tgz#32cfd5ce5f421e9351206a33d4e3cfd36f3465a4" + integrity sha512-gwAh/B9hSnkq5SssZhJnXaXHcKrBK2tCh76G12+BXXjqLH4Kx1QBALz9IszvUtrxhM9+SBXx6fU0dW4WDBk2pA== + dependencies: + bigi "^1.1.0" + electron-to-chromium@^1.4.431: version "1.4.435" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.435.tgz#761c34300603b9f1234f0b6155870d3002435db6" integrity sha512-B0CBWVFhvoQCW/XtjRzgrmqcgVWg6RXOEM/dK59+wFV93BFGR6AeNKc4OyhM+T3IhJaOOG8o/V+33Y2mwJWtzw== +elliptic@^6.2.3, elliptic@^6.4.0: + version "6.5.4" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" + integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== + dependencies: + bn.js "^4.11.9" + brorand "^1.1.0" + hash.js "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" + emittery@^0.10.2: version "0.10.2" resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.10.2.tgz#902eec8aedb8c41938c46e9385e9db7e03182933" @@ -1441,6 +1681,14 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== +evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + execa@^5.0.0: version "5.1.1" resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" @@ -1519,6 +1767,11 @@ file-entry-cache@^6.0.1: dependencies: flat-cache "^3.0.4" +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== + fill-range@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" @@ -1668,6 +1921,23 @@ hash-base@^3.0.0: readable-stream "^3.6.0" safe-buffer "^5.2.0" +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +hmac-drbg@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + html-escaper@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" @@ -2303,6 +2573,11 @@ merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== +merkle-lib@2.0.10: + version "2.0.10" + resolved "https://registry.yarnpkg.com/merkle-lib/-/merkle-lib-2.0.10.tgz#82b8dbae75e27a7785388b73f9d7725d0f6f3326" + integrity sha512-XrNQvUbn1DL5hKNe46Ccs+Tu3/PYOlrcZILuGUhb95oKBPjc/nmIC8D462PQkipVDGKRvwhn+QFg2cCdIvmDJA== + micromatch@^4.0.4: version "4.0.5" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" @@ -2316,6 +2591,16 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== + 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" @@ -2323,11 +2608,31 @@ minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +nan@^2.13.2, nan@^2.2.1: + version "2.18.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.18.0.tgz#26a6faae7ffbeb293a39660e88a76b82e30b7554" + integrity sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w== + +nanoassert@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/nanoassert/-/nanoassert-1.1.0.tgz#4f3152e09540fde28c76f44b19bbcd1d5a42478d" + integrity sha512-C40jQ3NzfkP53NsO8kEOFd79p4b9kDXQMwgiY1z8ZwrDZgUyom0AHwGegF4Dm99L+YoYhuaB0ceerUcXmqr1rQ== + +nanoassert@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/nanoassert/-/nanoassert-2.0.0.tgz#a05f86de6c7a51618038a620f88878ed1e490c09" + integrity sha512-7vO7n28+aYO4J+8w96AzhmU8G+Y/xpPDJz/se19ICsqj/momRbb9mh9ZUtkoJ5X3nTnPdhEJyc0qnM6yAsHBaA== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -2504,11 +2809,23 @@ punycode@^2.1.0: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== +pushdata-bitcoin@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/pushdata-bitcoin/-/pushdata-bitcoin-1.0.1.tgz#15931d3cd967ade52206f523aa7331aef7d43af7" + integrity sha512-hw7rcYTJRAl4olM8Owe8x0fBuJJ+WGbMhQuLWOXEMN3PxPCKQHRkhfL+XG0+iXUmSHjkMmb3Ba55Mt21cZc9kQ== + dependencies: + bitcoin-ops "^1.3.0" + queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== +randombytes@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.1.tgz#18f4a9ba0dd07bdb1580bc9156091fcf90eabc6f" + integrity sha512-siCt2duOdZbmvgk8IDL4U0SYXI8ypBEKWuor0qUpHBWAyOCrXQvSIYJ+VKuEpoX36moZ1pAu+mXkwUVAVssu6w== + react-is@^18.0.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" @@ -2576,7 +2893,12 @@ rimraf@^3.0.0, rimraf@^3.0.2: dependencies: glob "^7.1.3" -ripemd160@^2.0.1: +ripemd160@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-1.0.1.tgz#93a4bbd4942bc574b69a8fa57c71de10ecca7d6e" + integrity sha512-J0YlH2ow/i7d5PJX9RC1XnjmZc7cNNYWe89PIlFszvHeiEtxzA1/VYePkjQ7l1SkUejAcHeDo3IVp2WIzstXXQ== + +ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== @@ -2591,11 +2913,30 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: +safe-buffer@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" + integrity sha512-cr7dZWLwOeaFBLTIuZeYdkfO7UzGIKhjYENJFAxUOMKWGaWDm2nJM2rzxNRm5Owu0DH3ApwNo6kx5idXZfb/Iw== + +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== +secp256k1@3.5.2: + version "3.5.2" + resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-3.5.2.tgz#f95f952057310722184fe9c914e6b71281f2f2ae" + integrity sha512-iin3kojdybY6NArd+UFsoTuapOF7bnJNf2UbcWXaY3z+E1sJDipl60vtzB5hbO/uquBu7z0fd4VC4Irp+xoFVQ== + dependencies: + bindings "^1.2.1" + bip66 "^1.1.3" + bn.js "^4.11.3" + create-hash "^1.1.2" + drbg.js "^1.0.1" + elliptic "^6.2.3" + nan "^2.2.1" + safe-buffer "^5.1.0" + semaphore-async-await@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/semaphore-async-await/-/semaphore-async-await-1.5.1.tgz#857bef5e3644601ca4b9570b87e9df5ca12974fa" @@ -2613,7 +2954,7 @@ semver@^6.0.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -sha.js@^2.4.0: +sha.js@^2.3.6, sha.js@^2.4.0, sha.js@^2.4.8: version "2.4.11" resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== @@ -2775,6 +3116,17 @@ text-table@^0.2.0: resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== +tiny-secp256k1@^1.1.3: + version "1.1.6" + resolved "https://registry.yarnpkg.com/tiny-secp256k1/-/tiny-secp256k1-1.1.6.tgz#7e224d2bee8ab8283f284e40e6b4acb74ffe047c" + integrity sha512-FmqJZGduTyvsr2cF3375fqGHUovSwDi/QytexX1Se4BPuPZpTE5Ftp5fg+EFSuEf3lhZqgCRjEG3ydUQ/aNiwA== + dependencies: + bindings "^1.3.0" + bn.js "^4.11.8" + create-hmac "^1.1.7" + elliptic "^6.4.0" + nan "^2.13.2" + tmpl@1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" @@ -2840,6 +3192,18 @@ type-fest@^0.21.3: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== +typeforce@1.11.3: + version "1.11.3" + resolved "https://registry.yarnpkg.com/typeforce/-/typeforce-1.11.3.tgz#a54d0ff58808788fba358020982270bd6995d8e4" + integrity sha512-+vllWbxe1AKLkO3KNyZPjb51NRHwRE/8bAi/cmF6TK24VqrPiQPRiHrFV19j1xHxxCHQbIvN4Zfco+skuiXSWQ== + dependencies: + inherits "^2.0.1" + +typeforce@^1.11.5: + version "1.18.0" + resolved "https://registry.yarnpkg.com/typeforce/-/typeforce-1.18.0.tgz#d7416a2c5845e085034d70fcc5b6cc4a90edbfdc" + integrity sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g== + typescript@4.7.4: version "4.7.4" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" @@ -2879,6 +3243,20 @@ v8-to-istanbul@^9.0.1: "@types/istanbul-lib-coverage" "^2.0.1" convert-source-map "^1.6.0" +varuint-bitcoin@1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/varuint-bitcoin/-/varuint-bitcoin-1.0.4.tgz#d812c5dae16e32f60544b6adee1d4be1307d0283" + integrity sha512-2nW4pVicYWxOMY1u+3T3eFXw24wbFlKz+ug7hd02rozYmeFVBoC6LB7/P4E46jN9aD1ezhX01g2Uh4zrZ+9RWw== + +"verus-typescript-primitives@https://github.com/VerusCoin/verus-typescript-primitives.git": + version "1.0.0" + resolved "https://github.com/VerusCoin/verus-typescript-primitives.git#e73d773118177f495ecc100fa2aacb741a04905a" + dependencies: + base64url "3.0.1" + bn.js "5.2.1" + bs58check "https://github.com/bitcoinjs/bs58check" + create-hash "1.2.0" + walker@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" @@ -2893,6 +3271,20 @@ which@^2.0.1: dependencies: isexe "^2.0.0" +wif@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/wif/-/wif-2.0.1.tgz#27149a62757e4db694729378e7aeca7b09648012" + integrity sha512-Ba/Ypzo2Vg512kPn+Rt8R1ss019J/8n5E+lVyHJDc8EwTZ8fNLmhkTe7GitxghAiENWuunOa4qnwl7KIj39zfw== + dependencies: + bs58check "^1.0.6" + +wif@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/wif/-/wif-2.0.6.tgz#08d3f52056c66679299726fade0d432ae74b4704" + integrity sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ== + dependencies: + bs58check "<3.0.0" + word-wrap@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" From 2750520dda64df38a7107c61e4deddf73b56e580 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Tue, 7 Nov 2023 11:10:50 +0000 Subject: [PATCH 039/120] Add create hash back in --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 71ea757..0a21702 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "bn.js": "5.2.1", "bs58check": "https://github.com/bitcoinjs/bs58check", "semaphore-async-await": "^1.5.1", + "create-hash": "1.2.0", "@bitgo/utxo-lib": "git+https://github.com/VerusCoin/BitGoJS.git#7c754d4a5920198d9fe6827d3e23bd5cf431f264" }, "devDependencies": { From 473b5d05a8c59b241b57f5cafad05086e777d3d0 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Tue, 7 Nov 2023 14:52:33 +0000 Subject: [PATCH 040/120] Use BN instead of BigInt --- dist/vdxf/classes/Attestation.js | 3 ++- src/vdxf/classes/Attestation.ts | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dist/vdxf/classes/Attestation.js b/dist/vdxf/classes/Attestation.js index b22e91e..a19dc10 100644 --- a/dist/vdxf/classes/Attestation.js +++ b/dist/vdxf/classes/Attestation.js @@ -17,6 +17,7 @@ const address_1 = require("../../utils/address"); const vdxf_1 = require("../../constants/vdxf"); const __1 = require("../"); const MMR_1 = require("./MMR"); +const bn_js_1 = require("bn.js"); const { BufferReader, BufferWriter } = bufferutils_1.default; const ATTESTATION_TYPE_DATA = 1; const ATTESTATION_TYPE_HASH = 2; @@ -162,7 +163,7 @@ class Attestation extends __1.VDXFObject { } sortHashes() { const hashArray = this.components.map((item) => this.getHash(item)); - const sortedHashArray = hashArray.sort((a, b) => (BigInt(`0x${a.toString('hex')}`) > BigInt(`0x${b.toString('hex')}`)) ? 0 : -1); + const sortedHashArray = hashArray.sort((a, b) => (new bn_js_1.BN(`0x${a.toString('hex')}`) > new bn_js_1.BN(`0x${b.toString('hex')}`)) ? 0 : -1); return sortedHashArray; } } diff --git a/src/vdxf/classes/Attestation.ts b/src/vdxf/classes/Attestation.ts index 45df531..033cf44 100644 --- a/src/vdxf/classes/Attestation.ts +++ b/src/vdxf/classes/Attestation.ts @@ -5,7 +5,7 @@ import { fromBase58Check, toBase58Check } from '../../utils/address'; import { I_ADDR_VERSION } from '../../constants/vdxf'; import { VDXFObject } from "../"; import { MMR } from "./MMR" - +import { BN } from 'bn.js' const { BufferReader, BufferWriter } = bufferutils; @@ -201,7 +201,7 @@ export class Attestation extends VDXFObject { sortHashes(): Array { const hashArray = this.components.map((item) => this.getHash(item) ) - const sortedHashArray = hashArray.sort((a, b) => (BigInt(`0x${a.toString('hex')}`) > BigInt(`0x${b.toString('hex')}`))? 0 : -1 ); + const sortedHashArray = hashArray.sort((a, b) => (new BN(`0x${a.toString('hex')}`) > new BN(`0x${b.toString('hex')}`))? 0 : -1 ); return sortedHashArray; } From 0fcb2ec59f37a2369b25edfa78c2c5fba1dfda67 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Tue, 7 Nov 2023 14:58:49 +0000 Subject: [PATCH 041/120] Change BN > to gt --- dist/vdxf/classes/Attestation.js | 2 +- src/vdxf/classes/Attestation.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/vdxf/classes/Attestation.js b/dist/vdxf/classes/Attestation.js index a19dc10..1e78aad 100644 --- a/dist/vdxf/classes/Attestation.js +++ b/dist/vdxf/classes/Attestation.js @@ -163,7 +163,7 @@ class Attestation extends __1.VDXFObject { } sortHashes() { const hashArray = this.components.map((item) => this.getHash(item)); - const sortedHashArray = hashArray.sort((a, b) => (new bn_js_1.BN(`0x${a.toString('hex')}`) > new bn_js_1.BN(`0x${b.toString('hex')}`)) ? 0 : -1); + const sortedHashArray = hashArray.sort((a, b) => (new bn_js_1.BN(a.toString('hex'), 16).gt(new bn_js_1.BN(b.toString('hex'), 16))) ? 0 : -1); return sortedHashArray; } } diff --git a/src/vdxf/classes/Attestation.ts b/src/vdxf/classes/Attestation.ts index 033cf44..7896856 100644 --- a/src/vdxf/classes/Attestation.ts +++ b/src/vdxf/classes/Attestation.ts @@ -201,7 +201,7 @@ export class Attestation extends VDXFObject { sortHashes(): Array { const hashArray = this.components.map((item) => this.getHash(item) ) - const sortedHashArray = hashArray.sort((a, b) => (new BN(`0x${a.toString('hex')}`) > new BN(`0x${b.toString('hex')}`))? 0 : -1 ); + const sortedHashArray = hashArray.sort((a, b) => (new BN(a.toString('hex'), 16).gt( new BN(b.toString('hex'), 16 )))? 0 : -1 ); return sortedHashArray; } From c6ccf32a956f1bd2c24e4d58fb6eacef7f3cc23d Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Tue, 7 Nov 2023 15:38:18 +0000 Subject: [PATCH 042/120] Return to @noble hashes --- dist/vdxf/classes/Attestation.d.ts | 2 +- dist/vdxf/classes/MMR.d.ts | 4 ++-- dist/vdxf/classes/MMR.js | 5 ++--- package.json | 4 ++-- src/vdxf/classes/MMR.ts | 5 ++--- yarn.lock | 5 +++++ 6 files changed, 14 insertions(+), 11 deletions(-) diff --git a/dist/vdxf/classes/Attestation.d.ts b/dist/vdxf/classes/Attestation.d.ts index f6dd8ca..a488f74 100644 --- a/dist/vdxf/classes/Attestation.d.ts +++ b/dist/vdxf/classes/Attestation.d.ts @@ -28,7 +28,7 @@ export declare class Attestation extends VDXFObject { toDataBuffer(): Buffer; fromDataBuffer(buffer: Buffer, offset?: number): number; getMMR(): Promise; - routeHash(): Promise; + routeHash(): Promise; getHash(n: AttestationData): Buffer; sortHashes(): Array; } diff --git a/dist/vdxf/classes/MMR.d.ts b/dist/vdxf/classes/MMR.d.ts index c5305e0..775bdba 100644 --- a/dist/vdxf/classes/MMR.d.ts +++ b/dist/vdxf/classes/MMR.d.ts @@ -10,12 +10,12 @@ export declare class MMR { _leafLength: number; db: any; constructor(db?: MemoryBasedDb); - digest(input: any): any; + digest(input: any): Uint8Array; get(leafIndex: any): Promise; _get(nodePosition: any): Promise; append(value: any, leafIndex: any): Promise; appendMany(values: any, startLeafIndex: any): Promise; - getRoot(leafIndex?: number): Promise; + getRoot(leafIndex?: number): Promise; getNodeLength(): Promise; getLeafLength(): Promise; delete(leafIndex: any): Promise; diff --git a/dist/vdxf/classes/MMR.js b/dist/vdxf/classes/MMR.js index 7835c21..112bd3a 100644 --- a/dist/vdxf/classes/MMR.js +++ b/dist/vdxf/classes/MMR.js @@ -18,8 +18,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", { value: true }); exports.MMR = void 0; +const blake2b_1 = require("@noble/hashes/blake2b"); const { Lock } = require('semaphore-async-await'); -const blake2b = require('@bitgo/blake2b'); class Position { constructor(index, height, rightness) { this.i = index; @@ -33,8 +33,7 @@ class MMR { this.lock = new Lock(1); } digest(input) { - var out = Buffer.allocUnsafe(32); - return blake2b(out.length, null, null, Buffer.from("VerusDefaultHash")).update(Buffer.concat([...input])).digest(out); + return (0, blake2b_1.blake2b)(Buffer.concat([...input]), { dkLen: 32, personalization: "VerusDefaultHash" }); } get(leafIndex) { return __awaiter(this, void 0, void 0, function* () { diff --git a/package.json b/package.json index 0a21702..593dcff 100644 --- a/package.json +++ b/package.json @@ -20,13 +20,13 @@ "repository": "https://github.com/VerusCoin/verus-typescript-primitives.git", "license": "MIT", "dependencies": { + "@noble/hashes": "^1.3.2", "base64url": "3.0.1", "bech32": "^2.0.0", "bn.js": "5.2.1", "bs58check": "https://github.com/bitcoinjs/bs58check", - "semaphore-async-await": "^1.5.1", "create-hash": "1.2.0", - "@bitgo/utxo-lib": "git+https://github.com/VerusCoin/BitGoJS.git#7c754d4a5920198d9fe6827d3e23bd5cf431f264" + "semaphore-async-await": "^1.5.1" }, "devDependencies": { "@types/bn.js": "5.1.1", diff --git a/src/vdxf/classes/MMR.ts b/src/vdxf/classes/MMR.ts index 15c059d..b02df00 100644 --- a/src/vdxf/classes/MMR.ts +++ b/src/vdxf/classes/MMR.ts @@ -8,8 +8,8 @@ //to permit persons to whom the Software is furnished to do so, subject to the following conditions: +import { blake2b } from '@noble/hashes/blake2b' const { Lock } = require('semaphore-async-await') -const blake2b = require('@bitgo/blake2b') class Position{ i: any @@ -34,8 +34,7 @@ export class MMR{ } digest(input){ - var out = Buffer.allocUnsafe(32) - return blake2b(out.length, null, null, Buffer.from("VerusDefaultHash")).update(Buffer.concat([...input])).digest(out) + return blake2b(Buffer.concat([...input]), {dkLen: 32, personalization: "VerusDefaultHash"}) } async get(leafIndex){ diff --git a/yarn.lock b/yarn.lock index da04239..ea9bf02 100644 --- a/yarn.lock +++ b/yarn.lock @@ -620,6 +620,11 @@ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.1.tgz#8831ef002114670c603c458ab8b11328406953a9" integrity sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA== +"@noble/hashes@^1.3.2": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39" + integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ== + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" From 4a6ee165251899033f23977974432550ba14f9ce Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Tue, 7 Nov 2023 17:19:16 +0000 Subject: [PATCH 043/120] add big integer --- package.json | 1 + yarn.lock | 405 ++------------------------------------------------- 2 files changed, 10 insertions(+), 396 deletions(-) diff --git a/package.json b/package.json index 593dcff..652b6e8 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "@noble/hashes": "^1.3.2", "base64url": "3.0.1", "bech32": "^2.0.0", + "big-integer": "^1.6.51", "bn.js": "5.2.1", "bs58check": "https://github.com/bitcoinjs/bs58check", "create-hash": "1.2.0", diff --git a/yarn.lock b/yarn.lock index ea9bf02..24913c1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -292,47 +292,6 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@bitgo/blake2b-wasm@^3.0.1": - version "3.2.3" - resolved "https://registry.yarnpkg.com/@bitgo/blake2b-wasm/-/blake2b-wasm-3.2.3.tgz#6ae5e942f2a5fd5b3ed27103af5df0ed50adfbc9" - integrity sha512-NaurBrMaEpjfg7EdUJgW/c6byt27O6q1ZaxB5Ita10MjjYjUu0SyYF4q7JPNxpHF/lMxb0YZakOxigbDBu9Jjw== - dependencies: - nanoassert "^1.0.0" - -"@bitgo/blake2b@3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@bitgo/blake2b/-/blake2b-3.0.1.tgz#d9f2893420c1d4861fea0e05d775afd99a191b00" - integrity sha512-+Neg+nsqUhYOPlvyITHXYzKUTJofyxYdLQTzNjufamifBzxLGTpgn2KKUfvGNsGovlUYzlyPZj+CB6je2D7mhw== - dependencies: - "@bitgo/blake2b-wasm" "^3.0.1" - nanoassert "^2.0.0" - -"@bitgo/utxo-lib@git+https://github.com/VerusCoin/BitGoJS.git#7c754d4a5920198d9fe6827d3e23bd5cf431f264": - version "1.9.6" - resolved "git+https://github.com/VerusCoin/BitGoJS.git#7c754d4a5920198d9fe6827d3e23bd5cf431f264" - dependencies: - "@bitgo/blake2b" "3.0.1" - bech32 "0.0.3" - bigi "1.4.0" - bip32 "2.0.6" - bip66 "1.1.0" - bitcoin-ops "git+https://github.com/VerusCoin/bitcoin-ops" - bs58check "2.0.0" - create-hash "1.1.0" - create-hmac "1.1.3" - debug "~3.1.0" - ecurve "1.0.0" - merkle-lib "2.0.10" - pushdata-bitcoin "1.0.1" - randombytes "2.0.1" - safe-buffer "5.0.1" - typeforce "1.11.3" - varuint-bitcoin "1.0.4" - verus-typescript-primitives "https://github.com/VerusCoin/verus-typescript-primitives.git" - wif "2.0.1" - optionalDependencies: - secp256k1 "3.5.2" - "@eslint-community/eslint-utils@^4.2.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" @@ -763,11 +722,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-20.3.1.tgz#e8a83f1aa8b649377bb1fb5d7bac5cb90e784dfe" integrity sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg== -"@types/node@10.12.18": - version "10.12.18" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.18.tgz#1d3ca764718915584fcd9f6344621b7672665c67" - integrity sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ== - "@types/node@18.7.22": version "18.7.22" resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.22.tgz#76f7401362ad63d9d7eefa7dcdfa5fcd9baddff3" @@ -1069,18 +1023,6 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -base-x@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/base-x/-/base-x-1.1.0.tgz#42d3d717474f9ea02207f6d1aa1f426913eeb7ac" - integrity sha512-c0WLeG3K5OlL4Skz2/LVdS+MjggByKhowxQpG+JpCLA48s/bGwIDyzA1naFjywtNvp/37fLK0p0FpjTNNLLUXQ== - -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" - base-x@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/base-x/-/base-x-4.0.0.tgz#d0e3b7753450c73f8ad2389b5c018a4af7b2224a" @@ -1091,72 +1033,21 @@ base64url@3.0.1: resolved "https://registry.yarnpkg.com/base64url/-/base64url-3.0.1.tgz#6399d572e2bc3f90a9a8b22d5dbb0a32d33f788d" integrity sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A== -bech32@0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/bech32/-/bech32-0.0.3.tgz#736747c4a6531c5d8937d0400498de30e93b2f9c" - integrity sha512-O+K1w8P/aAOLcYwwQ4sbiPYZ51ZIW95lnS4/6nE8Aib/z+OOddQIIPdu2qi94qGDp4HhYy/wJotttXKkak1lXg== - bech32@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/bech32/-/bech32-2.0.0.tgz#078d3686535075c8c79709f054b1b226a133b355" integrity sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg== -bigi@1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/bigi/-/bigi-1.4.0.tgz#90ac1aeac0a531216463bdb58f42c1e05c8407ac" - integrity sha512-TUFZGBZiOE98fuGBot6SKLQPFmRkXyeyOybmE8XMUDsrwP380cFh8qs7VX8C2CLj73OYW7+sgCStfL3ySy+Ozg== - -bigi@^1.1.0: - version "1.4.2" - resolved "https://registry.yarnpkg.com/bigi/-/bigi-1.4.2.tgz#9c665a95f88b8b08fc05cfd731f561859d725825" - integrity sha512-ddkU+dFIuEIW8lE7ZwdIAf2UPoM90eaprg5m3YXAVVTmKlqV/9BX4A2M8BOK2yOq6/VgZFVhK6QAxJebhlbhzw== - -bindings@^1.2.1, bindings@^1.3.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" - integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== - dependencies: - file-uri-to-path "1.0.0" - -bip32@2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/bip32/-/bip32-2.0.6.tgz#6a81d9f98c4cd57d05150c60d8f9e75121635134" - integrity sha512-HpV5OMLLGTjSVblmrtYRfFFKuQB+GArM0+XP8HGWfJ5vxYBqo+DesvJwOdC2WJ3bCkZShGf0QIfoIpeomVzVdA== - dependencies: - "@types/node" "10.12.18" - bs58check "^2.1.1" - create-hash "^1.2.0" - create-hmac "^1.1.7" - tiny-secp256k1 "^1.1.3" - typeforce "^1.11.5" - wif "^2.0.6" - -bip66@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/bip66/-/bip66-1.1.0.tgz#c5551d49d1696d78211be047e997fe7aac8820c5" - integrity sha512-dBoAPJYg6HaaQeJGr4cNiqat1meGzlrv2qX+EJcW5q0zEdryMSLKlQKdTaCtDnrzEUPkwmlYqsD7ANaye4BEfg== - -bip66@^1.1.3: - version "1.1.5" - resolved "https://registry.yarnpkg.com/bip66/-/bip66-1.1.5.tgz#01fa8748785ca70955d5011217d1b3139969ca22" - integrity sha512-nemMHz95EmS38a26XbbdxIYj5csHd3RMP3H5bwQknX0WYHF01qhpufP42mLOwVICuH2JmhIhXiWs89MfUGL7Xw== - dependencies: - safe-buffer "^5.0.1" - -bitcoin-ops@^1.3.0, "bitcoin-ops@git+https://github.com/VerusCoin/bitcoin-ops": - version "1.4.1" - resolved "git+https://github.com/VerusCoin/bitcoin-ops#a5f8f56e658301bc39881d41740b3a0010530efd" +big-integer@^1.6.51: + version "1.6.51" + resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686" + integrity sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg== bn.js@5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== -bn.js@^4.11.3, bn.js@^4.11.8, bn.js@^4.11.9: - version "4.12.0" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" - integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== - brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -1172,23 +1063,6 @@ braces@^3.0.2: dependencies: fill-range "^7.0.1" -brorand@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== - -browserify-aes@^1.0.6: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - browserslist@^4.21.3: version "4.21.9" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.9.tgz#e11bdd3c313d7e2a9e87e8b4b0c7872b13897635" @@ -1206,20 +1080,6 @@ bs-logger@0.x: dependencies: fast-json-stable-stringify "2.x" -bs58@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/bs58/-/bs58-3.1.0.tgz#d4c26388bf4804cac714141b1945aa47e5eb248e" - integrity sha512-9C2bRFTGy3meqO65O9jLvVTyawvhLVp4h2ECm5KlRPuV5KPDNJZcJIj3gl+aA0ENXcYrUSLCkPAeqbTcI2uWyQ== - dependencies: - base-x "^1.1.0" - -bs58@^4.0.0: - 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" - bs58@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/bs58/-/bs58-5.0.0.tgz#865575b4d13c09ea2a84622df6c8cbeb54ffc279" @@ -1227,31 +1087,6 @@ bs58@^5.0.0: dependencies: base-x "^4.0.0" -bs58check@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.0.0.tgz#b70fffd80bc72de18a040a547d7e5e08ce1b1e4e" - integrity sha512-afttdRHvL1HCgBJqcMtoRXe8xCQ7fbUidoLp1JTRXT4bAvtfDyZx7mb79w82XkcdIFFstG3A4NhKOBdEsLbQbw== - dependencies: - bs58 "^4.0.0" - create-hash "^1.1.0" - -bs58check@<3.0.0, bs58check@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" - integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== - dependencies: - bs58 "^4.0.0" - create-hash "^1.1.0" - safe-buffer "^5.1.2" - -bs58check@^1.0.6: - version "1.3.4" - resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-1.3.4.tgz#c52540073749117714fa042c3047eb8f9151cbf8" - integrity sha512-+cZ/mYuyfHboELKvDTYF6onDT4XEgbM9kBsKW91q2YlyDsGRpgT/O6pU4ws5n+LD38XAiD7LChgB3+NBqMGk6g== - dependencies: - bs58 "^3.1.0" - create-hash "^1.1.0" - "bs58check@https://github.com/bitcoinjs/bs58check": version "3.0.1" resolved "https://github.com/bitcoinjs/bs58check#0ddbd3e0813c22a6aef85313916fdab71f479aa9" @@ -1271,11 +1106,6 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== - callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -1323,7 +1153,7 @@ ci-info@^3.2.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.8.0.tgz#81408265a5380c929f0bc665d62256628ce9ef91" integrity sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw== -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: +cipher-base@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== @@ -1389,16 +1219,7 @@ convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== -create-hash@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.0.tgz#c2ab96b5d4ece5f22df2ef4306803d14da6931e7" - integrity sha512-We+Cyev4lG5VlvuSRkNkOhSMu8l2QoMgQR8e/j/fYUQvleXXtF/9apzzLZF9plriySKWQ5cW/PUx3RSTcKMqTA== - dependencies: - inherits "^2.0.1" - ripemd160 "^1.0.0" - sha.js "^2.3.6" - -create-hash@1.2.0, create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: +create-hash@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== @@ -1409,26 +1230,6 @@ create-hash@1.2.0, create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: ripemd160 "^2.0.1" sha.js "^2.4.0" -create-hmac@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.3.tgz#29843e9c191ba412ab001bc55ac8b8b9ae54b670" - integrity sha512-WAh5X07rFIM0EZ166unEOAMdrPWcg7A6alzdqIRNnMn8woJnZfKUFOBpAIzOEzrn1ouRjRv+O+gcESddnN/Xlw== - dependencies: - create-hash "^1.1.0" - inherits "^2.0.1" - -create-hmac@^1.1.4, create-hmac@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" - integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" @@ -1445,13 +1246,6 @@ debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: dependencies: ms "2.1.2" -debug@~3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== - dependencies: - ms "2.0.0" - dedent@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" @@ -1491,40 +1285,11 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -drbg.js@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/drbg.js/-/drbg.js-1.0.1.tgz#3e36b6c42b37043823cdbc332d58f31e2445480b" - integrity sha512-F4wZ06PvqxYLFEZKkFxTDcns9oFNk34hvmJSEwdzsxVQ8YI5YaxtACgQatkYgv2VI2CFkUd2Y+xosPQnHv809g== - dependencies: - browserify-aes "^1.0.6" - create-hash "^1.1.2" - create-hmac "^1.1.4" - -ecurve@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/ecurve/-/ecurve-1.0.0.tgz#32cfd5ce5f421e9351206a33d4e3cfd36f3465a4" - integrity sha512-gwAh/B9hSnkq5SssZhJnXaXHcKrBK2tCh76G12+BXXjqLH4Kx1QBALz9IszvUtrxhM9+SBXx6fU0dW4WDBk2pA== - dependencies: - bigi "^1.1.0" - electron-to-chromium@^1.4.431: version "1.4.435" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.435.tgz#761c34300603b9f1234f0b6155870d3002435db6" integrity sha512-B0CBWVFhvoQCW/XtjRzgrmqcgVWg6RXOEM/dK59+wFV93BFGR6AeNKc4OyhM+T3IhJaOOG8o/V+33Y2mwJWtzw== -elliptic@^6.2.3, elliptic@^6.4.0: - version "6.5.4" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" - integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== - dependencies: - bn.js "^4.11.9" - brorand "^1.1.0" - hash.js "^1.0.0" - hmac-drbg "^1.0.1" - inherits "^2.0.4" - minimalistic-assert "^1.0.1" - minimalistic-crypto-utils "^1.0.1" - emittery@^0.10.2: version "0.10.2" resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.10.2.tgz#902eec8aedb8c41938c46e9385e9db7e03182933" @@ -1686,14 +1451,6 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - execa@^5.0.0: version "5.1.1" resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" @@ -1772,11 +1529,6 @@ file-entry-cache@^6.0.1: dependencies: flat-cache "^3.0.4" -file-uri-to-path@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" - integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== - fill-range@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" @@ -1926,23 +1678,6 @@ hash-base@^3.0.0: readable-stream "^3.6.0" safe-buffer "^5.2.0" -hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - -hmac-drbg@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - html-escaper@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" @@ -2578,11 +2313,6 @@ merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -merkle-lib@2.0.10: - version "2.0.10" - resolved "https://registry.yarnpkg.com/merkle-lib/-/merkle-lib-2.0.10.tgz#82b8dbae75e27a7785388b73f9d7725d0f6f3326" - integrity sha512-XrNQvUbn1DL5hKNe46Ccs+Tu3/PYOlrcZILuGUhb95oKBPjc/nmIC8D462PQkipVDGKRvwhn+QFg2cCdIvmDJA== - micromatch@^4.0.4: version "4.0.5" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" @@ -2596,16 +2326,6 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" - integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== - -minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== - 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" @@ -2613,31 +2333,11 @@ minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== - ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -nan@^2.13.2, nan@^2.2.1: - version "2.18.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.18.0.tgz#26a6faae7ffbeb293a39660e88a76b82e30b7554" - integrity sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w== - -nanoassert@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/nanoassert/-/nanoassert-1.1.0.tgz#4f3152e09540fde28c76f44b19bbcd1d5a42478d" - integrity sha512-C40jQ3NzfkP53NsO8kEOFd79p4b9kDXQMwgiY1z8ZwrDZgUyom0AHwGegF4Dm99L+YoYhuaB0ceerUcXmqr1rQ== - -nanoassert@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/nanoassert/-/nanoassert-2.0.0.tgz#a05f86de6c7a51618038a620f88878ed1e490c09" - integrity sha512-7vO7n28+aYO4J+8w96AzhmU8G+Y/xpPDJz/se19ICsqj/momRbb9mh9ZUtkoJ5X3nTnPdhEJyc0qnM6yAsHBaA== - natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -2814,23 +2514,11 @@ punycode@^2.1.0: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== -pushdata-bitcoin@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/pushdata-bitcoin/-/pushdata-bitcoin-1.0.1.tgz#15931d3cd967ade52206f523aa7331aef7d43af7" - integrity sha512-hw7rcYTJRAl4olM8Owe8x0fBuJJ+WGbMhQuLWOXEMN3PxPCKQHRkhfL+XG0+iXUmSHjkMmb3Ba55Mt21cZc9kQ== - dependencies: - bitcoin-ops "^1.3.0" - queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== -randombytes@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.1.tgz#18f4a9ba0dd07bdb1580bc9156091fcf90eabc6f" - integrity sha512-siCt2duOdZbmvgk8IDL4U0SYXI8ypBEKWuor0qUpHBWAyOCrXQvSIYJ+VKuEpoX36moZ1pAu+mXkwUVAVssu6w== - react-is@^18.0.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" @@ -2898,12 +2586,7 @@ rimraf@^3.0.0, rimraf@^3.0.2: dependencies: glob "^7.1.3" -ripemd160@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-1.0.1.tgz#93a4bbd4942bc574b69a8fa57c71de10ecca7d6e" - integrity sha512-J0YlH2ow/i7d5PJX9RC1XnjmZc7cNNYWe89PIlFszvHeiEtxzA1/VYePkjQ7l1SkUejAcHeDo3IVp2WIzstXXQ== - -ripemd160@^2.0.0, ripemd160@^2.0.1: +ripemd160@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== @@ -2918,30 +2601,11 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -safe-buffer@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" - integrity sha512-cr7dZWLwOeaFBLTIuZeYdkfO7UzGIKhjYENJFAxUOMKWGaWDm2nJM2rzxNRm5Owu0DH3ApwNo6kx5idXZfb/Iw== - -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: +safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -secp256k1@3.5.2: - version "3.5.2" - resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-3.5.2.tgz#f95f952057310722184fe9c914e6b71281f2f2ae" - integrity sha512-iin3kojdybY6NArd+UFsoTuapOF7bnJNf2UbcWXaY3z+E1sJDipl60vtzB5hbO/uquBu7z0fd4VC4Irp+xoFVQ== - dependencies: - bindings "^1.2.1" - bip66 "^1.1.3" - bn.js "^4.11.3" - create-hash "^1.1.2" - drbg.js "^1.0.1" - elliptic "^6.2.3" - nan "^2.2.1" - safe-buffer "^5.1.0" - semaphore-async-await@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/semaphore-async-await/-/semaphore-async-await-1.5.1.tgz#857bef5e3644601ca4b9570b87e9df5ca12974fa" @@ -2959,7 +2623,7 @@ semver@^6.0.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -sha.js@^2.3.6, sha.js@^2.4.0, sha.js@^2.4.8: +sha.js@^2.4.0: version "2.4.11" resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== @@ -3121,17 +2785,6 @@ text-table@^0.2.0: resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== -tiny-secp256k1@^1.1.3: - version "1.1.6" - resolved "https://registry.yarnpkg.com/tiny-secp256k1/-/tiny-secp256k1-1.1.6.tgz#7e224d2bee8ab8283f284e40e6b4acb74ffe047c" - integrity sha512-FmqJZGduTyvsr2cF3375fqGHUovSwDi/QytexX1Se4BPuPZpTE5Ftp5fg+EFSuEf3lhZqgCRjEG3ydUQ/aNiwA== - dependencies: - bindings "^1.3.0" - bn.js "^4.11.8" - create-hmac "^1.1.7" - elliptic "^6.4.0" - nan "^2.13.2" - tmpl@1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" @@ -3197,18 +2850,6 @@ type-fest@^0.21.3: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== -typeforce@1.11.3: - version "1.11.3" - resolved "https://registry.yarnpkg.com/typeforce/-/typeforce-1.11.3.tgz#a54d0ff58808788fba358020982270bd6995d8e4" - integrity sha512-+vllWbxe1AKLkO3KNyZPjb51NRHwRE/8bAi/cmF6TK24VqrPiQPRiHrFV19j1xHxxCHQbIvN4Zfco+skuiXSWQ== - dependencies: - inherits "^2.0.1" - -typeforce@^1.11.5: - version "1.18.0" - resolved "https://registry.yarnpkg.com/typeforce/-/typeforce-1.18.0.tgz#d7416a2c5845e085034d70fcc5b6cc4a90edbfdc" - integrity sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g== - typescript@4.7.4: version "4.7.4" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" @@ -3248,20 +2889,6 @@ v8-to-istanbul@^9.0.1: "@types/istanbul-lib-coverage" "^2.0.1" convert-source-map "^1.6.0" -varuint-bitcoin@1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/varuint-bitcoin/-/varuint-bitcoin-1.0.4.tgz#d812c5dae16e32f60544b6adee1d4be1307d0283" - integrity sha512-2nW4pVicYWxOMY1u+3T3eFXw24wbFlKz+ug7hd02rozYmeFVBoC6LB7/P4E46jN9aD1ezhX01g2Uh4zrZ+9RWw== - -"verus-typescript-primitives@https://github.com/VerusCoin/verus-typescript-primitives.git": - version "1.0.0" - resolved "https://github.com/VerusCoin/verus-typescript-primitives.git#e73d773118177f495ecc100fa2aacb741a04905a" - dependencies: - base64url "3.0.1" - bn.js "5.2.1" - bs58check "https://github.com/bitcoinjs/bs58check" - create-hash "1.2.0" - walker@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" @@ -3276,20 +2903,6 @@ which@^2.0.1: dependencies: isexe "^2.0.0" -wif@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/wif/-/wif-2.0.1.tgz#27149a62757e4db694729378e7aeca7b09648012" - integrity sha512-Ba/Ypzo2Vg512kPn+Rt8R1ss019J/8n5E+lVyHJDc8EwTZ8fNLmhkTe7GitxghAiENWuunOa4qnwl7KIj39zfw== - dependencies: - bs58check "^1.0.6" - -wif@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/wif/-/wif-2.0.6.tgz#08d3f52056c66679299726fade0d432ae74b4704" - integrity sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ== - dependencies: - bs58check "<3.0.0" - word-wrap@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" From 23df01da5cf816cfdfc360bbde861a0bf451d93e Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Wed, 8 Nov 2023 14:49:43 +0000 Subject: [PATCH 044/120] Swap Requested access constructor arguments to be consistent --- dist/vdxf/classes/Challenge.d.ts | 2 +- dist/vdxf/classes/Challenge.js | 6 +++--- src/__tests__/attestation/attestation.test.ts | 6 +++--- src/__tests__/vdxf/loginconsent.test.ts | 6 +++--- src/vdxf/classes/Challenge.ts | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dist/vdxf/classes/Challenge.d.ts b/dist/vdxf/classes/Challenge.d.ts index 32a4e4f..8eb42a4 100644 --- a/dist/vdxf/classes/Challenge.d.ts +++ b/dist/vdxf/classes/Challenge.d.ts @@ -100,7 +100,7 @@ export declare class AttestationRequest extends VDXFObject { export declare class RequestedPermission extends VDXFObject { data: string | AttestationRequestInterfaceDataInterface; encoding?: BufferEncoding; - constructor(vdxfkey?: string, data?: string | AttestationRequestInterfaceDataInterface); + constructor(data?: string | AttestationRequestInterfaceDataInterface, vdxfkey?: string); addPrototypes(data: string | AttestationRequestInterfaceDataInterface): void; fromDataBuffer(buffer: Buffer, offset?: number): number; } diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index 93a3492..af3a6da 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -64,7 +64,7 @@ class Challenge extends __1.VDXFObject { constructor(challenge = { challenge_id: "", created_at: 0 }, vdxfkey = __1.LOGIN_CONSENT_CHALLENGE_VDXF_KEY.vdxfid) { super(vdxfkey); this.challenge_id = challenge.challenge_id; - this.requested_access = challenge.requested_access ? challenge.requested_access.map((x) => new RequestedPermission(x.vdxfkey, x.data)) : challenge.requested_access; + this.requested_access = challenge.requested_access ? challenge.requested_access.map((x) => new RequestedPermission(x.data, x.vdxfkey)) : challenge.requested_access; this.requested_access_audience = challenge.requested_access_audience; this.subject = challenge.subject ? challenge.subject.map((x) => new Subject(x.data, x.vdxfkey)) @@ -188,7 +188,7 @@ class Challenge extends __1.VDXFObject { const requestedAccessLength = reader.readCompactSize(); for (let i = 0; i < requestedAccessLength; i++) { const _vdxfkey = (0, address_1.toBase58Check)(reader.buffer.slice(reader.offset, reader.offset + vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION); - const _perm = new RequestedPermission(_vdxfkey, ""); + const _perm = new RequestedPermission("", _vdxfkey); reader.offset = _perm.fromBuffer(reader.buffer, reader.offset); this.requested_access.push(_perm); } @@ -328,7 +328,7 @@ class AttestationRequest extends __1.VDXFObject { } exports.AttestationRequest = AttestationRequest; class RequestedPermission extends __1.VDXFObject { - constructor(vdxfkey = "", data = "") { + constructor(data = "", vdxfkey = "") { super(vdxfkey); if (vdxfkey) this.addPrototypes(data); diff --git a/src/__tests__/attestation/attestation.test.ts b/src/__tests__/attestation/attestation.test.ts index f3c8662..304b408 100644 --- a/src/__tests__/attestation/attestation.test.ts +++ b/src/__tests__/attestation/attestation.test.ts @@ -18,15 +18,15 @@ describe('Serializes and deserializes attestation request', () => { }, challenge: { challenge_id: "iKNufKJdLX3Xg8qFru9AuLBvivAEJ88PW4", - requested_access: [new RequestedPermission(IDENTITY_VIEW.vdxfid), - new RequestedPermission( ATTESTATION_READ_REQUEST.vdxfid, {accepted_attestors:["iC9x9VZ2XMop7spFzeXqSKX8WqmrG9cu41"], + requested_access: [new RequestedPermission("", IDENTITY_VIEW.vdxfid), + new RequestedPermission( {accepted_attestors:["iC9x9VZ2XMop7spFzeXqSKX8WqmrG9cu41"], attestation_keys:[ ATTESTATION_IDENTITY_DATA["firstname"].vdxfid, ATTESTATION_IDENTITY_DATA["lastname"].vdxfid, ATTESTATION_IDENTITY_DATA["attestor"].vdxfid, ATTESTATION_IDENTITY_DATA["identity"].vdxfid, ATTESTATION_IDENTITY_DATA["documenttype"].vdxfid] - })], + }, ATTESTATION_READ_REQUEST.vdxfid)], session_id: "iRQZGW36o3RcVR1xyVT1qWdAKdxp3wUyrh", redirect_uris: [ new RedirectUri( diff --git a/src/__tests__/vdxf/loginconsent.test.ts b/src/__tests__/vdxf/loginconsent.test.ts index 30f4347..8a04424 100644 --- a/src/__tests__/vdxf/loginconsent.test.ts +++ b/src/__tests__/vdxf/loginconsent.test.ts @@ -18,7 +18,7 @@ describe('Serializes and deserializes signature objects properly', () => { }, challenge: { challenge_id: "iKNufKJdLX3Xg8qFru9AuLBvivAEJ88PW4", - requested_access: [new RequestedPermission(IDENTITY_VIEW.vdxfid)], + requested_access: [new RequestedPermission("", IDENTITY_VIEW.vdxfid)], subject: [ new Subject( "fully.qualified.name", @@ -226,8 +226,8 @@ describe('Serializes and deserializes signature objects properly', () => { }, challenge: { challenge_id: "iKNufKJdLX3Xg8qFru9AuLBvivAEJ88PW4", - requested_access: [new RequestedPermission(IDENTITY_VIEW.vdxfid), - new RequestedPermission( ATTESTATION_READ_REQUEST.vdxfid, {accepted_attestors:["iC9x9VZ2XMop7spFzeXqSKX8WqmrG9cu41"], attestation_keys:["iSSxdyTcCp8VALGBGKy8R7ATYSRuK15NkL","i3jWsqLVnYyJu78E7mw6pbD3TazwZJpuk4","i9MRw6YUhXtP6DT8eufGnB5oRQ34TjDsdb","iJvFSXk2EDeEu9BkJQSwAVeiochF6AYpfF"]})], + requested_access: [new RequestedPermission("", IDENTITY_VIEW.vdxfid), + new RequestedPermission({accepted_attestors:["iC9x9VZ2XMop7spFzeXqSKX8WqmrG9cu41"], attestation_keys:["iSSxdyTcCp8VALGBGKy8R7ATYSRuK15NkL","i3jWsqLVnYyJu78E7mw6pbD3TazwZJpuk4","i9MRw6YUhXtP6DT8eufGnB5oRQ34TjDsdb","iJvFSXk2EDeEu9BkJQSwAVeiochF6AYpfF"]}, ATTESTATION_READ_REQUEST.vdxfid)], session_id: "iRQZGW36o3RcVR1xyVT1qWdAKdxp3wUyrh", redirect_uris: [ new RedirectUri( diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index 9a3f968..2b89182 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -141,7 +141,7 @@ export class Challenge extends VDXFObject implements ChallengeInterface { super(vdxfkey); this.challenge_id = challenge.challenge_id; - this.requested_access = challenge.requested_access ? challenge.requested_access.map((x) => new RequestedPermission(x.vdxfkey,x.data)) : challenge.requested_access; + this.requested_access = challenge.requested_access ? challenge.requested_access.map((x) => new RequestedPermission(x.data, x.vdxfkey)) : challenge.requested_access; this.requested_access_audience = challenge.requested_access_audience; this.subject = challenge.subject ? challenge.subject.map((x) => new Subject(x.data, x.vdxfkey)) @@ -330,7 +330,7 @@ export class Challenge extends VDXFObject implements ChallengeInterface { const _vdxfkey = toBase58Check(reader.buffer.slice(reader.offset, reader.offset + HASH160_BYTE_LENGTH), I_ADDR_VERSION); - const _perm = new RequestedPermission(_vdxfkey,""); + const _perm = new RequestedPermission("", _vdxfkey); reader.offset = _perm.fromBuffer(reader.buffer, reader.offset); this.requested_access.push(_perm); } @@ -508,7 +508,7 @@ export class AttestationRequest extends VDXFObject { export class RequestedPermission extends VDXFObject { data: string | AttestationRequestInterfaceDataInterface; encoding?: BufferEncoding; - constructor(vdxfkey: string = "", data: string | AttestationRequestInterfaceDataInterface = "") { + constructor(data: string | AttestationRequestInterfaceDataInterface = "", vdxfkey: string = "") { super(vdxfkey); if (vdxfkey) this.addPrototypes(data); } From 992b95bde91ff5f6838f43da7dcea6ec148e3393 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Thu, 9 Nov 2023 11:32:01 +0000 Subject: [PATCH 045/120] Fix conflicts --- dist/vdxf/keys.js | 3 ++- src/__tests__/vdxf/parser.test.ts | 2 +- src/vdxf/classes/Challenge.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dist/vdxf/keys.js b/dist/vdxf/keys.js index a74be64..2c04098 100644 --- a/dist/vdxf/keys.js +++ b/dist/vdxf/keys.js @@ -1,6 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.IDENTITY_AUTH_SIG_VDXF_KEY = exports.VERUSPAY_INVOICE = void 0; +exports.CVDXF_Data = exports.ATTESTATION_IDENTITY_DATA = exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.IDENTITY_AUTH_SIG_VDXF_KEY = exports.VERUSPAY_INVOICE = void 0; +const varuint_1 = require("../utils/varuint"); exports.VERUSPAY_INVOICE = { hash160result: "628efc28c2e2d40050e1a9de7a93e7ddf2aa0076", qualifiedname: { diff --git a/src/__tests__/vdxf/parser.test.ts b/src/__tests__/vdxf/parser.test.ts index 7dad83b..2f19265 100644 --- a/src/__tests__/vdxf/parser.test.ts +++ b/src/__tests__/vdxf/parser.test.ts @@ -58,7 +58,7 @@ describe('Parses VDXF objects correctly', () => { }, challenge: { challenge_id: "iKNufKJdLX3Xg8qFru9AuLBvivAEJ88PW4", - requested_access: [new RequestedPermission(IDENTITY_VIEW.vdxfid)], + requested_access: [new RequestedPermission("", IDENTITY_VIEW.vdxfid)], subject: [ new Subject( "fully.qualified.name", diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index 2b89182..dc792d7 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -16,7 +16,7 @@ import { Context } from "./Context"; import { Hash160 } from "./Hash160"; import { Attestation } from "./Attestation"; import { fromBase58Check, toBase58Check } from '../../utils/address'; -import { DEFAULT_VERSION, HASH160_BYTE_LENGTH, I_ADDR_VERSION } from '../../constants/vdxf'; +import { HASH160_BYTE_LENGTH, I_ADDR_VERSION } from '../../constants/vdxf'; import { BufferDataVdxfObject } from '../index' export class RedirectUri extends VDXFObject { uri: string; From 04654dde9d3247730b34775502526ed8a1b83a5c Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Thu, 9 Nov 2023 13:17:18 +0000 Subject: [PATCH 046/120] update yarn lock --- dist/vdxf/classes/Attestation.d.ts | 2 +- dist/vdxf/classes/MMR.d.ts | 4 +- dist/vdxf/classes/MMR.js | 4 +- package.json | 4 +- src/vdxf/classes/MMR.ts | 4 +- yarn.lock | 824 ++++++++++++++--------------- 6 files changed, 405 insertions(+), 437 deletions(-) diff --git a/dist/vdxf/classes/Attestation.d.ts b/dist/vdxf/classes/Attestation.d.ts index a488f74..2a9aeb1 100644 --- a/dist/vdxf/classes/Attestation.d.ts +++ b/dist/vdxf/classes/Attestation.d.ts @@ -28,7 +28,7 @@ export declare class Attestation extends VDXFObject { toDataBuffer(): Buffer; fromDataBuffer(buffer: Buffer, offset?: number): number; getMMR(): Promise; - routeHash(): Promise; + routeHash(): Promise; getHash(n: AttestationData): Buffer; sortHashes(): Array; } diff --git a/dist/vdxf/classes/MMR.d.ts b/dist/vdxf/classes/MMR.d.ts index 775bdba..5908372 100644 --- a/dist/vdxf/classes/MMR.d.ts +++ b/dist/vdxf/classes/MMR.d.ts @@ -10,12 +10,12 @@ export declare class MMR { _leafLength: number; db: any; constructor(db?: MemoryBasedDb); - digest(input: any): Uint8Array; + digest(input: any): void; get(leafIndex: any): Promise; _get(nodePosition: any): Promise; append(value: any, leafIndex: any): Promise; appendMany(values: any, startLeafIndex: any): Promise; - getRoot(leafIndex?: number): Promise; + getRoot(leafIndex?: number): Promise; getNodeLength(): Promise; getLeafLength(): Promise; delete(leafIndex: any): Promise; diff --git a/dist/vdxf/classes/MMR.js b/dist/vdxf/classes/MMR.js index 112bd3a..51a6c44 100644 --- a/dist/vdxf/classes/MMR.js +++ b/dist/vdxf/classes/MMR.js @@ -18,7 +18,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", { value: true }); exports.MMR = void 0; -const blake2b_1 = require("@noble/hashes/blake2b"); +//import { blake2b } from '@noble/hashes/blake2b' const { Lock } = require('semaphore-async-await'); class Position { constructor(index, height, rightness) { @@ -33,7 +33,7 @@ class MMR { this.lock = new Lock(1); } digest(input) { - return (0, blake2b_1.blake2b)(Buffer.concat([...input]), { dkLen: 32, personalization: "VerusDefaultHash" }); + return; //blake2b(Buffer.concat([...input]), {dkLen: 32, personalization: "VerusDefaultHash"}) } get(leafIndex) { return __awaiter(this, void 0, void 0, function* () { diff --git a/package.json b/package.json index 652b6e8..4a0aa54 100644 --- a/package.json +++ b/package.json @@ -20,10 +20,8 @@ "repository": "https://github.com/VerusCoin/verus-typescript-primitives.git", "license": "MIT", "dependencies": { - "@noble/hashes": "^1.3.2", "base64url": "3.0.1", - "bech32": "^2.0.0", - "big-integer": "^1.6.51", + "bech32": "^1.1.3", "bn.js": "5.2.1", "bs58check": "https://github.com/bitcoinjs/bs58check", "create-hash": "1.2.0", diff --git a/src/vdxf/classes/MMR.ts b/src/vdxf/classes/MMR.ts index b02df00..60d980b 100644 --- a/src/vdxf/classes/MMR.ts +++ b/src/vdxf/classes/MMR.ts @@ -8,7 +8,7 @@ //to permit persons to whom the Software is furnished to do so, subject to the following conditions: -import { blake2b } from '@noble/hashes/blake2b' +//import { blake2b } from '@noble/hashes/blake2b' const { Lock } = require('semaphore-async-await') class Position{ @@ -34,7 +34,7 @@ export class MMR{ } digest(input){ - return blake2b(Buffer.concat([...input]), {dkLen: 32, personalization: "VerusDefaultHash"}) + return //blake2b(Buffer.concat([...input]), {dkLen: 32, personalization: "VerusDefaultHash"}) } async get(leafIndex){ diff --git a/yarn.lock b/yarn.lock index 24913c1..4c6ac52 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,165 +2,163 @@ # yarn lockfile v1 -"@ampproject/remapping@^2.2.0": - version "2.2.1" - resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630" - integrity sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg== +"@ampproject/remapping@^2.1.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d" + integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w== dependencies: - "@jridgewell/gen-mapping" "^0.3.0" + "@jridgewell/gen-mapping" "^0.1.0" "@jridgewell/trace-mapping" "^0.3.9" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.5.tgz#234d98e1551960604f1246e6475891a570ad5658" - integrity sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ== +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" + integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== dependencies: - "@babel/highlight" "^7.22.5" + "@babel/highlight" "^7.18.6" -"@babel/compat-data@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.5.tgz#b1f6c86a02d85d2dd3368a2b67c09add8cd0c255" - integrity sha512-4Jc/YuIaYqKnDDz892kPIledykKg12Aw1PYX5i/TY28anJtacvM1Rrr8wbieB9GfEJwlzqT0hUEao0CxEebiDA== +"@babel/compat-data@^7.19.3": + version "7.19.3" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.19.3.tgz#707b939793f867f5a73b2666e6d9a3396eb03151" + integrity sha512-prBHMK4JYYK+wDjJF1q99KK4JLL+egWS4nmNqdlMUgCExMZ+iZW0hGhyC3VEbsPjvaN0TBhW//VIFwBrk8sEiw== "@babel/core@^7.11.6", "@babel/core@^7.12.3": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.5.tgz#d67d9747ecf26ee7ecd3ebae1ee22225fe902a89" - integrity sha512-SBuTAjg91A3eKOvD+bPEz3LlhHZRNu1nFOVts9lzDJTXshHTjII0BAtDS3Y2DAkdZdDKWVZGVwkDfc4Clxn1dg== - dependencies: - "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.22.5" - "@babel/generator" "^7.22.5" - "@babel/helper-compilation-targets" "^7.22.5" - "@babel/helper-module-transforms" "^7.22.5" - "@babel/helpers" "^7.22.5" - "@babel/parser" "^7.22.5" - "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.5" - "@babel/types" "^7.22.5" + version "7.19.3" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.19.3.tgz#2519f62a51458f43b682d61583c3810e7dcee64c" + integrity sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ== + dependencies: + "@ampproject/remapping" "^2.1.0" + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.19.3" + "@babel/helper-compilation-targets" "^7.19.3" + "@babel/helper-module-transforms" "^7.19.0" + "@babel/helpers" "^7.19.0" + "@babel/parser" "^7.19.3" + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.19.3" + "@babel/types" "^7.19.3" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" - json5 "^2.2.2" + json5 "^2.2.1" semver "^6.3.0" -"@babel/generator@^7.22.5", "@babel/generator@^7.7.2": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.5.tgz#1e7bf768688acfb05cf30b2369ef855e82d984f7" - integrity sha512-+lcUbnTRhd0jOewtFSedLyiPsD5tswKkbgcezOqqWFUVNEwoUTlpPOBmvhG7OXWLR4jMdv0czPGH5XbflnD1EA== +"@babel/generator@^7.19.3", "@babel/generator@^7.7.2": + version "7.19.3" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.19.3.tgz#d7f4d1300485b4547cb6f94b27d10d237b42bf59" + integrity sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ== dependencies: - "@babel/types" "^7.22.5" + "@babel/types" "^7.19.3" "@jridgewell/gen-mapping" "^0.3.2" - "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" -"@babel/helper-compilation-targets@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.5.tgz#fc7319fc54c5e2fa14b2909cf3c5fd3046813e02" - integrity sha512-Ji+ywpHeuqxB8WDxraCiqR0xfhYjiDE/e6k7FuIaANnoOFxAHskHChz4vA1mJC9Lbm01s1PVAGhQY4FUKSkGZw== +"@babel/helper-compilation-targets@^7.19.3": + version "7.19.3" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz#a10a04588125675d7c7ae299af86fa1b2ee038ca" + integrity sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg== dependencies: - "@babel/compat-data" "^7.22.5" - "@babel/helper-validator-option" "^7.22.5" + "@babel/compat-data" "^7.19.3" + "@babel/helper-validator-option" "^7.18.6" browserslist "^4.21.3" - lru-cache "^5.1.1" semver "^6.3.0" -"@babel/helper-environment-visitor@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz#f06dd41b7c1f44e1f8da6c4055b41ab3a09a7e98" - integrity sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q== - -"@babel/helper-function-name@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz#ede300828905bb15e582c037162f99d5183af1be" - integrity sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ== - dependencies: - "@babel/template" "^7.22.5" - "@babel/types" "^7.22.5" - -"@babel/helper-hoist-variables@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb" - integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-module-imports@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz#1a8f4c9f4027d23f520bd76b364d44434a72660c" - integrity sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-module-transforms@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.22.5.tgz#0f65daa0716961b6e96b164034e737f60a80d2ef" - integrity sha512-+hGKDt/Ze8GFExiVHno/2dvG5IdstpzCq0y4Qc9OJ25D4q3pKfiIP/4Vp3/JvhDkLKsDK2api3q3fpIgiIF5bw== - dependencies: - "@babel/helper-environment-visitor" "^7.22.5" - "@babel/helper-module-imports" "^7.22.5" - "@babel/helper-simple-access" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.5" - "@babel/helper-validator-identifier" "^7.22.5" - "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.5" - "@babel/types" "^7.22.5" - -"@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.14.5", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.8.0": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz#dd7ee3735e8a313b9f7b05a773d892e88e6d7295" - integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg== - -"@babel/helper-simple-access@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz#4938357dc7d782b80ed6dbb03a0fba3d22b1d5de" - integrity sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-split-export-declaration@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.5.tgz#88cf11050edb95ed08d596f7a044462189127a08" - integrity sha512-thqK5QFghPKWLhAV321lxF95yCg2K3Ob5yw+M3VHWfdia0IkPXUtoLH8x/6Fh486QUvzhb8YOWHChTVen2/PoQ== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-string-parser@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f" - integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw== - -"@babel/helper-validator-identifier@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz#9544ef6a33999343c8740fa51350f30eeaaaf193" - integrity sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ== - -"@babel/helper-validator-option@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz#de52000a15a177413c8234fa3a8af4ee8102d0ac" - integrity sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw== - -"@babel/helpers@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.22.5.tgz#74bb4373eb390d1ceed74a15ef97767e63120820" - integrity sha512-pSXRmfE1vzcUIDFQcSGA5Mr+GxBV9oiRKDuDxXvWQQBCh8HoIjs/2DlDB7H8smac1IVrB9/xdXj2N3Wol9Cr+Q== - dependencies: - "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.5" - "@babel/types" "^7.22.5" - -"@babel/highlight@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.5.tgz#aa6c05c5407a67ebce408162b7ede789b4d22031" - integrity sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw== - dependencies: - "@babel/helper-validator-identifier" "^7.22.5" +"@babel/helper-environment-visitor@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be" + integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== + +"@babel/helper-function-name@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz#941574ed5390682e872e52d3f38ce9d1bef4648c" + integrity sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w== + dependencies: + "@babel/template" "^7.18.10" + "@babel/types" "^7.19.0" + +"@babel/helper-hoist-variables@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" + integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== + dependencies: + "@babel/types" "^7.18.6" + +"@babel/helper-module-imports@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e" + integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== + dependencies: + "@babel/types" "^7.18.6" + +"@babel/helper-module-transforms@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz#309b230f04e22c58c6a2c0c0c7e50b216d350c30" + integrity sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ== + dependencies: + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-module-imports" "^7.18.6" + "@babel/helper-simple-access" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/helper-validator-identifier" "^7.18.6" + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.19.0" + "@babel/types" "^7.19.0" + +"@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.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.8.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz#4796bb14961521f0f8715990bee2fb6e51ce21bf" + integrity sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw== + +"@babel/helper-simple-access@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz#d6d8f51f4ac2978068df934b569f08f29788c7ea" + integrity sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g== + dependencies: + "@babel/types" "^7.18.6" + +"@babel/helper-split-export-declaration@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" + integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== + dependencies: + "@babel/types" "^7.18.6" + +"@babel/helper-string-parser@^7.18.10": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz#181f22d28ebe1b3857fa575f5c290b1aaf659b56" + integrity sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw== + +"@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": + version "7.19.1" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" + integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== + +"@babel/helper-validator-option@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" + integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== + +"@babel/helpers@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.19.0.tgz#f30534657faf246ae96551d88dd31e9d1fa1fc18" + integrity sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg== + dependencies: + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.19.0" + "@babel/types" "^7.19.0" + +"@babel/highlight@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" + integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== + dependencies: + "@babel/helper-validator-identifier" "^7.18.6" chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.5.tgz#721fd042f3ce1896238cf1b341c77eb7dee7dbea" - integrity sha512-DFZMC9LJUG9PLOclRC32G63UXwzqS2koQC8dkx+PLdmt1xSePYpbT/NbsrJy8Q/muXz7o/h/d4A7Fuyixm559Q== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.18.10", "@babel/parser@^7.19.3": + version "7.19.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.19.3.tgz#8dd36d17c53ff347f9e55c328710321b49479a9a" + integrity sha512-pJ9xOlNWHiy9+FuFP09DEAFbAn4JskgRsVcc169w2xRBC3FRGuQEwjeIMMND9L2zc0iEhO/tGv4Zq+km+hxNpQ== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -247,44 +245,44 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-typescript@^7.7.2": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz#aac8d383b062c5072c647a31ef990c1d0af90272" - integrity sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ== - dependencies: - "@babel/helper-plugin-utils" "^7.22.5" - -"@babel/template@^7.22.5", "@babel/template@^7.3.3": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.5.tgz#0c8c4d944509875849bd0344ff0050756eefc6ec" - integrity sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw== - dependencies: - "@babel/code-frame" "^7.22.5" - "@babel/parser" "^7.22.5" - "@babel/types" "^7.22.5" - -"@babel/traverse@^7.22.5", "@babel/traverse@^7.7.2": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.22.5.tgz#44bd276690db6f4940fdb84e1cb4abd2f729ccd1" - integrity sha512-7DuIjPgERaNo6r+PZwItpjCZEa5vyw4eJGufeLxrPdBXBoLcCJCIasvK6pK/9DVNrLZTLFhUGqaC6X/PA007TQ== - dependencies: - "@babel/code-frame" "^7.22.5" - "@babel/generator" "^7.22.5" - "@babel/helper-environment-visitor" "^7.22.5" - "@babel/helper-function-name" "^7.22.5" - "@babel/helper-hoist-variables" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.5" - "@babel/parser" "^7.22.5" - "@babel/types" "^7.22.5" + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz#1c09cd25795c7c2b8a4ba9ae49394576d4133285" + integrity sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/template@^7.18.10", "@babel/template@^7.3.3": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71" + integrity sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA== + dependencies: + "@babel/code-frame" "^7.18.6" + "@babel/parser" "^7.18.10" + "@babel/types" "^7.18.10" + +"@babel/traverse@^7.19.0", "@babel/traverse@^7.19.3", "@babel/traverse@^7.7.2": + version "7.19.3" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.19.3.tgz#3a3c5348d4988ba60884e8494b0592b2f15a04b4" + integrity sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ== + dependencies: + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.19.3" + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-function-name" "^7.19.0" + "@babel/helper-hoist-variables" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/parser" "^7.19.3" + "@babel/types" "^7.19.3" debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.5", "@babel/types@^7.3.3": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.5.tgz#cd93eeaab025880a3a47ec881f4b096a5b786fbe" - integrity sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA== +"@babel/types@^7.0.0", "@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.19.0", "@babel/types@^7.19.3", "@babel/types@^7.3.0", "@babel/types@^7.3.3": + version "7.19.3" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.19.3.tgz#fc420e6bbe54880bce6779ffaf315f5e43ec9624" + integrity sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw== dependencies: - "@babel/helper-string-parser" "^7.22.5" - "@babel/helper-validator-identifier" "^7.22.5" + "@babel/helper-string-parser" "^7.18.10" + "@babel/helper-validator-identifier" "^7.19.1" to-fast-properties "^2.0.0" "@bcoe/v8-coverage@^0.2.3": @@ -292,22 +290,15 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@eslint-community/eslint-utils@^4.2.0": - version "4.4.0" - resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" - integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== - dependencies: - eslint-visitor-keys "^3.3.0" - "@eslint/eslintrc@^1.3.0": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.4.1.tgz#af58772019a2d271b7e2d4c23ff4ddcba3ccfb3e" - integrity sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA== + version "1.3.2" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.2.tgz#58b69582f3b7271d8fa67fe5251767a5b38ea356" + integrity sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ== dependencies: ajv "^6.12.4" debug "^4.3.2" espree "^9.4.0" - globals "^13.19.0" + globals "^13.15.0" ignore "^5.2.0" import-fresh "^3.2.1" js-yaml "^4.1.0" @@ -537,52 +528,45 @@ "@types/yargs" "^17.0.8" chalk "^4.0.0" -"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": - version "0.3.3" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" - integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ== +"@jridgewell/gen-mapping@^0.1.0": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996" + integrity sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w== + dependencies: + "@jridgewell/set-array" "^1.0.0" + "@jridgewell/sourcemap-codec" "^1.4.10" + +"@jridgewell/gen-mapping@^0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" + integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== dependencies: "@jridgewell/set-array" "^1.0.1" "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" -"@jridgewell/resolve-uri@3.1.0": +"@jridgewell/resolve-uri@^3.0.3": version "3.1.0" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== -"@jridgewell/set-array@^1.0.1": +"@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1": version "1.1.2" resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== -"@jridgewell/sourcemap-codec@1.4.14": +"@jridgewell/sourcemap-codec@^1.4.10": version "1.4.14" resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== -"@jridgewell/sourcemap-codec@^1.4.10": - version "1.4.15" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" - integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== - -"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.13", "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": - version "0.3.18" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz#25783b2086daf6ff1dcb53c9249ae480e4dd4cd6" - integrity sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA== +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.13", "@jridgewell/trace-mapping@^0.3.9": + version "0.3.15" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz#aba35c48a38d3fd84b37e66c9c0423f9744f9774" + integrity sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g== dependencies: - "@jridgewell/resolve-uri" "3.1.0" - "@jridgewell/sourcemap-codec" "1.4.14" - -"@noble/hashes@^1.2.0": - version "1.3.1" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.1.tgz#8831ef002114670c603c458ab8b11328406953a9" - integrity sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA== - -"@noble/hashes@^1.3.2": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39" - integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ== + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -606,14 +590,14 @@ fastq "^1.6.0" "@sinclair/typebox@^0.24.1": - version "0.24.51" - resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.51.tgz#645f33fe4e02defe26f2f5c0410e1c094eac7f5f" - integrity sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA== + version "0.24.43" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.43.tgz#2e2bce0e5e493aaf639beed0cd6c88cfde7dd3d7" + integrity sha512-1orQTvtazZmsPeBroJjysvsOQCYV2yjWlebkSY38pl5vr2tdLjEJ+LoxITlGNZaH2RE19WlAwQMkH/7C14wLfw== "@sinonjs/commons@^1.7.0": - version "1.8.6" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.6.tgz#80c516a4dc264c2a69115e7578d62581ff455ed9" - integrity sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ== + version "1.8.3" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.3.tgz#3802ddd21a50a949b6721ddd72da36e67e7f1b2d" + integrity sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ== dependencies: type-detect "4.0.8" @@ -625,12 +609,12 @@ "@sinonjs/commons" "^1.7.0" "@types/babel__core@^7.1.14": - version "7.20.1" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.1.tgz#916ecea274b0c776fec721e333e55762d3a9614b" - integrity sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw== + version "7.1.19" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.19.tgz#7b497495b7d1b4812bdb9d02804d0576f43ee460" + integrity sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw== dependencies: - "@babel/parser" "^7.20.7" - "@babel/types" "^7.20.7" + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" "@types/babel__generator" "*" "@types/babel__template" "*" "@types/babel__traverse" "*" @@ -651,11 +635,11 @@ "@babel/types" "^7.0.0" "@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": - version "7.20.1" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.1.tgz#dd6f1d2411ae677dcb2db008c962598be31d6acf" - integrity sha512-MitHFXnhtgwsGZWtT68URpOvLN4EREih1u3QtQiN4VdAxWKRVvGCSvw/Qth0M0Qq3pJpnGOu5JaM/ydK7OGbqg== + version "7.18.2" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.18.2.tgz#235bf339d17185bdec25e024ca19cce257cc7309" + integrity sha512-FcFaxOr2V5KZCviw1TnutEMVUVsGt4D2hP1TAfXZAMKuHYW3xQhe3jTxNPWutgCJ3/X1c5yX8ZoGVEItxKbwBg== dependencies: - "@babel/types" "^7.20.7" + "@babel/types" "^7.3.0" "@types/bn.js@5.1.1": version "5.1.1" @@ -679,9 +663,9 @@ "@types/node" "*" "@types/graceful-fs@^4.1.3": - version "4.1.6" - resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.6.tgz#e14b2576a1c25026b7f02ede1de3b84c3a1efeae" - integrity sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw== + version "4.1.5" + resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.5.tgz#21ffba0d98da4350db64891f92a9e5db3cdb4e15" + integrity sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw== dependencies: "@types/node" "*" @@ -713,14 +697,14 @@ pretty-format "^28.0.0" "@types/json-schema@^7.0.9": - version "7.0.12" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.12.tgz#d70faba7039d5fca54c83c7dbab41051d2b6f6cb" - integrity sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA== + version "7.0.11" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" + integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== "@types/node@*": - version "20.3.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.3.1.tgz#e8a83f1aa8b649377bb1fb5d7bac5cb90e784dfe" - integrity sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg== + version "18.7.23" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.23.tgz#75c580983846181ebe5f4abc40fe9dfb2d65665f" + integrity sha512-DWNcCHolDq0ZKGizjx2DZjR/PqsYwAcYUJmfMWqtVU2MBMG5Mo+xFZrhGId5r/O5HOuMPyQEcM6KUBp5lBZZBg== "@types/node@18.7.22": version "18.7.22" @@ -728,14 +712,9 @@ integrity sha512-TsmoXYd4zrkkKjJB0URF/mTIKPl+kVcbqClB2F/ykU7vil1BfWZVndOnpEIozPv4fURD28gyPFeIkW2G+KXOvw== "@types/prettier@^2.1.5": - version "2.7.3" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.3.tgz#3e51a17e291d01d17d3fc61422015a933af7a08f" - integrity sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA== - -"@types/semver@^7.3.12": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.0.tgz#591c1ce3a702c45ee15f47a42ade72c2fd78978a" - integrity sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw== + version "2.7.1" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.1.tgz#dfd20e2dc35f027cdd6c1908e80a5ddc7499670e" + integrity sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow== "@types/stack-utils@^2.0.0": version "2.0.1" @@ -748,9 +727,9 @@ integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA== "@types/yargs@^17.0.8": - version "17.0.24" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.24.tgz#b3ef8d50ad4aa6aecf6ddc97c580a00f5aa11902" - integrity sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw== + version "17.0.13" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.13.tgz#34cced675ca1b1d51fcf4d34c3c6f0fa142a5c76" + integrity sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg== dependencies: "@types/yargs-parser" "*" @@ -787,13 +766,13 @@ "@typescript-eslint/types" "5.30.7" "@typescript-eslint/visitor-keys" "5.30.7" -"@typescript-eslint/scope-manager@5.60.0": - version "5.60.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.60.0.tgz#ae511967b4bd84f1d5e179bb2c82857334941c1c" - integrity sha512-hakuzcxPwXi2ihf9WQu1BbRj1e/Pd8ZZwVTG9kfbxAMZstKz8/9OoexIwnmLzShtsdap5U/CoQGRCWlSuPbYxQ== +"@typescript-eslint/scope-manager@5.38.1": + version "5.38.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.38.1.tgz#f87b289ef8819b47189351814ad183e8801d5764" + integrity sha512-BfRDq5RidVU3RbqApKmS7RFMtkyWMM50qWnDAkKgQiezRtLKsoyRKIvz1Ok5ilRWeD9IuHvaidaLxvGx/2eqTQ== dependencies: - "@typescript-eslint/types" "5.60.0" - "@typescript-eslint/visitor-keys" "5.60.0" + "@typescript-eslint/types" "5.38.1" + "@typescript-eslint/visitor-keys" "5.38.1" "@typescript-eslint/type-utils@5.30.7": version "5.30.7" @@ -809,10 +788,10 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.30.7.tgz#18331487cc92d0f1fb1a6f580c8ec832528079d0" integrity sha512-ocVkETUs82+U+HowkovV6uxf1AnVRKCmDRNUBUUo46/5SQv1owC/EBFkiu4MOHeZqhKz2ktZ3kvJJ1uFqQ8QPg== -"@typescript-eslint/types@5.60.0": - version "5.60.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.60.0.tgz#3179962b28b4790de70e2344465ec97582ce2558" - integrity sha512-ascOuoCpNZBccFVNJRSC6rPq4EmJ2NkuoKnd6LDNyAQmdDnziAtxbCGWCbefG1CNzmDvd05zO36AmB7H8RzKPA== +"@typescript-eslint/types@5.38.1": + version "5.38.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.38.1.tgz#74f9d6dcb8dc7c58c51e9fbc6653ded39e2e225c" + integrity sha512-QTW1iHq1Tffp9lNfbfPm4WJabbvpyaehQ0SrvVK2yfV79SytD9XDVxqiPvdrv2LK7DGSFo91TB2FgWanbJAZXg== "@typescript-eslint/typescript-estree@5.30.7": version "5.30.7" @@ -827,13 +806,13 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@5.60.0": - version "5.60.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.60.0.tgz#4ddf1a81d32a850de66642d9b3ad1e3254fb1600" - integrity sha512-R43thAuwarC99SnvrBmh26tc7F6sPa2B3evkXp/8q954kYL6Ro56AwASYWtEEi+4j09GbiNAHqYwNNZuNlARGQ== +"@typescript-eslint/typescript-estree@5.38.1": + version "5.38.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.38.1.tgz#657d858d5d6087f96b638ee383ee1cff52605a1e" + integrity sha512-99b5e/Enoe8fKMLdSuwrfH/C0EIbpUWmeEKHmQlGZb8msY33qn1KlkFww0z26o5Omx7EVjzVDCWEfrfCDHfE7g== dependencies: - "@typescript-eslint/types" "5.60.0" - "@typescript-eslint/visitor-keys" "5.60.0" + "@typescript-eslint/types" "5.38.1" + "@typescript-eslint/visitor-keys" "5.38.1" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" @@ -853,18 +832,16 @@ eslint-utils "^3.0.0" "@typescript-eslint/utils@^5.10.0": - version "5.60.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.60.0.tgz#4667c5aece82f9d4f24a667602f0f300864b554c" - integrity sha512-ba51uMqDtfLQ5+xHtwlO84vkdjrqNzOnqrnwbMHMRY8Tqeme8C2Q8Fc7LajfGR+e3/4LoYiWXUM6BpIIbHJ4hQ== + version "5.38.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.38.1.tgz#e3ac37d7b33d1362bb5adf4acdbe00372fb813ef" + integrity sha512-oIuUiVxPBsndrN81oP8tXnFa/+EcZ03qLqPDfSZ5xIJVm7A9V0rlkQwwBOAGtrdN70ZKDlKv+l1BeT4eSFxwXA== dependencies: - "@eslint-community/eslint-utils" "^4.2.0" "@types/json-schema" "^7.0.9" - "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.60.0" - "@typescript-eslint/types" "5.60.0" - "@typescript-eslint/typescript-estree" "5.60.0" + "@typescript-eslint/scope-manager" "5.38.1" + "@typescript-eslint/types" "5.38.1" + "@typescript-eslint/typescript-estree" "5.38.1" eslint-scope "^5.1.1" - semver "^7.3.7" + eslint-utils "^3.0.0" "@typescript-eslint/visitor-keys@5.30.7": version "5.30.7" @@ -874,12 +851,12 @@ "@typescript-eslint/types" "5.30.7" eslint-visitor-keys "^3.3.0" -"@typescript-eslint/visitor-keys@5.60.0": - version "5.60.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.60.0.tgz#b48b29da3f5f31dd1656281727004589d2722a66" - integrity sha512-wm9Uz71SbCyhUKgcaPRauBdTegUyY/ZWl8gLwD/i/ybJqscrrdVSFImpvUz16BLPChIeKBK5Fa9s6KDQjsjyWw== +"@typescript-eslint/visitor-keys@5.38.1": + version "5.38.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.38.1.tgz#508071bfc6b96d194c0afe6a65ad47029059edbc" + integrity sha512-bSHr1rRxXt54+j2n4k54p4fj8AHJ49VDWtjpImOpzQj4qjAiOpPni+V1Tyajh19Api1i844F757cur8wH3YvOA== dependencies: - "@typescript-eslint/types" "5.60.0" + "@typescript-eslint/types" "5.38.1" eslint-visitor-keys "^3.3.0" acorn-jsx@^5.3.2: @@ -888,9 +865,9 @@ acorn-jsx@^5.3.2: integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== acorn@^8.8.0: - version "8.9.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.9.0.tgz#78a16e3b2bcc198c10822786fa6679e245db5b59" - integrity sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ== + version "8.8.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8" + integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== ajv@^6.10.0, ajv@^6.12.4: version "6.12.6" @@ -934,9 +911,9 @@ ansi-styles@^5.0.0: integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== anymatch@^3.0.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" - integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + version "3.1.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" + integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== dependencies: normalize-path "^3.0.0" picomatch "^2.0.4" @@ -1023,25 +1000,22 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -base-x@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/base-x/-/base-x-4.0.0.tgz#d0e3b7753450c73f8ad2389b5c018a4af7b2224a" - integrity sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw== +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" base64url@3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/base64url/-/base64url-3.0.1.tgz#6399d572e2bc3f90a9a8b22d5dbb0a32d33f788d" integrity sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A== -bech32@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/bech32/-/bech32-2.0.0.tgz#078d3686535075c8c79709f054b1b226a133b355" - integrity sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg== - -big-integer@^1.6.51: - version "1.6.51" - resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686" - integrity sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg== +bech32@^1.1.3: + version "1.1.4" + resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" + integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== bn.js@5.2.1: version "5.2.1" @@ -1064,14 +1038,14 @@ braces@^3.0.2: fill-range "^7.0.1" browserslist@^4.21.3: - version "4.21.9" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.9.tgz#e11bdd3c313d7e2a9e87e8b4b0c7872b13897635" - integrity sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg== + version "4.21.4" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.4.tgz#e7496bbc67b9e39dd0f98565feccdcb0d4ff6987" + integrity sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw== dependencies: - caniuse-lite "^1.0.30001503" - electron-to-chromium "^1.4.431" - node-releases "^2.0.12" - update-browserslist-db "^1.0.11" + caniuse-lite "^1.0.30001400" + electron-to-chromium "^1.4.251" + node-releases "^2.0.6" + update-browserslist-db "^1.0.9" bs-logger@0.x: version "0.2.6" @@ -1080,19 +1054,20 @@ bs-logger@0.x: dependencies: fast-json-stable-stringify "2.x" -bs58@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/bs58/-/bs58-5.0.0.tgz#865575b4d13c09ea2a84622df6c8cbeb54ffc279" - integrity sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ== +bs58@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" + integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== dependencies: - base-x "^4.0.0" + base-x "^3.0.2" "bs58check@https://github.com/bitcoinjs/bs58check": - version "3.0.1" - resolved "https://github.com/bitcoinjs/bs58check#0ddbd3e0813c22a6aef85313916fdab71f479aa9" + version "2.1.2" + resolved "https://github.com/bitcoinjs/bs58check#12b3e700f355c5c49d0be3f8fc29be6c66e753e9" dependencies: - "@noble/hashes" "^1.2.0" - bs58 "^5.0.0" + bs58 "^4.0.0" + create-hash "^1.1.0" + safe-buffer "^5.1.2" bser@2.1.1: version "2.1.1" @@ -1121,10 +1096,10 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001503: - version "1.0.30001506" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001506.tgz#35bd814b310a487970c585430e9e80ee23faf14b" - integrity sha512-6XNEcpygZMCKaufIcgpQNZNf00GEqc7VQON+9Rd0K1bMYo8xhMZRAo5zpbnbMNizi4YNgIDAFrdykWsvY3H4Hw== +caniuse-lite@^1.0.30001400: + version "1.0.30001412" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001412.tgz#30f67d55a865da43e0aeec003f073ea8764d5d7c" + integrity sha512-+TeEIee1gS5bYOiuf+PS/kp2mrXic37Hl66VY6EAfxasIk5fELTktK2oOezYed12H8w7jt3s512PpulQidPjwA== chalk@^2.0.0: version "2.4.2" @@ -1149,9 +1124,9 @@ char-regex@^1.0.2: integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== ci-info@^3.2.0: - version "3.8.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.8.0.tgz#81408265a5380c929f0bc665d62256628ce9ef91" - integrity sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw== + version "3.4.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.4.0.tgz#b28484fd436cbc267900364f096c9dc185efb251" + integrity sha512-t5QdPT5jq3o262DOQ8zA6E1tlH2upmUc4Hlvrbx1pGYJuiiHl7O7rvVNI+l8HTVhd/q3Qc9vqimkNk5yiXsAug== cipher-base@^1.0.1: version "1.0.4" @@ -1162,17 +1137,17 @@ cipher-base@^1.0.1: safe-buffer "^5.0.1" cjs-module-lexer@^1.0.0: - version "1.2.3" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz#6c370ab19f8a3394e318fe682686ec0ac684d107" - integrity sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ== + version "1.2.2" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40" + integrity sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA== -cliui@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" - integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== dependencies: string-width "^4.2.0" - strip-ansi "^6.0.1" + strip-ansi "^6.0.0" wrap-ansi "^7.0.0" co@^4.6.0: @@ -1215,11 +1190,13 @@ concat-map@0.0.1: integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" - integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== + version "1.8.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369" + integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA== + dependencies: + safe-buffer "~5.1.1" -create-hash@1.2.0: +create-hash@1.2.0, create-hash@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== @@ -1257,9 +1234,9 @@ deep-is@^0.1.3: integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== deepmerge@^4.2.2: - version "4.3.1" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" - integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== + version "4.2.2" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" + integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== detect-newline@^3.0.0: version "3.1.0" @@ -1285,10 +1262,10 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -electron-to-chromium@^1.4.431: - version "1.4.435" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.435.tgz#761c34300603b9f1234f0b6155870d3002435db6" - integrity sha512-B0CBWVFhvoQCW/XtjRzgrmqcgVWg6RXOEM/dK59+wFV93BFGR6AeNKc4OyhM+T3IhJaOOG8o/V+33Y2mwJWtzw== +electron-to-chromium@^1.4.251: + version "1.4.266" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.266.tgz#b2ce973eedbff309e2b98d1ed348e447bd4681fe" + integrity sha512-saJTYECxUSv7eSpnXw0XIEvUkP9x4s/x2mm3TVX7k4rIFS6f5TjBih1B5h437WzIhHQjid+d8ouQzPQskMervQ== emittery@^0.10.2: version "0.10.2" @@ -1343,9 +1320,9 @@ eslint-scope@^5.1.1: estraverse "^4.1.1" eslint-scope@^7.1.1: - version "7.2.0" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.0.tgz#f21ebdafda02352f103634b96dd47d9f81ca117b" - integrity sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw== + version "7.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" + integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== dependencies: esrecurse "^4.3.0" estraverse "^5.2.0" @@ -1362,10 +1339,10 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== -eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1: - version "3.4.1" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz#c22c48f48942d08ca824cc526211ae400478a994" - integrity sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA== +eslint-visitor-keys@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" + integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== eslint@8.20.0: version "8.20.0" @@ -1409,13 +1386,13 @@ eslint@8.20.0: v8-compile-cache "^2.0.3" espree@^9.3.2, espree@^9.4.0: - version "9.5.2" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.5.2.tgz#e994e7dc33a082a7a82dceaf12883a829353215b" - integrity sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw== + version "9.4.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.0.tgz#cd4bc3d6e9336c433265fc0aa016fc1aaf182f8a" + integrity sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw== dependencies: acorn "^8.8.0" acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.4.1" + eslint-visitor-keys "^3.3.0" esprima@^4.0.0: version "4.0.1" @@ -1423,9 +1400,9 @@ esprima@^4.0.0: integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== esquery@^1.4.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" - integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== + version "1.4.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" + integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== dependencies: estraverse "^5.1.0" @@ -1509,9 +1486,9 @@ fast-levenshtein@^2.0.6: integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== fastq@^1.6.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" - integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== + version "1.13.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" + integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== dependencies: reusify "^1.0.4" @@ -1628,10 +1605,10 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globals@^13.15.0, globals@^13.19.0: - version "13.20.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.20.0.tgz#ea276a1e508ffd4f1612888f9d1bad1e2717bf82" - integrity sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ== +globals@^13.15.0: + version "13.17.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.17.0.tgz#902eb1e680a41da93945adbdcb5a9f361ba69bd4" + integrity sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw== dependencies: type-fest "^0.20.2" @@ -1648,9 +1625,9 @@ globby@^11.1.0: slash "^3.0.0" graceful-fs@^4.2.9: - version "4.2.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" - integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + version "4.2.10" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" + integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== has-flag@^3.0.0: version "3.0.0" @@ -1689,9 +1666,9 @@ human-signals@^2.1.0: integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== ignore@^5.2.0: - version "5.2.4" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" - integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== + version "5.2.0" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" + integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== import-fresh@^3.0.0, import-fresh@^3.2.1: version "3.3.0" @@ -1732,10 +1709,10 @@ is-arrayish@^0.2.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== -is-core-module@^2.11.0: - version "2.12.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.12.1.tgz#0c0b6885b6f80011c71541ce15c8d66cf5a4f9fd" - integrity sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg== +is-core-module@^2.9.0: + version "2.10.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.10.0.tgz#9012ede0a91c69587e647514e1d5277019e728ed" + integrity sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg== dependencies: has "^1.0.3" @@ -1782,9 +1759,9 @@ istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" - integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== + version "5.2.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz#31d18bdd127f825dd02ea7bfdfd906f8ab840e9f" + integrity sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A== dependencies: "@babel/core" "^7.12.3" "@babel/parser" "^7.14.7" @@ -2003,9 +1980,9 @@ jest-mock@^28.1.3: "@types/node" "*" jest-pnp-resolver@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" - integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== + version "1.2.2" + resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c" + integrity sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w== jest-regex-util@^28.0.2: version "28.0.2" @@ -2216,10 +2193,10 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== -json5@^2.2.1, json5@^2.2.2: - version "2.2.3" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" - integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== +json5@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" + integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== kleur@^3.0.3: version "3.0.3" @@ -2261,13 +2238,6 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lru-cache@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - lru-cache@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" @@ -2348,10 +2318,10 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== -node-releases@^2.0.12: - version "2.0.12" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.12.tgz#35627cc224a23bfb06fb3380f2b3afaaa7eb1039" - integrity sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ== +node-releases@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" + integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg== normalize-path@^3.0.0: version "3.0.0" @@ -2470,9 +2440,9 @@ picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== pirates@^4.0.4: - version "4.0.6" - resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" - integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== + version "4.0.5" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" + integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== pkg-dir@^4.2.0: version "4.2.0" @@ -2510,9 +2480,9 @@ prompts@^2.0.1: sisteransi "^1.0.5" punycode@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" - integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== queue-microtask@^1.2.2: version "1.2.3" @@ -2525,9 +2495,9 @@ react-is@^18.0.0: integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== readable-stream@^3.6.0: - version "3.6.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" - integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== dependencies: inherits "^2.0.3" string_decoder "^1.1.1" @@ -2561,16 +2531,16 @@ resolve-from@^5.0.0: integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== resolve.exports@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.1.tgz#05cfd5b3edf641571fd46fa608b610dda9ead999" - integrity sha512-/NtpHNDN7jWhAaQ9BvBUYZ6YTXsRBgfqWFWP7BZBaoMJO/I3G5OFzvTuWNlZC3aPjins1F+TNrLKsGbH4rfsRQ== + version "1.1.0" + resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.0.tgz#5ce842b94b05146c0e03076985d1d0e7e48c90c9" + integrity sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ== resolve@^1.20.0: - version "1.22.2" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f" - integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== + version "1.22.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" + integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== dependencies: - is-core-module "^2.11.0" + is-core-module "^2.9.0" path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" @@ -2606,15 +2576,20 @@ safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== +safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + semaphore-async-await@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/semaphore-async-await/-/semaphore-async-await-1.5.1.tgz#857bef5e3644601ca4b9570b87e9df5ca12974fa" integrity sha512-b/ptP11hETwYWpeilHXXQiV5UJNJl7ZWWooKRE5eBIYWoom6dZ0SluCIdCtKycsMtZgKWE01/qAw6jblw1YVhg== semver@7.x, semver@^7.3.5, semver@^7.3.7: - version "7.5.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.2.tgz#5b851e66d1be07c1cdaf37dfc856f543325a2beb" - integrity sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ== + version "7.3.7" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" + integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== dependencies: lru-cache "^6.0.0" @@ -2677,9 +2652,9 @@ sprintf-js@~1.0.2: integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== stack-utils@^2.0.3: - version "2.0.6" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" - integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== + version "2.0.5" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.5.tgz#d25265fca995154659dbbfba3b49254778d2fdd5" + integrity sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA== dependencies: escape-string-regexp "^2.0.0" @@ -2855,10 +2830,10 @@ typescript@4.7.4: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== -update-browserslist-db@^1.0.11: - version "1.0.11" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz#9a2a641ad2907ae7b3616506f4b977851db5b940" - integrity sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA== +update-browserslist-db@^1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz#2924d3927367a38d5c555413a7ce138fc95fcb18" + integrity sha512-/xsqn21EGVdXI3EXSum1Yckj3ZVZugqyOZQ/CxYPBD/R+ko9NSUScf8tFF4dOKY+2pvSSJA/S+5B8s4Zr4kyvg== dependencies: escalade "^3.1.1" picocolors "^1.0.0" @@ -2881,9 +2856,9 @@ v8-compile-cache@^2.0.3: integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== v8-to-istanbul@^9.0.1: - version "9.1.0" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz#1b83ed4e397f58c85c266a570fc2558b5feb9265" - integrity sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA== + version "9.0.1" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz#b6f994b0b5d4ef255e17a0d17dc444a9f5132fa4" + integrity sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w== dependencies: "@jridgewell/trace-mapping" "^0.3.12" "@types/istanbul-lib-coverage" "^2.0.1" @@ -2935,33 +2910,28 @@ y18n@^5.0.5: resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== -yallist@^3.0.2: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - yallist@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yargs-parser@^21.0.1, yargs-parser@^21.1.1: +yargs-parser@^21.0.0, yargs-parser@^21.0.1: version "21.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== yargs@^17.3.1: - version "17.7.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" - integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + version "17.5.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.5.1.tgz#e109900cab6fcb7fd44b1d8249166feb0b36e58e" + integrity sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA== dependencies: - cliui "^8.0.1" + cliui "^7.0.2" escalade "^3.1.1" get-caller-file "^2.0.5" require-directory "^2.1.1" string-width "^4.2.3" y18n "^5.0.5" - yargs-parser "^21.1.1" + yargs-parser "^21.0.0" yocto-queue@^0.1.0: version "0.1.0" From b55bddccfc88b1bca19570609f23e399764e9449 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Fri, 10 Nov 2023 17:35:43 +0000 Subject: [PATCH 047/120] update blake2b --- dist/vdxf/classes/Attestation.d.ts | 2 +- dist/vdxf/classes/MMR.d.ts | 4 ++-- dist/vdxf/classes/MMR.js | 5 +++-- package.json | 2 ++ src/vdxf/classes/MMR.ts | 5 +++-- yarn.lock | 30 ++++++++++++++++++++++++++++++ 6 files changed, 41 insertions(+), 7 deletions(-) diff --git a/dist/vdxf/classes/Attestation.d.ts b/dist/vdxf/classes/Attestation.d.ts index 2a9aeb1..f6dd8ca 100644 --- a/dist/vdxf/classes/Attestation.d.ts +++ b/dist/vdxf/classes/Attestation.d.ts @@ -28,7 +28,7 @@ export declare class Attestation extends VDXFObject { toDataBuffer(): Buffer; fromDataBuffer(buffer: Buffer, offset?: number): number; getMMR(): Promise; - routeHash(): Promise; + routeHash(): Promise; getHash(n: AttestationData): Buffer; sortHashes(): Array; } diff --git a/dist/vdxf/classes/MMR.d.ts b/dist/vdxf/classes/MMR.d.ts index 5908372..c5305e0 100644 --- a/dist/vdxf/classes/MMR.d.ts +++ b/dist/vdxf/classes/MMR.d.ts @@ -10,12 +10,12 @@ export declare class MMR { _leafLength: number; db: any; constructor(db?: MemoryBasedDb); - digest(input: any): void; + digest(input: any): any; get(leafIndex: any): Promise; _get(nodePosition: any): Promise; append(value: any, leafIndex: any): Promise; appendMany(values: any, startLeafIndex: any): Promise; - getRoot(leafIndex?: number): Promise; + getRoot(leafIndex?: number): Promise; getNodeLength(): Promise; getLeafLength(): Promise; delete(leafIndex: any): Promise; diff --git a/dist/vdxf/classes/MMR.js b/dist/vdxf/classes/MMR.js index 51a6c44..7cdf315 100644 --- a/dist/vdxf/classes/MMR.js +++ b/dist/vdxf/classes/MMR.js @@ -18,7 +18,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", { value: true }); exports.MMR = void 0; -//import { blake2b } from '@noble/hashes/blake2b' +var blake2b = require('blake2b'); const { Lock } = require('semaphore-async-await'); class Position { constructor(index, height, rightness) { @@ -33,7 +33,8 @@ class MMR { this.lock = new Lock(1); } digest(input) { - return; //blake2b(Buffer.concat([...input]), {dkLen: 32, personalization: "VerusDefaultHash"}) + var out = Buffer.allocUnsafe(32); + return blake2b(out.length, null, null, Buffer.from("VerusDefaultHash")).update(Buffer.concat([...input])).digest(out); } get(leafIndex) { return __awaiter(this, void 0, void 0, function* () { diff --git a/package.json b/package.json index 4a0aa54..5641309 100644 --- a/package.json +++ b/package.json @@ -22,12 +22,14 @@ "dependencies": { "base64url": "3.0.1", "bech32": "^1.1.3", + "blake2b": "https://github.com/VerusCoin/blake2b", "bn.js": "5.2.1", "bs58check": "https://github.com/bitcoinjs/bs58check", "create-hash": "1.2.0", "semaphore-async-await": "^1.5.1" }, "devDependencies": { + "@types/blake2b": "^2.1.3", "@types/bn.js": "5.1.1", "@types/bs58check": "2.1.0", "@types/create-hash": "1.2.2", diff --git a/src/vdxf/classes/MMR.ts b/src/vdxf/classes/MMR.ts index 60d980b..7382a16 100644 --- a/src/vdxf/classes/MMR.ts +++ b/src/vdxf/classes/MMR.ts @@ -8,7 +8,7 @@ //to permit persons to whom the Software is furnished to do so, subject to the following conditions: -//import { blake2b } from '@noble/hashes/blake2b' +var blake2b = require('blake2b') const { Lock } = require('semaphore-async-await') class Position{ @@ -34,7 +34,8 @@ export class MMR{ } digest(input){ - return //blake2b(Buffer.concat([...input]), {dkLen: 32, personalization: "VerusDefaultHash"}) + var out = Buffer.allocUnsafe(32); + return blake2b(out.length, null, null, Buffer.from("VerusDefaultHash")).update(Buffer.concat([...input])).digest(out); } async get(leafIndex){ diff --git a/yarn.lock b/yarn.lock index 4c6ac52..4faeb6d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -641,6 +641,11 @@ dependencies: "@babel/types" "^7.3.0" +"@types/blake2b@^2.1.3": + version "2.1.3" + resolved "https://registry.yarnpkg.com/@types/blake2b/-/blake2b-2.1.3.tgz#bd6bf2fbabd888b5580d7e932de5960d087db094" + integrity sha512-MFCdX0MNxFBP/xEILO5Td0kv6nI7+Q2iRWZbTL/yzH2/eDVZS5Wd1LHdsmXClvsCyzqaZfHFzZaN6BUeUCfSDA== + "@types/bn.js@5.1.1": version "5.1.1" resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.1.tgz#b51e1b55920a4ca26e9285ff79936bbdec910682" @@ -935,6 +940,11 @@ array-union@^2.1.0: resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== +b4a@^1.0.1: + version "1.6.4" + resolved "https://registry.yarnpkg.com/b4a/-/b4a-1.6.4.tgz#ef1c1422cae5ce6535ec191baeed7567443f36c9" + integrity sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw== + babel-jest@^28.1.3: version "28.1.3" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-28.1.3.tgz#c1187258197c099072156a0a121c11ee1e3917d5" @@ -1017,6 +1027,21 @@ bech32@^1.1.3: resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== +blake2b-wasm@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/blake2b-wasm/-/blake2b-wasm-2.4.0.tgz#9115649111edbbd87eb24ce7c04b427e4e2be5be" + integrity sha512-S1kwmW2ZhZFFFOghcx73+ZajEfKBqhP82JMssxtLVMxlaPea1p9uoLiUZ5WYyHn0KddwbLc+0vh4wR0KBNoT5w== + dependencies: + b4a "^1.0.1" + nanoassert "^2.0.0" + +"blake2b@https://github.com/VerusCoin/blake2b": + version "2.1.4" + resolved "https://github.com/VerusCoin/blake2b#578dc12b7b68a3ce76d1e1add1402b28a5890a6b" + dependencies: + blake2b-wasm "^2.4.0" + nanoassert "^2.0.0" + bn.js@5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" @@ -2308,6 +2333,11 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +nanoassert@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/nanoassert/-/nanoassert-2.0.0.tgz#a05f86de6c7a51618038a620f88878ed1e490c09" + integrity sha512-7vO7n28+aYO4J+8w96AzhmU8G+Y/xpPDJz/se19ICsqj/momRbb9mh9ZUtkoJ5X3nTnPdhEJyc0qnM6yAsHBaA== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" From 10723f752ff07cfb164d376b5a22756e44303d41 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Thu, 14 Dec 2023 18:16:45 +0000 Subject: [PATCH 048/120] Add AttestationProof type with per leaf proof --- dist/vdxf/classes/Attestation.d.ts | 26 +- dist/vdxf/classes/Attestation.js | 222 +++++++++----- dist/vdxf/classes/MMR.d.ts | 2 +- dist/vdxf/classes/MMR.js | 3 +- dist/vdxf/classes/index.d.ts | 2 +- dist/vdxf/classes/index.js | 3 +- dist/vdxf/keys.js | 4 +- src/__tests__/attestation/attestation.test.ts | 33 ++- src/vdxf/classes/Attestation.ts | 273 +++++++++++++----- src/vdxf/classes/MMR.ts | 238 +++++++-------- src/vdxf/classes/index.ts | 2 +- 11 files changed, 507 insertions(+), 301 deletions(-) diff --git a/dist/vdxf/classes/Attestation.d.ts b/dist/vdxf/classes/Attestation.d.ts index f6dd8ca..333d119 100644 --- a/dist/vdxf/classes/Attestation.d.ts +++ b/dist/vdxf/classes/Attestation.d.ts @@ -2,23 +2,17 @@ import { VDXFObject } from "../"; import { MMR } from "./MMR"; export interface AttestationData { - type?: number; attestationKey?: string; salt?: string; value?: string; - hash?: string; } export declare class Attestation extends VDXFObject { - type: number; - nIndex: number; components: Array; signatures: { [attestor: string]: string; }; mmr: MMR; constructor(vdxfkey?: string, data?: { - type?: number; - nIndex?: number; components?: Array; signatures?: { [attestor: string]: string; @@ -27,8 +21,24 @@ export declare class Attestation extends VDXFObject { dataByteLength(): number; toDataBuffer(): Buffer; fromDataBuffer(buffer: Buffer, offset?: number): number; - getMMR(): Promise; + createMMR(): Promise; routeHash(): Promise; + getRoot(): Promise; + getProof(keys: Array): Promise; getHash(n: AttestationData): Buffer; - sortHashes(): Array; + getHashes(): Array; +} +export declare class AttestationProof extends VDXFObject { + component: Map; + mmr: MMR; + constructor(vdxfkey?: string, data?: { + component?: Map; + mmr?: MMR; + }); + dataByteLength(): number; + toDataBuffer(): Buffer; + fromDataBuffer(buffer: Buffer, offset?: number): number; + routeHash(): Promise; + checkProof(): Promise; + getHash(key: any): Buffer; } diff --git a/dist/vdxf/classes/Attestation.js b/dist/vdxf/classes/Attestation.js index 1e78aad..2e4159b 100644 --- a/dist/vdxf/classes/Attestation.js +++ b/dist/vdxf/classes/Attestation.js @@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.Attestation = void 0; +exports.AttestationProof = exports.Attestation = void 0; const varuint_1 = require("../../utils/varuint"); const bufferutils_1 = require("../../utils/bufferutils"); const createHash = require("create-hash"); @@ -17,18 +17,11 @@ const address_1 = require("../../utils/address"); const vdxf_1 = require("../../constants/vdxf"); const __1 = require("../"); const MMR_1 = require("./MMR"); -const bn_js_1 = require("bn.js"); const { BufferReader, BufferWriter } = bufferutils_1.default; -const ATTESTATION_TYPE_DATA = 1; -const ATTESTATION_TYPE_HASH = 2; class Attestation extends __1.VDXFObject { constructor(vdxfkey = "", data) { super(vdxfkey); if (data) { - if (data === null || data === void 0 ? void 0 : data.type) - this.type = data.type; - if (data === null || data === void 0 ? void 0 : data.nIndex) - this.nIndex = data.nIndex; if (data === null || data === void 0 ? void 0 : data.components) this.components = data.components; if (data === null || data === void 0 ? void 0 : data.signatures) @@ -37,23 +30,12 @@ class Attestation extends __1.VDXFObject { } dataByteLength() { let byteLength = 0; - byteLength += varuint_1.default.encodingLength(this.type); - byteLength += varuint_1.default.encodingLength(this.nIndex); byteLength += varuint_1.default.encodingLength(this.components.length); for (const n of this.components) { - byteLength += varuint_1.default.encodingLength(n.type); - if (n.type === ATTESTATION_TYPE_DATA) { - byteLength += 20; //key - byteLength += 32; //salt - byteLength += varuint_1.default.encodingLength(Buffer.from(n.value, "utf8").length); - byteLength += Buffer.from(n.value, "utf8").length; - } - else if (n.type === ATTESTATION_TYPE_HASH) { - byteLength += 32; //hash - } - else { - throw new Error("Attestation Type not supported"); - } + byteLength += 20; //key + byteLength += 32; //salt + byteLength += varuint_1.default.encodingLength(Buffer.from(n.value, "utf8").length); + byteLength += Buffer.from(n.value, "utf8").length; } const objKeys = Object.keys(this.signatures); byteLength += varuint_1.default.encodingLength(objKeys.length); @@ -66,23 +48,12 @@ class Attestation extends __1.VDXFObject { } toDataBuffer() { const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); - bufferWriter.writeCompactSize(this.type); - bufferWriter.writeCompactSize(this.nIndex); bufferWriter.writeCompactSize(this.components.length); for (const n of this.components) { - bufferWriter.writeCompactSize(n.type); - if (n.type === ATTESTATION_TYPE_DATA) { - bufferWriter.writeSlice((0, address_1.fromBase58Check)(n.attestationKey).hash); - bufferWriter.writeSlice(Buffer.from(n.salt, "hex")); - bufferWriter.writeCompactSize(Buffer.from(n.value, "utf8").length); - bufferWriter.writeSlice(Buffer.from(n.value, "utf8")); - } - else if (n.type === ATTESTATION_TYPE_HASH) { - bufferWriter.writeSlice(Buffer.from(n.hash, "hex")); - } - else { - throw new Error("Attestation Type not supported"); - } + bufferWriter.writeSlice((0, address_1.fromBase58Check)(n.attestationKey).hash); + bufferWriter.writeSlice(Buffer.from(n.salt, "hex")); + bufferWriter.writeCompactSize(Buffer.from(n.value, "utf8").length); + bufferWriter.writeSlice(Buffer.from(n.value, "utf8")); } const objKeys = Object.keys(this.signatures); bufferWriter.writeCompactSize(objKeys.length); @@ -95,25 +66,13 @@ class Attestation extends __1.VDXFObject { fromDataBuffer(buffer, offset) { const reader = new bufferutils_1.default.BufferReader(buffer, offset); const attestationsByteLength = reader.readCompactSize(); - this.type = reader.readVarInt().toNumber(); - this.nIndex = reader.readVarInt().toNumber(); this.components = new Array(); const componentsMapSize = reader.readVarInt(); for (var i = 0; i < componentsMapSize.toNumber(); i++) { - const type = reader.readVarInt().toNumber(); - if (type === ATTESTATION_TYPE_DATA) { - const attestationKey = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); - const salt = Buffer.from(reader.readSlice(32)).toString('hex'); - const value = Buffer.from(reader.readVarSlice()).toString('utf8'); - this.components.push({ type, attestationKey, salt, value }); - } - else if (type === ATTESTATION_TYPE_HASH) { - const hash = Buffer.from(reader.readSlice(32)).toString('hex'); - this.components.push({ type, hash }); - } - else { - throw new Error("Attestation Type not supported"); - } + const attestationKey = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + const salt = Buffer.from(reader.readSlice(32)).toString('hex'); + const value = Buffer.from(reader.readVarSlice()).toString('utf8'); + this.components.push({ attestationKey, salt, value }); } const signaturesSize = reader.readVarInt(); this.signatures = {}; @@ -124,9 +83,9 @@ class Attestation extends __1.VDXFObject { } return reader.offset; } - getMMR() { + createMMR() { return __awaiter(this, void 0, void 0, function* () { - const attestationHashes = this.sortHashes(); + const attestationHashes = this.getHashes(); if (!this.mmr) { this.mmr = new MMR_1.MMR(); } @@ -138,33 +97,142 @@ class Attestation extends __1.VDXFObject { } routeHash() { return __awaiter(this, void 0, void 0, function* () { - this.getMMR(); - return this.mmr.getRoot(); + yield this.createMMR(); + return yield this.mmr.getRoot(); + }); + } + getRoot() { + return __awaiter(this, void 0, void 0, function* () { + return yield this.mmr.getRoot(); + }); + } + getProof(keys) { + return __awaiter(this, void 0, void 0, function* () { + const itemMaps = new Map(); + keys.forEach((key, index) => { itemMaps.set(index, this.components[key]); }); + const reply = new AttestationProof("", { component: itemMaps, mmr: yield this.mmr.getProof(keys, null) }); + return reply; }); } getHash(n) { - if (n.type === ATTESTATION_TYPE_DATA) { - const bufferWriter = new BufferWriter(Buffer.alloc(20 + - 32 + - varuint_1.default.encodingLength(Buffer.from(n.value, "utf8").length) + - Buffer.from(n.value, "utf8").length)); - bufferWriter.writeSlice((0, address_1.fromBase58Check)(n.attestationKey).hash); - bufferWriter.writeSlice(Buffer.from(n.salt, "hex")); - bufferWriter.writeCompactSize(Buffer.from(n.value, "utf8").length); - bufferWriter.writeSlice(Buffer.from(n.value, "utf8")); - return createHash("sha256").update(bufferWriter.buffer).digest(); + const bufferWriter = new BufferWriter(Buffer.alloc(20 + + 32 + + varuint_1.default.encodingLength(Buffer.from(n.value, "utf8").length) + + Buffer.from(n.value, "utf8").length)); + bufferWriter.writeSlice((0, address_1.fromBase58Check)(n.attestationKey).hash); + bufferWriter.writeSlice(Buffer.from(n.salt, "hex")); + bufferWriter.writeCompactSize(Buffer.from(n.value, "utf8").length); + bufferWriter.writeSlice(Buffer.from(n.value, "utf8")); + return createHash("sha256").update(bufferWriter.buffer).digest(); + } + getHashes() { + const hashArray = []; + this.components.forEach((item) => hashArray.push(this.getHash(item))); + return hashArray; + } +} +exports.Attestation = Attestation; +class AttestationProof extends __1.VDXFObject { + constructor(vdxfkey = "", data) { + super(vdxfkey); + if (data) { + if (data === null || data === void 0 ? void 0 : data.component) + this.component = data.component; + if (data === null || data === void 0 ? void 0 : data.mmr) + this.mmr = data.mmr; } - else if (n.type === ATTESTATION_TYPE_HASH) { - return Buffer.from(n.hash, "hex"); + } + dataByteLength() { + let byteLength = 0; + byteLength += varuint_1.default.encodingLength(this.component.size); + for (const [key, item] of this.component) { + byteLength += varuint_1.default.encodingLength(this.component.size); + byteLength += varuint_1.default.encodingLength(key); + byteLength += 20; //key + byteLength += 32; //salt + byteLength += varuint_1.default.encodingLength(Buffer.from(item.value, "utf8").length); + byteLength += Buffer.from(item.value, "utf8").length; + } + byteLength += varuint_1.default.encodingLength(this.mmr.db.getLeafLength()); + const nodes = this.mmr.db.getNodes(); + const objKeys = Object.keys(nodes); + byteLength += varuint_1.default.encodingLength(objKeys.length); + for (const item of objKeys) { + byteLength += varuint_1.default.encodingLength(parseInt(item)); + byteLength += varuint_1.default.encodingLength(nodes[item].length); + } + return byteLength; + } + toDataBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); + bufferWriter.writeCompactSize(this.component.size); + for (const [key, item] of this.component) { + bufferWriter.writeCompactSize(key); + bufferWriter.writeSlice((0, address_1.fromBase58Check)(item.attestationKey).hash); + bufferWriter.writeSlice(Buffer.from(item.salt, "hex")); + bufferWriter.writeVarSlice(Buffer.from(item.value, "utf8")); + } + bufferWriter.writeCompactSize(this.mmr.db.getLeafLength()); + const nodes = this.mmr.db.getNodes(); + const objKeys = Object.keys(nodes); + for (const item of objKeys) { + bufferWriter.writeCompactSize(parseInt(item)); + bufferWriter.writeVarSlice(nodes[item]); + } + return bufferWriter.buffer; + } + fromDataBuffer(buffer, offset) { + const reader = new bufferutils_1.default.BufferReader(buffer, offset); + const attestationsByteLength = reader.readCompactSize(); //dummy read + const componentsLength = reader.readCompactSize(); + this.component = new Map(); + for (var i = 0; i < componentsLength; i++) { + const key = reader.readCompactSize(); + const attestationKey = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + const salt = Buffer.from(reader.readSlice(32)).toString('hex'); + const value = Buffer.from(reader.readVarSlice()).toString('utf8'); + this.component.set(key, { attestationKey, salt, value }); } - else { - throw new Error("Attestation Type not supported"); + const referenceTreeLength = reader.readVarInt(); + const nodes = {}; + for (var i = 0; i < referenceTreeLength.toNumber(); i++) { + const nodeIndex = reader.readCompactSize(); + const signature = reader.readVarSlice(); + nodes[nodeIndex] = signature; } + this.mmr = new MMR_1.MMR(new MMR_1.MemoryBasedDb(referenceTreeLength, nodes)); + return reader.offset; } - sortHashes() { - const hashArray = this.components.map((item) => this.getHash(item)); - const sortedHashArray = hashArray.sort((a, b) => (new bn_js_1.BN(a.toString('hex'), 16).gt(new bn_js_1.BN(b.toString('hex'), 16))) ? 0 : -1); - return sortedHashArray; + routeHash() { + return __awaiter(this, void 0, void 0, function* () { + return yield this.mmr.getRoot(); + }); + } + checkProof() { + return __awaiter(this, void 0, void 0, function* () { + try { + for (const [key, item] of this.component) { + const hash = this.getHash(key); + const proof = yield this.mmr.getProof([key], null); + if (hash !== proof) { + throw new Error("Attestation not found in MMR"); + } + } + } + catch (e) { + } + }); + } + getHash(key) { + const bufferWriter = new BufferWriter(Buffer.alloc(20 + + 32 + + varuint_1.default.encodingLength(Buffer.from(this.component.get(key).value, "utf8").length) + + Buffer.from(this.component.get(key).value, "utf8").length)); + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.component.get(key).attestationKey).hash); + bufferWriter.writeSlice(Buffer.from(this.component.get(key).salt, "hex")); + bufferWriter.writeCompactSize(Buffer.from(this.component.get(key).value, "utf8").length); + bufferWriter.writeSlice(Buffer.from(this.component.get(key).value, "utf8")); + return createHash("sha256").update(bufferWriter.buffer).digest(); } } -exports.Attestation = Attestation; +exports.AttestationProof = AttestationProof; diff --git a/dist/vdxf/classes/MMR.d.ts b/dist/vdxf/classes/MMR.d.ts index c5305e0..a4b39e3 100644 --- a/dist/vdxf/classes/MMR.d.ts +++ b/dist/vdxf/classes/MMR.d.ts @@ -37,7 +37,7 @@ export declare class MMR { static proofPositions(leafIndexes: any, referenceTreeLength: any): {}; static _hasPosition(nodes: any, position: any): boolean; } -declare class MemoryBasedDb { +export declare class MemoryBasedDb { leafLength: any; nodes: { [number: number]: Buffer; diff --git a/dist/vdxf/classes/MMR.js b/dist/vdxf/classes/MMR.js index 7cdf315..3ac17a6 100644 --- a/dist/vdxf/classes/MMR.js +++ b/dist/vdxf/classes/MMR.js @@ -17,7 +17,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.MMR = void 0; +exports.MemoryBasedDb = exports.MMR = void 0; var blake2b = require('blake2b'); const { Lock } = require('semaphore-async-await'); class Position { @@ -405,3 +405,4 @@ class MemoryBasedDb { }); } } +exports.MemoryBasedDb = MemoryBasedDb; diff --git a/dist/vdxf/classes/index.d.ts b/dist/vdxf/classes/index.d.ts index 9b13b4b..ddc6df1 100644 --- a/dist/vdxf/classes/index.d.ts +++ b/dist/vdxf/classes/index.d.ts @@ -22,6 +22,6 @@ export { ProvisioningDecisionInterface as LoginConsentProvisioningDecisionInterf export { ProvisioningResultInterface as LoginConsentProvisioningResultInterface } from "./provisioning/ProvisioningResult"; export { Hash160 } from './Hash160'; export { RedirectUri, Subject, ProvisioningInfo, RequestedPermission, Audience, AltAuthFactor, } from "./Challenge"; -export { Attestation } from './Attestation'; +export { Attestation, AttestationProof } from './Attestation'; export { ProvisioningTxid } from './provisioning/ProvisioningResult'; export { Context } from './Context'; diff --git a/dist/vdxf/classes/index.js b/dist/vdxf/classes/index.js index 07bf039..0f84a82 100644 --- a/dist/vdxf/classes/index.js +++ b/dist/vdxf/classes/index.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.Context = exports.ProvisioningTxid = exports.Attestation = exports.AltAuthFactor = exports.Audience = exports.RequestedPermission = exports.ProvisioningInfo = exports.Subject = exports.RedirectUri = exports.Hash160 = exports.LoginConsentProvisioningResult = exports.LoginConsentProvisioningDecision = exports.LoginConsentProvisioningResponse = exports.LoginConsentProvisioningChallenge = exports.LoginConsentProvisioningRequest = exports.VerusPayInvoice = exports.VerusPayInvoiceDetails = exports.SignedSessionObjectData = exports.SignedSessionObject = exports.LoginConsentResponse = exports.LoginConsentRequest = exports.LoginConsentDecision = exports.LoginConsentChallenge = void 0; +exports.Context = exports.ProvisioningTxid = exports.AttestationProof = exports.Attestation = exports.AltAuthFactor = exports.Audience = exports.RequestedPermission = exports.ProvisioningInfo = exports.Subject = exports.RedirectUri = exports.Hash160 = exports.LoginConsentProvisioningResult = exports.LoginConsentProvisioningDecision = exports.LoginConsentProvisioningResponse = exports.LoginConsentProvisioningChallenge = exports.LoginConsentProvisioningRequest = exports.VerusPayInvoice = exports.VerusPayInvoiceDetails = exports.SignedSessionObjectData = exports.SignedSessionObject = exports.LoginConsentResponse = exports.LoginConsentRequest = exports.LoginConsentDecision = exports.LoginConsentChallenge = void 0; var Challenge_1 = require("./Challenge"); Object.defineProperty(exports, "LoginConsentChallenge", { enumerable: true, get: function () { return Challenge_1.Challenge; } }); var Decision_1 = require("./Decision"); @@ -38,6 +38,7 @@ Object.defineProperty(exports, "Audience", { enumerable: true, get: function () Object.defineProperty(exports, "AltAuthFactor", { enumerable: true, get: function () { return Challenge_2.AltAuthFactor; } }); var Attestation_1 = require("./Attestation"); Object.defineProperty(exports, "Attestation", { enumerable: true, get: function () { return Attestation_1.Attestation; } }); +Object.defineProperty(exports, "AttestationProof", { enumerable: true, get: function () { return Attestation_1.AttestationProof; } }); var ProvisioningResult_2 = require("./provisioning/ProvisioningResult"); Object.defineProperty(exports, "ProvisioningTxid", { enumerable: true, get: function () { return ProvisioningResult_2.ProvisioningTxid; } }); var Context_1 = require("./Context"); diff --git a/dist/vdxf/keys.js b/dist/vdxf/keys.js index 2c04098..46cb9c4 100644 --- a/dist/vdxf/keys.js +++ b/dist/vdxf/keys.js @@ -1,8 +1,8 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.CVDXF_Data = exports.ATTESTATION_IDENTITY_DATA = exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.IDENTITY_AUTH_SIG_VDXF_KEY = exports.VERUSPAY_INVOICE = void 0; +exports.CVDXF_Data = exports.ATTESTATION_IDENTITY_DATA = exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.IDENTITY_AUTH_SIG_VDXF_KEY = exports.VERUSPAY_INVOICE_VDXF_KEY = void 0; const varuint_1 = require("../utils/varuint"); -exports.VERUSPAY_INVOICE = { +exports.VERUSPAY_INVOICE_VDXF_KEY = { hash160result: "628efc28c2e2d40050e1a9de7a93e7ddf2aa0076", qualifiedname: { name: "veruspay.vrsc::invoice", diff --git a/src/__tests__/attestation/attestation.test.ts b/src/__tests__/attestation/attestation.test.ts index 304b408..a0c647b 100644 --- a/src/__tests__/attestation/attestation.test.ts +++ b/src/__tests__/attestation/attestation.test.ts @@ -1,5 +1,5 @@ import { ATTESTATION_READ_REQUEST, IDENTITY_VIEW, ATTESTATION_IDENTITY_DATA, LOGIN_CONSENT_REDIRECT_VDXF_KEY } from "../../vdxf"; -import { Attestation, LoginConsentRequest, LoginConsentResponse } from "../../vdxf/classes"; +import { Attestation, LoginConsentRequest, LoginConsentResponse, AttestationProof } from "../../vdxf/classes"; import { RedirectUri, RequestedPermission } from "../../vdxf/classes/Challenge"; import { Context } from "../../vdxf/classes/Context"; @@ -44,17 +44,25 @@ describe('Serializes and deserializes attestation request', () => { const componentsArray = new Array; - componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["firstname"].vdxfid, salt: "8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210", value: "Chris"}) - componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["lastname"].vdxfid, salt: "7c3920940db4385cd305557a57a8df33346712096e76b58d7c4ace05e17b90a2", value: "Monkins"}) - componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["identity"].vdxfid, salt: "ce662d61a20ae211728cdb1b924628c84edfe0fcbd59a86f56a125ad73689ac1", value: "chad@"}) - componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["attestor"].vdxfid, salt: "9067dc6a9b38dd15f985770bb819eb62de39a5d1f0e12f9a4807f78968794af4", value: "valu attestation@"}) - componentsArray.push({type: 1, attestationKey: ATTESTATION_IDENTITY_DATA["documenttype"].vdxfid, salt: "338b6ad44179f46fc24f3ed01fd247c9664384a71ba5465aebceece8d7c45a0a", value: "KYC Attestation v1"}) - componentsArray.push({type: 2, hash: "b5223370abb0b6d718d03fbef2d68b4b132b48045f3bc20f6d9322f2df74ddc5"}) - componentsArray.push({type: 2, hash: "6f2820034cfe309dd66d4503f1e5c06345c6aa3b2b00393a59a19b347ca187ab"}) + componentsArray.push({attestationKey: ATTESTATION_IDENTITY_DATA["firstname"].vdxfid, salt: "8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210", value: "Chris"}) + componentsArray.push({attestationKey: ATTESTATION_IDENTITY_DATA["lastname"].vdxfid, salt: "7c3920940db4385cd305557a57a8df33346712096e76b58d7c4ace05e17b90a2", value: "Monkins"}) + componentsArray.push({attestationKey: ATTESTATION_IDENTITY_DATA["identity"].vdxfid, salt: "ce662d61a20ae211728cdb1b924628c84edfe0fcbd59a86f56a125ad73689ac1", value: "chad@"}) + componentsArray.push({attestationKey: ATTESTATION_IDENTITY_DATA["attestor"].vdxfid, salt: "9067dc6a9b38dd15f985770bb819eb62de39a5d1f0e12f9a4807f78968794af4", value: "valu attestation@"}) + componentsArray.push({attestationKey: ATTESTATION_IDENTITY_DATA["documenttype"].vdxfid, salt: "338b6ad44179f46fc24f3ed01fd247c9664384a71ba5465aebceece8d7c45a0a", value: "KYC Attestation v1"}) + const signaturesForAttestation = {"i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV": "AYG2IQABQSAN1fp6A9NIVbxvKuOVLLU+0I+G3oQGbRtS6u4Eampfb217Cdf5FCMScQhV9kMxtjI9GWzpchmjuiTB2tctk6qT"}; - const attestationResponse = new Attestation("i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV",{type: SIMPLE_ATTESTATION, nIndex: 123,components: componentsArray, signatures: signaturesForAttestation}); + const attestationResponse = new Attestation("i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV",{components: componentsArray, signatures: signaturesForAttestation}); + + await attestationResponse.createMMR(); + + const proofResponseRoot = await attestationResponse.getRoot(); + + const proofreply = await attestationResponse.getProof([0]); + + const proofRoot = await proofreply.mmr.getRoot(); + const res = new LoginConsentResponse({ system_id: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", @@ -88,10 +96,13 @@ describe('Serializes and deserializes attestation request', () => { expect(uri).toBe(LoginConsentRequest.fromWalletDeeplinkUri(uri).toWalletDeeplinkUri()); - const mmr = await _res.decision.attestations[0].getMMR(); + const mmr = await _res.decision.attestations[0].createMMR(); const root = await mmr.getRoot(); - expect(Buffer.from(root).toString('hex')).toStrictEqual("65ee95e0a3eea24f3590aff4765736ee61547e42e8df960cc85c3f6d6bc00fc5") + + expect(proofRoot.toString('hex')).toStrictEqual("fa3cf78b174a39ddf7967afbfda54953ed55e44c6731de8796eb37ba77afddf1") + expect(proofResponseRoot.toString('hex')).toStrictEqual("fa3cf78b174a39ddf7967afbfda54953ed55e44c6731de8796eb37ba77afddf1") + expect(Buffer.from(root).toString('hex')).toStrictEqual("fa3cf78b174a39ddf7967afbfda54953ed55e44c6731de8796eb37ba77afddf1") }); diff --git a/src/vdxf/classes/Attestation.ts b/src/vdxf/classes/Attestation.ts index 7896856..6817f53 100644 --- a/src/vdxf/classes/Attestation.ts +++ b/src/vdxf/classes/Attestation.ts @@ -4,42 +4,31 @@ import createHash = require("create-hash"); import { fromBase58Check, toBase58Check } from '../../utils/address'; import { I_ADDR_VERSION } from '../../constants/vdxf'; import { VDXFObject } from "../"; -import { MMR } from "./MMR" +import { MMR, MemoryBasedDb } from "./MMR" import { BN } from 'bn.js' +import { get } from 'http'; const { BufferReader, BufferWriter } = bufferutils; -const ATTESTATION_TYPE_DATA = 1; -const ATTESTATION_TYPE_HASH = 2; - export interface AttestationData{ - type?: number; attestationKey?: string; salt?: string; value?: string; - hash?: string; } export class Attestation extends VDXFObject { - type: number; - nIndex: number; components: Array; signatures: {[attestor: string]: string}; mmr: MMR; constructor(vdxfkey: string = "", data?: { - type?: number; - nIndex?: number; components?: Array; signatures?: {[attestor: string]: string}; - }) { super(vdxfkey); if (data) { - if (data?.type) this.type = data.type; - if (data?.nIndex) this.nIndex = data.nIndex; if (data?.components) this.components = data.components; if (data?.signatures) this.signatures = data.signatures; } @@ -49,24 +38,15 @@ export class Attestation extends VDXFObject { dataByteLength(): number { let byteLength = 0; - byteLength += varuint.encodingLength(this.type); - byteLength += varuint.encodingLength(this.nIndex); byteLength += varuint.encodingLength(this.components.length) for (const n of this.components) { - byteLength += varuint.encodingLength(n.type); - - if (n.type === ATTESTATION_TYPE_DATA) { - byteLength += 20; //key - byteLength += 32; //salt - byteLength += varuint.encodingLength(Buffer.from(n.value, "utf8").length); - byteLength += Buffer.from(n.value, "utf8").length; - } else if (n.type === ATTESTATION_TYPE_HASH) { - byteLength += 32; //hash - } else { - throw new Error("Attestation Type not supported") - } + byteLength += 20; //key + byteLength += 32; //salt + byteLength += varuint.encodingLength(Buffer.from(n.value, "utf8").length); + byteLength += Buffer.from(n.value, "utf8").length; + } const objKeys = Object.keys(this.signatures); @@ -83,23 +63,14 @@ export class Attestation extends VDXFObject { toDataBuffer(): Buffer { const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); - bufferWriter.writeCompactSize(this.type); - bufferWriter.writeCompactSize(this.nIndex); bufferWriter.writeCompactSize(this.components.length); for (const n of this.components) { - bufferWriter.writeCompactSize(n.type); - - if (n.type === ATTESTATION_TYPE_DATA) { - bufferWriter.writeSlice(fromBase58Check(n.attestationKey).hash); - bufferWriter.writeSlice(Buffer.from(n.salt, "hex")); - bufferWriter.writeCompactSize(Buffer.from(n.value, "utf8").length) - bufferWriter.writeSlice(Buffer.from(n.value, "utf8")); - } else if (n.type === ATTESTATION_TYPE_HASH) { - bufferWriter.writeSlice(Buffer.from(n.hash, "hex")); - } else { - throw new Error("Attestation Type not supported") - } + bufferWriter.writeSlice(fromBase58Check(n.attestationKey).hash); + bufferWriter.writeSlice(Buffer.from(n.salt, "hex")); + bufferWriter.writeCompactSize(Buffer.from(n.value, "utf8").length) + bufferWriter.writeSlice(Buffer.from(n.value, "utf8")); + } const objKeys = Object.keys(this.signatures); @@ -119,8 +90,7 @@ export class Attestation extends VDXFObject { const reader = new bufferutils.BufferReader(buffer, offset); const attestationsByteLength = reader.readCompactSize(); - this.type = reader.readVarInt().toNumber(); - this.nIndex = reader.readVarInt().toNumber(); + this.components = new Array(); @@ -128,19 +98,11 @@ export class Attestation extends VDXFObject { for (var i = 0; i < componentsMapSize.toNumber(); i++) { - const type = reader.readVarInt().toNumber(); - - if (type === ATTESTATION_TYPE_DATA) { - const attestationKey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); - const salt = Buffer.from(reader.readSlice(32)).toString('hex'); - const value = Buffer.from(reader.readVarSlice()).toString('utf8'); - this.components.push({type, attestationKey, salt, value}); - } else if (type === ATTESTATION_TYPE_HASH) { - const hash = Buffer.from(reader.readSlice(32)).toString('hex'); - this.components.push({type, hash}); - } else { - throw new Error("Attestation Type not supported") - } + const attestationKey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + const salt = Buffer.from(reader.readSlice(32)).toString('hex'); + const value = Buffer.from(reader.readVarSlice()).toString('utf8'); + this.components.push({attestationKey, salt, value}); + } const signaturesSize = reader.readVarInt(); @@ -156,9 +118,9 @@ export class Attestation extends VDXFObject { return reader.offset; } - async getMMR() { + async createMMR() { - const attestationHashes = this.sortHashes(); + const attestationHashes = this.getHashes(); if (!this.mmr) { this.mmr = new MMR(); @@ -173,38 +135,191 @@ export class Attestation extends VDXFObject { async routeHash() { - this.getMMR(); - return this.mmr.getRoot(); + await this.createMMR(); + return await this.mmr.getRoot(); + } + + async getRoot() { + + return await this.mmr.getRoot(); + + } + + async getProof(keys: Array): Promise { + + const itemMaps = new Map(); + + keys.forEach((key, index) => {itemMaps.set(index, this.components[key])}); + + const reply = new AttestationProof("", {component: itemMaps, mmr: await this.mmr.getProof(keys, null)}); + + return reply; + } getHash(n: AttestationData): Buffer { - if (n.type === ATTESTATION_TYPE_DATA) { - const bufferWriter = new BufferWriter(Buffer.alloc(20 + - 32 + - varuint.encodingLength(Buffer.from(n.value, "utf8").length) + - Buffer.from(n.value, "utf8").length )); - bufferWriter.writeSlice(fromBase58Check(n.attestationKey).hash); - bufferWriter.writeSlice(Buffer.from(n.salt, "hex")); - bufferWriter.writeCompactSize(Buffer.from(n.value, "utf8").length) - bufferWriter.writeSlice(Buffer.from(n.value, "utf8")); + const bufferWriter = new BufferWriter(Buffer.alloc(20 + + 32 + + varuint.encodingLength(Buffer.from(n.value, "utf8").length) + + Buffer.from(n.value, "utf8").length )); + bufferWriter.writeSlice(fromBase58Check(n.attestationKey).hash); + bufferWriter.writeSlice(Buffer.from(n.salt, "hex")); + bufferWriter.writeCompactSize(Buffer.from(n.value, "utf8").length) + bufferWriter.writeSlice(Buffer.from(n.value, "utf8")); + + return createHash("sha256").update(bufferWriter.buffer).digest(); + + } + + getHashes(): Array { + + const hashArray = []; + this.components.forEach((item) => hashArray.push(this.getHash(item))); + return hashArray; + } + + } + + export class AttestationProof extends VDXFObject { + component: Map; + mmr: MMR; + + constructor(vdxfkey: string = "", data?: { + component?: Map; + mmr?: MMR; + + }) { + super(vdxfkey); + + if (data) { + if (data?.component) this.component = data.component; + if (data?.mmr) this.mmr = data.mmr; + } + + } + + dataByteLength(): number { + + let byteLength = 0; + byteLength += varuint.encodingLength(this.component.size) - return createHash("sha256").update(bufferWriter.buffer).digest(); - } else if (n.type === ATTESTATION_TYPE_HASH) { - return Buffer.from(n.hash, "hex"); - } else { - throw new Error("Attestation Type not supported") + for (const [key, item] of this.component) { + byteLength += varuint.encodingLength(this.component.size) + byteLength += varuint.encodingLength(key) + byteLength += 20; //key + byteLength += 32; //salt + byteLength += varuint.encodingLength(Buffer.from(item.value, "utf8").length); + byteLength += Buffer.from(item.value, "utf8").length; + } + + byteLength += varuint.encodingLength(this.mmr.db.getLeafLength()); + + const nodes = this.mmr.db.getNodes(); + const objKeys = Object.keys(nodes); + byteLength += varuint.encodingLength(objKeys.length); + + for (const item of objKeys) { + byteLength += varuint.encodingLength(parseInt(item)); + byteLength += varuint.encodingLength(nodes[item].length); + + } + return byteLength; + } + + toDataBuffer(): Buffer { + const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); + + bufferWriter.writeCompactSize(this.component.size); + for (const [key, item] of this.component) { + bufferWriter.writeCompactSize(key); + bufferWriter.writeSlice(fromBase58Check(item.attestationKey).hash); + bufferWriter.writeSlice(Buffer.from(item.salt, "hex")); + bufferWriter.writeVarSlice(Buffer.from(item.value, "utf8")) + } + + bufferWriter.writeCompactSize(this.mmr.db.getLeafLength()); + const nodes = this.mmr.db.getNodes(); + const objKeys = Object.keys(nodes); + + for (const item of objKeys) { + + bufferWriter.writeCompactSize(parseInt(item)); + bufferWriter.writeVarSlice(nodes[item]) + + } + + return bufferWriter.buffer + } + + fromDataBuffer(buffer: Buffer, offset?: number): number { + + const reader = new bufferutils.BufferReader(buffer, offset); + const attestationsByteLength = reader.readCompactSize(); //dummy read + + const componentsLength = reader.readCompactSize(); + this.component = new Map(); + + for (var i = 0; i < componentsLength; i++) { + const key = reader.readCompactSize(); + const attestationKey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + const salt = Buffer.from(reader.readSlice(32)).toString('hex'); + const value = Buffer.from(reader.readVarSlice()).toString('utf8'); + this.component.set(key, {attestationKey, salt, value}); } + const referenceTreeLength = reader.readVarInt(); + const nodes = {}; + + for (var i = 0; i < referenceTreeLength.toNumber(); i++) { + + const nodeIndex = reader.readCompactSize(); + const signature = reader.readVarSlice(); + nodes[nodeIndex] = signature; + } + + this.mmr = new MMR(new MemoryBasedDb(referenceTreeLength, nodes)) + + return reader.offset; + } + + async routeHash() { + return await this.mmr.getRoot(); + } + + async checkProof() { + + try { + + for (const [key, item] of this.component) { + + const hash = this.getHash(key); + const proof = await this.mmr.getProof([key], null); + + if(hash !== proof) { + throw new Error("Attestation not found in MMR"); + } + } + } catch (e) { + + } } - sortHashes(): Array { + getHash(key): Buffer { - const hashArray = this.components.map((item) => this.getHash(item) ) - const sortedHashArray = hashArray.sort((a, b) => (new BN(a.toString('hex'), 16).gt( new BN(b.toString('hex'), 16 )))? 0 : -1 ); + const bufferWriter = new BufferWriter(Buffer.alloc(20 + + 32 + + varuint.encodingLength(Buffer.from(this.component.get(key).value, "utf8").length) + + Buffer.from(this.component.get(key).value, "utf8").length )); + bufferWriter.writeSlice(fromBase58Check(this.component.get(key).attestationKey).hash); + bufferWriter.writeSlice(Buffer.from(this.component.get(key).salt, "hex")); + bufferWriter.writeCompactSize(Buffer.from(this.component.get(key).value, "utf8").length) + bufferWriter.writeSlice(Buffer.from(this.component.get(key).value, "utf8")); + + return createHash("sha256").update(bufferWriter.buffer).digest(); - return sortedHashArray; } - } + + } diff --git a/src/vdxf/classes/MMR.ts b/src/vdxf/classes/MMR.ts index 7382a16..807a7e0 100644 --- a/src/vdxf/classes/MMR.ts +++ b/src/vdxf/classes/MMR.ts @@ -11,164 +11,164 @@ var blake2b = require('blake2b') const { Lock } = require('semaphore-async-await') -class Position{ - i: any - h: any - r: any - constructor(index, height, rightness){ - this.i = index - this.h = height - this.r = rightness // inherent unchanging property of every node index - } +class Position { + i: any + h: any + r: any + constructor(index, height, rightness) { + this.i = index + this.h = height + this.r = rightness // inherent unchanging property of every node index } - -export class MMR{ - lock: any; - _leafLength: number; - db: any; +} + +export class MMR { + lock: any; + _leafLength: number; + db: any; - constructor(db = new MemoryBasedDb()){ - this.db = db + constructor(db = new MemoryBasedDb()) { + this.db = db this.lock = new Lock(1) - + } - digest(input){ + digest(input) { var out = Buffer.allocUnsafe(32); return blake2b(out.length, null, null, Buffer.from("VerusDefaultHash")).update(Buffer.concat([...input])).digest(out); } - async get(leafIndex){ + async get(leafIndex) { let leafValue await this.lock.acquire() - try{ + try { let leafLength = await this.getLeafLength() - if(leafIndex >= leafLength){ throw new Error('Leaf not in tree') } + if (leafIndex >= leafLength) { throw new Error('Leaf not in tree') } let leafPosition = MMR.getNodePosition(leafIndex) let localPeakPosition = MMR.localPeakPosition(leafIndex, leafLength) let localPeakValue = await this._getNodeValue(localPeakPosition) leafValue = await this._verifyPath(localPeakPosition, localPeakValue, leafPosition) - }finally{ + } finally { this.lock.release() } return leafValue } - async _get(nodePosition){ + async _get(nodePosition) { let nodeValue await this.lock.acquire() - try{ + try { let nodeLength = await this.getNodeLength() let leafLength = await this.getLeafLength() - if(nodePosition.i >= nodeLength){ throw new Error('Node not in tree') } + if (nodePosition.i >= nodeLength) { throw new Error('Node not in tree') } let peakPositions = MMR.peakPositions(leafLength - 1) let localPeakPosition for (let i = 0; i < peakPositions.length; i++) { - if(peakPositions[i].i >= nodePosition.i){ + if (peakPositions[i].i >= nodePosition.i) { localPeakPosition = peakPositions[i] break } } let localPeakValue = await this._getNodeValue(localPeakPosition) nodeValue = await this._verifyPath(localPeakPosition, localPeakValue, nodePosition) - }finally{ + } finally { this.lock.release() } return nodeValue } - async append(value, leafIndex){ + async append(value, leafIndex) { await this.lock.acquire() - try{ + try { let leafLength = await this.getLeafLength() - if(leafIndex == undefined || leafIndex == leafLength){ + if (leafIndex == undefined || leafIndex == leafLength) { let nodePosition = MMR.getNodePosition(leafLength) let mountainPositions = MMR.mountainPositions(MMR.localPeakPosition(leafLength, leafLength), nodePosition.i) await this.db.set(value, nodePosition.i) await this._hashUp(mountainPositions) await this._setLeafLength(leafLength + 1) - } else{ - throw new Error('Can only append to end of MMR (leaf '+leafLength+'). Index '+leafIndex+' given.') + } else { + throw new Error('Can only append to end of MMR (leaf ' + leafLength + '). Index ' + leafIndex + ' given.') } - }finally{ + } finally { this.lock.release() } } - async appendMany(values, startLeafIndex){ - if(startLeafIndex == undefined){ + async appendMany(values, startLeafIndex) { + if (startLeafIndex == undefined) { startLeafIndex = await this.getLeafLength() } for (let i = 0; i < values.length; i++) { await this.append(values[i], startLeafIndex + i) } } - async getRoot(leafIndex?: number){ + async getRoot(leafIndex?: number) { let peakValues = [] await this.lock.acquire() - try{ - if(!leafIndex){ + try { + if (!leafIndex) { leafIndex = await this.getLeafLength() - 1 } let peakPositions = MMR.peakPositions(leafIndex) for (let i = 0; i < peakPositions.length; i++) { peakValues.push(await this._getNodeValue(peakPositions[i])) } - }finally{ + } finally { this.lock.release() } // note: a single peak differs from its MMR root in that it gets hashed a second time - return this.digest([...peakValues]) + return this.digest([...peakValues]) } - async getNodeLength(){ return MMR.getNodePosition(await this.getLeafLength()).i } - async getLeafLength(){ // caching - if(this._leafLength == undefined){ // dirty length + async getNodeLength() { return MMR.getNodePosition(await this.getLeafLength()).i } + async getLeafLength() { // caching + if (this._leafLength == undefined) { // dirty length this._leafLength = await this.db.getLeafLength() } return this._leafLength } - async delete(leafIndex){ // logically deletes everything after (and including) leafIndex + async delete(leafIndex) { // logically deletes everything after (and including) leafIndex await this.lock.acquire() - try{ + try { let leafLength = await this.getLeafLength() - if(leafIndex < leafLength){ + if (leafIndex < leafLength) { await this._setLeafLength(leafIndex) } - }finally{ + } finally { this.lock.release() } } - async getProof(leafIndexes, referenceTreeLength){ // returns a sparse MMR containing the leaves specified + async getProof(leafIndexes, referenceTreeLength) { // returns a sparse MMR containing the leaves specified let proofMmr await this.lock.acquire() - try{ + try { referenceTreeLength = referenceTreeLength || await this.getLeafLength() let positions = MMR.proofPositions(leafIndexes, referenceTreeLength) let nodes = {} let nodeIndexes = Object.keys(positions) - await Promise.all(nodeIndexes.map( async (i) => { + await Promise.all(nodeIndexes.map(async (i) => { let nodeValue = await this._getNodeValue(positions[i]) nodes[i] = nodeValue })) proofMmr = new MMR(new MemoryBasedDb(referenceTreeLength, nodes)) - }finally{ + } finally { this.lock.release() return proofMmr } } - async _getNodeValue(position){ + async _getNodeValue(position) { // caller's responsibility to request a position within leafLength let nodeValue = await this.db.get(position.i) - if(nodeValue){ + if (nodeValue) { return nodeValue - }else if(position.h > 0){ // implied node + } else if (position.h > 0) { // implied node let leftChildValue = await this._getNodeValue(MMR.leftChildPosition(position)) let rightChildValue = await this._getNodeValue(MMR.rightChildPosition(position)) return this.digest([leftChildValue, rightChildValue]) - }else{ + } else { throw new Error('Missing node in db') } } @@ -190,12 +190,12 @@ export class MMR{ } } } - async _setLeafLength(leafLength){ + async _setLeafLength(leafLength) { await this.db.setLeafLength(leafLength) this._leafLength = leafLength } - async _hashUp(positionPairs){ - for (let i = positionPairs.length - 1; i >= 0 ; i--) { + async _hashUp(positionPairs) { + for (let i = positionPairs.length - 1; i >= 0; i--) { let leftValue = await this._getNodeValue(positionPairs[i][0]) let rightValue = await this._getNodeValue(positionPairs[i][1]) let writeIndex = MMR.parentIndex(positionPairs[i][0]) @@ -204,85 +204,85 @@ export class MMR{ } - static leftChildPosition(position){ - if(position.h <= 0){ throw new Error('Height 0 does not have child')} - return new Position(position.i - 2**position.h, position.h - 1, false) + static leftChildPosition(position) { + if (position.h <= 0) { throw new Error('Height 0 does not have child') } + return new Position(position.i - 2 ** position.h, position.h - 1, false) } - static rightChildPosition(position){ + static rightChildPosition(position) { if (position.h <= 0) { throw new Error('Height 0 does not have child') } return new Position(position.i - 1, position.h - 1, true) } - static siblingPosition(position){ + static siblingPosition(position) { let multiplier = position.r ? -1 : 1 - return new Position (position.i + multiplier * (2**(position.h + 1) - 1), position.h, !position.r) + return new Position(position.i + multiplier * (2 ** (position.h + 1) - 1), position.h, !position.r) } - static parentIndex(position){ - if(position.r){ + static parentIndex(position) { + if (position.r) { return position.i + 1 - }else{ - return position.i + 2**(position.h + 1) + } else { + return position.i + 2 ** (position.h + 1) } } - static peakPositions(leafIndex){ + static peakPositions(leafIndex) { let currentPosition = this.godPeakFromLeafIndex(leafIndex) let peakPositions = [] - while(leafIndex >= 0){ + while (leafIndex >= 0) { currentPosition = this.leftChildPosition(currentPosition) - if(leafIndex >= 2**currentPosition.h - 1){ + if (leafIndex >= 2 ** currentPosition.h - 1) { peakPositions.push(currentPosition) currentPosition = this.siblingPosition(currentPosition) - leafIndex -= 2**currentPosition.h // leafIndex becomes a kindof accumulator + leafIndex -= 2 ** currentPosition.h // leafIndex becomes a kindof accumulator } } return peakPositions } - static localPeakPosition(leafIndex, leafLength){ - let lastLeafIndex = leafLength <= leafIndex ? leafIndex : leafLength - 1 + static localPeakPosition(leafIndex, leafLength) { + let lastLeafIndex = leafLength <= leafIndex ? leafIndex : leafLength - 1 return MMR._localPeakPosition(leafIndex, MMR.peakPositions(lastLeafIndex)) } - static _localPeakPosition(leafIndex, peakPositions){ + static _localPeakPosition(leafIndex, peakPositions) { for (let i = 0; i < peakPositions.length; i++) { - let currentRange = 2**(peakPositions[i].h) - if(leafIndex < currentRange){ + let currentRange = 2 ** (peakPositions[i].h) + if (leafIndex < currentRange) { return peakPositions[i] - }else{ + } else { leafIndex -= currentRange } } } - static mountainPositions(currentPosition, targetNodeIndex){ // positions to hash after appending + static mountainPositions(currentPosition, targetNodeIndex) { // positions to hash after appending let mountainPositions = [] while (currentPosition.h > 0) { let children = [this.leftChildPosition(currentPosition), this.rightChildPosition(currentPosition)] mountainPositions.push(children) - if(targetNodeIndex > currentPosition.i - 2**currentPosition.h - currentPosition.h + 1){ + if (targetNodeIndex > currentPosition.i - 2 ** currentPosition.h - currentPosition.h + 1) { currentPosition = children[1] - }else{ + } else { currentPosition = children[0] } } return mountainPositions } - static godPeakFromLeafIndex(leafIndex){ // imaginary peak that is above all nodes + static godPeakFromLeafIndex(leafIndex) { // imaginary peak that is above all nodes let peakHeight = 0 - while(2**peakHeight <= leafIndex + 1){ peakHeight++ } - return new Position(2**(peakHeight + 1) - 2, peakHeight, false) + while (2 ** peakHeight <= leafIndex + 1) { peakHeight++ } + return new Position(2 ** (peakHeight + 1) - 2, peakHeight, false) } - static getNodePosition(leafIndex){ + static getNodePosition(leafIndex) { let currentPosition = this.godPeakFromLeafIndex(leafIndex) let accumulator = 0 - while(currentPosition.h > 0){ - let serviceRange = 2**(currentPosition.h - 1) - if(leafIndex >= accumulator + serviceRange){ + while (currentPosition.h > 0) { + let serviceRange = 2 ** (currentPosition.h - 1) + if (leafIndex >= accumulator + serviceRange) { currentPosition = this.rightChildPosition(currentPosition) accumulator += serviceRange - }else{ + } else { currentPosition = this.leftChildPosition(currentPosition) } } return currentPosition } - static proofPositions(leafIndexes, referenceTreeLength){ + static proofPositions(leafIndexes, referenceTreeLength) { let positions = {} let finalPeakPositions = MMR.peakPositions(referenceTreeLength - 1) // add peak positions @@ -304,10 +304,10 @@ export class MMR{ let positionIndexes = Object.keys(positions) let impliedIndexes = [] for (let j = 0; j < positionIndexes.length; j++) { // k*log(n) - if(positions[positionIndexes[j]].h > 0){ + if (positions[positionIndexes[j]].h > 0) { let hasLeftChild = MMR._hasPosition(positions, MMR.leftChildPosition(positions[positionIndexes[j]])) let hasRightChild = MMR._hasPosition(positions, MMR.rightChildPosition(positions[positionIndexes[j]])) - if(hasLeftChild && hasRightChild){ + if (hasLeftChild && hasRightChild) { impliedIndexes.push(positionIndexes[j]) // don't remove them yet because recursion will be slower } } @@ -319,12 +319,12 @@ export class MMR{ } return positions } - static _hasPosition(nodes, position){ + static _hasPosition(nodes, position) { let has = !!nodes[position.i] - if (!has && position.h > 0){ - if(MMR._hasPosition(nodes, MMR.leftChildPosition(position)) + if (!has && position.h > 0) { + if (MMR._hasPosition(nodes, MMR.leftChildPosition(position)) && MMR._hasPosition(nodes, MMR.rightChildPosition(position)) - ){ + ) { has = true } } @@ -332,30 +332,30 @@ export class MMR{ } } -class MemoryBasedDb { +export class MemoryBasedDb { - leafLength: any; - nodes: {[number: number]: Buffer}; - constructor(...args){ - if(args[0] == undefined || typeof args[0] == 'number'){ - this.leafLength = args[0] || 0 - this.nodes = args[1] || {} + leafLength: any; + nodes: { [number: number]: Buffer }; + constructor(...args) { + if (args[0] == undefined || typeof args[0] == 'number') { + this.leafLength = args[0] || 0 + this.nodes = args[1] || {} - } - } - async get(index){ - return this.nodes[index] - } - async set(value, index){ - this.nodes[index] = value - } - async getLeafLength(){ - return this.leafLength - } - async setLeafLength(leafLength){ - return this.leafLength = leafLength - } - async getNodes(){ - return this.nodes } } + async get(index) { + return this.nodes[index] + } + async set(value, index) { + this.nodes[index] = value + } + async getLeafLength() { + return this.leafLength + } + async setLeafLength(leafLength) { + return this.leafLength = leafLength + } + async getNodes() { + return this.nodes + } +} diff --git a/src/vdxf/classes/index.ts b/src/vdxf/classes/index.ts index fd28cfe..a9d3238 100644 --- a/src/vdxf/classes/index.ts +++ b/src/vdxf/classes/index.ts @@ -33,7 +33,7 @@ export { Audience, AltAuthFactor, } from "./Challenge"; -export {Attestation } from './Attestation' +export {Attestation, AttestationProof } from './Attestation' export { ProvisioningTxid } from './provisioning/ProvisioningResult' From f360fc2e1319550c452268bf68adb65055ab86b4 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Tue, 2 Jan 2024 19:38:12 +0000 Subject: [PATCH 049/120] Add AttestationData --- dist/vdxf/classes/index.d.ts | 2 +- src/vdxf/classes/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/vdxf/classes/index.d.ts b/dist/vdxf/classes/index.d.ts index ddc6df1..7c0ef16 100644 --- a/dist/vdxf/classes/index.d.ts +++ b/dist/vdxf/classes/index.d.ts @@ -22,6 +22,6 @@ export { ProvisioningDecisionInterface as LoginConsentProvisioningDecisionInterf export { ProvisioningResultInterface as LoginConsentProvisioningResultInterface } from "./provisioning/ProvisioningResult"; export { Hash160 } from './Hash160'; export { RedirectUri, Subject, ProvisioningInfo, RequestedPermission, Audience, AltAuthFactor, } from "./Challenge"; -export { Attestation, AttestationProof } from './Attestation'; +export { Attestation, AttestationProof, AttestationData } from './Attestation'; export { ProvisioningTxid } from './provisioning/ProvisioningResult'; export { Context } from './Context'; diff --git a/src/vdxf/classes/index.ts b/src/vdxf/classes/index.ts index a9d3238..ac81c8c 100644 --- a/src/vdxf/classes/index.ts +++ b/src/vdxf/classes/index.ts @@ -33,7 +33,7 @@ export { Audience, AltAuthFactor, } from "./Challenge"; -export {Attestation, AttestationProof } from './Attestation' +export {Attestation, AttestationProof, AttestationData } from './Attestation' export { ProvisioningTxid } from './provisioning/ProvisioningResult' From 5b0f8791aafedd89842edce4106dc509e1f13bc4 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Wed, 3 Jan 2024 17:48:40 +0000 Subject: [PATCH 050/120] Consolotate Attestation Class to be a full document, or a pruned ZK MMR proof --- dist/vdxf/classes/Attestation.d.ts | 22 +- dist/vdxf/classes/Attestation.js | 224 ++++++-------- dist/vdxf/classes/index.d.ts | 2 +- dist/vdxf/classes/index.js | 3 +- src/__tests__/attestation/attestation.test.ts | 37 ++- src/vdxf/classes/Attestation.ts | 290 +++++++----------- src/vdxf/classes/index.ts | 2 +- 7 files changed, 221 insertions(+), 359 deletions(-) diff --git a/dist/vdxf/classes/Attestation.d.ts b/dist/vdxf/classes/Attestation.d.ts index 333d119..d19485c 100644 --- a/dist/vdxf/classes/Attestation.d.ts +++ b/dist/vdxf/classes/Attestation.d.ts @@ -7,38 +7,24 @@ export interface AttestationData { value?: string; } export declare class Attestation extends VDXFObject { - components: Array; + components: Map; signatures: { [attestor: string]: string; }; mmr: MMR; constructor(vdxfkey?: string, data?: { - components?: Array; + components?: Map; signatures?: { [attestor: string]: string; }; - }); - dataByteLength(): number; - toDataBuffer(): Buffer; - fromDataBuffer(buffer: Buffer, offset?: number): number; - createMMR(): Promise; - routeHash(): Promise; - getRoot(): Promise; - getProof(keys: Array): Promise; - getHash(n: AttestationData): Buffer; - getHashes(): Array; -} -export declare class AttestationProof extends VDXFObject { - component: Map; - mmr: MMR; - constructor(vdxfkey?: string, data?: { - component?: Map; mmr?: MMR; }); dataByteLength(): number; toDataBuffer(): Buffer; fromDataBuffer(buffer: Buffer, offset?: number): number; + createMMR(): Promise; routeHash(): Promise; + getProof(keys: Array): Promise; checkProof(): Promise; getHash(key: any): Buffer; } diff --git a/dist/vdxf/classes/Attestation.js b/dist/vdxf/classes/Attestation.js index 2e4159b..9dfad81 100644 --- a/dist/vdxf/classes/Attestation.js +++ b/dist/vdxf/classes/Attestation.js @@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.AttestationProof = exports.Attestation = void 0; +exports.Attestation = void 0; const varuint_1 = require("../../utils/varuint"); const bufferutils_1 = require("../../utils/bufferutils"); const createHash = require("create-hash"); @@ -22,38 +22,52 @@ class Attestation extends __1.VDXFObject { constructor(vdxfkey = "", data) { super(vdxfkey); if (data) { - if (data === null || data === void 0 ? void 0 : data.components) - this.components = data.components; - if (data === null || data === void 0 ? void 0 : data.signatures) - this.signatures = data.signatures; + this.components = data.components || null; + this.signatures = data.signatures || null; + this.mmr = data.mmr || null; } } dataByteLength() { let byteLength = 0; - byteLength += varuint_1.default.encodingLength(this.components.length); - for (const n of this.components) { + byteLength += varuint_1.default.encodingLength(this.components.size); + for (const [key, item] of this.components) { + byteLength += varuint_1.default.encodingLength(key); byteLength += 20; //key byteLength += 32; //salt - byteLength += varuint_1.default.encodingLength(Buffer.from(n.value, "utf8").length); - byteLength += Buffer.from(n.value, "utf8").length; + byteLength += varuint_1.default.encodingLength(Buffer.from(item.value, "utf8").length); + byteLength += Buffer.from(item.value, "utf8").length; } - const objKeys = Object.keys(this.signatures); - byteLength += varuint_1.default.encodingLength(objKeys.length); - for (const item of objKeys) { + const sigKeys = Object.keys(this.signatures); + byteLength += varuint_1.default.encodingLength(sigKeys.length); + for (const item of sigKeys) { byteLength += 20; //key byteLength += varuint_1.default.encodingLength(Buffer.from(this.signatures[item], "base64").length); byteLength += Buffer.from(this.signatures[item], "base64").length; } + if (this.mmr) { + const nodes = this.mmr.db.nodes; + const mmrKeys = Object.keys(nodes); + byteLength += varuint_1.default.encodingLength(this.mmr.db.leafLength); + byteLength += varuint_1.default.encodingLength(mmrKeys.length); + for (const item of mmrKeys) { + byteLength += varuint_1.default.encodingLength(parseInt(item)); + byteLength += varuint_1.default.encodingLength(nodes[item].length); + byteLength += nodes[item].length; + } + } + else { + byteLength += varuint_1.default.encodingLength(0); + } return byteLength; } toDataBuffer() { const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); - bufferWriter.writeCompactSize(this.components.length); - for (const n of this.components) { - bufferWriter.writeSlice((0, address_1.fromBase58Check)(n.attestationKey).hash); - bufferWriter.writeSlice(Buffer.from(n.salt, "hex")); - bufferWriter.writeCompactSize(Buffer.from(n.value, "utf8").length); - bufferWriter.writeSlice(Buffer.from(n.value, "utf8")); + bufferWriter.writeCompactSize(this.components.size); + for (const [key, item] of this.components) { + bufferWriter.writeCompactSize(key); + bufferWriter.writeSlice((0, address_1.fromBase58Check)(item.attestationKey).hash); + bufferWriter.writeSlice(Buffer.from(item.salt, "hex")); + bufferWriter.writeVarSlice(Buffer.from(item.value, "utf8")); } const objKeys = Object.keys(this.signatures); bufferWriter.writeCompactSize(objKeys.length); @@ -61,157 +75,90 @@ class Attestation extends __1.VDXFObject { bufferWriter.writeSlice((0, address_1.fromBase58Check)(item).hash); bufferWriter.writeVarSlice(Buffer.from(this.signatures[item], "base64")); } + if (this.mmr) { + bufferWriter.writeCompactSize(this.mmr.db.leafLength); + const nodes = this.mmr.db.nodes; + const mmrKeys = Object.keys(nodes); + bufferWriter.writeCompactSize(mmrKeys.length); + for (const item of mmrKeys) { + bufferWriter.writeCompactSize(parseInt(item)); + bufferWriter.writeVarSlice(nodes[item]); + } + } + else { + bufferWriter.writeCompactSize(0); + } return bufferWriter.buffer; } fromDataBuffer(buffer, offset) { const reader = new bufferutils_1.default.BufferReader(buffer, offset); - const attestationsByteLength = reader.readCompactSize(); - this.components = new Array(); - const componentsMapSize = reader.readVarInt(); - for (var i = 0; i < componentsMapSize.toNumber(); i++) { + const attestationsByteLength = reader.readCompactSize(); //dummy read + const componentsLength = reader.readCompactSize(); + this.components = new Map(); + for (var i = 0; i < componentsLength; i++) { + const key = reader.readCompactSize(); const attestationKey = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); const salt = Buffer.from(reader.readSlice(32)).toString('hex'); const value = Buffer.from(reader.readVarSlice()).toString('utf8'); - this.components.push({ attestationKey, salt, value }); + this.components.set(key, { attestationKey, salt, value }); } - const signaturesSize = reader.readVarInt(); + const signaturesSize = reader.readCompactSize(); this.signatures = {}; - for (var i = 0; i < signaturesSize.toNumber(); i++) { + for (var i = 0; i < signaturesSize; i++) { const attestor = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); const signature = reader.readVarSlice().toString('base64'); this.signatures[attestor] = signature; } + const leafLength = reader.readCompactSize(); + if (leafLength > 0) { + const referenceTreeLength = reader.readCompactSize(); + const nodes = {}; + for (var i = 0; i < referenceTreeLength; i++) { + const nodeIndex = reader.readCompactSize(); + const signature = reader.readVarSlice(); + nodes[nodeIndex] = signature; + } + if (Object.keys(nodes).length > 0) { + this.mmr = new MMR_1.MMR(new MMR_1.MemoryBasedDb(leafLength, nodes)); + } + } return reader.offset; } createMMR() { return __awaiter(this, void 0, void 0, function* () { - const attestationHashes = this.getHashes(); if (!this.mmr) { this.mmr = new MMR_1.MMR(); } - for (var i = 0; i < attestationHashes.length; i++) { - yield this.mmr.append(attestationHashes[i], i); + else { + return this.mmr; + } + for (const [key, item] of this.components) { + yield this.mmr.append(this.getHash(key), key); } return this.mmr; }); } routeHash() { return __awaiter(this, void 0, void 0, function* () { - yield this.createMMR(); - return yield this.mmr.getRoot(); - }); - } - getRoot() { - return __awaiter(this, void 0, void 0, function* () { + if (!this.mmr) { + yield this.createMMR(); + } return yield this.mmr.getRoot(); }); } + // returns an attestation with a sparse MMR containing the leaves specified getProof(keys) { return __awaiter(this, void 0, void 0, function* () { const itemMaps = new Map(); - keys.forEach((key, index) => { itemMaps.set(index, this.components[key]); }); - const reply = new AttestationProof("", { component: itemMaps, mmr: yield this.mmr.getProof(keys, null) }); + keys.forEach((key, index) => { itemMaps.set(index, this.components.get(key)); }); + const reply = new Attestation(this.vdxfkey, { components: itemMaps, mmr: yield this.mmr.getProof(keys, null), signatures: this.signatures }); return reply; }); } - getHash(n) { - const bufferWriter = new BufferWriter(Buffer.alloc(20 + - 32 + - varuint_1.default.encodingLength(Buffer.from(n.value, "utf8").length) + - Buffer.from(n.value, "utf8").length)); - bufferWriter.writeSlice((0, address_1.fromBase58Check)(n.attestationKey).hash); - bufferWriter.writeSlice(Buffer.from(n.salt, "hex")); - bufferWriter.writeCompactSize(Buffer.from(n.value, "utf8").length); - bufferWriter.writeSlice(Buffer.from(n.value, "utf8")); - return createHash("sha256").update(bufferWriter.buffer).digest(); - } - getHashes() { - const hashArray = []; - this.components.forEach((item) => hashArray.push(this.getHash(item))); - return hashArray; - } -} -exports.Attestation = Attestation; -class AttestationProof extends __1.VDXFObject { - constructor(vdxfkey = "", data) { - super(vdxfkey); - if (data) { - if (data === null || data === void 0 ? void 0 : data.component) - this.component = data.component; - if (data === null || data === void 0 ? void 0 : data.mmr) - this.mmr = data.mmr; - } - } - dataByteLength() { - let byteLength = 0; - byteLength += varuint_1.default.encodingLength(this.component.size); - for (const [key, item] of this.component) { - byteLength += varuint_1.default.encodingLength(this.component.size); - byteLength += varuint_1.default.encodingLength(key); - byteLength += 20; //key - byteLength += 32; //salt - byteLength += varuint_1.default.encodingLength(Buffer.from(item.value, "utf8").length); - byteLength += Buffer.from(item.value, "utf8").length; - } - byteLength += varuint_1.default.encodingLength(this.mmr.db.getLeafLength()); - const nodes = this.mmr.db.getNodes(); - const objKeys = Object.keys(nodes); - byteLength += varuint_1.default.encodingLength(objKeys.length); - for (const item of objKeys) { - byteLength += varuint_1.default.encodingLength(parseInt(item)); - byteLength += varuint_1.default.encodingLength(nodes[item].length); - } - return byteLength; - } - toDataBuffer() { - const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); - bufferWriter.writeCompactSize(this.component.size); - for (const [key, item] of this.component) { - bufferWriter.writeCompactSize(key); - bufferWriter.writeSlice((0, address_1.fromBase58Check)(item.attestationKey).hash); - bufferWriter.writeSlice(Buffer.from(item.salt, "hex")); - bufferWriter.writeVarSlice(Buffer.from(item.value, "utf8")); - } - bufferWriter.writeCompactSize(this.mmr.db.getLeafLength()); - const nodes = this.mmr.db.getNodes(); - const objKeys = Object.keys(nodes); - for (const item of objKeys) { - bufferWriter.writeCompactSize(parseInt(item)); - bufferWriter.writeVarSlice(nodes[item]); - } - return bufferWriter.buffer; - } - fromDataBuffer(buffer, offset) { - const reader = new bufferutils_1.default.BufferReader(buffer, offset); - const attestationsByteLength = reader.readCompactSize(); //dummy read - const componentsLength = reader.readCompactSize(); - this.component = new Map(); - for (var i = 0; i < componentsLength; i++) { - const key = reader.readCompactSize(); - const attestationKey = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); - const salt = Buffer.from(reader.readSlice(32)).toString('hex'); - const value = Buffer.from(reader.readVarSlice()).toString('utf8'); - this.component.set(key, { attestationKey, salt, value }); - } - const referenceTreeLength = reader.readVarInt(); - const nodes = {}; - for (var i = 0; i < referenceTreeLength.toNumber(); i++) { - const nodeIndex = reader.readCompactSize(); - const signature = reader.readVarSlice(); - nodes[nodeIndex] = signature; - } - this.mmr = new MMR_1.MMR(new MMR_1.MemoryBasedDb(referenceTreeLength, nodes)); - return reader.offset; - } - routeHash() { - return __awaiter(this, void 0, void 0, function* () { - return yield this.mmr.getRoot(); - }); - } checkProof() { return __awaiter(this, void 0, void 0, function* () { try { - for (const [key, item] of this.component) { + for (const [key, item] of this.components) { const hash = this.getHash(key); const proof = yield this.mmr.getProof([key], null); if (hash !== proof) { @@ -220,19 +167,20 @@ class AttestationProof extends __1.VDXFObject { } } catch (e) { + throw new Error("Error checking MMR"); } }); } getHash(key) { const bufferWriter = new BufferWriter(Buffer.alloc(20 + 32 + - varuint_1.default.encodingLength(Buffer.from(this.component.get(key).value, "utf8").length) + - Buffer.from(this.component.get(key).value, "utf8").length)); - bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.component.get(key).attestationKey).hash); - bufferWriter.writeSlice(Buffer.from(this.component.get(key).salt, "hex")); - bufferWriter.writeCompactSize(Buffer.from(this.component.get(key).value, "utf8").length); - bufferWriter.writeSlice(Buffer.from(this.component.get(key).value, "utf8")); + varuint_1.default.encodingLength(Buffer.from(this.components.get(key).value, "utf8").length) + + Buffer.from(this.components.get(key).value, "utf8").length)); + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.components.get(key).attestationKey).hash); + bufferWriter.writeSlice(Buffer.from(this.components.get(key).salt, "hex")); + bufferWriter.writeCompactSize(Buffer.from(this.components.get(key).value, "utf8").length); + bufferWriter.writeSlice(Buffer.from(this.components.get(key).value, "utf8")); return createHash("sha256").update(bufferWriter.buffer).digest(); } } -exports.AttestationProof = AttestationProof; +exports.Attestation = Attestation; diff --git a/dist/vdxf/classes/index.d.ts b/dist/vdxf/classes/index.d.ts index 7c0ef16..9b13b4b 100644 --- a/dist/vdxf/classes/index.d.ts +++ b/dist/vdxf/classes/index.d.ts @@ -22,6 +22,6 @@ export { ProvisioningDecisionInterface as LoginConsentProvisioningDecisionInterf export { ProvisioningResultInterface as LoginConsentProvisioningResultInterface } from "./provisioning/ProvisioningResult"; export { Hash160 } from './Hash160'; export { RedirectUri, Subject, ProvisioningInfo, RequestedPermission, Audience, AltAuthFactor, } from "./Challenge"; -export { Attestation, AttestationProof, AttestationData } from './Attestation'; +export { Attestation } from './Attestation'; export { ProvisioningTxid } from './provisioning/ProvisioningResult'; export { Context } from './Context'; diff --git a/dist/vdxf/classes/index.js b/dist/vdxf/classes/index.js index 0f84a82..07bf039 100644 --- a/dist/vdxf/classes/index.js +++ b/dist/vdxf/classes/index.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.Context = exports.ProvisioningTxid = exports.AttestationProof = exports.Attestation = exports.AltAuthFactor = exports.Audience = exports.RequestedPermission = exports.ProvisioningInfo = exports.Subject = exports.RedirectUri = exports.Hash160 = exports.LoginConsentProvisioningResult = exports.LoginConsentProvisioningDecision = exports.LoginConsentProvisioningResponse = exports.LoginConsentProvisioningChallenge = exports.LoginConsentProvisioningRequest = exports.VerusPayInvoice = exports.VerusPayInvoiceDetails = exports.SignedSessionObjectData = exports.SignedSessionObject = exports.LoginConsentResponse = exports.LoginConsentRequest = exports.LoginConsentDecision = exports.LoginConsentChallenge = void 0; +exports.Context = exports.ProvisioningTxid = exports.Attestation = exports.AltAuthFactor = exports.Audience = exports.RequestedPermission = exports.ProvisioningInfo = exports.Subject = exports.RedirectUri = exports.Hash160 = exports.LoginConsentProvisioningResult = exports.LoginConsentProvisioningDecision = exports.LoginConsentProvisioningResponse = exports.LoginConsentProvisioningChallenge = exports.LoginConsentProvisioningRequest = exports.VerusPayInvoice = exports.VerusPayInvoiceDetails = exports.SignedSessionObjectData = exports.SignedSessionObject = exports.LoginConsentResponse = exports.LoginConsentRequest = exports.LoginConsentDecision = exports.LoginConsentChallenge = void 0; var Challenge_1 = require("./Challenge"); Object.defineProperty(exports, "LoginConsentChallenge", { enumerable: true, get: function () { return Challenge_1.Challenge; } }); var Decision_1 = require("./Decision"); @@ -38,7 +38,6 @@ Object.defineProperty(exports, "Audience", { enumerable: true, get: function () Object.defineProperty(exports, "AltAuthFactor", { enumerable: true, get: function () { return Challenge_2.AltAuthFactor; } }); var Attestation_1 = require("./Attestation"); Object.defineProperty(exports, "Attestation", { enumerable: true, get: function () { return Attestation_1.Attestation; } }); -Object.defineProperty(exports, "AttestationProof", { enumerable: true, get: function () { return Attestation_1.AttestationProof; } }); var ProvisioningResult_2 = require("./provisioning/ProvisioningResult"); Object.defineProperty(exports, "ProvisioningTxid", { enumerable: true, get: function () { return ProvisioningResult_2.ProvisioningTxid; } }); var Context_1 = require("./Context"); diff --git a/src/__tests__/attestation/attestation.test.ts b/src/__tests__/attestation/attestation.test.ts index a0c647b..05cbd7a 100644 --- a/src/__tests__/attestation/attestation.test.ts +++ b/src/__tests__/attestation/attestation.test.ts @@ -1,5 +1,5 @@ import { ATTESTATION_READ_REQUEST, IDENTITY_VIEW, ATTESTATION_IDENTITY_DATA, LOGIN_CONSENT_REDIRECT_VDXF_KEY } from "../../vdxf"; -import { Attestation, LoginConsentRequest, LoginConsentResponse, AttestationProof } from "../../vdxf/classes"; +import { Attestation, LoginConsentRequest, LoginConsentResponse} from "../../vdxf/classes"; import { RedirectUri, RequestedPermission } from "../../vdxf/classes/Challenge"; import { Context } from "../../vdxf/classes/Context"; @@ -42,27 +42,35 @@ describe('Serializes and deserializes attestation request', () => { }, }); - const componentsArray = new Array; + const componentsMap = new Map(); - componentsArray.push({attestationKey: ATTESTATION_IDENTITY_DATA["firstname"].vdxfid, salt: "8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210", value: "Chris"}) - componentsArray.push({attestationKey: ATTESTATION_IDENTITY_DATA["lastname"].vdxfid, salt: "7c3920940db4385cd305557a57a8df33346712096e76b58d7c4ace05e17b90a2", value: "Monkins"}) - componentsArray.push({attestationKey: ATTESTATION_IDENTITY_DATA["identity"].vdxfid, salt: "ce662d61a20ae211728cdb1b924628c84edfe0fcbd59a86f56a125ad73689ac1", value: "chad@"}) - componentsArray.push({attestationKey: ATTESTATION_IDENTITY_DATA["attestor"].vdxfid, salt: "9067dc6a9b38dd15f985770bb819eb62de39a5d1f0e12f9a4807f78968794af4", value: "valu attestation@"}) - componentsArray.push({attestationKey: ATTESTATION_IDENTITY_DATA["documenttype"].vdxfid, salt: "338b6ad44179f46fc24f3ed01fd247c9664384a71ba5465aebceece8d7c45a0a", value: "KYC Attestation v1"}) + componentsMap.set(0, {attestationKey: ATTESTATION_IDENTITY_DATA["firstname"].vdxfid, salt: "8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210", value: "Chris"}) + componentsMap.set(1, {attestationKey: ATTESTATION_IDENTITY_DATA["lastname"].vdxfid, salt: "7c3920940db4385cd305557a57a8df33346712096e76b58d7c4ace05e17b90a2", value: "Monkins"}) + componentsMap.set(2, {attestationKey: ATTESTATION_IDENTITY_DATA["identity"].vdxfid, salt: "ce662d61a20ae211728cdb1b924628c84edfe0fcbd59a86f56a125ad73689ac1", value: "chad@"}) + componentsMap.set(3, {attestationKey: ATTESTATION_IDENTITY_DATA["attestor"].vdxfid, salt: "9067dc6a9b38dd15f985770bb819eb62de39a5d1f0e12f9a4807f78968794af4", value: "valu attestation@"}) + componentsMap.set(4, {attestationKey: ATTESTATION_IDENTITY_DATA["documenttype"].vdxfid, salt: "338b6ad44179f46fc24f3ed01fd247c9664384a71ba5465aebceece8d7c45a0a", value: "KYC Attestation v1"}) const signaturesForAttestation = {"i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV": "AYG2IQABQSAN1fp6A9NIVbxvKuOVLLU+0I+G3oQGbRtS6u4Eampfb217Cdf5FCMScQhV9kMxtjI9GWzpchmjuiTB2tctk6qT"}; - const attestationResponse = new Attestation("i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV",{components: componentsArray, signatures: signaturesForAttestation}); + const attestationResponse = new Attestation("i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV",{components: componentsMap, signatures: signaturesForAttestation}); await attestationResponse.createMMR(); - const proofResponseRoot = await attestationResponse.getRoot(); + const proofResponseRoot = await attestationResponse.routeHash(); - const proofreply = await attestationResponse.getProof([0]); + // Get a pruned proof of just item [0] in the MMR + const prunedMMR = await attestationResponse.getProof([0]); - const proofRoot = await proofreply.mmr.getRoot(); + const prunedProofRoot = await prunedMMR.mmr.getRoot(); + const prunedMMRBuff = prunedMMR.toBuffer(); + + const fromPrunedMMR = new Attestation(); + + fromPrunedMMR.fromBuffer(prunedMMRBuff); + + const fromPrunedMMRProofRoot = await fromPrunedMMR.routeHash(); const res = new LoginConsentResponse({ system_id: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", @@ -100,9 +108,14 @@ describe('Serializes and deserializes attestation request', () => { const root = await mmr.getRoot(); - expect(proofRoot.toString('hex')).toStrictEqual("fa3cf78b174a39ddf7967afbfda54953ed55e44c6731de8796eb37ba77afddf1") + expect(prunedProofRoot.toString('hex')).toStrictEqual("fa3cf78b174a39ddf7967afbfda54953ed55e44c6731de8796eb37ba77afddf1") expect(proofResponseRoot.toString('hex')).toStrictEqual("fa3cf78b174a39ddf7967afbfda54953ed55e44c6731de8796eb37ba77afddf1") + expect(fromPrunedMMRProofRoot.toString('hex')).toStrictEqual("fa3cf78b174a39ddf7967afbfda54953ed55e44c6731de8796eb37ba77afddf1") expect(Buffer.from(root).toString('hex')).toStrictEqual("fa3cf78b174a39ddf7967afbfda54953ed55e44c6731de8796eb37ba77afddf1") + + // prume MMR and check stateroot is stillthe same + + // const prunedMMRProof = }); diff --git a/src/vdxf/classes/Attestation.ts b/src/vdxf/classes/Attestation.ts index 6817f53..f19e51b 100644 --- a/src/vdxf/classes/Attestation.ts +++ b/src/vdxf/classes/Attestation.ts @@ -18,59 +18,75 @@ export interface AttestationData{ export class Attestation extends VDXFObject { - components: Array; + components: Map; signatures: {[attestor: string]: string}; mmr: MMR; constructor(vdxfkey: string = "", data?: { - components?: Array; + components?: Map; signatures?: {[attestor: string]: string}; + mmr?: MMR; }) { super(vdxfkey); if (data) { - if (data?.components) this.components = data.components; - if (data?.signatures) this.signatures = data.signatures; + this.components = data.components || null; + this.signatures = data.signatures || null; + this.mmr = data.mmr || null; } } dataByteLength(): number { - - let byteLength = 0; - byteLength += varuint.encodingLength(this.components.length) - for (const n of this.components) { + let byteLength = 0; + byteLength += varuint.encodingLength(this.components.size) + for (const [key, item] of this.components) { + byteLength += varuint.encodingLength(key) byteLength += 20; //key byteLength += 32; //salt - byteLength += varuint.encodingLength(Buffer.from(n.value, "utf8").length); - byteLength += Buffer.from(n.value, "utf8").length; - + byteLength += varuint.encodingLength(Buffer.from(item.value, "utf8").length); + byteLength += Buffer.from(item.value, "utf8").length; } - const objKeys = Object.keys(this.signatures); - byteLength += varuint.encodingLength(objKeys.length); + const sigKeys = Object.keys(this.signatures); + byteLength += varuint.encodingLength(sigKeys.length); - for (const item of objKeys) { + for (const item of sigKeys) { byteLength += 20; //key byteLength += varuint.encodingLength(Buffer.from(this.signatures[item], "base64").length); byteLength += Buffer.from(this.signatures[item], "base64").length; } + + if (this.mmr) { + const nodes = this.mmr.db.nodes; + const mmrKeys = Object.keys(nodes); + + byteLength += varuint.encodingLength(this.mmr.db.leafLength); + byteLength += varuint.encodingLength(mmrKeys.length); + + for (const item of mmrKeys) { + byteLength += varuint.encodingLength(parseInt(item)); + byteLength += varuint.encodingLength(nodes[item].length); + byteLength += nodes[item].length; + } + } else { + byteLength += varuint.encodingLength(0); + } return byteLength; } toDataBuffer(): Buffer { const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); - bufferWriter.writeCompactSize(this.components.length); - for (const n of this.components) { - - bufferWriter.writeSlice(fromBase58Check(n.attestationKey).hash); - bufferWriter.writeSlice(Buffer.from(n.salt, "hex")); - bufferWriter.writeCompactSize(Buffer.from(n.value, "utf8").length) - bufferWriter.writeSlice(Buffer.from(n.value, "utf8")); + bufferWriter.writeCompactSize(this.components.size); + for (const [key, item] of this.components) { + bufferWriter.writeCompactSize(key); + bufferWriter.writeSlice(fromBase58Check(item.attestationKey).hash); + bufferWriter.writeSlice(Buffer.from(item.salt, "hex")); + bufferWriter.writeVarSlice(Buffer.from(item.value, "utf8")) } const objKeys = Object.keys(this.signatures); @@ -83,51 +99,85 @@ export class Attestation extends VDXFObject { } + if (this.mmr) { + + bufferWriter.writeCompactSize(this.mmr.db.leafLength); + const nodes = this.mmr.db.nodes; + const mmrKeys = Object.keys(nodes); + bufferWriter.writeCompactSize(mmrKeys.length); + + for (const item of mmrKeys) { + + bufferWriter.writeCompactSize(parseInt(item)); + bufferWriter.writeVarSlice(nodes[item]) + + } + } else { + bufferWriter.writeCompactSize(0); + } + return bufferWriter.buffer } fromDataBuffer(buffer: Buffer, offset?: number): number { const reader = new bufferutils.BufferReader(buffer, offset); - const attestationsByteLength = reader.readCompactSize(); - - - this.components = new Array(); - - const componentsMapSize = reader.readVarInt(); + const attestationsByteLength = reader.readCompactSize(); //dummy read - for (var i = 0; i < componentsMapSize.toNumber(); i++) { + const componentsLength = reader.readCompactSize(); + this.components = new Map(); + for (var i = 0; i < componentsLength; i++) { + const key = reader.readCompactSize(); const attestationKey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); const salt = Buffer.from(reader.readSlice(32)).toString('hex'); const value = Buffer.from(reader.readVarSlice()).toString('utf8'); - this.components.push({attestationKey, salt, value}); - + this.components.set(key, {attestationKey, salt, value}); } - const signaturesSize = reader.readVarInt(); + const signaturesSize = reader.readCompactSize(); this.signatures = {}; - for (var i = 0; i < signaturesSize.toNumber(); i++) { + for (var i = 0; i < signaturesSize; i++) { const attestor = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); const signature = reader.readVarSlice().toString('base64'); this.signatures[attestor] = signature; } - + + const leafLength = reader.readCompactSize(); + + if (leafLength > 0) { + const referenceTreeLength = reader.readCompactSize(); + const nodes = {}; + + for (var i = 0; i < referenceTreeLength; i++) { + + const nodeIndex = reader.readCompactSize(); + const signature = reader.readVarSlice(); + nodes[nodeIndex] = signature; + } + + if (Object.keys(nodes).length > 0) { + this.mmr = new MMR(new MemoryBasedDb(leafLength, nodes)) + } + } + return reader.offset; } async createMMR() { - const attestationHashes = this.getHashes(); - if (!this.mmr) { this.mmr = new MMR(); + } else { + return this.mmr; } - for (var i = 0; i < attestationHashes.length; i++) { - await this.mmr.append(attestationHashes[i], i) + for (const [key, item] of this.components) { + + await this.mmr.append(this.getHash(key), key) + } return this.mmr; @@ -135,163 +185,31 @@ export class Attestation extends VDXFObject { async routeHash() { - await this.createMMR(); - return await this.mmr.getRoot(); - } - - async getRoot() { + if (!this.mmr) { + await this.createMMR(); + } return await this.mmr.getRoot(); - } - async getProof(keys: Array): Promise { + // returns an attestation with a sparse MMR containing the leaves specified + async getProof(keys: Array): Promise { const itemMaps = new Map(); - keys.forEach((key, index) => {itemMaps.set(index, this.components[key])}); + keys.forEach((key, index) => {itemMaps.set(index, this.components.get(key))}); - const reply = new AttestationProof("", {component: itemMaps, mmr: await this.mmr.getProof(keys, null)}); + const reply = new Attestation(this.vdxfkey, {components: itemMaps, mmr: await this.mmr.getProof(keys, null), signatures: this.signatures}); return reply; } - getHash(n: AttestationData): Buffer { - - const bufferWriter = new BufferWriter(Buffer.alloc(20 + - 32 + - varuint.encodingLength(Buffer.from(n.value, "utf8").length) + - Buffer.from(n.value, "utf8").length )); - bufferWriter.writeSlice(fromBase58Check(n.attestationKey).hash); - bufferWriter.writeSlice(Buffer.from(n.salt, "hex")); - bufferWriter.writeCompactSize(Buffer.from(n.value, "utf8").length) - bufferWriter.writeSlice(Buffer.from(n.value, "utf8")); - - return createHash("sha256").update(bufferWriter.buffer).digest(); - - } - - getHashes(): Array { - - const hashArray = []; - this.components.forEach((item) => hashArray.push(this.getHash(item))); - return hashArray; - } - - } - - export class AttestationProof extends VDXFObject { - component: Map; - mmr: MMR; - - constructor(vdxfkey: string = "", data?: { - component?: Map; - mmr?: MMR; - - }) { - super(vdxfkey); - - if (data) { - if (data?.component) this.component = data.component; - if (data?.mmr) this.mmr = data.mmr; - } - - } - - dataByteLength(): number { - - let byteLength = 0; - byteLength += varuint.encodingLength(this.component.size) - - for (const [key, item] of this.component) { - byteLength += varuint.encodingLength(this.component.size) - byteLength += varuint.encodingLength(key) - byteLength += 20; //key - byteLength += 32; //salt - byteLength += varuint.encodingLength(Buffer.from(item.value, "utf8").length); - byteLength += Buffer.from(item.value, "utf8").length; - } - - byteLength += varuint.encodingLength(this.mmr.db.getLeafLength()); - - const nodes = this.mmr.db.getNodes(); - const objKeys = Object.keys(nodes); - byteLength += varuint.encodingLength(objKeys.length); - - for (const item of objKeys) { - byteLength += varuint.encodingLength(parseInt(item)); - byteLength += varuint.encodingLength(nodes[item].length); - - } - return byteLength; - } - - toDataBuffer(): Buffer { - const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); - - bufferWriter.writeCompactSize(this.component.size); - for (const [key, item] of this.component) { - bufferWriter.writeCompactSize(key); - bufferWriter.writeSlice(fromBase58Check(item.attestationKey).hash); - bufferWriter.writeSlice(Buffer.from(item.salt, "hex")); - bufferWriter.writeVarSlice(Buffer.from(item.value, "utf8")) - } - - bufferWriter.writeCompactSize(this.mmr.db.getLeafLength()); - const nodes = this.mmr.db.getNodes(); - const objKeys = Object.keys(nodes); - - for (const item of objKeys) { - - bufferWriter.writeCompactSize(parseInt(item)); - bufferWriter.writeVarSlice(nodes[item]) - - } - - return bufferWriter.buffer - } - - fromDataBuffer(buffer: Buffer, offset?: number): number { - - const reader = new bufferutils.BufferReader(buffer, offset); - const attestationsByteLength = reader.readCompactSize(); //dummy read - - const componentsLength = reader.readCompactSize(); - this.component = new Map(); - - for (var i = 0; i < componentsLength; i++) { - const key = reader.readCompactSize(); - const attestationKey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); - const salt = Buffer.from(reader.readSlice(32)).toString('hex'); - const value = Buffer.from(reader.readVarSlice()).toString('utf8'); - this.component.set(key, {attestationKey, salt, value}); - } - - const referenceTreeLength = reader.readVarInt(); - const nodes = {}; - - for (var i = 0; i < referenceTreeLength.toNumber(); i++) { - - const nodeIndex = reader.readCompactSize(); - const signature = reader.readVarSlice(); - nodes[nodeIndex] = signature; - } - - this.mmr = new MMR(new MemoryBasedDb(referenceTreeLength, nodes)) - - return reader.offset; - } - - async routeHash() { - return await this.mmr.getRoot(); - } - async checkProof() { try { - for (const [key, item] of this.component) { + for (const [key, item] of this.components) { const hash = this.getHash(key); const proof = await this.mmr.getProof([key], null); @@ -301,7 +219,7 @@ export class Attestation extends VDXFObject { } } } catch (e) { - + throw new Error("Error checking MMR"); } } @@ -309,17 +227,15 @@ export class Attestation extends VDXFObject { const bufferWriter = new BufferWriter(Buffer.alloc(20 + 32 + - varuint.encodingLength(Buffer.from(this.component.get(key).value, "utf8").length) + - Buffer.from(this.component.get(key).value, "utf8").length )); - bufferWriter.writeSlice(fromBase58Check(this.component.get(key).attestationKey).hash); - bufferWriter.writeSlice(Buffer.from(this.component.get(key).salt, "hex")); - bufferWriter.writeCompactSize(Buffer.from(this.component.get(key).value, "utf8").length) - bufferWriter.writeSlice(Buffer.from(this.component.get(key).value, "utf8")); + varuint.encodingLength(Buffer.from(this.components.get(key).value, "utf8").length) + + Buffer.from(this.components.get(key).value, "utf8").length )); + bufferWriter.writeSlice(fromBase58Check(this.components.get(key).attestationKey).hash); + bufferWriter.writeSlice(Buffer.from(this.components.get(key).salt, "hex")); + bufferWriter.writeCompactSize(Buffer.from(this.components.get(key).value, "utf8").length) + bufferWriter.writeSlice(Buffer.from(this.components.get(key).value, "utf8")); return createHash("sha256").update(bufferWriter.buffer).digest(); } - - - } + } \ No newline at end of file diff --git a/src/vdxf/classes/index.ts b/src/vdxf/classes/index.ts index ac81c8c..35e69f9 100644 --- a/src/vdxf/classes/index.ts +++ b/src/vdxf/classes/index.ts @@ -33,7 +33,7 @@ export { Audience, AltAuthFactor, } from "./Challenge"; -export {Attestation, AttestationProof, AttestationData } from './Attestation' +export {Attestation} from './Attestation' export { ProvisioningTxid } from './provisioning/ProvisioningResult' From bf0dc030215d61a7713beac07f634ee40dbb3c1a Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Fri, 5 Jan 2024 14:45:49 +0000 Subject: [PATCH 051/120] Add Attestation VDXFID webhook --- dist/vdxf/keys.d.ts | 10 +++++++++- dist/vdxf/keys.js | 10 +++++++++- src/vdxf/keys.ts | 11 ++++++++++- 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/dist/vdxf/keys.d.ts b/dist/vdxf/keys.d.ts index d066add..1623b2b 100644 --- a/dist/vdxf/keys.d.ts +++ b/dist/vdxf/keys.d.ts @@ -16,6 +16,7 @@ export declare const LOGIN_CONSENT_DECISION_VDXF_KEY: VDXFKeyInterface; export declare const WALLET_VDXF_KEY: VDXFKeyInterface; export declare const LOGIN_CONSENT_REDIRECT_VDXF_KEY: VDXFKeyInterface; export declare const LOGIN_CONSENT_WEBHOOK_VDXF_KEY: VDXFKeyInterface; +export declare const LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY: VDXFKeyInterface; export declare const LOGIN_CONSENT_CONTEXT_VDXF_KEY: VDXFKeyInterface; export declare const LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY: VDXFKeyInterface; export declare const ID_ADDRESS_VDXF_KEY: VDXFKeyInterface; @@ -42,5 +43,12 @@ export declare const LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED: VDXFK export declare const SIGNED_SESSION_OBJECT_DATA: VDXFKeyInterface; export declare const SIGNED_SESSION_OBJECT: VDXFKeyInterface; export declare const CURRENCY_ADDRESS: VDXFKeyInterface; -export declare const ATTESTATION_IDENTITY_DATA: {}; +interface VDXFIdentityData extends VDXFKeyInterface { + detail: string; + name: string; +} +export declare const ATTESTATION_IDENTITY_DATA: { + [vdxfid: string]: VDXFIdentityData; +}; export declare const CVDXF_Data: {}; +export {}; diff --git a/dist/vdxf/keys.js b/dist/vdxf/keys.js index 46cb9c4..0129e44 100644 --- a/dist/vdxf/keys.js +++ b/dist/vdxf/keys.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.CVDXF_Data = exports.ATTESTATION_IDENTITY_DATA = exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.IDENTITY_AUTH_SIG_VDXF_KEY = exports.VERUSPAY_INVOICE_VDXF_KEY = void 0; +exports.CVDXF_Data = exports.ATTESTATION_IDENTITY_DATA = exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.IDENTITY_AUTH_SIG_VDXF_KEY = exports.VERUSPAY_INVOICE_VDXF_KEY = void 0; const varuint_1 = require("../utils/varuint"); exports.VERUSPAY_INVOICE_VDXF_KEY = { hash160result: "628efc28c2e2d40050e1a9de7a93e7ddf2aa0076", @@ -82,6 +82,14 @@ exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = { name: "vrsc::identity.authentication.loginconsent.webhook", }, }; +exports.LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY = { + vdxfid: "iEiQe3C68gKvAevZWAx6MLmoSR64hVqfMb", + hash160result: "6759ec3006891e89422e59fb613ab2653389497b", + qualifiedname: { + namespace: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + name: "vrsc::identity.attestation.webhook", + }, +}; exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = { vdxfid: "iBMochrKPSQfua5yZYWyd6p4QnREakqU44", hash160result: "3b605d4ace1e19dd0bddb2eef63171b1879a7b56", diff --git a/src/vdxf/keys.ts b/src/vdxf/keys.ts index 8038edb..905f29a 100644 --- a/src/vdxf/keys.ts +++ b/src/vdxf/keys.ts @@ -98,6 +98,15 @@ export const LOGIN_CONSENT_WEBHOOK_VDXF_KEY: VDXFKeyInterface = { }, }; +export const LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY: VDXFKeyInterface = { + vdxfid: "iEiQe3C68gKvAevZWAx6MLmoSR64hVqfMb", + hash160result: "6759ec3006891e89422e59fb613ab2653389497b", + qualifiedname: { + namespace: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + name: "vrsc::identity.attestation.webhook", + }, +}; + export const LOGIN_CONSENT_CONTEXT_VDXF_KEY: VDXFKeyInterface = { vdxfid: "iBMochrKPSQfua5yZYWyd6p4QnREakqU44", hash160result: "3b605d4ace1e19dd0bddb2eef63171b1879a7b56", @@ -400,7 +409,7 @@ const IDENTITY_DATA: VDXFIdentityData[] = [ } ] // Allow lookup by vdxfid or name -export const ATTESTATION_IDENTITY_DATA = {}; +export const ATTESTATION_IDENTITY_DATA: {[vdxfid: string]: VDXFIdentityData} = {} IDENTITY_DATA.forEach((item) => ATTESTATION_IDENTITY_DATA[item.vdxfid] = item) IDENTITY_DATA.forEach((item) => ATTESTATION_IDENTITY_DATA[item.name] = item) From 1743fb85b830d8d65134fc56a11d3161d441d020 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Wed, 10 Jan 2024 18:42:07 +0000 Subject: [PATCH 052/120] Remove get and BN, Add Attestation Receiver --- dist/vdxf/keys.d.ts | 1 + dist/vdxf/keys.js | 10 +++++++++- src/vdxf/classes/Attestation.ts | 2 -- src/vdxf/keys.ts | 8 ++++++++ 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/dist/vdxf/keys.d.ts b/dist/vdxf/keys.d.ts index 1623b2b..4e5ddf5 100644 --- a/dist/vdxf/keys.d.ts +++ b/dist/vdxf/keys.d.ts @@ -43,6 +43,7 @@ export declare const LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED: VDXFK export declare const SIGNED_SESSION_OBJECT_DATA: VDXFKeyInterface; export declare const SIGNED_SESSION_OBJECT: VDXFKeyInterface; export declare const CURRENCY_ADDRESS: VDXFKeyInterface; +export declare const ATTESTATION_RECIPIENT: VDXFKeyInterface; interface VDXFIdentityData extends VDXFKeyInterface { detail: string; name: string; diff --git a/dist/vdxf/keys.js b/dist/vdxf/keys.js index 0129e44..3b4501c 100644 --- a/dist/vdxf/keys.js +++ b/dist/vdxf/keys.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.CVDXF_Data = exports.ATTESTATION_IDENTITY_DATA = exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.IDENTITY_AUTH_SIG_VDXF_KEY = exports.VERUSPAY_INVOICE_VDXF_KEY = void 0; +exports.CVDXF_Data = exports.ATTESTATION_IDENTITY_DATA = exports.ATTESTATION_RECIPIENT = exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.IDENTITY_AUTH_SIG_VDXF_KEY = exports.VERUSPAY_INVOICE_VDXF_KEY = void 0; const varuint_1 = require("../utils/varuint"); exports.VERUSPAY_INVOICE_VDXF_KEY = { hash160result: "628efc28c2e2d40050e1a9de7a93e7ddf2aa0076", @@ -298,6 +298,14 @@ exports.CURRENCY_ADDRESS = { "name": "vrsc::currency.address" } }; +exports.ATTESTATION_RECIPIENT = { + "vdxfid": "iGz3PbkrgqaqqgiRHZzLZvRR8xNMkLBkxP", + "hash160result": "f0e8cdf215f6031e0787e3a1ff1d185386b42e94", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestations.recipient" + } +}; const IDENTITY_DATA = [ { "vdxfid": "iSSxdyTcCp8VALGBGKy8R7ATYSRuK15NkL", diff --git a/src/vdxf/classes/Attestation.ts b/src/vdxf/classes/Attestation.ts index f19e51b..0494e8d 100644 --- a/src/vdxf/classes/Attestation.ts +++ b/src/vdxf/classes/Attestation.ts @@ -5,8 +5,6 @@ import { fromBase58Check, toBase58Check } from '../../utils/address'; import { I_ADDR_VERSION } from '../../constants/vdxf'; import { VDXFObject } from "../"; import { MMR, MemoryBasedDb } from "./MMR" -import { BN } from 'bn.js' -import { get } from 'http'; const { BufferReader, BufferWriter } = bufferutils; diff --git a/src/vdxf/keys.ts b/src/vdxf/keys.ts index 905f29a..4f9caf6 100644 --- a/src/vdxf/keys.ts +++ b/src/vdxf/keys.ts @@ -350,6 +350,14 @@ export const CURRENCY_ADDRESS: VDXFKeyInterface = { } } +export const ATTESTATION_RECIPIENT: VDXFKeyInterface = { + "vdxfid": "iGz3PbkrgqaqqgiRHZzLZvRR8xNMkLBkxP", + "hash160result": "f0e8cdf215f6031e0787e3a1ff1d185386b42e94", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestations.recipient" + } +}; interface VDXFIdentityData extends VDXFKeyInterface { detail: string; From 34e0d220624526f1bdb36923ea4074f3761bd9b9 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Thu, 11 Jan 2024 16:57:36 +0000 Subject: [PATCH 053/120] Add sytemID to signatures --- dist/vdxf/classes/Attestation.d.ts | 10 ++++++++-- dist/vdxf/classes/Attestation.js | 13 ++++++++----- src/__tests__/attestation/attestation.test.ts | 4 +++- src/vdxf/classes/Attestation.ts | 17 ++++++++++------- 4 files changed, 29 insertions(+), 15 deletions(-) diff --git a/dist/vdxf/classes/Attestation.d.ts b/dist/vdxf/classes/Attestation.d.ts index d19485c..e4f47bf 100644 --- a/dist/vdxf/classes/Attestation.d.ts +++ b/dist/vdxf/classes/Attestation.d.ts @@ -9,13 +9,19 @@ export interface AttestationData { export declare class Attestation extends VDXFObject { components: Map; signatures: { - [attestor: string]: string; + [attestor: string]: { + signature: string; + system: string; + }; }; mmr: MMR; constructor(vdxfkey?: string, data?: { components?: Map; signatures?: { - [attestor: string]: string; + [attestor: string]: { + signature: string; + system: string; + }; }; mmr?: MMR; }); diff --git a/dist/vdxf/classes/Attestation.js b/dist/vdxf/classes/Attestation.js index 9dfad81..8d30d25 100644 --- a/dist/vdxf/classes/Attestation.js +++ b/dist/vdxf/classes/Attestation.js @@ -40,9 +40,10 @@ class Attestation extends __1.VDXFObject { const sigKeys = Object.keys(this.signatures); byteLength += varuint_1.default.encodingLength(sigKeys.length); for (const item of sigKeys) { - byteLength += 20; //key - byteLength += varuint_1.default.encodingLength(Buffer.from(this.signatures[item], "base64").length); - byteLength += Buffer.from(this.signatures[item], "base64").length; + byteLength += 20; //Attestor + byteLength += 20; //System + byteLength += varuint_1.default.encodingLength(Buffer.from(this.signatures[item].signature, "base64").length); + byteLength += Buffer.from(this.signatures[item].signature, "base64").length; } if (this.mmr) { const nodes = this.mmr.db.nodes; @@ -73,7 +74,8 @@ class Attestation extends __1.VDXFObject { bufferWriter.writeCompactSize(objKeys.length); for (const item of objKeys) { bufferWriter.writeSlice((0, address_1.fromBase58Check)(item).hash); - bufferWriter.writeVarSlice(Buffer.from(this.signatures[item], "base64")); + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.signatures[item].system).hash); + bufferWriter.writeVarSlice(Buffer.from(this.signatures[item].signature, "base64")); } if (this.mmr) { bufferWriter.writeCompactSize(this.mmr.db.leafLength); @@ -106,8 +108,9 @@ class Attestation extends __1.VDXFObject { this.signatures = {}; for (var i = 0; i < signaturesSize; i++) { const attestor = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + const system = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); const signature = reader.readVarSlice().toString('base64'); - this.signatures[attestor] = signature; + this.signatures[attestor] = { signature, system }; } const leafLength = reader.readCompactSize(); if (leafLength > 0) { diff --git a/src/__tests__/attestation/attestation.test.ts b/src/__tests__/attestation/attestation.test.ts index 05cbd7a..da0fe85 100644 --- a/src/__tests__/attestation/attestation.test.ts +++ b/src/__tests__/attestation/attestation.test.ts @@ -51,7 +51,9 @@ describe('Serializes and deserializes attestation request', () => { componentsMap.set(4, {attestationKey: ATTESTATION_IDENTITY_DATA["documenttype"].vdxfid, salt: "338b6ad44179f46fc24f3ed01fd247c9664384a71ba5465aebceece8d7c45a0a", value: "KYC Attestation v1"}) - const signaturesForAttestation = {"i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV": "AYG2IQABQSAN1fp6A9NIVbxvKuOVLLU+0I+G3oQGbRtS6u4Eampfb217Cdf5FCMScQhV9kMxtjI9GWzpchmjuiTB2tctk6qT"}; + const signaturesForAttestation = {"i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV": + {signature:"AYG2IQABQSAN1fp6A9NIVbxvKuOVLLU+0I+G3oQGbRtS6u4Eampfb217Cdf5FCMScQhV9kMxtjI9GWzpchmjuiTB2tctk6qT", + system: "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq"}}; const attestationResponse = new Attestation("i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV",{components: componentsMap, signatures: signaturesForAttestation}); diff --git a/src/vdxf/classes/Attestation.ts b/src/vdxf/classes/Attestation.ts index 0494e8d..cddc702 100644 --- a/src/vdxf/classes/Attestation.ts +++ b/src/vdxf/classes/Attestation.ts @@ -17,12 +17,12 @@ export interface AttestationData{ export class Attestation extends VDXFObject { components: Map; - signatures: {[attestor: string]: string}; + signatures: {[attestor: string]: {signature: string, system: string}}; mmr: MMR; constructor(vdxfkey: string = "", data?: { components?: Map; - signatures?: {[attestor: string]: string}; + signatures?: {[attestor: string]: {signature: string, system: string}}; mmr?: MMR; }) { super(vdxfkey); @@ -52,9 +52,10 @@ export class Attestation extends VDXFObject { byteLength += varuint.encodingLength(sigKeys.length); for (const item of sigKeys) { - byteLength += 20; //key - byteLength += varuint.encodingLength(Buffer.from(this.signatures[item], "base64").length); - byteLength += Buffer.from(this.signatures[item], "base64").length; + byteLength += 20; //Attestor + byteLength += 20; //System + byteLength += varuint.encodingLength(Buffer.from(this.signatures[item].signature, "base64").length); + byteLength += Buffer.from(this.signatures[item].signature, "base64").length; } @@ -93,7 +94,8 @@ export class Attestation extends VDXFObject { for (const item of objKeys) { bufferWriter.writeSlice(fromBase58Check(item).hash); - bufferWriter.writeVarSlice(Buffer.from(this.signatures[item], "base64")) + bufferWriter.writeSlice(fromBase58Check(this.signatures[item].system).hash); + bufferWriter.writeVarSlice(Buffer.from(this.signatures[item].signature, "base64")) } @@ -139,8 +141,9 @@ export class Attestation extends VDXFObject { for (var i = 0; i < signaturesSize; i++) { const attestor = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + const system = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); const signature = reader.readVarSlice().toString('base64'); - this.signatures[attestor] = signature; + this.signatures[attestor] = {signature, system}; } const leafLength = reader.readCompactSize(); From 789884e3021ced76bc397719a8aa3a8776e0d8f0 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Wed, 17 Jan 2024 17:15:27 +0000 Subject: [PATCH 054/120] wIP1 --- src/__tests__/attestation/attestation.test.ts | 1 + src/vdxf/classes/Attestation.ts | 416 +++++---- src/vdxf/classes/MMR copy.ts | 804 ++++++++++++++++++ src/vdxf/classes/MMR.ts | 240 +++++- 4 files changed, 1287 insertions(+), 174 deletions(-) create mode 100644 src/vdxf/classes/MMR copy.ts diff --git a/src/__tests__/attestation/attestation.test.ts b/src/__tests__/attestation/attestation.test.ts index da0fe85..5b0e33e 100644 --- a/src/__tests__/attestation/attestation.test.ts +++ b/src/__tests__/attestation/attestation.test.ts @@ -4,6 +4,7 @@ import { RedirectUri, RequestedPermission } from "../../vdxf/classes/Challenge"; import { Context } from "../../vdxf/classes/Context"; import { AttestationData } from "../../vdxf/classes/Attestation"; +const { randomBytes } = require('crypto') const SIMPLE_ATTESTATION = 1; diff --git a/src/vdxf/classes/Attestation.ts b/src/vdxf/classes/Attestation.ts index cddc702..b87d078 100644 --- a/src/vdxf/classes/Attestation.ts +++ b/src/vdxf/classes/Attestation.ts @@ -4,239 +4,309 @@ import createHash = require("create-hash"); import { fromBase58Check, toBase58Check } from '../../utils/address'; import { I_ADDR_VERSION } from '../../constants/vdxf'; import { VDXFObject } from "../"; -import { MMR, MemoryBasedDb } from "./MMR" +import { MMR, MemoryBasedDb, CMMRBranch, VerusMMR } from "./MMR" +const { randomBytes } = require('crypto') const { BufferReader, BufferWriter } = bufferutils; -export interface AttestationData{ - attestationKey?: string; - salt?: string; - value?: string; +export interface AttestationData { + type: number; + attestationKey: string; + salt: Buffer; + value: string | Buffer | URL; } +export class Attestation extends VDXFObject { + + static TYPE_STRING = 1; + static TYPE_BYTES = 2; + static TYPE_BASE64 = 3; + static TYPE_URL = 4; + + components: Map; + signatures: { [attestor: string]: { signature: string, system: string } }; + mmr: VerusMMR; + + constructor(vdxfkey: string = "", data?: { + components?: Map; + signatures?: { [attestor: string]: { signature: string, system: string } }; + mmr?: VerusMMR; + }) { + super(vdxfkey); + + if (data) { + this.components = data.components || null; + this.signatures = data.signatures || null; + this.mmr = data.mmr || null; + } + } -export class Attestation extends VDXFObject { - components: Map; - signatures: {[attestor: string]: {signature: string, system: string}}; - mmr: MMR; - - constructor(vdxfkey: string = "", data?: { - components?: Map; - signatures?: {[attestor: string]: {signature: string, system: string}}; - mmr?: MMR; - }) { - super(vdxfkey); - - if (data) { - this.components = data.components || null; - this.signatures = data.signatures || null; - this.mmr = data.mmr || null; + determineType(value: string | Buffer | URL) { + if (Buffer.isBuffer(value)) { + return Attestation.TYPE_BYTES; + } + // Check if it's a Base64 string + // Base64 string pattern: contains only Base64 characters and possibly padding at the end + const base64Pattern = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/; + if (typeof value === 'string' && base64Pattern.test(value)) { + return Attestation.TYPE_BASE64; + } + if (value instanceof URL) { + return Attestation.TYPE_URL; + } + return Attestation.TYPE_STRING; + } + + dataByteLength(): number { + + let byteLength = 0; + byteLength += varuint.encodingLength(this.components.size) + + for (const [key, item] of this.components) { + byteLength += varuint.encodingLength(key) + byteLength += 1; //type + byteLength += 20; //vdxfid + byteLength += 32; //salt + if (item.type === Attestation.TYPE_STRING) { + byteLength += varuint.encodingLength(Buffer.from(item.value as string, "utf8").length); + byteLength += Buffer.from(item.value as string, "utf8").length; + } else if (item.type === Attestation.TYPE_BYTES) { + byteLength += varuint.encodingLength((item.value as Buffer).length); + byteLength += (item.value as Buffer).length; + } else if (item.type === Attestation.TYPE_BASE64) { + byteLength += varuint.encodingLength(Buffer.from(item.value as string, "base64").length); + byteLength += Buffer.from(item.value as string, "base64").length; + } else if (item.type === Attestation.TYPE_URL) { + byteLength += varuint.encodingLength(Buffer.from((item.value as URL).toString(), "utf8").length); + byteLength += Buffer.from((item.value as URL).toString(), "utf8").length; + } else { + throw new Error("Invalid Attestation Type"); } - } - dataByteLength(): number { + const sigKeys = Object.keys(this.signatures); + byteLength += varuint.encodingLength(sigKeys.length); - let byteLength = 0; - byteLength += varuint.encodingLength(this.components.size) + for (const item of sigKeys) { + byteLength += 20; //Attestor + byteLength += 20; //System + byteLength += varuint.encodingLength(Buffer.from(this.signatures[item].signature, "base64").length); + byteLength += Buffer.from(this.signatures[item].signature, "base64").length; - for (const [key, item] of this.components) { - byteLength += varuint.encodingLength(key) - byteLength += 20; //key - byteLength += 32; //salt - byteLength += varuint.encodingLength(Buffer.from(item.value, "utf8").length); - byteLength += Buffer.from(item.value, "utf8").length; - } + } + + if (this.mmr) { + byteLength += this.mmr.getbyteLength(); - const sigKeys = Object.keys(this.signatures); - byteLength += varuint.encodingLength(sigKeys.length); - - for (const item of sigKeys) { - byteLength += 20; //Attestor - byteLength += 20; //System - byteLength += varuint.encodingLength(Buffer.from(this.signatures[item].signature, "base64").length); - byteLength += Buffer.from(this.signatures[item].signature, "base64").length; - - } - - if (this.mmr) { - const nodes = this.mmr.db.nodes; - const mmrKeys = Object.keys(nodes); - - byteLength += varuint.encodingLength(this.mmr.db.leafLength); - byteLength += varuint.encodingLength(mmrKeys.length); - - for (const item of mmrKeys) { - byteLength += varuint.encodingLength(parseInt(item)); - byteLength += varuint.encodingLength(nodes[item].length); - byteLength += nodes[item].length; - } + } else { + byteLength += varuint.encodingLength(0); + } + return byteLength; + } + + toDataBuffer(): Buffer { + const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); + + bufferWriter.writeCompactSize(this.components.size); + for (const [key, item] of this.components) { + bufferWriter.writeUInt8(item.type); + bufferWriter.writeCompactSize(key); + bufferWriter.writeSlice(fromBase58Check(item.attestationKey).hash); + bufferWriter.writeSlice(item.salt); + + if (item.type === Attestation.TYPE_STRING) { + bufferWriter.writeVarSlice(Buffer.from(item.value as string, "utf8")) + } else if (item.type === Attestation.TYPE_BYTES) { + bufferWriter.writeVarSlice(item.value as Buffer) + } else if (item.type === Attestation.TYPE_BASE64) { + bufferWriter.writeVarSlice(Buffer.from(item.value as string, "base64")) + } else if (item.type === Attestation.TYPE_URL) { + bufferWriter.writeVarSlice(Buffer.from((item.value as URL).toString(), "utf8")) } else { - byteLength += varuint.encodingLength(0); + throw new Error("Invalid Attestation Type"); } - return byteLength; } - - toDataBuffer(): Buffer { - const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); - bufferWriter.writeCompactSize(this.components.size); - for (const [key, item] of this.components) { - bufferWriter.writeCompactSize(key); - bufferWriter.writeSlice(fromBase58Check(item.attestationKey).hash); - bufferWriter.writeSlice(Buffer.from(item.salt, "hex")); - bufferWriter.writeVarSlice(Buffer.from(item.value, "utf8")) - } + const objKeys = Object.keys(this.signatures); + bufferWriter.writeCompactSize(objKeys.length); - const objKeys = Object.keys(this.signatures); - bufferWriter.writeCompactSize(objKeys.length); + for (const item of objKeys) { - for (const item of objKeys) { + bufferWriter.writeSlice(fromBase58Check(item).hash); + bufferWriter.writeSlice(fromBase58Check(this.signatures[item].system).hash); + bufferWriter.writeVarSlice(Buffer.from(this.signatures[item].signature, "base64")) - bufferWriter.writeSlice(fromBase58Check(item).hash); - bufferWriter.writeSlice(fromBase58Check(this.signatures[item].system).hash); - bufferWriter.writeVarSlice(Buffer.from(this.signatures[item].signature, "base64")) + } - } + if (this.mmr) { - if (this.mmr) { + bufferWriter.writeVarSlice(this.mmr.toBuffer()); - bufferWriter.writeCompactSize(this.mmr.db.leafLength); - const nodes = this.mmr.db.nodes; - const mmrKeys = Object.keys(nodes); - bufferWriter.writeCompactSize(mmrKeys.length); + } else { + bufferWriter.writeCompactSize(0); + } - for (const item of mmrKeys) { + return bufferWriter.buffer + } - bufferWriter.writeCompactSize(parseInt(item)); - bufferWriter.writeVarSlice(nodes[item]) + fromDataBuffer(buffer: Buffer, offset?: number): number { - } - } else { - bufferWriter.writeCompactSize(0); - } + const reader = new bufferutils.BufferReader(buffer, offset); + const attestationsByteLength = reader.readCompactSize(); //dummy read - return bufferWriter.buffer + const componentsLength = reader.readCompactSize(); + this.components = new Map(); + + for (var i = 0; i < componentsLength; i++) { + const key = reader.readCompactSize(); + const type = reader.readUInt8(); + const attestationKey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + const salt = Buffer.from(reader.readSlice(32)); + const value = Buffer.from(reader.readVarSlice()).toString('utf8'); + this.components.set(key, { type, attestationKey, salt, value }); } - - fromDataBuffer(buffer: Buffer, offset?: number): number { - const reader = new bufferutils.BufferReader(buffer, offset); - const attestationsByteLength = reader.readCompactSize(); //dummy read + const signaturesSize = reader.readCompactSize(); + this.signatures = {}; - const componentsLength = reader.readCompactSize(); - this.components = new Map(); + for (var i = 0; i < signaturesSize; i++) { - for (var i = 0; i < componentsLength; i++) { - const key = reader.readCompactSize(); - const attestationKey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); - const salt = Buffer.from(reader.readSlice(32)).toString('hex'); - const value = Buffer.from(reader.readVarSlice()).toString('utf8'); - this.components.set(key, {attestationKey, salt, value}); - } - - const signaturesSize = reader.readCompactSize(); - this.signatures = {}; + const attestor = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + const system = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + const signature = reader.readVarSlice().toString('base64'); + this.signatures[attestor] = { signature, system }; + } - for (var i = 0; i < signaturesSize; i++) { + const leafLength = reader.readCompactSize(); - const attestor = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); - const system = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); - const signature = reader.readVarSlice().toString('base64'); - this.signatures[attestor] = {signature, system}; - } + if (leafLength > 0) { + const referenceTreeLength = reader.readCompactSize(); + const nodes = {}; - const leafLength = reader.readCompactSize(); - - if (leafLength > 0) { - const referenceTreeLength = reader.readCompactSize(); - const nodes = {}; - - for (var i = 0; i < referenceTreeLength; i++) { - - const nodeIndex = reader.readCompactSize(); - const signature = reader.readVarSlice(); - nodes[nodeIndex] = signature; - } + for (var i = 0; i < referenceTreeLength; i++) { - if (Object.keys(nodes).length > 0) { - this.mmr = new MMR(new MemoryBasedDb(leafLength, nodes)) - } + const nodeIndex = reader.readCompactSize(); + const signature = reader.readVarSlice(); + nodes[nodeIndex] = signature; } - return reader.offset; + if (Object.keys(nodes).length > 0) { + this.mmr = new MMR(new MemoryBasedDb(leafLength, nodes)) + } } - async createMMR() { + return reader.offset; + } - if (!this.mmr) { - this.mmr = new MMR(); - } else { - return this.mmr; - } + async createMMR() { - for (const [key, item] of this.components) { + if (!this.mmr) { + this.mmr = new MMR(); + } else { + return this.mmr; + } - await this.mmr.append(this.getHash(key), key) + for (const [key, item] of this.components) { - } + await this.mmr.append(this.getHash(key), key) - return this.mmr; } - async routeHash() { + return this.mmr; + } - if (!this.mmr) { - await this.createMMR(); - } + async routeHash() { - return await this.mmr.getRoot(); + if (!this.mmr) { + await this.createMMR(); } - // returns an attestation with a sparse MMR containing the leaves specified - async getProof(keys: Array): Promise { - - const itemMaps = new Map(); + return await this.mmr.getRoot(); + } - keys.forEach((key, index) => {itemMaps.set(index, this.components.get(key))}); - - const reply = new Attestation(this.vdxfkey, {components: itemMaps, mmr: await this.mmr.getProof(keys, null), signatures: this.signatures}); - - return reply; + // returns an attestation with a sparse MMR containing the leaves specified + async getProof(keys: Array): Promise { - } + const itemMaps = new Map(); - async checkProof() { - - try { + keys.forEach((key, index) => { itemMaps.set(index, this.components.get(key)) }); + + const reply = new Attestation(this.vdxfkey, { components: itemMaps, mmr: await this.mmr.getProof(keys, null), signatures: this.signatures }); + + return reply; + + } - for (const [key, item] of this.components) { + async checkProof() { + + try { + + for (const [key, item] of this.components) { - const hash = this.getHash(key); - const proof = await this.mmr.getProof([key], null); + const hash = this.getHash(key); + const proof = await this.mmr.getProof([key], null); - if(hash !== proof) { - throw new Error("Attestation not found in MMR"); - } + if (hash !== proof) { + throw new Error("Attestation not found in MMR"); } - } catch (e) { - throw new Error("Error checking MMR"); } + } catch (e) { + throw new Error("Error checking MMR"); } + } + + getHash(key): Buffer { + + let value: Buffer; + + if (this.components.get(key).type === Attestation.TYPE_STRING) { + value = Buffer.from(this.components.get(key).value as string, "utf8"); + } else if (this.components.get(key).type === Attestation.TYPE_BYTES) { + value = this.components.get(key).value as Buffer; + } else if (this.components.get(key).type === Attestation.TYPE_BASE64) { + value = Buffer.from(this.components.get(key).value as string, "base64"); + } else if (this.components.get(key).type === Attestation.TYPE_URL) { + value = Buffer.from((this.components.get(key).value as URL).toString(), "utf8"); + } else { + throw new Error("Invalid Attestation Type"); + } + + const bufferWriter = new BufferWriter(Buffer.alloc(1 + 20 + 32 + varuint.encodingLength(value.length) + value.length)); + bufferWriter.writeUInt8(this.components.get(key).type); + bufferWriter.writeSlice(fromBase58Check(this.components.get(key).attestationKey).hash); + bufferWriter.writeSlice(this.components.get(key).salt); + bufferWriter.writeVarSlice(value); - getHash(key): Buffer { - - const bufferWriter = new BufferWriter(Buffer.alloc(20 + - 32 + - varuint.encodingLength(Buffer.from(this.components.get(key).value, "utf8").length) + - Buffer.from(this.components.get(key).value, "utf8").length )); - bufferWriter.writeSlice(fromBase58Check(this.components.get(key).attestationKey).hash); - bufferWriter.writeSlice(Buffer.from(this.components.get(key).salt, "hex")); - bufferWriter.writeCompactSize(Buffer.from(this.components.get(key).value, "utf8").length) - bufferWriter.writeSlice(Buffer.from(this.components.get(key).value, "utf8")); + return createHash("sha256").update(bufferWriter.buffer).digest(); - return createHash("sha256").update(bufferWriter.buffer).digest(); + } + setData(data: Array, getSalt: Function) { + + if (!this.components) { + this.components = new Map(); } - } \ No newline at end of file + for (let i = 0; i < data.length; i++) { + + const item = data[i]; + + if (!(item.salt instanceof Buffer) || item.salt.length !== 32) { + throw new Error("Salt is required to be a 32 random byte Buffer"); + } + + try { + fromBase58Check(item.attestationKey) + } catch (e) { + throw new Error("Attestation Key is required to be base58 format"); + } + + if (this.determineType(item.value) != item.type) { + throw new Error("Value is wrong type"); + } + this.components.set(i, item); + } + + } + +} \ No newline at end of file diff --git a/src/vdxf/classes/MMR copy.ts b/src/vdxf/classes/MMR copy.ts new file mode 100644 index 0000000..2041f46 --- /dev/null +++ b/src/vdxf/classes/MMR copy.ts @@ -0,0 +1,804 @@ +// Licence MIT +// Adapted to Verus Blake2b MMR. +// MMR Code is from +//Copyright (c) 2019 Zac Mitton under MIT License +//Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +//documentation files (the "Software"), to deal in the Software without restriction, including without limitation +//the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and +//to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + +var blake2b = require('blake2b') +const { Lock } = require('semaphore-async-await') +import { BN } from 'bn.js'; +import { AttestationData } from './Attestation'; +import { VDXFObject } from "../"; + + +class CChunkedLayer +{ +private CHUNK_SHIFT: number; +private vSize: number; +private nodes: Array>; + + constructor() { this.nodes = []; this.vSize = 0; this.CHUNK_SHIFT = 2; } + + chunkSize(): number + { + return 1 << this.CHUNK_SHIFT; + } + + chunkMask(): number + { + return this.chunkSize() - 1; + } + + size(): number + { + return this.vSize; + } + + getIndex(idx: number): NODE_TYPE + { + if (idx < this.vSize) + { + return this.nodes[idx >> this.CHUNK_SHIFT][idx & this.chunkMask()]; + } + else + { + throw new Error("CChunkedLayer [] index out of range"); + } + } + + push_back(node:NODE_TYPE) + { + this.vSize++; + + // if we wrapped around and need more space, we need to allocate a new chunk + // printf("vSize: %lx, chunkMask: %lx\n", vSize, chunkMask()); + + if ((this.vSize & this.chunkMask()) == 1) + { + this.nodes.push(Array()); + // this.nodes[this.nodes.length - 1].reserve(chunkSize()); + // TypeScript, arrays are dynamic and don't have a reserve method or an equivalent. + } + this.nodes[this.nodes.length - 1].push(node); + // printf("nodes.size(): %lu\n", nodes.size()); + } + + clear() + { + this.nodes = []; + this.vSize = 0; + } + + resize(newSize: number) + { + if (newSize == 0) + { + this.clear(); + } + else + { + let chunksSize = ((newSize - 1) >> this.CHUNK_SHIFT) + 1; + this.nodes.length = chunksSize; + for (let i = this.size() ? ((this.size() - 1) >> this.CHUNK_SHIFT) + 1 : 1; i <= chunksSize; i++) + { + if (i < chunksSize) + { + this.nodes[this.nodes.length - 1].length = this.chunkSize(); + } + else + { + // this.nodes[this.nodes.length - 1].reserve(chunkSize()); + this.nodes[this.nodes.length - 1].length = (((newSize - 1) & this.chunkMask()) + 1); + } + } + + this.vSize = ((this.nodes.length - 1) << this.CHUNK_SHIFT) + ((newSize - 1) & this.chunkMask()) + 1; + } + } +}; + +//template +class COverlayNodeLayer { + + private nodeSource: UNDERLYING; + private vSize: number; + + constructor(NodeSource:UNDERLYING) { + this.nodeSource = NodeSource; + this.vSize = 0; + } + + size(): number + { + return this.vSize; + } + + getIndex(idx: number): NODE_TYPE + { + if (idx < this.vSize) + { + let retval: NODE_TYPE; + return retval; + } + else + { + throw new Error("COverlayNodeLayer [] index out of range"); + + } + } + + // node type must be moveable just to be passed here, but the default overlay has no control over the underlying storage + // and only tracks size changes + push_back(node: NODE_TYPE) { this.vSize++; } + clear() { this.vSize = 0; } + resize(newSize: number) { this.vSize = newSize; } +}; + +export class CMMRNode +{ + hash: Buffer; + + constructor(Hash?: Buffer) { + if(Hash) { + this.hash = Hash; + } + } + + digest(input) { + var out = Buffer.allocUnsafe(32); + return blake2b(out.length, null, null, Buffer.from("VerusDefaultHash")).update(input).digest(out); + } + + HashObj(obj: Buffer, onbjR?: Buffer): Buffer + { + if (!onbjR) return this.digest(obj); + else return this.digest(Buffer.concat([obj, onbjR])); + } + + // add a right to this left and create a parent node + CreateParentNode(nRight: CMMRNode): CMMRNode + { + return this.digest(Buffer.concat([this.hash, nRight.hash])); + } + + GetProofHash(opposite: CMMRNode): Array + { + return [this.hash]; + } + + // leaf nodes that track additional data, such as block power, may need a hash added to the path + // at the very beginning + GetLeafHash() { return {}; } + + GetExtraHashCount() + { + // how many extra proof hashes per layer are added with this node + return 0; + } +}; + +function loggingIdentity(arg: Type[]): Type[] { + console.log(arg.length); + return arg; +} + +//template , typename LAYER0_TYPE=LAYER_TYPE> +export class VerusMMR { + lock: any; + layer0: CChunkedLayer; + vSize: number; + upperNodes: Array>; + _leafLength: number; + db: any; + + constructor(db = new MemoryBasedDb()) { + this.db = db + this.lock = new Lock(1) + + } + + digest(input) { + var out = Buffer.allocUnsafe(32); + return blake2b(out.length, null, null, Buffer.from("VerusDefaultHash")).update(input).digest(out); + } + + getbyteLength(): number { + return 1; + } + + toBuffer(): Buffer { + return Buffer.from([]); + } + + add(leaf: CMMRNode): number + { + this.layer0.push_back(leaf); + + let height = 0; + let layerSize: number; + for (layerSize = this.layer0.size(); height <= this.upperNodes.length && layerSize > 1; height++) + { + let newSizeAbove = layerSize >> 1; + + // expand vector of vectors if we are adding a new layer + if (height == this.upperNodes.length) + { + this.upperNodes.length = (this.upperNodes.length + 1); + // printf("adding2: upperNodes.size(): %lu, upperNodes[%d].size(): %lu\n", upperNodes.size(), height, height && upperNodes.size() ? upperNodes[height-1].size() : 0); + } + + uint32_t curSizeAbove = upperNodes[height].size(); + + // if we need to add an element to the vector above us, do it + // printf("layerSize: %u, newSizeAbove: %u, curSizeAbove: %u\n", layerSize, newSizeAbove, curSizeAbove); + if (!(layerSize & 1) && newSizeAbove > curSizeAbove) + { + uint32_t idx = layerSize - 2; + if (height) + { + // printf("upperNodes.size(): %lu, upperNodes[%d].size(): %lu, upperNodes[%d].size(): %lu\n", upperNodes.size(), height, upperNodes[height].size(), height - 1, upperNodes[height - 1].size()); + // upperNodes[height - 1].Printout(); + // upperNodes[height].Printout(); + // printf("upperNodes[%d].size(): %lu, nodep hash: %s\n", height - 1, upperNodes[height - 1].size(), upperNodes[height - 1][idx].hash.GetHex().c_str()); + // printf("nodep + 1 hash: %p\n", upperNodes[height - 1][idx + 1].hash.GetHex().c_str()); + upperNodes[height].push_back(upperNodes[height - 1][idx].CreateParentNode(upperNodes[height - 1][idx + 1])); + } + else + { + upperNodes[height].push_back(layer0[idx].CreateParentNode(layer0[idx + 1])); + // printf("upperNodes.size(): %lu, upperNodes[%d].size(): %lu\n", upperNodes.size(), height, upperNodes[height].size()); + // upperNodes[height].Printout(); + } + } + layerSize = newSizeAbove; + } + // return new index + return layer0.size() - 1; + } + size() + { + return this.layer0 ? this.layer0.length : 0; + } + + height() + { + return this.layer0.length > 0 ? this.upperNodes.length + 1 : 0; + } + + getNode(Height, Index) + { + let layers = this.height(); + if (Height < layers) + { + if (Height) + { + if (Index < this.upperNodes[Height - 1].size()) + { + return this.upperNodes[Height - 1][Index]; + } + } + else + { + if (Index < this.layer0.length) + { + return this.layer0[Index]; + } + } + } + return null; + } + +} + +export class CMMRBranch { + CMerkleBranchBase?: number; + nIndex?: number; + nSize?: number; + branch?: Array; + + constructor(CMerkleBranchBase: number, nIndex: number, nSize: number, branch: Array) { + this.CMerkleBranchBase = CMerkleBranchBase; + this.nIndex = nIndex; + this.nSize = nSize; + this.branch = branch; + } + + + digest(input) { + var out = Buffer.allocUnsafe(32); + return blake2b(out.length, null, null, Buffer.from("VerusDefaultHash")).update(input).digest(out); + } + + safeCheck(hash: Buffer) { + + let index = GetMMRProofIndex(this.nIndex, this.nSize, 0); + + let joined = Buffer.allocUnsafe(64); + let hashInProgress = hash; + + for (let i = 0; i < this.branch.length; i++) { + + if (index.and(new BN(1)).gt(new BN(0))) { + if (this.branch[i] === hashInProgress) throw new Error("Value can be equal to node but never on the right"); + //join the two arrays and pass to blake2b + joined = Buffer.concat([this.branch[i], hashInProgress]); + + } else { + joined = Buffer.concat([hashInProgress, this.branch[i]]); + } + hashInProgress = this.digest(joined); + + index = index.shrn(1); + } + + return hashInProgress; + } +} + +export class AttestaionProof extends VDXFObject { + + components?: Array; + attestationProof?: Array; + + constructor(vdxfkey: string = "", data?: { + components?: Map; + signatures?: {[attestor: string]: {signature: string, system: string}}; + mmr?: MMR; + }) { + super(vdxfkey); + + if (data) { + this.components = data.components || null; + this.signatures = data.signatures || null; + this.mmr = data.mmr || null; + } + + } + + + +} + + +export class MMR { + lock: any; + _leafLength: number; + db: any; + + constructor(db = new MemoryBasedDb()) { + this.db = db + this.lock = new Lock(1) + + } + + digest(input) { + var out = Buffer.allocUnsafe(32); + return blake2b(out.length, null, null, Buffer.from("VerusDefaultHash")).update(Buffer.concat([...input])).digest(out); + } + + async get(leafIndex) { + let leafValue + await this.lock.acquire() + try { + let leafLength = await this.getLeafLength() + if (leafIndex >= leafLength) { throw new Error('Leaf not in tree') } + let leafPosition = MMR.getNodePosition(leafIndex) + let localPeakPosition = MMR.localPeakPosition(leafIndex, leafLength) + let localPeakValue = await this._getNodeValue(localPeakPosition) + leafValue = await this._verifyPath(localPeakPosition, localPeakValue, leafPosition) + } finally { + this.lock.release() + } + return leafValue + } + + async _get(nodePosition) { + let nodeValue + await this.lock.acquire() + try { + let nodeLength = await this.getNodeLength() + let leafLength = await this.getLeafLength() + if (nodePosition.i >= nodeLength) { throw new Error('Node not in tree') } + let peakPositions = MMR.peakPositions(leafLength - 1) + let localPeakPosition + for (let i = 0; i < peakPositions.length; i++) { + if (peakPositions[i].i >= nodePosition.i) { + localPeakPosition = peakPositions[i] + break + } + } + let localPeakValue = await this._getNodeValue(localPeakPosition) + nodeValue = await this._verifyPath(localPeakPosition, localPeakValue, nodePosition) + } finally { + this.lock.release() + } + return nodeValue + } + + async append(value, leafIndex) { + await this.lock.acquire() + try { + let leafLength = await this.getLeafLength() + if (leafIndex == undefined || leafIndex == leafLength) { + let nodePosition = MMR.getNodePosition(leafLength) + let mountainPositions = MMR.mountainPositions(MMR.localPeakPosition(leafLength, leafLength), nodePosition.i) + await this.db.set(value, nodePosition.i) + await this._hashUp(mountainPositions) + await this._setLeafLength(leafLength + 1) + } else { + throw new Error('Can only append to end of MMR (leaf ' + leafLength + '). Index ' + leafIndex + ' given.') + } + } finally { + this.lock.release() + } + } + async appendMany(values, startLeafIndex) { + if (startLeafIndex == undefined) { + startLeafIndex = await this.getLeafLength() + } + for (let i = 0; i < values.length; i++) { + await this.append(values[i], startLeafIndex + i) + } + } + async getRoot(leafIndex?: number) { + let peakValues = [] + await this.lock.acquire() + try { + if (!leafIndex) { + leafIndex = await this.getLeafLength() - 1 + } + let peakPositions = MMR.peakPositions(leafIndex) + for (let i = 0; i < peakPositions.length; i++) { + peakValues.push(await this._getNodeValue(peakPositions[i])) + } + } finally { + this.lock.release() + } + // note: a single peak differs from its MMR root in that it gets hashed a second time + return this.digest([...peakValues]) + } + async getNodeLength() { return MMR.getNodePosition(await this.getLeafLength()).i } + async getLeafLength() { // caching + if (this._leafLength == undefined) { // dirty length + this._leafLength = await this.db.getLeafLength() + } + return this._leafLength + } + async delete(leafIndex) { // logically deletes everything after (and including) leafIndex + await this.lock.acquire() + try { + let leafLength = await this.getLeafLength() + if (leafIndex < leafLength) { + await this._setLeafLength(leafIndex) + } + } finally { + this.lock.release() + } + } + async getProof(leafIndexes, referenceTreeLength) { // returns a sparse MMR containing the leaves specified + let proofMmr + await this.lock.acquire() + try { + referenceTreeLength = referenceTreeLength || await this.getLeafLength() + + let positions = MMR.proofPositions(leafIndexes, referenceTreeLength) + let nodes = {} + + let nodeIndexes = Object.keys(positions) + await Promise.all(nodeIndexes.map(async (i) => { + let nodeValue = await this._getNodeValue(positions[i]) + nodes[i] = nodeValue + })) + proofMmr = new MMR(new MemoryBasedDb(referenceTreeLength, nodes)) + + } finally { + this.lock.release() + return proofMmr + } + } + + async _getNodeValue(position) { + // caller's responsibility to request a position within leafLength + let nodeValue = await this.db.get(position.i) + if (nodeValue) { + return nodeValue + } else if (position.h > 0) { // implied node + let leftChildValue = await this._getNodeValue(MMR.leftChildPosition(position)) + let rightChildValue = await this._getNodeValue(MMR.rightChildPosition(position)) + return this.digest([leftChildValue, rightChildValue]) + } else { + throw new Error('Missing node in db') + } + } + async _verifyPath(currentPosition, currentValue, destinationPosition) { // verifies as it walks + if (currentPosition.i == destinationPosition.i) { // base case + return currentValue + } else { + let leftChildPosition = MMR.leftChildPosition(currentPosition) + let rightChildPosition = MMR.rightChildPosition(currentPosition) + let leftValue = await this._getNodeValue(leftChildPosition) + let rightValue = await this._getNodeValue(rightChildPosition) + if (!currentValue.equals(this.digest([leftValue, rightValue]))) { + throw new Error('Hash mismatch of node #' + currentPosition.i + ' and its children') + } + if (destinationPosition.i > currentPosition.i - 2 ** currentPosition.h - currentPosition.h + 1) { //umm yeah, check this line + return this._verifyPath(rightChildPosition, rightValue, destinationPosition) + } else { + return this._verifyPath(leftChildPosition, leftValue, destinationPosition) + } + } + } + async _setLeafLength(leafLength) { + await this.db.setLeafLength(leafLength) + this._leafLength = leafLength + } + async _hashUp(positionPairs) { + for (let i = positionPairs.length - 1; i >= 0; i--) { + let leftValue = await this._getNodeValue(positionPairs[i][0]) + let rightValue = await this._getNodeValue(positionPairs[i][1]) + let writeIndex = MMR.parentIndex(positionPairs[i][0]) + await this.db.set(this.digest([leftValue, rightValue]), writeIndex) + } + } + + + static leftChildPosition(position) { + if (position.h <= 0) { throw new Error('Height 0 does not have child') } + return new Position(position.i - 2 ** position.h, position.h - 1, false) + } + static rightChildPosition(position) { + if (position.h <= 0) { throw new Error('Height 0 does not have child') } + return new Position(position.i - 1, position.h - 1, true) + } + static siblingPosition(position) { + let multiplier = position.r ? -1 : 1 + return new Position(position.i + multiplier * (2 ** (position.h + 1) - 1), position.h, !position.r) + } + static parentIndex(position) { + if (position.r) { + return position.i + 1 + } else { + return position.i + 2 ** (position.h + 1) + } + } + static peakPositions(leafIndex) { + let currentPosition = this.godPeakFromLeafIndex(leafIndex) + let peakPositions = [] + while (leafIndex >= 0) { + currentPosition = this.leftChildPosition(currentPosition) + if (leafIndex >= 2 ** currentPosition.h - 1) { + peakPositions.push(currentPosition) + currentPosition = this.siblingPosition(currentPosition) + leafIndex -= 2 ** currentPosition.h // leafIndex becomes a kindof accumulator + } + } + return peakPositions + } + static localPeakPosition(leafIndex, leafLength) { + let lastLeafIndex = leafLength <= leafIndex ? leafIndex : leafLength - 1 + return MMR._localPeakPosition(leafIndex, MMR.peakPositions(lastLeafIndex)) + } + static _localPeakPosition(leafIndex, peakPositions) { + for (let i = 0; i < peakPositions.length; i++) { + let currentRange = 2 ** (peakPositions[i].h) + if (leafIndex < currentRange) { + return peakPositions[i] + } else { + leafIndex -= currentRange + } + } + } + static mountainPositions(currentPosition, targetNodeIndex) { // positions to hash after appending + let mountainPositions = [] + while (currentPosition.h > 0) { + let children = [this.leftChildPosition(currentPosition), this.rightChildPosition(currentPosition)] + mountainPositions.push(children) + if (targetNodeIndex > currentPosition.i - 2 ** currentPosition.h - currentPosition.h + 1) { + currentPosition = children[1] + } else { + currentPosition = children[0] + } + } + return mountainPositions + } + static godPeakFromLeafIndex(leafIndex) { // imaginary peak that is above all nodes + let peakHeight = 0 + while (2 ** peakHeight <= leafIndex + 1) { peakHeight++ } + return new Position(2 ** (peakHeight + 1) - 2, peakHeight, false) + } + static getNodePosition(leafIndex) { + let currentPosition = this.godPeakFromLeafIndex(leafIndex) + let accumulator = 0 + while (currentPosition.h > 0) { + let serviceRange = 2 ** (currentPosition.h - 1) + if (leafIndex >= accumulator + serviceRange) { + currentPosition = this.rightChildPosition(currentPosition) + accumulator += serviceRange + } else { + currentPosition = this.leftChildPosition(currentPosition) + } + } + return currentPosition + } + static proofPositions(leafIndexes, referenceTreeLength) { + let positions = {} + let finalPeakPositions = MMR.peakPositions(referenceTreeLength - 1) + // add peak positions + for (let i = 0; i < finalPeakPositions.length; i++) { // log(n)/2 + positions[finalPeakPositions[i].i] = finalPeakPositions[i] + } + //add local mountain proof positions for each leaf + for (let i = 0; i < leafIndexes.length; i++) { // k*2log(n) + let nodePosition = MMR.getNodePosition(leafIndexes[i]) + let finalLocalPeak = MMR._localPeakPosition(leafIndexes[i], finalPeakPositions) + // positions[finalLocalPeak.i] = finalLocalPeak // ?? should already have all peaks + let mountainPositions = MMR.mountainPositions(finalLocalPeak, nodePosition.i) + for (let j = 0; j < mountainPositions.length; j++) { + positions[mountainPositions[j][0].i] = mountainPositions[j][0] + positions[mountainPositions[j][1].i] = mountainPositions[j][1] + } + } + // find implied positions (ones which can be calculated based on child positions that are present) + let positionIndexes = Object.keys(positions) + let impliedIndexes = [] + for (let j = 0; j < positionIndexes.length; j++) { // k*log(n) + if (positions[positionIndexes[j]].h > 0) { + let hasLeftChild = MMR._hasPosition(positions, MMR.leftChildPosition(positions[positionIndexes[j]])) + let hasRightChild = MMR._hasPosition(positions, MMR.rightChildPosition(positions[positionIndexes[j]])) + if (hasLeftChild && hasRightChild) { + impliedIndexes.push(positionIndexes[j]) // don't remove them yet because recursion will be slower + } + } + } + // finally remove implied nodes + for (var i = 0; i < impliedIndexes.length; i++) { // k*log(n) + impliedIndexes[i] + delete positions[impliedIndexes[i]] + } + return positions + } + static _hasPosition(nodes, position) { + let has = !!nodes[position.i] + if (!has && position.h > 0) { + if (MMR._hasPosition(nodes, MMR.leftChildPosition(position)) + && MMR._hasPosition(nodes, MMR.rightChildPosition(position)) + ) { + has = true + } + } + return has + } +} + +export class MemoryBasedDb { + + leafLength: any; + nodes: { [number: number]: Buffer }; + constructor(...args) { + if (args[0] == undefined || typeof args[0] == 'number') { + this.leafLength = args[0] || 0 + this.nodes = args[1] || {} + + } + } + async get(index) { + return this.nodes[index] + } + async set(value, index) { + this.nodes[index] = value + } + async getLeafLength() { + return this.leafLength + } + async setLeafLength(leafLength) { + return this.leafLength = leafLength + } + async getNodes() { + return this.nodes + } +} + +const GetMMRProofIndex = (pos: number, mmvSize: number, extraHashes: number): InstanceType => { + let index = new BN(0); + let layerSizes = []; + let merkleSizes = []; + let peakIndexes = []; + let bitPos = 0; + + //start at the beginning + //create a simulation of a mmr based on size + if (!(pos > 0 && pos < mmvSize)) return new BN(0); + + //create an array of all the sizes + while (mmvSize) { + layerSizes.push(mmvSize); + mmvSize = mmvSize >> 1 + } + + for (let height = 0; height < layerSizes.length; height++) { + if (height == layerSizes.length - 1 || layerSizes[height] & 1) { + peakIndexes.push(height); + } + } + + //array flip peak indexes + peakIndexes.reverse(); + + let layerNum = 0; + let layerSize = peakIndexes.length; + + for (let passThrough = (layerSize & 1); layerNum == 0 || layerSize > 1; passThrough = (layerSize & 1), layerNum++) { + layerSize = (layerSize >> 1) + passThrough; + if (layerSize) { + merkleSizes.push(layerSize); + } + } + //flip the merklesizes + + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } + + let p = pos; + for (let l = 0; l < layerSizes.length; l++) { + if (p & 1) { + index = index.or(new BN(1).shln(bitPos++)); + + p >>= 1; + + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } + + } else { + if (layerSizes[l] > (p + 1)) { + + bitPos++; + p >>= 1; + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } + } else { + + for (p = 0; p < peakIndexes.length; p++) { + + if (peakIndexes[p] == l) { + break; + } + } + + for (let layerNum = -1, layerSize = peakIndexes.length; layerNum == -1 || layerSize > 1; layerSize = merkleSizes[++layerNum]) { + + if (p < (layerSize - 1) || (p & 1)) { + + + if (p & 1) { + // hash with the one before us + index = index.or(new BN(1).shln(bitPos++)); + + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } + } else { + // hash with the one in front of us + bitPos++; + + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } + } + } + p >>= 1; + } + + break; + } + + } + } + return index; +} diff --git a/src/vdxf/classes/MMR.ts b/src/vdxf/classes/MMR.ts index 807a7e0..f525e95 100644 --- a/src/vdxf/classes/MMR.ts +++ b/src/vdxf/classes/MMR.ts @@ -10,7 +10,9 @@ var blake2b = require('blake2b') const { Lock } = require('semaphore-async-await') - +import { BN } from 'bn.js'; +import { AttestationData } from './Attestation'; +import { VDXFObject } from "../"; class Position { i: any h: any @@ -22,6 +24,141 @@ class Position { } } +export class VerusMMR { + lock: any; + layer0: Array; + vSize: number; + upperNodes: Array; + _leafLength: number; + db: any; + + constructor(db = new MemoryBasedDb()) { + this.db = db + this.lock = new Lock(1) + + } + + digest(input) { + var out = Buffer.allocUnsafe(32); + return blake2b(out.length, null, null, Buffer.from("VerusDefaultHash")).update(input).digest(out); + } + + getbyteLength(): number { + return 1; + } + + toBuffer(): Buffer { + return Buffer.from([]); + } + + add() { + + } + size() + { + return this.layer0 ? this.layer0.length : 0; + } + + height() + { + return this.layer0.length > 0 ? this.upperNodes.length + 1 : 0; + } + + getNode(Height, Index) + { + let layers = this.height(); + if (Height < layers) + { + if (Height) + { + if (Index < this.upperNodes[Height - 1].size()) + { + return this.upperNodes[Height - 1][Index]; + } + } + else + { + if (Index < this.layer0.length) + { + return this.layer0[Index]; + } + } + } + return null; + } + +} + +export class CMMRBranch { + CMerkleBranchBase?: number; + nIndex?: number; + nSize?: number; + branch?: Array; + + constructor(CMerkleBranchBase: number, nIndex: number, nSize: number, branch: Array) { + this.CMerkleBranchBase = CMerkleBranchBase; + this.nIndex = nIndex; + this.nSize = nSize; + this.branch = branch; + } + + + digest(input) { + var out = Buffer.allocUnsafe(32); + return blake2b(out.length, null, null, Buffer.from("VerusDefaultHash")).update(input).digest(out); + } + + safeCheck(hash: Buffer) { + + let index = GetMMRProofIndex(this.nIndex, this.nSize, 0); + + let joined = Buffer.allocUnsafe(64); + let hashInProgress = hash; + + for (let i = 0; i < this.branch.length; i++) { + + if (index.and(new BN(1)).gt(new BN(0))) { + if (this.branch[i] === hashInProgress) throw new Error("Value can be equal to node but never on the right"); + //join the two arrays and pass to blake2b + joined = Buffer.concat([this.branch[i], hashInProgress]); + + } else { + joined = Buffer.concat([hashInProgress, this.branch[i]]); + } + hashInProgress = this.digest(joined); + + index = index.shrn(1); + } + + return hashInProgress; + } +} + +export class AttestaionProof extends VDXFObject { + + components?: Array; + attestationProof?: Array; + + constructor(vdxfkey: string = "", data?: { + components?: Map; + signatures?: {[attestor: string]: {signature: string, system: string}}; + mmr?: MMR; + }) { + super(vdxfkey); + + if (data) { + this.components = data.components || null; + this.signatures = data.signatures || null; + this.mmr = data.mmr || null; + } + + } + + + +} + + export class MMR { lock: any; _leafLength: number; @@ -359,3 +496,104 @@ export class MemoryBasedDb { return this.nodes } } + +const GetMMRProofIndex = (pos: number, mmvSize: number, extraHashes: number): InstanceType => { + let index = new BN(0); + let layerSizes = []; + let merkleSizes = []; + let peakIndexes = []; + let bitPos = 0; + + //start at the beginning + //create a simulation of a mmr based on size + if (!(pos > 0 && pos < mmvSize)) return new BN(0); + + //create an array of all the sizes + while (mmvSize) { + layerSizes.push(mmvSize); + mmvSize = mmvSize >> 1 + } + + for (let height = 0; height < layerSizes.length; height++) { + if (height == layerSizes.length - 1 || layerSizes[height] & 1) { + peakIndexes.push(height); + } + } + + //array flip peak indexes + peakIndexes.reverse(); + + let layerNum = 0; + let layerSize = peakIndexes.length; + + for (let passThrough = (layerSize & 1); layerNum == 0 || layerSize > 1; passThrough = (layerSize & 1), layerNum++) { + layerSize = (layerSize >> 1) + passThrough; + if (layerSize) { + merkleSizes.push(layerSize); + } + } + //flip the merklesizes + + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } + + let p = pos; + for (let l = 0; l < layerSizes.length; l++) { + if (p & 1) { + index = index.or(new BN(1).shln(bitPos++)); + + p >>= 1; + + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } + + } else { + if (layerSizes[l] > (p + 1)) { + + bitPos++; + p >>= 1; + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } + } else { + + for (p = 0; p < peakIndexes.length; p++) { + + if (peakIndexes[p] == l) { + break; + } + } + + for (let layerNum = -1, layerSize = peakIndexes.length; layerNum == -1 || layerSize > 1; layerSize = merkleSizes[++layerNum]) { + + if (p < (layerSize - 1) || (p & 1)) { + + + if (p & 1) { + // hash with the one before us + index = index.or(new BN(1).shln(bitPos++)); + + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } + } else { + // hash with the one in front of us + bitPos++; + + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } + } + } + p >>= 1; + } + + break; + } + + } + } + return index; +} From 6eacc670aa8fc78418f0a08bfe45942ff53bcef9 Mon Sep 17 00:00:00 2001 From: Chris Staines Date: Wed, 17 Jan 2024 21:20:03 +0000 Subject: [PATCH 055/120] updates to mmr class --- src/vdxf/classes/MMR copy.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/vdxf/classes/MMR copy.ts b/src/vdxf/classes/MMR copy.ts index 2041f46..5d7d1f0 100644 --- a/src/vdxf/classes/MMR copy.ts +++ b/src/vdxf/classes/MMR copy.ts @@ -231,25 +231,25 @@ export class VerusMMR { // printf("adding2: upperNodes.size(): %lu, upperNodes[%d].size(): %lu\n", upperNodes.size(), height, height && upperNodes.size() ? upperNodes[height-1].size() : 0); } - uint32_t curSizeAbove = upperNodes[height].size(); + let curSizeAbove = this.upperNodes[height].size(); // if we need to add an element to the vector above us, do it // printf("layerSize: %u, newSizeAbove: %u, curSizeAbove: %u\n", layerSize, newSizeAbove, curSizeAbove); if (!(layerSize & 1) && newSizeAbove > curSizeAbove) { - uint32_t idx = layerSize - 2; - if (height) + let idx = layerSize - 2; + if (height > 0) { // printf("upperNodes.size(): %lu, upperNodes[%d].size(): %lu, upperNodes[%d].size(): %lu\n", upperNodes.size(), height, upperNodes[height].size(), height - 1, upperNodes[height - 1].size()); // upperNodes[height - 1].Printout(); // upperNodes[height].Printout(); // printf("upperNodes[%d].size(): %lu, nodep hash: %s\n", height - 1, upperNodes[height - 1].size(), upperNodes[height - 1][idx].hash.GetHex().c_str()); // printf("nodep + 1 hash: %p\n", upperNodes[height - 1][idx + 1].hash.GetHex().c_str()); - upperNodes[height].push_back(upperNodes[height - 1][idx].CreateParentNode(upperNodes[height - 1][idx + 1])); + this.upperNodes[height].push_back(this.upperNodes[height - 1][idx].CreateParentNode(this.upperNodes[height - 1][idx + 1])); } else { - upperNodes[height].push_back(layer0[idx].CreateParentNode(layer0[idx + 1])); + this.upperNodes[height].push_back(this.layer0[idx].CreateParentNode(this.layer0[idx + 1])); // printf("upperNodes.size(): %lu, upperNodes[%d].size(): %lu\n", upperNodes.size(), height, upperNodes[height].size()); // upperNodes[height].Printout(); } @@ -257,16 +257,16 @@ export class VerusMMR { layerSize = newSizeAbove; } // return new index - return layer0.size() - 1; + return this.layer0.size() - 1; } size() { - return this.layer0 ? this.layer0.length : 0; + return this.size(); } height() { - return this.layer0.length > 0 ? this.upperNodes.length + 1 : 0; + return this.layer0.size() > 0 ? this.upperNodes.length + 1 : 0; } getNode(Height, Index) @@ -283,7 +283,7 @@ export class VerusMMR { } else { - if (Index < this.layer0.length) + if (Index < this.layer0.size()) { return this.layer0[Index]; } From ffea9ce9d0e53fa4a8b4c70f2cc8aeb69856a46f Mon Sep 17 00:00:00 2001 From: Chris Staines Date: Fri, 19 Jan 2024 11:43:39 +0000 Subject: [PATCH 056/120] WIP2 --- src/vdxf/classes/MMR copy.ts | 837 ++++++++++++++++++++++++----------- 1 file changed, 587 insertions(+), 250 deletions(-) diff --git a/src/vdxf/classes/MMR copy.ts b/src/vdxf/classes/MMR copy.ts index 5d7d1f0..9b3dff1 100644 --- a/src/vdxf/classes/MMR copy.ts +++ b/src/vdxf/classes/MMR copy.ts @@ -17,168 +17,144 @@ import { VDXFObject } from "../"; class CChunkedLayer { -private CHUNK_SHIFT: number; -private vSize: number; -private nodes: Array>; + private CHUNK_SHIFT: number; + private vSize: number; + private nodes: Array>; - constructor() { this.nodes = []; this.vSize = 0; this.CHUNK_SHIFT = 2; } + constructor() { this.nodes = []; this.vSize = 0; this.CHUNK_SHIFT = 2; } - chunkSize(): number - { - return 1 << this.CHUNK_SHIFT; - } + chunkSize(): number { + return 1 << this.CHUNK_SHIFT; + } - chunkMask(): number - { - return this.chunkSize() - 1; - } + chunkMask(): number { + return this.chunkSize() - 1; + } - size(): number - { - return this.vSize; - } + size(): number { + return this.vSize; + } - getIndex(idx: number): NODE_TYPE - { - if (idx < this.vSize) - { - return this.nodes[idx >> this.CHUNK_SHIFT][idx & this.chunkMask()]; - } - else - { - throw new Error("CChunkedLayer [] index out of range"); - } + getIndex(idx: number): NODE_TYPE { + if (idx < this.vSize) { + return this.nodes[idx >> this.CHUNK_SHIFT][idx & this.chunkMask()]; } + else { + throw new Error("CChunkedLayer [] index out of range"); + } + } - push_back(node:NODE_TYPE) - { - this.vSize++; + push_back(node: NODE_TYPE) { + this.vSize++; - // if we wrapped around and need more space, we need to allocate a new chunk - // printf("vSize: %lx, chunkMask: %lx\n", vSize, chunkMask()); + // if we wrapped around and need more space, we need to allocate a new chunk + // printf("vSize: %lx, chunkMask: %lx\n", vSize, chunkMask()); - if ((this.vSize & this.chunkMask()) == 1) - { - this.nodes.push(Array()); - // this.nodes[this.nodes.length - 1].reserve(chunkSize()); - // TypeScript, arrays are dynamic and don't have a reserve method or an equivalent. - } - this.nodes[this.nodes.length - 1].push(node); - // printf("nodes.size(): %lu\n", nodes.size()); + if ((this.vSize & this.chunkMask()) == 1) { + this.nodes.push(Array()); + // this.nodes[this.nodes.length - 1].reserve(chunkSize()); + // TypeScript, arrays are dynamic and don't have a reserve method or an equivalent. } + this.nodes[this.nodes.length - 1].push(node); + // printf("nodes.size(): %lu\n", nodes.size()); + } - clear() - { - this.nodes = []; - this.vSize = 0; - } + clear() { + this.nodes = []; + this.vSize = 0; + } - resize(newSize: number) - { - if (newSize == 0) - { - this.clear(); + resize(newSize: number) { + if (newSize == 0) { + this.clear(); + } + else { + let chunksSize = ((newSize - 1) >> this.CHUNK_SHIFT) + 1; + this.nodes.length = chunksSize; + for (let i = this.size() ? ((this.size() - 1) >> this.CHUNK_SHIFT) + 1 : 1; i <= chunksSize; i++) { + if (i < chunksSize) { + this.nodes[this.nodes.length - 1].length = this.chunkSize(); } - else - { - let chunksSize = ((newSize - 1) >> this.CHUNK_SHIFT) + 1; - this.nodes.length = chunksSize; - for (let i = this.size() ? ((this.size() - 1) >> this.CHUNK_SHIFT) + 1 : 1; i <= chunksSize; i++) - { - if (i < chunksSize) - { - this.nodes[this.nodes.length - 1].length = this.chunkSize(); - } - else - { - // this.nodes[this.nodes.length - 1].reserve(chunkSize()); - this.nodes[this.nodes.length - 1].length = (((newSize - 1) & this.chunkMask()) + 1); - } - } - - this.vSize = ((this.nodes.length - 1) << this.CHUNK_SHIFT) + ((newSize - 1) & this.chunkMask()) + 1; + else { + // this.nodes[this.nodes.length - 1].reserve(chunkSize()); + this.nodes[this.nodes.length - 1].length = (((newSize - 1) & this.chunkMask()) + 1); } + } + + this.vSize = ((this.nodes.length - 1) << this.CHUNK_SHIFT) + ((newSize - 1) & this.chunkMask()) + 1; } + } }; //template class COverlayNodeLayer { - + private nodeSource: UNDERLYING; private vSize: number; - constructor(NodeSource:UNDERLYING) { + constructor(NodeSource: UNDERLYING) { this.nodeSource = NodeSource; - this.vSize = 0; + this.vSize = 0; } - size(): number - { - return this.vSize; - } + size(): number { + return this.vSize; + } - getIndex(idx: number): NODE_TYPE - { - if (idx < this.vSize) - { - let retval: NODE_TYPE; - return retval; - } - else - { - throw new Error("COverlayNodeLayer [] index out of range"); + getIndex(idx: number): NODE_TYPE { + if (idx < this.vSize) { + let retval: NODE_TYPE; + return retval; + } + else { + throw new Error("COverlayNodeLayer [] index out of range"); - } } + } - // node type must be moveable just to be passed here, but the default overlay has no control over the underlying storage - // and only tracks size changes - push_back(node: NODE_TYPE) { this.vSize++; } - clear() { this.vSize = 0; } - resize(newSize: number) { this.vSize = newSize; } + // node type must be moveable just to be passed here, but the default overlay has no control over the underlying storage + // and only tracks size changes + push_back(node: NODE_TYPE) { this.vSize++; } + clear() { this.vSize = 0; } + resize(newSize: number) { this.vSize = newSize; } }; -export class CMMRNode -{ - hash: Buffer; +export class CMMRNode { + hash: Buffer; - constructor(Hash?: Buffer) { - if(Hash) { - this.hash = Hash; - } + constructor(Hash?: Buffer) { + if (Hash) { + this.hash = Hash; } + } - digest(input) { - var out = Buffer.allocUnsafe(32); - return blake2b(out.length, null, null, Buffer.from("VerusDefaultHash")).update(input).digest(out); - } + digest(input) { + var out = Buffer.allocUnsafe(32); + return blake2b(out.length, null, null, Buffer.from("VerusDefaultHash")).update(input).digest(out); + } - HashObj(obj: Buffer, onbjR?: Buffer): Buffer - { - if (!onbjR) return this.digest(obj); - else return this.digest(Buffer.concat([obj, onbjR])); - } + HashObj(obj: Buffer, onbjR?: Buffer): Buffer { + if (!onbjR) return this.digest(obj); + else return this.digest(Buffer.concat([obj, onbjR])); + } - // add a right to this left and create a parent node - CreateParentNode(nRight: CMMRNode): CMMRNode - { - return this.digest(Buffer.concat([this.hash, nRight.hash])); - } + // add a right to this left and create a parent node + CreateParentNode(nRight: CMMRNode): CMMRNode { + return this.digest(Buffer.concat([this.hash, nRight.hash])); + } - GetProofHash(opposite: CMMRNode): Array - { - return [this.hash]; - } + GetProofHash(opposite: CMMRNode): Array { + return [this.hash]; + } - // leaf nodes that track additional data, such as block power, may need a hash added to the path - // at the very beginning - GetLeafHash() { return {}; } + // leaf nodes that track additional data, such as block power, may need a hash added to the path + // at the very beginning + GetLeafHash(): Array { return []; } - GetExtraHashCount() - { - // how many extra proof hashes per layer are added with this node - return 0; - } + GetExtraHashCount() { + // how many extra proof hashes per layer are added with this node + return 0; + } }; function loggingIdentity(arg: Type[]): Type[] { @@ -187,17 +163,15 @@ function loggingIdentity(arg: Type[]): Type[] { } //template , typename LAYER0_TYPE=LAYER_TYPE> -export class VerusMMR { - lock: any; +export class CMerkleMountainRange { layer0: CChunkedLayer; vSize: number; upperNodes: Array>; _leafLength: number; - db: any; - constructor(db = new MemoryBasedDb()) { - this.db = db - this.lock = new Lock(1) + + constructor() { + } @@ -214,82 +188,68 @@ export class VerusMMR { return Buffer.from([]); } - add(leaf: CMMRNode): number - { - this.layer0.push_back(leaf); - - let height = 0; - let layerSize: number; - for (layerSize = this.layer0.size(); height <= this.upperNodes.length && layerSize > 1; height++) - { - let newSizeAbove = layerSize >> 1; + add(leaf: CMMRNode): number { + this.layer0.push_back(leaf); - // expand vector of vectors if we are adding a new layer - if (height == this.upperNodes.length) - { - this.upperNodes.length = (this.upperNodes.length + 1); - // printf("adding2: upperNodes.size(): %lu, upperNodes[%d].size(): %lu\n", upperNodes.size(), height, height && upperNodes.size() ? upperNodes[height-1].size() : 0); - } + let height = 0; + let layerSize: number; + for (layerSize = this.layer0.size(); height <= this.upperNodes.length && layerSize > 1; height++) { + let newSizeAbove = layerSize >> 1; - let curSizeAbove = this.upperNodes[height].size(); + // expand vector of vectors if we are adding a new layer + if (height == this.upperNodes.length) { + this.upperNodes.length = (this.upperNodes.length + 1); + // printf("adding2: upperNodes.size(): %lu, upperNodes[%d].size(): %lu\n", upperNodes.size(), height, height && upperNodes.size() ? upperNodes[height-1].size() : 0); + } - // if we need to add an element to the vector above us, do it - // printf("layerSize: %u, newSizeAbove: %u, curSizeAbove: %u\n", layerSize, newSizeAbove, curSizeAbove); - if (!(layerSize & 1) && newSizeAbove > curSizeAbove) - { - let idx = layerSize - 2; - if (height > 0) - { - // printf("upperNodes.size(): %lu, upperNodes[%d].size(): %lu, upperNodes[%d].size(): %lu\n", upperNodes.size(), height, upperNodes[height].size(), height - 1, upperNodes[height - 1].size()); - // upperNodes[height - 1].Printout(); - // upperNodes[height].Printout(); - // printf("upperNodes[%d].size(): %lu, nodep hash: %s\n", height - 1, upperNodes[height - 1].size(), upperNodes[height - 1][idx].hash.GetHex().c_str()); - // printf("nodep + 1 hash: %p\n", upperNodes[height - 1][idx + 1].hash.GetHex().c_str()); - this.upperNodes[height].push_back(this.upperNodes[height - 1][idx].CreateParentNode(this.upperNodes[height - 1][idx + 1])); - } - else - { - this.upperNodes[height].push_back(this.layer0[idx].CreateParentNode(this.layer0[idx + 1])); - // printf("upperNodes.size(): %lu, upperNodes[%d].size(): %lu\n", upperNodes.size(), height, upperNodes[height].size()); - // upperNodes[height].Printout(); - } - } - layerSize = newSizeAbove; + let curSizeAbove = this.upperNodes[height].size(); + + // if we need to add an element to the vector above us, do it + // printf("layerSize: %u, newSizeAbove: %u, curSizeAbove: %u\n", layerSize, newSizeAbove, curSizeAbove); + if (!(layerSize & 1) && newSizeAbove > curSizeAbove) { + let idx = layerSize - 2; + if (height > 0) { + // printf("upperNodes.size(): %lu, upperNodes[%d].size(): %lu, upperNodes[%d].size(): %lu\n", upperNodes.size(), height, upperNodes[height].size(), height - 1, upperNodes[height - 1].size()); + // upperNodes[height - 1].Printout(); + // upperNodes[height].Printout(); + // printf("upperNodes[%d].size(): %lu, nodep hash: %s\n", height - 1, upperNodes[height - 1].size(), upperNodes[height - 1][idx].hash.GetHex().c_str()); + // printf("nodep + 1 hash: %p\n", upperNodes[height - 1][idx + 1].hash.GetHex().c_str()); + this.upperNodes[height].push_back(this.upperNodes[height - 1][idx].CreateParentNode(this.upperNodes[height - 1][idx + 1])); + } + else { + this.upperNodes[height].push_back(this.layer0[idx].CreateParentNode(this.layer0[idx + 1])); + // printf("upperNodes.size(): %lu, upperNodes[%d].size(): %lu\n", upperNodes.size(), height, upperNodes[height].size()); + // upperNodes[height].Printout(); + } } - // return new index - return this.layer0.size() - 1; + layerSize = newSizeAbove; + } + // return new index + return this.layer0.size() - 1; } - size() - { - return this.size(); + size() { + return this.size(); } - height() - { - return this.layer0.size() > 0 ? this.upperNodes.length + 1 : 0; + height() { + return this.layer0.size() > 0 ? this.upperNodes.length + 1 : 0; } - getNode(Height, Index) - { - let layers = this.height(); - if (Height < layers) - { - if (Height) - { - if (Index < this.upperNodes[Height - 1].size()) - { - return this.upperNodes[Height - 1][Index]; - } - } - else - { - if (Index < this.layer0.size()) - { - return this.layer0[Index]; - } - } + getNode(Height, Index) { + let layers = this.height(); + if (Height < layers) { + if (Height) { + if (Index < this.upperNodes[Height - 1].size()) { + return this.upperNodes[Height - 1][Index]; + } } - return null; + else { + if (Index < this.layer0.size()) { + return this.layer0[Index]; + } + } + } + return null; } } @@ -300,7 +260,7 @@ export class CMMRBranch { nSize?: number; branch?: Array; - constructor(CMerkleBranchBase: number, nIndex: number, nSize: number, branch: Array) { + constructor(CMerkleBranchBase?: number, nIndex?: number, nSize?: number, branch?: Array) { this.CMerkleBranchBase = CMerkleBranchBase; this.nIndex = nIndex; this.nSize = nSize; @@ -324,9 +284,7 @@ export class CMMRBranch { if (index.and(new BN(1)).gt(new BN(0))) { if (this.branch[i] === hashInProgress) throw new Error("Value can be equal to node but never on the right"); - //join the two arrays and pass to blake2b joined = Buffer.concat([this.branch[i], hashInProgress]); - } else { joined = Buffer.concat([hashInProgress, this.branch[i]]); } @@ -344,9 +302,9 @@ export class AttestaionProof extends VDXFObject { components?: Array; attestationProof?: Array; - constructor(vdxfkey: string = "", data?: { - components?: Map; - signatures?: {[attestor: string]: {signature: string, system: string}}; + constructor(vdxfkey: string = "", data?: { + components?: Map; + signatures?: { [attestor: string]: { signature: string, system: string } }; mmr?: MMR; }) { super(vdxfkey); @@ -356,13 +314,392 @@ export class AttestaionProof extends VDXFObject { this.signatures = data.signatures || null; this.mmr = data.mmr || null; } - + + } + + + +} + +//template , typename LAYER0_TYPE=LAYER_TYPE, typename HASHALGOWRITER=CBLAKE2bWriter> +class CMerkleMountainView { + mmr: CMerkleMountainRange; // the underlying mountain range, which provides the hash vectors + sizes: Array; // sizes that we will use as proxies for the size of each vector at each height + peaks: Array; // peaks + peakMerkle: Array>; // cached layers for the peak merkle if needed + + constructor(mountainRange: CMerkleMountainRange, viewSize?: number = 0) { + this.mmr = mountainRange; + let maxSize = mountainRange.size(); + if (viewSize > maxSize || viewSize == 0) { + viewSize = maxSize; + } + this.sizes.push(viewSize); + + for (viewSize >>= 1; viewSize; viewSize >>= 1) { + this.sizes.push(viewSize); + } + } + + + + // how many elements are stored in this view + size(): number + { + // zero if empty or the size of the zeroeth layer + return this.sizes.length == 0 ? 0 : this.sizes[0]; +} + +CalcPeaks(force = false) +{ + // if we don't yet have calculated peaks, calculate them + if (force || (this.peaks.length == 0 && this.size() != 0)) { + // reset the peak merkle tree, in case this is forced + this.peaks = new Array; + this.peakMerkle = new Array>; + for (let ht = 0; ht < this.sizes.length; ht++) + { + // if we're at the top or the layer above us is smaller than 1/2 the size of this layer, rounded up, we are a peak + if (ht == (this.sizes.length - 1) || this.sizes[ht + 1] < ((this.sizes[ht] + 1) >> 1)) { + this.peaks.splice(0, 0, this.mmr.getNode(ht, this.sizes[ht] - 1)); + } + } + } +} + +resize(newSize: number): number +{ + if (newSize != this.size()) { + + this.sizes = new Array; + this.peaks = new Array; + this.peakMerkle = new Array>; + + let maxSize = this.mmr.size(); + if (newSize > maxSize) { + newSize = maxSize; + } + this.sizes.push(newSize); + newSize >>= 1; + + while (newSize) { + this.sizes.push(newSize); + newSize >>= 1; + } + } + return this.size(); +} + + maxsize(): number + { + return this.mmr.size() - 1; + } + +GetPeaks(): Array +{ + this.CalcPeaks(); + return this.peaks; +} + +GetRoot(): Buffer +{ + let rootHash = Buffer.allocUnsafe(32); + + if (this.size() > 0 && this.peakMerkle.length == 0) { + // get peaks and hash to a root + this.CalcPeaks(); + + let layerNum: number = 0, layerSize = this.peaks.length; + // with an odd number of elements below, the edge passes through + for (let passThrough: boolean = !!(layerSize & 1); layerNum == 0 || layerSize > 1; passThrough = !!(layerSize & 1), layerNum++) + { + this.peakMerkle.push(Array()); + + let i; + let layerIndex = layerNum ? layerNum - 1 : 0; // layerNum is base 1 + + for (i = 0; i < (layerSize >> 1); i++) { + if (layerNum > 0) { + this.peakMerkle[this.peakMerkle.length - 1].push(this.peakMerkle[layerIndex][i << 1].CreateParentNode(this.peakMerkle[layerIndex][(i << 1) + 1])); + } + else { + this.peakMerkle[this.peakMerkle.length - 1].push(this.peaks[i << 1].CreateParentNode(this.peaks[(i << 1) + 1])); + } + } + if (passThrough) { + if (layerNum > 0) { + // pass the end of the prior layer through + this.peakMerkle[this.peakMerkle.length - 1].push(this.peakMerkle[layerIndex][this.peakMerkle[layerIndex].length - 1]); + } + else { + this.peakMerkle[this.peakMerkle.length].push(this.peaks[this.peaks.length - 1]); + } + } + // each entry in the next layer should be either combined two of the prior layer, or a duplicate of the prior layer's end + layerSize = this.peakMerkle[this.peakMerkle.length - 1].length; + } + rootHash = this.peakMerkle[this.peakMerkle.length - 1][0].hash; + } + else if (this.peakMerkle.length > 0) { + rootHash = this.peakMerkle[this.peakMerkle.length - 1][0].hash; + } + return rootHash; +} + +GetRootNode(): CMMRNode +{ + // ensure merkle tree is calculated + let root = this.GetRoot(); + if (root.length > 0) { + return this.peakMerkle[this.peakMerkle.length - 1][0]; + } + else { + return null; } +} + + // return hash of the element at "index" +GetHash(index: number): Buffer +{ + if (index < this.size()) { + return this.mmr.layer0[index].hash; + } + else { + return Buffer.allocUnsafe(32); + } +} +GetBranchType(): number +{ + let BRANCH_MMRBLAKE_NODE = 2 + return BRANCH_MMRBLAKE_NODE; +} + + // return a proof of the element at "pos" +GetProof(retProof: CMMRNode, pos: number): boolean +{ + // find a path from the indicated position to the root in the current view + let retBranch = new CMMRBranch(); + + if (pos < this.size()) { + // just make sure the peakMerkle tree is calculated + this.GetRoot(); + + // if we have leaf information, add it + let toAdd: Array = this.mmr.layer0[pos].GetLeafHash(); + if (toAdd.length > 0) { + retBranch.branch.splice(retBranch.branch.length, 0, toAdd[0]); + } + + let p = pos; + for (int l = 0; l < sizes.size(); l++) + { + if (p & 1) { + std:: vector < uint256 > proofHashes = mmr.GetNode(l, p - 1).GetProofHash(mmr.GetNode(l, p)); + retBranch.branch.insert(retBranch.branch.end(), proofHashes.begin(), proofHashes.end()); + p >>= 1; + } + else { + // make sure there is one after us to hash with or we are a peak and should be hashed with the rest of the peaks + if (sizes[l] > (p + 1)) { + std:: vector < uint256 > proofHashes = mmr.GetNode(l, p + 1).GetProofHash(mmr.GetNode(l, p)); + retBranch.branch.insert(retBranch.branch.end(), proofHashes.begin(), proofHashes.end()); + p >>= 1; + } + else { + /* for (auto &oneNode : peaks) + { + printf("peaknode: "); + for (auto oneHash : oneNode.GetProofHash(oneNode)) + { + printf("%s:", oneHash.GetHex().c_str()); + } + printf("\n"); + } */ + + // we are at a peak, the alternate peak to us, or the next thing we should be hashed with, if there is one, is next on our path + uint256 peakHash = mmr.GetNode(l, p).hash; + + // linear search to find out which peak we are in the base of the peakMerkle + for (p = 0; p < peaks.size(); p++) { + if (peaks[p].hash == peakHash) { + break; + } + } + // p is the position in the merkle tree of peaks + assert(p < peaks.size()); + + // move up to the top, which is always a peak of size 1 + uint32_t layerNum, layerSize; + for (layerNum = 0, layerSize = peaks.size(); layerNum == 0 || layerSize > 1; layerSize = peakMerkle[layerNum++].size()) { + uint32_t layerIndex = layerNum ? layerNum - 1 : 0; // layerNum is base 1 + + // we are an odd member on the end (even index) and will not hash with the next layer above, we will propagate to its end + if ((p < layerSize - 1) || (p & 1)) { + if (p & 1) { + // hash with the one before us + if (layerNum) { + std:: vector < uint256 > proofHashes = peakMerkle[layerIndex][p - 1].GetProofHash(peakMerkle[layerIndex][p]); + retBranch.branch.insert(retBranch.branch.end(), proofHashes.begin(), proofHashes.end()); + } + else { + std:: vector < uint256 > proofHashes = peaks[p - 1].GetProofHash(peaks[p]); + retBranch.branch.insert(retBranch.branch.end(), proofHashes.begin(), proofHashes.end()); + } + } + else { + // hash with the one in front of us + if (layerNum) { + std:: vector < uint256 > proofHashes = peakMerkle[layerIndex][p + 1].GetProofHash(peakMerkle[layerIndex][p]); + retBranch.branch.insert(retBranch.branch.end(), proofHashes.begin(), proofHashes.end()); + } + else { + std:: vector < uint256 > proofHashes = peaks[p + 1].GetProofHash(peaks[p]); + retBranch.branch.insert(retBranch.branch.end(), proofHashes.begin(), proofHashes.end()); + } + } + } + p >>= 1; + } + // finished + break; + } + } + } + retBranch.branchType = GetBranchType(NODE_TYPE()); + retBranch.nSize = size(); + retBranch.nIndex = pos; + retProof << retBranch; + return true; + } + return false; } + // return a vector of the bits, either 1 or 0 in each byte, to represent both the size + // of the proof by the size of the vector, and the expected bit in each position for the given + // position in a Merkle Mountain View of the specified size + static std:: vector < unsigned char > GetProofBits(uint64_t pos, uint64_t mmvSize) +{ + std:: vector < unsigned char > Bits; + std:: vector < uint64_t > Sizes; + std:: vector < unsigned char > PeakIndexes; + std:: vector < uint64_t > MerkleSizes; + + // printf("GetProofBits - pos: %lu, mmvSize: %lu\n", pos, mmvSize); + + // find a path from the indicated position to the root in the current view + if (pos > 0 && pos < mmvSize) { + int extrahashes = NODE_TYPE:: GetExtraHashCount(); + + Sizes.push_back(mmvSize); + mmvSize >>= 1; + + while (mmvSize) { + Sizes.push_back(mmvSize); + mmvSize >>= 1; + } + + for (uint32_t ht = 0; ht < Sizes.size(); ht++) + { + // if we're at the top or the layer above us is smaller than 1/2 the size of this layer, rounded up, we are a peak + if (ht == ((uint32_t)Sizes.size() - 1) || (Sizes[ht] & 1)) + { + PeakIndexes.insert(PeakIndexes.begin(), ht); + } + } + + // figure out the peak merkle + uint64_t layerNum = 0, layerSize = PeakIndexes.size(); + // with an odd number of elements below, the edge passes through + for (bool passThrough = (layerSize & 1); layerNum == 0 || layerSize > 1; passThrough = (layerSize & 1), layerNum++) + { + layerSize = (layerSize >> 1) + passThrough; + if (layerSize) { + MerkleSizes.push_back(layerSize); + } + } + + // add extra hashes for a node on the right + for (int i = 0; i < extrahashes; i++) + { + Bits.push_back(0); + } + + uint64_t p = pos; + for (int l = 0; l < Sizes.size(); l++) + { + // printf("GetProofBits - Bits.size: %lu\n", Bits.size()); + + if (p & 1) { + Bits.push_back(1); + p >>= 1; + + for (int i = 0; i < extrahashes; i++) + { + Bits.push_back(0); + } + } + else { + // make sure there is one after us to hash with or we are a peak and should be hashed with the rest of the peaks + if (Sizes[l] > (p + 1)) { + Bits.push_back(0); + p >>= 1; + + for (int i = 0; i < extrahashes; i++) + { + Bits.push_back(0); + } + } + else { + for (p = 0; p < PeakIndexes.size(); p++) { + if (PeakIndexes[p] == l) { + break; + } + } + + // p is the position in the merkle tree of peaks + assert(p < PeakIndexes.size()); + + // move up to the top, which is always a peak of size 1 + uint64_t layerNum; + uint64_t layerSize; + for (layerNum = -1, layerSize = PeakIndexes.size(); layerNum == -1 || layerSize > 1; layerSize = MerkleSizes[++layerNum]) { + // printf("GetProofBits - Bits.size: %lu\n", Bits.size()); + if (p < (layerSize - 1) || (p & 1)) { + if (p & 1) { + // hash with the one before us + Bits.push_back(1); + + for (int i = 0; i < extrahashes; i++) + { + Bits.push_back(0); + } + } + else { + // hash with the one in front of us + Bits.push_back(0); + + for (int i = 0; i < extrahashes; i++) + { + Bits.push_back(0); + } + } + } + p >>= 1; + } + // finished + break; + } + } + } + } + return Bits; +} +}; + + export class MMR { lock: any; @@ -715,14 +1052,14 @@ const GetMMRProofIndex = (pos: number, mmvSize: number, extraHashes: number): In //create an array of all the sizes while (mmvSize) { - layerSizes.push(mmvSize); - mmvSize = mmvSize >> 1 + layerSizes.push(mmvSize); + mmvSize = mmvSize >> 1 } for (let height = 0; height < layerSizes.length; height++) { - if (height == layerSizes.length - 1 || layerSizes[height] & 1) { - peakIndexes.push(height); - } + if (height == layerSizes.length - 1 || layerSizes[height] & 1) { + peakIndexes.push(height); + } } //array flip peak indexes @@ -732,73 +1069,73 @@ const GetMMRProofIndex = (pos: number, mmvSize: number, extraHashes: number): In let layerSize = peakIndexes.length; for (let passThrough = (layerSize & 1); layerNum == 0 || layerSize > 1; passThrough = (layerSize & 1), layerNum++) { - layerSize = (layerSize >> 1) + passThrough; - if (layerSize) { - merkleSizes.push(layerSize); - } + layerSize = (layerSize >> 1) + passThrough; + if (layerSize) { + merkleSizes.push(layerSize); + } } //flip the merklesizes for (let i = 0; i < extraHashes; i++) { - bitPos++; + bitPos++; } let p = pos; for (let l = 0; l < layerSizes.length; l++) { - if (p & 1) { - index = index.or(new BN(1).shln(bitPos++)); - - p >>= 1; + if (p & 1) { + index = index.or(new BN(1).shln(bitPos++)); - for (let i = 0; i < extraHashes; i++) { - bitPos++; - } + p >>= 1; - } else { - if (layerSizes[l] > (p + 1)) { + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } - bitPos++; - p >>= 1; - for (let i = 0; i < extraHashes; i++) { - bitPos++; - } - } else { + } else { + if (layerSizes[l] > (p + 1)) { - for (p = 0; p < peakIndexes.length; p++) { + bitPos++; + p >>= 1; + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } + } else { - if (peakIndexes[p] == l) { - break; - } - } + for (p = 0; p < peakIndexes.length; p++) { - for (let layerNum = -1, layerSize = peakIndexes.length; layerNum == -1 || layerSize > 1; layerSize = merkleSizes[++layerNum]) { + if (peakIndexes[p] == l) { + break; + } + } - if (p < (layerSize - 1) || (p & 1)) { + for (let layerNum = -1, layerSize = peakIndexes.length; layerNum == -1 || layerSize > 1; layerSize = merkleSizes[++layerNum]) { + if (p < (layerSize - 1) || (p & 1)) { - if (p & 1) { - // hash with the one before us - index = index.or(new BN(1).shln(bitPos++)); - for (let i = 0; i < extraHashes; i++) { - bitPos++; - } - } else { - // hash with the one in front of us - bitPos++; + if (p & 1) { + // hash with the one before us + index = index.or(new BN(1).shln(bitPos++)); - for (let i = 0; i < extraHashes; i++) { - bitPos++; - } - } - } - p >>= 1; + for (let i = 0; i < extraHashes; i++) { + bitPos++; } + } else { + // hash with the one in front of us + bitPos++; - break; + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } + } } + p >>= 1; + } + break; } + + } } return index; } From 0d3e3fd128bc5b31bf4c589235b3d5e6bf25027a Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Mon, 29 Jan 2024 21:08:18 +0000 Subject: [PATCH 057/120] Updates to use Verus MMR type classes --- dist/vdxf/classes/Attestation.d.ts | 2 +- dist/vdxf/classes/Attestation.js | 2 +- src/__tests__/attestation/attestation.test.ts | 176 +-- src/vdxf/classes/Attestation.ts | 343 +++-- src/vdxf/classes/MMR copy.ts | 1141 ----------------- src/vdxf/classes/MMR.ts | 919 ++++++------- 6 files changed, 780 insertions(+), 1803 deletions(-) delete mode 100644 src/vdxf/classes/MMR copy.ts diff --git a/dist/vdxf/classes/Attestation.d.ts b/dist/vdxf/classes/Attestation.d.ts index e4f47bf..5689fe5 100644 --- a/dist/vdxf/classes/Attestation.d.ts +++ b/dist/vdxf/classes/Attestation.d.ts @@ -29,7 +29,7 @@ export declare class Attestation extends VDXFObject { toDataBuffer(): Buffer; fromDataBuffer(buffer: Buffer, offset?: number): number; createMMR(): Promise; - routeHash(): Promise; + rootHash(): Promise; getProof(keys: Array): Promise; checkProof(): Promise; getHash(key: any): Buffer; diff --git a/dist/vdxf/classes/Attestation.js b/dist/vdxf/classes/Attestation.js index 8d30d25..d16c2b2 100644 --- a/dist/vdxf/classes/Attestation.js +++ b/dist/vdxf/classes/Attestation.js @@ -141,7 +141,7 @@ class Attestation extends __1.VDXFObject { return this.mmr; }); } - routeHash() { + rootHash() { return __awaiter(this, void 0, void 0, function* () { if (!this.mmr) { yield this.createMMR(); diff --git a/src/__tests__/attestation/attestation.test.ts b/src/__tests__/attestation/attestation.test.ts index 5b0e33e..d15623c 100644 --- a/src/__tests__/attestation/attestation.test.ts +++ b/src/__tests__/attestation/attestation.test.ts @@ -1,125 +1,75 @@ import { ATTESTATION_READ_REQUEST, IDENTITY_VIEW, ATTESTATION_IDENTITY_DATA, LOGIN_CONSENT_REDIRECT_VDXF_KEY } from "../../vdxf"; -import { Attestation, LoginConsentRequest, LoginConsentResponse} from "../../vdxf/classes"; +import { Attestation, LoginConsentRequest, LoginConsentResponse } from "../../vdxf/classes"; import { RedirectUri, RequestedPermission } from "../../vdxf/classes/Challenge"; import { Context } from "../../vdxf/classes/Context"; -import { AttestationData } from "../../vdxf/classes/Attestation"; +import { AttestationInterface, AttestationData } from "../../vdxf/classes/Attestation"; const { randomBytes } = require('crypto') const SIMPLE_ATTESTATION = 1; describe('Serializes and deserializes attestation request', () => { - test('attestation request with reply', async () => { - const req = new LoginConsentRequest({ - system_id: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - signing_id: "iB5PRXMHLYcNtM8dfLB6KwfJrHU2mKDYuU", - signature: { - signature: - "AYG2IQABQSAN1fp6A9NIVbxvKuOVLLU+0I+G3oQGbRtS6u4Eampfb217Cdf5FCMScQhV9kMxtjI9GWzpchmjuiTB2tctk6qT", - }, - challenge: { - challenge_id: "iKNufKJdLX3Xg8qFru9AuLBvivAEJ88PW4", - requested_access: [new RequestedPermission("", IDENTITY_VIEW.vdxfid), - new RequestedPermission( {accepted_attestors:["iC9x9VZ2XMop7spFzeXqSKX8WqmrG9cu41"], - attestation_keys:[ - ATTESTATION_IDENTITY_DATA["firstname"].vdxfid, - ATTESTATION_IDENTITY_DATA["lastname"].vdxfid, - ATTESTATION_IDENTITY_DATA["attestor"].vdxfid, - ATTESTATION_IDENTITY_DATA["identity"].vdxfid, - ATTESTATION_IDENTITY_DATA["documenttype"].vdxfid] - }, ATTESTATION_READ_REQUEST.vdxfid)], - session_id: "iRQZGW36o3RcVR1xyVT1qWdAKdxp3wUyrh", - redirect_uris: [ - new RedirectUri( - "https://www.verus.io", - LOGIN_CONSENT_REDIRECT_VDXF_KEY.vdxfid - ), - ], - created_at: 1664382484, - salt: "i6NawEzHMocZnU4h8pPkGpHApvsrHjxwXE", - context: new Context({ - ["i4KyLCxWZXeSkw15dF95CUKytEK3HU7em9"]: "test", - }), - }, - }); + test('attestation request with reply', async () => { + const req = new LoginConsentRequest({ + system_id: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + signing_id: "iB5PRXMHLYcNtM8dfLB6KwfJrHU2mKDYuU", + signature: { + signature: + "AYG2IQABQSAN1fp6A9NIVbxvKuOVLLU+0I+G3oQGbRtS6u4Eampfb217Cdf5FCMScQhV9kMxtjI9GWzpchmjuiTB2tctk6qT", + }, + challenge: { + challenge_id: "iKNufKJdLX3Xg8qFru9AuLBvivAEJ88PW4", + requested_access: [new RequestedPermission("", IDENTITY_VIEW.vdxfid), + new RequestedPermission({ + accepted_attestors: ["iC9x9VZ2XMop7spFzeXqSKX8WqmrG9cu41"], + attestation_keys: [ + ATTESTATION_IDENTITY_DATA["firstname"].vdxfid, + ATTESTATION_IDENTITY_DATA["lastname"].vdxfid, + ATTESTATION_IDENTITY_DATA["attestor"].vdxfid, + ATTESTATION_IDENTITY_DATA["identity"].vdxfid, + ATTESTATION_IDENTITY_DATA["documenttype"].vdxfid] + }, ATTESTATION_READ_REQUEST.vdxfid)], + session_id: "iRQZGW36o3RcVR1xyVT1qWdAKdxp3wUyrh", + redirect_uris: [ + new RedirectUri( + "https://www.verus.io", + LOGIN_CONSENT_REDIRECT_VDXF_KEY.vdxfid + ), + ], + created_at: 1664382484, + salt: "i6NawEzHMocZnU4h8pPkGpHApvsrHjxwXE", + context: new Context({ + ["i4KyLCxWZXeSkw15dF95CUKytEK3HU7em9"]: "test", + }), + }, + }); + + const componentsMap = new Map(); + + componentsMap.set(0, { attestationKey: ATTESTATION_IDENTITY_DATA["firstname"].vdxfid, salt: Buffer.from("8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210", 'hex'), value: "Chris" }) + componentsMap.set(1, { attestationKey: ATTESTATION_IDENTITY_DATA["lastname"].vdxfid, salt: Buffer.from("7c3920940db4385cd305557a57a8df33346712096e76b58d7c4ace05e17b90a2", 'hex'), value: "Monkins" }) + componentsMap.set(2, { attestationKey: ATTESTATION_IDENTITY_DATA["identity"].vdxfid, salt: Buffer.from("ce662d61a20ae211728cdb1b924628c84edfe0fcbd59a86f56a125ad73689ac1", 'hex'), value: "chad@" }) + componentsMap.set(3, { attestationKey: ATTESTATION_IDENTITY_DATA["attestor"].vdxfid, salt: Buffer.from("9067dc6a9b38dd15f985770bb819eb62de39a5d1f0e12f9a4807f78968794af4", 'hex'), value: "valu attestation@" }) + componentsMap.set(4, { attestationKey: ATTESTATION_IDENTITY_DATA["documenttype"].vdxfid, salt: Buffer.from("338b6ad44179f46fc24f3ed01fd247c9664384a71ba5465aebceece8d7c45a0a", 'hex'), value: "KYC Attestation v1" }) + + const signaturesForAttestation = { + "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV": + { + signature: "AYG2IQABQSAN1fp6A9NIVbxvKuOVLLU+0I+G3oQGbRtS6u4Eampfb217Cdf5FCMScQhV9kMxtjI9GWzpchmjuiTB2tctk6qT", + system: "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq" + } + }; + + const attestationResponse = new Attestation("i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", {data: new AttestationData(componentsMap), signatures: signaturesForAttestation }); + const test = attestationResponse.createMMR(); + const proofResponseRoot = attestationResponse.rootHash(); + + const proofOfItemZero = attestationResponse.getProof([0]); + + const rootOfItemZero = proofOfItemZero.checkProof(0); + + expect(proofResponseRoot.toString('hex')).toStrictEqual("56dbb8cb952b8f4d8648abd918136d0eb790894acf5e62dca8884e68d6d476e5"); + }); - const componentsMap = new Map(); - componentsMap.set(0, {attestationKey: ATTESTATION_IDENTITY_DATA["firstname"].vdxfid, salt: "8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210", value: "Chris"}) - componentsMap.set(1, {attestationKey: ATTESTATION_IDENTITY_DATA["lastname"].vdxfid, salt: "7c3920940db4385cd305557a57a8df33346712096e76b58d7c4ace05e17b90a2", value: "Monkins"}) - componentsMap.set(2, {attestationKey: ATTESTATION_IDENTITY_DATA["identity"].vdxfid, salt: "ce662d61a20ae211728cdb1b924628c84edfe0fcbd59a86f56a125ad73689ac1", value: "chad@"}) - componentsMap.set(3, {attestationKey: ATTESTATION_IDENTITY_DATA["attestor"].vdxfid, salt: "9067dc6a9b38dd15f985770bb819eb62de39a5d1f0e12f9a4807f78968794af4", value: "valu attestation@"}) - componentsMap.set(4, {attestationKey: ATTESTATION_IDENTITY_DATA["documenttype"].vdxfid, salt: "338b6ad44179f46fc24f3ed01fd247c9664384a71ba5465aebceece8d7c45a0a", value: "KYC Attestation v1"}) - - - const signaturesForAttestation = {"i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV": - {signature:"AYG2IQABQSAN1fp6A9NIVbxvKuOVLLU+0I+G3oQGbRtS6u4Eampfb217Cdf5FCMScQhV9kMxtjI9GWzpchmjuiTB2tctk6qT", - system: "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq"}}; - - const attestationResponse = new Attestation("i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV",{components: componentsMap, signatures: signaturesForAttestation}); - - await attestationResponse.createMMR(); - - const proofResponseRoot = await attestationResponse.routeHash(); - - // Get a pruned proof of just item [0] in the MMR - const prunedMMR = await attestationResponse.getProof([0]); - - const prunedProofRoot = await prunedMMR.mmr.getRoot(); - - const prunedMMRBuff = prunedMMR.toBuffer(); - - const fromPrunedMMR = new Attestation(); - - fromPrunedMMR.fromBuffer(prunedMMRBuff); - - const fromPrunedMMRProofRoot = await fromPrunedMMR.routeHash(); - - const res = new LoginConsentResponse({ - system_id: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - signing_id: "iB5PRXMHLYcNtM8dfLB6KwfJrHU2mKDYuU", - signature: { - signature: - "AYG2IQABQSAN1fp6A9NIVbxvKuOVLLU+0I+G3oQGbRtS6u4Eampfb217Cdf5FCMScQhV9kMxtjI9GWzpchmjuiTB2tctk6qT", - }, - decision: { - decision_id: "iBTMBHzDbsW3QG1MLBoYtmo6c1xuzn6xxb", - context: new Context({ - ["i4KyLCxWZXeSkw15dF95CUKytEK3HU7em9"]: "test", - }), - request: req, - created_at: 1664392484, - attestations: [attestationResponse] - } - }) - - const reqbuf = req.toBuffer() - const _req = new LoginConsentRequest() - _req.fromBuffer(reqbuf) - - const resbuf = res.toBuffer() - const _res = new LoginConsentResponse() - _res.fromBuffer(resbuf) - - const checkres = _res.toBuffer() - expect(checkres).toStrictEqual(resbuf); - const uri = _req.toWalletDeeplinkUri() - - expect(uri).toBe(LoginConsentRequest.fromWalletDeeplinkUri(uri).toWalletDeeplinkUri()); - - const mmr = await _res.decision.attestations[0].createMMR(); - - const root = await mmr.getRoot(); - - expect(prunedProofRoot.toString('hex')).toStrictEqual("fa3cf78b174a39ddf7967afbfda54953ed55e44c6731de8796eb37ba77afddf1") - expect(proofResponseRoot.toString('hex')).toStrictEqual("fa3cf78b174a39ddf7967afbfda54953ed55e44c6731de8796eb37ba77afddf1") - expect(fromPrunedMMRProofRoot.toString('hex')).toStrictEqual("fa3cf78b174a39ddf7967afbfda54953ed55e44c6731de8796eb37ba77afddf1") - expect(Buffer.from(root).toString('hex')).toStrictEqual("fa3cf78b174a39ddf7967afbfda54953ed55e44c6731de8796eb37ba77afddf1") - - // prume MMR and check stateroot is stillthe same - - // const prunedMMRProof = - }); - - }); diff --git a/src/vdxf/classes/Attestation.ts b/src/vdxf/classes/Attestation.ts index b87d078..6253dd4 100644 --- a/src/vdxf/classes/Attestation.ts +++ b/src/vdxf/classes/Attestation.ts @@ -4,17 +4,202 @@ import createHash = require("create-hash"); import { fromBase58Check, toBase58Check } from '../../utils/address'; import { I_ADDR_VERSION } from '../../constants/vdxf'; import { VDXFObject } from "../"; -import { MMR, MemoryBasedDb, CMMRBranch, VerusMMR } from "./MMR" +import { CMerkleMountainRange, CMMRNode, CMerkleMountainView, CMMRProof, CPartialAttestationProof } from "./MMR" const { randomBytes } = require('crypto') const { BufferReader, BufferWriter } = bufferutils; -export interface AttestationData { +export interface AttestationInterface { type: number; attestationKey: string; salt: Buffer; value: string | Buffer | URL; } + +export class AttestationData { + + components: Map; + constructor(components: Map = new Map()) { + this.components = components; + } + + determineType(value: string | Buffer | URL) { + if (Buffer.isBuffer(value)) { + return Attestation.TYPE_BYTES; + } + // Check if it's a Base64 string + // Base64 string pattern: contains only Base64 characters and possibly padding at the end + const base64Pattern = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/; + if (typeof value === 'string' && base64Pattern.test(value)) { + return Attestation.TYPE_BASE64; + } + if (value instanceof URL) { + return Attestation.TYPE_URL; + } + return Attestation.TYPE_STRING; + } + + componentDataByteLength(key: number, forhash: boolean = false ): number { + let byteLength = 0; + + const item = this.components.get(key); + if(!forhash){ + byteLength += varuint.encodingLength(key); //key + } + if(!item.type) { + item.type = this.determineType(item.value); + } + byteLength += 1; //type + byteLength += 20; //vdxfid + byteLength += 32; //salt + if (item.type === Attestation.TYPE_STRING) { + byteLength += varuint.encodingLength(Buffer.from(item.value as string, "utf8").length); + byteLength += Buffer.from(item.value as string, "utf8").length; + } else if (item.type === Attestation.TYPE_BYTES) { + byteLength += varuint.encodingLength((item.value as Buffer).length); + byteLength += (item.value as Buffer).length; + } else if (item.type === Attestation.TYPE_BASE64) { + byteLength += varuint.encodingLength(Buffer.from(item.value as string, "base64").length); + byteLength += Buffer.from(item.value as string, "base64").length; + } else if (item.type === Attestation.TYPE_URL) { + byteLength += varuint.encodingLength(Buffer.from((item.value as URL).toString(), "utf8").length); + byteLength += Buffer.from((item.value as URL).toString(), "utf8").length; + } else { + throw new Error("Invalid Attestation Type"); + } + + return byteLength; + } + + dataByteLength(): number { + let byteLength = 0; + byteLength += varuint.encodingLength(this.components.size) + + for (const [key, item] of this.components) { + byteLength += this.componentDataByteLength(key); + } + + return byteLength; + } + + componentToDataBuffer(key: number, forHash: boolean = false): Buffer { + + const bufferWriter = new BufferWriter(Buffer.alloc(this.componentDataByteLength(key))); + + bufferWriter.writeCompactSize(this.components.size); + const item = this.components.get(key); + if(!forHash) { + bufferWriter.writeCompactSize(key); + } + bufferWriter.writeUInt8(item.type); + bufferWriter.writeSlice(fromBase58Check(item.attestationKey).hash); + bufferWriter.writeSlice(item.salt); + + if (item.type === Attestation.TYPE_STRING) { + bufferWriter.writeVarSlice(Buffer.from(item.value as string, "utf8")) + } else if (item.type === Attestation.TYPE_BYTES) { + bufferWriter.writeVarSlice(item.value as Buffer) + } else if (item.type === Attestation.TYPE_BASE64) { + bufferWriter.writeVarSlice(Buffer.from(item.value as string, "base64")) + } else if (item.type === Attestation.TYPE_URL) { + bufferWriter.writeVarSlice(Buffer.from((item.value as URL).toString(), "utf8")) + } else { + throw new Error("Invalid Attestation Type"); + } + + return bufferWriter.buffer; + + } + + toDataBuffer(): Buffer { + const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); + + bufferWriter.writeCompactSize(this.components.size); + + for (const [key, item] of this.components) { + bufferWriter.writeSlice(this.componentToDataBuffer(key)); + } + + return bufferWriter.buffer; + } + + componentsFromDataBuffer(buffer: Buffer, offset?: number): number { + + const reader = new bufferutils.BufferReader(buffer, offset); + const componentsLength = reader.readCompactSize(); + this.components = new Map(); + + for (var i = 0; i < componentsLength; i++) { + const key = reader.readCompactSize(); + const type = reader.readUInt8(); + const attestationKey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + const salt = Buffer.from(reader.readSlice(32)); + const value = Buffer.from(reader.readVarSlice()).toString('utf8'); + this.components.set(key, { type, attestationKey, salt, value }); + } + + return reader.offset; + } + + fromDataBuffer(buffer: Buffer, offset?: number): number { + + const reader = new bufferutils.BufferReader(buffer, offset); + + const componentsLength = reader.readCompactSize(); + + for (var i = 0; i < componentsLength; i++) { + reader.offset = this.componentsFromDataBuffer(reader.buffer, reader.offset); + } + + return reader.offset; + + } + size(): number { + return this.components.size; + } + + setData(data: Array, getSalt: Function) { + + if (!this.components) { + this.components = new Map(); + } + + for (let i = 0; i < data.length; i++) { + + const item = data[i]; + + if (!(item.salt instanceof Buffer) || item.salt.length !== 32) { + if (typeof getSalt === "function") { + item.salt = getSalt(); + } else { + throw new Error("Salt is required to be a 32 random byte Buffer"); + } + } + + try { + fromBase58Check(item.attestationKey) + } catch (e) { + throw new Error("Attestation Key is required to be base58 format"); + } + + if (this.determineType(item.value) != item.type) { + throw new Error("Value is wrong type"); + } + this.components.set(i, item); + } + + } + + getHash(key): Buffer { + + let value: Buffer; + + value = this.componentToDataBuffer(key, true); + + return createHash("sha256").update(value).digest(); + } + +} export class Attestation extends VDXFObject { static TYPE_STRING = 1; @@ -22,19 +207,19 @@ export class Attestation extends VDXFObject { static TYPE_BASE64 = 3; static TYPE_URL = 4; - components: Map; + data: AttestationData; signatures: { [attestor: string]: { signature: string, system: string } }; - mmr: VerusMMR; + mmr: CMerkleMountainRange; constructor(vdxfkey: string = "", data?: { - components?: Map; + data?: AttestationData; signatures?: { [attestor: string]: { signature: string, system: string } }; - mmr?: VerusMMR; + mmr?: CMerkleMountainRange; }) { super(vdxfkey); if (data) { - this.components = data.components || null; + this.data = data.data || null; this.signatures = data.signatures || null; this.mmr = data.mmr || null; } @@ -60,29 +245,8 @@ export class Attestation extends VDXFObject { dataByteLength(): number { let byteLength = 0; - byteLength += varuint.encodingLength(this.components.size) - for (const [key, item] of this.components) { - byteLength += varuint.encodingLength(key) - byteLength += 1; //type - byteLength += 20; //vdxfid - byteLength += 32; //salt - if (item.type === Attestation.TYPE_STRING) { - byteLength += varuint.encodingLength(Buffer.from(item.value as string, "utf8").length); - byteLength += Buffer.from(item.value as string, "utf8").length; - } else if (item.type === Attestation.TYPE_BYTES) { - byteLength += varuint.encodingLength((item.value as Buffer).length); - byteLength += (item.value as Buffer).length; - } else if (item.type === Attestation.TYPE_BASE64) { - byteLength += varuint.encodingLength(Buffer.from(item.value as string, "base64").length); - byteLength += Buffer.from(item.value as string, "base64").length; - } else if (item.type === Attestation.TYPE_URL) { - byteLength += varuint.encodingLength(Buffer.from((item.value as URL).toString(), "utf8").length); - byteLength += Buffer.from((item.value as URL).toString(), "utf8").length; - } else { - throw new Error("Invalid Attestation Type"); - } - } + byteLength += this.data.dataByteLength() const sigKeys = Object.keys(this.signatures); byteLength += varuint.encodingLength(sigKeys.length); @@ -107,25 +271,7 @@ export class Attestation extends VDXFObject { toDataBuffer(): Buffer { const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); - bufferWriter.writeCompactSize(this.components.size); - for (const [key, item] of this.components) { - bufferWriter.writeUInt8(item.type); - bufferWriter.writeCompactSize(key); - bufferWriter.writeSlice(fromBase58Check(item.attestationKey).hash); - bufferWriter.writeSlice(item.salt); - - if (item.type === Attestation.TYPE_STRING) { - bufferWriter.writeVarSlice(Buffer.from(item.value as string, "utf8")) - } else if (item.type === Attestation.TYPE_BYTES) { - bufferWriter.writeVarSlice(item.value as Buffer) - } else if (item.type === Attestation.TYPE_BASE64) { - bufferWriter.writeVarSlice(Buffer.from(item.value as string, "base64")) - } else if (item.type === Attestation.TYPE_URL) { - bufferWriter.writeVarSlice(Buffer.from((item.value as URL).toString(), "utf8")) - } else { - throw new Error("Invalid Attestation Type"); - } - } + bufferWriter.writeSlice(this.data.toDataBuffer()); const objKeys = Object.keys(this.signatures); bufferWriter.writeCompactSize(objKeys.length); @@ -155,15 +301,13 @@ export class Attestation extends VDXFObject { const attestationsByteLength = reader.readCompactSize(); //dummy read const componentsLength = reader.readCompactSize(); - this.components = new Map(); + + if (!this.data) { + this.data = new AttestationData(); + } for (var i = 0; i < componentsLength; i++) { - const key = reader.readCompactSize(); - const type = reader.readUInt8(); - const attestationKey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); - const salt = Buffer.from(reader.readSlice(32)); - const value = Buffer.from(reader.readVarSlice()).toString('utf8'); - this.components.set(key, { type, attestationKey, salt, value }); + reader.offset = this.data.componentsFromDataBuffer(reader.buffer, reader.offset); } const signaturesSize = reader.readCompactSize(); @@ -191,49 +335,55 @@ export class Attestation extends VDXFObject { } if (Object.keys(nodes).length > 0) { - this.mmr = new MMR(new MemoryBasedDb(leafLength, nodes)) + this.mmr = new CMerkleMountainRange().fromBuffer(reader.buffer); } } return reader.offset; } - async createMMR() { + createMMR() { if (!this.mmr) { - this.mmr = new MMR(); + this.mmr = new CMerkleMountainRange(); } else { return this.mmr; } - for (const [key, item] of this.components) { + for (const [key, item] of this.data.components) { - await this.mmr.append(this.getHash(key), key) + this.mmr.add(new CMMRNode(this.getHash(key))) } return this.mmr; } - async routeHash() { + rootHash() { //TODO: spell correctly for all if (!this.mmr) { - await this.createMMR(); + this.createMMR(); } + const view = new CMerkleMountainView(this.mmr) - return await this.mmr.getRoot(); + return view.GetRoot(); } // returns an attestation with a sparse MMR containing the leaves specified - async getProof(keys: Array): Promise { - - const itemMaps = new Map(); + getProof(keys: Array): CPartialAttestationProof { - keys.forEach((key, index) => { itemMaps.set(index, this.components.get(key)) }); + const view = new CMerkleMountainView(this.mmr); + const attestationItems = new AttestationData() + const localCMMR = new CMMRProof(); + + keys.forEach((key, index) => { + view.GetProof(localCMMR, key); + attestationItems.components.set(key, this.data.components.get(key)); + }); - const reply = new Attestation(this.vdxfkey, { components: itemMaps, mmr: await this.mmr.getProof(keys, null), signatures: this.signatures }); - - return reply; + const attestationAndProof = new CPartialAttestationProof(localCMMR, attestationItems); + + return attestationAndProof; } @@ -241,10 +391,10 @@ export class Attestation extends VDXFObject { try { - for (const [key, item] of this.components) { + for (const [key, item] of this.data.components) { const hash = this.getHash(key); - const proof = await this.mmr.getProof([key], null); + const proof = null//await this.mmr.getProof([key], null); if (hash !== proof) { throw new Error("Attestation not found in MMR"); @@ -259,54 +409,9 @@ export class Attestation extends VDXFObject { let value: Buffer; - if (this.components.get(key).type === Attestation.TYPE_STRING) { - value = Buffer.from(this.components.get(key).value as string, "utf8"); - } else if (this.components.get(key).type === Attestation.TYPE_BYTES) { - value = this.components.get(key).value as Buffer; - } else if (this.components.get(key).type === Attestation.TYPE_BASE64) { - value = Buffer.from(this.components.get(key).value as string, "base64"); - } else if (this.components.get(key).type === Attestation.TYPE_URL) { - value = Buffer.from((this.components.get(key).value as URL).toString(), "utf8"); - } else { - throw new Error("Invalid Attestation Type"); - } - - const bufferWriter = new BufferWriter(Buffer.alloc(1 + 20 + 32 + varuint.encodingLength(value.length) + value.length)); - bufferWriter.writeUInt8(this.components.get(key).type); - bufferWriter.writeSlice(fromBase58Check(this.components.get(key).attestationKey).hash); - bufferWriter.writeSlice(this.components.get(key).salt); - bufferWriter.writeVarSlice(value); - - return createHash("sha256").update(bufferWriter.buffer).digest(); - - } - - setData(data: Array, getSalt: Function) { - - if (!this.components) { - this.components = new Map(); - } - - for (let i = 0; i < data.length; i++) { - - const item = data[i]; - - if (!(item.salt instanceof Buffer) || item.salt.length !== 32) { - throw new Error("Salt is required to be a 32 random byte Buffer"); - } - - try { - fromBase58Check(item.attestationKey) - } catch (e) { - throw new Error("Attestation Key is required to be base58 format"); - } - - if (this.determineType(item.value) != item.type) { - throw new Error("Value is wrong type"); - } - this.components.set(i, item); - } + value = this.data.componentToDataBuffer(key, true); + return createHash("sha256").update(value).digest(); } } \ No newline at end of file diff --git a/src/vdxf/classes/MMR copy.ts b/src/vdxf/classes/MMR copy.ts deleted file mode 100644 index 9b3dff1..0000000 --- a/src/vdxf/classes/MMR copy.ts +++ /dev/null @@ -1,1141 +0,0 @@ -// Licence MIT -// Adapted to Verus Blake2b MMR. -// MMR Code is from -//Copyright (c) 2019 Zac Mitton under MIT License -//Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated -//documentation files (the "Software"), to deal in the Software without restriction, including without limitation -//the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and -//to permit persons to whom the Software is furnished to do so, subject to the following conditions: - - -var blake2b = require('blake2b') -const { Lock } = require('semaphore-async-await') -import { BN } from 'bn.js'; -import { AttestationData } from './Attestation'; -import { VDXFObject } from "../"; - - -class CChunkedLayer -{ - private CHUNK_SHIFT: number; - private vSize: number; - private nodes: Array>; - - constructor() { this.nodes = []; this.vSize = 0; this.CHUNK_SHIFT = 2; } - - chunkSize(): number { - return 1 << this.CHUNK_SHIFT; - } - - chunkMask(): number { - return this.chunkSize() - 1; - } - - size(): number { - return this.vSize; - } - - getIndex(idx: number): NODE_TYPE { - if (idx < this.vSize) { - return this.nodes[idx >> this.CHUNK_SHIFT][idx & this.chunkMask()]; - } - else { - throw new Error("CChunkedLayer [] index out of range"); - } - } - - push_back(node: NODE_TYPE) { - this.vSize++; - - // if we wrapped around and need more space, we need to allocate a new chunk - // printf("vSize: %lx, chunkMask: %lx\n", vSize, chunkMask()); - - if ((this.vSize & this.chunkMask()) == 1) { - this.nodes.push(Array()); - // this.nodes[this.nodes.length - 1].reserve(chunkSize()); - // TypeScript, arrays are dynamic and don't have a reserve method or an equivalent. - } - this.nodes[this.nodes.length - 1].push(node); - // printf("nodes.size(): %lu\n", nodes.size()); - } - - clear() { - this.nodes = []; - this.vSize = 0; - } - - resize(newSize: number) { - if (newSize == 0) { - this.clear(); - } - else { - let chunksSize = ((newSize - 1) >> this.CHUNK_SHIFT) + 1; - this.nodes.length = chunksSize; - for (let i = this.size() ? ((this.size() - 1) >> this.CHUNK_SHIFT) + 1 : 1; i <= chunksSize; i++) { - if (i < chunksSize) { - this.nodes[this.nodes.length - 1].length = this.chunkSize(); - } - else { - // this.nodes[this.nodes.length - 1].reserve(chunkSize()); - this.nodes[this.nodes.length - 1].length = (((newSize - 1) & this.chunkMask()) + 1); - } - } - - this.vSize = ((this.nodes.length - 1) << this.CHUNK_SHIFT) + ((newSize - 1) & this.chunkMask()) + 1; - } - } -}; - -//template -class COverlayNodeLayer { - - private nodeSource: UNDERLYING; - private vSize: number; - - constructor(NodeSource: UNDERLYING) { - this.nodeSource = NodeSource; - this.vSize = 0; - } - - size(): number { - return this.vSize; - } - - getIndex(idx: number): NODE_TYPE { - if (idx < this.vSize) { - let retval: NODE_TYPE; - return retval; - } - else { - throw new Error("COverlayNodeLayer [] index out of range"); - - } - } - - // node type must be moveable just to be passed here, but the default overlay has no control over the underlying storage - // and only tracks size changes - push_back(node: NODE_TYPE) { this.vSize++; } - clear() { this.vSize = 0; } - resize(newSize: number) { this.vSize = newSize; } -}; - -export class CMMRNode { - hash: Buffer; - - constructor(Hash?: Buffer) { - if (Hash) { - this.hash = Hash; - } - } - - digest(input) { - var out = Buffer.allocUnsafe(32); - return blake2b(out.length, null, null, Buffer.from("VerusDefaultHash")).update(input).digest(out); - } - - HashObj(obj: Buffer, onbjR?: Buffer): Buffer { - if (!onbjR) return this.digest(obj); - else return this.digest(Buffer.concat([obj, onbjR])); - } - - // add a right to this left and create a parent node - CreateParentNode(nRight: CMMRNode): CMMRNode { - return this.digest(Buffer.concat([this.hash, nRight.hash])); - } - - GetProofHash(opposite: CMMRNode): Array { - return [this.hash]; - } - - // leaf nodes that track additional data, such as block power, may need a hash added to the path - // at the very beginning - GetLeafHash(): Array { return []; } - - GetExtraHashCount() { - // how many extra proof hashes per layer are added with this node - return 0; - } -}; - -function loggingIdentity(arg: Type[]): Type[] { - console.log(arg.length); - return arg; -} - -//template , typename LAYER0_TYPE=LAYER_TYPE> -export class CMerkleMountainRange { - layer0: CChunkedLayer; - vSize: number; - upperNodes: Array>; - _leafLength: number; - - - constructor() { - - - } - - digest(input) { - var out = Buffer.allocUnsafe(32); - return blake2b(out.length, null, null, Buffer.from("VerusDefaultHash")).update(input).digest(out); - } - - getbyteLength(): number { - return 1; - } - - toBuffer(): Buffer { - return Buffer.from([]); - } - - add(leaf: CMMRNode): number { - this.layer0.push_back(leaf); - - let height = 0; - let layerSize: number; - for (layerSize = this.layer0.size(); height <= this.upperNodes.length && layerSize > 1; height++) { - let newSizeAbove = layerSize >> 1; - - // expand vector of vectors if we are adding a new layer - if (height == this.upperNodes.length) { - this.upperNodes.length = (this.upperNodes.length + 1); - // printf("adding2: upperNodes.size(): %lu, upperNodes[%d].size(): %lu\n", upperNodes.size(), height, height && upperNodes.size() ? upperNodes[height-1].size() : 0); - } - - let curSizeAbove = this.upperNodes[height].size(); - - // if we need to add an element to the vector above us, do it - // printf("layerSize: %u, newSizeAbove: %u, curSizeAbove: %u\n", layerSize, newSizeAbove, curSizeAbove); - if (!(layerSize & 1) && newSizeAbove > curSizeAbove) { - let idx = layerSize - 2; - if (height > 0) { - // printf("upperNodes.size(): %lu, upperNodes[%d].size(): %lu, upperNodes[%d].size(): %lu\n", upperNodes.size(), height, upperNodes[height].size(), height - 1, upperNodes[height - 1].size()); - // upperNodes[height - 1].Printout(); - // upperNodes[height].Printout(); - // printf("upperNodes[%d].size(): %lu, nodep hash: %s\n", height - 1, upperNodes[height - 1].size(), upperNodes[height - 1][idx].hash.GetHex().c_str()); - // printf("nodep + 1 hash: %p\n", upperNodes[height - 1][idx + 1].hash.GetHex().c_str()); - this.upperNodes[height].push_back(this.upperNodes[height - 1][idx].CreateParentNode(this.upperNodes[height - 1][idx + 1])); - } - else { - this.upperNodes[height].push_back(this.layer0[idx].CreateParentNode(this.layer0[idx + 1])); - // printf("upperNodes.size(): %lu, upperNodes[%d].size(): %lu\n", upperNodes.size(), height, upperNodes[height].size()); - // upperNodes[height].Printout(); - } - } - layerSize = newSizeAbove; - } - // return new index - return this.layer0.size() - 1; - } - size() { - return this.size(); - } - - height() { - return this.layer0.size() > 0 ? this.upperNodes.length + 1 : 0; - } - - getNode(Height, Index) { - let layers = this.height(); - if (Height < layers) { - if (Height) { - if (Index < this.upperNodes[Height - 1].size()) { - return this.upperNodes[Height - 1][Index]; - } - } - else { - if (Index < this.layer0.size()) { - return this.layer0[Index]; - } - } - } - return null; - } - -} - -export class CMMRBranch { - CMerkleBranchBase?: number; - nIndex?: number; - nSize?: number; - branch?: Array; - - constructor(CMerkleBranchBase?: number, nIndex?: number, nSize?: number, branch?: Array) { - this.CMerkleBranchBase = CMerkleBranchBase; - this.nIndex = nIndex; - this.nSize = nSize; - this.branch = branch; - } - - - digest(input) { - var out = Buffer.allocUnsafe(32); - return blake2b(out.length, null, null, Buffer.from("VerusDefaultHash")).update(input).digest(out); - } - - safeCheck(hash: Buffer) { - - let index = GetMMRProofIndex(this.nIndex, this.nSize, 0); - - let joined = Buffer.allocUnsafe(64); - let hashInProgress = hash; - - for (let i = 0; i < this.branch.length; i++) { - - if (index.and(new BN(1)).gt(new BN(0))) { - if (this.branch[i] === hashInProgress) throw new Error("Value can be equal to node but never on the right"); - joined = Buffer.concat([this.branch[i], hashInProgress]); - } else { - joined = Buffer.concat([hashInProgress, this.branch[i]]); - } - hashInProgress = this.digest(joined); - - index = index.shrn(1); - } - - return hashInProgress; - } -} - -export class AttestaionProof extends VDXFObject { - - components?: Array; - attestationProof?: Array; - - constructor(vdxfkey: string = "", data?: { - components?: Map; - signatures?: { [attestor: string]: { signature: string, system: string } }; - mmr?: MMR; - }) { - super(vdxfkey); - - if (data) { - this.components = data.components || null; - this.signatures = data.signatures || null; - this.mmr = data.mmr || null; - } - - } - - - -} - -//template , typename LAYER0_TYPE=LAYER_TYPE, typename HASHALGOWRITER=CBLAKE2bWriter> -class CMerkleMountainView { - mmr: CMerkleMountainRange; // the underlying mountain range, which provides the hash vectors - sizes: Array; // sizes that we will use as proxies for the size of each vector at each height - peaks: Array; // peaks - peakMerkle: Array>; // cached layers for the peak merkle if needed - - constructor(mountainRange: CMerkleMountainRange, viewSize?: number = 0) { - this.mmr = mountainRange; - let maxSize = mountainRange.size(); - if (viewSize > maxSize || viewSize == 0) { - viewSize = maxSize; - } - this.sizes.push(viewSize); - - for (viewSize >>= 1; viewSize; viewSize >>= 1) { - this.sizes.push(viewSize); - } - } - - - - // how many elements are stored in this view - size(): number - { - // zero if empty or the size of the zeroeth layer - return this.sizes.length == 0 ? 0 : this.sizes[0]; -} - -CalcPeaks(force = false) -{ - // if we don't yet have calculated peaks, calculate them - if (force || (this.peaks.length == 0 && this.size() != 0)) { - // reset the peak merkle tree, in case this is forced - this.peaks = new Array; - this.peakMerkle = new Array>; - for (let ht = 0; ht < this.sizes.length; ht++) - { - // if we're at the top or the layer above us is smaller than 1/2 the size of this layer, rounded up, we are a peak - if (ht == (this.sizes.length - 1) || this.sizes[ht + 1] < ((this.sizes[ht] + 1) >> 1)) { - this.peaks.splice(0, 0, this.mmr.getNode(ht, this.sizes[ht] - 1)); - } - } - } -} - -resize(newSize: number): number -{ - if (newSize != this.size()) { - - this.sizes = new Array; - this.peaks = new Array; - this.peakMerkle = new Array>; - - let maxSize = this.mmr.size(); - if (newSize > maxSize) { - newSize = maxSize; - } - this.sizes.push(newSize); - newSize >>= 1; - - while (newSize) { - this.sizes.push(newSize); - newSize >>= 1; - } - } - return this.size(); -} - - maxsize(): number - { - return this.mmr.size() - 1; - } - -GetPeaks(): Array -{ - this.CalcPeaks(); - return this.peaks; -} - -GetRoot(): Buffer -{ - let rootHash = Buffer.allocUnsafe(32); - - if (this.size() > 0 && this.peakMerkle.length == 0) { - // get peaks and hash to a root - this.CalcPeaks(); - - let layerNum: number = 0, layerSize = this.peaks.length; - // with an odd number of elements below, the edge passes through - for (let passThrough: boolean = !!(layerSize & 1); layerNum == 0 || layerSize > 1; passThrough = !!(layerSize & 1), layerNum++) - { - this.peakMerkle.push(Array()); - - let i; - let layerIndex = layerNum ? layerNum - 1 : 0; // layerNum is base 1 - - for (i = 0; i < (layerSize >> 1); i++) { - if (layerNum > 0) { - this.peakMerkle[this.peakMerkle.length - 1].push(this.peakMerkle[layerIndex][i << 1].CreateParentNode(this.peakMerkle[layerIndex][(i << 1) + 1])); - } - else { - this.peakMerkle[this.peakMerkle.length - 1].push(this.peaks[i << 1].CreateParentNode(this.peaks[(i << 1) + 1])); - } - } - if (passThrough) { - if (layerNum > 0) { - // pass the end of the prior layer through - this.peakMerkle[this.peakMerkle.length - 1].push(this.peakMerkle[layerIndex][this.peakMerkle[layerIndex].length - 1]); - } - else { - this.peakMerkle[this.peakMerkle.length].push(this.peaks[this.peaks.length - 1]); - } - } - // each entry in the next layer should be either combined two of the prior layer, or a duplicate of the prior layer's end - layerSize = this.peakMerkle[this.peakMerkle.length - 1].length; - } - rootHash = this.peakMerkle[this.peakMerkle.length - 1][0].hash; - } - else if (this.peakMerkle.length > 0) { - rootHash = this.peakMerkle[this.peakMerkle.length - 1][0].hash; - } - return rootHash; -} - -GetRootNode(): CMMRNode -{ - // ensure merkle tree is calculated - let root = this.GetRoot(); - if (root.length > 0) { - return this.peakMerkle[this.peakMerkle.length - 1][0]; - } - else { - return null; - } -} - - // return hash of the element at "index" -GetHash(index: number): Buffer -{ - if (index < this.size()) { - return this.mmr.layer0[index].hash; - } - else { - return Buffer.allocUnsafe(32); - } -} - -GetBranchType(): number -{ - let BRANCH_MMRBLAKE_NODE = 2 - return BRANCH_MMRBLAKE_NODE; -} - - // return a proof of the element at "pos" -GetProof(retProof: CMMRNode, pos: number): boolean -{ - // find a path from the indicated position to the root in the current view - let retBranch = new CMMRBranch(); - - if (pos < this.size()) { - // just make sure the peakMerkle tree is calculated - this.GetRoot(); - - // if we have leaf information, add it - let toAdd: Array = this.mmr.layer0[pos].GetLeafHash(); - if (toAdd.length > 0) { - retBranch.branch.splice(retBranch.branch.length, 0, toAdd[0]); - } - - let p = pos; - for (int l = 0; l < sizes.size(); l++) - { - if (p & 1) { - std:: vector < uint256 > proofHashes = mmr.GetNode(l, p - 1).GetProofHash(mmr.GetNode(l, p)); - retBranch.branch.insert(retBranch.branch.end(), proofHashes.begin(), proofHashes.end()); - p >>= 1; - } - else { - // make sure there is one after us to hash with or we are a peak and should be hashed with the rest of the peaks - if (sizes[l] > (p + 1)) { - std:: vector < uint256 > proofHashes = mmr.GetNode(l, p + 1).GetProofHash(mmr.GetNode(l, p)); - retBranch.branch.insert(retBranch.branch.end(), proofHashes.begin(), proofHashes.end()); - p >>= 1; - } - else { - /* for (auto &oneNode : peaks) - { - printf("peaknode: "); - for (auto oneHash : oneNode.GetProofHash(oneNode)) - { - printf("%s:", oneHash.GetHex().c_str()); - } - printf("\n"); - } */ - - // we are at a peak, the alternate peak to us, or the next thing we should be hashed with, if there is one, is next on our path - uint256 peakHash = mmr.GetNode(l, p).hash; - - // linear search to find out which peak we are in the base of the peakMerkle - for (p = 0; p < peaks.size(); p++) { - if (peaks[p].hash == peakHash) { - break; - } - } - - // p is the position in the merkle tree of peaks - assert(p < peaks.size()); - - // move up to the top, which is always a peak of size 1 - uint32_t layerNum, layerSize; - for (layerNum = 0, layerSize = peaks.size(); layerNum == 0 || layerSize > 1; layerSize = peakMerkle[layerNum++].size()) { - uint32_t layerIndex = layerNum ? layerNum - 1 : 0; // layerNum is base 1 - - // we are an odd member on the end (even index) and will not hash with the next layer above, we will propagate to its end - if ((p < layerSize - 1) || (p & 1)) { - if (p & 1) { - // hash with the one before us - if (layerNum) { - std:: vector < uint256 > proofHashes = peakMerkle[layerIndex][p - 1].GetProofHash(peakMerkle[layerIndex][p]); - retBranch.branch.insert(retBranch.branch.end(), proofHashes.begin(), proofHashes.end()); - } - else { - std:: vector < uint256 > proofHashes = peaks[p - 1].GetProofHash(peaks[p]); - retBranch.branch.insert(retBranch.branch.end(), proofHashes.begin(), proofHashes.end()); - } - } - else { - // hash with the one in front of us - if (layerNum) { - std:: vector < uint256 > proofHashes = peakMerkle[layerIndex][p + 1].GetProofHash(peakMerkle[layerIndex][p]); - retBranch.branch.insert(retBranch.branch.end(), proofHashes.begin(), proofHashes.end()); - } - else { - std:: vector < uint256 > proofHashes = peaks[p + 1].GetProofHash(peaks[p]); - retBranch.branch.insert(retBranch.branch.end(), proofHashes.begin(), proofHashes.end()); - } - } - } - p >>= 1; - } - - // finished - break; - } - } - } - retBranch.branchType = GetBranchType(NODE_TYPE()); - retBranch.nSize = size(); - retBranch.nIndex = pos; - retProof << retBranch; - return true; - } - return false; -} - - // return a vector of the bits, either 1 or 0 in each byte, to represent both the size - // of the proof by the size of the vector, and the expected bit in each position for the given - // position in a Merkle Mountain View of the specified size - static std:: vector < unsigned char > GetProofBits(uint64_t pos, uint64_t mmvSize) -{ - std:: vector < unsigned char > Bits; - std:: vector < uint64_t > Sizes; - std:: vector < unsigned char > PeakIndexes; - std:: vector < uint64_t > MerkleSizes; - - // printf("GetProofBits - pos: %lu, mmvSize: %lu\n", pos, mmvSize); - - // find a path from the indicated position to the root in the current view - if (pos > 0 && pos < mmvSize) { - int extrahashes = NODE_TYPE:: GetExtraHashCount(); - - Sizes.push_back(mmvSize); - mmvSize >>= 1; - - while (mmvSize) { - Sizes.push_back(mmvSize); - mmvSize >>= 1; - } - - for (uint32_t ht = 0; ht < Sizes.size(); ht++) - { - // if we're at the top or the layer above us is smaller than 1/2 the size of this layer, rounded up, we are a peak - if (ht == ((uint32_t)Sizes.size() - 1) || (Sizes[ht] & 1)) - { - PeakIndexes.insert(PeakIndexes.begin(), ht); - } - } - - // figure out the peak merkle - uint64_t layerNum = 0, layerSize = PeakIndexes.size(); - // with an odd number of elements below, the edge passes through - for (bool passThrough = (layerSize & 1); layerNum == 0 || layerSize > 1; passThrough = (layerSize & 1), layerNum++) - { - layerSize = (layerSize >> 1) + passThrough; - if (layerSize) { - MerkleSizes.push_back(layerSize); - } - } - - // add extra hashes for a node on the right - for (int i = 0; i < extrahashes; i++) - { - Bits.push_back(0); - } - - uint64_t p = pos; - for (int l = 0; l < Sizes.size(); l++) - { - // printf("GetProofBits - Bits.size: %lu\n", Bits.size()); - - if (p & 1) { - Bits.push_back(1); - p >>= 1; - - for (int i = 0; i < extrahashes; i++) - { - Bits.push_back(0); - } - } - else { - // make sure there is one after us to hash with or we are a peak and should be hashed with the rest of the peaks - if (Sizes[l] > (p + 1)) { - Bits.push_back(0); - p >>= 1; - - for (int i = 0; i < extrahashes; i++) - { - Bits.push_back(0); - } - } - else { - for (p = 0; p < PeakIndexes.size(); p++) { - if (PeakIndexes[p] == l) { - break; - } - } - - // p is the position in the merkle tree of peaks - assert(p < PeakIndexes.size()); - - // move up to the top, which is always a peak of size 1 - uint64_t layerNum; - uint64_t layerSize; - for (layerNum = -1, layerSize = PeakIndexes.size(); layerNum == -1 || layerSize > 1; layerSize = MerkleSizes[++layerNum]) { - // printf("GetProofBits - Bits.size: %lu\n", Bits.size()); - if (p < (layerSize - 1) || (p & 1)) { - if (p & 1) { - // hash with the one before us - Bits.push_back(1); - - for (int i = 0; i < extrahashes; i++) - { - Bits.push_back(0); - } - } - else { - // hash with the one in front of us - Bits.push_back(0); - - for (int i = 0; i < extrahashes; i++) - { - Bits.push_back(0); - } - } - } - p >>= 1; - } - // finished - break; - } - } - } - } - return Bits; -} -}; - - - -export class MMR { - lock: any; - _leafLength: number; - db: any; - - constructor(db = new MemoryBasedDb()) { - this.db = db - this.lock = new Lock(1) - - } - - digest(input) { - var out = Buffer.allocUnsafe(32); - return blake2b(out.length, null, null, Buffer.from("VerusDefaultHash")).update(Buffer.concat([...input])).digest(out); - } - - async get(leafIndex) { - let leafValue - await this.lock.acquire() - try { - let leafLength = await this.getLeafLength() - if (leafIndex >= leafLength) { throw new Error('Leaf not in tree') } - let leafPosition = MMR.getNodePosition(leafIndex) - let localPeakPosition = MMR.localPeakPosition(leafIndex, leafLength) - let localPeakValue = await this._getNodeValue(localPeakPosition) - leafValue = await this._verifyPath(localPeakPosition, localPeakValue, leafPosition) - } finally { - this.lock.release() - } - return leafValue - } - - async _get(nodePosition) { - let nodeValue - await this.lock.acquire() - try { - let nodeLength = await this.getNodeLength() - let leafLength = await this.getLeafLength() - if (nodePosition.i >= nodeLength) { throw new Error('Node not in tree') } - let peakPositions = MMR.peakPositions(leafLength - 1) - let localPeakPosition - for (let i = 0; i < peakPositions.length; i++) { - if (peakPositions[i].i >= nodePosition.i) { - localPeakPosition = peakPositions[i] - break - } - } - let localPeakValue = await this._getNodeValue(localPeakPosition) - nodeValue = await this._verifyPath(localPeakPosition, localPeakValue, nodePosition) - } finally { - this.lock.release() - } - return nodeValue - } - - async append(value, leafIndex) { - await this.lock.acquire() - try { - let leafLength = await this.getLeafLength() - if (leafIndex == undefined || leafIndex == leafLength) { - let nodePosition = MMR.getNodePosition(leafLength) - let mountainPositions = MMR.mountainPositions(MMR.localPeakPosition(leafLength, leafLength), nodePosition.i) - await this.db.set(value, nodePosition.i) - await this._hashUp(mountainPositions) - await this._setLeafLength(leafLength + 1) - } else { - throw new Error('Can only append to end of MMR (leaf ' + leafLength + '). Index ' + leafIndex + ' given.') - } - } finally { - this.lock.release() - } - } - async appendMany(values, startLeafIndex) { - if (startLeafIndex == undefined) { - startLeafIndex = await this.getLeafLength() - } - for (let i = 0; i < values.length; i++) { - await this.append(values[i], startLeafIndex + i) - } - } - async getRoot(leafIndex?: number) { - let peakValues = [] - await this.lock.acquire() - try { - if (!leafIndex) { - leafIndex = await this.getLeafLength() - 1 - } - let peakPositions = MMR.peakPositions(leafIndex) - for (let i = 0; i < peakPositions.length; i++) { - peakValues.push(await this._getNodeValue(peakPositions[i])) - } - } finally { - this.lock.release() - } - // note: a single peak differs from its MMR root in that it gets hashed a second time - return this.digest([...peakValues]) - } - async getNodeLength() { return MMR.getNodePosition(await this.getLeafLength()).i } - async getLeafLength() { // caching - if (this._leafLength == undefined) { // dirty length - this._leafLength = await this.db.getLeafLength() - } - return this._leafLength - } - async delete(leafIndex) { // logically deletes everything after (and including) leafIndex - await this.lock.acquire() - try { - let leafLength = await this.getLeafLength() - if (leafIndex < leafLength) { - await this._setLeafLength(leafIndex) - } - } finally { - this.lock.release() - } - } - async getProof(leafIndexes, referenceTreeLength) { // returns a sparse MMR containing the leaves specified - let proofMmr - await this.lock.acquire() - try { - referenceTreeLength = referenceTreeLength || await this.getLeafLength() - - let positions = MMR.proofPositions(leafIndexes, referenceTreeLength) - let nodes = {} - - let nodeIndexes = Object.keys(positions) - await Promise.all(nodeIndexes.map(async (i) => { - let nodeValue = await this._getNodeValue(positions[i]) - nodes[i] = nodeValue - })) - proofMmr = new MMR(new MemoryBasedDb(referenceTreeLength, nodes)) - - } finally { - this.lock.release() - return proofMmr - } - } - - async _getNodeValue(position) { - // caller's responsibility to request a position within leafLength - let nodeValue = await this.db.get(position.i) - if (nodeValue) { - return nodeValue - } else if (position.h > 0) { // implied node - let leftChildValue = await this._getNodeValue(MMR.leftChildPosition(position)) - let rightChildValue = await this._getNodeValue(MMR.rightChildPosition(position)) - return this.digest([leftChildValue, rightChildValue]) - } else { - throw new Error('Missing node in db') - } - } - async _verifyPath(currentPosition, currentValue, destinationPosition) { // verifies as it walks - if (currentPosition.i == destinationPosition.i) { // base case - return currentValue - } else { - let leftChildPosition = MMR.leftChildPosition(currentPosition) - let rightChildPosition = MMR.rightChildPosition(currentPosition) - let leftValue = await this._getNodeValue(leftChildPosition) - let rightValue = await this._getNodeValue(rightChildPosition) - if (!currentValue.equals(this.digest([leftValue, rightValue]))) { - throw new Error('Hash mismatch of node #' + currentPosition.i + ' and its children') - } - if (destinationPosition.i > currentPosition.i - 2 ** currentPosition.h - currentPosition.h + 1) { //umm yeah, check this line - return this._verifyPath(rightChildPosition, rightValue, destinationPosition) - } else { - return this._verifyPath(leftChildPosition, leftValue, destinationPosition) - } - } - } - async _setLeafLength(leafLength) { - await this.db.setLeafLength(leafLength) - this._leafLength = leafLength - } - async _hashUp(positionPairs) { - for (let i = positionPairs.length - 1; i >= 0; i--) { - let leftValue = await this._getNodeValue(positionPairs[i][0]) - let rightValue = await this._getNodeValue(positionPairs[i][1]) - let writeIndex = MMR.parentIndex(positionPairs[i][0]) - await this.db.set(this.digest([leftValue, rightValue]), writeIndex) - } - } - - - static leftChildPosition(position) { - if (position.h <= 0) { throw new Error('Height 0 does not have child') } - return new Position(position.i - 2 ** position.h, position.h - 1, false) - } - static rightChildPosition(position) { - if (position.h <= 0) { throw new Error('Height 0 does not have child') } - return new Position(position.i - 1, position.h - 1, true) - } - static siblingPosition(position) { - let multiplier = position.r ? -1 : 1 - return new Position(position.i + multiplier * (2 ** (position.h + 1) - 1), position.h, !position.r) - } - static parentIndex(position) { - if (position.r) { - return position.i + 1 - } else { - return position.i + 2 ** (position.h + 1) - } - } - static peakPositions(leafIndex) { - let currentPosition = this.godPeakFromLeafIndex(leafIndex) - let peakPositions = [] - while (leafIndex >= 0) { - currentPosition = this.leftChildPosition(currentPosition) - if (leafIndex >= 2 ** currentPosition.h - 1) { - peakPositions.push(currentPosition) - currentPosition = this.siblingPosition(currentPosition) - leafIndex -= 2 ** currentPosition.h // leafIndex becomes a kindof accumulator - } - } - return peakPositions - } - static localPeakPosition(leafIndex, leafLength) { - let lastLeafIndex = leafLength <= leafIndex ? leafIndex : leafLength - 1 - return MMR._localPeakPosition(leafIndex, MMR.peakPositions(lastLeafIndex)) - } - static _localPeakPosition(leafIndex, peakPositions) { - for (let i = 0; i < peakPositions.length; i++) { - let currentRange = 2 ** (peakPositions[i].h) - if (leafIndex < currentRange) { - return peakPositions[i] - } else { - leafIndex -= currentRange - } - } - } - static mountainPositions(currentPosition, targetNodeIndex) { // positions to hash after appending - let mountainPositions = [] - while (currentPosition.h > 0) { - let children = [this.leftChildPosition(currentPosition), this.rightChildPosition(currentPosition)] - mountainPositions.push(children) - if (targetNodeIndex > currentPosition.i - 2 ** currentPosition.h - currentPosition.h + 1) { - currentPosition = children[1] - } else { - currentPosition = children[0] - } - } - return mountainPositions - } - static godPeakFromLeafIndex(leafIndex) { // imaginary peak that is above all nodes - let peakHeight = 0 - while (2 ** peakHeight <= leafIndex + 1) { peakHeight++ } - return new Position(2 ** (peakHeight + 1) - 2, peakHeight, false) - } - static getNodePosition(leafIndex) { - let currentPosition = this.godPeakFromLeafIndex(leafIndex) - let accumulator = 0 - while (currentPosition.h > 0) { - let serviceRange = 2 ** (currentPosition.h - 1) - if (leafIndex >= accumulator + serviceRange) { - currentPosition = this.rightChildPosition(currentPosition) - accumulator += serviceRange - } else { - currentPosition = this.leftChildPosition(currentPosition) - } - } - return currentPosition - } - static proofPositions(leafIndexes, referenceTreeLength) { - let positions = {} - let finalPeakPositions = MMR.peakPositions(referenceTreeLength - 1) - // add peak positions - for (let i = 0; i < finalPeakPositions.length; i++) { // log(n)/2 - positions[finalPeakPositions[i].i] = finalPeakPositions[i] - } - //add local mountain proof positions for each leaf - for (let i = 0; i < leafIndexes.length; i++) { // k*2log(n) - let nodePosition = MMR.getNodePosition(leafIndexes[i]) - let finalLocalPeak = MMR._localPeakPosition(leafIndexes[i], finalPeakPositions) - // positions[finalLocalPeak.i] = finalLocalPeak // ?? should already have all peaks - let mountainPositions = MMR.mountainPositions(finalLocalPeak, nodePosition.i) - for (let j = 0; j < mountainPositions.length; j++) { - positions[mountainPositions[j][0].i] = mountainPositions[j][0] - positions[mountainPositions[j][1].i] = mountainPositions[j][1] - } - } - // find implied positions (ones which can be calculated based on child positions that are present) - let positionIndexes = Object.keys(positions) - let impliedIndexes = [] - for (let j = 0; j < positionIndexes.length; j++) { // k*log(n) - if (positions[positionIndexes[j]].h > 0) { - let hasLeftChild = MMR._hasPosition(positions, MMR.leftChildPosition(positions[positionIndexes[j]])) - let hasRightChild = MMR._hasPosition(positions, MMR.rightChildPosition(positions[positionIndexes[j]])) - if (hasLeftChild && hasRightChild) { - impliedIndexes.push(positionIndexes[j]) // don't remove them yet because recursion will be slower - } - } - } - // finally remove implied nodes - for (var i = 0; i < impliedIndexes.length; i++) { // k*log(n) - impliedIndexes[i] - delete positions[impliedIndexes[i]] - } - return positions - } - static _hasPosition(nodes, position) { - let has = !!nodes[position.i] - if (!has && position.h > 0) { - if (MMR._hasPosition(nodes, MMR.leftChildPosition(position)) - && MMR._hasPosition(nodes, MMR.rightChildPosition(position)) - ) { - has = true - } - } - return has - } -} - -export class MemoryBasedDb { - - leafLength: any; - nodes: { [number: number]: Buffer }; - constructor(...args) { - if (args[0] == undefined || typeof args[0] == 'number') { - this.leafLength = args[0] || 0 - this.nodes = args[1] || {} - - } - } - async get(index) { - return this.nodes[index] - } - async set(value, index) { - this.nodes[index] = value - } - async getLeafLength() { - return this.leafLength - } - async setLeafLength(leafLength) { - return this.leafLength = leafLength - } - async getNodes() { - return this.nodes - } -} - -const GetMMRProofIndex = (pos: number, mmvSize: number, extraHashes: number): InstanceType => { - let index = new BN(0); - let layerSizes = []; - let merkleSizes = []; - let peakIndexes = []; - let bitPos = 0; - - //start at the beginning - //create a simulation of a mmr based on size - if (!(pos > 0 && pos < mmvSize)) return new BN(0); - - //create an array of all the sizes - while (mmvSize) { - layerSizes.push(mmvSize); - mmvSize = mmvSize >> 1 - } - - for (let height = 0; height < layerSizes.length; height++) { - if (height == layerSizes.length - 1 || layerSizes[height] & 1) { - peakIndexes.push(height); - } - } - - //array flip peak indexes - peakIndexes.reverse(); - - let layerNum = 0; - let layerSize = peakIndexes.length; - - for (let passThrough = (layerSize & 1); layerNum == 0 || layerSize > 1; passThrough = (layerSize & 1), layerNum++) { - layerSize = (layerSize >> 1) + passThrough; - if (layerSize) { - merkleSizes.push(layerSize); - } - } - //flip the merklesizes - - for (let i = 0; i < extraHashes; i++) { - bitPos++; - } - - let p = pos; - for (let l = 0; l < layerSizes.length; l++) { - if (p & 1) { - index = index.or(new BN(1).shln(bitPos++)); - - p >>= 1; - - for (let i = 0; i < extraHashes; i++) { - bitPos++; - } - - } else { - if (layerSizes[l] > (p + 1)) { - - bitPos++; - p >>= 1; - for (let i = 0; i < extraHashes; i++) { - bitPos++; - } - } else { - - for (p = 0; p < peakIndexes.length; p++) { - - if (peakIndexes[p] == l) { - break; - } - } - - for (let layerNum = -1, layerSize = peakIndexes.length; layerNum == -1 || layerSize > 1; layerSize = merkleSizes[++layerNum]) { - - if (p < (layerSize - 1) || (p & 1)) { - - - if (p & 1) { - // hash with the one before us - index = index.or(new BN(1).shln(bitPos++)); - - for (let i = 0; i < extraHashes; i++) { - bitPos++; - } - } else { - // hash with the one in front of us - bitPos++; - - for (let i = 0; i < extraHashes; i++) { - bitPos++; - } - } - } - p >>= 1; - } - - break; - } - - } - } - return index; -} diff --git a/src/vdxf/classes/MMR.ts b/src/vdxf/classes/MMR.ts index f525e95..f87c7cb 100644 --- a/src/vdxf/classes/MMR.ts +++ b/src/vdxf/classes/MMR.ts @@ -1,41 +1,89 @@ // Licence MIT // Adapted to Verus Blake2b MMR. -// MMR Code is from -//Copyright (c) 2019 Zac Mitton under MIT License -//Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated -//documentation files (the "Software"), to deal in the Software without restriction, including without limitation -//the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and -//to permit persons to whom the Software is furnished to do so, subject to the following conditions: - var blake2b = require('blake2b') const { Lock } = require('semaphore-async-await') import { BN } from 'bn.js'; import { AttestationData } from './Attestation'; import { VDXFObject } from "../"; -class Position { - i: any - h: any - r: any - constructor(index, height, rightness) { - this.i = index - this.h = height - this.r = rightness // inherent unchanging property of every node index + +const BRANCH_MMRBLAKE_NODE = 2 + +class CLayer +{ + + private vSize: number; + private nodes: Array; + + constructor() { this.vSize = 0; } + + size(): number { + return this.vSize; } -} -export class VerusMMR { - lock: any; - layer0: Array; - vSize: number; - upperNodes: Array; - _leafLength: number; - db: any; + getIndex(idx: number): NODE_TYPE { + if (idx < this.vSize) { + return this.nodes[idx]; + } + else { + throw new Error("CChunkedLayer [] index out of range"); + } + } - constructor(db = new MemoryBasedDb()) { - this.db = db - this.lock = new Lock(1) + push_back(node: NODE_TYPE) { + this.vSize++; + if (!this.nodes) { + this.nodes = new Array(); + } + this.nodes.push(node); + } + clear() { + this.nodes = null; + this.vSize = 0; + } + +}; + +//template +class COverlayNodeLayer { + + private nodeSource: UNDERLYING; + private vSize: number; + + constructor(NodeSource: UNDERLYING) { + this.nodeSource = NodeSource; + this.vSize = 0; + } + + size(): number { + return this.vSize; + } + + getIndex(idx: number): NODE_TYPE { + if (idx < this.vSize) { + let retval: NODE_TYPE; + return retval; + } + else { + throw new Error("COverlayNodeLayer [] index out of range"); + + } + } + + // node type must be moveable just to be passed here, but the default overlay has no control over the underlying storage + // and only tracks size changes + push_back(node: NODE_TYPE) { this.vSize++; } + clear() { this.vSize = 0; } + resize(newSize: number) { this.vSize = newSize; } +}; +export class CMMRNode { + hash: Buffer; + + constructor(Hash?: Buffer) { + if (Hash) { + this.hash = Hash; + } } digest(input) { @@ -43,6 +91,49 @@ export class VerusMMR { return blake2b(out.length, null, null, Buffer.from("VerusDefaultHash")).update(input).digest(out); } + HashObj(obj: Buffer, onbjR?: Buffer): Buffer { + if (!onbjR) return this.digest(obj); + else return this.digest(Buffer.concat([obj, onbjR])); + } + + // add a right to this left and create a parent node + CreateParentNode(nRight: CMMRNode): CMMRNode { + return new CMMRNode(this.digest(Buffer.concat([this.hash, nRight.hash]))); + } + + GetProofHash(opposite: CMMRNode): Array { + return [this.hash]; + } + + // leaf nodes that track additional data, such as block power, may need a hash added to the path + // at the very beginning + GetLeafHash(): Array { return []; } + + GetExtraHashCount() { + // how many extra proof hashes per layer are added with this node + return 0; + } +}; + +function loggingIdentity(arg: Type[]): Type[] { + console.log(arg.length); + return arg; +} + +//template , typename LAYER0_TYPE=LAYER_TYPE> +export class CMerkleMountainRange { + layer0: CLayer; + vSize: number; + upperNodes: Array>; + _leafLength: number; + + constructor() { + this.layer0 = new CLayer(); + this.vSize = 0; + this.upperNodes = new Array>(); + this._leafLength = 0; + } + getbyteLength(): number { return 1; } @@ -51,52 +142,78 @@ export class VerusMMR { return Buffer.from([]); } - add() { + fromBuffer(bufferIn: Buffer): CMerkleMountainRange { + return new CMerkleMountainRange(); + } + + add(leaf: CMMRNode): number { + this.layer0.push_back(leaf); + + let height = 0; + let layerSize: number; + for (layerSize = this.layer0.size(); height <= this.upperNodes.length && layerSize > 1; height++) { + let newSizeAbove = layerSize >> 1; + + // expand vector of vectors if we are adding a new layer + if (height == this.upperNodes.length) { + this.upperNodes.push(new CLayer()); + } + + let curSizeAbove = this.upperNodes[height].size(); + + // if we need to add an element to the vector above us, do it + if (!(layerSize & 1) && newSizeAbove > curSizeAbove) { + let idx = layerSize - 2; + if (height > 0) { + + this.upperNodes[height].push_back(this.upperNodes[height - 1].getIndex(idx).CreateParentNode(this.upperNodes[height - 1].getIndex(idx + 1))); + } + else { + this.upperNodes[height].push_back(this.layer0.getIndex(idx).CreateParentNode(this.layer0.getIndex(idx + 1))); + + } + } + layerSize = newSizeAbove; + } + // return new index + return this.layer0.size() - 1; } - size() - { - return this.layer0 ? this.layer0.length : 0; + size() { + return this.layer0.size(); } - height() - { - return this.layer0.length > 0 ? this.upperNodes.length + 1 : 0; + height() { + return this.layer0.size() > 0 ? this.upperNodes.length + 1 : 0; } - getNode(Height, Index) - { - let layers = this.height(); - if (Height < layers) - { - if (Height) - { - if (Index < this.upperNodes[Height - 1].size()) - { - return this.upperNodes[Height - 1][Index]; - } - } - else - { - if (Index < this.layer0.length) - { - return this.layer0[Index]; - } - } + getNode(Height, Index): CMMRNode { + let layers = this.height(); + if (Height < layers) { + if (Height) { + if (Index < this.upperNodes[Height - 1].size()) { + return this.upperNodes[Height - 1].getIndex(Index); + } } - return null; + else { + if (Index < this.layer0.size()) { + return this.layer0.getIndex(Index); + } + } + } + return null; } } export class CMMRBranch { - CMerkleBranchBase?: number; + branchType?: number; nIndex?: number; nSize?: number; branch?: Array; - constructor(CMerkleBranchBase: number, nIndex: number, nSize: number, branch: Array) { - this.CMerkleBranchBase = CMerkleBranchBase; + constructor(branchType: number = BRANCH_MMRBLAKE_NODE, nIndex: number = 0, nSize: number = 0, branch: Array = new Array()) { + this.branchType = branchType; this.nIndex = nIndex; this.nSize = nSize; this.branch = branch; @@ -119,9 +236,7 @@ export class CMMRBranch { if (index.and(new BN(1)).gt(new BN(0))) { if (this.branch[i] === hashInProgress) throw new Error("Value can be equal to node but never on the right"); - //join the two arrays and pass to blake2b joined = Buffer.concat([this.branch[i], hashInProgress]); - } else { joined = Buffer.concat([hashInProgress, this.branch[i]]); } @@ -134,367 +249,270 @@ export class CMMRBranch { } } -export class AttestaionProof extends VDXFObject { - - components?: Array; - attestationProof?: Array; - - constructor(vdxfkey: string = "", data?: { - components?: Map; - signatures?: {[attestor: string]: {signature: string, system: string}}; - mmr?: MMR; - }) { - super(vdxfkey); +export class CMMRProof { + proofSequence: Array; - if (data) { - this.components = data.components || null; - this.signatures = data.signatures || null; - this.mmr = data.mmr || null; + setProof(proof: CMMRBranch) { + if (!this.proofSequence) { + this.proofSequence = new Array(); } - + this.proofSequence.push(proof); } - - } +//template , typename LAYER0_TYPE=LAYER_TYPE, typename HASHALGOWRITER=CBLAKE2bWriter> +export class CMerkleMountainView { + mmr: CMerkleMountainRange; // the underlying mountain range, which provides the hash vectors + sizes: Array; // sizes that we will use as proxies for the size of each vector at each height + peaks: Array; // peaks + peakMerkle: Array>; // cached layers for the peak merkle if needed + + constructor(mountainRange: CMerkleMountainRange, viewSize: number = 0) { + this.mmr = mountainRange; + let maxSize = this.mmr.size(); + if (viewSize > maxSize || viewSize == 0) { + viewSize = maxSize; + } + this.sizes = new Array(); + this.sizes.push(viewSize); -export class MMR { - lock: any; - _leafLength: number; - db: any; + for (viewSize >>= 1; viewSize; viewSize >>= 1) { + this.sizes.push(viewSize); + } + this.peakMerkle = new Array>(); + this.peaks = new Array(); + } - constructor(db = new MemoryBasedDb()) { - this.db = db - this.lock = new Lock(1) + + // how many elements are stored in this view + size(): number { + // zero if empty or the size of the zeroeth layer + return this.sizes.length == 0 ? 0 : this.sizes[0]; } - digest(input) { - var out = Buffer.allocUnsafe(32); - return blake2b(out.length, null, null, Buffer.from("VerusDefaultHash")).update(Buffer.concat([...input])).digest(out); - } - - async get(leafIndex) { - let leafValue - await this.lock.acquire() - try { - let leafLength = await this.getLeafLength() - if (leafIndex >= leafLength) { throw new Error('Leaf not in tree') } - let leafPosition = MMR.getNodePosition(leafIndex) - let localPeakPosition = MMR.localPeakPosition(leafIndex, leafLength) - let localPeakValue = await this._getNodeValue(localPeakPosition) - leafValue = await this._verifyPath(localPeakPosition, localPeakValue, leafPosition) - } finally { - this.lock.release() - } - return leafValue - } - - async _get(nodePosition) { - let nodeValue - await this.lock.acquire() - try { - let nodeLength = await this.getNodeLength() - let leafLength = await this.getLeafLength() - if (nodePosition.i >= nodeLength) { throw new Error('Node not in tree') } - let peakPositions = MMR.peakPositions(leafLength - 1) - let localPeakPosition - for (let i = 0; i < peakPositions.length; i++) { - if (peakPositions[i].i >= nodePosition.i) { - localPeakPosition = peakPositions[i] - break + CalcPeaks(force = false) { + // if we don't yet have calculated peaks, calculate them + if (force || (this.peaks.length == 0 && this.size() != 0)) { + // reset the peak merkle tree, in case this is forced + this.peaks = new Array; + this.peakMerkle = new Array>; + for (let ht = 0; ht < this.sizes.length; ht++) { + // if we're at the top or the layer above us is smaller than 1/2 the size of this layer, rounded up, we are a peak + if (ht == (this.sizes.length - 1) || this.sizes[ht + 1] < ((this.sizes[ht] + 1) >> 1)) { + this.peaks.splice(0, 0, this.mmr.getNode(ht, this.sizes[ht] - 1)); } } - let localPeakValue = await this._getNodeValue(localPeakPosition) - nodeValue = await this._verifyPath(localPeakPosition, localPeakValue, nodePosition) - } finally { - this.lock.release() - } - return nodeValue - } - - async append(value, leafIndex) { - await this.lock.acquire() - try { - let leafLength = await this.getLeafLength() - if (leafIndex == undefined || leafIndex == leafLength) { - let nodePosition = MMR.getNodePosition(leafLength) - let mountainPositions = MMR.mountainPositions(MMR.localPeakPosition(leafLength, leafLength), nodePosition.i) - await this.db.set(value, nodePosition.i) - await this._hashUp(mountainPositions) - await this._setLeafLength(leafLength + 1) - } else { - throw new Error('Can only append to end of MMR (leaf ' + leafLength + '). Index ' + leafIndex + ' given.') - } - } finally { - this.lock.release() - } - } - async appendMany(values, startLeafIndex) { - if (startLeafIndex == undefined) { - startLeafIndex = await this.getLeafLength() - } - for (let i = 0; i < values.length; i++) { - await this.append(values[i], startLeafIndex + i) - } - } - async getRoot(leafIndex?: number) { - let peakValues = [] - await this.lock.acquire() - try { - if (!leafIndex) { - leafIndex = await this.getLeafLength() - 1 - } - let peakPositions = MMR.peakPositions(leafIndex) - for (let i = 0; i < peakPositions.length; i++) { - peakValues.push(await this._getNodeValue(peakPositions[i])) - } - } finally { - this.lock.release() - } - // note: a single peak differs from its MMR root in that it gets hashed a second time - return this.digest([...peakValues]) - } - async getNodeLength() { return MMR.getNodePosition(await this.getLeafLength()).i } - async getLeafLength() { // caching - if (this._leafLength == undefined) { // dirty length - this._leafLength = await this.db.getLeafLength() - } - return this._leafLength - } - async delete(leafIndex) { // logically deletes everything after (and including) leafIndex - await this.lock.acquire() - try { - let leafLength = await this.getLeafLength() - if (leafIndex < leafLength) { - await this._setLeafLength(leafIndex) - } - } finally { - this.lock.release() - } - } - async getProof(leafIndexes, referenceTreeLength) { // returns a sparse MMR containing the leaves specified - let proofMmr - await this.lock.acquire() - try { - referenceTreeLength = referenceTreeLength || await this.getLeafLength() - - let positions = MMR.proofPositions(leafIndexes, referenceTreeLength) - let nodes = {} - - let nodeIndexes = Object.keys(positions) - await Promise.all(nodeIndexes.map(async (i) => { - let nodeValue = await this._getNodeValue(positions[i]) - nodes[i] = nodeValue - })) - proofMmr = new MMR(new MemoryBasedDb(referenceTreeLength, nodes)) - - } finally { - this.lock.release() - return proofMmr } } - async _getNodeValue(position) { - // caller's responsibility to request a position within leafLength - let nodeValue = await this.db.get(position.i) - if (nodeValue) { - return nodeValue - } else if (position.h > 0) { // implied node - let leftChildValue = await this._getNodeValue(MMR.leftChildPosition(position)) - let rightChildValue = await this._getNodeValue(MMR.rightChildPosition(position)) - return this.digest([leftChildValue, rightChildValue]) - } else { - throw new Error('Missing node in db') - } - } - async _verifyPath(currentPosition, currentValue, destinationPosition) { // verifies as it walks - if (currentPosition.i == destinationPosition.i) { // base case - return currentValue - } else { - let leftChildPosition = MMR.leftChildPosition(currentPosition) - let rightChildPosition = MMR.rightChildPosition(currentPosition) - let leftValue = await this._getNodeValue(leftChildPosition) - let rightValue = await this._getNodeValue(rightChildPosition) - if (!currentValue.equals(this.digest([leftValue, rightValue]))) { - throw new Error('Hash mismatch of node #' + currentPosition.i + ' and its children') + resize(newSize: number): number { + if (newSize != this.size()) { + + this.sizes = new Array; + this.peaks = new Array; + this.peakMerkle = new Array>; + + let maxSize = this.mmr.size(); + if (newSize > maxSize) { + newSize = maxSize; } - if (destinationPosition.i > currentPosition.i - 2 ** currentPosition.h - currentPosition.h + 1) { //umm yeah, check this line - return this._verifyPath(rightChildPosition, rightValue, destinationPosition) - } else { - return this._verifyPath(leftChildPosition, leftValue, destinationPosition) + this.sizes.push(newSize); + newSize >>= 1; + + while (newSize) { + this.sizes.push(newSize); + newSize >>= 1; } } + return this.size(); } - async _setLeafLength(leafLength) { - await this.db.setLeafLength(leafLength) - this._leafLength = leafLength + + maxsize(): number { + return this.mmr.size() - 1; } - async _hashUp(positionPairs) { - for (let i = positionPairs.length - 1; i >= 0; i--) { - let leftValue = await this._getNodeValue(positionPairs[i][0]) - let rightValue = await this._getNodeValue(positionPairs[i][1]) - let writeIndex = MMR.parentIndex(positionPairs[i][0]) - await this.db.set(this.digest([leftValue, rightValue]), writeIndex) - } + + GetPeaks(): Array { + this.CalcPeaks(); + return this.peaks; } + GetRoot(): Buffer { + let rootHash = Buffer.allocUnsafe(32); - static leftChildPosition(position) { - if (position.h <= 0) { throw new Error('Height 0 does not have child') } - return new Position(position.i - 2 ** position.h, position.h - 1, false) - } - static rightChildPosition(position) { - if (position.h <= 0) { throw new Error('Height 0 does not have child') } - return new Position(position.i - 1, position.h - 1, true) - } - static siblingPosition(position) { - let multiplier = position.r ? -1 : 1 - return new Position(position.i + multiplier * (2 ** (position.h + 1) - 1), position.h, !position.r) - } - static parentIndex(position) { - if (position.r) { - return position.i + 1 - } else { - return position.i + 2 ** (position.h + 1) - } - } - static peakPositions(leafIndex) { - let currentPosition = this.godPeakFromLeafIndex(leafIndex) - let peakPositions = [] - while (leafIndex >= 0) { - currentPosition = this.leftChildPosition(currentPosition) - if (leafIndex >= 2 ** currentPosition.h - 1) { - peakPositions.push(currentPosition) - currentPosition = this.siblingPosition(currentPosition) - leafIndex -= 2 ** currentPosition.h // leafIndex becomes a kindof accumulator + if (this.size() > 0 && this.peakMerkle.length == 0) { + // get peaks and hash to a root + this.CalcPeaks(); + + let layerNum: number = 0, layerSize = this.peaks.length; + // with an odd number of elements below, the edge passes through + for (let passThrough: boolean = !!(layerSize & 1); layerNum == 0 || layerSize > 1; passThrough = !!(layerSize & 1), layerNum++) { + this.peakMerkle.push(Array()); + + let i; + let layerIndex = layerNum ? layerNum - 1 : 0; // layerNum is base 1 + + for (i = 0; i < (layerSize >> 1); i++) { + if (layerNum > 0) { + this.peakMerkle[this.peakMerkle.length - 1].push(this.peakMerkle[layerIndex][i << 1].CreateParentNode(this.peakMerkle[layerIndex][(i << 1) + 1])); + } + else { + this.peakMerkle[this.peakMerkle.length - 1].push(this.peaks[i << 1].CreateParentNode(this.peaks[(i << 1) + 1])); + } + } + if (passThrough) { + if (layerNum > 0) { + // pass the end of the prior layer through + this.peakMerkle[this.peakMerkle.length - 1].push(this.peakMerkle[layerIndex][this.peakMerkle[layerIndex].length - 1]); + } + else { + this.peakMerkle[this.peakMerkle.length].push(this.peaks[this.peaks.length - 1]); + } + } + // each entry in the next layer should be either combined two of the prior layer, or a duplicate of the prior layer's end + layerSize = this.peakMerkle[this.peakMerkle.length - 1].length; } + rootHash = this.peakMerkle[this.peakMerkle.length - 1][0].hash; } - return peakPositions - } - static localPeakPosition(leafIndex, leafLength) { - let lastLeafIndex = leafLength <= leafIndex ? leafIndex : leafLength - 1 - return MMR._localPeakPosition(leafIndex, MMR.peakPositions(lastLeafIndex)) - } - static _localPeakPosition(leafIndex, peakPositions) { - for (let i = 0; i < peakPositions.length; i++) { - let currentRange = 2 ** (peakPositions[i].h) - if (leafIndex < currentRange) { - return peakPositions[i] - } else { - leafIndex -= currentRange - } + else if (this.peakMerkle.length > 0) { + rootHash = this.peakMerkle[this.peakMerkle.length - 1][0].hash; } + return rootHash; } - static mountainPositions(currentPosition, targetNodeIndex) { // positions to hash after appending - let mountainPositions = [] - while (currentPosition.h > 0) { - let children = [this.leftChildPosition(currentPosition), this.rightChildPosition(currentPosition)] - mountainPositions.push(children) - if (targetNodeIndex > currentPosition.i - 2 ** currentPosition.h - currentPosition.h + 1) { - currentPosition = children[1] - } else { - currentPosition = children[0] - } - } - return mountainPositions - } - static godPeakFromLeafIndex(leafIndex) { // imaginary peak that is above all nodes - let peakHeight = 0 - while (2 ** peakHeight <= leafIndex + 1) { peakHeight++ } - return new Position(2 ** (peakHeight + 1) - 2, peakHeight, false) - } - static getNodePosition(leafIndex) { - let currentPosition = this.godPeakFromLeafIndex(leafIndex) - let accumulator = 0 - while (currentPosition.h > 0) { - let serviceRange = 2 ** (currentPosition.h - 1) - if (leafIndex >= accumulator + serviceRange) { - currentPosition = this.rightChildPosition(currentPosition) - accumulator += serviceRange - } else { - currentPosition = this.leftChildPosition(currentPosition) - } - } - return currentPosition - } - static proofPositions(leafIndexes, referenceTreeLength) { - let positions = {} - let finalPeakPositions = MMR.peakPositions(referenceTreeLength - 1) - // add peak positions - for (let i = 0; i < finalPeakPositions.length; i++) { // log(n)/2 - positions[finalPeakPositions[i].i] = finalPeakPositions[i] - } - //add local mountain proof positions for each leaf - for (let i = 0; i < leafIndexes.length; i++) { // k*2log(n) - let nodePosition = MMR.getNodePosition(leafIndexes[i]) - let finalLocalPeak = MMR._localPeakPosition(leafIndexes[i], finalPeakPositions) - // positions[finalLocalPeak.i] = finalLocalPeak // ?? should already have all peaks - let mountainPositions = MMR.mountainPositions(finalLocalPeak, nodePosition.i) - for (let j = 0; j < mountainPositions.length; j++) { - positions[mountainPositions[j][0].i] = mountainPositions[j][0] - positions[mountainPositions[j][1].i] = mountainPositions[j][1] - } + + GetRootNode(): CMMRNode { + // ensure merkle tree is calculated + let root = this.GetRoot(); + if (root.length > 0) { + return this.peakMerkle[this.peakMerkle.length - 1][0]; } - // find implied positions (ones which can be calculated based on child positions that are present) - let positionIndexes = Object.keys(positions) - let impliedIndexes = [] - for (let j = 0; j < positionIndexes.length; j++) { // k*log(n) - if (positions[positionIndexes[j]].h > 0) { - let hasLeftChild = MMR._hasPosition(positions, MMR.leftChildPosition(positions[positionIndexes[j]])) - let hasRightChild = MMR._hasPosition(positions, MMR.rightChildPosition(positions[positionIndexes[j]])) - if (hasLeftChild && hasRightChild) { - impliedIndexes.push(positionIndexes[j]) // don't remove them yet because recursion will be slower - } - } + else { + return null; } - // finally remove implied nodes - for (var i = 0; i < impliedIndexes.length; i++) { // k*log(n) - impliedIndexes[i] - delete positions[impliedIndexes[i]] + } + + // return hash of the element at "index" + GetHash(index: number): Buffer { + if (index < this.size()) { + return this.mmr.layer0[index].hash; } - return positions - } - static _hasPosition(nodes, position) { - let has = !!nodes[position.i] - if (!has && position.h > 0) { - if (MMR._hasPosition(nodes, MMR.leftChildPosition(position)) - && MMR._hasPosition(nodes, MMR.rightChildPosition(position)) - ) { - has = true - } + else { + return Buffer.allocUnsafe(32); } - return has } -} -export class MemoryBasedDb { + GetBranchType(): number { + + return BRANCH_MMRBLAKE_NODE; + } + + // return a proof of the element at "pos" + GetProof(retProof: CMMRProof, pos: number): boolean { + // find a path from the indicated position to the root in the current view + let retBranch = new CMMRBranch(); - leafLength: any; - nodes: { [number: number]: Buffer }; - constructor(...args) { - if (args[0] == undefined || typeof args[0] == 'number') { - this.leafLength = args[0] || 0 - this.nodes = args[1] || {} + if (pos < this.size()) { + // just make sure the peakMerkle tree is calculated + this.GetRoot(); + + // if we have leaf information, add it + let toAdd: Array = this.mmr.layer0.getIndex(pos).GetLeafHash(); + if (toAdd.length > 0) { + retBranch.branch.splice(retBranch.branch.length, 0, toAdd[0]); + } + + let p = pos; + for (let l = 0; l < this.sizes.length; l++) { + if ((p & 1) === 1) { + let proofHashes = this.mmr.getNode(l, p - 1).hash; + retBranch.branch = retBranch.branch.concat(proofHashes); + p >>= 1; + } + else { + // make sure there is one after us to hash with or we are a peak and should be hashed with the rest of the peaks + if (this.sizes[l] > (p + 1)) { + let proofHashes = this.mmr.getNode(l, p + 1).hash; + retBranch.branch = retBranch.branch.concat(proofHashes); + p >>= 1; + } + else { + /* for (auto &oneNode : peaks) + { + printf("peaknode: "); + for (auto oneHash : oneNode.GetProofHash(oneNode)) + { + printf("%s:", oneHash.GetHex().c_str()); + } + printf("\n"); + } */ + + // we are at a peak, the alternate peak to us, or the next thing we should be hashed with, if there is one, is next on our path + let peakHash = this.mmr.getNode(l, p).hash; + + // linear search to find out which peak we are in the base of the peakMerkle + for (p = 0; p < this.peaks.length; p++) { + if (this.peaks[p].hash == peakHash) { + break; + } + } + + // p is the position in the merkle tree of peaks + if (p > this.peaks.length) throw new Error("peak not found"); + + // move up to the top, which is always a peak of size 1 + let layerNum: number, layerSize: number; + for (layerNum = 0, layerSize = this.peaks.length; layerNum == 0 || layerSize > 1; layerSize = this.peakMerkle[layerNum++].length) { + let layerIndex = layerNum ? layerNum - 1 : 0; // layerNum is base 1 + + // we are an odd member on the end (even index) and will not hash with the next layer above, we will propagate to its end + if ((p < layerSize - 1) || (p & 1)) { + if (p & 1) { + // hash with the one before us + if (layerNum > 0) { + let proofHashes = this.peakMerkle[layerIndex][p - 1].hash; + retBranch.branch = retBranch.branch.concat(proofHashes); + } + else { + let proofHashes = this.peaks[p - 1].hash; + retBranch.branch = retBranch.branch.concat(proofHashes); + } + } + else { + // hash with the one in front of us + if (layerNum > 0) { + let proofHashes = this.peakMerkle[layerIndex][p + 1].hash; + retBranch.branch = retBranch.branch.concat(proofHashes); + } + else { + let proofHashes = this.peaks[p + 1].hash; + retBranch.branch = retBranch.branch.concat(proofHashes); + } + } + } + p >>= 1; + } + // finished + break; + } + } + } + retBranch.branchType = this.GetBranchType(); + retBranch.nSize = this.size(); + retBranch.nIndex = pos; + retProof.setProof(retBranch); + return true; } + return false; } - async get(index) { - return this.nodes[index] - } - async set(value, index) { - this.nodes[index] = value - } - async getLeafLength() { - return this.leafLength - } - async setLeafLength(leafLength) { - return this.leafLength = leafLength - } - async getNodes() { - return this.nodes - } + + // return a vector of the bits, either 1 or 0 in each byte, to represent both the size + // of the proof by the size of the vector, and the expected bit in each position for the given + // position in a Merkle Mountain View of the specified size + GetProofBits(pos: number, mmvSize: number) { + //NOTE: Not implmented. + }; } const GetMMRProofIndex = (pos: number, mmvSize: number, extraHashes: number): InstanceType => { @@ -510,14 +528,14 @@ const GetMMRProofIndex = (pos: number, mmvSize: number, extraHashes: number): In //create an array of all the sizes while (mmvSize) { - layerSizes.push(mmvSize); - mmvSize = mmvSize >> 1 + layerSizes.push(mmvSize); + mmvSize = mmvSize >> 1 } for (let height = 0; height < layerSizes.length; height++) { - if (height == layerSizes.length - 1 || layerSizes[height] & 1) { - peakIndexes.push(height); - } + if (height == layerSizes.length - 1 || layerSizes[height] & 1) { + peakIndexes.push(height); + } } //array flip peak indexes @@ -527,73 +545,118 @@ const GetMMRProofIndex = (pos: number, mmvSize: number, extraHashes: number): In let layerSize = peakIndexes.length; for (let passThrough = (layerSize & 1); layerNum == 0 || layerSize > 1; passThrough = (layerSize & 1), layerNum++) { - layerSize = (layerSize >> 1) + passThrough; - if (layerSize) { - merkleSizes.push(layerSize); - } + layerSize = (layerSize >> 1) + passThrough; + if (layerSize) { + merkleSizes.push(layerSize); + } } //flip the merklesizes for (let i = 0; i < extraHashes; i++) { - bitPos++; + bitPos++; } let p = pos; for (let l = 0; l < layerSizes.length; l++) { - if (p & 1) { - index = index.or(new BN(1).shln(bitPos++)); + if (p & 1) { + index = index.or(new BN(1).shln(bitPos++)); - p >>= 1; + p >>= 1; - for (let i = 0; i < extraHashes; i++) { - bitPos++; - } + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } + } else { + if (layerSizes[l] > (p + 1)) { + + bitPos++; + p >>= 1; + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } } else { - if (layerSizes[l] > (p + 1)) { - bitPos++; - p >>= 1; + for (p = 0; p < peakIndexes.length; p++) { + + if (peakIndexes[p] == l) { + break; + } + } + + for (let layerNum = -1, layerSize = peakIndexes.length; layerNum == -1 || layerSize > 1; layerSize = merkleSizes[++layerNum]) { + + if (p < (layerSize - 1) || (p & 1)) { + + + if (p & 1) { + // hash with the one before us + index = index.or(new BN(1).shln(bitPos++)); + for (let i = 0; i < extraHashes; i++) { - bitPos++; + bitPos++; } - } else { - - for (p = 0; p < peakIndexes.length; p++) { + } else { + // hash with the one in front of us + bitPos++; - if (peakIndexes[p] == l) { - break; - } + for (let i = 0; i < extraHashes; i++) { + bitPos++; } + } + } + p >>= 1; + } + + break; + } - for (let layerNum = -1, layerSize = peakIndexes.length; layerNum == -1 || layerSize > 1; layerSize = merkleSizes[++layerNum]) { + } + } + return index; +} - if (p < (layerSize - 1) || (p & 1)) { +export class CPartialAttestationProof { + private EVersion = { + VERSION_INVALID: 0, + VERSION_FIRST: 1, + VERSION_LAST: 1, + VERSION_CURRENT: 1 + }; + private EType = { + TYPE_INVALID: 0, + TYPE_ATTESTATION: 1, + TYPE_LAST: 1, + TYPE_CURRENT: 1 + } - if (p & 1) { - // hash with the one before us - index = index.or(new BN(1).shln(bitPos++)); + version: number; // to enable versioning of this type of proof + type: number; // this may represent differnt types of attestations + proof: CMMRProof; // proof of the attestation in the MMR + componentsArray: AttestationData; - for (let i = 0; i < extraHashes; i++) { - bitPos++; - } - } else { - // hash with the one in front of us - bitPos++; + constructor(proof: CMMRProof = new CMMRProof(), componentsArray: AttestationData = new AttestationData()) { + this.version = this.EVersion.VERSION_CURRENT; + this.type = this.EType.TYPE_ATTESTATION; + this.proof = proof; + this.componentsArray = componentsArray; + } - for (let i = 0; i < extraHashes; i++) { - bitPos++; - } - } - } - p >>= 1; - } + checkProof(item: number): Buffer { - break; - } + const dataHash = this.componentsArray.getHash(item) + let currentIndex = 0; + const component = this.componentsArray.components.get(item); + for (let value of this.componentsArray.components.values()) { + if (component == value) { + return this.proof.proofSequence[currentIndex].safeCheck(dataHash); } + currentIndex++; + } + + return Buffer.allocUnsafe(32); } - return index; } + From f0ebfd5438281ae0e9c0bdb2801b4125957f34fc Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Mon, 29 Jan 2024 21:19:52 +0000 Subject: [PATCH 058/120] Fix Component hash --- src/__tests__/attestation/attestation.test.ts | 3 ++- src/vdxf/classes/Attestation.ts | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/__tests__/attestation/attestation.test.ts b/src/__tests__/attestation/attestation.test.ts index d15623c..097f5fb 100644 --- a/src/__tests__/attestation/attestation.test.ts +++ b/src/__tests__/attestation/attestation.test.ts @@ -68,7 +68,8 @@ describe('Serializes and deserializes attestation request', () => { const rootOfItemZero = proofOfItemZero.checkProof(0); - expect(proofResponseRoot.toString('hex')).toStrictEqual("56dbb8cb952b8f4d8648abd918136d0eb790894acf5e62dca8884e68d6d476e5"); + expect(proofResponseRoot.toString('hex')).toStrictEqual("88f2cb78088118e550e6162575a68482167d429c00337997d133fa630440f3f7"); + expect(rootOfItemZero.toString('hex')).toStrictEqual("88f2cb78088118e550e6162575a68482167d429c00337997d133fa630440f3f7"); }); diff --git a/src/vdxf/classes/Attestation.ts b/src/vdxf/classes/Attestation.ts index 6253dd4..ef07cd9 100644 --- a/src/vdxf/classes/Attestation.ts +++ b/src/vdxf/classes/Attestation.ts @@ -86,7 +86,6 @@ export class AttestationData { const bufferWriter = new BufferWriter(Buffer.alloc(this.componentDataByteLength(key))); - bufferWriter.writeCompactSize(this.components.size); const item = this.components.get(key); if(!forHash) { bufferWriter.writeCompactSize(key); From 444440ae8cf88d08e1f69a5ee7789a9544ae7ce5 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Tue, 30 Jan 2024 20:43:21 +0000 Subject: [PATCH 059/120] Add CPartialAttestationProof --- src/__tests__/attestation/attestation.test.ts | 67 +++-- src/vdxf/classes/Attestation.ts | 261 +++++++++++++----- src/vdxf/classes/MMR.ts | 143 +++++++--- src/vdxf/keys.ts | 54 ++-- 4 files changed, 377 insertions(+), 148 deletions(-) diff --git a/src/__tests__/attestation/attestation.test.ts b/src/__tests__/attestation/attestation.test.ts index 097f5fb..3522adc 100644 --- a/src/__tests__/attestation/attestation.test.ts +++ b/src/__tests__/attestation/attestation.test.ts @@ -1,12 +1,8 @@ -import { ATTESTATION_READ_REQUEST, IDENTITY_VIEW, ATTESTATION_IDENTITY_DATA, LOGIN_CONSENT_REDIRECT_VDXF_KEY } from "../../vdxf"; -import { Attestation, LoginConsentRequest, LoginConsentResponse } from "../../vdxf/classes"; +import { ATTESTATION_READ_REQUEST, IDENTITY_VIEW, ATTESTATION_IDENTITY_DATA, LOGIN_CONSENT_REDIRECT_VDXF_KEY, VerusIDSignature } from "../../vdxf"; +import { Attestation, LoginConsentRequest } from "../../vdxf/classes"; import { RedirectUri, RequestedPermission } from "../../vdxf/classes/Challenge"; import { Context } from "../../vdxf/classes/Context"; - -import { AttestationInterface, AttestationData } from "../../vdxf/classes/Attestation"; -const { randomBytes } = require('crypto') - -const SIMPLE_ATTESTATION = 1; +import {AttestationData, CPartialAttestationProof } from "../../vdxf/classes/Attestation"; describe('Serializes and deserializes attestation request', () => { test('attestation request with reply', async () => { @@ -52,24 +48,55 @@ describe('Serializes and deserializes attestation request', () => { componentsMap.set(3, { attestationKey: ATTESTATION_IDENTITY_DATA["attestor"].vdxfid, salt: Buffer.from("9067dc6a9b38dd15f985770bb819eb62de39a5d1f0e12f9a4807f78968794af4", 'hex'), value: "valu attestation@" }) componentsMap.set(4, { attestationKey: ATTESTATION_IDENTITY_DATA["documenttype"].vdxfid, salt: Buffer.from("338b6ad44179f46fc24f3ed01fd247c9664384a71ba5465aebceece8d7c45a0a", 'hex'), value: "KYC Attestation v1" }) - const signaturesForAttestation = { - "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV": - { - signature: "AYG2IQABQSAN1fp6A9NIVbxvKuOVLLU+0I+G3oQGbRtS6u4Eampfb217Cdf5FCMScQhV9kMxtjI9GWzpchmjuiTB2tctk6qT", - system: "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq" - } - }; + const signaturesForAttestation = new VerusIDSignature({ + signature: "AYG2IQABQSAN1fp6A9NIVbxvKuOVLLU+0I+G3oQGbRtS6u4Eampfb217Cdf5FCMScQhV9kMxtjI9GWzpchmjuiTB2tctk6qT", + }) - const attestationResponse = new Attestation("i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", {data: new AttestationData(componentsMap), signatures: signaturesForAttestation }); - const test = attestationResponse.createMMR(); - const proofResponseRoot = attestationResponse.rootHash(); + const attestationResponse = new Attestation({ + data: new AttestationData(componentsMap), + signature: signaturesForAttestation, + system_id: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + signing_id: "iB5PRXMHLYcNtM8dfLB6KwfJrHU2mKDYuU" + }, + ); + const proofResponseRoot = attestationResponse.rootHash(); const proofOfItemZero = attestationResponse.getProof([0]); - + const proofOfAll = attestationResponse.getProof([0, 1, 2, 3, 4]); const rootOfItemZero = proofOfItemZero.checkProof(0); - expect(proofResponseRoot.toString('hex')).toStrictEqual("88f2cb78088118e550e6162575a68482167d429c00337997d133fa630440f3f7"); - expect(rootOfItemZero.toString('hex')).toStrictEqual("88f2cb78088118e550e6162575a68482167d429c00337997d133fa630440f3f7"); + for (let i = 0; i < 5; i++) { + + const rootOfItem = proofOfAll.checkProof(i); + expect(rootOfItem.toString('hex')).toStrictEqual("bfdc433abea085fc54e65642a36139ee13f86261e104d7befe068c11702facb4"); + } + + expect(proofResponseRoot.toString('hex')).toStrictEqual("bfdc433abea085fc54e65642a36139ee13f86261e104d7befe068c11702facb4"); + expect(rootOfItemZero.toString('hex')).toStrictEqual("bfdc433abea085fc54e65642a36139ee13f86261e104d7befe068c11702facb4"); + + // check attestation serializes and deserializes correctly + + const attestationFromBuffer = new Attestation(); + + const attestationResponseBuffer = attestationResponse.toBuffer(); + attestationFromBuffer.fromBuffer(attestationResponseBuffer); + + const proofResponseRootFromBuffer = attestationResponse.rootHash(); + expect(proofResponseRootFromBuffer.toString('hex')).toStrictEqual("bfdc433abea085fc54e65642a36139ee13f86261e104d7befe068c11702facb4"); + + //check the partialproofs serialize and desserialize + + const proofItemZeroBuffer = proofOfItemZero.toBuffer(); + + const proofItemZeroFromBuffer = new CPartialAttestationProof(); + + proofItemZeroFromBuffer.fromBuffer(proofItemZeroBuffer); + + const rootOfItemZerofromBuffer = proofOfItemZero.checkProof(0); + + expect(rootOfItemZerofromBuffer.toString('hex')).toStrictEqual("bfdc433abea085fc54e65642a36139ee13f86261e104d7befe068c11702facb4"); + + }); diff --git a/src/vdxf/classes/Attestation.ts b/src/vdxf/classes/Attestation.ts index ef07cd9..214d852 100644 --- a/src/vdxf/classes/Attestation.ts +++ b/src/vdxf/classes/Attestation.ts @@ -2,13 +2,13 @@ import varuint from '../../utils/varuint' import bufferutils from '../../utils/bufferutils' import createHash = require("create-hash"); import { fromBase58Check, toBase58Check } from '../../utils/address'; -import { I_ADDR_VERSION } from '../../constants/vdxf'; -import { VDXFObject } from "../"; -import { CMerkleMountainRange, CMMRNode, CMerkleMountainView, CMMRProof, CPartialAttestationProof } from "./MMR" -const { randomBytes } = require('crypto') +import { I_ADDR_VERSION, HASH160_BYTE_LENGTH } from '../../constants/vdxf'; +import { VDXFObject, VerusIDSignature } from "../"; +import { CMerkleMountainRange, CMMRNode, CMerkleMountainView, CMMRProof } from "./MMR" +import { ATTESTATION_OBJECT, ATTESTATION_VIEW_RESPONSE } from '../keys'; +import { Hash160 } from "./Hash160"; const { BufferReader, BufferWriter } = bufferutils; - export interface AttestationInterface { type: number; attestationKey: string; @@ -17,7 +17,7 @@ export interface AttestationInterface { } export class AttestationData { - + components: Map; constructor(components: Map = new Map()) { this.components = components; @@ -39,14 +39,14 @@ export class AttestationData { return Attestation.TYPE_STRING; } - componentDataByteLength(key: number, forhash: boolean = false ): number { + componentDataByteLength(key: number, forhash: boolean = false): number { let byteLength = 0; const item = this.components.get(key); - if(!forhash){ + if (!forhash) { byteLength += varuint.encodingLength(key); //key } - if(!item.type) { + if (!item.type) { item.type = this.determineType(item.value); } byteLength += 1; //type @@ -71,7 +71,7 @@ export class AttestationData { return byteLength; } - dataByteLength(): number { + dataByteLength(): number { let byteLength = 0; byteLength += varuint.encodingLength(this.components.size) @@ -82,12 +82,12 @@ export class AttestationData { return byteLength; } - componentToDataBuffer(key: number, forHash: boolean = false): Buffer { - + componentToDataBuffer(key: number, forHash: boolean = false): Buffer { + const bufferWriter = new BufferWriter(Buffer.alloc(this.componentDataByteLength(key))); const item = this.components.get(key); - if(!forHash) { + if (!forHash) { bufferWriter.writeCompactSize(key); } bufferWriter.writeUInt8(item.type); @@ -105,12 +105,12 @@ export class AttestationData { } else { throw new Error("Invalid Attestation Type"); } - + return bufferWriter.buffer; } - toDataBuffer(): Buffer { + toDataBuffer(): Buffer { const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); bufferWriter.writeCompactSize(this.components.size); @@ -123,7 +123,7 @@ export class AttestationData { } componentsFromDataBuffer(buffer: Buffer, offset?: number): number { - + const reader = new bufferutils.BufferReader(buffer, offset); const componentsLength = reader.readCompactSize(); this.components = new Map(); @@ -144,18 +144,14 @@ export class AttestationData { const reader = new bufferutils.BufferReader(buffer, offset); - const componentsLength = reader.readCompactSize(); - - for (var i = 0; i < componentsLength; i++) { - reader.offset = this.componentsFromDataBuffer(reader.buffer, reader.offset); - } + reader.offset = this.componentsFromDataBuffer(reader.buffer, reader.offset); return reader.offset; } size(): number { return this.components.size; - } + } setData(data: Array, getSalt: Function) { @@ -207,20 +203,26 @@ export class Attestation extends VDXFObject { static TYPE_URL = 4; data: AttestationData; - signatures: { [attestor: string]: { signature: string, system: string } }; + system_id: string; + signing_id: string; + signature?: VerusIDSignature; mmr: CMerkleMountainRange; - constructor(vdxfkey: string = "", data?: { + constructor(data?: { data?: AttestationData; - signatures?: { [attestor: string]: { signature: string, system: string } }; + signature?: VerusIDSignature; mmr?: CMerkleMountainRange; - }) { + system_id: string, + signing_id: string, + }, vdxfkey: string = ATTESTATION_OBJECT.vdxfid) { super(vdxfkey); if (data) { - this.data = data.data || null; - this.signatures = data.signatures || null; - this.mmr = data.mmr || null; + this.data = data.data; + this.signature = data.signature + this.mmr = data.mmr; + this.system_id = data.system_id; + this.signing_id = data.signing_id; } } @@ -245,18 +247,19 @@ export class Attestation extends VDXFObject { let byteLength = 0; - byteLength += this.data.dataByteLength() + byteLength += this.data.dataByteLength(); - const sigKeys = Object.keys(this.signatures); - byteLength += varuint.encodingLength(sigKeys.length); + const _system_id = Hash160.fromAddress(this.system_id); + const _signing_id = Hash160.fromAddress(this.signing_id); + const _signature = this.signature + ? this.signature + : new VerusIDSignature( + { signature: "" }, + ); - for (const item of sigKeys) { - byteLength += 20; //Attestor - byteLength += 20; //System - byteLength += varuint.encodingLength(Buffer.from(this.signatures[item].signature, "base64").length); - byteLength += Buffer.from(this.signatures[item].signature, "base64").length; - - } + byteLength += _system_id.byteLength(); + byteLength += _signing_id.byteLength(); + byteLength += _signature.byteLength(); if (this.mmr) { byteLength += this.mmr.getbyteLength(); @@ -272,16 +275,17 @@ export class Attestation extends VDXFObject { bufferWriter.writeSlice(this.data.toDataBuffer()); - const objKeys = Object.keys(this.signatures); - bufferWriter.writeCompactSize(objKeys.length); - - for (const item of objKeys) { + const _system_id = Hash160.fromAddress(this.system_id); + const _signing_id = Hash160.fromAddress(this.signing_id); + const _signature = this.signature + ? this.signature + : new VerusIDSignature( + { signature: "" }, + ); - bufferWriter.writeSlice(fromBase58Check(item).hash); - bufferWriter.writeSlice(fromBase58Check(this.signatures[item].system).hash); - bufferWriter.writeVarSlice(Buffer.from(this.signatures[item].signature, "base64")) - - } + bufferWriter.writeSlice(_system_id.toBuffer()); + bufferWriter.writeSlice(_signing_id.toBuffer()); + bufferWriter.writeSlice(_signature.toBuffer()); if (this.mmr) { @@ -299,26 +303,25 @@ export class Attestation extends VDXFObject { const reader = new bufferutils.BufferReader(buffer, offset); const attestationsByteLength = reader.readCompactSize(); //dummy read - const componentsLength = reader.readCompactSize(); - if (!this.data) { this.data = new AttestationData(); } - for (var i = 0; i < componentsLength; i++) { - reader.offset = this.data.componentsFromDataBuffer(reader.buffer, reader.offset); - } + reader.offset = this.data.componentsFromDataBuffer(reader.buffer, reader.offset); - const signaturesSize = reader.readCompactSize(); - this.signatures = {}; + this.system_id = toBase58Check( + reader.readSlice(HASH160_BYTE_LENGTH), + I_ADDR_VERSION + ); - for (var i = 0; i < signaturesSize; i++) { + this.signing_id = toBase58Check( + reader.readSlice(HASH160_BYTE_LENGTH), + I_ADDR_VERSION + ); - const attestor = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); - const system = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); - const signature = reader.readVarSlice().toString('base64'); - this.signatures[attestor] = { signature, system }; - } + const _sig = new VerusIDSignature(); + reader.offset = _sig.fromBuffer(reader.buffer, reader.offset); + this.signature = _sig; const leafLength = reader.readCompactSize(); @@ -358,7 +361,7 @@ export class Attestation extends VDXFObject { return this.mmr; } - rootHash() { //TODO: spell correctly for all + rootHash() { if (!this.mmr) { this.createMMR(); @@ -374,14 +377,18 @@ export class Attestation extends VDXFObject { const view = new CMerkleMountainView(this.mmr); const attestationItems = new AttestationData() const localCMMR = new CMMRProof(); - - keys.forEach((key, index) => { + + keys.forEach((key, index) => { view.GetProof(localCMMR, key); attestationItems.components.set(key, this.data.components.get(key)); }); - const attestationAndProof = new CPartialAttestationProof(localCMMR, attestationItems); - + const attestationAndProof = new CPartialAttestationProof({ + proof: localCMMR, + componentsArray: attestationItems, + system_id: this.system_id, + signing_id: this.signing_id,}); + return attestationAndProof; } @@ -413,4 +420,124 @@ export class Attestation extends VDXFObject { return createHash("sha256").update(value).digest(); } -} \ No newline at end of file +} + +export class CPartialAttestationProof extends VDXFObject { + + private EType = { + TYPE_INVALID: 0, + TYPE_ATTESTATION: 1, + TYPE_LAST: 1 + } + + type: number; // this may represent differnt types of attestations + proof: CMMRProof; // proof of the attestation in the MMR + componentsArray: AttestationData; + system_id: string; + signing_id: string; + signature?: VerusIDSignature; + + constructor(data?: { + proof?: CMMRProof; + componentsArray?: AttestationData; + system_id: string, + signing_id: string, + }, vdxfkey: string = ATTESTATION_VIEW_RESPONSE.vdxfid) { + super(vdxfkey); + this.type = this.EType.TYPE_ATTESTATION; + if (data) { + this.proof = data.proof || new CMMRProof(); + this.componentsArray = data.componentsArray || new AttestationData(); + this.system_id = data.system_id; + this.signing_id = data.signing_id; + } + } + + dataByteLength(): number { + + let byteLength = 0; + + byteLength += varuint.encodingLength(this.type); + byteLength += this.proof.dataByteLength(); + byteLength += this.componentsArray.dataByteLength(); + + const _system_id = Hash160.fromAddress(this.system_id); + const _signing_id = Hash160.fromAddress(this.signing_id); + const _signature = this.signature + ? this.signature + : new VerusIDSignature( + { signature: "" }, + ); + + byteLength += _system_id.byteLength(); + byteLength += _signing_id.byteLength(); + byteLength += _signature.byteLength(); + + return byteLength; + + } + + toDataBuffer(): Buffer { + const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); + + bufferWriter.writeCompactSize(this.type); + bufferWriter.writeSlice(this.proof.toBuffer()); + bufferWriter.writeSlice(this.componentsArray.toDataBuffer()); + + const _system_id = Hash160.fromAddress(this.system_id); + const _signing_id = Hash160.fromAddress(this.signing_id); + const _signature = this.signature + ? this.signature + : new VerusIDSignature( + { signature: "" }, + ); + + bufferWriter.writeSlice(_system_id.toBuffer()); + bufferWriter.writeSlice(_signing_id.toBuffer()); + bufferWriter.writeSlice(_signature.toBuffer()); + + return bufferWriter.buffer; + } + + fromDataBuffer(buffer: Buffer, offset?: number): number { + + const reader = new bufferutils.BufferReader(buffer, offset); + + this.type = reader.readCompactSize(); + this.proof = new CMMRProof(); + + reader.offset = this.proof.fromDataBuffer(reader.buffer, reader.offset); + + this.system_id = toBase58Check( + reader.readSlice(HASH160_BYTE_LENGTH), + I_ADDR_VERSION + ); + + this.signing_id = toBase58Check( + reader.readSlice(HASH160_BYTE_LENGTH), + I_ADDR_VERSION + ); + + const _sig = new VerusIDSignature(); + reader.offset = _sig.fromBuffer(reader.buffer, reader.offset); + this.signature = _sig; + + return reader.offset; + } + + checkProof(item: number): Buffer { + + const dataHash = this.componentsArray.getHash(item) + let currentIndex = 0; + const component = this.componentsArray.components.get(item); + + for (let value of this.componentsArray.components.values()) { + if (component == value) { + return this.proof.proofSequence[currentIndex].safeCheck(dataHash); + } + currentIndex++; + } + + return Buffer.allocUnsafe(32); + } +} diff --git a/src/vdxf/classes/MMR.ts b/src/vdxf/classes/MMR.ts index f87c7cb..f77de41 100644 --- a/src/vdxf/classes/MMR.ts +++ b/src/vdxf/classes/MMR.ts @@ -6,7 +6,10 @@ const { Lock } = require('semaphore-async-await') import { BN } from 'bn.js'; import { AttestationData } from './Attestation'; import { VDXFObject } from "../"; +import varuint from '../../utils/varuint' +import bufferutils from '../../utils/bufferutils' +const { BufferReader, BufferWriter } = bufferutils; const BRANCH_MMRBLAKE_NODE = 2 class CLayer @@ -219,6 +222,59 @@ export class CMMRBranch { this.branch = branch; } + dataByteLength(): number { + + let length = 0; + + length += varuint.encodingLength(this.branchType); + length += varuint.encodingLength(this.nIndex); + length += varuint.encodingLength(this.nSize); + length += varuint.encodingLength(this.branch.length); + + for (let i = 0; i < this.branch.length; i++) { + length += this.branch[i].length; + } + + return length; + + } + + toBuffer(): Buffer { + + const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); + + bufferWriter.writeVarInt(new BN(this.branchType)); + bufferWriter.writeVarInt(new BN(this.nIndex)); + bufferWriter.writeVarInt(new BN(this.nSize)); + bufferWriter.writeVarInt(new BN(this.branch.length)); + + for (let i = 0; i < this.branch.length; i++) { + bufferWriter.writeSlice(this.branch[i]); + + } + + return bufferWriter.buffer; + + } + + fromBuffer(buffer: Buffer, offset?: number): number { + + const reader = new bufferutils.BufferReader(buffer, offset); + + this.branchType = reader.readCompactSize(); + this.nIndex = reader.readCompactSize(); + this.nSize = reader.readCompactSize(); + + let branchLength = reader.readCompactSize(); + + this.branch = new Array(); + + for (let i = 0; i < branchLength; i++) { + this.branch.push(reader.readSlice(32)); + } + + return reader.offset; + } digest(input) { var out = Buffer.allocUnsafe(32); @@ -259,6 +315,50 @@ export class CMMRProof { this.proofSequence.push(proof); } + dataByteLength(): number { + + let length = 0; + + length += varuint.encodingLength(this.proofSequence.length); + + for (let i = 0; i < this.proofSequence.length; i++) { + length += this.proofSequence[i].dataByteLength(); + } + + return length; + } + + toBuffer(): Buffer { + + const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); + + bufferWriter.writeVarInt(new BN(this.proofSequence.length)); + + for (let i = 0; i < this.proofSequence.length; i++) { + bufferWriter.writeSlice(this.proofSequence[i].toBuffer()); + + } + + return bufferWriter.buffer; + } + + fromDataBuffer(buffer: Buffer, offset?: number): number { + + const reader = new bufferutils.BufferReader(buffer, offset); + + let proofSequenceLength = reader.readCompactSize(); + + this.proofSequence = new Array(); + + for (let i = 0; i < proofSequenceLength; i++) { + let proof = new CMMRBranch(); + reader.offset = proof.fromBuffer(buffer, reader.offset); + this.setProof(proof); + } + + return reader.offset; + } + } //template , typename LAYER0_TYPE=LAYER_TYPE, typename HASHALGOWRITER=CBLAKE2bWriter> @@ -616,47 +716,4 @@ const GetMMRProofIndex = (pos: number, mmvSize: number, extraHashes: number): In return index; } -export class CPartialAttestationProof { - private EVersion = { - VERSION_INVALID: 0, - VERSION_FIRST: 1, - VERSION_LAST: 1, - VERSION_CURRENT: 1 - }; - - private EType = { - TYPE_INVALID: 0, - TYPE_ATTESTATION: 1, - TYPE_LAST: 1, - TYPE_CURRENT: 1 - } - - version: number; // to enable versioning of this type of proof - type: number; // this may represent differnt types of attestations - proof: CMMRProof; // proof of the attestation in the MMR - componentsArray: AttestationData; - - constructor(proof: CMMRProof = new CMMRProof(), componentsArray: AttestationData = new AttestationData()) { - this.version = this.EVersion.VERSION_CURRENT; - this.type = this.EType.TYPE_ATTESTATION; - this.proof = proof; - this.componentsArray = componentsArray; - } - - checkProof(item: number): Buffer { - - const dataHash = this.componentsArray.getHash(item) - let currentIndex = 0; - const component = this.componentsArray.components.get(item); - - for (let value of this.componentsArray.components.values()) { - if (component == value) { - return this.proof.proofSequence[currentIndex].safeCheck(dataHash); - } - currentIndex++; - } - - return Buffer.allocUnsafe(32); - } -} diff --git a/src/vdxf/keys.ts b/src/vdxf/keys.ts index 4f9caf6..f607a72 100644 --- a/src/vdxf/keys.ts +++ b/src/vdxf/keys.ts @@ -351,11 +351,29 @@ export const CURRENCY_ADDRESS: VDXFKeyInterface = { } export const ATTESTATION_RECIPIENT: VDXFKeyInterface = { - "vdxfid": "iGz3PbkrgqaqqgiRHZzLZvRR8xNMkLBkxP", - "hash160result": "f0e8cdf215f6031e0787e3a1ff1d185386b42e94", + "vdxfid": "iF9W7VBoeB1qooRBhZnbx1edN45oT6N3T1", + "hash160result": "fd9b77f956447beae6e9eba1de71d855fa800880", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::attestations.recipient" + "name": "vrsc::attestation.recipient" + } +}; + +export const ATTESTATION_OBJECT: VDXFKeyInterface = { + "vdxfid": "iKzefmmS3nMXjLTsrQ1emigirJBTK7rBTP", + "hash160result": "5d57536b22b79ea267ae71852779db21258834b5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestation.object" + } +}; + +export const ATTESTATION_VIEW_RESPONSE: VDXFKeyInterface = { + "vdxfid": "i5R9p3V1sxZ9p1NDV7nPkz1wvmQTUvuByY", + "hash160result": "872923256c56f6bda8256c5bb6a4c98d85f44c15", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestation.view.response" } }; @@ -366,51 +384,51 @@ interface VDXFIdentityData extends VDXFKeyInterface { const IDENTITY_DATA: VDXFIdentityData[] = [ { - "vdxfid": "iSSxdyTcCp8VALGBGKy8R7ATYSRuK15NkL", - "hash160result": "92cb346dd5c5886898a7ebcab6a0e4dded19fffb", + "vdxfid": "i4GqsotHGa4czCdtg2d8FVHKfJFzVyBPrM", + "hash160result": "31e7d78d45dd436cd977ac0f9ed03094bd87c208", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::attestations.identitydata.firstname" + "name": "vrsc::identitydata.firstname" }, "detail": "First Name", "name": "firstname" }, { - "vdxfid": "i3jWsqLVnYyJu78E7mw6pbD3TazwZJpuk4", - "hash160result": "03d10a9768234e11d4cc2f73238cad4e7fc6d502", + "vdxfid": "iHybTrNB1kXRrjsCtJXd6fvBKxepqMpS5Z", + "hash160result": "3c3fb99f2b33f5c20c890f36fa8cc1ff3d30119f", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::attestations.identitydata.lastname" + "name": "vrsc::identitydata.lastname" }, "detail": "Last Name", "name": "lastname" }, { - "vdxfid": "i9MRw6YUhXtP6DT8eufGnB5oRQ34TjDsdb", - "hash160result": "c886a8db81a891f9fc017001b6f6949588407940", + "vdxfid": "iNe8VaRBRFDhb6xjZ7WHNWgfM73428GN8B", + "hash160result": "5e01d5d356d517df57ea0f391c86e11a84663bd2", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::attestations.identitydata.attestor" + "name": "vrsc::identitydata.attestor" }, "detail": "Attestor", "name": "attestor" }, { - "vdxfid": "iJvFSXk2EDeEu9BkJQSwAVeiochF6AYpfF", - "hash160result": "cac8e0c062de7abf4fd0a606c2b83eea275a67a9", + "vdxfid": "iFa41TpKfvbjaEnP78BNpSA9KYNgED58ms", + "hash160result": "63730181dc037834a7b2b9e7fed49863ca1cad84", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::attestations.identitydata.identity" + "name": "vrsc::identitydata.identity" }, "detail": "Identity", "name": "identity" }, { - "vdxfid": "iLY58rsr39UB8BptNGYX63qPhcpv5N5yuC", - "hash160result": "ab812395536444a22463318c2691e886c6d925bb", + "vdxfid": "iAJUD5mgT6MHz8ymF49XUtBDRS7uvYqNWZ", + "hash160result": "e56544849c038b7cfadb0a1074ac51df9207e24a", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::attestations.type" + "name": "vrsc::attestation.type" }, "detail": "Document Type", "name": "documenttype" From aec4960672cb801ba29efc2dd1921aef3f60f1d0 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Tue, 30 Jan 2024 21:30:32 +0000 Subject: [PATCH 060/120] Serialization fixes --- src/vdxf/classes/Attestation.ts | 7 +++++-- src/vdxf/classes/MMR.ts | 12 ++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/vdxf/classes/Attestation.ts b/src/vdxf/classes/Attestation.ts index 214d852..69122b9 100644 --- a/src/vdxf/classes/Attestation.ts +++ b/src/vdxf/classes/Attestation.ts @@ -502,12 +502,15 @@ export class CPartialAttestationProof extends VDXFObject { fromDataBuffer(buffer: Buffer, offset?: number): number { const reader = new bufferutils.BufferReader(buffer, offset); - + const lengthOfBuffer = reader.readCompactSize(); //dummy read this.type = reader.readCompactSize(); + this.proof = new CMMRProof(); - reader.offset = this.proof.fromDataBuffer(reader.buffer, reader.offset); + this.componentsArray = new AttestationData(); + reader.offset =this.componentsArray.fromDataBuffer(reader.buffer, reader.offset); + this.system_id = toBase58Check( reader.readSlice(HASH160_BYTE_LENGTH), I_ADDR_VERSION diff --git a/src/vdxf/classes/MMR.ts b/src/vdxf/classes/MMR.ts index f77de41..ee64d52 100644 --- a/src/vdxf/classes/MMR.ts +++ b/src/vdxf/classes/MMR.ts @@ -243,10 +243,10 @@ export class CMMRBranch { const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); - bufferWriter.writeVarInt(new BN(this.branchType)); - bufferWriter.writeVarInt(new BN(this.nIndex)); - bufferWriter.writeVarInt(new BN(this.nSize)); - bufferWriter.writeVarInt(new BN(this.branch.length)); + bufferWriter.writeCompactSize(this.branchType); + bufferWriter.writeCompactSize(this.nIndex); + bufferWriter.writeCompactSize(this.nSize); + bufferWriter.writeCompactSize(this.branch.length); for (let i = 0; i < this.branch.length; i++) { bufferWriter.writeSlice(this.branch[i]); @@ -332,7 +332,7 @@ export class CMMRProof { const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); - bufferWriter.writeVarInt(new BN(this.proofSequence.length)); + bufferWriter.writeCompactSize(this.proofSequence.length); for (let i = 0; i < this.proofSequence.length; i++) { bufferWriter.writeSlice(this.proofSequence[i].toBuffer()); @@ -352,7 +352,7 @@ export class CMMRProof { for (let i = 0; i < proofSequenceLength; i++) { let proof = new CMMRBranch(); - reader.offset = proof.fromBuffer(buffer, reader.offset); + reader.offset = proof.fromBuffer(reader.buffer, reader.offset); this.setProof(proof); } From b360a33b82d9bb688c9f494f247b25f7be9772db Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Wed, 31 Jan 2024 17:17:53 +0000 Subject: [PATCH 061/120] Refactor VDXF Keys, Friendly Names and Functions --- src/vdxf/keymap.ts | 53 ++++++++++++++++++ src/vdxf/keys.ts | 134 ++++++++++++++++----------------------------- 2 files changed, 101 insertions(+), 86 deletions(-) create mode 100644 src/vdxf/keymap.ts diff --git a/src/vdxf/keymap.ts b/src/vdxf/keymap.ts new file mode 100644 index 0000000..d35e7c1 --- /dev/null +++ b/src/vdxf/keymap.ts @@ -0,0 +1,53 @@ +import * as keylist from './keys'; +import varuint from '../utils/varuint' + +export const keymap = Object.keys(keylist).map(x => keymap[keylist[x].vdxfid] = keylist[x]); + +export const friendlyNames = (vdfxkey) => { + + if (vdfxkey in keymap) { + + switch (vdfxkey) { + + case keylist.IDENTITY_DATA_FIRSTNAME.vdxfid: + return "First Name"; + case keylist.IDENTITY_DATA_LASTNAME.vdxfid: + return "Last Name"; + case keylist.IDENTITY_DATA_ATTESTOR.vdxfid: + return "Attestor"; + case keylist.IDENTITY_DATA_IDENTITY.vdxfid: + return "Identity"; + case keylist.ATTESTATION_TYPE.vdxfid: + return "Attestation Type"; + + } + + } else { + throw new Error("Unknown VDXF key"); + } +} + +const stringDataByteLength = function (data) { + var length = 20; + length += 1; // varint length 1 + length += 2; // ss type + ver (lengths) + length += varuint.encodingLength(Buffer.from(data, 'utf8').length); + length += Buffer.from(data, 'utf8').length; + return length; + } + +export const utils: Function = (vdfxkey) => { + + if (vdfxkey in keymap) { + + switch (vdfxkey) { + case keylist.DATA_TYPE_STRING.vdxfid: + return stringDataByteLength + } + + } else { + throw new Error("Unknown VDXF key"); + } + + +} \ No newline at end of file diff --git a/src/vdxf/keys.ts b/src/vdxf/keys.ts index f607a72..a680c53 100644 --- a/src/vdxf/keys.ts +++ b/src/vdxf/keys.ts @@ -1,4 +1,3 @@ -import varuint from '../utils/varuint' export interface VDXFKeyInterface { vdxfid: string; hash160result: string; @@ -354,8 +353,8 @@ export const ATTESTATION_RECIPIENT: VDXFKeyInterface = { "vdxfid": "iF9W7VBoeB1qooRBhZnbx1edN45oT6N3T1", "hash160result": "fd9b77f956447beae6e9eba1de71d855fa800880", "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::attestation.recipient" + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestation.recipient" } }; @@ -363,8 +362,8 @@ export const ATTESTATION_OBJECT: VDXFKeyInterface = { "vdxfid": "iKzefmmS3nMXjLTsrQ1emigirJBTK7rBTP", "hash160result": "5d57536b22b79ea267ae71852779db21258834b5", "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::attestation.object" + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestation.object" } }; @@ -372,88 +371,57 @@ export const ATTESTATION_VIEW_RESPONSE: VDXFKeyInterface = { "vdxfid": "i5R9p3V1sxZ9p1NDV7nPkz1wvmQTUvuByY", "hash160result": "872923256c56f6bda8256c5bb6a4c98d85f44c15", "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::attestation.view.response" + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestation.view.response" } }; -interface VDXFIdentityData extends VDXFKeyInterface { - detail: string; - name: string; -} - -const IDENTITY_DATA: VDXFIdentityData[] = [ - { - "vdxfid": "i4GqsotHGa4czCdtg2d8FVHKfJFzVyBPrM", - "hash160result": "31e7d78d45dd436cd977ac0f9ed03094bd87c208", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.firstname" - }, - "detail": "First Name", - "name": "firstname" - }, - { - "vdxfid": "iHybTrNB1kXRrjsCtJXd6fvBKxepqMpS5Z", - "hash160result": "3c3fb99f2b33f5c20c890f36fa8cc1ff3d30119f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.lastname" - }, - "detail": "Last Name", - "name": "lastname" - }, - { - "vdxfid": "iNe8VaRBRFDhb6xjZ7WHNWgfM73428GN8B", - "hash160result": "5e01d5d356d517df57ea0f391c86e11a84663bd2", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.attestor" - }, - "detail": "Attestor", - "name": "attestor" +export const IDENTITY_DATA_FIRSTNAME: VDXFKeyInterface = { + "vdxfid": "i4GqsotHGa4czCdtg2d8FVHKfJFzVyBPrM", + "hash160result": "31e7d78d45dd436cd977ac0f9ed03094bd87c208", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.firstname" }, - { - "vdxfid": "iFa41TpKfvbjaEnP78BNpSA9KYNgED58ms", - "hash160result": "63730181dc037834a7b2b9e7fed49863ca1cad84", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.identity" - }, - "detail": "Identity", - "name": "identity" +}; + +export const IDENTITY_DATA_LASTNAME: VDXFKeyInterface = { + "vdxfid": "iHybTrNB1kXRrjsCtJXd6fvBKxepqMpS5Z", + "hash160result": "3c3fb99f2b33f5c20c890f36fa8cc1ff3d30119f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.lastname" }, - { - "vdxfid": "iAJUD5mgT6MHz8ymF49XUtBDRS7uvYqNWZ", - "hash160result": "e56544849c038b7cfadb0a1074ac51df9207e24a", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::attestation.type" - }, - "detail": "Document Type", - "name": "documenttype" +}; + +export const IDENTITY_DATA_ATTESTOR: VDXFKeyInterface = { + "vdxfid": "iNe8VaRBRFDhb6xjZ7WHNWgfM73428GN8B", + "hash160result": "5e01d5d356d517df57ea0f391c86e11a84663bd2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.attestor" } -] -// Allow lookup by vdxfid or name -export const ATTESTATION_IDENTITY_DATA: {[vdxfid: string]: VDXFIdentityData} = {} -IDENTITY_DATA.forEach((item) => ATTESTATION_IDENTITY_DATA[item.vdxfid] = item) -IDENTITY_DATA.forEach((item) => ATTESTATION_IDENTITY_DATA[item.name] = item) - -const getbytes_std = function (data){ - var length = 20; - length += 1; // varint length 1 - length += 2; // ss type + ver (lengths) - length += varuint.encodingLength(Buffer.from(data, 'utf8').length); - length += Buffer.from(data, 'utf8').length; - return length; -} +}; -interface CVDXFData extends VDXFKeyInterface { - getbytes: Function -} +export const IDENTITY_DATA_IDENTITY: VDXFKeyInterface = { + "vdxfid": "iFa41TpKfvbjaEnP78BNpSA9KYNgED58ms", + "hash160result": "63730181dc037834a7b2b9e7fed49863ca1cad84", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.identity" + } +}; -// Defined CVDXF_Data from main Verus Daemon. -const CVDXF_Data_objects: CVDXFData[] = [ +export const ATTESTATION_TYPE: VDXFKeyInterface = { + "vdxfid": "iAJUD5mgT6MHz8ymF49XUtBDRS7uvYqNWZ", + "hash160result": "e56544849c038b7cfadb0a1074ac51df9207e24a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestation.type" + } +}; + +export const DATA_TYPE_STRING: VDXFKeyInterface = { "vdxfid": "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c", "hash160result": "e5c061641228a399169211e666de18448b7b8bab", @@ -461,10 +429,4 @@ const CVDXF_Data_objects: CVDXFData[] = [ "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", "name": "vrsc::data.type.string" }, - getbytes: getbytes_std - }, - //TODO: add more types -] - -export const CVDXF_Data = {}; -CVDXF_Data_objects.forEach((item) => CVDXF_Data[item.vdxfid] = item); +}; \ No newline at end of file From 5c35c33f30c99492f07b9391cbcb2df5f2605d87 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Wed, 31 Jan 2024 17:55:51 +0000 Subject: [PATCH 062/120] Refactor vdxfid types functions --- src/pbaas/Identity.ts | 553 +++++++++++++++++++++--------------------- src/vdxf/index.ts | 1 + src/vdxf/keymap.ts | 26 -- 3 files changed, 274 insertions(+), 306 deletions(-) diff --git a/src/pbaas/Identity.ts b/src/pbaas/Identity.ts index f45c8c3..2009c87 100644 --- a/src/pbaas/Identity.ts +++ b/src/pbaas/Identity.ts @@ -4,7 +4,7 @@ import { BigNumber } from '../utils/types/BigNumber'; import { Principal } from './Principal'; import { fromBase58Check, toBase58Check } from '../utils/address'; import { I_ADDR_VERSION } from '../constants/vdxf'; -import { CVDXF_Data } from "../vdxf"; +import { DATA_TYPE_STRING, keymap } from "../vdxf"; import { R_ADDR_VERSION } from '../constants/vdxf'; import { BN } from 'bn.js'; const bech32 = require('bech32') @@ -14,7 +14,7 @@ const VERSION_INVALID = 0; const { BufferReader, BufferWriter } = bufferutils -function fromBech32 (address) { +function fromBech32(address) { var result = bech32.decode(address) var data = bech32.fromWords(result.words.slice(1)) @@ -49,369 +49,362 @@ function convertBits(data, from, to, strictMode) { ++index; } } else { - throw new Error("Input cannot be converted") + throw new Error("Input cannot be converted") } return result; } -function decodeSaplingAddress (address) { +function decodeSaplingAddress(address) { const result = fromBech32(address) const data = convertBits(result.data, 5, 8, false); - return {d: data.slice(0,10), pk_d: data.slice(10)} + return { d: data.slice(0, 10), pk_d: data.slice(10) } } export class Identity extends Principal { - parent: string; - system_id: string; - name: string; - contentmap: Map; - contentmultimap: Map>; - revocation_authority: string; - recovery_authority: string; - private_addresses: Array<{d: Buffer, pk_d: Buffer}>; - timelock: number; - - constructor (data?: { - version?: BigNumber | number, - flags?: BigNumber | number, - primaryaddresses?: Array, - minimumsignatures?: BigNumber | number, - parent?: string, - systemid?: string, - name?: string, - contentmap?: Map; - contentmultimap?: Map> | {[name: string]: Array<{[name: string]: string}>}; - revocationauthority?: string; - recoveryauthority?: string; - private_addresses?: Array<{d: Buffer, pk_d: Buffer}> | []; - timelock?: number; - identityaddress?: string; - - }) { - - super (data) - - if (data?.parent) this.parent = data.parent; - if (data?.name) this.name = data.name; - if (data?.systemid) this.system_id = data.systemid; - this.contentmap = data?.contentmap ? new Map(data.contentmap) : new Map(); - if (data?.contentmultimap) { - - if (typeof data.contentmultimap == "object") { - - this.contentmultimap = contentmultimapFromObject(data.contentmultimap); + parent: string; + system_id: string; + name: string; + contentmap: Map; + contentmultimap: Map>; + revocation_authority: string; + recovery_authority: string; + private_addresses: Array<{ d: Buffer, pk_d: Buffer }>; + timelock: number; + + constructor(data?: { + version?: BigNumber | number, + flags?: BigNumber | number, + primaryaddresses?: Array, + minimumsignatures?: BigNumber | number, + parent?: string, + systemid?: string, + name?: string, + contentmap?: Map; + contentmultimap?: Map> | { [name: string]: Array<{ [name: string]: string }> }; + revocationauthority?: string; + recoveryauthority?: string; + private_addresses?: Array<{ d: Buffer, pk_d: Buffer }> | []; + timelock?: number; + identityaddress?: string; + + }) { + + super(data) + + if (data?.parent) this.parent = data.parent; + if (data?.name) this.name = data.name; + if (data?.systemid) this.system_id = data.systemid; + this.contentmap = data?.contentmap ? new Map(data.contentmap) : new Map(); + if (data?.contentmultimap) { + + if (typeof data.contentmultimap == "object") { + + this.contentmultimap = contentmultimapFromObject(data.contentmultimap); - } - else { - throw new Error("multimap root not an object") - } - - } - if (data?.revocationauthority) this.revocation_authority = data.revocationauthority - if (data?.recoveryauthority) this.recovery_authority = data.recoveryauthority - if (data?.timelock) this.timelock = data.timelock - - this.private_addresses = data?.private_addresses?.map ( (addr) => {return decodeSaplingAddress(addr)}) || new Array(); + } + else { + throw new Error("multimap root not an object") } - dataByteLength() { - let byteLength = 0; + } + if (data?.revocationauthority) this.revocation_authority = data.revocationauthority + if (data?.recoveryauthority) this.recovery_authority = data.recoveryauthority + if (data?.timelock) this.timelock = data.timelock - byteLength += this._dataByteLength(); //get the principal byte length - byteLength += 20; //uint160 parent - byteLength += varuint.encodingLength(Buffer.from(this.name, "utf8").length); // name compact size - byteLength += Buffer.from(this.name, "utf8").length; // name_in_utf8_bytes + this.private_addresses = data?.private_addresses?.map((addr) => { return decodeSaplingAddress(addr) }) || new Array(); + } - // contentmultimap - if (this.version.toNumber() >= VERSION_PBAAS) { + dataByteLength() { + let byteLength = 0; - byteLength += this.contentmultimap ? varuint.encodingLength(this.contentmultimap.size) : 0 + byteLength += this._dataByteLength(); //get the principal byte length + byteLength += 20; //uint160 parent + byteLength += varuint.encodingLength(Buffer.from(this.name, "utf8").length); // name compact size + byteLength += Buffer.from(this.name, "utf8").length; // name_in_utf8_bytes - if (this.contentmultimap) { - for (const [key, value] of this.contentmultimap.entries()) { - byteLength += 20; //uint160 key - byteLength += varuint.encodingLength(value.length) - for (const n of value) { - byteLength += varuint.encodingLength(n.length); - byteLength += n.length; - } - } - } - } + // contentmultimap + if (this.version.toNumber() >= VERSION_PBAAS) { - //contentmap - if (this.version.toNumber() < VERSION_PBAAS) { - byteLength += varuint.encodingLength(this.contentmap.size) - for (const m in this.contentmap) { - byteLength += 20; //uint160 key - byteLength += 32; //uint256 hash - } - } - //contentmap2 - byteLength += varuint.encodingLength(this.contentmap.size) - for (const m in this.contentmap) { + byteLength += this.contentmultimap ? varuint.encodingLength(this.contentmultimap.size) : 0 + + if (this.contentmultimap) { + for (const [key, value] of this.contentmultimap.entries()) { byteLength += 20; //uint160 key - byteLength += 32; //uint256 hash + byteLength += varuint.encodingLength(value.length) + for (const n of value) { + byteLength += varuint.encodingLength(n.length); + byteLength += n.length; + } } + } + } - byteLength += 20; //uint160 revocation authority - byteLength += 20; //uint160 recovery authority + //contentmap + if (this.version.toNumber() < VERSION_PBAAS) { + byteLength += varuint.encodingLength(this.contentmap.size) + for (const m in this.contentmap) { + byteLength += 20; //uint160 key + byteLength += 32; //uint256 hash + } + } + //contentmap2 + byteLength += varuint.encodingLength(this.contentmap.size) + for (const m in this.contentmap) { + byteLength += 20; //uint160 key + byteLength += 32; //uint256 hash + } - // privateaddresses - byteLength += varuint.encodingLength(this.private_addresses.length | 0); + byteLength += 20; //uint160 revocation authority + byteLength += 20; //uint160 recovery authority - for (const n of this.private_addresses) { - byteLength += varuint.encodingLength(n.d.length); - byteLength += n.d.length; // const 11 - byteLength += 32; //pk_d hash - } + // privateaddresses + byteLength += varuint.encodingLength(this.private_addresses.length | 0); - // post PBAAS - if (this.version.toNumber() >= VERSION_PBAAS) { - byteLength += 20; //uint160 systemid - byteLength += 4; //uint32 unlockafter - } + for (const n of this.private_addresses) { + byteLength += varuint.encodingLength(n.d.length); + byteLength += n.d.length; // const 11 + byteLength += 32; //pk_d hash + } - return byteLength + // post PBAAS + if (this.version.toNumber() >= VERSION_PBAAS) { + byteLength += 20; //uint160 systemid + byteLength += 4; //uint32 unlockafter } - toBuffer() { - const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())) + return byteLength + } - bufferWriter.writeSlice(this._toBuffer()); - bufferWriter.writeSlice(fromBase58Check(this.parent).hash); - bufferWriter.writeCompactSize(Buffer.from(this.name, "utf8").length) - bufferWriter.writeSlice(Buffer.from(this.name, "utf8")); + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())) - //contentmultimap - if (this.version.toNumber() >= VERSION_PBAAS) { + bufferWriter.writeSlice(this._toBuffer()); + bufferWriter.writeSlice(fromBase58Check(this.parent).hash); + bufferWriter.writeCompactSize(Buffer.from(this.name, "utf8").length) + bufferWriter.writeSlice(Buffer.from(this.name, "utf8")); - bufferWriter.writeCompactSize(this.contentmultimap.size) + //contentmultimap + if (this.version.toNumber() >= VERSION_PBAAS) { - for (const [key, value] of this.contentmultimap.entries()) { + bufferWriter.writeCompactSize(this.contentmultimap.size) - bufferWriter.writeSlice(fromBase58Check(key).hash) - bufferWriter.writeCompactSize(value.length) - - for (const n of value) { - bufferWriter.writeCompactSize(n.length) - bufferWriter.writeSlice(n); - - } - } - } + for (const [key, value] of this.contentmultimap.entries()) { + + bufferWriter.writeSlice(fromBase58Check(key).hash) + bufferWriter.writeCompactSize(value.length) + + for (const n of value) { + bufferWriter.writeCompactSize(n.length) + bufferWriter.writeSlice(n); - //contentmap - if (this.version.toNumber() < VERSION_PBAAS) { - bufferWriter.writeCompactSize(this.contentmap.size) - for (const [key, value] of this.contentmap.entries()) { - bufferWriter.writeSlice(value); - } - } - - //contentmap2 - bufferWriter.writeCompactSize(this.contentmap.size) - for (const [key, value] of this.contentmap.entries()) { - bufferWriter.writeSlice(value); } + } + } - bufferWriter.writeSlice(fromBase58Check(this.revocation_authority).hash) - bufferWriter.writeSlice(fromBase58Check(this.recovery_authority).hash) + //contentmap + if (this.version.toNumber() < VERSION_PBAAS) { + bufferWriter.writeCompactSize(this.contentmap.size) + for (const [key, value] of this.contentmap.entries()) { + bufferWriter.writeSlice(value); + } + } - // privateaddresses - bufferWriter.writeCompactSize(this.private_addresses.length); + //contentmap2 + bufferWriter.writeCompactSize(this.contentmap.size) + for (const [key, value] of this.contentmap.entries()) { + bufferWriter.writeSlice(value); + } - for (const n of this.private_addresses) { - bufferWriter.writeCompactSize(n.d.length); - bufferWriter.writeSlice(n.d); - bufferWriter.writeSlice(n.pk_d); - } + bufferWriter.writeSlice(fromBase58Check(this.revocation_authority).hash) + bufferWriter.writeSlice(fromBase58Check(this.recovery_authority).hash) - // post PBAAS - if (this.version.toNumber() >= VERSION_PBAAS) { - bufferWriter.writeSlice(fromBase58Check(this.system_id).hash) - bufferWriter.writeUInt32(this.timelock) - } - return bufferWriter.buffer + // privateaddresses + bufferWriter.writeCompactSize(this.private_addresses.length); + + for (const n of this.private_addresses) { + bufferWriter.writeCompactSize(n.d.length); + bufferWriter.writeSlice(n.d); + bufferWriter.writeSlice(n.pk_d); } - fromBuffer(buffer, offset: number = 0) { - const reader = new BufferReader(buffer, offset); + // post PBAAS + if (this.version.toNumber() >= VERSION_PBAAS) { + bufferWriter.writeSlice(fromBase58Check(this.system_id).hash) + bufferWriter.writeUInt32(this.timelock) + } + return bufferWriter.buffer + } - reader.offset = this._fromBuffer(reader.buffer, reader.offset); + fromBuffer(buffer, offset: number = 0) { + const reader = new BufferReader(buffer, offset); - this.parent = toBase58Check(reader.readSlice(20), I_ADDR_VERSION) + reader.offset = this._fromBuffer(reader.buffer, reader.offset); - this.name = Buffer.from(reader.readVarSlice()).toString('utf8') + this.parent = toBase58Check(reader.readSlice(20), I_ADDR_VERSION) - //contentmultimap - if (this.version.toNumber() >= VERSION_PBAAS) { + this.name = Buffer.from(reader.readVarSlice()).toString('utf8') - const contentMapSize = reader.readVarInt(); - this.contentmultimap = new Map(); + //contentmultimap + if (this.version.toNumber() >= VERSION_PBAAS) { - for (var i = 0; i < contentMapSize.toNumber(); i++) { - - const contentMapKey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION) - var innervector = reader.readVector(); - - this.contentmultimap.set(contentMapKey, innervector); + const contentMapSize = reader.readVarInt(); + this.contentmultimap = new Map(); - } - } + for (var i = 0; i < contentMapSize.toNumber(); i++) { - // contentmap - if (this.version.toNumber() < VERSION_PBAAS) { + const contentMapKey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION) + var innervector = reader.readVector(); - const contentMultiMapSize = reader.readVarInt(); - this.contentmap = new Map(); + this.contentmultimap.set(contentMapKey, innervector); - for (var i = 0; i < contentMultiMapSize.toNumber(); i++) { - - const contentMapKey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION) - const hash = reader.readSlice(32); - this.contentmap.set(contentMapKey, hash); - } - } + } + } - const contentMapSize = reader.readVarInt(); - this.contentmap = new Map(); + // contentmap + if (this.version.toNumber() < VERSION_PBAAS) { - for (var i = 0; i < contentMapSize.toNumber(); i++) { - const contentMapKey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION) - const hash = reader.readSlice(32); - this.contentmap.set(contentMapKey, hash); - } + const contentMultiMapSize = reader.readVarInt(); + this.contentmap = new Map(); - this.revocation_authority = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); - this.recovery_authority = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + for (var i = 0; i < contentMultiMapSize.toNumber(); i++) { - const numPrivateAddresses = reader.readVarInt(); + const contentMapKey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION) + const hash = reader.readSlice(32); + this.contentmap.set(contentMapKey, hash); + } + } - for (var i = 0; i < numPrivateAddresses.toNumber(); i++) { - this.private_addresses.push({d: Buffer.from(reader.readVector()), pk_d: reader.readSlice(20)}) - } - - if (this.version.toNumber() >= VERSION_PBAAS) { - this.system_id = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); - this.timelock = reader.readUInt32(); - } + const contentMapSize = reader.readVarInt(); + this.contentmap = new Map(); - return reader.offset; + for (var i = 0; i < contentMapSize.toNumber(); i++) { + const contentMapKey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION) + const hash = reader.readSlice(32); + this.contentmap.set(contentMapKey, hash); } + + this.revocation_authority = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + this.recovery_authority = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + + const numPrivateAddresses = reader.readVarInt(); + + for (var i = 0; i < numPrivateAddresses.toNumber(); i++) { + this.private_addresses.push({ d: Buffer.from(reader.readVector()), pk_d: reader.readSlice(20) }) + } + + if (this.version.toNumber() >= VERSION_PBAAS) { + this.system_id = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + this.timelock = reader.readUInt32(); + } + + return reader.offset; + } } -function contentmultimapFromObject (input) { - - var contentmultimap = new Map; - var nVersion = 1; - const keys = Object.keys(input); - const values = keys.map((item) => input[item]); - - for (var i = 0; i < keys.length; i++) - { - try - { - const key = fromBase58Check(keys[i]).hash; - if (key != null) - { - if (Array.isArray(values[i])) - { - for (var j = 0; j < values[i].length; j++) - { - const oneValue = values[i][j]; - var items = []; - if (typeof oneValue == "string") - { - items.push(Buffer.from(oneValue, 'hex')); - } - else if (typeof oneValue == "object") - { - const mapBytesValue = VectorEncodeVDXFUni(oneValue); - if (mapBytesValue.length === 0 || nVersion == VERSION_INVALID) - { - nVersion = VERSION_INVALID; - throw new Error("object not as expected") - } - items.push(mapBytesValue); - } - } - contentmultimap.set(keys[i] ,items); - } - else if (typeof values[i] === "string") - { - if (isHexByteString(values[i])) - { - contentmultimap.set(keys[i], Buffer.from(items)); - } - else - { - nVersion = VERSION_INVALID; - throw new Error("string not formatted as hex") - - } - } - else if (typeof values[i] === "object") - { - const mapBytesValue = VectorEncodeVDXFUni(values[i]); - var item = []; - if (mapBytesValue.length === 0 || nVersion == VERSION_INVALID) - { - nVersion = VERSION_INVALID; - throw new Error("object not as expected") - } - item.push(mapBytesValue); - contentmultimap.set(keys[i] ,item); - } - else - { - nVersion = VERSION_INVALID; - throw new Error("not valid content multimap sub type") - } +function contentmultimapFromObject(input) { + + var contentmultimap = new Map; + var nVersion = 1; + const keys = Object.keys(input); + const values = keys.map((item) => input[item]); + + for (var i = 0; i < keys.length; i++) { + try { + const key = fromBase58Check(keys[i]).hash; + if (key != null) { + if (Array.isArray(values[i])) { + for (var j = 0; j < values[i].length; j++) { + const oneValue = values[i][j]; + var items = []; + if (typeof oneValue == "string") { + items.push(Buffer.from(oneValue, 'hex')); } - else - { + else if (typeof oneValue == "object") { + const mapBytesValue = VectorEncodeVDXFUni(oneValue); + if (mapBytesValue.length === 0 || nVersion == VERSION_INVALID) { nVersion = VERSION_INVALID; - throw new Error("key in multimap == null") + throw new Error("object not as expected") + } + items.push(mapBytesValue); } + } + contentmultimap.set(keys[i], items); + } + else if (typeof values[i] === "string") { + if (isHexByteString(values[i])) { + contentmultimap.set(keys[i], Buffer.from(items)); + } + else { + nVersion = VERSION_INVALID; + throw new Error("string not formatted as hex") + + } } - catch (e) - { + else if (typeof values[i] === "object") { + const mapBytesValue = VectorEncodeVDXFUni(values[i]); + var item = []; + if (mapBytesValue.length === 0 || nVersion == VERSION_INVALID) { nVersion = VERSION_INVALID; - throw new Error(e.message) + throw new Error("object not as expected") + } + item.push(mapBytesValue); + contentmultimap.set(keys[i], item); + } + else { + nVersion = VERSION_INVALID; + throw new Error("not valid content multimap sub type") } + } + else { + nVersion = VERSION_INVALID; + throw new Error("key in multimap == null") + } } - return contentmultimap; + catch (e) { + nVersion = VERSION_INVALID; + throw new Error(e.message) + } + } + return contentmultimap; } -function VectorEncodeVDXFUni (obj) { - + +function VectorEncodeVDXFUni(obj) { + const keys = Object.keys(obj); const values = keys.map((item) => obj[item]); var bufsize = 0; - for (var i = 0; i < keys.length; i++) { - if (CVDXF_Data[keys[i]] ) { - bufsize += CVDXF_Data[keys[i]].getbytes(values[i]); + + for (var i = 0; i < keys.length; i++) { + if (keys[i] == DATA_TYPE_STRING.vdxfid) { + bufsize += 20; + bufsize += 1; // varint length 1 + bufsize += 2; // ss type + ver (lengths) + bufsize += varuint.encodingLength(Buffer.from(values[i], 'utf8').length); + bufsize += Buffer.from(values[i], 'utf8').length; } else { throw new Error("VDXF key not found: " + keys[i]) } + // TODO: add alltypes } const bufferWriter = new BufferWriter(Buffer.alloc(bufsize)) for (var i = 0; i < keys.length; i++) { - if (CVDXF_Data[keys[i]] && CVDXF_Data[keys[i]].qualifiedname.name === "vrsc::data.type.string" ) { - bufferWriter.writeSlice(fromBase58Check(CVDXF_Data[keys[i]].vdxfid).hash) + if (keys[i] === DATA_TYPE_STRING.vdxfid) { + bufferWriter.writeSlice(fromBase58Check(keys[i]).hash) bufferWriter.writeVarInt(new BN(1)); bufferWriter.writeVarInt(new BN(Buffer.from(values[i], 'utf8').length + 3)) //NOTE 3 is from ss type + ver + vdxfidver - bufferWriter.writeCompactSize(Buffer.from(values[i], 'utf8').length); - bufferWriter.writeSlice(Buffer.from(values[i], 'utf8')) - } + bufferWriter.writeVarSlice(Buffer.from(values[i], 'utf8')); + } + else { + throw new Error("VDXF key not found: " + keys[i]) + } // TODO: add alltypes } return bufferWriter.buffer; diff --git a/src/vdxf/index.ts b/src/vdxf/index.ts index 599492f..d81826f 100644 --- a/src/vdxf/index.ts +++ b/src/vdxf/index.ts @@ -11,6 +11,7 @@ import { BN } from "bn.js"; import { BigNumber } from "../utils/types/BigNumber"; export * from './keys' export * from './scopes' +export * from './keymap' export interface VDXFObjectInterface { vdxfkey: string; diff --git a/src/vdxf/keymap.ts b/src/vdxf/keymap.ts index d35e7c1..7d1499b 100644 --- a/src/vdxf/keymap.ts +++ b/src/vdxf/keymap.ts @@ -19,35 +19,9 @@ export const friendlyNames = (vdfxkey) => { return "Identity"; case keylist.ATTESTATION_TYPE.vdxfid: return "Attestation Type"; - - } - - } else { - throw new Error("Unknown VDXF key"); - } -} - -const stringDataByteLength = function (data) { - var length = 20; - length += 1; // varint length 1 - length += 2; // ss type + ver (lengths) - length += varuint.encodingLength(Buffer.from(data, 'utf8').length); - length += Buffer.from(data, 'utf8').length; - return length; - } - -export const utils: Function = (vdfxkey) => { - - if (vdfxkey in keymap) { - - switch (vdfxkey) { - case keylist.DATA_TYPE_STRING.vdxfid: - return stringDataByteLength } } else { throw new Error("Unknown VDXF key"); } - - } \ No newline at end of file From 657e9aaf8a349e18362ba28de2ad15dff524a200 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Thu, 1 Feb 2024 21:29:39 +0000 Subject: [PATCH 063/120] Create classes for Attestation data types --- src/__tests__/attestation/attestation.test.ts | 39 ++-- src/pbaas/Identity.ts | 4 +- src/vdxf/classes/Attestation.ts | 210 +----------------- src/vdxf/classes/MMR.ts | 1 - src/vdxf/classes/attestationData.ts | 204 +++++++++++++++++ src/vdxf/classes/index.ts | 1 + src/vdxf/index.ts | 6 + src/vdxf/keymap.ts | 28 +-- 8 files changed, 239 insertions(+), 254 deletions(-) create mode 100644 src/vdxf/classes/attestationData.ts diff --git a/src/__tests__/attestation/attestation.test.ts b/src/__tests__/attestation/attestation.test.ts index 3522adc..c7e7af9 100644 --- a/src/__tests__/attestation/attestation.test.ts +++ b/src/__tests__/attestation/attestation.test.ts @@ -1,8 +1,9 @@ -import { ATTESTATION_READ_REQUEST, IDENTITY_VIEW, ATTESTATION_IDENTITY_DATA, LOGIN_CONSENT_REDIRECT_VDXF_KEY, VerusIDSignature } from "../../vdxf"; +import { ATTESTATION_READ_REQUEST, IDENTITY_VIEW, IDENTITY_DATA_FIRSTNAME, LOGIN_CONSENT_REDIRECT_VDXF_KEY, VerusIDSignature, IDENTITY_DATA_LASTNAME, IDENTITY_DATA_ATTESTOR, IDENTITY_DATA_IDENTITY, ATTESTATION_TYPE } from "../../vdxf"; import { Attestation, LoginConsentRequest } from "../../vdxf/classes"; import { RedirectUri, RequestedPermission } from "../../vdxf/classes/Challenge"; import { Context } from "../../vdxf/classes/Context"; -import {AttestationData, CPartialAttestationProof } from "../../vdxf/classes/Attestation"; +import { CPartialAttestationProof } from "../../vdxf/classes/Attestation"; +import { AttestationData, AttestationDataType } from "../../vdxf/classes/attestationData"; describe('Serializes and deserializes attestation request', () => { test('attestation request with reply', async () => { @@ -19,11 +20,11 @@ describe('Serializes and deserializes attestation request', () => { new RequestedPermission({ accepted_attestors: ["iC9x9VZ2XMop7spFzeXqSKX8WqmrG9cu41"], attestation_keys: [ - ATTESTATION_IDENTITY_DATA["firstname"].vdxfid, - ATTESTATION_IDENTITY_DATA["lastname"].vdxfid, - ATTESTATION_IDENTITY_DATA["attestor"].vdxfid, - ATTESTATION_IDENTITY_DATA["identity"].vdxfid, - ATTESTATION_IDENTITY_DATA["documenttype"].vdxfid] + IDENTITY_DATA_FIRSTNAME.vdxfid, + IDENTITY_DATA_LASTNAME.vdxfid, + IDENTITY_DATA_ATTESTOR.vdxfid, + IDENTITY_DATA_IDENTITY.vdxfid, + ATTESTATION_TYPE.vdxfid] }, ATTESTATION_READ_REQUEST.vdxfid)], session_id: "iRQZGW36o3RcVR1xyVT1qWdAKdxp3wUyrh", redirect_uris: [ @@ -42,11 +43,11 @@ describe('Serializes and deserializes attestation request', () => { const componentsMap = new Map(); - componentsMap.set(0, { attestationKey: ATTESTATION_IDENTITY_DATA["firstname"].vdxfid, salt: Buffer.from("8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210", 'hex'), value: "Chris" }) - componentsMap.set(1, { attestationKey: ATTESTATION_IDENTITY_DATA["lastname"].vdxfid, salt: Buffer.from("7c3920940db4385cd305557a57a8df33346712096e76b58d7c4ace05e17b90a2", 'hex'), value: "Monkins" }) - componentsMap.set(2, { attestationKey: ATTESTATION_IDENTITY_DATA["identity"].vdxfid, salt: Buffer.from("ce662d61a20ae211728cdb1b924628c84edfe0fcbd59a86f56a125ad73689ac1", 'hex'), value: "chad@" }) - componentsMap.set(3, { attestationKey: ATTESTATION_IDENTITY_DATA["attestor"].vdxfid, salt: Buffer.from("9067dc6a9b38dd15f985770bb819eb62de39a5d1f0e12f9a4807f78968794af4", 'hex'), value: "valu attestation@" }) - componentsMap.set(4, { attestationKey: ATTESTATION_IDENTITY_DATA["documenttype"].vdxfid, salt: Buffer.from("338b6ad44179f46fc24f3ed01fd247c9664384a71ba5465aebceece8d7c45a0a", 'hex'), value: "KYC Attestation v1" }) + componentsMap.set(0, new AttestationDataType("Chris", IDENTITY_DATA_FIRSTNAME.vdxfid, "8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210")); + componentsMap.set(1, new AttestationDataType("Monkins", IDENTITY_DATA_LASTNAME.vdxfid, "7c3920940db4385cd305557a57a8df33346712096e76b58d7c4ace05e17b90a2")); + componentsMap.set(2, new AttestationDataType("chad@", IDENTITY_DATA_IDENTITY.vdxfid, "ce662d61a20ae211728cdb1b924628c84edfe0fcbd59a86f56a125ad73689ac1")); + componentsMap.set(3, new AttestationDataType("valu attestation@", IDENTITY_DATA_ATTESTOR.vdxfid, "9067dc6a9b38dd15f985770bb819eb62de39a5d1f0e12f9a4807f78968794af4")); + componentsMap.set(4, new AttestationDataType("KYC Attestation v1", ATTESTATION_TYPE.vdxfid, "338b6ad44179f46fc24f3ed01fd247c9664384a71ba5465aebceece8d7c45a0a")); const signaturesForAttestation = new VerusIDSignature({ signature: "AYG2IQABQSAN1fp6A9NIVbxvKuOVLLU+0I+G3oQGbRtS6u4Eampfb217Cdf5FCMScQhV9kMxtjI9GWzpchmjuiTB2tctk6qT", @@ -68,11 +69,11 @@ describe('Serializes and deserializes attestation request', () => { for (let i = 0; i < 5; i++) { const rootOfItem = proofOfAll.checkProof(i); - expect(rootOfItem.toString('hex')).toStrictEqual("bfdc433abea085fc54e65642a36139ee13f86261e104d7befe068c11702facb4"); + expect(rootOfItem.toString('hex')).toStrictEqual("bfa5d560098bcc51df0341b18922db0987907febe4eb44958866c015c36919f0"); } - expect(proofResponseRoot.toString('hex')).toStrictEqual("bfdc433abea085fc54e65642a36139ee13f86261e104d7befe068c11702facb4"); - expect(rootOfItemZero.toString('hex')).toStrictEqual("bfdc433abea085fc54e65642a36139ee13f86261e104d7befe068c11702facb4"); + expect(proofResponseRoot.toString('hex')).toStrictEqual("bfa5d560098bcc51df0341b18922db0987907febe4eb44958866c015c36919f0"); + expect(rootOfItemZero.toString('hex')).toStrictEqual("bfa5d560098bcc51df0341b18922db0987907febe4eb44958866c015c36919f0"); // check attestation serializes and deserializes correctly @@ -82,7 +83,7 @@ describe('Serializes and deserializes attestation request', () => { attestationFromBuffer.fromBuffer(attestationResponseBuffer); const proofResponseRootFromBuffer = attestationResponse.rootHash(); - expect(proofResponseRootFromBuffer.toString('hex')).toStrictEqual("bfdc433abea085fc54e65642a36139ee13f86261e104d7befe068c11702facb4"); + expect(proofResponseRootFromBuffer.toString('hex')).toStrictEqual("bfa5d560098bcc51df0341b18922db0987907febe4eb44958866c015c36919f0"); //check the partialproofs serialize and desserialize @@ -94,10 +95,6 @@ describe('Serializes and deserializes attestation request', () => { const rootOfItemZerofromBuffer = proofOfItemZero.checkProof(0); - expect(rootOfItemZerofromBuffer.toString('hex')).toStrictEqual("bfdc433abea085fc54e65642a36139ee13f86261e104d7befe068c11702facb4"); - - + expect(rootOfItemZerofromBuffer.toString('hex')).toStrictEqual("bfa5d560098bcc51df0341b18922db0987907febe4eb44958866c015c36919f0"); }); - - }); diff --git a/src/pbaas/Identity.ts b/src/pbaas/Identity.ts index 2009c87..4c04ad8 100644 --- a/src/pbaas/Identity.ts +++ b/src/pbaas/Identity.ts @@ -3,7 +3,7 @@ import bufferutils from '../utils/bufferutils' import { BigNumber } from '../utils/types/BigNumber'; import { Principal } from './Principal'; import { fromBase58Check, toBase58Check } from '../utils/address'; -import { I_ADDR_VERSION } from '../constants/vdxf'; +import { I_ADDR_VERSION, HASH160_BYTE_LENGTH } from '../constants/vdxf'; import { DATA_TYPE_STRING, keymap } from "../vdxf"; import { R_ADDR_VERSION } from '../constants/vdxf'; import { BN } from 'bn.js'; @@ -383,7 +383,7 @@ function VectorEncodeVDXFUni(obj) { for (var i = 0; i < keys.length; i++) { if (keys[i] == DATA_TYPE_STRING.vdxfid) { - bufsize += 20; + bufsize += HASH160_BYTE_LENGTH; bufsize += 1; // varint length 1 bufsize += 2; // ss type + ver (lengths) bufsize += varuint.encodingLength(Buffer.from(values[i], 'utf8').length); diff --git a/src/vdxf/classes/Attestation.ts b/src/vdxf/classes/Attestation.ts index 69122b9..20be59c 100644 --- a/src/vdxf/classes/Attestation.ts +++ b/src/vdxf/classes/Attestation.ts @@ -7,194 +7,10 @@ import { VDXFObject, VerusIDSignature } from "../"; import { CMerkleMountainRange, CMMRNode, CMerkleMountainView, CMMRProof } from "./MMR" import { ATTESTATION_OBJECT, ATTESTATION_VIEW_RESPONSE } from '../keys'; import { Hash160 } from "./Hash160"; +import { AttestationData } from './attestationData'; const { BufferReader, BufferWriter } = bufferutils; -export interface AttestationInterface { - type: number; - attestationKey: string; - salt: Buffer; - value: string | Buffer | URL; -} - -export class AttestationData { - - components: Map; - constructor(components: Map = new Map()) { - this.components = components; - } - - determineType(value: string | Buffer | URL) { - if (Buffer.isBuffer(value)) { - return Attestation.TYPE_BYTES; - } - // Check if it's a Base64 string - // Base64 string pattern: contains only Base64 characters and possibly padding at the end - const base64Pattern = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/; - if (typeof value === 'string' && base64Pattern.test(value)) { - return Attestation.TYPE_BASE64; - } - if (value instanceof URL) { - return Attestation.TYPE_URL; - } - return Attestation.TYPE_STRING; - } - - componentDataByteLength(key: number, forhash: boolean = false): number { - let byteLength = 0; - - const item = this.components.get(key); - if (!forhash) { - byteLength += varuint.encodingLength(key); //key - } - if (!item.type) { - item.type = this.determineType(item.value); - } - byteLength += 1; //type - byteLength += 20; //vdxfid - byteLength += 32; //salt - if (item.type === Attestation.TYPE_STRING) { - byteLength += varuint.encodingLength(Buffer.from(item.value as string, "utf8").length); - byteLength += Buffer.from(item.value as string, "utf8").length; - } else if (item.type === Attestation.TYPE_BYTES) { - byteLength += varuint.encodingLength((item.value as Buffer).length); - byteLength += (item.value as Buffer).length; - } else if (item.type === Attestation.TYPE_BASE64) { - byteLength += varuint.encodingLength(Buffer.from(item.value as string, "base64").length); - byteLength += Buffer.from(item.value as string, "base64").length; - } else if (item.type === Attestation.TYPE_URL) { - byteLength += varuint.encodingLength(Buffer.from((item.value as URL).toString(), "utf8").length); - byteLength += Buffer.from((item.value as URL).toString(), "utf8").length; - } else { - throw new Error("Invalid Attestation Type"); - } - - return byteLength; - } - - dataByteLength(): number { - let byteLength = 0; - byteLength += varuint.encodingLength(this.components.size) - - for (const [key, item] of this.components) { - byteLength += this.componentDataByteLength(key); - } - - return byteLength; - } - - componentToDataBuffer(key: number, forHash: boolean = false): Buffer { - - const bufferWriter = new BufferWriter(Buffer.alloc(this.componentDataByteLength(key))); - - const item = this.components.get(key); - if (!forHash) { - bufferWriter.writeCompactSize(key); - } - bufferWriter.writeUInt8(item.type); - bufferWriter.writeSlice(fromBase58Check(item.attestationKey).hash); - bufferWriter.writeSlice(item.salt); - - if (item.type === Attestation.TYPE_STRING) { - bufferWriter.writeVarSlice(Buffer.from(item.value as string, "utf8")) - } else if (item.type === Attestation.TYPE_BYTES) { - bufferWriter.writeVarSlice(item.value as Buffer) - } else if (item.type === Attestation.TYPE_BASE64) { - bufferWriter.writeVarSlice(Buffer.from(item.value as string, "base64")) - } else if (item.type === Attestation.TYPE_URL) { - bufferWriter.writeVarSlice(Buffer.from((item.value as URL).toString(), "utf8")) - } else { - throw new Error("Invalid Attestation Type"); - } - - return bufferWriter.buffer; - - } - - toDataBuffer(): Buffer { - const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); - - bufferWriter.writeCompactSize(this.components.size); - - for (const [key, item] of this.components) { - bufferWriter.writeSlice(this.componentToDataBuffer(key)); - } - - return bufferWriter.buffer; - } - - componentsFromDataBuffer(buffer: Buffer, offset?: number): number { - - const reader = new bufferutils.BufferReader(buffer, offset); - const componentsLength = reader.readCompactSize(); - this.components = new Map(); - - for (var i = 0; i < componentsLength; i++) { - const key = reader.readCompactSize(); - const type = reader.readUInt8(); - const attestationKey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); - const salt = Buffer.from(reader.readSlice(32)); - const value = Buffer.from(reader.readVarSlice()).toString('utf8'); - this.components.set(key, { type, attestationKey, salt, value }); - } - - return reader.offset; - } - - fromDataBuffer(buffer: Buffer, offset?: number): number { - - const reader = new bufferutils.BufferReader(buffer, offset); - - reader.offset = this.componentsFromDataBuffer(reader.buffer, reader.offset); - - return reader.offset; - - } - size(): number { - return this.components.size; - } - - setData(data: Array, getSalt: Function) { - - if (!this.components) { - this.components = new Map(); - } - - for (let i = 0; i < data.length; i++) { - - const item = data[i]; - if (!(item.salt instanceof Buffer) || item.salt.length !== 32) { - if (typeof getSalt === "function") { - item.salt = getSalt(); - } else { - throw new Error("Salt is required to be a 32 random byte Buffer"); - } - } - - try { - fromBase58Check(item.attestationKey) - } catch (e) { - throw new Error("Attestation Key is required to be base58 format"); - } - - if (this.determineType(item.value) != item.type) { - throw new Error("Value is wrong type"); - } - this.components.set(i, item); - } - - } - - getHash(key): Buffer { - - let value: Buffer; - - value = this.componentToDataBuffer(key, true); - - return createHash("sha256").update(value).digest(); - } - -} export class Attestation extends VDXFObject { static TYPE_STRING = 1; @@ -227,22 +43,6 @@ export class Attestation extends VDXFObject { } - determineType(value: string | Buffer | URL) { - if (Buffer.isBuffer(value)) { - return Attestation.TYPE_BYTES; - } - // Check if it's a Base64 string - // Base64 string pattern: contains only Base64 characters and possibly padding at the end - const base64Pattern = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/; - if (typeof value === 'string' && base64Pattern.test(value)) { - return Attestation.TYPE_BASE64; - } - if (value instanceof URL) { - return Attestation.TYPE_URL; - } - return Attestation.TYPE_STRING; - } - dataByteLength(): number { let byteLength = 0; @@ -307,7 +107,7 @@ export class Attestation extends VDXFObject { this.data = new AttestationData(); } - reader.offset = this.data.componentsFromDataBuffer(reader.buffer, reader.offset); + reader.offset = this.data.fromDataBuffer(reader.buffer, reader.offset); this.system_id = toBase58Check( reader.readSlice(HASH160_BYTE_LENGTH), @@ -413,11 +213,11 @@ export class Attestation extends VDXFObject { getHash(key): Buffer { - let value: Buffer; + let returnBuffer: Buffer; - value = this.data.componentToDataBuffer(key, true); + returnBuffer = this.data.components.get(key).toBuffer(); - return createHash("sha256").update(value).digest(); + return createHash("sha256").update(returnBuffer).digest(); } } diff --git a/src/vdxf/classes/MMR.ts b/src/vdxf/classes/MMR.ts index ee64d52..92549ea 100644 --- a/src/vdxf/classes/MMR.ts +++ b/src/vdxf/classes/MMR.ts @@ -4,7 +4,6 @@ var blake2b = require('blake2b') const { Lock } = require('semaphore-async-await') import { BN } from 'bn.js'; -import { AttestationData } from './Attestation'; import { VDXFObject } from "../"; import varuint from '../../utils/varuint' import bufferutils from '../../utils/bufferutils' diff --git a/src/vdxf/classes/attestationData.ts b/src/vdxf/classes/attestationData.ts new file mode 100644 index 0000000..c82be9f --- /dev/null +++ b/src/vdxf/classes/attestationData.ts @@ -0,0 +1,204 @@ +import { + Utf8DataVdxfObject, + HexDataVdxfObject, + BufferDataVdxfObject, + PNGImageVdxfObject +} from ".."; +import * as keylist from '../keys'; +import { keymap } from '../keymap'; +import bufferutils from '../../utils/bufferutils'; +import createHash = require("create-hash"); +import { fromBase58Check, toBase58Check } from '../../utils/address'; +import varuint from '../../utils/varuint' +import { I_ADDR_VERSION, HASH160_BYTE_LENGTH } from '../../constants/vdxf'; +const { BufferReader, BufferWriter } = bufferutils; + +export const AttestationClassTypes = { + BUFFER_DATA_STRING: 1, + BUFFER_DATA_BYTES: 2, + BUFFER_DATA_BASE64: 3, + URL: 4, + PNG_IMAGE: 5, +} + +export const AttestationVdxfidMap = { + [keylist.IDENTITY_DATA_FIRSTNAME.vdxfid]: { name: "First Name", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [keylist.IDENTITY_DATA_LASTNAME.vdxfid]: { name: "Last Name", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [keylist.IDENTITY_DATA_ATTESTOR.vdxfid]: { name: "Attestor ID", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [keylist.IDENTITY_DATA_IDENTITY.vdxfid]: { name: "Identity", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [keylist.ATTESTATION_TYPE.vdxfid]: { name: "Attestation Type", type: AttestationClassTypes.BUFFER_DATA_STRING }, +}; + + + +export class AttestationDataType { + + dataItem: Utf8DataVdxfObject | HexDataVdxfObject | BufferDataVdxfObject | PNGImageVdxfObject; + salt: Buffer; + + constructor(data: any, vdxfkey: string, salt?: string) { + + if (vdxfkey in keymap) { + switch (AttestationVdxfidMap[vdxfkey].type) { + + case AttestationClassTypes.BUFFER_DATA_STRING: + this.dataItem = new Utf8DataVdxfObject(data, vdxfkey); + break; + case AttestationClassTypes.BUFFER_DATA_BYTES: + this.dataItem = new HexDataVdxfObject(data, vdxfkey); + break; + case AttestationClassTypes.BUFFER_DATA_BASE64: + this.dataItem = new BufferDataVdxfObject(data, vdxfkey, "base64"); + break; + case AttestationClassTypes.URL: + this.dataItem = new BufferDataVdxfObject(data, vdxfkey, "utf8"); + break; + case AttestationClassTypes.PNG_IMAGE: + this.dataItem = new PNGImageVdxfObject(data, vdxfkey); + break; + default: + throw new Error("Unknown VDXF key"); + } + } else { + throw new Error("Unknown VDXF key"); + } + + if (salt) { + this.salt = Buffer.from(salt, "hex"); + } + } + + dataBytelength(): number { + + let length = 0; + + length += this.dataItem.byteLength(); + length += this.salt.length; + + return length; + } + + toBuffer(): Buffer { + + const buffer = Buffer.alloc(this.dataBytelength()); + const writer = new bufferutils.BufferWriter(buffer); + writer.writeSlice(this.dataItem.toBuffer()); + writer.writeSlice(this.salt); + + return writer.buffer; + } + + fromDataBuffer(buffer: Buffer, offset = 0, vdxfkey?: string): number { + + const reader = new bufferutils.BufferReader(buffer, offset); + reader.offset = this.dataItem.fromBuffer(reader.buffer, reader.offset, vdxfkey); + this.salt = reader.readSlice(32); + + return reader.offset; + } +} + +export const friendlyNames = (vdfxkey) => { + + if (vdfxkey in AttestationVdxfidMap) { + + return AttestationVdxfidMap[vdfxkey].name; + + } else { + throw new Error("Unknown VDXF key"); + } +} + +export class AttestationData { + + components: Map; + constructor(components: Map = new Map()) { + this.components = components; + } + + dataByteLength(): number { + let byteLength = 0; + byteLength += varuint.encodingLength(this.components.size) + + for (const [key, item] of this.components) { + byteLength += varuint.encodingLength(key); + byteLength += item.dataBytelength(); + } + + return byteLength; + } + + toDataBuffer(): Buffer { + const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); + + bufferWriter.writeCompactSize(this.components.size); + + for (const [key, item] of this.components) { + bufferWriter.writeCompactSize(key); + bufferWriter.writeSlice(item.toBuffer()); + } + + return bufferWriter.buffer; + } + + fromDataBuffer(buffer: Buffer, offset?: number): number { + + const reader = new bufferutils.BufferReader(buffer, offset); + const componentsLength = reader.readCompactSize(); + this.components = new Map(); + + for (var i = 0; i < componentsLength; i++) { + const key = reader.readCompactSize(); + const vdxfid = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + const attestationData = new AttestationDataType(null, vdxfid); + reader.offset = attestationData.fromDataBuffer(reader.buffer, reader.offset, vdxfid); + + this.components.set(key, attestationData); + } + + return reader.offset; + } + + size(): number { + return this.components.size; + } + + setDataFromJson(data: Array, getSalt: Function) { + + if (!this.components) { + this.components = new Map(); + } + + for (let i = 0; i < data.length; i++) { + + const item = data[i]; + + if (!(item.salt instanceof Buffer) || item.salt.length !== 32) { + if (typeof getSalt === "function") { + item.salt = getSalt(); + } else { + throw new Error("Salt is required to be a 32 random byte Buffer"); + } + } + + try { + fromBase58Check(item.dataItem.vdxfkey) + } catch (e) { + throw new Error("Attestation Key is required to be base58 format"); + } + + this.components.set(i, item); + } + + } + + getHash(key): Buffer { + + let value: Buffer; + + value = this.components.get(key).toBuffer(); + + return createHash("sha256").update(value).digest(); + } + +} \ No newline at end of file diff --git a/src/vdxf/classes/index.ts b/src/vdxf/classes/index.ts index 35e69f9..08c771f 100644 --- a/src/vdxf/classes/index.ts +++ b/src/vdxf/classes/index.ts @@ -34,6 +34,7 @@ export { AltAuthFactor, } from "./Challenge"; export {Attestation} from './Attestation' +export {AttestationData, AttestationDataType} from './attestationData' export { ProvisioningTxid } from './provisioning/ProvisioningResult' diff --git a/src/vdxf/index.ts b/src/vdxf/index.ts index d81826f..9e8774b 100644 --- a/src/vdxf/index.ts +++ b/src/vdxf/index.ts @@ -271,4 +271,10 @@ export class VerusIDSignature extends VDXFObject { serializekey: this.serializekey }; } +} + +export class PNGImageVdxfObject extends BufferDataVdxfObject { + constructor(data: string = "", vdxfkey: string = "") { + super(data, vdxfkey, "hex"); + } } \ No newline at end of file diff --git a/src/vdxf/keymap.ts b/src/vdxf/keymap.ts index 7d1499b..754a07e 100644 --- a/src/vdxf/keymap.ts +++ b/src/vdxf/keymap.ts @@ -1,27 +1,5 @@ import * as keylist from './keys'; -import varuint from '../utils/varuint' +import * as AttestationData from './classes/attestationData'; +export let keymap = Object.keys(keylist).reduce((obj: { [key: string]: any }, item) => { obj[keylist[item].vdxfid] = keylist[item]; return obj }, {}); -export const keymap = Object.keys(keylist).map(x => keymap[keylist[x].vdxfid] = keylist[x]); - -export const friendlyNames = (vdfxkey) => { - - if (vdfxkey in keymap) { - - switch (vdfxkey) { - - case keylist.IDENTITY_DATA_FIRSTNAME.vdxfid: - return "First Name"; - case keylist.IDENTITY_DATA_LASTNAME.vdxfid: - return "Last Name"; - case keylist.IDENTITY_DATA_ATTESTOR.vdxfid: - return "Attestor"; - case keylist.IDENTITY_DATA_IDENTITY.vdxfid: - return "Identity"; - case keylist.ATTESTATION_TYPE.vdxfid: - return "Attestation Type"; - } - - } else { - throw new Error("Unknown VDXF key"); - } -} \ No newline at end of file +export const AttestationVdxfidMap = AttestationData.AttestationVdxfidMap; \ No newline at end of file From 4cbbb93ba83ae1cca646bc7796c4bf707b19d2d6 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Fri, 2 Feb 2024 16:49:59 +0000 Subject: [PATCH 064/120] Add in Attestation Keys --- src/__tests__/attestation/attestation.test.ts | 35 +- src/vdxf/classes/attestationData.ts | 62 +- src/vdxf/identityDataKeys.ts | 2458 +++++++++++++++++ src/vdxf/index.ts | 1 + src/vdxf/keys.ts | 41 +- 5 files changed, 2518 insertions(+), 79 deletions(-) create mode 100644 src/vdxf/identityDataKeys.ts diff --git a/src/__tests__/attestation/attestation.test.ts b/src/__tests__/attestation/attestation.test.ts index c7e7af9..82ba1c3 100644 --- a/src/__tests__/attestation/attestation.test.ts +++ b/src/__tests__/attestation/attestation.test.ts @@ -1,9 +1,10 @@ -import { ATTESTATION_READ_REQUEST, IDENTITY_VIEW, IDENTITY_DATA_FIRSTNAME, LOGIN_CONSENT_REDIRECT_VDXF_KEY, VerusIDSignature, IDENTITY_DATA_LASTNAME, IDENTITY_DATA_ATTESTOR, IDENTITY_DATA_IDENTITY, ATTESTATION_TYPE } from "../../vdxf"; +import { ATTESTATION_READ_REQUEST, IDENTITY_VIEW, IDENTITYDATA_FIRSTNAME, LOGIN_CONSENT_REDIRECT_VDXF_KEY, VerusIDSignature, IDENTITYDATA_LASTNAME, IDENTITYDATA_ATTESTOR, IDENTITYDATA_IDENTITY, ATTESTATION_TYPE } from "../../vdxf"; import { Attestation, LoginConsentRequest } from "../../vdxf/classes"; import { RedirectUri, RequestedPermission } from "../../vdxf/classes/Challenge"; import { Context } from "../../vdxf/classes/Context"; import { CPartialAttestationProof } from "../../vdxf/classes/Attestation"; import { AttestationData, AttestationDataType } from "../../vdxf/classes/attestationData"; +import * as idkeys from "../../vdxf/identityDataKeys"; describe('Serializes and deserializes attestation request', () => { test('attestation request with reply', async () => { @@ -20,10 +21,10 @@ describe('Serializes and deserializes attestation request', () => { new RequestedPermission({ accepted_attestors: ["iC9x9VZ2XMop7spFzeXqSKX8WqmrG9cu41"], attestation_keys: [ - IDENTITY_DATA_FIRSTNAME.vdxfid, - IDENTITY_DATA_LASTNAME.vdxfid, - IDENTITY_DATA_ATTESTOR.vdxfid, - IDENTITY_DATA_IDENTITY.vdxfid, + IDENTITYDATA_FIRSTNAME.vdxfid, + IDENTITYDATA_LASTNAME.vdxfid, + IDENTITYDATA_ATTESTOR.vdxfid, + IDENTITYDATA_IDENTITY.vdxfid, ATTESTATION_TYPE.vdxfid] }, ATTESTATION_READ_REQUEST.vdxfid)], session_id: "iRQZGW36o3RcVR1xyVT1qWdAKdxp3wUyrh", @@ -43,10 +44,10 @@ describe('Serializes and deserializes attestation request', () => { const componentsMap = new Map(); - componentsMap.set(0, new AttestationDataType("Chris", IDENTITY_DATA_FIRSTNAME.vdxfid, "8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210")); - componentsMap.set(1, new AttestationDataType("Monkins", IDENTITY_DATA_LASTNAME.vdxfid, "7c3920940db4385cd305557a57a8df33346712096e76b58d7c4ace05e17b90a2")); - componentsMap.set(2, new AttestationDataType("chad@", IDENTITY_DATA_IDENTITY.vdxfid, "ce662d61a20ae211728cdb1b924628c84edfe0fcbd59a86f56a125ad73689ac1")); - componentsMap.set(3, new AttestationDataType("valu attestation@", IDENTITY_DATA_ATTESTOR.vdxfid, "9067dc6a9b38dd15f985770bb819eb62de39a5d1f0e12f9a4807f78968794af4")); + componentsMap.set(0, new AttestationDataType("Chris", IDENTITYDATA_FIRSTNAME.vdxfid, "8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210")); + componentsMap.set(1, new AttestationDataType("Monkins", IDENTITYDATA_LASTNAME.vdxfid, "7c3920940db4385cd305557a57a8df33346712096e76b58d7c4ace05e17b90a2")); + componentsMap.set(2, new AttestationDataType("chad@", IDENTITYDATA_IDENTITY.vdxfid, "ce662d61a20ae211728cdb1b924628c84edfe0fcbd59a86f56a125ad73689ac1")); + componentsMap.set(3, new AttestationDataType("valu attestation@", IDENTITYDATA_ATTESTOR.vdxfid, "9067dc6a9b38dd15f985770bb819eb62de39a5d1f0e12f9a4807f78968794af4")); componentsMap.set(4, new AttestationDataType("KYC Attestation v1", ATTESTATION_TYPE.vdxfid, "338b6ad44179f46fc24f3ed01fd247c9664384a71ba5465aebceece8d7c45a0a")); const signaturesForAttestation = new VerusIDSignature({ @@ -96,5 +97,21 @@ describe('Serializes and deserializes attestation request', () => { const rootOfItemZerofromBuffer = proofOfItemZero.checkProof(0); expect(rootOfItemZerofromBuffer.toString('hex')).toStrictEqual("bfa5d560098bcc51df0341b18922db0987907febe4eb44958866c015c36919f0"); + }); + test('no duplicate keys', async () => { + + const keys = Object.keys(idkeys); + + let keyset = {} + + for( const key of keys){ + if (keyset[idkeys[key].vdxfid]){ + console.log("duplicate key", idkeys[key].vdxfid) + } + keyset[idkeys[key].vdxfid] = true; + } + + + }); }); diff --git a/src/vdxf/classes/attestationData.ts b/src/vdxf/classes/attestationData.ts index c82be9f..9acd5a2 100644 --- a/src/vdxf/classes/attestationData.ts +++ b/src/vdxf/classes/attestationData.ts @@ -4,8 +4,8 @@ import { BufferDataVdxfObject, PNGImageVdxfObject } from ".."; +import * as identitykeys from '../identityDataKeys'; import * as keylist from '../keys'; -import { keymap } from '../keymap'; import bufferutils from '../../utils/bufferutils'; import createHash = require("create-hash"); import { fromBase58Check, toBase58Check } from '../../utils/address'; @@ -22,50 +22,44 @@ export const AttestationClassTypes = { } export const AttestationVdxfidMap = { - [keylist.IDENTITY_DATA_FIRSTNAME.vdxfid]: { name: "First Name", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [keylist.IDENTITY_DATA_LASTNAME.vdxfid]: { name: "Last Name", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [keylist.IDENTITY_DATA_ATTESTOR.vdxfid]: { name: "Attestor ID", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [keylist.IDENTITY_DATA_IDENTITY.vdxfid]: { name: "Identity", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_FIRSTNAME.vdxfid]: { name: "First Name", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_LASTNAME.vdxfid]: { name: "Last Name", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_ATTESTOR.vdxfid]: { name: "Attestor ID", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDENTITY.vdxfid]: { name: "Identity", type: AttestationClassTypes.BUFFER_DATA_STRING }, [keylist.ATTESTATION_TYPE.vdxfid]: { name: "Attestation Type", type: AttestationClassTypes.BUFFER_DATA_STRING }, }; - - export class AttestationDataType { - dataItem: Utf8DataVdxfObject | HexDataVdxfObject | BufferDataVdxfObject | PNGImageVdxfObject; + dataItem: Utf8DataVdxfObject | HexDataVdxfObject | BufferDataVdxfObject | PNGImageVdxfObject; salt: Buffer; constructor(data: any, vdxfkey: string, salt?: string) { - if (vdxfkey in keymap) { - switch (AttestationVdxfidMap[vdxfkey].type) { - - case AttestationClassTypes.BUFFER_DATA_STRING: - this.dataItem = new Utf8DataVdxfObject(data, vdxfkey); - break; - case AttestationClassTypes.BUFFER_DATA_BYTES: - this.dataItem = new HexDataVdxfObject(data, vdxfkey); - break; - case AttestationClassTypes.BUFFER_DATA_BASE64: - this.dataItem = new BufferDataVdxfObject(data, vdxfkey, "base64"); - break; - case AttestationClassTypes.URL: - this.dataItem = new BufferDataVdxfObject(data, vdxfkey, "utf8"); - break; - case AttestationClassTypes.PNG_IMAGE: - this.dataItem = new PNGImageVdxfObject(data, vdxfkey); - break; - default: - throw new Error("Unknown VDXF key"); + switch (AttestationVdxfidMap[vdxfkey].type) { + case AttestationClassTypes.BUFFER_DATA_STRING: + this.dataItem = new Utf8DataVdxfObject(data, vdxfkey); + break; + case AttestationClassTypes.BUFFER_DATA_BYTES: + this.dataItem = new HexDataVdxfObject(data, vdxfkey); + break; + case AttestationClassTypes.BUFFER_DATA_BASE64: + this.dataItem = new BufferDataVdxfObject(data, vdxfkey, "base64"); + break; + case AttestationClassTypes.URL: + this.dataItem = new BufferDataVdxfObject(data, vdxfkey, "utf8"); + break; + case AttestationClassTypes.PNG_IMAGE: + this.dataItem = new PNGImageVdxfObject(data, vdxfkey); + break; + default: + this.dataItem = new HexDataVdxfObject(data, vdxfkey); + break; } - } else { - throw new Error("Unknown VDXF key"); - } - if (salt) { - this.salt = Buffer.from(salt, "hex"); - } + if (salt) { + this.salt = Buffer.from(salt, "hex"); + } } dataBytelength(): number { diff --git a/src/vdxf/identityDataKeys.ts b/src/vdxf/identityDataKeys.ts new file mode 100644 index 0000000..441e9e3 --- /dev/null +++ b/src/vdxf/identityDataKeys.ts @@ -0,0 +1,2458 @@ +import { VDXFKeyInterface } from "./keys" + +export const IDENTITYDATA_ATTESTOR: VDXFKeyInterface = { + "vdxfid": "iNe8VaRBRFDhb6xjZ7WHNWgfM73428GN8B", + "hash160result": "5e01d5d356d517df57ea0f391c86e11a84663bd2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.attestor" + } +}; + +export const IDENTITYDATA_IDENTITY: VDXFKeyInterface = { + "vdxfid": "iFa41TpKfvbjaEnP78BNpSA9KYNgED58ms", + "hash160result": "63730181dc037834a7b2b9e7fed49863ca1cad84", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.identity" + } +}; + +export const IDENTITYDATA_ID: VDXFKeyInterface = { + "vdxfid": "i3uDEe15gH8AN88WjGGwF7gv6jVwJa1Wt5", + "indexid": "x8jKhSSAXbLpzJ1Yaww6DWDT8PWxAzngtM", + "hash160result": "17bc967bf757bc093ba3fc1dd9298abb7235ab04", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.id" + } +} + +export const IDENTITYDATA_USERID: VDXFKeyInterface = { + "vdxfid": "iMxzsbP4iptfkxQD4CaYwYNqSRSqw1eqJp", + "indexid": "xSo7LPp9a97LP8HEutEhuvuNU5Trrjc77z", + "hash160result": "b6e3f22d3a87fbdffe53d16e1eab779b16d1d4ca", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.userid" + } +} + +export const IDENTITYDATA_CREATEDAT: VDXFKeyInterface = { + "vdxfid": "iNxvB8LET1HNQ2aWqS8RoVj8fcPr1UdcSA", + "indexid": "xTo2dvmKJKW32CTYh7namtFfhGQrrbP3Rv", + "hash160result": "dabed2d7a3d4cacbc482ce046dd1be8b6605c9d5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.createdat" + } +} + +export const IDENTITYDATA_COMPLETEDAT: VDXFKeyInterface = { + "vdxfid": "iFtW78dkwZtb4Q9EhBEm4xYMYFxYEvP39D", + "indexid": "xLicZw4qnt7Fga2GYrtv3M4tZuyZ5zz9CJ", + "hash160result": "12903d8d58b28acf0dfefd6598b2ed6394622a88", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.completedat" + } +} + +export const IDENTITYDATA_PREVIOUSATTEMPTID: VDXFKeyInterface = { + "vdxfid": "iNVKxjLQJmxyFsPZGufmkb9rh8FoBrcS37", + "indexid": "xTKSRXmVA6Bdt3Gb8bKviygPinGp7XuZqr", + "hash160result": "f2154430bfab9e858dbd05f48e379f77dd3a91d0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.previousattemptid" + } +} + +export const IDENTITYDATA_SHAREABLEURL: VDXFKeyInterface = { + "vdxfid": "i9nYbM8arP15YrJYqSLbxgi7iJgYbzPwXR", + "indexid": "xEcf49ZfhhDkB2Bah7zkw5EejxhZYZ83om", + "hash160result": "8a81df9444dcd55bf80dfff5e07b4a1fd0353945", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.shareableurl" + } +} + +export const IDENTITYDATA_TEMPLATEID: VDXFKeyInterface = { + "vdxfid": "i5j8xXGKYLBAENLD5CBosWtmB2LnWrxobF", + "indexid": "xAZFRKhQPePprYDEvsqxquRJCgMoTQzGzL", + "hash160result": "aefdfe818fd9323496ad29101b9b40e3d0bab318", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.templateid" + } +} + +export const IDENTITYDATA_TEMPLATEVERSION: VDXFKeyInterface = { + "vdxfid": "iQTADnLBxVAxxxAidEUgK8DVeuaaY7w78n", + "indexid": "xVHGgamGooPdb83kUv8qHWk2gZbbW3CZYi", + "hash160result": "1b1a410a4258fe91ee0e40904538d649c58418e6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.templateversion" + } +} + +export const IDENTITYDATA_PHONENUMBER: VDXFKeyInterface = { + "vdxfid": "i9ZQ5degEh3wQg5vNm8Tod88bcJBrLs5p3", + "indexid": "xEPWYS5m61Gc2qxxESncn1efdGKChdypms", + "hash160result": "c58e0231ddcd85747709016800cc6e796cb2bc42", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.phonenumber" + } +} + +export const IDENTITYDATA_DATEOFBIRTH: VDXFKeyInterface = { + "vdxfid": "iPzSt64gwsqmxcz3Ht7zhMngLC6no6S74K", + "indexid": "xUpZLtVmoC4Sans59Zn9fkKDMr7oe7NpkD", + "hash160result": "057c9866c848002e1fac1c419a300369f2310be1", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.dateofbirth" + } +} + +export const IDENTITYDATA_OVER18: VDXFKeyInterface = { + "vdxfid": "iF8QUrVj4LCSKdF5KFG6axidrUg8RiV65A", + "indexid": "xKxWwevoueR6wo87AvvFZMFAt8h9EHjvu5", + "hash160result": "70a65a9b459169a05b34f101ff0631cf0763d37f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.over18" + } +} + +export const IDENTITYDATA_OVER21: VDXFKeyInterface = { + "vdxfid": "i6E3RQUUX3jt8CkizuLX6ihZHTegCmmbj4", + "indexid": "xB49tCuZNMxYkNdkrazg57E6K7fh65oniA", + "hash160result": "6238fac23c82ebadd8f79306558cb8ddc62b2b1e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.over21" + } +} + +export const IDENTITYDATA_OVER25: VDXFKeyInterface = { + "vdxfid": "iHqnuVSGJAjF4SXqurNB2h3sY7q5raxhDr", + "indexid": "xNfuNHsM9UwugcQsmY2L15aQZmr6n3MA8x", + "hash160result": "88c15026283fb46b5a6b3de4f4b5a33a7f69979d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.over25" + } +} + +export const IDENTITYDATA_IPADDRESS: VDXFKeyInterface = { + "vdxfid": "i6HsaWESEEpa1RGPeuksdCQWZ8Svvq7w4e", + "indexid": "xB7z3JfX5Z3Edb9RWbR2baw3anTwtiKSmr", + "hash160result": "4fceb989885b50eb19d713f76fe53b62449ee41e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.ipaddress" + } +} + +export const IDENTITYDATA_EMAIL: VDXFKeyInterface = { + "vdxfid": "i8nmFBXnQNFK6HmNM1XHr6xLECPEry44Xr", + "indexid": "xDcshyxsFgTyiTeQChBSpVUsFrQFg1ph6J", + "hash160result": "31b2f16b20e9fdc1e11f37d07ba97f5463a54b3a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.email" + } +} + +export const IDENTITYDATA_FIRSTNAME: VDXFKeyInterface = { + "vdxfid": "i4GqsotHGa4czCdtg2d8FVHKfJFzVyBPrM", + "indexid": "x96xLcKN7tHHcNWvXiHHDsorgxH1REYzrR", + "hash160result": "31e7d78d45dd436cd977ac0f9ed03094bd87c208", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.firstname" + } +} + +export const IDENTITYDATA_LASTNAME: VDXFKeyInterface = { + "vdxfid": "iHybTrNB1kXRrjsCtJXd6fvBKxepqMpS5Z", + "indexid": "xNohveoFs4k6UukEjzBn54SiMcfqhV66Vg", + "hash160result": "3c3fb99f2b33f5c20c890f36fa8cc1ff3d30119f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.lastname" + } +} + +export const IDENTITYDATA_HOMEADDRESS: VDXFKeyInterface = { + "vdxfid": "i6AtrvvqMkzVPQqtEmzn1EbjkzF3CbaM9L", + "indexid": "xB11KjMvD5DA1aiv6Tevyd8GneG45Q5BLp", + "hash160result": "f83d7549817e9eda543bf587689c06e814c7921d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.homeaddress" + } +} + +export const IDENTITYDATA_HOMEADDRESS_STREET1: VDXFKeyInterface = { + "vdxfid": "iL29rGaWXcww4fwe8Us1kg7Y16XUDgaWFC", + "indexid": "xQrGK51bNwAbgqpfzAXAj4e52kYV4o2k7S", + "hash160result": "b898ec5f2c3633b099b4f8332b987d938c4e7db5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.homeaddress" + }, + "bounddata": { + "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + } +} + +export const IDENTITYDATA_HOMEADDRESS_STREET2: VDXFKeyInterface = { + "vdxfid": "iPfVvVxRkpE8WXKAeCYGTxsdpLa1Eh1KzD", + "indexid": "xUVcPJPWc8So8hCCVtCRSMQAqzb25YSnPA", + "hash160result": "8c2235594883052b88799461f306c084b0d475dd", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.homeaddress" + }, + "bounddata": { + "vdxfkey": "i3h8D5kGtn6DCVCwPFvbypbFCqfzAhXiD2" + } +} + +export const IDENTITYDATA_HOMEADDRESS_CITY: VDXFKeyInterface = { + "vdxfid": "iFRUFNWPsrDNNLfCWhAqFoUamhwryjx27c", + "indexid": "xLFaiAwUjAS2zWYENNpzEC17oMxspXLHnY", + "hash160result": "ea4cad23a3b421b827747769be86b29d699a0d83", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.homeaddress" + }, + "bounddata": { + "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + } +} + +export const IDENTITYDATA_HOMEADDRESS_REGION: VDXFKeyInterface = { + "vdxfid": "iRmhi8Z6STjtt4nE1MWJCgYGrKBGT1dWaB", + "indexid": "xWbpAvzBHmxZWEfFs3ATB54osyCHLkZ74h", + "hash160result": "b94c5f0aba29341980e1711c4e6f4ac6cf6a92f4", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.homeaddress" + }, + "bounddata": { + "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" + } +} + +export const IDENTITYDATA_HOMEADDRESS_POSTCODE: VDXFKeyInterface = { + "vdxfid": "i8XMZQ3NGhEvtRA9e68tShsRgABHdrJYkV", + "indexid": "xDMU2CUT81TbWb3BVmo3R6PxhpCJZUQwNj", + "hash160result": "a94d72335f27128bf57a31ac38c6e0e374a26137", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.homeaddress" + }, + "bounddata": { + "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" + } +} + +export const IDENTITYDATA_HOMEADDRESS_COUNTRY: VDXFKeyInterface = { + "vdxfid": "iAaJZj9yTRxT1WrYu42YWCeTAuCkeWJnip", + "indexid": "xFQR2Xb4JkB7dgjakjghUbAzCZDmbcGPTX", + "hash160result": "15f33d581893957024d128d7fa060ec86fa2e04d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.homeaddress" + }, + "bounddata": { + "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" + } +} + +export const IDENTITYDATA_IDNUMBER_VALUE: VDXFKeyInterface = { + "vdxfid": "i79FRsacpZYQ9yVFYUK5x6eeUeS1EGNprE", + "indexid": "xByMtg1hfsm4n9NHQ9yEvVBBWJT24wRXnq", + "hash160result": "e9b3c40de3185cb462bf8c76f75ba10da53d3b28", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idnumber.value" + } +} + +export const IDENTITYDATA_IDNUMBER_TYPE: VDXFKeyInterface = { + "vdxfid": "iHmUB12ZvCagSnp8RYifzEiVzu6q4EXSx6", + "indexid": "xNbadoTemWoM4xhAHENpxdF32Z7r2EHU4B", + "hash160result": "db12844ffbf6244f5506938229916f986f1cc69c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idnumber.type" + } +} + +export const IDENTITYDATA_STATUS: VDXFKeyInterface = { + "vdxfid": "iGDz9GLxDULfhzPJs2hU7MuHoyEzHUr1oA", + "indexid": "xM46c4n34nZLLAGLiiMd5kRpqdG17kNgXH", + "hash160result": "424d072b54b489c27a36a8a10ce7d0b738b1d98b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.status" + } +} + +export const IDENTITYDATA_APPROVALS_ACCEPTEDTOS: VDXFKeyInterface = { + "vdxfid": "iAaWyLM18QHXa4WFSoYXNrbWP4DG3fGUqu", + "indexid": "xFQdS8n5yiWCCEPHJVCgMF83QiEGuAX7Lu", + "hash160result": "7c0f3d2f6ec35b7702f6e3b394a06877cafdea4d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.approvals.acceptedtos" + } +} + +export const IDENTITYDATA_APPROVALS_VERIFIEDSMS: VDXFKeyInterface = { + "vdxfid": "iCjR6fQST9YLLn72B96aHgSjF54v6UXqSf", + "indexid": "xHZXZTqXJTkzxwz42pkjG4yGGj5vvcnSQq", + "hash160result": "26bf160fb405c0fad15a9b5c2f602dbd61158a65", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.approvals.verifiedsms" + } +} + +export const IDENTITYDATA_APPROVALS_KYCCHECKED: VDXFKeyInterface = { + "vdxfid": "iH9AxMi9qB1RFkZ3HQW11c2xcntwQ21j3M", + "indexid": "xMyHRA9EgVE5svS596A9yzZVeSuxBAkxdv", + "hash160result": "22d9177c4b16c2316d85f84a1594903f7bc3e895", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.approvals.kycchecked" + } +} + +export const IDENTITYDATA_APPROVALS_DOCUMENTSVERIFIED: VDXFKeyInterface = { + "vdxfid": "iAC86tdUvqwcSwUowKZGG4WPxTzNSwuHCo", + "indexid": "xF2EZh4ZnAAH57Mqo1DRET2vz81PNz5i7r", + "hash160result": "c183cce3b8a5360b52a6237a15c43f96e1bfae49", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.approvals.documentsverified" + } +} + +export const IDENTITYDATA_APPROVALS_SELFIECHECKED: VDXFKeyInterface = { + "vdxfid": "iFYWGcgSm4jGnDTfNnuk9TzcQmkWAdxpwe", + "indexid": "xLNcjR7XcNwwQPLhEUZu7rX9SRmX1dHrha", + "hash160result": "28e13d3434ffeb8045e813da5df34b06cc336284", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.approvals.selfiechecked" + } +} + +export const IDENTITYDATA_APPROVALS_WATCHLIST_OK: VDXFKeyInterface = { + "vdxfid": "iFtRaMKJGyaqgpiH4ZXeGZMMR47C1u34Jt", + "indexid": "xLiY39kP8HoWJzbJvFBoEwstSi8CsZK8Jz", + "hash160result": "d29c35a645ac1c92fa0506482c37370c609a2688", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.approvals.watchlist.ok" + } +} + +export const IDENTITYDATA_APPROVALS_RISKCHECKOK: VDXFKeyInterface = { + "vdxfid": "i4pkwqbNCZj3ZrukRooKDAidLJ2SJt57Tf", + "indexid": "x9esQe2T3swiC2nnHVTUBZFAMx3TBR2Ew1", + "hash160result": "4650258cd77d7928a47ee880075592d8a7b9cb0e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.approvals.riskcheckok" + } +} + +export const IDENTITYDATA_DRIVINGLICENCE: VDXFKeyInterface = { + "vdxfid": "iQe74mwXJTFv1Bg8MRg7zqBMFUsD6jhTxz", + "indexid": "xVUDXaNc9mUadMZAD7LGyDhtH8tDzeHFrT", + "hash160result": "72eaff870cdd9c650afcfed1e379330fd7752ae8", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + } +} + +export const IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_FRONT: VDXFKeyInterface = { + "vdxfid": "iSBvWubN2yGHsdj6dGL3vMDjZMU6XSWxyG", + "indexid": "xX22yi2StHUxVoc8UwzCtjkGb1V7R95hsy", + "hash160result": "2720c73719ffc070c103fa30689283fc331727f9", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iBrpt78Mdrqcc1RHwPWKYBALbNTC4cwdJQ" + } +} + +export const IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_BACK: VDXFKeyInterface = { + "vdxfid": "iH81F6cj2Kjf2JzRxXAnc9oMQdGQqdQMzD", + "indexid": "xMx7hu3osdxKeUsTpCpwaYKtSHHRowL8Sr", + "hash160result": "e146bb291bd348f94e84910e13c00310b13db095", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iNRCZp7JBDHbpKQ2Vhc6TK97hUSRPG4jaX" + } +} + +export const IDENTITYDATA_DRIVINGLICENCE_CROPPED_FRONT: VDXFKeyInterface = { + "vdxfid": "i87ecHwJRUhAA2WaW9FtVotnEWx3BAt7Y8", + "indexid": "xCwm56NPGnupnCPcMpv3UCRKGAy43NWsQw", + "hash160result": "78d9f3f3ccdbf650adb03eb0482273cf51e2e532", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iK822dFQwW2Y5tdpSpxQtHQemf47HoFxqs" + } +} + +export const IDENTITYDATA_DRIVINGLICENCE_CROPPED_BACK: VDXFKeyInterface = { + "vdxfid": "iAPcY54xD3v1WC7zQatbbQnqJe4A6KUaex", + "indexid": "xFDizsW34N8g8N12GGYkZoKNLJ5AzeGTf7", + "hash160result": "b45cb25e26d152c9221f9719d696c18d8c0fdb4b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iCvxKVHbnbwHGZDTaGofeyyJLjsGBSZr7A" + } +} + +export const IDENTITYDATA_DRIVINGLICENCE_FACE: VDXFKeyInterface = { + "vdxfid": "i9fwBhdsQduiAWhG99wxXwnCRmRXJrbcG4", + "indexid": "xEW3eW4xFx8NngaHzqc7WLJjTRSYDHiUc7", + "hash160result": "834ec04a48c045a0814985a32f02d3125728f943", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iPrxPJC6NbzWnkNyLSvwa8AVrwJWBUV9mM" + } +} + +export const IDENTITYDATA_DRIVINGLICENCE_IDNUMBER: VDXFKeyInterface = { + "vdxfid": "i5JGvSuGVEb9xgNb9ezTTJ8zucrp75Ac98", + "indexid": "xA8PPFLMLYoparFd1LecRgfXwGsq32EUV4", + "hash160result": "26fae70b9b3ea6cb14ca10c9620dc04899faff13", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iJdUp47SVEzGEHCvoRyix2xufRsAeWSyxa" + } +} + +export const IDENTITYDATA_DRIVINGLICENCE_CATEGORY: VDXFKeyInterface = { + "vdxfid": "i5xXPRL3h45Zf2jErvDwD18DeDzGFRaACg", + "indexid": "xAndrDm8YNJEHCcGibt6BPekft1H9NjSHE", + "hash160result": "5d77333ae97ba2324126925bc54e06513adc3b1b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "i9MqRfXPAiYwv9q4iSjTtXquNCCZ1GgECn" + } +} + +export const IDENTITYDATA_DRIVINGLICENCE_EXPIRATIONDATE: VDXFKeyInterface = { + "vdxfid": "iPUSmAtyyTsYNiDppDK8c4rkUjXyiDTm5D", + "indexid": "xUJZDyL4pn6Czt6rftyHaTPHWPYzXZS1No", + "hash160result": "6e6e96148a0314aaeecdfaed9a474150e09d5edb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iNgDKviLAeeV65eBztuduckUMDE2erB7jj" + } +} + +export const IDENTITYDATA_DRIVINGLICENCE_ISSUING_COUNTRY_MATCHED: VDXFKeyInterface = { + "vdxfid": "iGvEHvVEiQJzUQXacJsPAt5oE5ufWpA5rB", + "indexid": "xMkLkivKZiXf6aQcTzXY9GcLFjvgMyaUmx", + "hash160result": "e4fb439a302b423d65dbccee97fdbd6757247693", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iFgXmTd9Wi2sqZyPqaoejdHG2sMaJWLrEX" + } +} + +export const IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION: VDXFKeyInterface = { + "vdxfid": "iJL72hPk4rFyEmBfdsHJGBUyKMJRrqcR9t", + "indexid": "xPADVVppvAUdrw4hVYwTEa1WM1KSjZsjUc", + "hash160result": "76a99a38988e107e418f24f32d1080f93930f2a2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL" + } +} + +export const IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH: VDXFKeyInterface = { + "vdxfid": "iC88nTf9EzCKt2CnkudSRcu7yxNiA16c9G", + "indexid": "xGxFFG6E6JQzWC5pcbHbQ1Rf1cPj1kEyFH", + "hash160result": "f55e5a3f98219f06eb0b4b31a935ff1721e8dd5e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iQhjETQvSkadciDPy69QZNy3hSczWQ4iu4" + } +} + +export const IDENTITYDATA_DRIVINGLICENCE_ADDRESS: VDXFKeyInterface = { + "vdxfid": "iK8RX6S9uzcnUoVPeLigNt4Cu156zEpodu", + "indexid": "xPxXytsEmJqT6yNRW2NqMGajvf67xnbJFY", + "hash160result": "7fcee36de098accefe0f473da0b06914c9c1b4ab", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iGebr2v1TgkWvsyLjs1dQ5SqffqKL8rNm3" + } +} + +export const IDENTITYDATA_DRIVINGLICENCE_STREET1: VDXFKeyInterface = { + "vdxfid": "iGNX6JaTu92GhPNBpbQkZ9Koro2W35GLjm", + "indexid": "xMCdZ71YkTEwKZFDgH4uXXrLtT3WwU1hvB", + "hash160result": "3e225a69f52b9bab5fee67ed7ed5d6c7d6da768d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + } +} + +export const IDENTITYDATA_DRIVINGLICENCE_CITY: VDXFKeyInterface = { + "vdxfid": "i7eLwQmDNfc64xc4Qm7AnSsaa1BwCdhTSK", + "indexid": "xCUTQDCJDypkh8V6GSmKkqQ7bfCx41No4i", + "hash160result": "d69209a7ac10320134b836872b7cd7ad10e7bb2d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + } +} + +export const IDENTITYDATA_DRIVINGLICENCE_REGION: VDXFKeyInterface = { + "vdxfid": "iKtdJHgdvUJ4vxSxr86cNcaj8Zq4KCZJJh", + "indexid": "xQijm67imnWjZ8KzhokmM17GADr5GSTj4A", + "hash160result": "f88b44fa9b07a70cd77a9831e89e80505fe410b4", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" + } +} + +export const IDENTITYDATA_DRIVINGLICENCE_POSTCODE: VDXFKeyInterface = { + "vdxfid": "i3oy6rsBBWtJ11ZNHvyFPHERK9BGQtQod1", + "indexid": "x8e5ZfJG2q6xdBSQ9cdQMfkxLoCHEubx1i", + "hash160result": "9d7bfbe011ca5889ed8e47a1b2a0320c9654ad03", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" + } +} + +export const IDENTITYDATA_DRIVINGLICENCE_COUNTRY: VDXFKeyInterface = { + "vdxfid": "iMZemCqP6BFZzxTA9AG34ghv4HaiFiS6E6", + "indexid": "xSPmE1GTwVUEd8LBzqvC35ET5wbj7m7HY8", + "hash160result": "546fdf34874119f799b1f8b0014a6cd467766ac6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" + } +} + +export const IDENTITYDATA_DRIVINGLICENCE_MATCHED: VDXFKeyInterface = { + "vdxfid": "i5bAVLDcVEzbs6Awo2REXhHTjx34u9bEGC", + "indexid": "xARGx8ehLZDGVG3yei5PW5ozmc45h9ZyZa", + "hash160result": "d85c4cc4be13249bec299fde232bbcf323ae3117", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk" + } +} + +export const IDENTITYDATA_DRIVINGLICENCE_NAME_MATCHED: VDXFKeyInterface = { + "vdxfid": "i97PqFTkPLKX4R22g27qk7TFdYbLk55fVf", + "indexid": "xDwWJ3tqEeYBgau4XhmziVynfCcMdnsQJP", + "hash160result": "f64f980f5bcde38d71bf6dfdde151c4ecaacd13d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iKCFQYZudPChh6jypSpcgENoQb5WeX5wHv" + } +} + +export const IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH_MATCHED: VDXFKeyInterface = { + "vdxfid": "iCkJW6AjbtNLTjf4boPPHXpiujRZa9KSeP", + "indexid": "xHaQxtbpTCb15uY6TV3YFvMFwPSaWD2Xv2", + "hash160result": "3261fc33de15f3cedc3a4a4f8c3638144cfeb465", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iMUfUShqVwWrGSx6HvZcDJwHywiLW5Zusb" + } +} + +export const IDENTITYDATA_SELFIECHECK_SUCCESS: VDXFKeyInterface = { + "vdxfid": "i6cbKQVGd1upW3uCQAhvUf7PzFgcoFyH3S", + "indexid": "xBShnCvMUL8V8DnEFrN5T3dw1uhdgNupLp", + "hash160result": "c0b5f21d131d3a18be6c3a1b5442197cb4f26e22", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.selfiecheck.success" + } +} + +export const IDENTITYDATA_SELFIECHECK_IMAGE: VDXFKeyInterface = { + "vdxfid": "i9oYuguYwqLhXN1y4afj6vYjaWmzuWtuZU", + "indexid": "xEdfNVLdo9ZN9XtzvGKt5K5GcAo1jKrFH7", + "hash160result": "dacb095d88ab704ac181d701a7fcdf20e0e36945", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.selfiecheck.image" + } +} + +export const IDENTITYDATA_SELFIECHECK_VIDEO: VDXFKeyInterface = { + "vdxfid": "iGQGK7d1Wdfq9ERxmNXD5fjH7v5SUHxZ9K", + "indexid": "xMENmv46MwtVmQJzd4BN44Fp9a6TKf2CyG", + "hash160result": "5a4b0ee7c8e2f91d641d3e18b35343ee8a59cb8d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.selfiecheck.video" + } +} + +export const IDENTITYDATA_SELFIECHECK_DRIVINGLICENCE_MATCH: VDXFKeyInterface = { + "vdxfid": "iLGaXTpb8baibivmJL2yVvX259ir3tewjx", + "indexid": "xR6gzGFfyuoPDtooA1h8UK3Z6ojrxc8Jyf", + "hash160result": "19b7f38204fa54f56f62b7b67275ff4c84ba37b8", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.selfiecheck.drivinglicence.match" + } +} + +export const IDENTITYDATA_KYC_SUCCESS: VDXFKeyInterface = { + "vdxfid": "iJbbE37yKagBMCvoYPMnkKd3P6eTTGv1Qd", + "indexid": "xPRhgqZ4AttqyNoqQ51wii9aQkfUKWhnpJ", + "hash160result": "1a1bebe6bade7b23cb555a5d1c65f5d2d8f6dfa5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.kyc.success" + } +} + +export const IDENTITYDATA_KYC_ADDRESS_MATCHED: VDXFKeyInterface = { + "vdxfid": "iP8T2Li3giM7MCJRMw65tajQ2ydx4kW7m6", + "indexid": "xTxZV998Y2ZmyNBTDckEryFw4dexvb7HLT", + "hash160result": "0f7b56de7b92854cffb85f278ca8f7b70a8496d7", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.kyc.address.matched" + } +} + +export const IDENTITYDATA_KYC_TYPE: VDXFKeyInterface = { + "vdxfid": "iN4C7XtyceBJrNcqAs3dZ3T2DA4vycpUYM", + "indexid": "xStJaLL4TxPyUYVs2YhnXRyZEp5wrpthtP", + "hash160result": "79da13c496750b37d4804e85094e5d0b8f47d0cb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.kyc.type" + } +} + +export const IDENTITYDATA_KYC_NAME_MATCHED: VDXFKeyInterface = { + "vdxfid": "i69dDR9m6JB8bYvT1PbfsVEKiWPZYNgD1E", + "indexid": "xAyjgDaqwcPoDioUs5FpqskrkAQaRi64Pv", + "hash160result": "bf852464c1379ab65e5bb2646bbbb19ee84c551d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.kyc.name.matched" + } +} + +export const IDENTITYDATA_KYC_DATEOFBIRTH_MATCHED: VDXFKeyInterface = { + "vdxfid": "iHfdYydzo83X6Y6y66N4n8UvcFTLQSmj9Y", + "indexid": "xNVk1n55eSGBihyzwn2DkX1TduUMHqN49h", + "hash160result": "f26bc9aa3851d21c679d521f60722045c571ab9b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.kyc.dateofbirth.matched" + } +} + +export const IDENTITYDATA_KYC_IDNUMBER_MATCHED: VDXFKeyInterface = { + "vdxfid": "iJQ5KQrVCkHAKRfmBRa6TuMxW8ZfHKuiMS", + "indexid": "xPEBnDHa44VpwbYo37EFSHtVXnag7ePNwv", + "hash160result": "94abb5b38f44545c981134f44db4d6395c6cb2a3", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.kyc.idnumber.matched" + } +} + +export const IDENTITYDATA_KYC_PHONENUMBER_MATCHED: VDXFKeyInterface = { + "vdxfid": "iBFp1jupLByoSLJaZWz2gg3v2GipUFoADv", + "indexid": "xG5vUYLuBWCU4WBcRCeBf4aT3vjqNDUWJY", + "hash160result": "7c59b8b820c001d0b361ca67a99c45677c705955", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.kyc.phonenumber.matched" + } +} + +export const IDENTITYDATA_KYC_AREACODE_MATCHED: VDXFKeyInterface = { + "vdxfid": "i7GX7K3sGs227Vf4NEJe3QKxruuUyqFFzp", + "indexid": "xC6da7Ux8BEgjfY6Duxo1nrVtZvVsySF4F", + "hash160result": "4ae70956a849099e8fd2bf0a9b5daa8fd43d9b29", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.kyc.areacode.matched" + } +} + +export const IDENTITYDATA_RISKCHECK_STATUS: VDXFKeyInterface = { + "vdxfid": "i3b3wvsNm5JaMUoV21Y7maVx85BJ2B8xTF", + "indexid": "x8RAQjJTcPXEyegWshCGjy2V9jCJtGhaAq", + "hash160result": "1de1fb500f5c4594a322e249949bc289d9f73b01", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.riskcheck.status" + } +} + +export const IDENTITYDATA_RISKCHECK_USERINTERACTIONS: VDXFKeyInterface = { + "vdxfid": "iEGi5rmUzAmnfutUCPp2dS34rSEk1DrevE", + "indexid": "xK6pYfCZqUzTJ5mW45UBbpZbt6FkuN8K7e", + "hash160result": "b0fef6f09eb8a36672e8b15313574b298f486d76", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.riskcheck.userinteractions" + } +} + +export const IDENTITYDATA_RISKCHECK_FRAUDRINGOK: VDXFKeyInterface = { + "vdxfid": "i8MQDH1wrdWCf5rTRznhC5ijRy188i1kYU", + "indexid": "xDBWg5T2hwisHFjVHgSrAUFGTd291gaveW", + "hash160result": "7754803c155ad687f4376285828dcda68db07f35", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.riskcheck.fraudringok" + } +} + +export const IDENTITYDATA_RISKCHECK_BOTNOTDETECTED: VDXFKeyInterface = { + "vdxfid": "iSLcYw9ZcKnYJJTYvJYfk3jo3rjFHHPV7h", + "indexid": "xXAj1jaeTe1CvULamzCpiSGL5WkG8ZjCka", + "hash160result": "48835abfcd59557f6325f32773bbaf667bd6cbfa", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.riskcheck.botnotdetected" + } +} + +export const IDENTITYDATA_EMAIL_ISDELIVERABLE: VDXFKeyInterface = { + "vdxfid": "i8P6w5ypyh7byWTYAdTY3vHezomSBSznWB", + "indexid": "xDDDPtQuq1LGbgLa2K7h2JpC2TnT48N3FF", + "hash160result": "6b6d001cedc2852156e286c8d63ce4bf0119d235", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.email.isdeliverable" + } +} + +export const IDENTITYDATA_EMAIL_BREACHCOUNT: VDXFKeyInterface = { + "vdxfid": "iBhchzsBh8zKXhCAquQ5mWPdFAM6mkGvix", + "indexid": "xGXjAoJGYTCz9s5Chb4EjtvAGpN7gnJjc6", + "hash160result": "ea91d5cb1ff8532c4e9c847228859e4014d13a5a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.email.breachcount" + } +} + +export const IDENTITYDATA_EMAIL_FIRSTBREACHEDAT: VDXFKeyInterface = { + "vdxfid": "iKwvVd8mHF7phMqPJVQ32bHpYT7hFG14D8", + "indexid": "xQn2xRZr8ZLVKXiRAB4BzypMa78i5iPxyd", + "hash160result": "597919a7c88a513db2c9223f6948ca4f767eb0b4", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.email.firstbreachedat" + } +} + +export const IDENTITYDATA_EMAIL_LASTBREACHEDAT: VDXFKeyInterface = { + "vdxfid": "iNUujoAd6CCR9X4kBQZaV6o9mt3MDqsfHs", + "indexid": "xTK2CbbhwWR5mgwn36DjTVKgoY4N7JGP5y", + "hash160result": "ebbc28818ea68e09defb0b67c0a5882e75027dd0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.email.lastbreachedat" + } +} + +export const IDENTITYDATA_EMAIL_DOMAIN_REGISTEREDAT: VDXFKeyInterface = { + "vdxfid": "i8jTA9VrLRrAmTNwCnQJg93ivmVN5GWcVX", + "indexid": "xDZZcwvwBk4qPdFy4U4TeXaFxRWNxA1Bqd", + "hash160result": "d8d1e9bd02ff4c40c805099613567531d04cab39", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.email.domain.registeredat" + } +} + +export const IDENTITYDATA_EMAIL_DOMAIN_FREEPROVIDER: VDXFKeyInterface = { + "vdxfid": "i8XPHcH1caNn6kQVxFERZG33ATxHfawrSB", + "indexid": "xDMVkQi6TtbSivHXovtaXeZaC7yJSskirY", + "hash160result": "a2c3c98d38df08384ed3d863895fd6c1ad136337", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.email.domain.freeprovider" + } +} + +export const IDENTITYDATA_EMAIL_DOMAIN_CUSTOM: VDXFKeyInterface = { + "vdxfid": "iE7HSAqMXwxtM6XxUDRLMBUUcWniEh9hRk", + "indexid": "xJwPtyGSPGBYyGQzKu5VKa11eAojBypGax", + "hash160result": "48b3f1d4988af1dd73b8ccf1e5b547a891f6a474", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.email.domain.custom" + } +} + +export const IDENTITYDATA_EMAIL_DOMAIN_DISPOSABLE: VDXFKeyInterface = { + "vdxfid": "iBteZWnaYtBLRxQyNutN7eatZZ4ZpCAoin", + "indexid": "xGim2KDfQCQ148J1EbYX637RbD5aehG6fm", + "hash160result": "8bb328cc7630490b07742507e6cdb77290f0505c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.email.domain.disposable" + } +} + +export const IDENTITYDATA_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS: VDXFKeyInterface = { + "vdxfid": "iHbaMpJAjVPgroTQYm6xwTqmVUnv4qh5mw", + "indexid": "xNRgpcjFaocMUyLSQSm7urNJX8ovwS8zbS", + "hash160result": "c95978851fbb34305351b4c465d7bdf59b1de79a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.email.domain.toplevel.suspicious" + } +} + +export const IDENTITYDATA_IDCARD: VDXFKeyInterface = { + "vdxfid": "iJLpqieejHL8YncTbnhAW7cUTaMsfHdSGL", + "indexid": "xPAwJX5jabYoAxVVTUMKUW91VENtUTZwau", + "hash160result": "49b9d595086e85ce8fd4159995bbe350181715a3", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + } +} + +export const IDENTITYDATA_IDCARD_ORIGINAL_FRONT: VDXFKeyInterface = { + "vdxfid": "iB7XpaW684q2BYjnqveLSKhSG9zwudnS6o", + "indexid": "xFweHNwAyP3goicphcJVQiDyHp1xo2uuYa", + "hash160result": "29f714a5b08b68b9046525c6c005a00a4d98c853", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iBrpt78Mdrqcc1RHwPWKYBALbNTC4cwdJQ" + } +} + +export const IDENTITYDATA_IDCARD_ORIGINAL_BACK: VDXFKeyInterface = { + "vdxfid": "iH9K2ZhRcyJWbByyUyWsXh544SVhUSrVFt", + "indexid": "xMyRVN8WUHXBDMs1LfB2W5bb66WiNi4FtU", + "hash160result": "24585446879161aed3198273e81ea9a69080ef95", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iNRCZp7JBDHbpKQ2Vhc6TK97hUSRPG4jaX" + } +} + +export const IDENTITYDATA_IDCARD_CROPPED_FRONT: VDXFKeyInterface = { + "vdxfid": "iR8r1t4mYfk8xqZmaNDra6TQrUsZjbGiKS", + "indexid": "xVxxUgVrPyxob1SoS3t1YUywt8tahdr3L4", + "hash160result": "2bc1abbdc2c25032842bc2354e857939cef599ed", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iK822dFQwW2Y5tdpSpxQtHQemf47HoFxqs" + } +} + +export const IDENTITYDATA_IDCARD_CROPPED_BACK: VDXFKeyInterface = { + "vdxfid": "iSM5GLZ1FvzGDNX62vgUgRQC43iaeKxoHK", + "indexid": "xXBBj8z67FCvqYQ7tcLdeovj5hjbbVdh5q", + "hash160result": "56fb7c2a25fc9646e588273ad379ad202e23e2fa", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iCvxKVHbnbwHGZDTaGofeyyJLjsGBSZr7A" + } +} + +export const IDENTITYDATA_IDCARD_FACE: VDXFKeyInterface = { + "vdxfid": "i51M1ZmuPqEZDcC5KJbz6F9XYVacoyBE2X", + "indexid": "x9qTUNCzF9TDqn57AzG94dg4a9bdgabnve", + "hash160result": "77d6aa5baa62d04f8cb7d8fe899bcdebfb51cc10", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iPrxPJC6NbzWnkNyLSvwa8AVrwJWBUV9mM" + } +} + +export const IDENTITYDATA_IDCARD_IDNUMBER: VDXFKeyInterface = { + "vdxfid": "i5bnW5iRQbCtg21NLNybykc6ArhxUwSnVh", + "indexid": "xARtxt9WFuRZJBtQC4dkx98dCWiyQpWVav", + "hash160result": "d525af458c62617e95f5fa1b70b6e36e08be4f17", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iJdUp47SVEzGEHCvoRyix2xufRsAeWSyxa" + } +} + +export const IDENTITYDATA_IDCARD_CATEGORY: VDXFKeyInterface = { + "vdxfid": "iESZ7w2LiZbcxEEWaD4BgVr4VKYkMn1dqk", + "indexid": "xKGfajTRZspHaQ7YRtiLetNbWyZmEdZbq1", + "hash160result": "36204ef98b988fa4ddad9a94d09bae40c7f54978", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "i9MqRfXPAiYwv9q4iSjTtXquNCCZ1GgECn" + } +} + +export const IDENTITYDATA_IDCARD_EXPIRATIONDATE: VDXFKeyInterface = { + "vdxfid": "i8BCBwaioR3PSSgjRcWGx9RfFUCbVXNYxe", + "indexid": "xD1Jek1oejG44cZmHJARvXxCH8DcSWVK4B", + "hash160result": "e2187beb59c4815c0b4926bfa14e5d48657e9133", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iNgDKviLAeeV65eBztuduckUMDE2erB7jj" + } +} + +export const IDENTITYDATA_IDCARD_ISSUING_COUNTRY_MATCHED: VDXFKeyInterface = { + "vdxfid": "i6ubxHFxwzxQU1zmBvLW1oYj6iozy3znSU", + "indexid": "xBjiR5h3oKB56Bso3bzezC5G8Nq1rhjRiV", + "hash160result": "96eb5b9e8921784e76c96e272b20f009d68ca625", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iFgXmTd9Wi2sqZyPqaoejdHG2sMaJWLrEX" + } +} + +export const IDENTITYDATA_IDCARD_ISSUING_REGION: VDXFKeyInterface = { + "vdxfid": "i4AFd1rzyfsmgTLgyn472E3gc2VBaw4uFK", + "indexid": "x8zN5pJ5pz6SJdDiqTiFzcaDdgWCSVW9s9", + "hash160result": "5d8fc30a870e94f5274d09d6c16e5d8795708307", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL" + } +} + +export const IDENTITYDATA_IDCARD_DATEOFBIRTH: VDXFKeyInterface = { + "vdxfid": "i48Nsi8VjHvSdW9MCB59vVF8AeoCSALbW6", + "indexid": "x8xVLWZaac97Fg2P3rjJtsmfCJpDMvuw4c", + "hash160result": "99acfcbf72a37bcfa3ccf9f3d8a60f60a3a92807", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iQhjETQvSkadciDPy69QZNy3hSczWQ4iu4" + } +} + +export const IDENTITYDATA_IDCARD_ADDRESS: VDXFKeyInterface = { + "vdxfid": "iHQjj4N8axeE24n8RctE8cQtSUdSoTFBMv", + "indexid": "xNErBroDSGrteEfAHJYP6zwRU8eTdJWVVZ", + "hash160result": "744a4f4b004c403c1d671053d717a36ecf5bda98", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iGebr2v1TgkWvsyLjs1dQ5SqffqKL8rNm3" + } +} + +export const IDENTITYDATA_IDCARD_ADDRESS_STREET1: VDXFKeyInterface = { + "vdxfid": "iKTakiCWF81oLmpY9nQD9pgQttsKyYBEYz", + "indexid": "xQHhDWdb6SETxwha1U4N8DCwvYtLoHXM2c", + "hash160result": "c284feffa60f1978b8f8551cbd6724ca795e54af", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + } +} + +export const IDENTITYDATA_IDCARD_ADDRESS_CITY: VDXFKeyInterface = { + "vdxfid": "iEwv5MTy2Dg5atRBc8bSTjMLDHsMLQzVDU", + "indexid": "xKn2Y9u3sXtkD4JDTpFbS7ssEwtNDGiHDg", + "hash160result": "bee2235466779e3ea61b5531b3aa396a0984d77d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + } +} + +export const IDENTITYDATA_IDCARD_ADDRESS_REGION: VDXFKeyInterface = { + "vdxfid": "i97JbWvVd6qSRXh8eqjZKG95dj2NeigvWF", + "indexid": "xDwR4KMaUR473haAWXPiHefcfP3PYf7uVw", + "hash160result": "4a74b6e17bea7b240dc8acd7f7e4a82fb34dcd3d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" + } +} + +export const IDENTITYDATA_IDCARD_ADDRESS_POSTCODE: VDXFKeyInterface = { + "vdxfid": "iLhtE8EXXJ6ATCZ7xJzbvyJKRTYXUX4A7i", + "indexid": "xRXzgvfcNcJq5NS9ozekuMprT7ZYKa7cdy", + "hash160result": "556f2f620f185c90906aac53e60810665be700bd", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" + } +} + +export const IDENTITYDATA_IDCARD_ADDRESS_COUNTRY: VDXFKeyInterface = { + "vdxfid": "iNxc7w91fgHgvRoNsifWYxHMFSJcrCuGss", + "indexid": "xTniaja6WzWMYbgQjQKfXLotH6Kdg4E8gT", + "hash160result": "0cab0e442caf58e660f32d2d36f8e64b12f3b9d5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" + } +} + +export const IDENTITYDATA_IDCARD_DOCUMENTVERIFICATION_MATCHED: VDXFKeyInterface = { + "vdxfid": "iMHhAMLCDnisJVbZpTzwdAjwQQobVtkP3e", + "indexid": "xS7od9mH56wXvfUbg9f6bZGUS4pcQztAYY", + "hash160result": "361025b8f50593f08f332b0cd227ade34dcf65c3", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk" + } +} + +export const IDENTITYDATA_IDCARD_NAME_MATCHED: VDXFKeyInterface = { + "vdxfid": "i3duYwSwdrLztnP43wuwiTfH9G5adxpZJm", + "indexid": "x8U21jt2VAZfWxG5uda6grBpAv6bc21iUD", + "hash160result": "11c10b7a91af6a813b1cc0f2945a63bf0435c601", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iKCFQYZudPChh6jypSpcgENoQb5WeX5wHv" + } +} + +export const IDENTITYDATA_IDCARD_DATEOFBIRTHMATCHED: VDXFKeyInterface = { + "vdxfid": "iPFTbFBXsM4df4BkNoMfFoHynxzKKkUqJv", + "indexid": "xU5a43ccifHJHE4nEV1pEBpWpd1LCCSSq8", + "hash160result": "ba6a81f6ea53e339ff4d8e2aa5c1d660aee6e9d8", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iMUfUShqVwWrGSx6HvZcDJwHywiLW5Zusb" + } +} + +export const IDENTITYDATA_PASSPORT: VDXFKeyInterface = { + "vdxfid": "i8oiYgB9L9WJWGJgpcrm68mvoq4KoTASNL", + "indexid": "xDdq1UcEBTiy8SBigJWv4XJTqV5LiS8drz", + "hash160result": "a7e8f210eb00dcc94038864f8c59b8403ccf793a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + } +} + +export const IDENTITYDATA_PASSPORT_ORIGINAL_FRONT: VDXFKeyInterface = { + "vdxfid": "iQhPuQoj5PDXpF5XsA26PhnvbvBVHUCgtM", + "indexid": "xVXWNDEovhSCSQxZiqgFN6KTdaCWDq4RVw", + "hash160result": "942c2ac1a23d27ab82ea20072a31a3aba9c3c9e8", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iBrpt78Mdrqcc1RHwPWKYBALbNTC4cwdJQ" + } +} + +export const IDENTITYDATA_PASSPORT_ORIGINAL_BACK: VDXFKeyInterface = { + "vdxfid": "iHZRBTVpGXBpq1D3JQvB37HwwC81UVaEBt", + "indexid": "xNPXeFvu7qQVTB65A6aL1VpUxr92J21Y2e", + "hash160result": "0b0574e283da6e3dd272ca2f7088634d309f7e9a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iNRCZp7JBDHbpKQ2Vhc6TK97hUSRPG4jaX" + } +} + +export const IDENTITYDATA_PASSPORT_CROPPED_FRONT: VDXFKeyInterface = { + "vdxfid": "iGsEp6i4xXh4gNizJgWEoiCwZxzPsuPvnJ", + "indexid": "xMhMGu99oqujJYc2ANAPn6jUbd1Qimj8Dp", + "hash160result": "c26f63c41583bbf9fb1fb6eb714c87c71054e592", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iK822dFQwW2Y5tdpSpxQtHQemf47HoFxqs" + } +} + +export const IDENTITYDATA_PASSPORT_CROPPED_BACK: VDXFKeyInterface = { + "vdxfid": "iHfLky17R6QTL1tkhN4YzjigfaNKFMXJwg", + "indexid": "xNVTDmSCGQd7xBmnZ3ihy8FDhEPLApagju", + "hash160result": "b49b18cb2d18cabafd16b138f6de43b1136d9d9b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iCvxKVHbnbwHGZDTaGofeyyJLjsGBSZr7A" + } +} + +export const IDENTITYDATA_PASSPORT_FACE: VDXFKeyInterface = { + "vdxfid": "iGvZEAbQPV74x8zimmH857Eyug1YYG6da8", + "indexid": "xMkfgy2VEoKjaJskdSwH3VmWwL2ZPGWyYL", + "hash160result": "c1b64e1b1d902fce4bca08951958ae30c3f28593", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iPrxPJC6NbzWnkNyLSvwa8AVrwJWBUV9mM" + } +} + +export const IDENTITYDATA_PASSPORT_IDNUMBER: VDXFKeyInterface = { + "vdxfid": "iRYCG1nfoPiuZFKqbsugCgi317aY2ErtkM", + "indexid": "xWNJipDkehwaBRCsTZZqB5Ea2mbYowicUR", + "hash160result": "abd6da27bddaf9e92e6872589a8cb1ae056d04f2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iJdUp47SVEzGEHCvoRyix2xufRsAeWSyxa" + } +} + +export const IDENTITYDATA_PASSPORT_CATEGORY: VDXFKeyInterface = { + "vdxfid": "iPinz8N4RxboKaHvTr4FcJXe9DLojw3bXH", + "indexid": "xUYuSvo9HGpTwkAxKXiQah4BAsMpZeqQLH", + "hash160result": "748058a57c693f07b6b69b53a9509086615215de", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "i9MqRfXPAiYwv9q4iSjTtXquNCCZ1GgECn" + } +} + +export const IDENTITYDATA_PASSPORT_EXPIRATIONDATE: VDXFKeyInterface = { + "vdxfid": "iBXSY6Ra3o5jK9QZdnrdttsrnFE6y3H8o9", + "indexid": "xGMYztreu7JPwKHbVUWnsHQPouF7mXgFAg", + "hash160result": "5cd8ab62f4b455d520e951243a6e6ac2be2a4e58", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iNgDKviLAeeV65eBztuduckUMDE2erB7jj" + } +} + +export const IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED: VDXFKeyInterface = { + "vdxfid": "iLjpTPmDufuH38s9XwatiLA8Wk67a2thc8", + "indexid": "xRZvvCCJkz7wfJkBPdF3gigfYQ78WXNncA", + "hash160result": "d53e23bd3ca7de97d1ed41b501d9a1f06b965ebd", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iFgXmTd9Wi2sqZyPqaoejdHG2sMaJWLrEX" + } +} + +export const IDENTITYDATA_PASSPORT_ISSUINGREGION: VDXFKeyInterface = { + "vdxfid": "i87HPTEfVQ9HKF8zrNppBEBF8wur6BAGBf", + "indexid": "xCwPrFfkLiMwwR22i4Uy9chnAbvrufhBnx", + "hash160result": "3f8308ca4fe693714fdab6fb3871698a5a2bd432", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL" + } +} + +export const IDENTITYDATA_PASSPORT_DATEOFBIRTH: VDXFKeyInterface = { + "vdxfid": "iRe6ZecbVBajvySLEiFxAgMtgZwxBiZY78", + "indexid": "xWUD2T3gLVoQZ9KN6Pv794tRiDxy6henbx", + "hash160result": "27a8f2f7695013eef34f4bb36cb9a8eeb92a22f3", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iQhjETQvSkadciDPy69QZNy3hSczWQ4iu4" + } +} + +export const IDENTITYDATA_PASSPORT_ADDRESS: VDXFKeyInterface = { + "vdxfid": "iCMcVHrazgA1N2WpXUmffifER2AhUzD6re", + "indexid": "xHBix6HfqzNfzCPrPARpe7BmSgBiQSui11", + "hash160result": "e6bb757f72e329878ff5e7e8409ee9a0bc706a61", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iGebr2v1TgkWvsyLjs1dQ5SqffqKL8rNm3" + } +} + +export const IDENTITYDATA_PASSPORT_ADDRESS_STREET1: VDXFKeyInterface = { + "vdxfid": "i79XJcQgvEz247HHaKWxTiyxVVnDboWYqv", + "indexid": "xBydmQqmmZCggHAKS1B7S7WVX9oEThCnwK", + "hash160result": "c9f030a041e6460517ff39854d3625f70e7e4828", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + } +} + +export const IDENTITYDATA_PASSPORT_ADDRESS_CITY: VDXFKeyInterface = { + "vdxfid": "iBM6AvLwRcHKHMwDjPmVts1VxKQYHAmFHA", + "indexid": "xGBCdin2GvVyuXpFb5ResFY2yyRZDWy6sS", + "hash160result": "78068da24f1196cf7bcb7e45d3f2bd90e8015956", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + } +} + +export const IDENTITYDATA_PASSPORT_ADDRESS_REGION: VDXFKeyInterface = { + "vdxfid": "iKBAveavEwQG28SE4eRUGY5ZqaSLNrCnM1", + "indexid": "xQ1HPT216FcveJKFvL5dEvc6sETMKCokvR", + "hash160result": "14ad7b91cee4646af2d5625fa0d5eeea8ed239ac", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" + } +} + +export const IDENTITYDATA_PASSPORT_ADDRESS_POSTCODE: VDXFKeyInterface = { + "vdxfid": "iDZEoefPi6Q6WjWseS5LMYwk4PXVzU8Yfd", + "indexid": "xJPMGT6UZQcm8uPuW7jVKwUH63YWskMh6F", + "hash160result": "16150338c79c92a5469e14079ef0eb9d0e75956e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" + } +} + +export const IDENTITYDATA_PASSPORT_ADDRESS_COUNTRY: VDXFKeyInterface = { + "vdxfid": "iNAWV5t3VpZc9mGxRxqHo8qBo5mRDmYNzh", + "indexid": "xSzcwtK8M8nGmw9zHeVSmXMipjnS4TfbaT", + "hash160result": "64016ff1aa45d5a017a351c87751052b721c02cd", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" + } +} + +export const IDENTITYDATA_PASSPORT_DOCUMENTVERIFICATION_MATCHED: VDXFKeyInterface = { + "vdxfid": "iRstHEJfNZfPvmcDUGMyqD6fLvfKvv9ZNr", + "indexid": "xWhzk2jkDst4YwVFKx28obdCNagLpBSeTi", + "hash160result": "ea0746c22573d01b7aa023e40381f655a9bcbdf5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk" + } +} + +export const IDENTITYDATA_PASSPORT_NAME_MATCHED: VDXFKeyInterface = { + "vdxfid": "iNQ1CWDT7So5agryapjXpo2nhxto4w6yM8", + "indexid": "xTE7fJeXxm1kCrk1SWPgoBZKjcuoypYrZa", + "hash160result": "5e8b3b606e58d88fb46e055728ff0a8eeb7c8fcf", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iKCFQYZudPChh6jypSpcgENoQb5WeX5wHv" + } +} + +export const IDENTITYDATA_PASSPORT_DATEOFBIRTHMATCHED: VDXFKeyInterface = { + "vdxfid": "iHExwXrJTrVLTS5okNNtp9BMRoTbwBNBQu", + "indexid": "xN55QLHPKAi15bxqc433nXhtTTUcpv6xtK", + "hash160result": "3f79d48090f69366e7e78b5765b14565fb3a0197", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iMUfUShqVwWrGSx6HvZcDJwHywiLW5Zusb" + } +} + +export const IDENTITYDATA_RESIDENCEPERMIT: VDXFKeyInterface = { + "vdxfid": "iJzdKZ1ppXjnrbasWGH24nWtNchKTFE6oM", + "indexid": "xPpjnMSufqxTUmTuMwwB3B3RQGiLRSe3a7", + "hash160result": "eb1a88f1148f3f3798bd9f08a5b88a50bf473baa", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + } +} + +export const IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_FRONT: VDXFKeyInterface = { + "vdxfid": "iCAHvT9dB52QoCHuHYuYJ2BBkytUndvMVj", + "indexid": "xGzQPFai2PF5RNAw9EZhGQhinduVgDqt5Q", + "hash160result": "e191b50000a4d871b4a310f3360dd8cad35d465f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iBrpt78Mdrqcc1RHwPWKYBALbNTC4cwdJQ" + } +} + +export const IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_BACK: VDXFKeyInterface = { + "vdxfid": "iE6M2Mibzrrneg3cZFbNrXHf9D9FMgBqx9", + "indexid": "xJvTVA9grB5TGqveQwFXpupCAsAGBbcCJR", + "hash160result": "9233dcff0e38f245836911eef94c4bb7238b7774", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iNRCZp7JBDHbpKQ2Vhc6TK97hUSRPG4jaX" + } +} + +export const IDENTITYDATA_RESIDENCEPERMIT_CROPPED_FRONT: VDXFKeyInterface = { + "vdxfid": "i91nujduYeu8scMbSkJj1iZuH5VSh3Z5rW", + "indexid": "xDquNY4zPy7oVnEdJRxsz76SJjWTcVNPwS", + "hash160result": "28ec50fb17556fceea921d0a90d822987471c23c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iK822dFQwW2Y5tdpSpxQtHQemf47HoFxqs" + } +} + +export const IDENTITYDATA_RESIDENCEPERMIT_CROPPED_BACK: VDXFKeyInterface = { + "vdxfid": "iLpNisoTSTZ8LLHtkPJ9HSxVu84QW1a98Z", + "indexid": "xReVBgEYHmmnxWAvc4xJFqV2vn5RR6aiTG", + "hash160result": "03f3ca2aa3bcdbc2c7b60d18913ae869c02f3bbe", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iCvxKVHbnbwHGZDTaGofeyyJLjsGBSZr7A" + } +} + +export const IDENTITYDATA_RESIDENCEPERMIT_FACE: VDXFKeyInterface = { + "vdxfid": "iG9jwZT4PBKWSbm7o5zCWNKZkACyGCCZY3", + "indexid": "xLyrQMt9EVYB4me9emeMUkr6mpDz9wW5M5", + "hash160result": "75cd40bd50a7df36d91334c5e7087f9b602c0c8b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iPrxPJC6NbzWnkNyLSvwa8AVrwJWBUV9mM" + } +} + +export const IDENTITYDATA_RESIDENCEPERMIT_IDNUMBER: VDXFKeyInterface = { + "vdxfid": "iFSUa91mA9uok8XL71HNkK5m8xvBKEiMBn", + "indexid": "xLGb2wSr1U8UNJQMxgwXihcJAcwCCmAsFQ", + "hash160result": "3463196fb71b581b22c2355dca63d8ce0b4a3e83", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iJdUp47SVEzGEHCvoRyix2xufRsAeWSyxa" + } +} + +export const IDENTITYDATA_RESIDENCEPERMIT_CATEGORY: VDXFKeyInterface = { + "vdxfid": "iJ7wb2r93YaLrXkLdKWgAs5nmowgE7Feth", + "indexid": "xNx43qHDtro1UhdNV1Aq9FcKoTxh6YYiWp", + "hash160result": "5eb69e44059f8c65fdc0f132bffe26ba8c50a5a0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "i9MqRfXPAiYwv9q4iSjTtXquNCCZ1GgECn" + } +} + +export const IDENTITYDATA_RESIDENCEPERMIT_EXPIRATIONDATE: VDXFKeyInterface = { + "vdxfid": "iFTmB8nRz1e1LWy6VZy69z13JJDqSjGYzu", + "indexid": "xLHsdwDWqKrfxgr8MFdF8NXaKxErHmHoJn", + "hash160result": "4c0ea69b915ce91fecf6f82b5993835ea4907c83", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iNgDKviLAeeV65eBztuduckUMDE2erB7jj" + } +} + +export const IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED: VDXFKeyInterface = { + "vdxfid": "iDycAmsF8RoSfDCqt8GKwfLdajJEejPYBF", + "indexid": "xJoidaJKyk27HP5sjovUv3sAcPKFUR4Skz", + "hash160result": "198ee70ddf1dae654a868ee39d83015a37463173", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iFgXmTd9Wi2sqZyPqaoejdHG2sMaJWLrEX" + } +} + +export const IDENTITYDATA_RESIDENCEPERMIT_ISSUINGREGION: VDXFKeyInterface = { + "vdxfid": "iLZnhoDnggyo9LGiyS8xvEovkSn1yRuRjz", + "indexid": "xRPuAbesY1CTmW9kq7o7tdLTn6o2m96TLY", + "hash160result": "f969f7afa0599e431674b2e76bc4ee5f3cf778bb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL" + } +} + +export const IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTH: VDXFKeyInterface = { + "vdxfid": "iMPmaDAiNuaqfSNV9SbCuaYG2TCvPNU495", + "indexid": "xSDt31boEDoWHcFX18FMsy4o47DwGgmFbq", + "hash160result": "93ab89f3abe5db79de5fb960f9362b02ecfc8bc4", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iQhjETQvSkadciDPy69QZNy3hSczWQ4iu4" + } +} + +export const IDENTITYDATA_RESIDENCEPERMIT_ADDRESS: VDXFKeyInterface = { + "vdxfid": "i5pghYvnurAvtbyT69Lt1wBk9NTQNYfWt5", + "indexid": "xAeoAMMsmAPbWmrUwq12zKiHB2URHSXqA1", + "hash160result": "43aa306c8ff55fc646a7a1bb0e0171576c4ec019", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iGebr2v1TgkWvsyLjs1dQ5SqffqKL8rNm3" + } +} + +export const IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_STREET1: VDXFKeyInterface = { + "vdxfid": "iC3BuU53cL5hXRnnezmmToKvUZxyQb1AUs", + "indexid": "xGsJNGW8TeJN9bfpWgRvSBrTWDyzMRUX1Q", + "hash160result": "64d4d3dd9f6acbd72f13a717572302109c6eee5d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + } +} + +export const IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_CITY: VDXFKeyInterface = { + "vdxfid": "iHv1BkzjJgJcwsBHJCeGTgcUHmoCmGE5py", + "indexid": "xNk7eZRp9zXHa34K9tJRS591KRpDa69BBJ", + "hash160result": "6d9fbcb4cd86e46dfbf806c13f951108c253639e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + } +} + +export const IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_REGION: VDXFKeyInterface = { + "vdxfid": "iKEHZjtgcCRd67iRsA93J7yphxvRUYdZig", + "indexid": "xQ4Q2YKmTWeHiHbTiqoCGWWMjcwSPM6wn6", + "hash160result": "6c5f8b7989f6210f50d9d270c170cae9dd9cd0ac", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" + } +} + +export const IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_POSTCODE: VDXFKeyInterface = { + "vdxfid": "i7niNaE598TEVhfaf78do5rhKX6gXgdqAC", + "indexid": "xCcpqNf9zSfu7sYcWnnnmUPEMB7hMATGYv", + "hash160result": "ca2d0134ac28a0f46363ea91b036fc78531f512f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" + } +} + +export const IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_COUNTRY: VDXFKeyInterface = { + "vdxfid": "i7sePTAMwZ5hVQvdgjfWr9mCg4G8YDvwcx", + "indexid": "xChkrFbSnsJN7aofYRKfpYHjhiH9PqemVR", + "hash160result": "2ffeb2e22fb423ede8ad0127d39be36133e03f30", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" + } +} + +export const IDENTITYDATA_RESIDENCEPERMIT_DOCUMENTVERIFICATION_MATCHED: VDXFKeyInterface = { + "vdxfid": "iGRk3K3N3Nr4gvVWL2aKdzfjP54ZNvpVaT", + "indexid": "xMFrW7USth4jK6NYBiEUcPCGQj5aM9U9ed", + "hash160result": "316ae15a805987678066399eb21d162759e9128e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk" + } +} + +export const IDENTITYDATA_RESIDENCEPERMIT_NAME_MATCHED: VDXFKeyInterface = { + "vdxfid": "iPJhtbfg9yL4ydMLXfgb1XUqm4zvtcS3c7", + "indexid": "xU8pMQ6m1HYjboENPMLjyv1Nnj1wmqZv7q", + "hash160result": "52e2b8b282867a147bd6ce097359606cd91587d9", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iKCFQYZudPChh6jypSpcgENoQb5WeX5wHv" + } +} + +export const IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTHMATCHED: VDXFKeyInterface = { + "vdxfid": "iBZWkQDNUV46RpDHi3CMn78ENBcQj4RVUp", + "indexid": "xGPdDCeTKoGm3z6KZirWkVemPqdRgTRtbw", + "hash160result": "197dbc7ddf5795a60bb0bf037c8b846cda83b258", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iMUfUShqVwWrGSx6HvZcDJwHywiLW5Zusb" + } +} + +export const IDENTITYDATA_RESIDENTCARD: VDXFKeyInterface = { + "vdxfid": "iRZk3qsYq1ac6H53v3cSWhqx8VqUoMxpuK", + "indexid": "xWPrWeJdgKoGiSx5mjGbV6NVA9rVgyJnaL", + "hash160result": "b804f8f1b6006c80b18d5cda0fbcc39900614ff2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + } +} + +export const IDENTITYDATA_RESIDENTCARD_ORIGINAL_FRONT: VDXFKeyInterface = { + "vdxfid": "iHqGf5Yq5MTjS3vJS4GmfPkU2unJVFMLXs", + "indexid": "xNfP7syuvfgQ4DoLHjvvdnH14ZoKPe8ZfA", + "hash160result": "3ee1ac34db24100dbcd7ab1d0c110fc674297e9d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iBrpt78Mdrqcc1RHwPWKYBALbNTC4cwdJQ" + } +} + +export const IDENTITYDATA_RESIDENTCARD_ORIGINAL_BACK: VDXFKeyInterface = { + "vdxfid": "iQAb2ZQ7Z5tZXiiASNpuXYWGGA9ZNTho6m", + "indexid": "xUzhVMqCQQ7E9tbCJ4V4Vw2oHpAaA2pxef", + "hash160result": "cf0888932dddd9da9a7e8008dc7e3dfe9a27f6e2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iNRCZp7JBDHbpKQ2Vhc6TK97hUSRPG4jaX" + } +} + +export const IDENTITYDATA_RESIDENTCARD_CROPPED_FRONT: VDXFKeyInterface = { + "vdxfid": "iCAq6xmjVDq3an2yRkws3xmLfXmDfm6TK5", + "indexid": "xGzwZmCpLY3iCwv1HSc22MHshBnEaVnkU7", + "hash160result": "6e067b98f82fc5d158a11c57e86fd5583165605f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iK822dFQwW2Y5tdpSpxQtHQemf47HoFxqs" + } +} + +export const IDENTITYDATA_RESIDENTCARD_CROPPED_BACK: VDXFKeyInterface = { + "vdxfid": "i5DMa83PXnoc3VaaDBvwUPqtXQS3VkJM65", + "indexid": "xA3U2vUUP72GffTc4sb6SnNRZ4T4Qptiiu", + "hash160result": "79ad91be4e21e9065c557d16d530bd53c5c71113", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iCvxKVHbnbwHGZDTaGofeyyJLjsGBSZr7A" + } +} + +export const IDENTITYDATA_RESIDENTCARD_FACE: VDXFKeyInterface = { + "vdxfid": "iMkREmUUamd78MP7GeP1wtFteRGoWEAgFj", + "indexid": "xSaXhZuZS5qmkXG98L3AvGnRg5HpLnMLTA", + "hash160result": "a8daf37e1cd1ccc4edbf4f0ee3b193f588bf73c8", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iPrxPJC6NbzWnkNyLSvwa8AVrwJWBUV9mM" + } +} + +export const IDENTITYDATA_RESIDENTCARD_IDNUMBER: VDXFKeyInterface = { + "vdxfid": "iGYqQVqehuhYb95knMeydLdtoEzGAFJU9e", + "indexid": "xMNwsJGjZDvDDJxne3K8bjARpu1H4ShUgH", + "hash160result": "c9b041ee41a77909c6aee95418d9e5244d4d6a8f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iJdUp47SVEzGEHCvoRyix2xufRsAeWSyxa" + } +} + +export const IDENTITYDATA_RESIDENTCARD_CATEGORY: VDXFKeyInterface = { + "vdxfid": "iMxE22zmptXB8ShHsSypWSqXLmEficJVug", + "indexid": "xSnLUqRrgCjqkcaKj8dyUqN4NRFgaJT7cn", + "hash160result": "5b6369f617841495baaeb8b396b6bf87c75fafca", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "i9MqRfXPAiYwv9q4iSjTtXquNCCZ1GgECn" + } +} + +export const IDENTITYDATA_RESIDENTCARD_EXPIRATIONDATE: VDXFKeyInterface = { + "vdxfid": "iFeEkx5dNqs9RmYnyBNnMJpigdVo75MA3Q", + "indexid": "xLUMDkWiEA5p3wRpps2wKhMFiHWp59WJtb", + "hash160result": "53ab24af7c986998582d42d98d4e7b4ef1bf7785", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iNgDKviLAeeV65eBztuduckUMDE2erB7jj" + } +} + +export const IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED: VDXFKeyInterface = { + "vdxfid": "iHHLQuEx2sQ5FHm8cHs2eW5YFKBu42QyT4", + "indexid": "xN7Sshg2tBcjsTeATyXBctc5GyCuutBKAi", + "hash160result": "c233566af8cb4d2bec45de1b6314a8c373fc7397", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iFgXmTd9Wi2sqZyPqaoejdHG2sMaJWLrEX" + } +} + +export const IDENTITYDATA_RESIDENTCARD_ISSUINGREGION: VDXFKeyInterface = { + "vdxfid": "iQSeWkZJbBknqaAvrVk8UpzXcbDcD3JwZK", + "indexid": "xVGkyYzPSVyTTk3xiBQHTDX4eFEd6nwER3", + "hash160result": "f46eda08f73c5415674385dafb8f913a5ab8ffe5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL" + } +} + +export const IDENTITYDATA_RESIDENTCARD_DATEOFBIRTH: VDXFKeyInterface = { + "vdxfid": "iL3JyAfGXCDqotYbGTsC6Et9pe4x9zqKft", + "indexid": "xQsRRy6MNWSWS4Rd89XM4dQgrJ5y4pBTXB", + "hash160result": "ebc0dd42cc2bbf62c504fb64e7b6d29ebb55b5b5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iQhjETQvSkadciDPy69QZNy3hSczWQ4iu4" + } +} + +export const IDENTITYDATA_RESIDENTCARD_ADDRESS: VDXFKeyInterface = { + "vdxfid": "iBU6zckdwpwkR9BbFPVKNEf5X7b8TWERYR", + "indexid": "xGJDTRBio9AR3K4d759ULdBcYmc9QPsq2R", + "hash160result": "921d0bf97b612e9de3294054e4a25e4c0c9bac57", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iGebr2v1TgkWvsyLjs1dQ5SqffqKL8rNm3" + } +} + +export const IDENTITYDATA_RESIDENTCARD_ADDRESS_STREET1: VDXFKeyInterface = { + "vdxfid": "i47Wp3Wt9Bib7KB6oSxm8QtQxmAqwxZV18", + "indexid": "x8wdGqwxzVwFjV48f8cv6oQwzRBrs4rtgB", + "hash160result": "4f18b96b75ce0af53a288a0e382c54df3adffe06", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + } +} + +export const IDENTITYDATA_RESIDENTCARD_ADDRESS_CITY: VDXFKeyInterface = { + "vdxfid": "iRNzrpZ74Wm6wMMFh5VeUzR2NBfa9R3UTo", + "indexid": "xWD7KczBupymZXEHYm9oTNwZPqgb5cJGDD", + "hash160result": "149842d5588eaf9a77f40e4b63520c09832a47f0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + } +} + +export const IDENTITYDATA_RESIDENTCARD_ADDRESS_REGION: VDXFKeyInterface = { + "vdxfid": "iHAW2LhviXqcVdMsPTcap9khj6rfrfBKRu", + "indexid": "xMzcV991Zr4H7oEuF9GjnYHEkksgoPXYFo", + "hash160result": "c7cd6053d9cd2a7e4482f46366202e87e7182996", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" + } +} + +export const IDENTITYDATA_RESIDENTCARD_ADDRESS_POSTCODE: VDXFKeyInterface = { + "vdxfid": "i9R5Y1NexqRDP3ztWox1qCPVEVZvbAS7Yx", + "indexid": "xEFBzoojp9dt1DsvNVcAoav2G9awPo2kkY", + "hash160result": "2ccf68aa3d77e0d0a30ef4bdae990b6a72e32941", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" + } +} + +export const IDENTITYDATA_RESIDENTCARD_ADDRESS_COUNTRY: VDXFKeyInterface = { + "vdxfid": "iAZGARqg4GFG8SdjuKe9Zkf9SNqS2fqqop", + "indexid": "xFPNdEGkuaTvkcWmm1JJY9BgU2rSwXWCNA", + "hash160result": "21c3b6b680c00fc148910e6684737549b636ae4d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" + } +} + +export const IDENTITYDATA_RESIDENTCARD_DOCUMENTVERIFICATION_MATCHED: VDXFKeyInterface = { + "vdxfid": "iQvbQZ6EQmkESfrgtXhCJ8Vszu1oC9f5rt", + "indexid": "xVkhsMXKG5xu4qjikDMMGX2R2Z2p3yR8MD", + "hash160result": "817d1a8d17b92516bccc8e026fbf4d8e09c648eb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk" + } +} + +export const IDENTITYDATA_RESIDENTCARD_NAME_MATCHED: VDXFKeyInterface = { + "vdxfid": "iNdqmEoGr2zr9eDPmPS99nHJQcK8c61SWR", + "indexid": "xTTxE3EMhMDWmp6Rd56J8AoqSGL9Yay9KW", + "hash160result": "13cc257f9ae7a639ce00b049198336b15a6f2dd2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iKCFQYZudPChh6jypSpcgENoQb5WeX5wHv" + } +} + +export const IDENTITYDATA_RESIDENTCARD_DATEOFBIRTHMATCHED: VDXFKeyInterface = { + "vdxfid": "iL3YRkmngkLVsPa1xwAdWcb5NEjiZdCLbB", + "indexid": "xQsetZCsY4ZAVZT3pcpnV17cPtkjSpUs5B", + "hash160result": "800f1e6739db010a4edc9ed45e4d2422c591c0b5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iMUfUShqVwWrGSx6HvZcDJwHywiLW5Zusb" + } +} + +export const IDENTITYDATA_VISA: VDXFKeyInterface = { + "vdxfid": "iATKs43yLjHHyCcLmVtZt2gGZF5PaTvxfy", + "indexid": "xFHSKrV4C3VxbNVNdBYirRCoau6QSwcyaF", + "hash160result": "f3240ba891b8ed340bc5f8ca9f7c6e3391ce8e4c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + } +} + +export const IDENTITYDATA_VISA_ORIGINAL_FRONT: VDXFKeyInterface = { + "vdxfid": "iSQ98EpyqS26vDxLz2sPkSLfHitiSE5W66", + "indexid": "xXEFb3G4gkEmYPqNqiXYipsCKNujJTbHCP", + "hash160result": "f7bb12de360a562c66b20e49714fdf7c979b76fb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iBrpt78Mdrqcc1RHwPWKYBALbNTC4cwdJQ" + } +} + +export const IDENTITYDATA_VISA_ORIGINAL_BACK: VDXFKeyInterface = { + "vdxfid": "iP7hjj56oH2Xozpw6sPAx4tmXzdCqCGc8P", + "indexid": "xTwpCXWBebFCSAhxxZ3KvTRJZeeDgSAny1", + "hash160result": "d52e97ed89ccb3d384cee2509a0bf1aacf6172d7", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iNRCZp7JBDHbpKQ2Vhc6TK97hUSRPG4jaX" + } +} + +export const IDENTITYDATA_VISA_CROPPED_FRONT: VDXFKeyInterface = { + "vdxfid": "i5GYu5sBm2sJh1trhe7ry2J3h5vq5jtBi5", + "indexid": "xA6fMtJGcM5yKBmtZKn1wQpaijwquAGHpb", + "hash160result": "9f1a97f4206a3d10c987d982c6093c31c67bac13", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iK822dFQwW2Y5tdpSpxQtHQemf47HoFxqs" + } +} + +export const IDENTITYDATA_VISA_CROPPED_BACK: VDXFKeyInterface = { + "vdxfid": "iQRrKSZCi8oURCVTPdvFcNXARXq8BUmEPQ", + "indexid": "xVFxnEzHZT293NNVFKaQam3hTBr9B2SPr8", + "hash160result": "91705b953ea6a6824096763e55bd7ff89128d9e5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iCvxKVHbnbwHGZDTaGofeyyJLjsGBSZr7A" + } +} + +export const IDENTITYDATA_VISA_FACE: VDXFKeyInterface = { + "vdxfid": "i5HD9vjKw9soTjAC4GwfKnEvEFVMuRU1Tt", + "indexid": "xA7KcjAQnU6U5u3DuxbpJAmTFuWNhv9uYv", + "hash160result": "9b92d6ae6541357cea0bb018f616586dfc6acc13", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iPrxPJC6NbzWnkNyLSvwa8AVrwJWBUV9mM" + } +} + +export const IDENTITYDATA_VISA_IDNUMBER: VDXFKeyInterface = { + "vdxfid": "i7m6YfgMd7iELn25uZ36oA9sScTHdwHe1Z", + "indexid": "xCbD1U7SURvtxwu7mEhFmYgQUGUJaGUuzV", + "hash160result": "54d2d2bdfe71c96efe3d5630159f55c0e6cc022f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iJdUp47SVEzGEHCvoRyix2xufRsAeWSyxa" + } +} + +export const IDENTITYDATA_VISA_CATEGORY: VDXFKeyInterface = { + "vdxfid": "i5ADnmaWGg9VJhYueJwd5kFmSgxuhLxHrQ", + "indexid": "x9zLFa1b7zN9vsRwVzbn48nJULyvfSeNuC", + "hash160result": "c1a982a1a03c643bdace28189b80be6353097a12", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "i9MqRfXPAiYwv9q4iSjTtXquNCCZ1GgECn" + } +} + +export const IDENTITYDATA_VISA_EXPIRATIONDATE: VDXFKeyInterface = { + "vdxfid": "iAdCPpmiY4W1Mkb7vQNTiR38HFBMuwMcEe", + "indexid": "xFTJrdCoPNifyvU9n62cgoZfJuCNkyMTYH", + "hash160result": "a14a1b7acddd65bc3b403b8d080a982738bb6c4e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iNgDKviLAeeV65eBztuduckUMDE2erB7jj" + } +} + +export const IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED: VDXFKeyInterface = { + "vdxfid": "iRRYUVK9WZodGM15oJCrZgdXV6PaLZoxFC", + "indexid": "xWFewHkEMt2HtWt7eys1Y5A4WkQbHjGMmc", + "hash160result": "22ddef78469b09e9352e948b16fec0978a63c2f0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iFgXmTd9Wi2sqZyPqaoejdHG2sMaJWLrEX" + } +} + +export const IDENTITYDATA_VISA_ISSUINGREGION: VDXFKeyInterface = { + "vdxfid": "iE5fNZUT4G8ZnR1BbJTNCgc54FUFwqeUcp", + "indexid": "xJumqMuXuaMEQatDSz7XB58c5uVGrJL3e3", + "hash160result": "d7dd15c309c0ae09f5a7293b4b0cf15ca7715674", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL" + } +} + +export const IDENTITYDATA_VISA_DATEOFBIRTH: VDXFKeyInterface = { + "vdxfid": "iF8CRZfCthVVm2VoxyfjMcmXw5x2EReAMv", + "indexid": "xKxJtN6Hk1iAPCNqpfKtL1J4xjy396V6v7", + "hash160result": "908c870f1f57ea5cd8aae089feb5f4f98752c97f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iQhjETQvSkadciDPy69QZNy3hSczWQ4iu4" + } +} + +export const IDENTITYDATA_VISA_ADDRESS: VDXFKeyInterface = { + "vdxfid": "i53bAJPm5Dvbhovj671RVzkZq9Lej8M8iw", + "indexid": "x9shd6pqvY9GKyokwnfaUPH6roMfesuo4U", + "hash160result": "b3f7110b2359782dc7df5a12c740a275e9f63811", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iGebr2v1TgkWvsyLjs1dQ5SqffqKL8rNm3" + } +} + +export const IDENTITYDATA_VISA_ADDRESS_STREET1: VDXFKeyInterface = { + "vdxfid": "iGpueUZCzRG6YVL5xZVV56sjpK39wXm3T6", + "indexid": "xMf27GzHqjUmAfD7pF9e3VQGqy4Ao4VwBi", + "hash160result": "e32af4b6f696c06f289e9d19674a31ad5f7f7492", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + } +} + +export const IDENTITYDATA_VISA_ADDRESS_CITY: VDXFKeyInterface = { + "vdxfid": "iNRkLpudpDSAZtoyxSLAV6qp143Vny58dF", + "indexid": "xTFrodLifXeqC4h1p7zKTVNM2i4WdCQiTz", + "hash160result": "7a9966496c47f9b145e785c9fd76fbc515ebe3cf", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + } +} + +export const IDENTITYDATA_VISA_ADDRESS_REGION: VDXFKeyInterface = { + "vdxfid": "iR5syE1ENGxcDwcUXrvDnYT8jfXTF9RWLU", + "indexid": "xVuzS2SKDbBGr7VWPYaNkvyfmKYU7gkeus", + "hash160result": "1646f77db041fe2fd10d01a7afffc9cdf4570aed", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" + } +} + +export const IDENTITYDATA_VISA_ADDRESS_POSTCODE: VDXFKeyInterface = { + "vdxfid": "i4MPAfFeCJGDuXgKsyDLRJgcam4ukpEo28", + "indexid": "x9BVdTgj3cUtXhZMjesVPhD9cR5vg2V94k", + "hash160result": "ceab8e1f6f76178916d73d6671e8767269509e09", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" + } +} + +export const IDENTITYDATA_VISA_ADDRESS_COUNTRY: VDXFKeyInterface = { + "vdxfid": "iPnjFJpqiiBQ7D6797hNoVmbNJMydCZdgj", + "indexid": "xUcqi7Fva2Q4jNy8zoMXmtJ8PxNzWUqNgK", + "hash160result": "1e10864c861d5eda424d0e6ecf1ae20977ddd3de", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" + } +} + +export const IDENTITYDATA_VISA_DOCUMENTVERIFICATION_MATCHED: VDXFKeyInterface = { + "vdxfid": "iKiQKkypr3B5NEHvPBg2sNEHeZcrZy3dL1", + "indexid": "xQYWnZQuhMPjzQAxEsLBqkkpgDdsNiGwfo", + "hash160result": "b36c238b24223f6a4652f6301bf5dfa5dae621b2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk" + } +} + +export const IDENTITYDATA_VISA_NAME_MATCHED: VDXFKeyInterface = { + "vdxfid": "iKDJ8c248aZMWkKSFuVypNt4GVrZ91oArN", + "indexid": "xQ3QbQT8ytn28vCU7bA8nmQbJ9sa3AvkmG", + "hash160result": "96b725305bec875c2f0fb3028def34a277aba0ac", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iKCFQYZudPChh6jypSpcgENoQb5WeX5wHv" + } +} + +export const IDENTITYDATA_VISA_DATEOFBIRTHMATCHED: VDXFKeyInterface = { + "vdxfid": "i9o1iuJJTwfTCuJzCT6yw1X41SbEwJk1DC", + "indexid": "xEd8BhjPKFt7q5C248m8uQ3b36cFn4BGH7", + "hash160result": "e6f5f12e63f6b86c4dc1f4185ed6c89d7edb4f45", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iMUfUShqVwWrGSx6HvZcDJwHywiLW5Zusb" + } +} + +export const IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALFRONT: VDXFKeyInterface = { + "vdxfid": "iBrpt78Mdrqcc1RHwPWKYBALbNTC4cwdJQ", + "indexid": "xGgwLuZSVB4HEBJKo5AUWZgsd2UCxbFCCA", + "hash160result": "734505c8a36a53d58aedfc18f8f0c9e312b9f85b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.originalfront" + } +} + +export const IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALBACK: VDXFKeyInterface = { + "vdxfid": "iNRCZp7JBDHbpKQ2Vhc6TK97hUSRPG4jaX", + "indexid": "xTFK2cYP2XWGSVH4MPGFRhfej8TSGxUzFR", + "hash160result": "fc576cd9799270c2e432da7b5481254c9864c9cf", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.originalback" + } +} + +export const IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDFRONT: VDXFKeyInterface = { + "vdxfid": "iK822dFQwW2Y5tdpSpxQtHQemf47HoFxqs", + "indexid": "xPx8VRgVnpFCi4WrJWcZrfwBoK58CsfaGo", + "hash160result": "6b2cc84a0df71c4b1920d5332ecde7cdd625a1ab", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.croppedfront" + } +} + +export const IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDBACK: VDXFKeyInterface = { + "vdxfid": "iCvxKVHbnbwHGZDTaGofeyyJLjsGBSZr7A", + "indexid": "xHm4nHigdv9wtj6VRxTpdNVqNPtH2yr1Kb", + "hash160result": "edcfcebea370f151dc72c13a34b972dd9fb8b867", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.croppedback" + } +} + +export const IDENTITYDATA_DOCUMENTVERIFICATION_FACE: VDXFKeyInterface = { + "vdxfid": "iPrxPJC6NbzWnkNyLSvwa8AVrwJWBUV9mM", + "indexid": "xUh4r6dBDvDBQvG1C8b6YWh2tbKX74nCWP", + "hash160result": "d65b41ab8d8c667a46921b860342f471eb7ea0df", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.face" + } +} + +export const IDENTITYDATA_DOCUMENTVERIFICATION_IDNUMBER: VDXFKeyInterface = { + "vdxfid": "iJdUp47SVEzGEHCvoRyix2xufRsAeWSyxa", + "indexid": "xPTbGrYXLZCvrT5xf7dsvRVSh5tBU3pzip", + "hash160result": "34ad72308593579994ebe622e284a67044713ba6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.idnumber" + } +} + +export const IDENTITYDATA_DOCUMENTVERIFICATION_CATEGORY: VDXFKeyInterface = { + "vdxfid": "i9MqRfXPAiYwv9q4iSjTtXquNCCZ1GgECn", + "indexid": "xEBwtTxU22mcYKi6a8PcrvNSPrDZtQ5nSL", + "hash160result": "6d03e9b13582f7069c52d73f7f55881dd9dc8c40", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.category" + } +} + +export const IDENTITYDATA_DOCUMENTVERIFICATION_EXPIRATIONDATE: VDXFKeyInterface = { + "vdxfid": "iNgDKviLAeeV65eBztuduckUMDE2erB7jj", + "indexid": "xTWKnj9R1xs9iFXDraZnt1H1NsF3UEb4Kf", + "hash160result": "6ecad210f102677f2d2d75a0929fb3676c44a0d2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.expirationdate" + } +} + +export const IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY: VDXFKeyInterface = { + "vdxfid": "iFgXmTd9Wi2sqZyPqaoejdHG2sMaJWLrEX", + "indexid": "xLWeEG4EN2FYTjrRhGToi1oo4XNbE2QwRu", + "hash160result": "c0e0b8f43025cc9574486117135e4c8fa8c7e685", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.issuingcountry" + } +} + +export const IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGREGION: VDXFKeyInterface = { + "vdxfid": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL", + "indexid": "xGomhGg7SbfRombFesZCzxapM7Lc5aQFa4", + "hash160result": "1ff5e3f915ccb6616cbc04e0b51961f98694435d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.issuingregion" + } +} + +export const IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTH: VDXFKeyInterface = { + "vdxfid": "iQhjETQvSkadciDPy69QZNy3hSczWQ4iu4", + "indexid": "xVXqhFr1J4oJEt6RpmoZXmVaj6e1NWsjoF", + "hash160result": "38b824222653effa835ea81b8bf2397b18e6d9e8", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.dateofbirth" + } +} + +export const IDENTITYDATA_DOCUMENTVERIFICATION_ADDRESS: VDXFKeyInterface = { + "vdxfid": "iGebr2v1TgkWvsyLjs1dQ5SqffqKL8rNm3", + "indexid": "xMUiJqM6JzyBZ3rNbYfnNTyNhKrLEbbAy6", + "hash160result": "c1e17b8a68c7238fc479638a4ea90a09887a8190", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.address" + } +} + +export const IDENTITYDATA_ADDRESS_STREET1: VDXFKeyInterface = { + "vdxfid": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj", + "indexid": "xNUFncPpokjWp66awDFYo1m4UPLA8ubaiB", + "hash160result": "b66f8fe85cc09f7df77e3a0af34bb10b3a77639b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.address.street1" + } +} + +export const IDENTITYDATA_ADDRESS_STREET2: VDXFKeyInterface = { + "vdxfid": "i3h8D5kGtn6DCVCwPFvbypbFCqfzAhXiD2", + "indexid": "x8XEftBMk6Jspf5yEwakxD7nEVh12MU6qD", + "hash160result": "c156ac2c6f101631e348f95b6fca8ad063056202", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.address.street2" + } +} + +export const IDENTITYDATA_ADDRESS_CITY: VDXFKeyInterface = { + "vdxfid": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD", + "indexid": "xM76PTRnxBRkvg1i4D1PKocd4n3RqY3CFe", + "hash160result": "b03fee48a0694abcf0e26aeee63386a538c26a8c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.address.city" + } +} + +export const IDENTITYDATA_ADDRESS_REGION: VDXFKeyInterface = { + "vdxfid": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x", + "indexid": "xCkRVkwGGxUE335WrtVKzFEV4EZ3XYsk9g", + "hash160result": "b838dcdca8dd93524a9bbeb4a551d41be3f7c030", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.address.region" + } +} + +export const IDENTITYDATA_ADDRESS_POSTCODE: VDXFKeyInterface = { + "vdxfid": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC", + "indexid": "xVQLwJNgMdU7oRYzDBi9Qj5sPwC4vbkTUi", + "hash160result": "2ee05285375ce5e909eb31e5c08d042231fb6ee7", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.address.postcode" + } +} + +export const IDENTITYDATA_ADDRESS_COUNTRY: VDXFKeyInterface = { + "vdxfid": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK", + "indexid": "xTi8RLedRrhDrkgbcdyrpPZmtNvpSJTWGw", + "hash160result": "fafe1c0c79889407ed4172586eb02bf3c6c4dbd4", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.address.country" + } +} + +export const IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED: VDXFKeyInterface = { + "vdxfid": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk", + "indexid": "xPJ2puxZGpXvCmcBkgaaHMJ9vGBNfo83vX", + "hash160result": "5dfba519a35dbb63e0a12e071b47b4b2f99c6ca4", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.matched" + } +} + +export const IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED: VDXFKeyInterface = { + "vdxfid": "iKCFQYZudPChh6jypSpcgENoQb5WeX5wHv", + "indexid": "xQ2MsLzzUhRNKGd1g8UmecuLSF6XcYynDa", + "hash160result": "0d02d8dce6be6e0b4c87efdac286f3739efa6dac", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.name.matched" + } +} + +export const IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED: VDXFKeyInterface = { + "vdxfid": "iMUfUShqVwWrGSx6HvZcDJwHywiLW5Zusb", + "indexid": "xSJmwF8vMFjWtcq89cDmBhTq1bjMRkFKEg", + "hash160result": "3467c9e6461d44959372367130363b01ebf978c5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.dateofbirthmatched" + } +} + diff --git a/src/vdxf/index.ts b/src/vdxf/index.ts index 9e8774b..29176d8 100644 --- a/src/vdxf/index.ts +++ b/src/vdxf/index.ts @@ -12,6 +12,7 @@ import { BigNumber } from "../utils/types/BigNumber"; export * from './keys' export * from './scopes' export * from './keymap' +export * from './identityDataKeys' export interface VDXFObjectInterface { vdxfkey: string; diff --git a/src/vdxf/keys.ts b/src/vdxf/keys.ts index a680c53..db88bcd 100644 --- a/src/vdxf/keys.ts +++ b/src/vdxf/keys.ts @@ -5,6 +5,10 @@ export interface VDXFKeyInterface { name: string; namespace: string; }; + bounddata?: { + vdxfkey: string; + } + indexid?: string; } export const VERUSPAY_INVOICE_VDXF_KEY: VDXFKeyInterface = { @@ -376,42 +380,6 @@ export const ATTESTATION_VIEW_RESPONSE: VDXFKeyInterface = { } }; -export const IDENTITY_DATA_FIRSTNAME: VDXFKeyInterface = { - "vdxfid": "i4GqsotHGa4czCdtg2d8FVHKfJFzVyBPrM", - "hash160result": "31e7d78d45dd436cd977ac0f9ed03094bd87c208", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.firstname" - }, -}; - -export const IDENTITY_DATA_LASTNAME: VDXFKeyInterface = { - "vdxfid": "iHybTrNB1kXRrjsCtJXd6fvBKxepqMpS5Z", - "hash160result": "3c3fb99f2b33f5c20c890f36fa8cc1ff3d30119f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.lastname" - }, -}; - -export const IDENTITY_DATA_ATTESTOR: VDXFKeyInterface = { - "vdxfid": "iNe8VaRBRFDhb6xjZ7WHNWgfM73428GN8B", - "hash160result": "5e01d5d356d517df57ea0f391c86e11a84663bd2", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.attestor" - } -}; - -export const IDENTITY_DATA_IDENTITY: VDXFKeyInterface = { - "vdxfid": "iFa41TpKfvbjaEnP78BNpSA9KYNgED58ms", - "hash160result": "63730181dc037834a7b2b9e7fed49863ca1cad84", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.identity" - } -}; - export const ATTESTATION_TYPE: VDXFKeyInterface = { "vdxfid": "iAJUD5mgT6MHz8ymF49XUtBDRS7uvYqNWZ", "hash160result": "e56544849c038b7cfadb0a1074ac51df9207e24a", @@ -421,6 +389,7 @@ export const ATTESTATION_TYPE: VDXFKeyInterface = { } }; +// DATA TYPES export const DATA_TYPE_STRING: VDXFKeyInterface = { "vdxfid": "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c", From 59eca7b098458928e8a7e53335bdf6d066db554e Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Tue, 13 Feb 2024 15:35:28 +0000 Subject: [PATCH 065/120] Key names updates --- src/vdxf/classes/attestationData.ts | 212 +++++++++++++++++++++++++++- 1 file changed, 208 insertions(+), 4 deletions(-) diff --git a/src/vdxf/classes/attestationData.ts b/src/vdxf/classes/attestationData.ts index 9acd5a2..6536675 100644 --- a/src/vdxf/classes/attestationData.ts +++ b/src/vdxf/classes/attestationData.ts @@ -26,6 +26,210 @@ export const AttestationVdxfidMap = { [identitykeys.IDENTITYDATA_LASTNAME.vdxfid]: { name: "Last Name", type: AttestationClassTypes.BUFFER_DATA_STRING }, [identitykeys.IDENTITYDATA_ATTESTOR.vdxfid]: { name: "Attestor ID", type: AttestationClassTypes.BUFFER_DATA_STRING }, [identitykeys.IDENTITYDATA_IDENTITY.vdxfid]: { name: "Identity", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_ID.vdxfid]: { name: "ID", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_USERID.vdxfid]: { name: "User ID", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_CREATEDAT.vdxfid]: { name: "Created at", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_COMPLETEDAT.vdxfid]: { name: "Completed at", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PREVIOUSATTEMPTID.vdxfid]: { name: "Previous attempt ID", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_SHAREABLEURL.vdxfid]: { name: "Shareable URL", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_TEMPLATEID.vdxfid]: { name: "Template ID", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_TEMPLATEVERSION.vdxfid]: { name: "Template Version", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PHONENUMBER.vdxfid]: { name: "Phone Number", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_OVER18.vdxfid]: { name: "Over 18", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_OVER21.vdxfid]: { name: "Over 21", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_OVER25.vdxfid]: { name: "OVer 25", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IPADDRESS.vdxfid]: { name: "IP Address", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_EMAIL.vdxfid]: { name: "Email Address", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_HOMEADDRESS.vdxfid]: { name: "Home address", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1.vdxfid]: { name: "Street 1", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2.vdxfid]: { name: "Street 2", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_CITY.vdxfid]: { name: "City", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_REGION.vdxfid]: { name: "Region", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE.vdxfid]: { name: "Post Code", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY.vdxfid]: { name: "Country", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDNUMBER_VALUE.vdxfid]: { name: "ID Number", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDNUMBER_TYPE.vdxfid]: { name: "ID Type", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_STATUS.vdxfid]: { name: "Status", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_APPROVALS_ACCEPTEDTOS.vdxfid]: { name: "Accepted Terms and Conditions", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_APPROVALS_VERIFIEDSMS.vdxfid]: { name: "SMS Verified", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_APPROVALS_KYCCHECKED.vdxfid]: { name: "KYC Checked ok", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_APPROVALS_DOCUMENTSVERIFIED.vdxfid]: { name: "Documents Verified", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_APPROVALS_SELFIECHECKED.vdxfid]: { name: "Selfie Checked", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_APPROVALS_WATCHLIST_OK.vdxfid]: { name: "identitydata.approvals.watchlist.ok", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_APPROVALS_RISKCHECKOK.vdxfid]: { name: "identitydata.approvals.riskcheckok", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_FRONT.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_BACK.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_FRONT.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_BACK.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_FACE.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_IDNUMBER.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CATEGORY.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_EXPIRATIONDATE.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ADDRESS.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_STREET1.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CITY.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_REGION.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_POSTCODE.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_COUNTRY.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_MATCHED.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_NAME_MATCHED.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH_MATCHED.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_SELFIECHECK_SUCCESS.vdxfid]: { name: "identitydata.selfiecheck.success", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_SELFIECHECK_IMAGE.vdxfid]: { name: "identitydata.selfiecheck.image", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_SELFIECHECK_VIDEO.vdxfid]: { name: "identitydata.selfiecheck.video", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_SELFIECHECK_DRIVINGLICENCE_MATCH.vdxfid]: { name: "identitydata.selfiecheck.drivinglicence.match", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_KYC_SUCCESS.vdxfid]: { name: "identitydata.kyc.success", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_KYC_ADDRESS_MATCHED.vdxfid]: { name: "identitydata.kyc.address.matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_KYC_TYPE.vdxfid]: { name: "identitydata.kyc.type", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_KYC_NAME_MATCHED.vdxfid]: { name: "identitydata.kyc.name.matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_KYC_DATEOFBIRTH_MATCHED.vdxfid]: { name: "identitydata.kyc.dateofbirth.matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_KYC_IDNUMBER_MATCHED.vdxfid]: { name: "identitydata.kyc.idnumber.matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_KYC_PHONENUMBER_MATCHED.vdxfid]: { name: "identitydata.kyc.phonenumber.matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_KYC_AREACODE_MATCHED.vdxfid]: { name: "identitydata.kyc.areacode.matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RISKCHECK_STATUS.vdxfid]: { name: "identitydata.riskcheck.status", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RISKCHECK_USERINTERACTIONS.vdxfid]: { name: "identitydata.riskcheck.userinteractions", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RISKCHECK_FRAUDRINGOK.vdxfid]: { name: "identitydata.riskcheck.fraudringok", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RISKCHECK_BOTNOTDETECTED.vdxfid]: { name: "identitydata.riskcheck.botnotdetected", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_EMAIL_ISDELIVERABLE.vdxfid]: { name: "identitydata.email.isdeliverable", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_EMAIL_BREACHCOUNT.vdxfid]: { name: "identitydata.email.breachcount", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_EMAIL_FIRSTBREACHEDAT.vdxfid]: { name: "identitydata.email.firstbreachedat", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_EMAIL_LASTBREACHEDAT.vdxfid]: { name: "identitydata.email.lastbreachedat", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_REGISTEREDAT.vdxfid]: { name: "identitydata.email.domain.registeredat", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_FREEPROVIDER.vdxfid]: { name: "identitydata.email.domain.freeprovider", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_CUSTOM.vdxfid]: { name: "identitydata.email.domain.custom", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_DISPOSABLE.vdxfid]: { name: "identitydata.email.domain.disposable", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS.vdxfid]: { name: "identitydata.email.domain.toplevel.suspicious", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_FRONT.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_BACK.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_CROPPED_FRONT.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_CROPPED_BACK.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_FACE.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_IDNUMBER.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_CATEGORY.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_EXPIRATIONDATE.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_ISSUING_REGION.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTH.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_STREET1.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_CITY.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_REGION.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_POSTCODE.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_COUNTRY.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_NAME_MATCHED.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_FRONT.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_BACK.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_FRONT.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_BACK.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_FACE.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_IDNUMBER.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_CATEGORY.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_EXPIRATIONDATE.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_ISSUINGREGION.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTH.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_STREET1.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_CITY.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_REGION.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_POSTCODE.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_COUNTRY.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_NAME_MATCHED.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTHMATCHED.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_FRONT.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_BACK.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_FRONT.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_BACK.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_FACE.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_IDNUMBER.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CATEGORY.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_EXPIRATIONDATE.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUINGREGION.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTH.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_STREET1.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_CITY.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_REGION.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_POSTCODE.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_COUNTRY.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_NAME_MATCHED.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTHMATCHED.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_FRONT.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_BACK.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_FRONT.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_BACK.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_FACE.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_IDNUMBER.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_CATEGORY.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_EXPIRATIONDATE.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUINGREGION.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTH.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_STREET1.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_CITY.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_REGION.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_POSTCODE.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_COUNTRY.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_NAME_MATCHED.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_ORIGINAL_FRONT.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_ORIGINAL_BACK.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_CROPPED_FRONT.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_CROPPED_BACK.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_FACE.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_IDNUMBER.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_CATEGORY.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_EXPIRATIONDATE.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_ISSUINGREGION.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTH.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_STREET1.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_CITY.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_REGION.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_POSTCODE.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_COUNTRY.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_NAME_MATCHED.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTHMATCHED.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALFRONT.vdxfid]: { name: "identitydata.documentverification.originalfront", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALBACK.vdxfid]: { name: "identitydata.documentverification.originalback", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDFRONT.vdxfid]: { name: "identitydata.documentverification.croppedfront", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDBACK.vdxfid]: { name: "identitydata.documentverification.croppedback", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_FACE.vdxfid]: { name: "identitydata.documentverification.face", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_IDNUMBER.vdxfid]: { name: "identitydata.documentverification.idnumber", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CATEGORY.vdxfid]: { name: "identitydata.documentverification.category", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_EXPIRATIONDATE.vdxfid]: { name: "identitydata.documentverification.expirationdate", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY.vdxfid]: { name: "identitydata.documentverification.issuingcountry", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGREGION.vdxfid]: { name: "identitydata.documentverification.issuingregion", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTH.vdxfid]: { name: "identitydata.documentverification.dateofbirth", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ADDRESS.vdxfid]: { name: "identitydata.documentverification.address", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_ADDRESS_STREET1.vdxfid]: { name: "identitydata.address.street1", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_ADDRESS_STREET2.vdxfid]: { name: "identitydata.address.street2", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_ADDRESS_CITY.vdxfid]: { name: "identitydata.address.city", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_ADDRESS_REGION.vdxfid]: { name: "identitydata.address.region", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_ADDRESS_POSTCODE.vdxfid]: { name: "identitydata.address.postcode", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_ADDRESS_COUNTRY.vdxfid]: { name: "identitydata.address.country", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "identitydata.documentverification.matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED.vdxfid]: { name: "identitydata.documentverification.name.matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED.vdxfid]: { name: "identitydata.documentverification.dateofbirthmatched", type: AttestationClassTypes.BUFFER_DATA_STRING }, [keylist.ATTESTATION_TYPE.vdxfid]: { name: "Attestation Type", type: AttestationClassTypes.BUFFER_DATA_STRING }, }; @@ -55,11 +259,11 @@ export class AttestationDataType { default: this.dataItem = new HexDataVdxfObject(data, vdxfkey); break; - } + } - if (salt) { - this.salt = Buffer.from(salt, "hex"); - } + if (salt) { + this.salt = Buffer.from(salt, "hex"); + } } dataBytelength(): number { From 1578afb70e9b05cd214960d41e1378c23b542d15 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Fri, 16 Feb 2024 14:05:12 +0000 Subject: [PATCH 066/120] Attestation Keys update --- dist/pbaas/Identity.js | 19 +- dist/vdxf/classes/Attestation.d.ts | 69 +- dist/vdxf/classes/Attestation.js | 252 +-- dist/vdxf/classes/MMR.d.ts | 112 +- dist/vdxf/classes/MMR.js | 864 +++++---- dist/vdxf/classes/attestationData.d.ts | 36 + dist/vdxf/classes/attestationData.js | 353 ++++ dist/vdxf/classes/index.d.ts | 1 + dist/vdxf/classes/index.js | 5 +- dist/vdxf/identityDataKeys.d.ts | 209 +++ dist/vdxf/identityDataKeys.js | 2255 ++++++++++++++++++++++++ dist/vdxf/index.d.ts | 5 + dist/vdxf/index.js | 10 +- dist/vdxf/keymap.d.ts | 13 + dist/vdxf/keymap.js | 8 + dist/vdxf/keys.d.ts | 17 +- dist/vdxf/keys.js | 119 +- src/vdxf/classes/attestationData.ts | 393 +++-- src/vdxf/identityDataKeys.ts | 10 +- src/vdxf/keymap.ts | 6 +- 20 files changed, 3928 insertions(+), 828 deletions(-) create mode 100644 dist/vdxf/classes/attestationData.d.ts create mode 100644 dist/vdxf/classes/attestationData.js create mode 100644 dist/vdxf/identityDataKeys.d.ts create mode 100644 dist/vdxf/identityDataKeys.js create mode 100644 dist/vdxf/keymap.d.ts create mode 100644 dist/vdxf/keymap.js diff --git a/dist/pbaas/Identity.js b/dist/pbaas/Identity.js index ce5cced..adf6a69 100644 --- a/dist/pbaas/Identity.js +++ b/dist/pbaas/Identity.js @@ -292,21 +292,28 @@ function VectorEncodeVDXFUni(obj) { const values = keys.map((item) => obj[item]); var bufsize = 0; for (var i = 0; i < keys.length; i++) { - if (vdxf_2.CVDXF_Data[keys[i]]) { - bufsize += vdxf_2.CVDXF_Data[keys[i]].getbytes(values[i]); + if (keys[i] == vdxf_2.DATA_TYPE_STRING.vdxfid) { + bufsize += vdxf_1.HASH160_BYTE_LENGTH; + bufsize += 1; // varint length 1 + bufsize += 2; // ss type + ver (lengths) + bufsize += varuint_1.default.encodingLength(Buffer.from(values[i], 'utf8').length); + bufsize += Buffer.from(values[i], 'utf8').length; } else { throw new Error("VDXF key not found: " + keys[i]); } + // TODO: add alltypes } const bufferWriter = new BufferWriter(Buffer.alloc(bufsize)); for (var i = 0; i < keys.length; i++) { - if (vdxf_2.CVDXF_Data[keys[i]] && vdxf_2.CVDXF_Data[keys[i]].qualifiedname.name === "vrsc::data.type.string") { - bufferWriter.writeSlice((0, address_1.fromBase58Check)(vdxf_2.CVDXF_Data[keys[i]].vdxfid).hash); + if (keys[i] === vdxf_2.DATA_TYPE_STRING.vdxfid) { + bufferWriter.writeSlice((0, address_1.fromBase58Check)(keys[i]).hash); bufferWriter.writeVarInt(new bn_js_1.BN(1)); bufferWriter.writeVarInt(new bn_js_1.BN(Buffer.from(values[i], 'utf8').length + 3)); //NOTE 3 is from ss type + ver + vdxfidver - bufferWriter.writeCompactSize(Buffer.from(values[i], 'utf8').length); - bufferWriter.writeSlice(Buffer.from(values[i], 'utf8')); + bufferWriter.writeVarSlice(Buffer.from(values[i], 'utf8')); + } + else { + throw new Error("VDXF key not found: " + keys[i]); } // TODO: add alltypes } diff --git a/dist/vdxf/classes/Attestation.d.ts b/dist/vdxf/classes/Attestation.d.ts index 5689fe5..39425fc 100644 --- a/dist/vdxf/classes/Attestation.d.ts +++ b/dist/vdxf/classes/Attestation.d.ts @@ -1,36 +1,49 @@ /// -import { VDXFObject } from "../"; -import { MMR } from "./MMR"; -export interface AttestationData { - attestationKey?: string; - salt?: string; - value?: string; -} +import { VDXFObject, VerusIDSignature } from "../"; +import { CMerkleMountainRange, CMMRProof } from "./MMR"; +import { AttestationData } from './attestationData'; export declare class Attestation extends VDXFObject { - components: Map; - signatures: { - [attestor: string]: { - signature: string; - system: string; - }; - }; - mmr: MMR; - constructor(vdxfkey?: string, data?: { - components?: Map; - signatures?: { - [attestor: string]: { - signature: string; - system: string; - }; - }; - mmr?: MMR; - }); + static TYPE_STRING: number; + static TYPE_BYTES: number; + static TYPE_BASE64: number; + static TYPE_URL: number; + data: AttestationData; + system_id: string; + signing_id: string; + signature?: VerusIDSignature; + mmr: CMerkleMountainRange; + constructor(data?: { + data?: AttestationData; + signature?: VerusIDSignature; + mmr?: CMerkleMountainRange; + system_id: string; + signing_id: string; + }, vdxfkey?: string); dataByteLength(): number; toDataBuffer(): Buffer; fromDataBuffer(buffer: Buffer, offset?: number): number; - createMMR(): Promise; - rootHash(): Promise; - getProof(keys: Array): Promise; + createMMR(): CMerkleMountainRange; + rootHash(): Buffer; + getProof(keys: Array): CPartialAttestationProof; checkProof(): Promise; getHash(key: any): Buffer; } +export declare class CPartialAttestationProof extends VDXFObject { + private EType; + type: number; + proof: CMMRProof; + componentsArray: AttestationData; + system_id: string; + signing_id: string; + signature?: VerusIDSignature; + constructor(data?: { + proof?: CMMRProof; + componentsArray?: AttestationData; + system_id: string; + signing_id: string; + }, vdxfkey?: string); + dataByteLength(): number; + toDataBuffer(): Buffer; + fromDataBuffer(buffer: Buffer, offset?: number): number; + checkProof(item: number): Buffer; +} diff --git a/dist/vdxf/classes/Attestation.js b/dist/vdxf/classes/Attestation.js index d16c2b2..d3e38b7 100644 --- a/dist/vdxf/classes/Attestation.js +++ b/dist/vdxf/classes/Attestation.js @@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.Attestation = void 0; +exports.CPartialAttestationProof = exports.Attestation = void 0; const varuint_1 = require("../../utils/varuint"); const bufferutils_1 = require("../../utils/bufferutils"); const createHash = require("create-hash"); @@ -17,44 +17,34 @@ const address_1 = require("../../utils/address"); const vdxf_1 = require("../../constants/vdxf"); const __1 = require("../"); const MMR_1 = require("./MMR"); +const keys_1 = require("../keys"); +const Hash160_1 = require("./Hash160"); +const attestationData_1 = require("./attestationData"); const { BufferReader, BufferWriter } = bufferutils_1.default; class Attestation extends __1.VDXFObject { - constructor(vdxfkey = "", data) { + constructor(data, vdxfkey = keys_1.ATTESTATION_OBJECT.vdxfid) { super(vdxfkey); if (data) { - this.components = data.components || null; - this.signatures = data.signatures || null; - this.mmr = data.mmr || null; + this.data = data.data; + this.signature = data.signature; + this.mmr = data.mmr; + this.system_id = data.system_id; + this.signing_id = data.signing_id; } } dataByteLength() { let byteLength = 0; - byteLength += varuint_1.default.encodingLength(this.components.size); - for (const [key, item] of this.components) { - byteLength += varuint_1.default.encodingLength(key); - byteLength += 20; //key - byteLength += 32; //salt - byteLength += varuint_1.default.encodingLength(Buffer.from(item.value, "utf8").length); - byteLength += Buffer.from(item.value, "utf8").length; - } - const sigKeys = Object.keys(this.signatures); - byteLength += varuint_1.default.encodingLength(sigKeys.length); - for (const item of sigKeys) { - byteLength += 20; //Attestor - byteLength += 20; //System - byteLength += varuint_1.default.encodingLength(Buffer.from(this.signatures[item].signature, "base64").length); - byteLength += Buffer.from(this.signatures[item].signature, "base64").length; - } + byteLength += this.data.dataByteLength(); + const _system_id = Hash160_1.Hash160.fromAddress(this.system_id); + const _signing_id = Hash160_1.Hash160.fromAddress(this.signing_id); + const _signature = this.signature + ? this.signature + : new __1.VerusIDSignature({ signature: "" }); + byteLength += _system_id.byteLength(); + byteLength += _signing_id.byteLength(); + byteLength += _signature.byteLength(); if (this.mmr) { - const nodes = this.mmr.db.nodes; - const mmrKeys = Object.keys(nodes); - byteLength += varuint_1.default.encodingLength(this.mmr.db.leafLength); - byteLength += varuint_1.default.encodingLength(mmrKeys.length); - for (const item of mmrKeys) { - byteLength += varuint_1.default.encodingLength(parseInt(item)); - byteLength += varuint_1.default.encodingLength(nodes[item].length); - byteLength += nodes[item].length; - } + byteLength += this.mmr.getbyteLength(); } else { byteLength += varuint_1.default.encodingLength(0); @@ -63,29 +53,17 @@ class Attestation extends __1.VDXFObject { } toDataBuffer() { const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); - bufferWriter.writeCompactSize(this.components.size); - for (const [key, item] of this.components) { - bufferWriter.writeCompactSize(key); - bufferWriter.writeSlice((0, address_1.fromBase58Check)(item.attestationKey).hash); - bufferWriter.writeSlice(Buffer.from(item.salt, "hex")); - bufferWriter.writeVarSlice(Buffer.from(item.value, "utf8")); - } - const objKeys = Object.keys(this.signatures); - bufferWriter.writeCompactSize(objKeys.length); - for (const item of objKeys) { - bufferWriter.writeSlice((0, address_1.fromBase58Check)(item).hash); - bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.signatures[item].system).hash); - bufferWriter.writeVarSlice(Buffer.from(this.signatures[item].signature, "base64")); - } + bufferWriter.writeSlice(this.data.toDataBuffer()); + const _system_id = Hash160_1.Hash160.fromAddress(this.system_id); + const _signing_id = Hash160_1.Hash160.fromAddress(this.signing_id); + const _signature = this.signature + ? this.signature + : new __1.VerusIDSignature({ signature: "" }); + bufferWriter.writeSlice(_system_id.toBuffer()); + bufferWriter.writeSlice(_signing_id.toBuffer()); + bufferWriter.writeSlice(_signature.toBuffer()); if (this.mmr) { - bufferWriter.writeCompactSize(this.mmr.db.leafLength); - const nodes = this.mmr.db.nodes; - const mmrKeys = Object.keys(nodes); - bufferWriter.writeCompactSize(mmrKeys.length); - for (const item of mmrKeys) { - bufferWriter.writeCompactSize(parseInt(item)); - bufferWriter.writeVarSlice(nodes[item]); - } + bufferWriter.writeVarSlice(this.mmr.toBuffer()); } else { bufferWriter.writeCompactSize(0); @@ -95,23 +73,15 @@ class Attestation extends __1.VDXFObject { fromDataBuffer(buffer, offset) { const reader = new bufferutils_1.default.BufferReader(buffer, offset); const attestationsByteLength = reader.readCompactSize(); //dummy read - const componentsLength = reader.readCompactSize(); - this.components = new Map(); - for (var i = 0; i < componentsLength; i++) { - const key = reader.readCompactSize(); - const attestationKey = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); - const salt = Buffer.from(reader.readSlice(32)).toString('hex'); - const value = Buffer.from(reader.readVarSlice()).toString('utf8'); - this.components.set(key, { attestationKey, salt, value }); - } - const signaturesSize = reader.readCompactSize(); - this.signatures = {}; - for (var i = 0; i < signaturesSize; i++) { - const attestor = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); - const system = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); - const signature = reader.readVarSlice().toString('base64'); - this.signatures[attestor] = { signature, system }; + if (!this.data) { + this.data = new attestationData_1.AttestationData(); } + reader.offset = this.data.fromDataBuffer(reader.buffer, reader.offset); + this.system_id = (0, address_1.toBase58Check)(reader.readSlice(vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION); + this.signing_id = (0, address_1.toBase58Check)(reader.readSlice(vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION); + const _sig = new __1.VerusIDSignature(); + reader.offset = _sig.fromBuffer(reader.buffer, reader.offset); + this.signature = _sig; const leafLength = reader.readCompactSize(); if (leafLength > 0) { const referenceTreeLength = reader.readCompactSize(); @@ -122,48 +92,53 @@ class Attestation extends __1.VDXFObject { nodes[nodeIndex] = signature; } if (Object.keys(nodes).length > 0) { - this.mmr = new MMR_1.MMR(new MMR_1.MemoryBasedDb(leafLength, nodes)); + this.mmr = new MMR_1.CMerkleMountainRange().fromBuffer(reader.buffer); } } return reader.offset; } createMMR() { - return __awaiter(this, void 0, void 0, function* () { - if (!this.mmr) { - this.mmr = new MMR_1.MMR(); - } - else { - return this.mmr; - } - for (const [key, item] of this.components) { - yield this.mmr.append(this.getHash(key), key); - } + if (!this.mmr) { + this.mmr = new MMR_1.CMerkleMountainRange(); + } + else { return this.mmr; - }); + } + for (const [key, item] of this.data.components) { + this.mmr.add(new MMR_1.CMMRNode(this.getHash(key))); + } + return this.mmr; } rootHash() { - return __awaiter(this, void 0, void 0, function* () { - if (!this.mmr) { - yield this.createMMR(); - } - return yield this.mmr.getRoot(); - }); + if (!this.mmr) { + this.createMMR(); + } + const view = new MMR_1.CMerkleMountainView(this.mmr); + return view.GetRoot(); } // returns an attestation with a sparse MMR containing the leaves specified getProof(keys) { - return __awaiter(this, void 0, void 0, function* () { - const itemMaps = new Map(); - keys.forEach((key, index) => { itemMaps.set(index, this.components.get(key)); }); - const reply = new Attestation(this.vdxfkey, { components: itemMaps, mmr: yield this.mmr.getProof(keys, null), signatures: this.signatures }); - return reply; + const view = new MMR_1.CMerkleMountainView(this.mmr); + const attestationItems = new attestationData_1.AttestationData(); + const localCMMR = new MMR_1.CMMRProof(); + keys.forEach((key, index) => { + view.GetProof(localCMMR, key); + attestationItems.components.set(key, this.data.components.get(key)); }); + const attestationAndProof = new CPartialAttestationProof({ + proof: localCMMR, + componentsArray: attestationItems, + system_id: this.system_id, + signing_id: this.signing_id, + }); + return attestationAndProof; } checkProof() { return __awaiter(this, void 0, void 0, function* () { try { - for (const [key, item] of this.components) { + for (const [key, item] of this.data.components) { const hash = this.getHash(key); - const proof = yield this.mmr.getProof([key], null); + const proof = null; //await this.mmr.getProof([key], null); if (hash !== proof) { throw new Error("Attestation not found in MMR"); } @@ -175,15 +150,88 @@ class Attestation extends __1.VDXFObject { }); } getHash(key) { - const bufferWriter = new BufferWriter(Buffer.alloc(20 + - 32 + - varuint_1.default.encodingLength(Buffer.from(this.components.get(key).value, "utf8").length) + - Buffer.from(this.components.get(key).value, "utf8").length)); - bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.components.get(key).attestationKey).hash); - bufferWriter.writeSlice(Buffer.from(this.components.get(key).salt, "hex")); - bufferWriter.writeCompactSize(Buffer.from(this.components.get(key).value, "utf8").length); - bufferWriter.writeSlice(Buffer.from(this.components.get(key).value, "utf8")); - return createHash("sha256").update(bufferWriter.buffer).digest(); + let returnBuffer; + returnBuffer = this.data.components.get(key).toBuffer(); + return createHash("sha256").update(returnBuffer).digest(); } } exports.Attestation = Attestation; +Attestation.TYPE_STRING = 1; +Attestation.TYPE_BYTES = 2; +Attestation.TYPE_BASE64 = 3; +Attestation.TYPE_URL = 4; +class CPartialAttestationProof extends __1.VDXFObject { + constructor(data, vdxfkey = keys_1.ATTESTATION_VIEW_RESPONSE.vdxfid) { + super(vdxfkey); + this.EType = { + TYPE_INVALID: 0, + TYPE_ATTESTATION: 1, + TYPE_LAST: 1 + }; + this.type = this.EType.TYPE_ATTESTATION; + if (data) { + this.proof = data.proof || new MMR_1.CMMRProof(); + this.componentsArray = data.componentsArray || new attestationData_1.AttestationData(); + this.system_id = data.system_id; + this.signing_id = data.signing_id; + } + } + dataByteLength() { + let byteLength = 0; + byteLength += varuint_1.default.encodingLength(this.type); + byteLength += this.proof.dataByteLength(); + byteLength += this.componentsArray.dataByteLength(); + const _system_id = Hash160_1.Hash160.fromAddress(this.system_id); + const _signing_id = Hash160_1.Hash160.fromAddress(this.signing_id); + const _signature = this.signature + ? this.signature + : new __1.VerusIDSignature({ signature: "" }); + byteLength += _system_id.byteLength(); + byteLength += _signing_id.byteLength(); + byteLength += _signature.byteLength(); + return byteLength; + } + toDataBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); + bufferWriter.writeCompactSize(this.type); + bufferWriter.writeSlice(this.proof.toBuffer()); + bufferWriter.writeSlice(this.componentsArray.toDataBuffer()); + const _system_id = Hash160_1.Hash160.fromAddress(this.system_id); + const _signing_id = Hash160_1.Hash160.fromAddress(this.signing_id); + const _signature = this.signature + ? this.signature + : new __1.VerusIDSignature({ signature: "" }); + bufferWriter.writeSlice(_system_id.toBuffer()); + bufferWriter.writeSlice(_signing_id.toBuffer()); + bufferWriter.writeSlice(_signature.toBuffer()); + return bufferWriter.buffer; + } + fromDataBuffer(buffer, offset) { + const reader = new bufferutils_1.default.BufferReader(buffer, offset); + const lengthOfBuffer = reader.readCompactSize(); //dummy read + this.type = reader.readCompactSize(); + this.proof = new MMR_1.CMMRProof(); + reader.offset = this.proof.fromDataBuffer(reader.buffer, reader.offset); + this.componentsArray = new attestationData_1.AttestationData(); + reader.offset = this.componentsArray.fromDataBuffer(reader.buffer, reader.offset); + this.system_id = (0, address_1.toBase58Check)(reader.readSlice(vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION); + this.signing_id = (0, address_1.toBase58Check)(reader.readSlice(vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION); + const _sig = new __1.VerusIDSignature(); + reader.offset = _sig.fromBuffer(reader.buffer, reader.offset); + this.signature = _sig; + return reader.offset; + } + checkProof(item) { + const dataHash = this.componentsArray.getHash(item); + let currentIndex = 0; + const component = this.componentsArray.components.get(item); + for (let value of this.componentsArray.components.values()) { + if (component == value) { + return this.proof.proofSequence[currentIndex].safeCheck(dataHash); + } + currentIndex++; + } + return Buffer.allocUnsafe(32); + } +} +exports.CPartialAttestationProof = CPartialAttestationProof; diff --git a/dist/vdxf/classes/MMR.d.ts b/dist/vdxf/classes/MMR.d.ts index a4b39e3..ae3f0bf 100644 --- a/dist/vdxf/classes/MMR.d.ts +++ b/dist/vdxf/classes/MMR.d.ts @@ -1,54 +1,72 @@ /// -declare class Position { - i: any; - h: any; - r: any; - constructor(index: any, height: any, rightness: any); +declare class CLayer { + private vSize; + private nodes; + constructor(); + size(): number; + getIndex(idx: number): NODE_TYPE; + push_back(node: NODE_TYPE): void; + clear(): void; } -export declare class MMR { - lock: any; +export declare class CMMRNode { + hash: Buffer; + constructor(Hash?: Buffer); + digest(input: any): any; + HashObj(obj: Buffer, onbjR?: Buffer): Buffer; + CreateParentNode(nRight: CMMRNode): CMMRNode; + GetProofHash(opposite: CMMRNode): Array; + GetLeafHash(): Array; + GetExtraHashCount(): number; +} +export declare class CMerkleMountainRange { + layer0: CLayer; + vSize: number; + upperNodes: Array>; _leafLength: number; - db: any; - constructor(db?: MemoryBasedDb); + constructor(); + getbyteLength(): number; + toBuffer(): Buffer; + fromBuffer(bufferIn: Buffer): CMerkleMountainRange; + add(leaf: CMMRNode): number; + size(): number; + height(): number; + getNode(Height: any, Index: any): CMMRNode; +} +export declare class CMMRBranch { + branchType?: number; + nIndex?: number; + nSize?: number; + branch?: Array; + constructor(branchType?: number, nIndex?: number, nSize?: number, branch?: Array); + dataByteLength(): number; + toBuffer(): Buffer; + fromBuffer(buffer: Buffer, offset?: number): number; digest(input: any): any; - get(leafIndex: any): Promise; - _get(nodePosition: any): Promise; - append(value: any, leafIndex: any): Promise; - appendMany(values: any, startLeafIndex: any): Promise; - getRoot(leafIndex?: number): Promise; - getNodeLength(): Promise; - getLeafLength(): Promise; - delete(leafIndex: any): Promise; - getProof(leafIndexes: any, referenceTreeLength: any): Promise; - _getNodeValue(position: any): any; - _verifyPath(currentPosition: any, currentValue: any, destinationPosition: any): any; - _setLeafLength(leafLength: any): Promise; - _hashUp(positionPairs: any): Promise; - static leftChildPosition(position: any): Position; - static rightChildPosition(position: any): Position; - static siblingPosition(position: any): Position; - static parentIndex(position: any): any; - static peakPositions(leafIndex: any): any[]; - static localPeakPosition(leafIndex: any, leafLength: any): any; - static _localPeakPosition(leafIndex: any, peakPositions: any): any; - static mountainPositions(currentPosition: any, targetNodeIndex: any): any[]; - static godPeakFromLeafIndex(leafIndex: any): Position; - static getNodePosition(leafIndex: any): Position; - static proofPositions(leafIndexes: any, referenceTreeLength: any): {}; - static _hasPosition(nodes: any, position: any): boolean; + safeCheck(hash: Buffer): Buffer; +} +export declare class CMMRProof { + proofSequence: Array; + setProof(proof: CMMRBranch): void; + dataByteLength(): number; + toBuffer(): Buffer; + fromDataBuffer(buffer: Buffer, offset?: number): number; } -export declare class MemoryBasedDb { - leafLength: any; - nodes: { - [number: number]: Buffer; - }; - constructor(...args: any[]); - get(index: any): Promise; - set(value: any, index: any): Promise; - getLeafLength(): Promise; - setLeafLength(leafLength: any): Promise; - getNodes(): Promise<{ - [number: number]: Buffer; - }>; +export declare class CMerkleMountainView { + mmr: CMerkleMountainRange; + sizes: Array; + peaks: Array; + peakMerkle: Array>; + constructor(mountainRange: CMerkleMountainRange, viewSize?: number); + size(): number; + CalcPeaks(force?: boolean): void; + resize(newSize: number): number; + maxsize(): number; + GetPeaks(): Array; + GetRoot(): Buffer; + GetRootNode(): CMMRNode; + GetHash(index: number): Buffer; + GetBranchType(): number; + GetProof(retProof: CMMRProof, pos: number): boolean; + GetProofBits(pos: number, mmvSize: number): void; } export {}; diff --git a/dist/vdxf/classes/MMR.js b/dist/vdxf/classes/MMR.js index 3ac17a6..5caf01b 100644 --- a/dist/vdxf/classes/MMR.js +++ b/dist/vdxf/classes/MMR.js @@ -1,408 +1,570 @@ "use strict"; // Licence MIT // Adapted to Verus Blake2b MMR. -// MMR Code is from -//Copyright (c) 2019 Zac Mitton under MIT License -//Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated -//documentation files (the "Software"), to deal in the Software without restriction, including without limitation -//the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and -//to permit persons to whom the Software is furnished to do so, subject to the following conditions: -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; Object.defineProperty(exports, "__esModule", { value: true }); -exports.MemoryBasedDb = exports.MMR = void 0; +exports.CMerkleMountainView = exports.CMMRProof = exports.CMMRBranch = exports.CMerkleMountainRange = exports.CMMRNode = void 0; var blake2b = require('blake2b'); const { Lock } = require('semaphore-async-await'); -class Position { - constructor(index, height, rightness) { - this.i = index; - this.h = height; - this.r = rightness; // inherent unchanging property of every node index +const bn_js_1 = require("bn.js"); +const varuint_1 = require("../../utils/varuint"); +const bufferutils_1 = require("../../utils/bufferutils"); +const { BufferReader, BufferWriter } = bufferutils_1.default; +const BRANCH_MMRBLAKE_NODE = 2; +class CLayer { + constructor() { this.vSize = 0; } + size() { + return this.vSize; + } + getIndex(idx) { + if (idx < this.vSize) { + return this.nodes[idx]; + } + else { + throw new Error("CChunkedLayer [] index out of range"); + } + } + push_back(node) { + this.vSize++; + if (!this.nodes) { + this.nodes = new Array(); + } + this.nodes.push(node); + } + clear() { + this.nodes = null; + this.vSize = 0; } } -class MMR { - constructor(db = new MemoryBasedDb()) { - this.db = db; - this.lock = new Lock(1); +; +//template +class COverlayNodeLayer { + constructor(NodeSource) { + this.nodeSource = NodeSource; + this.vSize = 0; + } + size() { + return this.vSize; + } + getIndex(idx) { + if (idx < this.vSize) { + let retval; + return retval; + } + else { + throw new Error("COverlayNodeLayer [] index out of range"); + } + } + // node type must be moveable just to be passed here, but the default overlay has no control over the underlying storage + // and only tracks size changes + push_back(node) { this.vSize++; } + clear() { this.vSize = 0; } + resize(newSize) { this.vSize = newSize; } +} +; +class CMMRNode { + constructor(Hash) { + if (Hash) { + this.hash = Hash; + } } digest(input) { var out = Buffer.allocUnsafe(32); - return blake2b(out.length, null, null, Buffer.from("VerusDefaultHash")).update(Buffer.concat([...input])).digest(out); - } - get(leafIndex) { - return __awaiter(this, void 0, void 0, function* () { - let leafValue; - yield this.lock.acquire(); - try { - let leafLength = yield this.getLeafLength(); - if (leafIndex >= leafLength) { - throw new Error('Leaf not in tree'); - } - let leafPosition = MMR.getNodePosition(leafIndex); - let localPeakPosition = MMR.localPeakPosition(leafIndex, leafLength); - let localPeakValue = yield this._getNodeValue(localPeakPosition); - leafValue = yield this._verifyPath(localPeakPosition, localPeakValue, leafPosition); - } - finally { - this.lock.release(); - } - return leafValue; - }); - } - _get(nodePosition) { - return __awaiter(this, void 0, void 0, function* () { - let nodeValue; - yield this.lock.acquire(); - try { - let nodeLength = yield this.getNodeLength(); - let leafLength = yield this.getLeafLength(); - if (nodePosition.i >= nodeLength) { - throw new Error('Node not in tree'); - } - let peakPositions = MMR.peakPositions(leafLength - 1); - let localPeakPosition; - for (let i = 0; i < peakPositions.length; i++) { - if (peakPositions[i].i >= nodePosition.i) { - localPeakPosition = peakPositions[i]; - break; - } - } - let localPeakValue = yield this._getNodeValue(localPeakPosition); - nodeValue = yield this._verifyPath(localPeakPosition, localPeakValue, nodePosition); - } - finally { - this.lock.release(); + return blake2b(out.length, null, null, Buffer.from("VerusDefaultHash")).update(input).digest(out); + } + HashObj(obj, onbjR) { + if (!onbjR) + return this.digest(obj); + else + return this.digest(Buffer.concat([obj, onbjR])); + } + // add a right to this left and create a parent node + CreateParentNode(nRight) { + return new CMMRNode(this.digest(Buffer.concat([this.hash, nRight.hash]))); + } + GetProofHash(opposite) { + return [this.hash]; + } + // leaf nodes that track additional data, such as block power, may need a hash added to the path + // at the very beginning + GetLeafHash() { return []; } + GetExtraHashCount() { + // how many extra proof hashes per layer are added with this node + return 0; + } +} +exports.CMMRNode = CMMRNode; +; +function loggingIdentity(arg) { + console.log(arg.length); + return arg; +} +//template , typename LAYER0_TYPE=LAYER_TYPE> +class CMerkleMountainRange { + constructor() { + this.layer0 = new CLayer(); + this.vSize = 0; + this.upperNodes = new Array(); + this._leafLength = 0; + } + getbyteLength() { + return 1; + } + toBuffer() { + return Buffer.from([]); + } + fromBuffer(bufferIn) { + return new CMerkleMountainRange(); + } + add(leaf) { + this.layer0.push_back(leaf); + let height = 0; + let layerSize; + for (layerSize = this.layer0.size(); height <= this.upperNodes.length && layerSize > 1; height++) { + let newSizeAbove = layerSize >> 1; + // expand vector of vectors if we are adding a new layer + if (height == this.upperNodes.length) { + this.upperNodes.push(new CLayer()); } - return nodeValue; - }); - } - append(value, leafIndex) { - return __awaiter(this, void 0, void 0, function* () { - yield this.lock.acquire(); - try { - let leafLength = yield this.getLeafLength(); - if (leafIndex == undefined || leafIndex == leafLength) { - let nodePosition = MMR.getNodePosition(leafLength); - let mountainPositions = MMR.mountainPositions(MMR.localPeakPosition(leafLength, leafLength), nodePosition.i); - yield this.db.set(value, nodePosition.i); - yield this._hashUp(mountainPositions); - yield this._setLeafLength(leafLength + 1); + let curSizeAbove = this.upperNodes[height].size(); + // if we need to add an element to the vector above us, do it + if (!(layerSize & 1) && newSizeAbove > curSizeAbove) { + let idx = layerSize - 2; + if (height > 0) { + this.upperNodes[height].push_back(this.upperNodes[height - 1].getIndex(idx).CreateParentNode(this.upperNodes[height - 1].getIndex(idx + 1))); } else { - throw new Error('Can only append to end of MMR (leaf ' + leafLength + '). Index ' + leafIndex + ' given.'); + this.upperNodes[height].push_back(this.layer0.getIndex(idx).CreateParentNode(this.layer0.getIndex(idx + 1))); } } - finally { - this.lock.release(); - } - }); + layerSize = newSizeAbove; + } + // return new index + return this.layer0.size() - 1; } - appendMany(values, startLeafIndex) { - return __awaiter(this, void 0, void 0, function* () { - if (startLeafIndex == undefined) { - startLeafIndex = yield this.getLeafLength(); - } - for (let i = 0; i < values.length; i++) { - yield this.append(values[i], startLeafIndex + i); - } - }); - } - getRoot(leafIndex) { - return __awaiter(this, void 0, void 0, function* () { - let peakValues = []; - yield this.lock.acquire(); - try { - if (!leafIndex) { - leafIndex = (yield this.getLeafLength()) - 1; - } - let peakPositions = MMR.peakPositions(leafIndex); - for (let i = 0; i < peakPositions.length; i++) { - peakValues.push(yield this._getNodeValue(peakPositions[i])); - } - } - finally { - this.lock.release(); - } - // note: a single peak differs from its MMR root in that it gets hashed a second time - return this.digest([...peakValues]); - }); + size() { + return this.layer0.size(); } - getNodeLength() { - return __awaiter(this, void 0, void 0, function* () { return MMR.getNodePosition(yield this.getLeafLength()).i; }); + height() { + return this.layer0.size() > 0 ? this.upperNodes.length + 1 : 0; } - getLeafLength() { - return __awaiter(this, void 0, void 0, function* () { - if (this._leafLength == undefined) { // dirty length - this._leafLength = yield this.db.getLeafLength(); - } - return this._leafLength; - }); - } - delete(leafIndex) { - return __awaiter(this, void 0, void 0, function* () { - yield this.lock.acquire(); - try { - let leafLength = yield this.getLeafLength(); - if (leafIndex < leafLength) { - yield this._setLeafLength(leafIndex); + getNode(Height, Index) { + let layers = this.height(); + if (Height < layers) { + if (Height) { + if (Index < this.upperNodes[Height - 1].size()) { + return this.upperNodes[Height - 1].getIndex(Index); } } - finally { - this.lock.release(); - } - }); - } - getProof(leafIndexes, referenceTreeLength) { - return __awaiter(this, void 0, void 0, function* () { - let proofMmr; - yield this.lock.acquire(); - try { - referenceTreeLength = referenceTreeLength || (yield this.getLeafLength()); - let positions = MMR.proofPositions(leafIndexes, referenceTreeLength); - let nodes = {}; - let nodeIndexes = Object.keys(positions); - yield Promise.all(nodeIndexes.map((i) => __awaiter(this, void 0, void 0, function* () { - let nodeValue = yield this._getNodeValue(positions[i]); - nodes[i] = nodeValue; - }))); - proofMmr = new MMR(new MemoryBasedDb(referenceTreeLength, nodes)); - } - finally { - this.lock.release(); - return proofMmr; - } - }); - } - _getNodeValue(position) { - return __awaiter(this, void 0, void 0, function* () { - // caller's responsibility to request a position within leafLength - let nodeValue = yield this.db.get(position.i); - if (nodeValue) { - return nodeValue; - } - else if (position.h > 0) { // implied node - let leftChildValue = yield this._getNodeValue(MMR.leftChildPosition(position)); - let rightChildValue = yield this._getNodeValue(MMR.rightChildPosition(position)); - return this.digest([leftChildValue, rightChildValue]); - } else { - throw new Error('Missing node in db'); + if (Index < this.layer0.size()) { + return this.layer0.getIndex(Index); + } } - }); + } + return null; } - _verifyPath(currentPosition, currentValue, destinationPosition) { - return __awaiter(this, void 0, void 0, function* () { - if (currentPosition.i == destinationPosition.i) { // base case - return currentValue; +} +exports.CMerkleMountainRange = CMerkleMountainRange; +class CMMRBranch { + constructor(branchType = BRANCH_MMRBLAKE_NODE, nIndex = 0, nSize = 0, branch = new Array()) { + this.branchType = branchType; + this.nIndex = nIndex; + this.nSize = nSize; + this.branch = branch; + } + dataByteLength() { + let length = 0; + length += varuint_1.default.encodingLength(this.branchType); + length += varuint_1.default.encodingLength(this.nIndex); + length += varuint_1.default.encodingLength(this.nSize); + length += varuint_1.default.encodingLength(this.branch.length); + for (let i = 0; i < this.branch.length; i++) { + length += this.branch[i].length; + } + return length; + } + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); + bufferWriter.writeCompactSize(this.branchType); + bufferWriter.writeCompactSize(this.nIndex); + bufferWriter.writeCompactSize(this.nSize); + bufferWriter.writeCompactSize(this.branch.length); + for (let i = 0; i < this.branch.length; i++) { + bufferWriter.writeSlice(this.branch[i]); + } + return bufferWriter.buffer; + } + fromBuffer(buffer, offset) { + const reader = new bufferutils_1.default.BufferReader(buffer, offset); + this.branchType = reader.readCompactSize(); + this.nIndex = reader.readCompactSize(); + this.nSize = reader.readCompactSize(); + let branchLength = reader.readCompactSize(); + this.branch = new Array(); + for (let i = 0; i < branchLength; i++) { + this.branch.push(reader.readSlice(32)); + } + return reader.offset; + } + digest(input) { + var out = Buffer.allocUnsafe(32); + return blake2b(out.length, null, null, Buffer.from("VerusDefaultHash")).update(input).digest(out); + } + safeCheck(hash) { + let index = GetMMRProofIndex(this.nIndex, this.nSize, 0); + let joined = Buffer.allocUnsafe(64); + let hashInProgress = hash; + for (let i = 0; i < this.branch.length; i++) { + if (index.and(new bn_js_1.BN(1)).gt(new bn_js_1.BN(0))) { + if (this.branch[i] === hashInProgress) + throw new Error("Value can be equal to node but never on the right"); + joined = Buffer.concat([this.branch[i], hashInProgress]); } else { - let leftChildPosition = MMR.leftChildPosition(currentPosition); - let rightChildPosition = MMR.rightChildPosition(currentPosition); - let leftValue = yield this._getNodeValue(leftChildPosition); - let rightValue = yield this._getNodeValue(rightChildPosition); - if (!currentValue.equals(this.digest([leftValue, rightValue]))) { - throw new Error('Hash mismatch of node #' + currentPosition.i + ' and its children'); - } - if (destinationPosition.i > currentPosition.i - Math.pow(2, currentPosition.h) - currentPosition.h + 1) { //umm yeah, check this line - return this._verifyPath(rightChildPosition, rightValue, destinationPosition); - } - else { - return this._verifyPath(leftChildPosition, leftValue, destinationPosition); - } - } - }); - } - _setLeafLength(leafLength) { - return __awaiter(this, void 0, void 0, function* () { - yield this.db.setLeafLength(leafLength); - this._leafLength = leafLength; - }); - } - _hashUp(positionPairs) { - return __awaiter(this, void 0, void 0, function* () { - for (let i = positionPairs.length - 1; i >= 0; i--) { - let leftValue = yield this._getNodeValue(positionPairs[i][0]); - let rightValue = yield this._getNodeValue(positionPairs[i][1]); - let writeIndex = MMR.parentIndex(positionPairs[i][0]); - yield this.db.set(this.digest([leftValue, rightValue]), writeIndex); + joined = Buffer.concat([hashInProgress, this.branch[i]]); } - }); - } - static leftChildPosition(position) { - if (position.h <= 0) { - throw new Error('Height 0 does not have child'); + hashInProgress = this.digest(joined); + index = index.shrn(1); } - return new Position(position.i - Math.pow(2, position.h), position.h - 1, false); + return hashInProgress; } - static rightChildPosition(position) { - if (position.h <= 0) { - throw new Error('Height 0 does not have child'); +} +exports.CMMRBranch = CMMRBranch; +class CMMRProof { + setProof(proof) { + if (!this.proofSequence) { + this.proofSequence = new Array(); } - return new Position(position.i - 1, position.h - 1, true); + this.proofSequence.push(proof); } - static siblingPosition(position) { - let multiplier = position.r ? -1 : 1; - return new Position(position.i + multiplier * (Math.pow(2, (position.h + 1)) - 1), position.h, !position.r); + dataByteLength() { + let length = 0; + length += varuint_1.default.encodingLength(this.proofSequence.length); + for (let i = 0; i < this.proofSequence.length; i++) { + length += this.proofSequence[i].dataByteLength(); + } + return length; } - static parentIndex(position) { - if (position.r) { - return position.i + 1; + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); + bufferWriter.writeCompactSize(this.proofSequence.length); + for (let i = 0; i < this.proofSequence.length; i++) { + bufferWriter.writeSlice(this.proofSequence[i].toBuffer()); } - else { - return position.i + Math.pow(2, (position.h + 1)); + return bufferWriter.buffer; + } + fromDataBuffer(buffer, offset) { + const reader = new bufferutils_1.default.BufferReader(buffer, offset); + let proofSequenceLength = reader.readCompactSize(); + this.proofSequence = new Array(); + for (let i = 0; i < proofSequenceLength; i++) { + let proof = new CMMRBranch(); + reader.offset = proof.fromBuffer(reader.buffer, reader.offset); + this.setProof(proof); } + return reader.offset; } - static peakPositions(leafIndex) { - let currentPosition = this.godPeakFromLeafIndex(leafIndex); - let peakPositions = []; - while (leafIndex >= 0) { - currentPosition = this.leftChildPosition(currentPosition); - if (leafIndex >= Math.pow(2, currentPosition.h) - 1) { - peakPositions.push(currentPosition); - currentPosition = this.siblingPosition(currentPosition); - leafIndex -= Math.pow(2, currentPosition.h); // leafIndex becomes a kindof accumulator +} +exports.CMMRProof = CMMRProof; +//template , typename LAYER0_TYPE=LAYER_TYPE, typename HASHALGOWRITER=CBLAKE2bWriter> +class CMerkleMountainView { + constructor(mountainRange, viewSize = 0) { + this.mmr = mountainRange; + let maxSize = this.mmr.size(); + if (viewSize > maxSize || viewSize == 0) { + viewSize = maxSize; + } + this.sizes = new Array(); + this.sizes.push(viewSize); + for (viewSize >>= 1; viewSize; viewSize >>= 1) { + this.sizes.push(viewSize); + } + this.peakMerkle = new Array(); + this.peaks = new Array(); + } + // how many elements are stored in this view + size() { + // zero if empty or the size of the zeroeth layer + return this.sizes.length == 0 ? 0 : this.sizes[0]; + } + CalcPeaks(force = false) { + // if we don't yet have calculated peaks, calculate them + if (force || (this.peaks.length == 0 && this.size() != 0)) { + // reset the peak merkle tree, in case this is forced + this.peaks = new Array; + this.peakMerkle = new Array; + for (let ht = 0; ht < this.sizes.length; ht++) { + // if we're at the top or the layer above us is smaller than 1/2 the size of this layer, rounded up, we are a peak + if (ht == (this.sizes.length - 1) || this.sizes[ht + 1] < ((this.sizes[ht] + 1) >> 1)) { + this.peaks.splice(0, 0, this.mmr.getNode(ht, this.sizes[ht] - 1)); + } } } - return peakPositions; } - static localPeakPosition(leafIndex, leafLength) { - let lastLeafIndex = leafLength <= leafIndex ? leafIndex : leafLength - 1; - return MMR._localPeakPosition(leafIndex, MMR.peakPositions(lastLeafIndex)); - } - static _localPeakPosition(leafIndex, peakPositions) { - for (let i = 0; i < peakPositions.length; i++) { - let currentRange = Math.pow(2, (peakPositions[i].h)); - if (leafIndex < currentRange) { - return peakPositions[i]; + resize(newSize) { + if (newSize != this.size()) { + this.sizes = new Array; + this.peaks = new Array; + this.peakMerkle = new Array; + let maxSize = this.mmr.size(); + if (newSize > maxSize) { + newSize = maxSize; } - else { - leafIndex -= currentRange; + this.sizes.push(newSize); + newSize >>= 1; + while (newSize) { + this.sizes.push(newSize); + newSize >>= 1; } } - } - static mountainPositions(currentPosition, targetNodeIndex) { - let mountainPositions = []; - while (currentPosition.h > 0) { - let children = [this.leftChildPosition(currentPosition), this.rightChildPosition(currentPosition)]; - mountainPositions.push(children); - if (targetNodeIndex > currentPosition.i - Math.pow(2, currentPosition.h) - currentPosition.h + 1) { - currentPosition = children[1]; - } - else { - currentPosition = children[0]; + return this.size(); + } + maxsize() { + return this.mmr.size() - 1; + } + GetPeaks() { + this.CalcPeaks(); + return this.peaks; + } + GetRoot() { + let rootHash = Buffer.allocUnsafe(32); + if (this.size() > 0 && this.peakMerkle.length == 0) { + // get peaks and hash to a root + this.CalcPeaks(); + let layerNum = 0, layerSize = this.peaks.length; + // with an odd number of elements below, the edge passes through + for (let passThrough = !!(layerSize & 1); layerNum == 0 || layerSize > 1; passThrough = !!(layerSize & 1), layerNum++) { + this.peakMerkle.push(Array()); + let i; + let layerIndex = layerNum ? layerNum - 1 : 0; // layerNum is base 1 + for (i = 0; i < (layerSize >> 1); i++) { + if (layerNum > 0) { + this.peakMerkle[this.peakMerkle.length - 1].push(this.peakMerkle[layerIndex][i << 1].CreateParentNode(this.peakMerkle[layerIndex][(i << 1) + 1])); + } + else { + this.peakMerkle[this.peakMerkle.length - 1].push(this.peaks[i << 1].CreateParentNode(this.peaks[(i << 1) + 1])); + } + } + if (passThrough) { + if (layerNum > 0) { + // pass the end of the prior layer through + this.peakMerkle[this.peakMerkle.length - 1].push(this.peakMerkle[layerIndex][this.peakMerkle[layerIndex].length - 1]); + } + else { + this.peakMerkle[this.peakMerkle.length].push(this.peaks[this.peaks.length - 1]); + } + } + // each entry in the next layer should be either combined two of the prior layer, or a duplicate of the prior layer's end + layerSize = this.peakMerkle[this.peakMerkle.length - 1].length; } + rootHash = this.peakMerkle[this.peakMerkle.length - 1][0].hash; } - return mountainPositions; + else if (this.peakMerkle.length > 0) { + rootHash = this.peakMerkle[this.peakMerkle.length - 1][0].hash; + } + return rootHash; } - static godPeakFromLeafIndex(leafIndex) { - let peakHeight = 0; - while (Math.pow(2, peakHeight) <= leafIndex + 1) { - peakHeight++; + GetRootNode() { + // ensure merkle tree is calculated + let root = this.GetRoot(); + if (root.length > 0) { + return this.peakMerkle[this.peakMerkle.length - 1][0]; } - return new Position(Math.pow(2, (peakHeight + 1)) - 2, peakHeight, false); - } - static getNodePosition(leafIndex) { - let currentPosition = this.godPeakFromLeafIndex(leafIndex); - let accumulator = 0; - while (currentPosition.h > 0) { - let serviceRange = Math.pow(2, (currentPosition.h - 1)); - if (leafIndex >= accumulator + serviceRange) { - currentPosition = this.rightChildPosition(currentPosition); - accumulator += serviceRange; - } - else { - currentPosition = this.leftChildPosition(currentPosition); - } + else { + return null; } - return currentPosition; - } - static proofPositions(leafIndexes, referenceTreeLength) { - let positions = {}; - let finalPeakPositions = MMR.peakPositions(referenceTreeLength - 1); - // add peak positions - for (let i = 0; i < finalPeakPositions.length; i++) { // log(n)/2 - positions[finalPeakPositions[i].i] = finalPeakPositions[i]; + } + // return hash of the element at "index" + GetHash(index) { + if (index < this.size()) { + return this.mmr.layer0[index].hash; } - //add local mountain proof positions for each leaf - for (let i = 0; i < leafIndexes.length; i++) { // k*2log(n) - let nodePosition = MMR.getNodePosition(leafIndexes[i]); - let finalLocalPeak = MMR._localPeakPosition(leafIndexes[i], finalPeakPositions); - // positions[finalLocalPeak.i] = finalLocalPeak // ?? should already have all peaks - let mountainPositions = MMR.mountainPositions(finalLocalPeak, nodePosition.i); - for (let j = 0; j < mountainPositions.length; j++) { - positions[mountainPositions[j][0].i] = mountainPositions[j][0]; - positions[mountainPositions[j][1].i] = mountainPositions[j][1]; - } + else { + return Buffer.allocUnsafe(32); } - // find implied positions (ones which can be calculated based on child positions that are present) - let positionIndexes = Object.keys(positions); - let impliedIndexes = []; - for (let j = 0; j < positionIndexes.length; j++) { // k*log(n) - if (positions[positionIndexes[j]].h > 0) { - let hasLeftChild = MMR._hasPosition(positions, MMR.leftChildPosition(positions[positionIndexes[j]])); - let hasRightChild = MMR._hasPosition(positions, MMR.rightChildPosition(positions[positionIndexes[j]])); - if (hasLeftChild && hasRightChild) { - impliedIndexes.push(positionIndexes[j]); // don't remove them yet because recursion will be slower - } + } + GetBranchType() { + return BRANCH_MMRBLAKE_NODE; + } + // return a proof of the element at "pos" + GetProof(retProof, pos) { + // find a path from the indicated position to the root in the current view + let retBranch = new CMMRBranch(); + if (pos < this.size()) { + // just make sure the peakMerkle tree is calculated + this.GetRoot(); + // if we have leaf information, add it + let toAdd = this.mmr.layer0.getIndex(pos).GetLeafHash(); + if (toAdd.length > 0) { + retBranch.branch.splice(retBranch.branch.length, 0, toAdd[0]); } - } - // finally remove implied nodes - for (var i = 0; i < impliedIndexes.length; i++) { // k*log(n) - impliedIndexes[i]; - delete positions[impliedIndexes[i]]; - } - return positions; - } - static _hasPosition(nodes, position) { - let has = !!nodes[position.i]; - if (!has && position.h > 0) { - if (MMR._hasPosition(nodes, MMR.leftChildPosition(position)) - && MMR._hasPosition(nodes, MMR.rightChildPosition(position))) { - has = true; + let p = pos; + for (let l = 0; l < this.sizes.length; l++) { + if ((p & 1) === 1) { + let proofHashes = this.mmr.getNode(l, p - 1).hash; + retBranch.branch = retBranch.branch.concat(proofHashes); + p >>= 1; + } + else { + // make sure there is one after us to hash with or we are a peak and should be hashed with the rest of the peaks + if (this.sizes[l] > (p + 1)) { + let proofHashes = this.mmr.getNode(l, p + 1).hash; + retBranch.branch = retBranch.branch.concat(proofHashes); + p >>= 1; + } + else { + /* for (auto &oneNode : peaks) + { + printf("peaknode: "); + for (auto oneHash : oneNode.GetProofHash(oneNode)) + { + printf("%s:", oneHash.GetHex().c_str()); + } + printf("\n"); + } */ + // we are at a peak, the alternate peak to us, or the next thing we should be hashed with, if there is one, is next on our path + let peakHash = this.mmr.getNode(l, p).hash; + // linear search to find out which peak we are in the base of the peakMerkle + for (p = 0; p < this.peaks.length; p++) { + if (this.peaks[p].hash == peakHash) { + break; + } + } + // p is the position in the merkle tree of peaks + if (p > this.peaks.length) + throw new Error("peak not found"); + // move up to the top, which is always a peak of size 1 + let layerNum, layerSize; + for (layerNum = 0, layerSize = this.peaks.length; layerNum == 0 || layerSize > 1; layerSize = this.peakMerkle[layerNum++].length) { + let layerIndex = layerNum ? layerNum - 1 : 0; // layerNum is base 1 + // we are an odd member on the end (even index) and will not hash with the next layer above, we will propagate to its end + if ((p < layerSize - 1) || (p & 1)) { + if (p & 1) { + // hash with the one before us + if (layerNum > 0) { + let proofHashes = this.peakMerkle[layerIndex][p - 1].hash; + retBranch.branch = retBranch.branch.concat(proofHashes); + } + else { + let proofHashes = this.peaks[p - 1].hash; + retBranch.branch = retBranch.branch.concat(proofHashes); + } + } + else { + // hash with the one in front of us + if (layerNum > 0) { + let proofHashes = this.peakMerkle[layerIndex][p + 1].hash; + retBranch.branch = retBranch.branch.concat(proofHashes); + } + else { + let proofHashes = this.peaks[p + 1].hash; + retBranch.branch = retBranch.branch.concat(proofHashes); + } + } + } + p >>= 1; + } + // finished + break; + } + } } + retBranch.branchType = this.GetBranchType(); + retBranch.nSize = this.size(); + retBranch.nIndex = pos; + retProof.setProof(retBranch); + return true; } - return has; + return false; + } + // return a vector of the bits, either 1 or 0 in each byte, to represent both the size + // of the proof by the size of the vector, and the expected bit in each position for the given + // position in a Merkle Mountain View of the specified size + GetProofBits(pos, mmvSize) { + //NOTE: Not implmented. } + ; } -exports.MMR = MMR; -class MemoryBasedDb { - constructor(...args) { - if (args[0] == undefined || typeof args[0] == 'number') { - this.leafLength = args[0] || 0; - this.nodes = args[1] || {}; +exports.CMerkleMountainView = CMerkleMountainView; +const GetMMRProofIndex = (pos, mmvSize, extraHashes) => { + let index = new bn_js_1.BN(0); + let layerSizes = []; + let merkleSizes = []; + let peakIndexes = []; + let bitPos = 0; + //start at the beginning + //create a simulation of a mmr based on size + if (!(pos > 0 && pos < mmvSize)) + return new bn_js_1.BN(0); + //create an array of all the sizes + while (mmvSize) { + layerSizes.push(mmvSize); + mmvSize = mmvSize >> 1; + } + for (let height = 0; height < layerSizes.length; height++) { + if (height == layerSizes.length - 1 || layerSizes[height] & 1) { + peakIndexes.push(height); } } - get(index) { - return __awaiter(this, void 0, void 0, function* () { - return this.nodes[index]; - }); - } - set(value, index) { - return __awaiter(this, void 0, void 0, function* () { - this.nodes[index] = value; - }); - } - getLeafLength() { - return __awaiter(this, void 0, void 0, function* () { - return this.leafLength; - }); - } - setLeafLength(leafLength) { - return __awaiter(this, void 0, void 0, function* () { - return this.leafLength = leafLength; - }); + //array flip peak indexes + peakIndexes.reverse(); + let layerNum = 0; + let layerSize = peakIndexes.length; + for (let passThrough = (layerSize & 1); layerNum == 0 || layerSize > 1; passThrough = (layerSize & 1), layerNum++) { + layerSize = (layerSize >> 1) + passThrough; + if (layerSize) { + merkleSizes.push(layerSize); + } } - getNodes() { - return __awaiter(this, void 0, void 0, function* () { - return this.nodes; - }); + //flip the merklesizes + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } + let p = pos; + for (let l = 0; l < layerSizes.length; l++) { + if (p & 1) { + index = index.or(new bn_js_1.BN(1).shln(bitPos++)); + p >>= 1; + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } + } + else { + if (layerSizes[l] > (p + 1)) { + bitPos++; + p >>= 1; + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } + } + else { + for (p = 0; p < peakIndexes.length; p++) { + if (peakIndexes[p] == l) { + break; + } + } + for (let layerNum = -1, layerSize = peakIndexes.length; layerNum == -1 || layerSize > 1; layerSize = merkleSizes[++layerNum]) { + if (p < (layerSize - 1) || (p & 1)) { + if (p & 1) { + // hash with the one before us + index = index.or(new bn_js_1.BN(1).shln(bitPos++)); + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } + } + else { + // hash with the one in front of us + bitPos++; + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } + } + } + p >>= 1; + } + break; + } + } } -} -exports.MemoryBasedDb = MemoryBasedDb; + return index; +}; diff --git a/dist/vdxf/classes/attestationData.d.ts b/dist/vdxf/classes/attestationData.d.ts new file mode 100644 index 0000000..a7543ca --- /dev/null +++ b/dist/vdxf/classes/attestationData.d.ts @@ -0,0 +1,36 @@ +/// +import { Utf8DataVdxfObject, HexDataVdxfObject, BufferDataVdxfObject, PNGImageVdxfObject, VDXFObject } from ".."; +export declare const enum AttestationClassTypes { + BUFFER_DATA_STRING = 1, + BUFFER_DATA_BYTES = 2, + BUFFER_DATA_BASE64 = 3, + URL = 4, + PNG_IMAGE = 5, + KEY_ONLY = 6, + BOOLEAN = 7 +} +export declare const AttestationVdxfidMap: { + [x: string]: { + name: string; + type: AttestationClassTypes; + }; +}; +export declare class AttestationDataType { + dataItem: Utf8DataVdxfObject | HexDataVdxfObject | BufferDataVdxfObject | PNGImageVdxfObject | VDXFObject; + salt: Buffer; + constructor(data: any, vdxfkey: string, salt?: string); + dataBytelength(): number; + toBuffer(): Buffer; + fromDataBuffer(buffer: Buffer, offset?: number, vdxfkey?: string): number; +} +export declare const friendlyNames: (vdfxkey: any) => string; +export declare class AttestationData { + components: Map; + constructor(components?: Map); + dataByteLength(): number; + toDataBuffer(): Buffer; + fromDataBuffer(buffer: Buffer, offset?: number): number; + size(): number; + setDataFromJson(data: Array, getSalt: Function): void; + getHash(key: any): Buffer; +} diff --git a/dist/vdxf/classes/attestationData.js b/dist/vdxf/classes/attestationData.js new file mode 100644 index 0000000..053de9e --- /dev/null +++ b/dist/vdxf/classes/attestationData.js @@ -0,0 +1,353 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AttestationData = exports.friendlyNames = exports.AttestationDataType = exports.AttestationVdxfidMap = void 0; +const __1 = require(".."); +const identitykeys = require("../identityDataKeys"); +const keylist = require("../keys"); +const bufferutils_1 = require("../../utils/bufferutils"); +const createHash = require("create-hash"); +const address_1 = require("../../utils/address"); +const varuint_1 = require("../../utils/varuint"); +const vdxf_1 = require("../../constants/vdxf"); +const { BufferReader, BufferWriter } = bufferutils_1.default; +exports.AttestationVdxfidMap = { + [identitykeys.IDENTITYDATA_FIRSTNAME.vdxfid]: { name: "First Name", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_LASTNAME.vdxfid]: { name: "Last Name", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_ATTESTOR.vdxfid]: { name: "Attestor ID", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDENTITY.vdxfid]: { name: "Identity", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_ID.vdxfid]: { name: "ID", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_USERID.vdxfid]: { name: "User ID", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_CREATEDAT.vdxfid]: { name: "Created at", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_COMPLETEDAT.vdxfid]: { name: "Completed at", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PREVIOUSATTEMPTID.vdxfid]: { name: "Previous attempt ID", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_SHAREABLEURL.vdxfid]: { name: "Shareable URL", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_TEMPLATEID.vdxfid]: { name: "Template ID", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_TEMPLATEVERSION.vdxfid]: { name: "Template Version", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PHONENUMBER.vdxfid]: { name: "Phone Number", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_OVER18.vdxfid]: { name: "Over 18", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_OVER21.vdxfid]: { name: "Over 21", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_OVER25.vdxfid]: { name: "Over 25", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_IPADDRESS.vdxfid]: { name: "IP Address", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_EMAIL.vdxfid]: { name: "Email Address", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_HOMEADDRESS.vdxfid]: { name: "Home address", type: 6 /* AttestationClassTypes.KEY_ONLY */ }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1.vdxfid]: { name: "Street 1", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2.vdxfid]: { name: "Street 2", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_CITY.vdxfid]: { name: "City", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_REGION.vdxfid]: { name: "Region", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE.vdxfid]: { name: "Post Code", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY.vdxfid]: { name: "Country", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDNUMBER_VALUE.vdxfid]: { name: "ID Number", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDNUMBER_TYPE.vdxfid]: { name: "ID Type", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_STATUS.vdxfid]: { name: "Status", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_APPROVALS_ACCEPTEDTOS.vdxfid]: { name: "Accepted Terms and Conditions", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_APPROVALS_VERIFIEDSMS.vdxfid]: { name: "SMS Verified", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_APPROVALS_KYCCHECKED.vdxfid]: { name: "KYC Checked ok", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_APPROVALS_DOCUMENTSVERIFIED.vdxfid]: { name: "Documents Verified", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_APPROVALS_SELFIECHECKED.vdxfid]: { name: "Selfie Checked", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_APPROVALS_WATCHLIST_OK.vdxfid]: { name: "Watchlist ok", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Riskcheck ok", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE.vdxfid]: { name: "Driving Licence", type: 6 /* AttestationClassTypes.KEY_ONLY */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_FRONT.vdxfid]: { name: "Driving Licence Front", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_BACK.vdxfid]: { name: "Driving Licence Back", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_FRONT.vdxfid]: { name: "Driving Licence Front", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_BACK.vdxfid]: { name: "Driving Licence Back", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_FACE.vdxfid]: { name: "Driving Licence Face", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_IDNUMBER.vdxfid]: { name: "Driving Licence Number", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CATEGORY.vdxfid]: { name: "Driving Licence Catagory", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_EXPIRATIONDATE.vdxfid]: { name: "Driving Licence expiry date", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Driving Licence matches country", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION.vdxfid]: { name: "Driving Licence issuing reigon", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH.vdxfid]: { name: "Driving Licence Date of Birth", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ADDRESS.vdxfid]: { name: "Driving Licence Address", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_STREET1.vdxfid]: { name: "Driving Licence Street 1", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CITY.vdxfid]: { name: "Driving Licence City", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_REGION.vdxfid]: { name: "Driving Licence Region", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_POSTCODE.vdxfid]: { name: "Driving Licence ZIP/Post Code", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_COUNTRY.vdxfid]: { name: "Driving Licence Country", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_MATCHED.vdxfid]: { name: "Driving Licence Matched all", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_NAME_MATCHED.vdxfid]: { name: "Driving Licence name matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH_MATCHED.vdxfid]: { name: "Driving Licence Date of Birth Matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_SELFIECHECK_SUCCESS.vdxfid]: { name: "Selfie Check success", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_SELFIECHECK_IMAGE.vdxfid]: { name: "Selfie Check image", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_SELFIECHECK_VIDEO.vdxfid]: { name: "Selfie Check video", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_SELFIECHECK_DRIVINGLICENCE_MATCH.vdxfid]: { name: "Selfie Driving Licence match", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_KYC_SUCCESS.vdxfid]: { name: "KYC Success", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_KYC_ADDRESS_MATCHED.vdxfid]: { name: "KYC Address Matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_KYC_TYPE.vdxfid]: { name: "KYC Type", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_KYC_NAME_MATCHED.vdxfid]: { name: "KYC Name Matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_KYC_DATEOFBIRTH_MATCHED.vdxfid]: { name: "KYC Date of Birth Matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_KYC_IDNUMBER_MATCHED.vdxfid]: { name: "KYC ID Matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_KYC_PHONENUMBER_MATCHED.vdxfid]: { name: "KYC Phone number matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_KYC_AREACODE_MATCHED.vdxfid]: { name: "KYC Areacode Matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RISKCHECK_STATUS.vdxfid]: { name: "Risk Check Status", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RISKCHECK_USERINTERACTIONS.vdxfid]: { name: "Risck Check User Interactions", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RISKCHECK_FRAUDRINGOK.vdxfid]: { name: "Risk Check No Fraudring", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RISKCHECK_BOTNOTDETECTED.vdxfid]: { name: "Risk Check bot free", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_EMAIL_ISDELIVERABLE.vdxfid]: { name: "Email address is deliverable", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_EMAIL_BREACHCOUNT.vdxfid]: { name: "Email breach count", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_EMAIL_FIRSTBREACHEDAT.vdxfid]: { name: "Email first breach date", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_EMAIL_LASTBREACHEDAT.vdxfid]: { name: "Email last breach date", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_REGISTEREDAT.vdxfid]: { name: "Email domain registered at", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_FREEPROVIDER.vdxfid]: { name: "Email is free provider", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_CUSTOM.vdxfid]: { name: "Email Domain is custom", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_DISPOSABLE.vdxfid]: { name: "Email Domain Disposable", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS.vdxfid]: { name: "Email top level Domain Suspicious", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDCARD.vdxfid]: { name: "ID Card", type: 6 /* AttestationClassTypes.KEY_ONLY */ }, + [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_FRONT.vdxfid]: { name: "ID Card Front", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_BACK.vdxfid]: { name: "ID Card Back", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_IDCARD_CROPPED_FRONT.vdxfid]: { name: "ID Card Front", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_IDCARD_CROPPED_BACK.vdxfid]: { name: "ID Card Back", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_IDCARD_FACE.vdxfid]: { name: "ID Card Face", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_IDCARD_IDNUMBER.vdxfid]: { name: "ID Card ID Number", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDCARD_CATEGORY.vdxfid]: { name: "ID Card Category", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDCARD_EXPIRATIONDATE.vdxfid]: { name: "ID Card Expiry date", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "ID Card Issuing Country Matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDCARD_ISSUING_REGION.vdxfid]: { name: "ID Card Issuing Region", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTH.vdxfid]: { name: "ID Card Date of Birth", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS.vdxfid]: { name: "ID Card Address", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_STREET1.vdxfid]: { name: "ID Card Street 1", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_CITY.vdxfid]: { name: "ID Card City", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_REGION.vdxfid]: { name: "ID Card Region", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_POSTCODE.vdxfid]: { name: "ID Card Zip/Post Code", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_COUNTRY.vdxfid]: { name: "ID Card Country", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "ID Card Matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDCARD_NAME_MATCHED.vdxfid]: { name: "ID Card Name Matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "ID Card Date of Birth Matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_PASSPORT.vdxfid]: { name: "Passport", type: 6 /* AttestationClassTypes.KEY_ONLY */ }, + [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_FRONT.vdxfid]: { name: "Passport front", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_BACK.vdxfid]: { name: "Passport back", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_FRONT.vdxfid]: { name: "Passport front", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_BACK.vdxfid]: { name: "Passport back", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_PASSPORT_FACE.vdxfid]: { name: "Passport face", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_PASSPORT_IDNUMBER.vdxfid]: { name: "Passport ID Number", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PASSPORT_CATEGORY.vdxfid]: { name: "Passport Category", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PASSPORT_EXPIRATIONDATE.vdxfid]: { name: "Passport expiry date", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Passport issuing country matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_REGION.vdxfid]: { name: "Passport issuing region matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTH.vdxfid]: { name: "Passport date of birth", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS.vdxfid]: { name: "Passport address", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_STREET1.vdxfid]: { name: "Passport street 1", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_CITY.vdxfid]: { name: "Passport city", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_REGION.vdxfid]: { name: "Passport region", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_POSTCODE.vdxfid]: { name: "Passport zip/post code", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_COUNTRY.vdxfid]: { name: "Passport country", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PASSPORT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Passport matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PASSPORT_NAME_MATCHED.vdxfid]: { name: "Passport Name Matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTHMATCHED.vdxfid]: { name: "Passport date of birth matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT.vdxfid]: { name: "Residence Permit", type: 6 /* AttestationClassTypes.KEY_ONLY */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_FRONT.vdxfid]: { name: "Residence Permit front", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_BACK.vdxfid]: { name: "Residence Permit back", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_FRONT.vdxfid]: { name: "Residence Permit front", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_BACK.vdxfid]: { name: "Residence Permit back", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_FACE.vdxfid]: { name: "Residence Permit face", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_IDNUMBER.vdxfid]: { name: "Residence Permit ID Number", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CATEGORY.vdxfid]: { name: "Residence Permit category", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_EXPIRATIONDATE.vdxfid]: { name: "Residence Permit expiry date", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Residence Permit issuing country matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_REGION.vdxfid]: { name: "Residence Permit issuing region matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTH.vdxfid]: { name: "Residence Permit date of birth", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS.vdxfid]: { name: "Residence Permit Address", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_STREET1.vdxfid]: { name: "Residence Permit Street 1", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_CITY.vdxfid]: { name: "Residence Permit City", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_REGION.vdxfid]: { name: "Residence Permit Region", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_POSTCODE.vdxfid]: { name: "Residence Permit Zip/Post code", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_COUNTRY.vdxfid]: { name: "Residence Permit Country", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Residence Permit Matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_NAME_MATCHED.vdxfid]: { name: "Residence Permit name matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTHMATCHED.vdxfid]: { name: "Residence Permit date of birth matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD.vdxfid]: { name: "Resident Card", type: 6 /* AttestationClassTypes.KEY_ONLY */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_FRONT.vdxfid]: { name: "Resident Card Front", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_BACK.vdxfid]: { name: "Resident Card Back", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_FRONT.vdxfid]: { name: "Resident Card Front", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_BACK.vdxfid]: { name: "Resident Card Back", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_FACE.vdxfid]: { name: "Resident Card Face", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_IDNUMBER.vdxfid]: { name: "Resident Card ID Number", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_CATEGORY.vdxfid]: { name: "Resident Card Category", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_EXPIRATIONDATE.vdxfid]: { name: "Resident Card Expiry Date", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Resident Card Issuing Country Matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_REGION.vdxfid]: { name: "Resident Card Issuing Region", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTH.vdxfid]: { name: "Resident Card date of birth", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS.vdxfid]: { name: "Resident Card address", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_STREET1.vdxfid]: { name: "Resident Card Street 1", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_CITY.vdxfid]: { name: "Resident Card City", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_REGION.vdxfid]: { name: "Resident Card Region", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_POSTCODE.vdxfid]: { name: "Resident Card Zip/Post Code", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_COUNTRY.vdxfid]: { name: "Resident Card Country", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Resident Card Matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_NAME_MATCHED.vdxfid]: { name: "Resident Card Name Matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "Resident Card date of birth Matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_VISA.vdxfid]: { name: "Visa", type: 6 /* AttestationClassTypes.KEY_ONLY */ }, + [identitykeys.IDENTITYDATA_VISA_ORIGINAL_FRONT.vdxfid]: { name: "Visa front", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_VISA_ORIGINAL_BACK.vdxfid]: { name: "Visa back", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_VISA_CROPPED_FRONT.vdxfid]: { name: "Visa front", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_VISA_CROPPED_BACK.vdxfid]: { name: "Visa back", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_VISA_FACE.vdxfid]: { name: "Visa face", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_VISA_IDNUMBER.vdxfid]: { name: "Visa ID Number", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_VISA_CATEGORY.vdxfid]: { name: "Visa Category", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_VISA_EXPIRATIONDATE.vdxfid]: { name: "Visa expiry date", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Visa issuing country matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_VISA_ISSUING_REGION.vdxfid]: { name: "Visa issuing region", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTH.vdxfid]: { name: "Visa date of birth", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS.vdxfid]: { name: "Visa address", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_STREET1.vdxfid]: { name: "Visa Street 1", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_CITY.vdxfid]: { name: "Visa City", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_REGION.vdxfid]: { name: "Visa Region", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_POSTCODE.vdxfid]: { name: "Visa Zip/Post Code", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_COUNTRY.vdxfid]: { name: "Visa Country", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_VISA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Visa document matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_VISA_NAME_MATCHED.vdxfid]: { name: "Visa name matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTHMATCHED.vdxfid]: { name: "Visa date of birth matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALFRONT.vdxfid]: { name: "Original Front", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALBACK.vdxfid]: { name: "Original Back", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDFRONT.vdxfid]: { name: "Cropped Front", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDBACK.vdxfid]: { name: "Cropped Back", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_FACE.vdxfid]: { name: "Face", type: 4 /* AttestationClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_IDNUMBER.vdxfid]: { name: "ID Number", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CATEGORY.vdxfid]: { name: "Category", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_EXPIRATIONDATE.vdxfid]: { name: "Expiry Date", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY.vdxfid]: { name: "Issuing Country", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUING_REGION.vdxfid]: { name: "Issuing Region", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ADDRESS.vdxfid]: { name: "Address", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_ADDRESS_STREET1.vdxfid]: { name: "Street 1", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_ADDRESS_STREET2.vdxfid]: { name: "Street 2", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_ADDRESS_CITY.vdxfid]: { name: "City", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_ADDRESS_REGION.vdxfid]: { name: "Region", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_ADDRESS_POSTCODE.vdxfid]: { name: "Zip/Postal Code", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_ADDRESS_COUNTRY.vdxfid]: { name: "Country", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Document Matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED.vdxfid]: { name: "Name Matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED.vdxfid]: { name: "Date of Birth Matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, + [keylist.ATTESTATION_TYPE.vdxfid]: { name: "Attestation Type", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, +}; +class AttestationDataType { + constructor(data, vdxfkey, salt) { + switch (exports.AttestationVdxfidMap[vdxfkey].type) { + case 1 /* AttestationClassTypes.BUFFER_DATA_STRING */: + this.dataItem = new __1.Utf8DataVdxfObject(data, vdxfkey); + break; + case 2 /* AttestationClassTypes.BUFFER_DATA_BYTES */: + this.dataItem = new __1.HexDataVdxfObject(data, vdxfkey); + break; + case 3 /* AttestationClassTypes.BUFFER_DATA_BASE64 */: + this.dataItem = new __1.BufferDataVdxfObject(data, vdxfkey, "base64"); + break; + case 4 /* AttestationClassTypes.URL */: + this.dataItem = new __1.BufferDataVdxfObject(data, vdxfkey, "utf8"); + break; + case 5 /* AttestationClassTypes.PNG_IMAGE */: + this.dataItem = new __1.PNGImageVdxfObject(data, vdxfkey); + break; + case 6 /* AttestationClassTypes.KEY_ONLY */: + this.dataItem = new __1.VDXFObject(vdxfkey); + break; + case 7 /* AttestationClassTypes.BOOLEAN */: + this.dataItem = new __1.HexDataVdxfObject(data, vdxfkey); + break; + default: + this.dataItem = new __1.HexDataVdxfObject(data, vdxfkey); + break; + } + if (salt) { + this.salt = Buffer.from(salt, "hex"); + } + } + dataBytelength() { + let length = 0; + length += this.dataItem.byteLength(); + length += this.salt.length; + return length; + } + toBuffer() { + const buffer = Buffer.alloc(this.dataBytelength()); + const writer = new bufferutils_1.default.BufferWriter(buffer); + writer.writeSlice(this.dataItem.toBuffer()); + writer.writeSlice(this.salt); + return writer.buffer; + } + fromDataBuffer(buffer, offset = 0, vdxfkey) { + const reader = new bufferutils_1.default.BufferReader(buffer, offset); + reader.offset = this.dataItem.fromBuffer(reader.buffer, reader.offset, vdxfkey); + this.salt = reader.readSlice(32); + return reader.offset; + } +} +exports.AttestationDataType = AttestationDataType; +const friendlyNames = (vdfxkey) => { + if (vdfxkey in exports.AttestationVdxfidMap) { + return exports.AttestationVdxfidMap[vdfxkey].name; + } + else { + throw new Error("Unknown VDXF key"); + } +}; +exports.friendlyNames = friendlyNames; +class AttestationData { + constructor(components = new Map()) { + this.components = components; + } + dataByteLength() { + let byteLength = 0; + byteLength += varuint_1.default.encodingLength(this.components.size); + for (const [key, item] of this.components) { + byteLength += varuint_1.default.encodingLength(key); + byteLength += item.dataBytelength(); + } + return byteLength; + } + toDataBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); + bufferWriter.writeCompactSize(this.components.size); + for (const [key, item] of this.components) { + bufferWriter.writeCompactSize(key); + bufferWriter.writeSlice(item.toBuffer()); + } + return bufferWriter.buffer; + } + fromDataBuffer(buffer, offset) { + const reader = new bufferutils_1.default.BufferReader(buffer, offset); + const componentsLength = reader.readCompactSize(); + this.components = new Map(); + for (var i = 0; i < componentsLength; i++) { + const key = reader.readCompactSize(); + const vdxfid = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + const attestationData = new AttestationDataType(null, vdxfid); + reader.offset = attestationData.fromDataBuffer(reader.buffer, reader.offset, vdxfid); + this.components.set(key, attestationData); + } + return reader.offset; + } + size() { + return this.components.size; + } + setDataFromJson(data, getSalt) { + if (!this.components) { + this.components = new Map(); + } + for (let i = 0; i < data.length; i++) { + const item = data[i]; + if (!(item.salt instanceof Buffer) || item.salt.length !== 32) { + if (typeof getSalt === "function") { + item.salt = getSalt(); + } + else { + throw new Error("Salt is required to be a 32 random byte Buffer"); + } + } + try { + (0, address_1.fromBase58Check)(item.dataItem.vdxfkey); + } + catch (e) { + throw new Error("Attestation Key is required to be base58 format"); + } + this.components.set(i, item); + } + } + getHash(key) { + let value; + value = this.components.get(key).toBuffer(); + return createHash("sha256").update(value).digest(); + } +} +exports.AttestationData = AttestationData; diff --git a/dist/vdxf/classes/index.d.ts b/dist/vdxf/classes/index.d.ts index 9b13b4b..75b7125 100644 --- a/dist/vdxf/classes/index.d.ts +++ b/dist/vdxf/classes/index.d.ts @@ -23,5 +23,6 @@ export { ProvisioningResultInterface as LoginConsentProvisioningResultInterface export { Hash160 } from './Hash160'; export { RedirectUri, Subject, ProvisioningInfo, RequestedPermission, Audience, AltAuthFactor, } from "./Challenge"; export { Attestation } from './Attestation'; +export { AttestationData, AttestationDataType } from './attestationData'; export { ProvisioningTxid } from './provisioning/ProvisioningResult'; export { Context } from './Context'; diff --git a/dist/vdxf/classes/index.js b/dist/vdxf/classes/index.js index 07bf039..3d15749 100644 --- a/dist/vdxf/classes/index.js +++ b/dist/vdxf/classes/index.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.Context = exports.ProvisioningTxid = exports.Attestation = exports.AltAuthFactor = exports.Audience = exports.RequestedPermission = exports.ProvisioningInfo = exports.Subject = exports.RedirectUri = exports.Hash160 = exports.LoginConsentProvisioningResult = exports.LoginConsentProvisioningDecision = exports.LoginConsentProvisioningResponse = exports.LoginConsentProvisioningChallenge = exports.LoginConsentProvisioningRequest = exports.VerusPayInvoice = exports.VerusPayInvoiceDetails = exports.SignedSessionObjectData = exports.SignedSessionObject = exports.LoginConsentResponse = exports.LoginConsentRequest = exports.LoginConsentDecision = exports.LoginConsentChallenge = void 0; +exports.Context = exports.ProvisioningTxid = exports.AttestationDataType = exports.AttestationData = exports.Attestation = exports.AltAuthFactor = exports.Audience = exports.RequestedPermission = exports.ProvisioningInfo = exports.Subject = exports.RedirectUri = exports.Hash160 = exports.LoginConsentProvisioningResult = exports.LoginConsentProvisioningDecision = exports.LoginConsentProvisioningResponse = exports.LoginConsentProvisioningChallenge = exports.LoginConsentProvisioningRequest = exports.VerusPayInvoice = exports.VerusPayInvoiceDetails = exports.SignedSessionObjectData = exports.SignedSessionObject = exports.LoginConsentResponse = exports.LoginConsentRequest = exports.LoginConsentDecision = exports.LoginConsentChallenge = void 0; var Challenge_1 = require("./Challenge"); Object.defineProperty(exports, "LoginConsentChallenge", { enumerable: true, get: function () { return Challenge_1.Challenge; } }); var Decision_1 = require("./Decision"); @@ -38,6 +38,9 @@ Object.defineProperty(exports, "Audience", { enumerable: true, get: function () Object.defineProperty(exports, "AltAuthFactor", { enumerable: true, get: function () { return Challenge_2.AltAuthFactor; } }); var Attestation_1 = require("./Attestation"); Object.defineProperty(exports, "Attestation", { enumerable: true, get: function () { return Attestation_1.Attestation; } }); +var attestationData_1 = require("./attestationData"); +Object.defineProperty(exports, "AttestationData", { enumerable: true, get: function () { return attestationData_1.AttestationData; } }); +Object.defineProperty(exports, "AttestationDataType", { enumerable: true, get: function () { return attestationData_1.AttestationDataType; } }); var ProvisioningResult_2 = require("./provisioning/ProvisioningResult"); Object.defineProperty(exports, "ProvisioningTxid", { enumerable: true, get: function () { return ProvisioningResult_2.ProvisioningTxid; } }); var Context_1 = require("./Context"); diff --git a/dist/vdxf/identityDataKeys.d.ts b/dist/vdxf/identityDataKeys.d.ts new file mode 100644 index 0000000..b7f4362 --- /dev/null +++ b/dist/vdxf/identityDataKeys.d.ts @@ -0,0 +1,209 @@ +import { VDXFKeyInterface } from "./keys"; +export declare const IDENTITYDATA_ATTESTOR: VDXFKeyInterface; +export declare const IDENTITYDATA_IDENTITY: VDXFKeyInterface; +export declare const IDENTITYDATA_ID: VDXFKeyInterface; +export declare const IDENTITYDATA_USERID: VDXFKeyInterface; +export declare const IDENTITYDATA_CREATEDAT: VDXFKeyInterface; +export declare const IDENTITYDATA_COMPLETEDAT: VDXFKeyInterface; +export declare const IDENTITYDATA_PREVIOUSATTEMPTID: VDXFKeyInterface; +export declare const IDENTITYDATA_SHAREABLEURL: VDXFKeyInterface; +export declare const IDENTITYDATA_TEMPLATEID: VDXFKeyInterface; +export declare const IDENTITYDATA_TEMPLATEVERSION: VDXFKeyInterface; +export declare const IDENTITYDATA_PHONENUMBER: VDXFKeyInterface; +export declare const IDENTITYDATA_DATEOFBIRTH: VDXFKeyInterface; +export declare const IDENTITYDATA_OVER18: VDXFKeyInterface; +export declare const IDENTITYDATA_OVER21: VDXFKeyInterface; +export declare const IDENTITYDATA_OVER25: VDXFKeyInterface; +export declare const IDENTITYDATA_IPADDRESS: VDXFKeyInterface; +export declare const IDENTITYDATA_EMAIL: VDXFKeyInterface; +export declare const IDENTITYDATA_FIRSTNAME: VDXFKeyInterface; +export declare const IDENTITYDATA_LASTNAME: VDXFKeyInterface; +export declare const IDENTITYDATA_HOMEADDRESS: VDXFKeyInterface; +export declare const IDENTITYDATA_HOMEADDRESS_STREET1: VDXFKeyInterface; +export declare const IDENTITYDATA_HOMEADDRESS_STREET2: VDXFKeyInterface; +export declare const IDENTITYDATA_HOMEADDRESS_CITY: VDXFKeyInterface; +export declare const IDENTITYDATA_HOMEADDRESS_REGION: VDXFKeyInterface; +export declare const IDENTITYDATA_HOMEADDRESS_POSTCODE: VDXFKeyInterface; +export declare const IDENTITYDATA_HOMEADDRESS_COUNTRY: VDXFKeyInterface; +export declare const IDENTITYDATA_IDNUMBER_VALUE: VDXFKeyInterface; +export declare const IDENTITYDATA_IDNUMBER_TYPE: VDXFKeyInterface; +export declare const IDENTITYDATA_STATUS: VDXFKeyInterface; +export declare const IDENTITYDATA_APPROVALS_ACCEPTEDTOS: VDXFKeyInterface; +export declare const IDENTITYDATA_APPROVALS_VERIFIEDSMS: VDXFKeyInterface; +export declare const IDENTITYDATA_APPROVALS_KYCCHECKED: VDXFKeyInterface; +export declare const IDENTITYDATA_APPROVALS_DOCUMENTSVERIFIED: VDXFKeyInterface; +export declare const IDENTITYDATA_APPROVALS_SELFIECHECKED: VDXFKeyInterface; +export declare const IDENTITYDATA_APPROVALS_WATCHLIST_OK: VDXFKeyInterface; +export declare const IDENTITYDATA_APPROVALS_RISKCHECKOK: VDXFKeyInterface; +export declare const IDENTITYDATA_DRIVINGLICENCE: VDXFKeyInterface; +export declare const IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_FRONT: VDXFKeyInterface; +export declare const IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_BACK: VDXFKeyInterface; +export declare const IDENTITYDATA_DRIVINGLICENCE_CROPPED_FRONT: VDXFKeyInterface; +export declare const IDENTITYDATA_DRIVINGLICENCE_CROPPED_BACK: VDXFKeyInterface; +export declare const IDENTITYDATA_DRIVINGLICENCE_FACE: VDXFKeyInterface; +export declare const IDENTITYDATA_DRIVINGLICENCE_IDNUMBER: VDXFKeyInterface; +export declare const IDENTITYDATA_DRIVINGLICENCE_CATEGORY: VDXFKeyInterface; +export declare const IDENTITYDATA_DRIVINGLICENCE_EXPIRATIONDATE: VDXFKeyInterface; +export declare const IDENTITYDATA_DRIVINGLICENCE_ISSUING_COUNTRY_MATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION: VDXFKeyInterface; +export declare const IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH: VDXFKeyInterface; +export declare const IDENTITYDATA_DRIVINGLICENCE_ADDRESS: VDXFKeyInterface; +export declare const IDENTITYDATA_DRIVINGLICENCE_STREET1: VDXFKeyInterface; +export declare const IDENTITYDATA_DRIVINGLICENCE_CITY: VDXFKeyInterface; +export declare const IDENTITYDATA_DRIVINGLICENCE_REGION: VDXFKeyInterface; +export declare const IDENTITYDATA_DRIVINGLICENCE_POSTCODE: VDXFKeyInterface; +export declare const IDENTITYDATA_DRIVINGLICENCE_COUNTRY: VDXFKeyInterface; +export declare const IDENTITYDATA_DRIVINGLICENCE_MATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_DRIVINGLICENCE_NAME_MATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH_MATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_SELFIECHECK_SUCCESS: VDXFKeyInterface; +export declare const IDENTITYDATA_SELFIECHECK_IMAGE: VDXFKeyInterface; +export declare const IDENTITYDATA_SELFIECHECK_VIDEO: VDXFKeyInterface; +export declare const IDENTITYDATA_SELFIECHECK_DRIVINGLICENCE_MATCH: VDXFKeyInterface; +export declare const IDENTITYDATA_KYC_SUCCESS: VDXFKeyInterface; +export declare const IDENTITYDATA_KYC_ADDRESS_MATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_KYC_TYPE: VDXFKeyInterface; +export declare const IDENTITYDATA_KYC_NAME_MATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_KYC_DATEOFBIRTH_MATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_KYC_IDNUMBER_MATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_KYC_PHONENUMBER_MATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_KYC_AREACODE_MATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_RISKCHECK_STATUS: VDXFKeyInterface; +export declare const IDENTITYDATA_RISKCHECK_USERINTERACTIONS: VDXFKeyInterface; +export declare const IDENTITYDATA_RISKCHECK_FRAUDRINGOK: VDXFKeyInterface; +export declare const IDENTITYDATA_RISKCHECK_BOTNOTDETECTED: VDXFKeyInterface; +export declare const IDENTITYDATA_EMAIL_ISDELIVERABLE: VDXFKeyInterface; +export declare const IDENTITYDATA_EMAIL_BREACHCOUNT: VDXFKeyInterface; +export declare const IDENTITYDATA_EMAIL_FIRSTBREACHEDAT: VDXFKeyInterface; +export declare const IDENTITYDATA_EMAIL_LASTBREACHEDAT: VDXFKeyInterface; +export declare const IDENTITYDATA_EMAIL_DOMAIN_REGISTEREDAT: VDXFKeyInterface; +export declare const IDENTITYDATA_EMAIL_DOMAIN_FREEPROVIDER: VDXFKeyInterface; +export declare const IDENTITYDATA_EMAIL_DOMAIN_CUSTOM: VDXFKeyInterface; +export declare const IDENTITYDATA_EMAIL_DOMAIN_DISPOSABLE: VDXFKeyInterface; +export declare const IDENTITYDATA_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS: VDXFKeyInterface; +export declare const IDENTITYDATA_IDCARD: VDXFKeyInterface; +export declare const IDENTITYDATA_IDCARD_ORIGINAL_FRONT: VDXFKeyInterface; +export declare const IDENTITYDATA_IDCARD_ORIGINAL_BACK: VDXFKeyInterface; +export declare const IDENTITYDATA_IDCARD_CROPPED_FRONT: VDXFKeyInterface; +export declare const IDENTITYDATA_IDCARD_CROPPED_BACK: VDXFKeyInterface; +export declare const IDENTITYDATA_IDCARD_FACE: VDXFKeyInterface; +export declare const IDENTITYDATA_IDCARD_IDNUMBER: VDXFKeyInterface; +export declare const IDENTITYDATA_IDCARD_CATEGORY: VDXFKeyInterface; +export declare const IDENTITYDATA_IDCARD_EXPIRATIONDATE: VDXFKeyInterface; +export declare const IDENTITYDATA_IDCARD_ISSUING_COUNTRY_MATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_IDCARD_ISSUING_REGION: VDXFKeyInterface; +export declare const IDENTITYDATA_IDCARD_DATEOFBIRTH: VDXFKeyInterface; +export declare const IDENTITYDATA_IDCARD_ADDRESS: VDXFKeyInterface; +export declare const IDENTITYDATA_IDCARD_ADDRESS_STREET1: VDXFKeyInterface; +export declare const IDENTITYDATA_IDCARD_ADDRESS_CITY: VDXFKeyInterface; +export declare const IDENTITYDATA_IDCARD_ADDRESS_REGION: VDXFKeyInterface; +export declare const IDENTITYDATA_IDCARD_ADDRESS_POSTCODE: VDXFKeyInterface; +export declare const IDENTITYDATA_IDCARD_ADDRESS_COUNTRY: VDXFKeyInterface; +export declare const IDENTITYDATA_IDCARD_DOCUMENTVERIFICATION_MATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_IDCARD_NAME_MATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_IDCARD_DATEOFBIRTHMATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_PASSPORT: VDXFKeyInterface; +export declare const IDENTITYDATA_PASSPORT_ORIGINAL_FRONT: VDXFKeyInterface; +export declare const IDENTITYDATA_PASSPORT_ORIGINAL_BACK: VDXFKeyInterface; +export declare const IDENTITYDATA_PASSPORT_CROPPED_FRONT: VDXFKeyInterface; +export declare const IDENTITYDATA_PASSPORT_CROPPED_BACK: VDXFKeyInterface; +export declare const IDENTITYDATA_PASSPORT_FACE: VDXFKeyInterface; +export declare const IDENTITYDATA_PASSPORT_IDNUMBER: VDXFKeyInterface; +export declare const IDENTITYDATA_PASSPORT_CATEGORY: VDXFKeyInterface; +export declare const IDENTITYDATA_PASSPORT_EXPIRATIONDATE: VDXFKeyInterface; +export declare const IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_PASSPORT_ISSUING_REGION: VDXFKeyInterface; +export declare const IDENTITYDATA_PASSPORT_DATEOFBIRTH: VDXFKeyInterface; +export declare const IDENTITYDATA_PASSPORT_ADDRESS: VDXFKeyInterface; +export declare const IDENTITYDATA_PASSPORT_ADDRESS_STREET1: VDXFKeyInterface; +export declare const IDENTITYDATA_PASSPORT_ADDRESS_CITY: VDXFKeyInterface; +export declare const IDENTITYDATA_PASSPORT_ADDRESS_REGION: VDXFKeyInterface; +export declare const IDENTITYDATA_PASSPORT_ADDRESS_POSTCODE: VDXFKeyInterface; +export declare const IDENTITYDATA_PASSPORT_ADDRESS_COUNTRY: VDXFKeyInterface; +export declare const IDENTITYDATA_PASSPORT_DOCUMENTVERIFICATION_MATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_PASSPORT_NAME_MATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_PASSPORT_DATEOFBIRTHMATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENCEPERMIT: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_FRONT: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_BACK: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENCEPERMIT_CROPPED_FRONT: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENCEPERMIT_CROPPED_BACK: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENCEPERMIT_FACE: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENCEPERMIT_IDNUMBER: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENCEPERMIT_CATEGORY: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENCEPERMIT_EXPIRATIONDATE: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENCEPERMIT_ISSUING_REGION: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTH: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENCEPERMIT_ADDRESS: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_STREET1: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_CITY: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_REGION: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_POSTCODE: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_COUNTRY: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENCEPERMIT_DOCUMENTVERIFICATION_MATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENCEPERMIT_NAME_MATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTHMATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENTCARD: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENTCARD_ORIGINAL_FRONT: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENTCARD_ORIGINAL_BACK: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENTCARD_CROPPED_FRONT: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENTCARD_CROPPED_BACK: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENTCARD_FACE: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENTCARD_IDNUMBER: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENTCARD_CATEGORY: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENTCARD_EXPIRATIONDATE: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENTCARD_ISSUING_REGION: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENTCARD_DATEOFBIRTH: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENTCARD_ADDRESS: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENTCARD_ADDRESS_STREET1: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENTCARD_ADDRESS_CITY: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENTCARD_ADDRESS_REGION: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENTCARD_ADDRESS_POSTCODE: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENTCARD_ADDRESS_COUNTRY: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENTCARD_DOCUMENTVERIFICATION_MATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENTCARD_NAME_MATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_RESIDENTCARD_DATEOFBIRTHMATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_VISA: VDXFKeyInterface; +export declare const IDENTITYDATA_VISA_ORIGINAL_FRONT: VDXFKeyInterface; +export declare const IDENTITYDATA_VISA_ORIGINAL_BACK: VDXFKeyInterface; +export declare const IDENTITYDATA_VISA_CROPPED_FRONT: VDXFKeyInterface; +export declare const IDENTITYDATA_VISA_CROPPED_BACK: VDXFKeyInterface; +export declare const IDENTITYDATA_VISA_FACE: VDXFKeyInterface; +export declare const IDENTITYDATA_VISA_IDNUMBER: VDXFKeyInterface; +export declare const IDENTITYDATA_VISA_CATEGORY: VDXFKeyInterface; +export declare const IDENTITYDATA_VISA_EXPIRATIONDATE: VDXFKeyInterface; +export declare const IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_VISA_ISSUING_REGION: VDXFKeyInterface; +export declare const IDENTITYDATA_VISA_DATEOFBIRTH: VDXFKeyInterface; +export declare const IDENTITYDATA_VISA_ADDRESS: VDXFKeyInterface; +export declare const IDENTITYDATA_VISA_ADDRESS_STREET1: VDXFKeyInterface; +export declare const IDENTITYDATA_VISA_ADDRESS_CITY: VDXFKeyInterface; +export declare const IDENTITYDATA_VISA_ADDRESS_REGION: VDXFKeyInterface; +export declare const IDENTITYDATA_VISA_ADDRESS_POSTCODE: VDXFKeyInterface; +export declare const IDENTITYDATA_VISA_ADDRESS_COUNTRY: VDXFKeyInterface; +export declare const IDENTITYDATA_VISA_DOCUMENTVERIFICATION_MATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_VISA_NAME_MATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_VISA_DATEOFBIRTHMATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALFRONT: VDXFKeyInterface; +export declare const IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALBACK: VDXFKeyInterface; +export declare const IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDFRONT: VDXFKeyInterface; +export declare const IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDBACK: VDXFKeyInterface; +export declare const IDENTITYDATA_DOCUMENTVERIFICATION_FACE: VDXFKeyInterface; +export declare const IDENTITYDATA_DOCUMENTVERIFICATION_IDNUMBER: VDXFKeyInterface; +export declare const IDENTITYDATA_DOCUMENTVERIFICATION_CATEGORY: VDXFKeyInterface; +export declare const IDENTITYDATA_DOCUMENTVERIFICATION_EXPIRATIONDATE: VDXFKeyInterface; +export declare const IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY: VDXFKeyInterface; +export declare const IDENTITYDATA_DOCUMENTVERIFICATION_ISSUING_REGION: VDXFKeyInterface; +export declare const IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTH: VDXFKeyInterface; +export declare const IDENTITYDATA_DOCUMENTVERIFICATION_ADDRESS: VDXFKeyInterface; +export declare const IDENTITYDATA_ADDRESS_STREET1: VDXFKeyInterface; +export declare const IDENTITYDATA_ADDRESS_STREET2: VDXFKeyInterface; +export declare const IDENTITYDATA_ADDRESS_CITY: VDXFKeyInterface; +export declare const IDENTITYDATA_ADDRESS_REGION: VDXFKeyInterface; +export declare const IDENTITYDATA_ADDRESS_POSTCODE: VDXFKeyInterface; +export declare const IDENTITYDATA_ADDRESS_COUNTRY: VDXFKeyInterface; +export declare const IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED: VDXFKeyInterface; diff --git a/dist/vdxf/identityDataKeys.js b/dist/vdxf/identityDataKeys.js new file mode 100644 index 0000000..60813d7 --- /dev/null +++ b/dist/vdxf/identityDataKeys.js @@ -0,0 +1,2255 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.IDENTITYDATA_DRIVINGLICENCE_STREET1 = exports.IDENTITYDATA_DRIVINGLICENCE_ADDRESS = exports.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH = exports.IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION = exports.IDENTITYDATA_DRIVINGLICENCE_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_DRIVINGLICENCE_EXPIRATIONDATE = exports.IDENTITYDATA_DRIVINGLICENCE_CATEGORY = exports.IDENTITYDATA_DRIVINGLICENCE_IDNUMBER = exports.IDENTITYDATA_DRIVINGLICENCE_FACE = exports.IDENTITYDATA_DRIVINGLICENCE_CROPPED_BACK = exports.IDENTITYDATA_DRIVINGLICENCE_CROPPED_FRONT = exports.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_BACK = exports.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_FRONT = exports.IDENTITYDATA_DRIVINGLICENCE = exports.IDENTITYDATA_APPROVALS_RISKCHECKOK = exports.IDENTITYDATA_APPROVALS_WATCHLIST_OK = exports.IDENTITYDATA_APPROVALS_SELFIECHECKED = exports.IDENTITYDATA_APPROVALS_DOCUMENTSVERIFIED = exports.IDENTITYDATA_APPROVALS_KYCCHECKED = exports.IDENTITYDATA_APPROVALS_VERIFIEDSMS = exports.IDENTITYDATA_APPROVALS_ACCEPTEDTOS = exports.IDENTITYDATA_STATUS = exports.IDENTITYDATA_IDNUMBER_TYPE = exports.IDENTITYDATA_IDNUMBER_VALUE = exports.IDENTITYDATA_HOMEADDRESS_COUNTRY = exports.IDENTITYDATA_HOMEADDRESS_POSTCODE = exports.IDENTITYDATA_HOMEADDRESS_REGION = exports.IDENTITYDATA_HOMEADDRESS_CITY = exports.IDENTITYDATA_HOMEADDRESS_STREET2 = exports.IDENTITYDATA_HOMEADDRESS_STREET1 = exports.IDENTITYDATA_HOMEADDRESS = exports.IDENTITYDATA_LASTNAME = exports.IDENTITYDATA_FIRSTNAME = exports.IDENTITYDATA_EMAIL = exports.IDENTITYDATA_IPADDRESS = exports.IDENTITYDATA_OVER25 = exports.IDENTITYDATA_OVER21 = exports.IDENTITYDATA_OVER18 = exports.IDENTITYDATA_DATEOFBIRTH = exports.IDENTITYDATA_PHONENUMBER = exports.IDENTITYDATA_TEMPLATEVERSION = exports.IDENTITYDATA_TEMPLATEID = exports.IDENTITYDATA_SHAREABLEURL = exports.IDENTITYDATA_PREVIOUSATTEMPTID = exports.IDENTITYDATA_COMPLETEDAT = exports.IDENTITYDATA_CREATEDAT = exports.IDENTITYDATA_USERID = exports.IDENTITYDATA_ID = exports.IDENTITYDATA_IDENTITY = exports.IDENTITYDATA_ATTESTOR = void 0; +exports.IDENTITYDATA_IDCARD_ADDRESS_COUNTRY = exports.IDENTITYDATA_IDCARD_ADDRESS_POSTCODE = exports.IDENTITYDATA_IDCARD_ADDRESS_REGION = exports.IDENTITYDATA_IDCARD_ADDRESS_CITY = exports.IDENTITYDATA_IDCARD_ADDRESS_STREET1 = exports.IDENTITYDATA_IDCARD_ADDRESS = exports.IDENTITYDATA_IDCARD_DATEOFBIRTH = exports.IDENTITYDATA_IDCARD_ISSUING_REGION = exports.IDENTITYDATA_IDCARD_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_IDCARD_EXPIRATIONDATE = exports.IDENTITYDATA_IDCARD_CATEGORY = exports.IDENTITYDATA_IDCARD_IDNUMBER = exports.IDENTITYDATA_IDCARD_FACE = exports.IDENTITYDATA_IDCARD_CROPPED_BACK = exports.IDENTITYDATA_IDCARD_CROPPED_FRONT = exports.IDENTITYDATA_IDCARD_ORIGINAL_BACK = exports.IDENTITYDATA_IDCARD_ORIGINAL_FRONT = exports.IDENTITYDATA_IDCARD = exports.IDENTITYDATA_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS = exports.IDENTITYDATA_EMAIL_DOMAIN_DISPOSABLE = exports.IDENTITYDATA_EMAIL_DOMAIN_CUSTOM = exports.IDENTITYDATA_EMAIL_DOMAIN_FREEPROVIDER = exports.IDENTITYDATA_EMAIL_DOMAIN_REGISTEREDAT = exports.IDENTITYDATA_EMAIL_LASTBREACHEDAT = exports.IDENTITYDATA_EMAIL_FIRSTBREACHEDAT = exports.IDENTITYDATA_EMAIL_BREACHCOUNT = exports.IDENTITYDATA_EMAIL_ISDELIVERABLE = exports.IDENTITYDATA_RISKCHECK_BOTNOTDETECTED = exports.IDENTITYDATA_RISKCHECK_FRAUDRINGOK = exports.IDENTITYDATA_RISKCHECK_USERINTERACTIONS = exports.IDENTITYDATA_RISKCHECK_STATUS = exports.IDENTITYDATA_KYC_AREACODE_MATCHED = exports.IDENTITYDATA_KYC_PHONENUMBER_MATCHED = exports.IDENTITYDATA_KYC_IDNUMBER_MATCHED = exports.IDENTITYDATA_KYC_DATEOFBIRTH_MATCHED = exports.IDENTITYDATA_KYC_NAME_MATCHED = exports.IDENTITYDATA_KYC_TYPE = exports.IDENTITYDATA_KYC_ADDRESS_MATCHED = exports.IDENTITYDATA_KYC_SUCCESS = exports.IDENTITYDATA_SELFIECHECK_DRIVINGLICENCE_MATCH = exports.IDENTITYDATA_SELFIECHECK_VIDEO = exports.IDENTITYDATA_SELFIECHECK_IMAGE = exports.IDENTITYDATA_SELFIECHECK_SUCCESS = exports.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH_MATCHED = exports.IDENTITYDATA_DRIVINGLICENCE_NAME_MATCHED = exports.IDENTITYDATA_DRIVINGLICENCE_MATCHED = exports.IDENTITYDATA_DRIVINGLICENCE_COUNTRY = exports.IDENTITYDATA_DRIVINGLICENCE_POSTCODE = exports.IDENTITYDATA_DRIVINGLICENCE_REGION = exports.IDENTITYDATA_DRIVINGLICENCE_CITY = void 0; +exports.IDENTITYDATA_RESIDENTCARD_CROPPED_BACK = exports.IDENTITYDATA_RESIDENTCARD_CROPPED_FRONT = exports.IDENTITYDATA_RESIDENTCARD_ORIGINAL_BACK = exports.IDENTITYDATA_RESIDENTCARD_ORIGINAL_FRONT = exports.IDENTITYDATA_RESIDENTCARD = exports.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_RESIDENCEPERMIT_NAME_MATCHED = exports.IDENTITYDATA_RESIDENCEPERMIT_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_COUNTRY = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_POSTCODE = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_REGION = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_CITY = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_STREET1 = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS = exports.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTH = exports.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_REGION = exports.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_RESIDENCEPERMIT_EXPIRATIONDATE = exports.IDENTITYDATA_RESIDENCEPERMIT_CATEGORY = exports.IDENTITYDATA_RESIDENCEPERMIT_IDNUMBER = exports.IDENTITYDATA_RESIDENCEPERMIT_FACE = exports.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_BACK = exports.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_FRONT = exports.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_BACK = exports.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_FRONT = exports.IDENTITYDATA_RESIDENCEPERMIT = exports.IDENTITYDATA_PASSPORT_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_PASSPORT_NAME_MATCHED = exports.IDENTITYDATA_PASSPORT_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_PASSPORT_ADDRESS_COUNTRY = exports.IDENTITYDATA_PASSPORT_ADDRESS_POSTCODE = exports.IDENTITYDATA_PASSPORT_ADDRESS_REGION = exports.IDENTITYDATA_PASSPORT_ADDRESS_CITY = exports.IDENTITYDATA_PASSPORT_ADDRESS_STREET1 = exports.IDENTITYDATA_PASSPORT_ADDRESS = exports.IDENTITYDATA_PASSPORT_DATEOFBIRTH = exports.IDENTITYDATA_PASSPORT_ISSUING_REGION = exports.IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_PASSPORT_EXPIRATIONDATE = exports.IDENTITYDATA_PASSPORT_CATEGORY = exports.IDENTITYDATA_PASSPORT_IDNUMBER = exports.IDENTITYDATA_PASSPORT_FACE = exports.IDENTITYDATA_PASSPORT_CROPPED_BACK = exports.IDENTITYDATA_PASSPORT_CROPPED_FRONT = exports.IDENTITYDATA_PASSPORT_ORIGINAL_BACK = exports.IDENTITYDATA_PASSPORT_ORIGINAL_FRONT = exports.IDENTITYDATA_PASSPORT = exports.IDENTITYDATA_IDCARD_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_IDCARD_NAME_MATCHED = exports.IDENTITYDATA_IDCARD_DOCUMENTVERIFICATION_MATCHED = void 0; +exports.IDENTITYDATA_ADDRESS_STREET1 = exports.IDENTITYDATA_DOCUMENTVERIFICATION_ADDRESS = exports.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTH = exports.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUING_REGION = exports.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY = exports.IDENTITYDATA_DOCUMENTVERIFICATION_EXPIRATIONDATE = exports.IDENTITYDATA_DOCUMENTVERIFICATION_CATEGORY = exports.IDENTITYDATA_DOCUMENTVERIFICATION_IDNUMBER = exports.IDENTITYDATA_DOCUMENTVERIFICATION_FACE = exports.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDBACK = exports.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDFRONT = exports.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALBACK = exports.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALFRONT = exports.IDENTITYDATA_VISA_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_VISA_NAME_MATCHED = exports.IDENTITYDATA_VISA_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_VISA_ADDRESS_COUNTRY = exports.IDENTITYDATA_VISA_ADDRESS_POSTCODE = exports.IDENTITYDATA_VISA_ADDRESS_REGION = exports.IDENTITYDATA_VISA_ADDRESS_CITY = exports.IDENTITYDATA_VISA_ADDRESS_STREET1 = exports.IDENTITYDATA_VISA_ADDRESS = exports.IDENTITYDATA_VISA_DATEOFBIRTH = exports.IDENTITYDATA_VISA_ISSUING_REGION = exports.IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_VISA_EXPIRATIONDATE = exports.IDENTITYDATA_VISA_CATEGORY = exports.IDENTITYDATA_VISA_IDNUMBER = exports.IDENTITYDATA_VISA_FACE = exports.IDENTITYDATA_VISA_CROPPED_BACK = exports.IDENTITYDATA_VISA_CROPPED_FRONT = exports.IDENTITYDATA_VISA_ORIGINAL_BACK = exports.IDENTITYDATA_VISA_ORIGINAL_FRONT = exports.IDENTITYDATA_VISA = exports.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_RESIDENTCARD_NAME_MATCHED = exports.IDENTITYDATA_RESIDENTCARD_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_COUNTRY = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_POSTCODE = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_REGION = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_CITY = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_STREET1 = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS = exports.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTH = exports.IDENTITYDATA_RESIDENTCARD_ISSUING_REGION = exports.IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_RESIDENTCARD_EXPIRATIONDATE = exports.IDENTITYDATA_RESIDENTCARD_CATEGORY = exports.IDENTITYDATA_RESIDENTCARD_IDNUMBER = exports.IDENTITYDATA_RESIDENTCARD_FACE = void 0; +exports.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED = exports.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_ADDRESS_COUNTRY = exports.IDENTITYDATA_ADDRESS_POSTCODE = exports.IDENTITYDATA_ADDRESS_REGION = exports.IDENTITYDATA_ADDRESS_CITY = exports.IDENTITYDATA_ADDRESS_STREET2 = void 0; +exports.IDENTITYDATA_ATTESTOR = { + "vdxfid": "iNe8VaRBRFDhb6xjZ7WHNWgfM73428GN8B", + "hash160result": "5e01d5d356d517df57ea0f391c86e11a84663bd2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.attestor" + } +}; +exports.IDENTITYDATA_IDENTITY = { + "vdxfid": "iFa41TpKfvbjaEnP78BNpSA9KYNgED58ms", + "hash160result": "63730181dc037834a7b2b9e7fed49863ca1cad84", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.identity" + } +}; +exports.IDENTITYDATA_ID = { + "vdxfid": "i3uDEe15gH8AN88WjGGwF7gv6jVwJa1Wt5", + "indexid": "x8jKhSSAXbLpzJ1Yaww6DWDT8PWxAzngtM", + "hash160result": "17bc967bf757bc093ba3fc1dd9298abb7235ab04", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.id" + } +}; +exports.IDENTITYDATA_USERID = { + "vdxfid": "iMxzsbP4iptfkxQD4CaYwYNqSRSqw1eqJp", + "indexid": "xSo7LPp9a97LP8HEutEhuvuNU5Trrjc77z", + "hash160result": "b6e3f22d3a87fbdffe53d16e1eab779b16d1d4ca", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.userid" + } +}; +exports.IDENTITYDATA_CREATEDAT = { + "vdxfid": "iNxvB8LET1HNQ2aWqS8RoVj8fcPr1UdcSA", + "indexid": "xTo2dvmKJKW32CTYh7namtFfhGQrrbP3Rv", + "hash160result": "dabed2d7a3d4cacbc482ce046dd1be8b6605c9d5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.createdat" + } +}; +exports.IDENTITYDATA_COMPLETEDAT = { + "vdxfid": "iFtW78dkwZtb4Q9EhBEm4xYMYFxYEvP39D", + "indexid": "xLicZw4qnt7Fga2GYrtv3M4tZuyZ5zz9CJ", + "hash160result": "12903d8d58b28acf0dfefd6598b2ed6394622a88", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.completedat" + } +}; +exports.IDENTITYDATA_PREVIOUSATTEMPTID = { + "vdxfid": "iNVKxjLQJmxyFsPZGufmkb9rh8FoBrcS37", + "indexid": "xTKSRXmVA6Bdt3Gb8bKviygPinGp7XuZqr", + "hash160result": "f2154430bfab9e858dbd05f48e379f77dd3a91d0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.previousattemptid" + } +}; +exports.IDENTITYDATA_SHAREABLEURL = { + "vdxfid": "i9nYbM8arP15YrJYqSLbxgi7iJgYbzPwXR", + "indexid": "xEcf49ZfhhDkB2Bah7zkw5EejxhZYZ83om", + "hash160result": "8a81df9444dcd55bf80dfff5e07b4a1fd0353945", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.shareableurl" + } +}; +exports.IDENTITYDATA_TEMPLATEID = { + "vdxfid": "i5j8xXGKYLBAENLD5CBosWtmB2LnWrxobF", + "indexid": "xAZFRKhQPePprYDEvsqxquRJCgMoTQzGzL", + "hash160result": "aefdfe818fd9323496ad29101b9b40e3d0bab318", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.templateid" + } +}; +exports.IDENTITYDATA_TEMPLATEVERSION = { + "vdxfid": "iQTADnLBxVAxxxAidEUgK8DVeuaaY7w78n", + "indexid": "xVHGgamGooPdb83kUv8qHWk2gZbbW3CZYi", + "hash160result": "1b1a410a4258fe91ee0e40904538d649c58418e6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.templateversion" + } +}; +exports.IDENTITYDATA_PHONENUMBER = { + "vdxfid": "i9ZQ5degEh3wQg5vNm8Tod88bcJBrLs5p3", + "indexid": "xEPWYS5m61Gc2qxxESncn1efdGKChdypms", + "hash160result": "c58e0231ddcd85747709016800cc6e796cb2bc42", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.phonenumber" + } +}; +exports.IDENTITYDATA_DATEOFBIRTH = { + "vdxfid": "iPzSt64gwsqmxcz3Ht7zhMngLC6no6S74K", + "indexid": "xUpZLtVmoC4Sans59Zn9fkKDMr7oe7NpkD", + "hash160result": "057c9866c848002e1fac1c419a300369f2310be1", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.dateofbirth" + } +}; +exports.IDENTITYDATA_OVER18 = { + "vdxfid": "iF8QUrVj4LCSKdF5KFG6axidrUg8RiV65A", + "indexid": "xKxWwevoueR6wo87AvvFZMFAt8h9EHjvu5", + "hash160result": "70a65a9b459169a05b34f101ff0631cf0763d37f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.over18" + } +}; +exports.IDENTITYDATA_OVER21 = { + "vdxfid": "i6E3RQUUX3jt8CkizuLX6ihZHTegCmmbj4", + "indexid": "xB49tCuZNMxYkNdkrazg57E6K7fh65oniA", + "hash160result": "6238fac23c82ebadd8f79306558cb8ddc62b2b1e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.over21" + } +}; +exports.IDENTITYDATA_OVER25 = { + "vdxfid": "iHqnuVSGJAjF4SXqurNB2h3sY7q5raxhDr", + "indexid": "xNfuNHsM9UwugcQsmY2L15aQZmr6n3MA8x", + "hash160result": "88c15026283fb46b5a6b3de4f4b5a33a7f69979d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.over25" + } +}; +exports.IDENTITYDATA_IPADDRESS = { + "vdxfid": "i6HsaWESEEpa1RGPeuksdCQWZ8Svvq7w4e", + "indexid": "xB7z3JfX5Z3Edb9RWbR2baw3anTwtiKSmr", + "hash160result": "4fceb989885b50eb19d713f76fe53b62449ee41e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.ipaddress" + } +}; +exports.IDENTITYDATA_EMAIL = { + "vdxfid": "i8nmFBXnQNFK6HmNM1XHr6xLECPEry44Xr", + "indexid": "xDcshyxsFgTyiTeQChBSpVUsFrQFg1ph6J", + "hash160result": "31b2f16b20e9fdc1e11f37d07ba97f5463a54b3a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.email" + } +}; +exports.IDENTITYDATA_FIRSTNAME = { + "vdxfid": "i4GqsotHGa4czCdtg2d8FVHKfJFzVyBPrM", + "indexid": "x96xLcKN7tHHcNWvXiHHDsorgxH1REYzrR", + "hash160result": "31e7d78d45dd436cd977ac0f9ed03094bd87c208", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.firstname" + } +}; +exports.IDENTITYDATA_LASTNAME = { + "vdxfid": "iHybTrNB1kXRrjsCtJXd6fvBKxepqMpS5Z", + "indexid": "xNohveoFs4k6UukEjzBn54SiMcfqhV66Vg", + "hash160result": "3c3fb99f2b33f5c20c890f36fa8cc1ff3d30119f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.lastname" + } +}; +exports.IDENTITYDATA_HOMEADDRESS = { + "vdxfid": "i6AtrvvqMkzVPQqtEmzn1EbjkzF3CbaM9L", + "indexid": "xB11KjMvD5DA1aiv6Tevyd8GneG45Q5BLp", + "hash160result": "f83d7549817e9eda543bf587689c06e814c7921d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.homeaddress" + } +}; +exports.IDENTITYDATA_HOMEADDRESS_STREET1 = { + "vdxfid": "iL29rGaWXcww4fwe8Us1kg7Y16XUDgaWFC", + "indexid": "xQrGK51bNwAbgqpfzAXAj4e52kYV4o2k7S", + "hash160result": "b898ec5f2c3633b099b4f8332b987d938c4e7db5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.homeaddress" + }, + "bounddata": { + "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + } +}; +exports.IDENTITYDATA_HOMEADDRESS_STREET2 = { + "vdxfid": "iPfVvVxRkpE8WXKAeCYGTxsdpLa1Eh1KzD", + "indexid": "xUVcPJPWc8So8hCCVtCRSMQAqzb25YSnPA", + "hash160result": "8c2235594883052b88799461f306c084b0d475dd", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.homeaddress" + }, + "bounddata": { + "vdxfkey": "i3h8D5kGtn6DCVCwPFvbypbFCqfzAhXiD2" + } +}; +exports.IDENTITYDATA_HOMEADDRESS_CITY = { + "vdxfid": "iFRUFNWPsrDNNLfCWhAqFoUamhwryjx27c", + "indexid": "xLFaiAwUjAS2zWYENNpzEC17oMxspXLHnY", + "hash160result": "ea4cad23a3b421b827747769be86b29d699a0d83", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.homeaddress" + }, + "bounddata": { + "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + } +}; +exports.IDENTITYDATA_HOMEADDRESS_REGION = { + "vdxfid": "iRmhi8Z6STjtt4nE1MWJCgYGrKBGT1dWaB", + "indexid": "xWbpAvzBHmxZWEfFs3ATB54osyCHLkZ74h", + "hash160result": "b94c5f0aba29341980e1711c4e6f4ac6cf6a92f4", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.homeaddress" + }, + "bounddata": { + "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" + } +}; +exports.IDENTITYDATA_HOMEADDRESS_POSTCODE = { + "vdxfid": "i8XMZQ3NGhEvtRA9e68tShsRgABHdrJYkV", + "indexid": "xDMU2CUT81TbWb3BVmo3R6PxhpCJZUQwNj", + "hash160result": "a94d72335f27128bf57a31ac38c6e0e374a26137", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.homeaddress" + }, + "bounddata": { + "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" + } +}; +exports.IDENTITYDATA_HOMEADDRESS_COUNTRY = { + "vdxfid": "iAaJZj9yTRxT1WrYu42YWCeTAuCkeWJnip", + "indexid": "xFQR2Xb4JkB7dgjakjghUbAzCZDmbcGPTX", + "hash160result": "15f33d581893957024d128d7fa060ec86fa2e04d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.homeaddress" + }, + "bounddata": { + "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" + } +}; +exports.IDENTITYDATA_IDNUMBER_VALUE = { + "vdxfid": "i79FRsacpZYQ9yVFYUK5x6eeUeS1EGNprE", + "indexid": "xByMtg1hfsm4n9NHQ9yEvVBBWJT24wRXnq", + "hash160result": "e9b3c40de3185cb462bf8c76f75ba10da53d3b28", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idnumber.value" + } +}; +exports.IDENTITYDATA_IDNUMBER_TYPE = { + "vdxfid": "iHmUB12ZvCagSnp8RYifzEiVzu6q4EXSx6", + "indexid": "xNbadoTemWoM4xhAHENpxdF32Z7r2EHU4B", + "hash160result": "db12844ffbf6244f5506938229916f986f1cc69c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idnumber.type" + } +}; +exports.IDENTITYDATA_STATUS = { + "vdxfid": "iGDz9GLxDULfhzPJs2hU7MuHoyEzHUr1oA", + "indexid": "xM46c4n34nZLLAGLiiMd5kRpqdG17kNgXH", + "hash160result": "424d072b54b489c27a36a8a10ce7d0b738b1d98b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.status" + } +}; +exports.IDENTITYDATA_APPROVALS_ACCEPTEDTOS = { + "vdxfid": "iAaWyLM18QHXa4WFSoYXNrbWP4DG3fGUqu", + "indexid": "xFQdS8n5yiWCCEPHJVCgMF83QiEGuAX7Lu", + "hash160result": "7c0f3d2f6ec35b7702f6e3b394a06877cafdea4d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.approvals.acceptedtos" + } +}; +exports.IDENTITYDATA_APPROVALS_VERIFIEDSMS = { + "vdxfid": "iCjR6fQST9YLLn72B96aHgSjF54v6UXqSf", + "indexid": "xHZXZTqXJTkzxwz42pkjG4yGGj5vvcnSQq", + "hash160result": "26bf160fb405c0fad15a9b5c2f602dbd61158a65", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.approvals.verifiedsms" + } +}; +exports.IDENTITYDATA_APPROVALS_KYCCHECKED = { + "vdxfid": "iH9AxMi9qB1RFkZ3HQW11c2xcntwQ21j3M", + "indexid": "xMyHRA9EgVE5svS596A9yzZVeSuxBAkxdv", + "hash160result": "22d9177c4b16c2316d85f84a1594903f7bc3e895", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.approvals.kycchecked" + } +}; +exports.IDENTITYDATA_APPROVALS_DOCUMENTSVERIFIED = { + "vdxfid": "iAC86tdUvqwcSwUowKZGG4WPxTzNSwuHCo", + "indexid": "xF2EZh4ZnAAH57Mqo1DRET2vz81PNz5i7r", + "hash160result": "c183cce3b8a5360b52a6237a15c43f96e1bfae49", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.approvals.documentsverified" + } +}; +exports.IDENTITYDATA_APPROVALS_SELFIECHECKED = { + "vdxfid": "iFYWGcgSm4jGnDTfNnuk9TzcQmkWAdxpwe", + "indexid": "xLNcjR7XcNwwQPLhEUZu7rX9SRmX1dHrha", + "hash160result": "28e13d3434ffeb8045e813da5df34b06cc336284", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.approvals.selfiechecked" + } +}; +exports.IDENTITYDATA_APPROVALS_WATCHLIST_OK = { + "vdxfid": "iFtRaMKJGyaqgpiH4ZXeGZMMR47C1u34Jt", + "indexid": "xLiY39kP8HoWJzbJvFBoEwstSi8CsZK8Jz", + "hash160result": "d29c35a645ac1c92fa0506482c37370c609a2688", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.approvals.watchlist.ok" + } +}; +exports.IDENTITYDATA_APPROVALS_RISKCHECKOK = { + "vdxfid": "i4pkwqbNCZj3ZrukRooKDAidLJ2SJt57Tf", + "indexid": "x9esQe2T3swiC2nnHVTUBZFAMx3TBR2Ew1", + "hash160result": "4650258cd77d7928a47ee880075592d8a7b9cb0e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.approvals.riskcheckok" + } +}; +exports.IDENTITYDATA_DRIVINGLICENCE = { + "vdxfid": "iQe74mwXJTFv1Bg8MRg7zqBMFUsD6jhTxz", + "indexid": "xVUDXaNc9mUadMZAD7LGyDhtH8tDzeHFrT", + "hash160result": "72eaff870cdd9c650afcfed1e379330fd7752ae8", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + } +}; +exports.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_FRONT = { + "vdxfid": "iSBvWubN2yGHsdj6dGL3vMDjZMU6XSWxyG", + "indexid": "xX22yi2StHUxVoc8UwzCtjkGb1V7R95hsy", + "hash160result": "2720c73719ffc070c103fa30689283fc331727f9", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iBrpt78Mdrqcc1RHwPWKYBALbNTC4cwdJQ" + } +}; +exports.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_BACK = { + "vdxfid": "iH81F6cj2Kjf2JzRxXAnc9oMQdGQqdQMzD", + "indexid": "xMx7hu3osdxKeUsTpCpwaYKtSHHRowL8Sr", + "hash160result": "e146bb291bd348f94e84910e13c00310b13db095", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iNRCZp7JBDHbpKQ2Vhc6TK97hUSRPG4jaX" + } +}; +exports.IDENTITYDATA_DRIVINGLICENCE_CROPPED_FRONT = { + "vdxfid": "i87ecHwJRUhAA2WaW9FtVotnEWx3BAt7Y8", + "indexid": "xCwm56NPGnupnCPcMpv3UCRKGAy43NWsQw", + "hash160result": "78d9f3f3ccdbf650adb03eb0482273cf51e2e532", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iK822dFQwW2Y5tdpSpxQtHQemf47HoFxqs" + } +}; +exports.IDENTITYDATA_DRIVINGLICENCE_CROPPED_BACK = { + "vdxfid": "iAPcY54xD3v1WC7zQatbbQnqJe4A6KUaex", + "indexid": "xFDizsW34N8g8N12GGYkZoKNLJ5AzeGTf7", + "hash160result": "b45cb25e26d152c9221f9719d696c18d8c0fdb4b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iCvxKVHbnbwHGZDTaGofeyyJLjsGBSZr7A" + } +}; +exports.IDENTITYDATA_DRIVINGLICENCE_FACE = { + "vdxfid": "i9fwBhdsQduiAWhG99wxXwnCRmRXJrbcG4", + "indexid": "xEW3eW4xFx8NngaHzqc7WLJjTRSYDHiUc7", + "hash160result": "834ec04a48c045a0814985a32f02d3125728f943", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iPrxPJC6NbzWnkNyLSvwa8AVrwJWBUV9mM" + } +}; +exports.IDENTITYDATA_DRIVINGLICENCE_IDNUMBER = { + "vdxfid": "i5JGvSuGVEb9xgNb9ezTTJ8zucrp75Ac98", + "indexid": "xA8PPFLMLYoparFd1LecRgfXwGsq32EUV4", + "hash160result": "26fae70b9b3ea6cb14ca10c9620dc04899faff13", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iJdUp47SVEzGEHCvoRyix2xufRsAeWSyxa" + } +}; +exports.IDENTITYDATA_DRIVINGLICENCE_CATEGORY = { + "vdxfid": "i5xXPRL3h45Zf2jErvDwD18DeDzGFRaACg", + "indexid": "xAndrDm8YNJEHCcGibt6BPekft1H9NjSHE", + "hash160result": "5d77333ae97ba2324126925bc54e06513adc3b1b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "i9MqRfXPAiYwv9q4iSjTtXquNCCZ1GgECn" + } +}; +exports.IDENTITYDATA_DRIVINGLICENCE_EXPIRATIONDATE = { + "vdxfid": "iPUSmAtyyTsYNiDppDK8c4rkUjXyiDTm5D", + "indexid": "xUJZDyL4pn6Czt6rftyHaTPHWPYzXZS1No", + "hash160result": "6e6e96148a0314aaeecdfaed9a474150e09d5edb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iNgDKviLAeeV65eBztuduckUMDE2erB7jj" + } +}; +exports.IDENTITYDATA_DRIVINGLICENCE_ISSUING_COUNTRY_MATCHED = { + "vdxfid": "iGvEHvVEiQJzUQXacJsPAt5oE5ufWpA5rB", + "indexid": "xMkLkivKZiXf6aQcTzXY9GcLFjvgMyaUmx", + "hash160result": "e4fb439a302b423d65dbccee97fdbd6757247693", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iFgXmTd9Wi2sqZyPqaoejdHG2sMaJWLrEX" + } +}; +exports.IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION = { + "vdxfid": "iJL72hPk4rFyEmBfdsHJGBUyKMJRrqcR9t", + "indexid": "xPADVVppvAUdrw4hVYwTEa1WM1KSjZsjUc", + "hash160result": "76a99a38988e107e418f24f32d1080f93930f2a2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL" + } +}; +exports.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH = { + "vdxfid": "iC88nTf9EzCKt2CnkudSRcu7yxNiA16c9G", + "indexid": "xGxFFG6E6JQzWC5pcbHbQ1Rf1cPj1kEyFH", + "hash160result": "f55e5a3f98219f06eb0b4b31a935ff1721e8dd5e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iQhjETQvSkadciDPy69QZNy3hSczWQ4iu4" + } +}; +exports.IDENTITYDATA_DRIVINGLICENCE_ADDRESS = { + "vdxfid": "iK8RX6S9uzcnUoVPeLigNt4Cu156zEpodu", + "indexid": "xPxXytsEmJqT6yNRW2NqMGajvf67xnbJFY", + "hash160result": "7fcee36de098accefe0f473da0b06914c9c1b4ab", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iGebr2v1TgkWvsyLjs1dQ5SqffqKL8rNm3" + } +}; +exports.IDENTITYDATA_DRIVINGLICENCE_STREET1 = { + "vdxfid": "iGNX6JaTu92GhPNBpbQkZ9Koro2W35GLjm", + "indexid": "xMCdZ71YkTEwKZFDgH4uXXrLtT3WwU1hvB", + "hash160result": "3e225a69f52b9bab5fee67ed7ed5d6c7d6da768d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + } +}; +exports.IDENTITYDATA_DRIVINGLICENCE_CITY = { + "vdxfid": "i7eLwQmDNfc64xc4Qm7AnSsaa1BwCdhTSK", + "indexid": "xCUTQDCJDypkh8V6GSmKkqQ7bfCx41No4i", + "hash160result": "d69209a7ac10320134b836872b7cd7ad10e7bb2d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + } +}; +exports.IDENTITYDATA_DRIVINGLICENCE_REGION = { + "vdxfid": "iKtdJHgdvUJ4vxSxr86cNcaj8Zq4KCZJJh", + "indexid": "xQijm67imnWjZ8KzhokmM17GADr5GSTj4A", + "hash160result": "f88b44fa9b07a70cd77a9831e89e80505fe410b4", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" + } +}; +exports.IDENTITYDATA_DRIVINGLICENCE_POSTCODE = { + "vdxfid": "i3oy6rsBBWtJ11ZNHvyFPHERK9BGQtQod1", + "indexid": "x8e5ZfJG2q6xdBSQ9cdQMfkxLoCHEubx1i", + "hash160result": "9d7bfbe011ca5889ed8e47a1b2a0320c9654ad03", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" + } +}; +exports.IDENTITYDATA_DRIVINGLICENCE_COUNTRY = { + "vdxfid": "iMZemCqP6BFZzxTA9AG34ghv4HaiFiS6E6", + "indexid": "xSPmE1GTwVUEd8LBzqvC35ET5wbj7m7HY8", + "hash160result": "546fdf34874119f799b1f8b0014a6cd467766ac6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" + } +}; +exports.IDENTITYDATA_DRIVINGLICENCE_MATCHED = { + "vdxfid": "i5bAVLDcVEzbs6Awo2REXhHTjx34u9bEGC", + "indexid": "xARGx8ehLZDGVG3yei5PW5ozmc45h9ZyZa", + "hash160result": "d85c4cc4be13249bec299fde232bbcf323ae3117", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk" + } +}; +exports.IDENTITYDATA_DRIVINGLICENCE_NAME_MATCHED = { + "vdxfid": "i97PqFTkPLKX4R22g27qk7TFdYbLk55fVf", + "indexid": "xDwWJ3tqEeYBgau4XhmziVynfCcMdnsQJP", + "hash160result": "f64f980f5bcde38d71bf6dfdde151c4ecaacd13d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iKCFQYZudPChh6jypSpcgENoQb5WeX5wHv" + } +}; +exports.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH_MATCHED = { + "vdxfid": "iCkJW6AjbtNLTjf4boPPHXpiujRZa9KSeP", + "indexid": "xHaQxtbpTCb15uY6TV3YFvMFwPSaWD2Xv2", + "hash160result": "3261fc33de15f3cedc3a4a4f8c3638144cfeb465", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.drivinglicence" + }, + "bounddata": { + "vdxfkey": "iMUfUShqVwWrGSx6HvZcDJwHywiLW5Zusb" + } +}; +exports.IDENTITYDATA_SELFIECHECK_SUCCESS = { + "vdxfid": "i6cbKQVGd1upW3uCQAhvUf7PzFgcoFyH3S", + "indexid": "xBShnCvMUL8V8DnEFrN5T3dw1uhdgNupLp", + "hash160result": "c0b5f21d131d3a18be6c3a1b5442197cb4f26e22", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.selfiecheck.success" + } +}; +exports.IDENTITYDATA_SELFIECHECK_IMAGE = { + "vdxfid": "i9oYuguYwqLhXN1y4afj6vYjaWmzuWtuZU", + "indexid": "xEdfNVLdo9ZN9XtzvGKt5K5GcAo1jKrFH7", + "hash160result": "dacb095d88ab704ac181d701a7fcdf20e0e36945", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.selfiecheck.image" + } +}; +exports.IDENTITYDATA_SELFIECHECK_VIDEO = { + "vdxfid": "iGQGK7d1Wdfq9ERxmNXD5fjH7v5SUHxZ9K", + "indexid": "xMENmv46MwtVmQJzd4BN44Fp9a6TKf2CyG", + "hash160result": "5a4b0ee7c8e2f91d641d3e18b35343ee8a59cb8d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.selfiecheck.video" + } +}; +exports.IDENTITYDATA_SELFIECHECK_DRIVINGLICENCE_MATCH = { + "vdxfid": "iLGaXTpb8baibivmJL2yVvX259ir3tewjx", + "indexid": "xR6gzGFfyuoPDtooA1h8UK3Z6ojrxc8Jyf", + "hash160result": "19b7f38204fa54f56f62b7b67275ff4c84ba37b8", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.selfiecheck.drivinglicence.match" + } +}; +exports.IDENTITYDATA_KYC_SUCCESS = { + "vdxfid": "iJbbE37yKagBMCvoYPMnkKd3P6eTTGv1Qd", + "indexid": "xPRhgqZ4AttqyNoqQ51wii9aQkfUKWhnpJ", + "hash160result": "1a1bebe6bade7b23cb555a5d1c65f5d2d8f6dfa5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.kyc.success" + } +}; +exports.IDENTITYDATA_KYC_ADDRESS_MATCHED = { + "vdxfid": "iP8T2Li3giM7MCJRMw65tajQ2ydx4kW7m6", + "indexid": "xTxZV998Y2ZmyNBTDckEryFw4dexvb7HLT", + "hash160result": "0f7b56de7b92854cffb85f278ca8f7b70a8496d7", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.kyc.address.matched" + } +}; +exports.IDENTITYDATA_KYC_TYPE = { + "vdxfid": "iN4C7XtyceBJrNcqAs3dZ3T2DA4vycpUYM", + "indexid": "xStJaLL4TxPyUYVs2YhnXRyZEp5wrpthtP", + "hash160result": "79da13c496750b37d4804e85094e5d0b8f47d0cb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.kyc.type" + } +}; +exports.IDENTITYDATA_KYC_NAME_MATCHED = { + "vdxfid": "i69dDR9m6JB8bYvT1PbfsVEKiWPZYNgD1E", + "indexid": "xAyjgDaqwcPoDioUs5FpqskrkAQaRi64Pv", + "hash160result": "bf852464c1379ab65e5bb2646bbbb19ee84c551d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.kyc.name.matched" + } +}; +exports.IDENTITYDATA_KYC_DATEOFBIRTH_MATCHED = { + "vdxfid": "iHfdYydzo83X6Y6y66N4n8UvcFTLQSmj9Y", + "indexid": "xNVk1n55eSGBihyzwn2DkX1TduUMHqN49h", + "hash160result": "f26bc9aa3851d21c679d521f60722045c571ab9b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.kyc.dateofbirth.matched" + } +}; +exports.IDENTITYDATA_KYC_IDNUMBER_MATCHED = { + "vdxfid": "iJQ5KQrVCkHAKRfmBRa6TuMxW8ZfHKuiMS", + "indexid": "xPEBnDHa44VpwbYo37EFSHtVXnag7ePNwv", + "hash160result": "94abb5b38f44545c981134f44db4d6395c6cb2a3", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.kyc.idnumber.matched" + } +}; +exports.IDENTITYDATA_KYC_PHONENUMBER_MATCHED = { + "vdxfid": "iBFp1jupLByoSLJaZWz2gg3v2GipUFoADv", + "indexid": "xG5vUYLuBWCU4WBcRCeBf4aT3vjqNDUWJY", + "hash160result": "7c59b8b820c001d0b361ca67a99c45677c705955", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.kyc.phonenumber.matched" + } +}; +exports.IDENTITYDATA_KYC_AREACODE_MATCHED = { + "vdxfid": "i7GX7K3sGs227Vf4NEJe3QKxruuUyqFFzp", + "indexid": "xC6da7Ux8BEgjfY6Duxo1nrVtZvVsySF4F", + "hash160result": "4ae70956a849099e8fd2bf0a9b5daa8fd43d9b29", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.kyc.areacode.matched" + } +}; +exports.IDENTITYDATA_RISKCHECK_STATUS = { + "vdxfid": "i3b3wvsNm5JaMUoV21Y7maVx85BJ2B8xTF", + "indexid": "x8RAQjJTcPXEyegWshCGjy2V9jCJtGhaAq", + "hash160result": "1de1fb500f5c4594a322e249949bc289d9f73b01", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.riskcheck.status" + } +}; +exports.IDENTITYDATA_RISKCHECK_USERINTERACTIONS = { + "vdxfid": "iEGi5rmUzAmnfutUCPp2dS34rSEk1DrevE", + "indexid": "xK6pYfCZqUzTJ5mW45UBbpZbt6FkuN8K7e", + "hash160result": "b0fef6f09eb8a36672e8b15313574b298f486d76", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.riskcheck.userinteractions" + } +}; +exports.IDENTITYDATA_RISKCHECK_FRAUDRINGOK = { + "vdxfid": "i8MQDH1wrdWCf5rTRznhC5ijRy188i1kYU", + "indexid": "xDBWg5T2hwisHFjVHgSrAUFGTd291gaveW", + "hash160result": "7754803c155ad687f4376285828dcda68db07f35", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.riskcheck.fraudringok" + } +}; +exports.IDENTITYDATA_RISKCHECK_BOTNOTDETECTED = { + "vdxfid": "iSLcYw9ZcKnYJJTYvJYfk3jo3rjFHHPV7h", + "indexid": "xXAj1jaeTe1CvULamzCpiSGL5WkG8ZjCka", + "hash160result": "48835abfcd59557f6325f32773bbaf667bd6cbfa", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.riskcheck.botnotdetected" + } +}; +exports.IDENTITYDATA_EMAIL_ISDELIVERABLE = { + "vdxfid": "i8P6w5ypyh7byWTYAdTY3vHezomSBSznWB", + "indexid": "xDDDPtQuq1LGbgLa2K7h2JpC2TnT48N3FF", + "hash160result": "6b6d001cedc2852156e286c8d63ce4bf0119d235", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.email.isdeliverable" + } +}; +exports.IDENTITYDATA_EMAIL_BREACHCOUNT = { + "vdxfid": "iBhchzsBh8zKXhCAquQ5mWPdFAM6mkGvix", + "indexid": "xGXjAoJGYTCz9s5Chb4EjtvAGpN7gnJjc6", + "hash160result": "ea91d5cb1ff8532c4e9c847228859e4014d13a5a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.email.breachcount" + } +}; +exports.IDENTITYDATA_EMAIL_FIRSTBREACHEDAT = { + "vdxfid": "iKwvVd8mHF7phMqPJVQ32bHpYT7hFG14D8", + "indexid": "xQn2xRZr8ZLVKXiRAB4BzypMa78i5iPxyd", + "hash160result": "597919a7c88a513db2c9223f6948ca4f767eb0b4", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.email.firstbreachedat" + } +}; +exports.IDENTITYDATA_EMAIL_LASTBREACHEDAT = { + "vdxfid": "iNUujoAd6CCR9X4kBQZaV6o9mt3MDqsfHs", + "indexid": "xTK2CbbhwWR5mgwn36DjTVKgoY4N7JGP5y", + "hash160result": "ebbc28818ea68e09defb0b67c0a5882e75027dd0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.email.lastbreachedat" + } +}; +exports.IDENTITYDATA_EMAIL_DOMAIN_REGISTEREDAT = { + "vdxfid": "i8jTA9VrLRrAmTNwCnQJg93ivmVN5GWcVX", + "indexid": "xDZZcwvwBk4qPdFy4U4TeXaFxRWNxA1Bqd", + "hash160result": "d8d1e9bd02ff4c40c805099613567531d04cab39", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.email.domain.registeredat" + } +}; +exports.IDENTITYDATA_EMAIL_DOMAIN_FREEPROVIDER = { + "vdxfid": "i8XPHcH1caNn6kQVxFERZG33ATxHfawrSB", + "indexid": "xDMVkQi6TtbSivHXovtaXeZaC7yJSskirY", + "hash160result": "a2c3c98d38df08384ed3d863895fd6c1ad136337", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.email.domain.freeprovider" + } +}; +exports.IDENTITYDATA_EMAIL_DOMAIN_CUSTOM = { + "vdxfid": "iE7HSAqMXwxtM6XxUDRLMBUUcWniEh9hRk", + "indexid": "xJwPtyGSPGBYyGQzKu5VKa11eAojBypGax", + "hash160result": "48b3f1d4988af1dd73b8ccf1e5b547a891f6a474", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.email.domain.custom" + } +}; +exports.IDENTITYDATA_EMAIL_DOMAIN_DISPOSABLE = { + "vdxfid": "iBteZWnaYtBLRxQyNutN7eatZZ4ZpCAoin", + "indexid": "xGim2KDfQCQ148J1EbYX637RbD5aehG6fm", + "hash160result": "8bb328cc7630490b07742507e6cdb77290f0505c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.email.domain.disposable" + } +}; +exports.IDENTITYDATA_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS = { + "vdxfid": "iHbaMpJAjVPgroTQYm6xwTqmVUnv4qh5mw", + "indexid": "xNRgpcjFaocMUyLSQSm7urNJX8ovwS8zbS", + "hash160result": "c95978851fbb34305351b4c465d7bdf59b1de79a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.email.domain.toplevel.suspicious" + } +}; +exports.IDENTITYDATA_IDCARD = { + "vdxfid": "iJLpqieejHL8YncTbnhAW7cUTaMsfHdSGL", + "indexid": "xPAwJX5jabYoAxVVTUMKUW91VENtUTZwau", + "hash160result": "49b9d595086e85ce8fd4159995bbe350181715a3", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + } +}; +exports.IDENTITYDATA_IDCARD_ORIGINAL_FRONT = { + "vdxfid": "iB7XpaW684q2BYjnqveLSKhSG9zwudnS6o", + "indexid": "xFweHNwAyP3goicphcJVQiDyHp1xo2uuYa", + "hash160result": "29f714a5b08b68b9046525c6c005a00a4d98c853", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iBrpt78Mdrqcc1RHwPWKYBALbNTC4cwdJQ" + } +}; +exports.IDENTITYDATA_IDCARD_ORIGINAL_BACK = { + "vdxfid": "iH9K2ZhRcyJWbByyUyWsXh544SVhUSrVFt", + "indexid": "xMyRVN8WUHXBDMs1LfB2W5bb66WiNi4FtU", + "hash160result": "24585446879161aed3198273e81ea9a69080ef95", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iNRCZp7JBDHbpKQ2Vhc6TK97hUSRPG4jaX" + } +}; +exports.IDENTITYDATA_IDCARD_CROPPED_FRONT = { + "vdxfid": "iR8r1t4mYfk8xqZmaNDra6TQrUsZjbGiKS", + "indexid": "xVxxUgVrPyxob1SoS3t1YUywt8tahdr3L4", + "hash160result": "2bc1abbdc2c25032842bc2354e857939cef599ed", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iK822dFQwW2Y5tdpSpxQtHQemf47HoFxqs" + } +}; +exports.IDENTITYDATA_IDCARD_CROPPED_BACK = { + "vdxfid": "iSM5GLZ1FvzGDNX62vgUgRQC43iaeKxoHK", + "indexid": "xXBBj8z67FCvqYQ7tcLdeovj5hjbbVdh5q", + "hash160result": "56fb7c2a25fc9646e588273ad379ad202e23e2fa", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iCvxKVHbnbwHGZDTaGofeyyJLjsGBSZr7A" + } +}; +exports.IDENTITYDATA_IDCARD_FACE = { + "vdxfid": "i51M1ZmuPqEZDcC5KJbz6F9XYVacoyBE2X", + "indexid": "x9qTUNCzF9TDqn57AzG94dg4a9bdgabnve", + "hash160result": "77d6aa5baa62d04f8cb7d8fe899bcdebfb51cc10", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iPrxPJC6NbzWnkNyLSvwa8AVrwJWBUV9mM" + } +}; +exports.IDENTITYDATA_IDCARD_IDNUMBER = { + "vdxfid": "i5bnW5iRQbCtg21NLNybykc6ArhxUwSnVh", + "indexid": "xARtxt9WFuRZJBtQC4dkx98dCWiyQpWVav", + "hash160result": "d525af458c62617e95f5fa1b70b6e36e08be4f17", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iJdUp47SVEzGEHCvoRyix2xufRsAeWSyxa" + } +}; +exports.IDENTITYDATA_IDCARD_CATEGORY = { + "vdxfid": "iESZ7w2LiZbcxEEWaD4BgVr4VKYkMn1dqk", + "indexid": "xKGfajTRZspHaQ7YRtiLetNbWyZmEdZbq1", + "hash160result": "36204ef98b988fa4ddad9a94d09bae40c7f54978", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "i9MqRfXPAiYwv9q4iSjTtXquNCCZ1GgECn" + } +}; +exports.IDENTITYDATA_IDCARD_EXPIRATIONDATE = { + "vdxfid": "i8BCBwaioR3PSSgjRcWGx9RfFUCbVXNYxe", + "indexid": "xD1Jek1oejG44cZmHJARvXxCH8DcSWVK4B", + "hash160result": "e2187beb59c4815c0b4926bfa14e5d48657e9133", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iNgDKviLAeeV65eBztuduckUMDE2erB7jj" + } +}; +exports.IDENTITYDATA_IDCARD_ISSUING_COUNTRY_MATCHED = { + "vdxfid": "i6ubxHFxwzxQU1zmBvLW1oYj6iozy3znSU", + "indexid": "xBjiR5h3oKB56Bso3bzezC5G8Nq1rhjRiV", + "hash160result": "96eb5b9e8921784e76c96e272b20f009d68ca625", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iFgXmTd9Wi2sqZyPqaoejdHG2sMaJWLrEX" + } +}; +exports.IDENTITYDATA_IDCARD_ISSUING_REGION = { + "vdxfid": "i4AFd1rzyfsmgTLgyn472E3gc2VBaw4uFK", + "indexid": "x8zN5pJ5pz6SJdDiqTiFzcaDdgWCSVW9s9", + "hash160result": "5d8fc30a870e94f5274d09d6c16e5d8795708307", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL" + } +}; +exports.IDENTITYDATA_IDCARD_DATEOFBIRTH = { + "vdxfid": "i48Nsi8VjHvSdW9MCB59vVF8AeoCSALbW6", + "indexid": "x8xVLWZaac97Fg2P3rjJtsmfCJpDMvuw4c", + "hash160result": "99acfcbf72a37bcfa3ccf9f3d8a60f60a3a92807", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iQhjETQvSkadciDPy69QZNy3hSczWQ4iu4" + } +}; +exports.IDENTITYDATA_IDCARD_ADDRESS = { + "vdxfid": "iHQjj4N8axeE24n8RctE8cQtSUdSoTFBMv", + "indexid": "xNErBroDSGrteEfAHJYP6zwRU8eTdJWVVZ", + "hash160result": "744a4f4b004c403c1d671053d717a36ecf5bda98", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iGebr2v1TgkWvsyLjs1dQ5SqffqKL8rNm3" + } +}; +exports.IDENTITYDATA_IDCARD_ADDRESS_STREET1 = { + "vdxfid": "iKTakiCWF81oLmpY9nQD9pgQttsKyYBEYz", + "indexid": "xQHhDWdb6SETxwha1U4N8DCwvYtLoHXM2c", + "hash160result": "c284feffa60f1978b8f8551cbd6724ca795e54af", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + } +}; +exports.IDENTITYDATA_IDCARD_ADDRESS_CITY = { + "vdxfid": "iEwv5MTy2Dg5atRBc8bSTjMLDHsMLQzVDU", + "indexid": "xKn2Y9u3sXtkD4JDTpFbS7ssEwtNDGiHDg", + "hash160result": "bee2235466779e3ea61b5531b3aa396a0984d77d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + } +}; +exports.IDENTITYDATA_IDCARD_ADDRESS_REGION = { + "vdxfid": "i97JbWvVd6qSRXh8eqjZKG95dj2NeigvWF", + "indexid": "xDwR4KMaUR473haAWXPiHefcfP3PYf7uVw", + "hash160result": "4a74b6e17bea7b240dc8acd7f7e4a82fb34dcd3d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" + } +}; +exports.IDENTITYDATA_IDCARD_ADDRESS_POSTCODE = { + "vdxfid": "iLhtE8EXXJ6ATCZ7xJzbvyJKRTYXUX4A7i", + "indexid": "xRXzgvfcNcJq5NS9ozekuMprT7ZYKa7cdy", + "hash160result": "556f2f620f185c90906aac53e60810665be700bd", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" + } +}; +exports.IDENTITYDATA_IDCARD_ADDRESS_COUNTRY = { + "vdxfid": "iNxc7w91fgHgvRoNsifWYxHMFSJcrCuGss", + "indexid": "xTniaja6WzWMYbgQjQKfXLotH6Kdg4E8gT", + "hash160result": "0cab0e442caf58e660f32d2d36f8e64b12f3b9d5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" + } +}; +exports.IDENTITYDATA_IDCARD_DOCUMENTVERIFICATION_MATCHED = { + "vdxfid": "iMHhAMLCDnisJVbZpTzwdAjwQQobVtkP3e", + "indexid": "xS7od9mH56wXvfUbg9f6bZGUS4pcQztAYY", + "hash160result": "361025b8f50593f08f332b0cd227ade34dcf65c3", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk" + } +}; +exports.IDENTITYDATA_IDCARD_NAME_MATCHED = { + "vdxfid": "i3duYwSwdrLztnP43wuwiTfH9G5adxpZJm", + "indexid": "x8U21jt2VAZfWxG5uda6grBpAv6bc21iUD", + "hash160result": "11c10b7a91af6a813b1cc0f2945a63bf0435c601", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iKCFQYZudPChh6jypSpcgENoQb5WeX5wHv" + } +}; +exports.IDENTITYDATA_IDCARD_DATEOFBIRTHMATCHED = { + "vdxfid": "iPFTbFBXsM4df4BkNoMfFoHynxzKKkUqJv", + "indexid": "xU5a43ccifHJHE4nEV1pEBpWpd1LCCSSq8", + "hash160result": "ba6a81f6ea53e339ff4d8e2aa5c1d660aee6e9d8", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.idcard" + }, + "bounddata": { + "vdxfkey": "iMUfUShqVwWrGSx6HvZcDJwHywiLW5Zusb" + } +}; +exports.IDENTITYDATA_PASSPORT = { + "vdxfid": "i8oiYgB9L9WJWGJgpcrm68mvoq4KoTASNL", + "indexid": "xDdq1UcEBTiy8SBigJWv4XJTqV5LiS8drz", + "hash160result": "a7e8f210eb00dcc94038864f8c59b8403ccf793a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + } +}; +exports.IDENTITYDATA_PASSPORT_ORIGINAL_FRONT = { + "vdxfid": "iQhPuQoj5PDXpF5XsA26PhnvbvBVHUCgtM", + "indexid": "xVXWNDEovhSCSQxZiqgFN6KTdaCWDq4RVw", + "hash160result": "942c2ac1a23d27ab82ea20072a31a3aba9c3c9e8", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iBrpt78Mdrqcc1RHwPWKYBALbNTC4cwdJQ" + } +}; +exports.IDENTITYDATA_PASSPORT_ORIGINAL_BACK = { + "vdxfid": "iHZRBTVpGXBpq1D3JQvB37HwwC81UVaEBt", + "indexid": "xNPXeFvu7qQVTB65A6aL1VpUxr92J21Y2e", + "hash160result": "0b0574e283da6e3dd272ca2f7088634d309f7e9a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iNRCZp7JBDHbpKQ2Vhc6TK97hUSRPG4jaX" + } +}; +exports.IDENTITYDATA_PASSPORT_CROPPED_FRONT = { + "vdxfid": "iGsEp6i4xXh4gNizJgWEoiCwZxzPsuPvnJ", + "indexid": "xMhMGu99oqujJYc2ANAPn6jUbd1Qimj8Dp", + "hash160result": "c26f63c41583bbf9fb1fb6eb714c87c71054e592", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iK822dFQwW2Y5tdpSpxQtHQemf47HoFxqs" + } +}; +exports.IDENTITYDATA_PASSPORT_CROPPED_BACK = { + "vdxfid": "iHfLky17R6QTL1tkhN4YzjigfaNKFMXJwg", + "indexid": "xNVTDmSCGQd7xBmnZ3ihy8FDhEPLApagju", + "hash160result": "b49b18cb2d18cabafd16b138f6de43b1136d9d9b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iCvxKVHbnbwHGZDTaGofeyyJLjsGBSZr7A" + } +}; +exports.IDENTITYDATA_PASSPORT_FACE = { + "vdxfid": "iGvZEAbQPV74x8zimmH857Eyug1YYG6da8", + "indexid": "xMkfgy2VEoKjaJskdSwH3VmWwL2ZPGWyYL", + "hash160result": "c1b64e1b1d902fce4bca08951958ae30c3f28593", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iPrxPJC6NbzWnkNyLSvwa8AVrwJWBUV9mM" + } +}; +exports.IDENTITYDATA_PASSPORT_IDNUMBER = { + "vdxfid": "iRYCG1nfoPiuZFKqbsugCgi317aY2ErtkM", + "indexid": "xWNJipDkehwaBRCsTZZqB5Ea2mbYowicUR", + "hash160result": "abd6da27bddaf9e92e6872589a8cb1ae056d04f2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iJdUp47SVEzGEHCvoRyix2xufRsAeWSyxa" + } +}; +exports.IDENTITYDATA_PASSPORT_CATEGORY = { + "vdxfid": "iPinz8N4RxboKaHvTr4FcJXe9DLojw3bXH", + "indexid": "xUYuSvo9HGpTwkAxKXiQah4BAsMpZeqQLH", + "hash160result": "748058a57c693f07b6b69b53a9509086615215de", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "i9MqRfXPAiYwv9q4iSjTtXquNCCZ1GgECn" + } +}; +exports.IDENTITYDATA_PASSPORT_EXPIRATIONDATE = { + "vdxfid": "iBXSY6Ra3o5jK9QZdnrdttsrnFE6y3H8o9", + "indexid": "xGMYztreu7JPwKHbVUWnsHQPouF7mXgFAg", + "hash160result": "5cd8ab62f4b455d520e951243a6e6ac2be2a4e58", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iNgDKviLAeeV65eBztuduckUMDE2erB7jj" + } +}; +exports.IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED = { + "vdxfid": "iLjpTPmDufuH38s9XwatiLA8Wk67a2thc8", + "indexid": "xRZvvCCJkz7wfJkBPdF3gigfYQ78WXNncA", + "hash160result": "d53e23bd3ca7de97d1ed41b501d9a1f06b965ebd", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iFgXmTd9Wi2sqZyPqaoejdHG2sMaJWLrEX" + } +}; +exports.IDENTITYDATA_PASSPORT_ISSUING_REGION = { + "vdxfid": "i87HPTEfVQ9HKF8zrNppBEBF8wur6BAGBf", + "indexid": "xCwPrFfkLiMwwR22i4Uy9chnAbvrufhBnx", + "hash160result": "3f8308ca4fe693714fdab6fb3871698a5a2bd432", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL" + } +}; +exports.IDENTITYDATA_PASSPORT_DATEOFBIRTH = { + "vdxfid": "iRe6ZecbVBajvySLEiFxAgMtgZwxBiZY78", + "indexid": "xWUD2T3gLVoQZ9KN6Pv794tRiDxy6henbx", + "hash160result": "27a8f2f7695013eef34f4bb36cb9a8eeb92a22f3", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iQhjETQvSkadciDPy69QZNy3hSczWQ4iu4" + } +}; +exports.IDENTITYDATA_PASSPORT_ADDRESS = { + "vdxfid": "iCMcVHrazgA1N2WpXUmffifER2AhUzD6re", + "indexid": "xHBix6HfqzNfzCPrPARpe7BmSgBiQSui11", + "hash160result": "e6bb757f72e329878ff5e7e8409ee9a0bc706a61", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iGebr2v1TgkWvsyLjs1dQ5SqffqKL8rNm3" + } +}; +exports.IDENTITYDATA_PASSPORT_ADDRESS_STREET1 = { + "vdxfid": "i79XJcQgvEz247HHaKWxTiyxVVnDboWYqv", + "indexid": "xBydmQqmmZCggHAKS1B7S7WVX9oEThCnwK", + "hash160result": "c9f030a041e6460517ff39854d3625f70e7e4828", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + } +}; +exports.IDENTITYDATA_PASSPORT_ADDRESS_CITY = { + "vdxfid": "iBM6AvLwRcHKHMwDjPmVts1VxKQYHAmFHA", + "indexid": "xGBCdin2GvVyuXpFb5ResFY2yyRZDWy6sS", + "hash160result": "78068da24f1196cf7bcb7e45d3f2bd90e8015956", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + } +}; +exports.IDENTITYDATA_PASSPORT_ADDRESS_REGION = { + "vdxfid": "iKBAveavEwQG28SE4eRUGY5ZqaSLNrCnM1", + "indexid": "xQ1HPT216FcveJKFvL5dEvc6sETMKCokvR", + "hash160result": "14ad7b91cee4646af2d5625fa0d5eeea8ed239ac", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" + } +}; +exports.IDENTITYDATA_PASSPORT_ADDRESS_POSTCODE = { + "vdxfid": "iDZEoefPi6Q6WjWseS5LMYwk4PXVzU8Yfd", + "indexid": "xJPMGT6UZQcm8uPuW7jVKwUH63YWskMh6F", + "hash160result": "16150338c79c92a5469e14079ef0eb9d0e75956e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" + } +}; +exports.IDENTITYDATA_PASSPORT_ADDRESS_COUNTRY = { + "vdxfid": "iNAWV5t3VpZc9mGxRxqHo8qBo5mRDmYNzh", + "indexid": "xSzcwtK8M8nGmw9zHeVSmXMipjnS4TfbaT", + "hash160result": "64016ff1aa45d5a017a351c87751052b721c02cd", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" + } +}; +exports.IDENTITYDATA_PASSPORT_DOCUMENTVERIFICATION_MATCHED = { + "vdxfid": "iRstHEJfNZfPvmcDUGMyqD6fLvfKvv9ZNr", + "indexid": "xWhzk2jkDst4YwVFKx28obdCNagLpBSeTi", + "hash160result": "ea0746c22573d01b7aa023e40381f655a9bcbdf5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk" + } +}; +exports.IDENTITYDATA_PASSPORT_NAME_MATCHED = { + "vdxfid": "iNQ1CWDT7So5agryapjXpo2nhxto4w6yM8", + "indexid": "xTE7fJeXxm1kCrk1SWPgoBZKjcuoypYrZa", + "hash160result": "5e8b3b606e58d88fb46e055728ff0a8eeb7c8fcf", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iKCFQYZudPChh6jypSpcgENoQb5WeX5wHv" + } +}; +exports.IDENTITYDATA_PASSPORT_DATEOFBIRTHMATCHED = { + "vdxfid": "iHExwXrJTrVLTS5okNNtp9BMRoTbwBNBQu", + "indexid": "xN55QLHPKAi15bxqc433nXhtTTUcpv6xtK", + "hash160result": "3f79d48090f69366e7e78b5765b14565fb3a0197", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.passport" + }, + "bounddata": { + "vdxfkey": "iMUfUShqVwWrGSx6HvZcDJwHywiLW5Zusb" + } +}; +exports.IDENTITYDATA_RESIDENCEPERMIT = { + "vdxfid": "iJzdKZ1ppXjnrbasWGH24nWtNchKTFE6oM", + "indexid": "xPpjnMSufqxTUmTuMwwB3B3RQGiLRSe3a7", + "hash160result": "eb1a88f1148f3f3798bd9f08a5b88a50bf473baa", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + } +}; +exports.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_FRONT = { + "vdxfid": "iCAHvT9dB52QoCHuHYuYJ2BBkytUndvMVj", + "indexid": "xGzQPFai2PF5RNAw9EZhGQhinduVgDqt5Q", + "hash160result": "e191b50000a4d871b4a310f3360dd8cad35d465f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iBrpt78Mdrqcc1RHwPWKYBALbNTC4cwdJQ" + } +}; +exports.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_BACK = { + "vdxfid": "iE6M2Mibzrrneg3cZFbNrXHf9D9FMgBqx9", + "indexid": "xJvTVA9grB5TGqveQwFXpupCAsAGBbcCJR", + "hash160result": "9233dcff0e38f245836911eef94c4bb7238b7774", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iNRCZp7JBDHbpKQ2Vhc6TK97hUSRPG4jaX" + } +}; +exports.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_FRONT = { + "vdxfid": "i91nujduYeu8scMbSkJj1iZuH5VSh3Z5rW", + "indexid": "xDquNY4zPy7oVnEdJRxsz76SJjWTcVNPwS", + "hash160result": "28ec50fb17556fceea921d0a90d822987471c23c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iK822dFQwW2Y5tdpSpxQtHQemf47HoFxqs" + } +}; +exports.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_BACK = { + "vdxfid": "iLpNisoTSTZ8LLHtkPJ9HSxVu84QW1a98Z", + "indexid": "xReVBgEYHmmnxWAvc4xJFqV2vn5RR6aiTG", + "hash160result": "03f3ca2aa3bcdbc2c7b60d18913ae869c02f3bbe", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iCvxKVHbnbwHGZDTaGofeyyJLjsGBSZr7A" + } +}; +exports.IDENTITYDATA_RESIDENCEPERMIT_FACE = { + "vdxfid": "iG9jwZT4PBKWSbm7o5zCWNKZkACyGCCZY3", + "indexid": "xLyrQMt9EVYB4me9emeMUkr6mpDz9wW5M5", + "hash160result": "75cd40bd50a7df36d91334c5e7087f9b602c0c8b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iPrxPJC6NbzWnkNyLSvwa8AVrwJWBUV9mM" + } +}; +exports.IDENTITYDATA_RESIDENCEPERMIT_IDNUMBER = { + "vdxfid": "iFSUa91mA9uok8XL71HNkK5m8xvBKEiMBn", + "indexid": "xLGb2wSr1U8UNJQMxgwXihcJAcwCCmAsFQ", + "hash160result": "3463196fb71b581b22c2355dca63d8ce0b4a3e83", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iJdUp47SVEzGEHCvoRyix2xufRsAeWSyxa" + } +}; +exports.IDENTITYDATA_RESIDENCEPERMIT_CATEGORY = { + "vdxfid": "iJ7wb2r93YaLrXkLdKWgAs5nmowgE7Feth", + "indexid": "xNx43qHDtro1UhdNV1Aq9FcKoTxh6YYiWp", + "hash160result": "5eb69e44059f8c65fdc0f132bffe26ba8c50a5a0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "i9MqRfXPAiYwv9q4iSjTtXquNCCZ1GgECn" + } +}; +exports.IDENTITYDATA_RESIDENCEPERMIT_EXPIRATIONDATE = { + "vdxfid": "iFTmB8nRz1e1LWy6VZy69z13JJDqSjGYzu", + "indexid": "xLHsdwDWqKrfxgr8MFdF8NXaKxErHmHoJn", + "hash160result": "4c0ea69b915ce91fecf6f82b5993835ea4907c83", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iNgDKviLAeeV65eBztuduckUMDE2erB7jj" + } +}; +exports.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED = { + "vdxfid": "iDycAmsF8RoSfDCqt8GKwfLdajJEejPYBF", + "indexid": "xJoidaJKyk27HP5sjovUv3sAcPKFUR4Skz", + "hash160result": "198ee70ddf1dae654a868ee39d83015a37463173", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iFgXmTd9Wi2sqZyPqaoejdHG2sMaJWLrEX" + } +}; +exports.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_REGION = { + "vdxfid": "iLZnhoDnggyo9LGiyS8xvEovkSn1yRuRjz", + "indexid": "xRPuAbesY1CTmW9kq7o7tdLTn6o2m96TLY", + "hash160result": "f969f7afa0599e431674b2e76bc4ee5f3cf778bb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL" + } +}; +exports.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTH = { + "vdxfid": "iMPmaDAiNuaqfSNV9SbCuaYG2TCvPNU495", + "indexid": "xSDt31boEDoWHcFX18FMsy4o47DwGgmFbq", + "hash160result": "93ab89f3abe5db79de5fb960f9362b02ecfc8bc4", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iQhjETQvSkadciDPy69QZNy3hSczWQ4iu4" + } +}; +exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS = { + "vdxfid": "i5pghYvnurAvtbyT69Lt1wBk9NTQNYfWt5", + "indexid": "xAeoAMMsmAPbWmrUwq12zKiHB2URHSXqA1", + "hash160result": "43aa306c8ff55fc646a7a1bb0e0171576c4ec019", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iGebr2v1TgkWvsyLjs1dQ5SqffqKL8rNm3" + } +}; +exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_STREET1 = { + "vdxfid": "iC3BuU53cL5hXRnnezmmToKvUZxyQb1AUs", + "indexid": "xGsJNGW8TeJN9bfpWgRvSBrTWDyzMRUX1Q", + "hash160result": "64d4d3dd9f6acbd72f13a717572302109c6eee5d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + } +}; +exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_CITY = { + "vdxfid": "iHv1BkzjJgJcwsBHJCeGTgcUHmoCmGE5py", + "indexid": "xNk7eZRp9zXHa34K9tJRS591KRpDa69BBJ", + "hash160result": "6d9fbcb4cd86e46dfbf806c13f951108c253639e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + } +}; +exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_REGION = { + "vdxfid": "iKEHZjtgcCRd67iRsA93J7yphxvRUYdZig", + "indexid": "xQ4Q2YKmTWeHiHbTiqoCGWWMjcwSPM6wn6", + "hash160result": "6c5f8b7989f6210f50d9d270c170cae9dd9cd0ac", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" + } +}; +exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_POSTCODE = { + "vdxfid": "i7niNaE598TEVhfaf78do5rhKX6gXgdqAC", + "indexid": "xCcpqNf9zSfu7sYcWnnnmUPEMB7hMATGYv", + "hash160result": "ca2d0134ac28a0f46363ea91b036fc78531f512f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" + } +}; +exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_COUNTRY = { + "vdxfid": "i7sePTAMwZ5hVQvdgjfWr9mCg4G8YDvwcx", + "indexid": "xChkrFbSnsJN7aofYRKfpYHjhiH9PqemVR", + "hash160result": "2ffeb2e22fb423ede8ad0127d39be36133e03f30", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" + } +}; +exports.IDENTITYDATA_RESIDENCEPERMIT_DOCUMENTVERIFICATION_MATCHED = { + "vdxfid": "iGRk3K3N3Nr4gvVWL2aKdzfjP54ZNvpVaT", + "indexid": "xMFrW7USth4jK6NYBiEUcPCGQj5aM9U9ed", + "hash160result": "316ae15a805987678066399eb21d162759e9128e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk" + } +}; +exports.IDENTITYDATA_RESIDENCEPERMIT_NAME_MATCHED = { + "vdxfid": "iPJhtbfg9yL4ydMLXfgb1XUqm4zvtcS3c7", + "indexid": "xU8pMQ6m1HYjboENPMLjyv1Nnj1wmqZv7q", + "hash160result": "52e2b8b282867a147bd6ce097359606cd91587d9", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iKCFQYZudPChh6jypSpcgENoQb5WeX5wHv" + } +}; +exports.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTHMATCHED = { + "vdxfid": "iBZWkQDNUV46RpDHi3CMn78ENBcQj4RVUp", + "indexid": "xGPdDCeTKoGm3z6KZirWkVemPqdRgTRtbw", + "hash160result": "197dbc7ddf5795a60bb0bf037c8b846cda83b258", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residencepermit" + }, + "bounddata": { + "vdxfkey": "iMUfUShqVwWrGSx6HvZcDJwHywiLW5Zusb" + } +}; +exports.IDENTITYDATA_RESIDENTCARD = { + "vdxfid": "iRZk3qsYq1ac6H53v3cSWhqx8VqUoMxpuK", + "indexid": "xWPrWeJdgKoGiSx5mjGbV6NVA9rVgyJnaL", + "hash160result": "b804f8f1b6006c80b18d5cda0fbcc39900614ff2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + } +}; +exports.IDENTITYDATA_RESIDENTCARD_ORIGINAL_FRONT = { + "vdxfid": "iHqGf5Yq5MTjS3vJS4GmfPkU2unJVFMLXs", + "indexid": "xNfP7syuvfgQ4DoLHjvvdnH14ZoKPe8ZfA", + "hash160result": "3ee1ac34db24100dbcd7ab1d0c110fc674297e9d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iBrpt78Mdrqcc1RHwPWKYBALbNTC4cwdJQ" + } +}; +exports.IDENTITYDATA_RESIDENTCARD_ORIGINAL_BACK = { + "vdxfid": "iQAb2ZQ7Z5tZXiiASNpuXYWGGA9ZNTho6m", + "indexid": "xUzhVMqCQQ7E9tbCJ4V4Vw2oHpAaA2pxef", + "hash160result": "cf0888932dddd9da9a7e8008dc7e3dfe9a27f6e2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iNRCZp7JBDHbpKQ2Vhc6TK97hUSRPG4jaX" + } +}; +exports.IDENTITYDATA_RESIDENTCARD_CROPPED_FRONT = { + "vdxfid": "iCAq6xmjVDq3an2yRkws3xmLfXmDfm6TK5", + "indexid": "xGzwZmCpLY3iCwv1HSc22MHshBnEaVnkU7", + "hash160result": "6e067b98f82fc5d158a11c57e86fd5583165605f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iK822dFQwW2Y5tdpSpxQtHQemf47HoFxqs" + } +}; +exports.IDENTITYDATA_RESIDENTCARD_CROPPED_BACK = { + "vdxfid": "i5DMa83PXnoc3VaaDBvwUPqtXQS3VkJM65", + "indexid": "xA3U2vUUP72GffTc4sb6SnNRZ4T4Qptiiu", + "hash160result": "79ad91be4e21e9065c557d16d530bd53c5c71113", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iCvxKVHbnbwHGZDTaGofeyyJLjsGBSZr7A" + } +}; +exports.IDENTITYDATA_RESIDENTCARD_FACE = { + "vdxfid": "iMkREmUUamd78MP7GeP1wtFteRGoWEAgFj", + "indexid": "xSaXhZuZS5qmkXG98L3AvGnRg5HpLnMLTA", + "hash160result": "a8daf37e1cd1ccc4edbf4f0ee3b193f588bf73c8", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iPrxPJC6NbzWnkNyLSvwa8AVrwJWBUV9mM" + } +}; +exports.IDENTITYDATA_RESIDENTCARD_IDNUMBER = { + "vdxfid": "iGYqQVqehuhYb95knMeydLdtoEzGAFJU9e", + "indexid": "xMNwsJGjZDvDDJxne3K8bjARpu1H4ShUgH", + "hash160result": "c9b041ee41a77909c6aee95418d9e5244d4d6a8f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iJdUp47SVEzGEHCvoRyix2xufRsAeWSyxa" + } +}; +exports.IDENTITYDATA_RESIDENTCARD_CATEGORY = { + "vdxfid": "iMxE22zmptXB8ShHsSypWSqXLmEficJVug", + "indexid": "xSnLUqRrgCjqkcaKj8dyUqN4NRFgaJT7cn", + "hash160result": "5b6369f617841495baaeb8b396b6bf87c75fafca", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "i9MqRfXPAiYwv9q4iSjTtXquNCCZ1GgECn" + } +}; +exports.IDENTITYDATA_RESIDENTCARD_EXPIRATIONDATE = { + "vdxfid": "iFeEkx5dNqs9RmYnyBNnMJpigdVo75MA3Q", + "indexid": "xLUMDkWiEA5p3wRpps2wKhMFiHWp59WJtb", + "hash160result": "53ab24af7c986998582d42d98d4e7b4ef1bf7785", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iNgDKviLAeeV65eBztuduckUMDE2erB7jj" + } +}; +exports.IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED = { + "vdxfid": "iHHLQuEx2sQ5FHm8cHs2eW5YFKBu42QyT4", + "indexid": "xN7Sshg2tBcjsTeATyXBctc5GyCuutBKAi", + "hash160result": "c233566af8cb4d2bec45de1b6314a8c373fc7397", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iFgXmTd9Wi2sqZyPqaoejdHG2sMaJWLrEX" + } +}; +exports.IDENTITYDATA_RESIDENTCARD_ISSUING_REGION = { + "vdxfid": "iQSeWkZJbBknqaAvrVk8UpzXcbDcD3JwZK", + "indexid": "xVGkyYzPSVyTTk3xiBQHTDX4eFEd6nwER3", + "hash160result": "f46eda08f73c5415674385dafb8f913a5ab8ffe5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL" + } +}; +exports.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTH = { + "vdxfid": "iL3JyAfGXCDqotYbGTsC6Et9pe4x9zqKft", + "indexid": "xQsRRy6MNWSWS4Rd89XM4dQgrJ5y4pBTXB", + "hash160result": "ebc0dd42cc2bbf62c504fb64e7b6d29ebb55b5b5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iQhjETQvSkadciDPy69QZNy3hSczWQ4iu4" + } +}; +exports.IDENTITYDATA_RESIDENTCARD_ADDRESS = { + "vdxfid": "iBU6zckdwpwkR9BbFPVKNEf5X7b8TWERYR", + "indexid": "xGJDTRBio9AR3K4d759ULdBcYmc9QPsq2R", + "hash160result": "921d0bf97b612e9de3294054e4a25e4c0c9bac57", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iGebr2v1TgkWvsyLjs1dQ5SqffqKL8rNm3" + } +}; +exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_STREET1 = { + "vdxfid": "i47Wp3Wt9Bib7KB6oSxm8QtQxmAqwxZV18", + "indexid": "x8wdGqwxzVwFjV48f8cv6oQwzRBrs4rtgB", + "hash160result": "4f18b96b75ce0af53a288a0e382c54df3adffe06", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + } +}; +exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_CITY = { + "vdxfid": "iRNzrpZ74Wm6wMMFh5VeUzR2NBfa9R3UTo", + "indexid": "xWD7KczBupymZXEHYm9oTNwZPqgb5cJGDD", + "hash160result": "149842d5588eaf9a77f40e4b63520c09832a47f0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + } +}; +exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_REGION = { + "vdxfid": "iHAW2LhviXqcVdMsPTcap9khj6rfrfBKRu", + "indexid": "xMzcV991Zr4H7oEuF9GjnYHEkksgoPXYFo", + "hash160result": "c7cd6053d9cd2a7e4482f46366202e87e7182996", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" + } +}; +exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_POSTCODE = { + "vdxfid": "i9R5Y1NexqRDP3ztWox1qCPVEVZvbAS7Yx", + "indexid": "xEFBzoojp9dt1DsvNVcAoav2G9awPo2kkY", + "hash160result": "2ccf68aa3d77e0d0a30ef4bdae990b6a72e32941", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" + } +}; +exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_COUNTRY = { + "vdxfid": "iAZGARqg4GFG8SdjuKe9Zkf9SNqS2fqqop", + "indexid": "xFPNdEGkuaTvkcWmm1JJY9BgU2rSwXWCNA", + "hash160result": "21c3b6b680c00fc148910e6684737549b636ae4d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" + } +}; +exports.IDENTITYDATA_RESIDENTCARD_DOCUMENTVERIFICATION_MATCHED = { + "vdxfid": "iQvbQZ6EQmkESfrgtXhCJ8Vszu1oC9f5rt", + "indexid": "xVkhsMXKG5xu4qjikDMMGX2R2Z2p3yR8MD", + "hash160result": "817d1a8d17b92516bccc8e026fbf4d8e09c648eb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk" + } +}; +exports.IDENTITYDATA_RESIDENTCARD_NAME_MATCHED = { + "vdxfid": "iNdqmEoGr2zr9eDPmPS99nHJQcK8c61SWR", + "indexid": "xTTxE3EMhMDWmp6Rd56J8AoqSGL9Yay9KW", + "hash160result": "13cc257f9ae7a639ce00b049198336b15a6f2dd2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iKCFQYZudPChh6jypSpcgENoQb5WeX5wHv" + } +}; +exports.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTHMATCHED = { + "vdxfid": "iL3YRkmngkLVsPa1xwAdWcb5NEjiZdCLbB", + "indexid": "xQsetZCsY4ZAVZT3pcpnV17cPtkjSpUs5B", + "hash160result": "800f1e6739db010a4edc9ed45e4d2422c591c0b5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.residentcard" + }, + "bounddata": { + "vdxfkey": "iMUfUShqVwWrGSx6HvZcDJwHywiLW5Zusb" + } +}; +exports.IDENTITYDATA_VISA = { + "vdxfid": "iATKs43yLjHHyCcLmVtZt2gGZF5PaTvxfy", + "indexid": "xFHSKrV4C3VxbNVNdBYirRCoau6QSwcyaF", + "hash160result": "f3240ba891b8ed340bc5f8ca9f7c6e3391ce8e4c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + } +}; +exports.IDENTITYDATA_VISA_ORIGINAL_FRONT = { + "vdxfid": "iSQ98EpyqS26vDxLz2sPkSLfHitiSE5W66", + "indexid": "xXEFb3G4gkEmYPqNqiXYipsCKNujJTbHCP", + "hash160result": "f7bb12de360a562c66b20e49714fdf7c979b76fb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iBrpt78Mdrqcc1RHwPWKYBALbNTC4cwdJQ" + } +}; +exports.IDENTITYDATA_VISA_ORIGINAL_BACK = { + "vdxfid": "iP7hjj56oH2Xozpw6sPAx4tmXzdCqCGc8P", + "indexid": "xTwpCXWBebFCSAhxxZ3KvTRJZeeDgSAny1", + "hash160result": "d52e97ed89ccb3d384cee2509a0bf1aacf6172d7", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iNRCZp7JBDHbpKQ2Vhc6TK97hUSRPG4jaX" + } +}; +exports.IDENTITYDATA_VISA_CROPPED_FRONT = { + "vdxfid": "i5GYu5sBm2sJh1trhe7ry2J3h5vq5jtBi5", + "indexid": "xA6fMtJGcM5yKBmtZKn1wQpaijwquAGHpb", + "hash160result": "9f1a97f4206a3d10c987d982c6093c31c67bac13", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iK822dFQwW2Y5tdpSpxQtHQemf47HoFxqs" + } +}; +exports.IDENTITYDATA_VISA_CROPPED_BACK = { + "vdxfid": "iQRrKSZCi8oURCVTPdvFcNXARXq8BUmEPQ", + "indexid": "xVFxnEzHZT293NNVFKaQam3hTBr9B2SPr8", + "hash160result": "91705b953ea6a6824096763e55bd7ff89128d9e5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iCvxKVHbnbwHGZDTaGofeyyJLjsGBSZr7A" + } +}; +exports.IDENTITYDATA_VISA_FACE = { + "vdxfid": "i5HD9vjKw9soTjAC4GwfKnEvEFVMuRU1Tt", + "indexid": "xA7KcjAQnU6U5u3DuxbpJAmTFuWNhv9uYv", + "hash160result": "9b92d6ae6541357cea0bb018f616586dfc6acc13", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iPrxPJC6NbzWnkNyLSvwa8AVrwJWBUV9mM" + } +}; +exports.IDENTITYDATA_VISA_IDNUMBER = { + "vdxfid": "i7m6YfgMd7iELn25uZ36oA9sScTHdwHe1Z", + "indexid": "xCbD1U7SURvtxwu7mEhFmYgQUGUJaGUuzV", + "hash160result": "54d2d2bdfe71c96efe3d5630159f55c0e6cc022f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iJdUp47SVEzGEHCvoRyix2xufRsAeWSyxa" + } +}; +exports.IDENTITYDATA_VISA_CATEGORY = { + "vdxfid": "i5ADnmaWGg9VJhYueJwd5kFmSgxuhLxHrQ", + "indexid": "x9zLFa1b7zN9vsRwVzbn48nJULyvfSeNuC", + "hash160result": "c1a982a1a03c643bdace28189b80be6353097a12", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "i9MqRfXPAiYwv9q4iSjTtXquNCCZ1GgECn" + } +}; +exports.IDENTITYDATA_VISA_EXPIRATIONDATE = { + "vdxfid": "iAdCPpmiY4W1Mkb7vQNTiR38HFBMuwMcEe", + "indexid": "xFTJrdCoPNifyvU9n62cgoZfJuCNkyMTYH", + "hash160result": "a14a1b7acddd65bc3b403b8d080a982738bb6c4e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iNgDKviLAeeV65eBztuduckUMDE2erB7jj" + } +}; +exports.IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED = { + "vdxfid": "iRRYUVK9WZodGM15oJCrZgdXV6PaLZoxFC", + "indexid": "xWFewHkEMt2HtWt7eys1Y5A4WkQbHjGMmc", + "hash160result": "22ddef78469b09e9352e948b16fec0978a63c2f0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iFgXmTd9Wi2sqZyPqaoejdHG2sMaJWLrEX" + } +}; +exports.IDENTITYDATA_VISA_ISSUING_REGION = { + "vdxfid": "iE5fNZUT4G8ZnR1BbJTNCgc54FUFwqeUcp", + "indexid": "xJumqMuXuaMEQatDSz7XB58c5uVGrJL3e3", + "hash160result": "d7dd15c309c0ae09f5a7293b4b0cf15ca7715674", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL" + } +}; +exports.IDENTITYDATA_VISA_DATEOFBIRTH = { + "vdxfid": "iF8CRZfCthVVm2VoxyfjMcmXw5x2EReAMv", + "indexid": "xKxJtN6Hk1iAPCNqpfKtL1J4xjy396V6v7", + "hash160result": "908c870f1f57ea5cd8aae089feb5f4f98752c97f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iQhjETQvSkadciDPy69QZNy3hSczWQ4iu4" + } +}; +exports.IDENTITYDATA_VISA_ADDRESS = { + "vdxfid": "i53bAJPm5Dvbhovj671RVzkZq9Lej8M8iw", + "indexid": "x9shd6pqvY9GKyokwnfaUPH6roMfesuo4U", + "hash160result": "b3f7110b2359782dc7df5a12c740a275e9f63811", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iGebr2v1TgkWvsyLjs1dQ5SqffqKL8rNm3" + } +}; +exports.IDENTITYDATA_VISA_ADDRESS_STREET1 = { + "vdxfid": "iGpueUZCzRG6YVL5xZVV56sjpK39wXm3T6", + "indexid": "xMf27GzHqjUmAfD7pF9e3VQGqy4Ao4VwBi", + "hash160result": "e32af4b6f696c06f289e9d19674a31ad5f7f7492", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + } +}; +exports.IDENTITYDATA_VISA_ADDRESS_CITY = { + "vdxfid": "iNRkLpudpDSAZtoyxSLAV6qp143Vny58dF", + "indexid": "xTFrodLifXeqC4h1p7zKTVNM2i4WdCQiTz", + "hash160result": "7a9966496c47f9b145e785c9fd76fbc515ebe3cf", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + } +}; +exports.IDENTITYDATA_VISA_ADDRESS_REGION = { + "vdxfid": "iR5syE1ENGxcDwcUXrvDnYT8jfXTF9RWLU", + "indexid": "xVuzS2SKDbBGr7VWPYaNkvyfmKYU7gkeus", + "hash160result": "1646f77db041fe2fd10d01a7afffc9cdf4570aed", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" + } +}; +exports.IDENTITYDATA_VISA_ADDRESS_POSTCODE = { + "vdxfid": "i4MPAfFeCJGDuXgKsyDLRJgcam4ukpEo28", + "indexid": "x9BVdTgj3cUtXhZMjesVPhD9cR5vg2V94k", + "hash160result": "ceab8e1f6f76178916d73d6671e8767269509e09", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" + } +}; +exports.IDENTITYDATA_VISA_ADDRESS_COUNTRY = { + "vdxfid": "iPnjFJpqiiBQ7D6797hNoVmbNJMydCZdgj", + "indexid": "xUcqi7Fva2Q4jNy8zoMXmtJ8PxNzWUqNgK", + "hash160result": "1e10864c861d5eda424d0e6ecf1ae20977ddd3de", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" + } +}; +exports.IDENTITYDATA_VISA_DOCUMENTVERIFICATION_MATCHED = { + "vdxfid": "iKiQKkypr3B5NEHvPBg2sNEHeZcrZy3dL1", + "indexid": "xQYWnZQuhMPjzQAxEsLBqkkpgDdsNiGwfo", + "hash160result": "b36c238b24223f6a4652f6301bf5dfa5dae621b2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk" + } +}; +exports.IDENTITYDATA_VISA_NAME_MATCHED = { + "vdxfid": "iKDJ8c248aZMWkKSFuVypNt4GVrZ91oArN", + "indexid": "xQ3QbQT8ytn28vCU7bA8nmQbJ9sa3AvkmG", + "hash160result": "96b725305bec875c2f0fb3028def34a277aba0ac", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iKCFQYZudPChh6jypSpcgENoQb5WeX5wHv" + } +}; +exports.IDENTITYDATA_VISA_DATEOFBIRTHMATCHED = { + "vdxfid": "i9o1iuJJTwfTCuJzCT6yw1X41SbEwJk1DC", + "indexid": "xEd8BhjPKFt7q5C248m8uQ3b36cFn4BGH7", + "hash160result": "e6f5f12e63f6b86c4dc1f4185ed6c89d7edb4f45", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.visa" + }, + "bounddata": { + "vdxfkey": "iMUfUShqVwWrGSx6HvZcDJwHywiLW5Zusb" + } +}; +exports.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALFRONT = { + "vdxfid": "iBrpt78Mdrqcc1RHwPWKYBALbNTC4cwdJQ", + "indexid": "xGgwLuZSVB4HEBJKo5AUWZgsd2UCxbFCCA", + "hash160result": "734505c8a36a53d58aedfc18f8f0c9e312b9f85b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.originalfront" + } +}; +exports.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALBACK = { + "vdxfid": "iNRCZp7JBDHbpKQ2Vhc6TK97hUSRPG4jaX", + "indexid": "xTFK2cYP2XWGSVH4MPGFRhfej8TSGxUzFR", + "hash160result": "fc576cd9799270c2e432da7b5481254c9864c9cf", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.originalback" + } +}; +exports.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDFRONT = { + "vdxfid": "iK822dFQwW2Y5tdpSpxQtHQemf47HoFxqs", + "indexid": "xPx8VRgVnpFCi4WrJWcZrfwBoK58CsfaGo", + "hash160result": "6b2cc84a0df71c4b1920d5332ecde7cdd625a1ab", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.croppedfront" + } +}; +exports.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDBACK = { + "vdxfid": "iCvxKVHbnbwHGZDTaGofeyyJLjsGBSZr7A", + "indexid": "xHm4nHigdv9wtj6VRxTpdNVqNPtH2yr1Kb", + "hash160result": "edcfcebea370f151dc72c13a34b972dd9fb8b867", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.croppedback" + } +}; +exports.IDENTITYDATA_DOCUMENTVERIFICATION_FACE = { + "vdxfid": "iPrxPJC6NbzWnkNyLSvwa8AVrwJWBUV9mM", + "indexid": "xUh4r6dBDvDBQvG1C8b6YWh2tbKX74nCWP", + "hash160result": "d65b41ab8d8c667a46921b860342f471eb7ea0df", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.face" + } +}; +exports.IDENTITYDATA_DOCUMENTVERIFICATION_IDNUMBER = { + "vdxfid": "iJdUp47SVEzGEHCvoRyix2xufRsAeWSyxa", + "indexid": "xPTbGrYXLZCvrT5xf7dsvRVSh5tBU3pzip", + "hash160result": "34ad72308593579994ebe622e284a67044713ba6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.idnumber" + } +}; +exports.IDENTITYDATA_DOCUMENTVERIFICATION_CATEGORY = { + "vdxfid": "i9MqRfXPAiYwv9q4iSjTtXquNCCZ1GgECn", + "indexid": "xEBwtTxU22mcYKi6a8PcrvNSPrDZtQ5nSL", + "hash160result": "6d03e9b13582f7069c52d73f7f55881dd9dc8c40", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.category" + } +}; +exports.IDENTITYDATA_DOCUMENTVERIFICATION_EXPIRATIONDATE = { + "vdxfid": "iNgDKviLAeeV65eBztuduckUMDE2erB7jj", + "indexid": "xTWKnj9R1xs9iFXDraZnt1H1NsF3UEb4Kf", + "hash160result": "6ecad210f102677f2d2d75a0929fb3676c44a0d2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.expirationdate" + } +}; +exports.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY = { + "vdxfid": "iFgXmTd9Wi2sqZyPqaoejdHG2sMaJWLrEX", + "indexid": "xLWeEG4EN2FYTjrRhGToi1oo4XNbE2QwRu", + "hash160result": "c0e0b8f43025cc9574486117135e4c8fa8c7e685", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.issuingcountry" + } +}; +exports.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUING_REGION = { + "vdxfid": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL", + "indexid": "xGomhGg7SbfRombFesZCzxapM7Lc5aQFa4", + "hash160result": "1ff5e3f915ccb6616cbc04e0b51961f98694435d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.issuingregion" + } +}; +exports.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTH = { + "vdxfid": "iQhjETQvSkadciDPy69QZNy3hSczWQ4iu4", + "indexid": "xVXqhFr1J4oJEt6RpmoZXmVaj6e1NWsjoF", + "hash160result": "38b824222653effa835ea81b8bf2397b18e6d9e8", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.dateofbirth" + } +}; +exports.IDENTITYDATA_DOCUMENTVERIFICATION_ADDRESS = { + "vdxfid": "iGebr2v1TgkWvsyLjs1dQ5SqffqKL8rNm3", + "indexid": "xMUiJqM6JzyBZ3rNbYfnNTyNhKrLEbbAy6", + "hash160result": "c1e17b8a68c7238fc479638a4ea90a09887a8190", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.address" + } +}; +exports.IDENTITYDATA_ADDRESS_STREET1 = { + "vdxfid": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj", + "indexid": "xNUFncPpokjWp66awDFYo1m4UPLA8ubaiB", + "hash160result": "b66f8fe85cc09f7df77e3a0af34bb10b3a77639b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.address.street1" + } +}; +exports.IDENTITYDATA_ADDRESS_STREET2 = { + "vdxfid": "i3h8D5kGtn6DCVCwPFvbypbFCqfzAhXiD2", + "indexid": "x8XEftBMk6Jspf5yEwakxD7nEVh12MU6qD", + "hash160result": "c156ac2c6f101631e348f95b6fca8ad063056202", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.address.street2" + } +}; +exports.IDENTITYDATA_ADDRESS_CITY = { + "vdxfid": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD", + "indexid": "xM76PTRnxBRkvg1i4D1PKocd4n3RqY3CFe", + "hash160result": "b03fee48a0694abcf0e26aeee63386a538c26a8c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.address.city" + } +}; +exports.IDENTITYDATA_ADDRESS_REGION = { + "vdxfid": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x", + "indexid": "xCkRVkwGGxUE335WrtVKzFEV4EZ3XYsk9g", + "hash160result": "b838dcdca8dd93524a9bbeb4a551d41be3f7c030", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.address.region" + } +}; +exports.IDENTITYDATA_ADDRESS_POSTCODE = { + "vdxfid": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC", + "indexid": "xVQLwJNgMdU7oRYzDBi9Qj5sPwC4vbkTUi", + "hash160result": "2ee05285375ce5e909eb31e5c08d042231fb6ee7", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.address.postcode" + } +}; +exports.IDENTITYDATA_ADDRESS_COUNTRY = { + "vdxfid": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK", + "indexid": "xTi8RLedRrhDrkgbcdyrpPZmtNvpSJTWGw", + "hash160result": "fafe1c0c79889407ed4172586eb02bf3c6c4dbd4", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.address.country" + } +}; +exports.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED = { + "vdxfid": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk", + "indexid": "xPJ2puxZGpXvCmcBkgaaHMJ9vGBNfo83vX", + "hash160result": "5dfba519a35dbb63e0a12e071b47b4b2f99c6ca4", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.matched" + } +}; +exports.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED = { + "vdxfid": "iKCFQYZudPChh6jypSpcgENoQb5WeX5wHv", + "indexid": "xQ2MsLzzUhRNKGd1g8UmecuLSF6XcYynDa", + "hash160result": "0d02d8dce6be6e0b4c87efdac286f3739efa6dac", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.name.matched" + } +}; +exports.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED = { + "vdxfid": "iMUfUShqVwWrGSx6HvZcDJwHywiLW5Zusb", + "indexid": "xSJmwF8vMFjWtcq89cDmBhTq1bjMRkFKEg", + "hash160result": "3467c9e6461d44959372367130363b01ebf978c5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documentverification.dateofbirthmatched" + } +}; diff --git a/dist/vdxf/index.d.ts b/dist/vdxf/index.d.ts index 228a5c3..4121ab7 100644 --- a/dist/vdxf/index.d.ts +++ b/dist/vdxf/index.d.ts @@ -3,6 +3,8 @@ import { VDXFKeyInterface } from './keys'; import { BigNumber } from "../utils/types/BigNumber"; export * from './keys'; export * from './scopes'; +export * from './keymap'; +export * from './identityDataKeys'; export interface VDXFObjectInterface { vdxfkey: string; toString: () => string; @@ -81,3 +83,6 @@ export declare class VerusIDSignature extends VDXFObject { static fromJson(data: VerusIDSignatureJson): VerusIDSignature; toJson(): VerusIDSignatureJson; } +export declare class PNGImageVdxfObject extends BufferDataVdxfObject { + constructor(data?: string, vdxfkey?: string); +} diff --git a/dist/vdxf/index.js b/dist/vdxf/index.js index 270be43..67f605b 100644 --- a/dist/vdxf/index.js +++ b/dist/vdxf/index.js @@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.VerusIDSignature = exports.Utf8OrBase58Object = exports.HexDataVdxfObject = exports.Utf8DataVdxfObject = exports.BufferDataVdxfObject = exports.VDXFObject = void 0; +exports.PNGImageVdxfObject = exports.VerusIDSignature = exports.Utf8OrBase58Object = exports.HexDataVdxfObject = exports.Utf8DataVdxfObject = exports.BufferDataVdxfObject = exports.VDXFObject = void 0; const base64url_1 = require("base64url"); const createHash = require("create-hash"); const vdxf_1 = require("../constants/vdxf"); @@ -27,6 +27,8 @@ const keys_1 = require("./keys"); const bn_js_1 = require("bn.js"); __exportStar(require("./keys"), exports); __exportStar(require("./scopes"), exports); +__exportStar(require("./keymap"), exports); +__exportStar(require("./identityDataKeys"), exports); class VDXFObject { constructor(key = "", serializekey = true) { this.serializekey = true; @@ -198,3 +200,9 @@ class VerusIDSignature extends VDXFObject { } } exports.VerusIDSignature = VerusIDSignature; +class PNGImageVdxfObject extends BufferDataVdxfObject { + constructor(data = "", vdxfkey = "") { + super(data, vdxfkey, "hex"); + } +} +exports.PNGImageVdxfObject = PNGImageVdxfObject; diff --git a/dist/vdxf/keymap.d.ts b/dist/vdxf/keymap.d.ts new file mode 100644 index 0000000..573ae7b --- /dev/null +++ b/dist/vdxf/keymap.d.ts @@ -0,0 +1,13 @@ +import * as AttestationData from './classes/attestationData'; +export declare const keymap: { + [key: string]: any; +}; +export declare const attestationDataKeys: { + [key: string]: any; +}; +export declare const AttestationDataVdxfidMap: { + [x: string]: { + name: string; + type: AttestationData.AttestationClassTypes; + }; +}; diff --git a/dist/vdxf/keymap.js b/dist/vdxf/keymap.js new file mode 100644 index 0000000..8fd9780 --- /dev/null +++ b/dist/vdxf/keymap.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AttestationDataVdxfidMap = exports.attestationDataKeys = exports.keymap = void 0; +const keylist = require("./keys"); +const AttestationData = require("./classes/attestationData"); +exports.keymap = Object.keys(keylist).reduce((obj, item) => { obj[keylist[item].vdxfid] = keylist[item]; return obj; }, {}); +exports.attestationDataKeys = Object.keys(AttestationData).reduce((obj, item) => { obj[AttestationData[item].vdxfid] = AttestationData[item]; return obj; }, {}); +exports.AttestationDataVdxfidMap = AttestationData.AttestationVdxfidMap; diff --git a/dist/vdxf/keys.d.ts b/dist/vdxf/keys.d.ts index 4e5ddf5..e6bf49b 100644 --- a/dist/vdxf/keys.d.ts +++ b/dist/vdxf/keys.d.ts @@ -5,6 +5,10 @@ export interface VDXFKeyInterface { name: string; namespace: string; }; + bounddata?: { + vdxfkey: string; + }; + indexid?: string; } export declare const VERUSPAY_INVOICE_VDXF_KEY: VDXFKeyInterface; export declare const IDENTITY_AUTH_SIG_VDXF_KEY: VDXFKeyInterface; @@ -44,12 +48,7 @@ export declare const SIGNED_SESSION_OBJECT_DATA: VDXFKeyInterface; export declare const SIGNED_SESSION_OBJECT: VDXFKeyInterface; export declare const CURRENCY_ADDRESS: VDXFKeyInterface; export declare const ATTESTATION_RECIPIENT: VDXFKeyInterface; -interface VDXFIdentityData extends VDXFKeyInterface { - detail: string; - name: string; -} -export declare const ATTESTATION_IDENTITY_DATA: { - [vdxfid: string]: VDXFIdentityData; -}; -export declare const CVDXF_Data: {}; -export {}; +export declare const ATTESTATION_OBJECT: VDXFKeyInterface; +export declare const ATTESTATION_VIEW_RESPONSE: VDXFKeyInterface; +export declare const ATTESTATION_TYPE: VDXFKeyInterface; +export declare const DATA_TYPE_STRING: VDXFKeyInterface; diff --git a/dist/vdxf/keys.js b/dist/vdxf/keys.js index 3b4501c..b1948e5 100644 --- a/dist/vdxf/keys.js +++ b/dist/vdxf/keys.js @@ -1,7 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.CVDXF_Data = exports.ATTESTATION_IDENTITY_DATA = exports.ATTESTATION_RECIPIENT = exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.IDENTITY_AUTH_SIG_VDXF_KEY = exports.VERUSPAY_INVOICE_VDXF_KEY = void 0; -const varuint_1 = require("../utils/varuint"); +exports.DATA_TYPE_STRING = exports.ATTESTATION_TYPE = exports.ATTESTATION_VIEW_RESPONSE = exports.ATTESTATION_OBJECT = exports.ATTESTATION_RECIPIENT = exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.IDENTITY_AUTH_SIG_VDXF_KEY = exports.VERUSPAY_INVOICE_VDXF_KEY = void 0; exports.VERUSPAY_INVOICE_VDXF_KEY = { hash160result: "628efc28c2e2d40050e1a9de7a93e7ddf2aa0076", qualifiedname: { @@ -299,89 +298,43 @@ exports.CURRENCY_ADDRESS = { } }; exports.ATTESTATION_RECIPIENT = { - "vdxfid": "iGz3PbkrgqaqqgiRHZzLZvRR8xNMkLBkxP", - "hash160result": "f0e8cdf215f6031e0787e3a1ff1d185386b42e94", + "vdxfid": "iF9W7VBoeB1qooRBhZnbx1edN45oT6N3T1", + "hash160result": "fd9b77f956447beae6e9eba1de71d855fa800880", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::attestations.recipient" + "name": "vrsc::attestation.recipient" } }; -const IDENTITY_DATA = [ - { - "vdxfid": "iSSxdyTcCp8VALGBGKy8R7ATYSRuK15NkL", - "hash160result": "92cb346dd5c5886898a7ebcab6a0e4dded19fffb", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::attestations.identitydata.firstname" - }, - "detail": "First Name", - "name": "firstname" - }, - { - "vdxfid": "i3jWsqLVnYyJu78E7mw6pbD3TazwZJpuk4", - "hash160result": "03d10a9768234e11d4cc2f73238cad4e7fc6d502", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::attestations.identitydata.lastname" - }, - "detail": "Last Name", - "name": "lastname" - }, - { - "vdxfid": "i9MRw6YUhXtP6DT8eufGnB5oRQ34TjDsdb", - "hash160result": "c886a8db81a891f9fc017001b6f6949588407940", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::attestations.identitydata.attestor" - }, - "detail": "Attestor", - "name": "attestor" - }, - { - "vdxfid": "iJvFSXk2EDeEu9BkJQSwAVeiochF6AYpfF", - "hash160result": "cac8e0c062de7abf4fd0a606c2b83eea275a67a9", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::attestations.identitydata.identity" - }, - "detail": "Identity", - "name": "identity" - }, - { - "vdxfid": "iLY58rsr39UB8BptNGYX63qPhcpv5N5yuC", - "hash160result": "ab812395536444a22463318c2691e886c6d925bb", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::attestations.type" - }, - "detail": "Document Type", - "name": "documenttype" +exports.ATTESTATION_OBJECT = { + "vdxfid": "iKzefmmS3nMXjLTsrQ1emigirJBTK7rBTP", + "hash160result": "5d57536b22b79ea267ae71852779db21258834b5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestation.object" + } +}; +exports.ATTESTATION_VIEW_RESPONSE = { + "vdxfid": "i5R9p3V1sxZ9p1NDV7nPkz1wvmQTUvuByY", + "hash160result": "872923256c56f6bda8256c5bb6a4c98d85f44c15", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestation.view.response" } -]; -// Allow lookup by vdxfid or name -exports.ATTESTATION_IDENTITY_DATA = {}; -IDENTITY_DATA.forEach((item) => exports.ATTESTATION_IDENTITY_DATA[item.vdxfid] = item); -IDENTITY_DATA.forEach((item) => exports.ATTESTATION_IDENTITY_DATA[item.name] = item); -const getbytes_std = function (data) { - var length = 20; - length += 1; // varint length 1 - length += 2; // ss type + ver (lengths) - length += varuint_1.default.encodingLength(Buffer.from(data, 'utf8').length); - length += Buffer.from(data, 'utf8').length; - return length; -}; -// Defined CVDXF_Data from main Verus Daemon. -const CVDXF_Data_objects = [ - { - "vdxfid": "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c", - "hash160result": "e5c061641228a399169211e666de18448b7b8bab", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.string" - }, - getbytes: getbytes_std - }, - //TODO: add more types -]; -exports.CVDXF_Data = {}; -CVDXF_Data_objects.forEach((item) => exports.CVDXF_Data[item.vdxfid] = item); +}; +exports.ATTESTATION_TYPE = { + "vdxfid": "iAJUD5mgT6MHz8ymF49XUtBDRS7uvYqNWZ", + "hash160result": "e56544849c038b7cfadb0a1074ac51df9207e24a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestation.type" + } +}; +// DATA TYPES +exports.DATA_TYPE_STRING = { + "vdxfid": "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c", + "hash160result": "e5c061641228a399169211e666de18448b7b8bab", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.string" + }, +}; diff --git a/src/vdxf/classes/attestationData.ts b/src/vdxf/classes/attestationData.ts index 6536675..034de29 100644 --- a/src/vdxf/classes/attestationData.ts +++ b/src/vdxf/classes/attestationData.ts @@ -2,7 +2,8 @@ import { Utf8DataVdxfObject, HexDataVdxfObject, BufferDataVdxfObject, - PNGImageVdxfObject + PNGImageVdxfObject, + VDXFObject } from ".."; import * as identitykeys from '../identityDataKeys'; import * as keylist from '../keys'; @@ -13,12 +14,14 @@ import varuint from '../../utils/varuint' import { I_ADDR_VERSION, HASH160_BYTE_LENGTH } from '../../constants/vdxf'; const { BufferReader, BufferWriter } = bufferutils; -export const AttestationClassTypes = { - BUFFER_DATA_STRING: 1, - BUFFER_DATA_BYTES: 2, - BUFFER_DATA_BASE64: 3, - URL: 4, - PNG_IMAGE: 5, +export const enum AttestationClassTypes { + BUFFER_DATA_STRING = 1, + BUFFER_DATA_BYTES = 2, + BUFFER_DATA_BASE64 = 3, + URL = 4, + PNG_IMAGE = 5, + KEY_ONLY = 6, + BOOLEAN = 7, } export const AttestationVdxfidMap = { @@ -31,17 +34,17 @@ export const AttestationVdxfidMap = { [identitykeys.IDENTITYDATA_CREATEDAT.vdxfid]: { name: "Created at", type: AttestationClassTypes.BUFFER_DATA_STRING }, [identitykeys.IDENTITYDATA_COMPLETEDAT.vdxfid]: { name: "Completed at", type: AttestationClassTypes.BUFFER_DATA_STRING }, [identitykeys.IDENTITYDATA_PREVIOUSATTEMPTID.vdxfid]: { name: "Previous attempt ID", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_SHAREABLEURL.vdxfid]: { name: "Shareable URL", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_SHAREABLEURL.vdxfid]: { name: "Shareable URL", type: AttestationClassTypes.URL }, [identitykeys.IDENTITYDATA_TEMPLATEID.vdxfid]: { name: "Template ID", type: AttestationClassTypes.BUFFER_DATA_STRING }, [identitykeys.IDENTITYDATA_TEMPLATEVERSION.vdxfid]: { name: "Template Version", type: AttestationClassTypes.BUFFER_DATA_STRING }, [identitykeys.IDENTITYDATA_PHONENUMBER.vdxfid]: { name: "Phone Number", type: AttestationClassTypes.BUFFER_DATA_STRING }, [identitykeys.IDENTITYDATA_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_OVER18.vdxfid]: { name: "Over 18", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_OVER21.vdxfid]: { name: "Over 21", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_OVER25.vdxfid]: { name: "OVer 25", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_OVER18.vdxfid]: { name: "Over 18", type: AttestationClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_OVER21.vdxfid]: { name: "Over 21", type: AttestationClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_OVER25.vdxfid]: { name: "Over 25", type: AttestationClassTypes.BOOLEAN }, [identitykeys.IDENTITYDATA_IPADDRESS.vdxfid]: { name: "IP Address", type: AttestationClassTypes.BUFFER_DATA_STRING }, [identitykeys.IDENTITYDATA_EMAIL.vdxfid]: { name: "Email Address", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_HOMEADDRESS.vdxfid]: { name: "Home address", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_HOMEADDRESS.vdxfid]: { name: "Home address", type: AttestationClassTypes.KEY_ONLY }, [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1.vdxfid]: { name: "Street 1", type: AttestationClassTypes.BUFFER_DATA_STRING }, [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2.vdxfid]: { name: "Street 2", type: AttestationClassTypes.BUFFER_DATA_STRING }, [identitykeys.IDENTITYDATA_HOMEADDRESS_CITY.vdxfid]: { name: "City", type: AttestationClassTypes.BUFFER_DATA_STRING }, @@ -51,191 +54,191 @@ export const AttestationVdxfidMap = { [identitykeys.IDENTITYDATA_IDNUMBER_VALUE.vdxfid]: { name: "ID Number", type: AttestationClassTypes.BUFFER_DATA_STRING }, [identitykeys.IDENTITYDATA_IDNUMBER_TYPE.vdxfid]: { name: "ID Type", type: AttestationClassTypes.BUFFER_DATA_STRING }, [identitykeys.IDENTITYDATA_STATUS.vdxfid]: { name: "Status", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_APPROVALS_ACCEPTEDTOS.vdxfid]: { name: "Accepted Terms and Conditions", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_APPROVALS_VERIFIEDSMS.vdxfid]: { name: "SMS Verified", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_APPROVALS_KYCCHECKED.vdxfid]: { name: "KYC Checked ok", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_APPROVALS_DOCUMENTSVERIFIED.vdxfid]: { name: "Documents Verified", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_APPROVALS_SELFIECHECKED.vdxfid]: { name: "Selfie Checked", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_APPROVALS_WATCHLIST_OK.vdxfid]: { name: "identitydata.approvals.watchlist.ok", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_APPROVALS_RISKCHECKOK.vdxfid]: { name: "identitydata.approvals.riskcheckok", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_FRONT.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_BACK.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_FRONT.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_BACK.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_FACE.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_IDNUMBER.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CATEGORY.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_EXPIRATIONDATE.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ADDRESS.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_STREET1.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CITY.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_REGION.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_POSTCODE.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_COUNTRY.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_MATCHED.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_NAME_MATCHED.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH_MATCHED.vdxfid]: { name: "identitydata.drivinglicence", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_SELFIECHECK_SUCCESS.vdxfid]: { name: "identitydata.selfiecheck.success", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_SELFIECHECK_IMAGE.vdxfid]: { name: "identitydata.selfiecheck.image", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_SELFIECHECK_VIDEO.vdxfid]: { name: "identitydata.selfiecheck.video", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_SELFIECHECK_DRIVINGLICENCE_MATCH.vdxfid]: { name: "identitydata.selfiecheck.drivinglicence.match", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_KYC_SUCCESS.vdxfid]: { name: "identitydata.kyc.success", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_KYC_ADDRESS_MATCHED.vdxfid]: { name: "identitydata.kyc.address.matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_KYC_TYPE.vdxfid]: { name: "identitydata.kyc.type", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_KYC_NAME_MATCHED.vdxfid]: { name: "identitydata.kyc.name.matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_KYC_DATEOFBIRTH_MATCHED.vdxfid]: { name: "identitydata.kyc.dateofbirth.matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_KYC_IDNUMBER_MATCHED.vdxfid]: { name: "identitydata.kyc.idnumber.matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_KYC_PHONENUMBER_MATCHED.vdxfid]: { name: "identitydata.kyc.phonenumber.matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_KYC_AREACODE_MATCHED.vdxfid]: { name: "identitydata.kyc.areacode.matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RISKCHECK_STATUS.vdxfid]: { name: "identitydata.riskcheck.status", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RISKCHECK_USERINTERACTIONS.vdxfid]: { name: "identitydata.riskcheck.userinteractions", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RISKCHECK_FRAUDRINGOK.vdxfid]: { name: "identitydata.riskcheck.fraudringok", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RISKCHECK_BOTNOTDETECTED.vdxfid]: { name: "identitydata.riskcheck.botnotdetected", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_EMAIL_ISDELIVERABLE.vdxfid]: { name: "identitydata.email.isdeliverable", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_EMAIL_BREACHCOUNT.vdxfid]: { name: "identitydata.email.breachcount", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_EMAIL_FIRSTBREACHEDAT.vdxfid]: { name: "identitydata.email.firstbreachedat", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_EMAIL_LASTBREACHEDAT.vdxfid]: { name: "identitydata.email.lastbreachedat", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_REGISTEREDAT.vdxfid]: { name: "identitydata.email.domain.registeredat", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_FREEPROVIDER.vdxfid]: { name: "identitydata.email.domain.freeprovider", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_CUSTOM.vdxfid]: { name: "identitydata.email.domain.custom", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_DISPOSABLE.vdxfid]: { name: "identitydata.email.domain.disposable", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS.vdxfid]: { name: "identitydata.email.domain.toplevel.suspicious", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_FRONT.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_BACK.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_CROPPED_FRONT.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_CROPPED_BACK.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_FACE.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_IDNUMBER.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_CATEGORY.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_EXPIRATIONDATE.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_ISSUING_REGION.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTH.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_STREET1.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_CITY.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_REGION.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_POSTCODE.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_COUNTRY.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_NAME_MATCHED.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "identitydata.idcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_FRONT.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_BACK.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_FRONT.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_BACK.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_FACE.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_IDNUMBER.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_CATEGORY.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_EXPIRATIONDATE.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_ISSUINGREGION.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTH.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_STREET1.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_CITY.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_REGION.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_POSTCODE.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_COUNTRY.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_NAME_MATCHED.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTHMATCHED.vdxfid]: { name: "identitydata.passport", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_FRONT.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_BACK.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_FRONT.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_BACK.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_FACE.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_IDNUMBER.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CATEGORY.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_EXPIRATIONDATE.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUINGREGION.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTH.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_STREET1.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_CITY.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_REGION.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_POSTCODE.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_COUNTRY.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_NAME_MATCHED.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTHMATCHED.vdxfid]: { name: "identitydata.residencepermit", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_FRONT.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_BACK.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_FRONT.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_BACK.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_FACE.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_IDNUMBER.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_CATEGORY.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_EXPIRATIONDATE.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUINGREGION.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTH.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_STREET1.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_CITY.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_REGION.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_POSTCODE.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_COUNTRY.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_NAME_MATCHED.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "identitydata.residentcard", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_ORIGINAL_FRONT.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_ORIGINAL_BACK.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_CROPPED_FRONT.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_CROPPED_BACK.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_FACE.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_IDNUMBER.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_CATEGORY.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_EXPIRATIONDATE.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_ISSUINGREGION.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTH.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_STREET1.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_CITY.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_REGION.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_POSTCODE.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_COUNTRY.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_NAME_MATCHED.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTHMATCHED.vdxfid]: { name: "identitydata.visa", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALFRONT.vdxfid]: { name: "identitydata.documentverification.originalfront", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALBACK.vdxfid]: { name: "identitydata.documentverification.originalback", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDFRONT.vdxfid]: { name: "identitydata.documentverification.croppedfront", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDBACK.vdxfid]: { name: "identitydata.documentverification.croppedback", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_FACE.vdxfid]: { name: "identitydata.documentverification.face", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_IDNUMBER.vdxfid]: { name: "identitydata.documentverification.idnumber", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CATEGORY.vdxfid]: { name: "identitydata.documentverification.category", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_EXPIRATIONDATE.vdxfid]: { name: "identitydata.documentverification.expirationdate", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY.vdxfid]: { name: "identitydata.documentverification.issuingcountry", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGREGION.vdxfid]: { name: "identitydata.documentverification.issuingregion", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTH.vdxfid]: { name: "identitydata.documentverification.dateofbirth", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ADDRESS.vdxfid]: { name: "identitydata.documentverification.address", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_ADDRESS_STREET1.vdxfid]: { name: "identitydata.address.street1", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_ADDRESS_STREET2.vdxfid]: { name: "identitydata.address.street2", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_ADDRESS_CITY.vdxfid]: { name: "identitydata.address.city", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_ADDRESS_REGION.vdxfid]: { name: "identitydata.address.region", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_ADDRESS_POSTCODE.vdxfid]: { name: "identitydata.address.postcode", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_ADDRESS_COUNTRY.vdxfid]: { name: "identitydata.address.country", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "identitydata.documentverification.matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED.vdxfid]: { name: "identitydata.documentverification.name.matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED.vdxfid]: { name: "identitydata.documentverification.dateofbirthmatched", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_APPROVALS_ACCEPTEDTOS.vdxfid]: { name: "Accepted Terms and Conditions", type: AttestationClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_APPROVALS_VERIFIEDSMS.vdxfid]: { name: "SMS Verified", type: AttestationClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_APPROVALS_KYCCHECKED.vdxfid]: { name: "KYC Checked ok", type: AttestationClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_APPROVALS_DOCUMENTSVERIFIED.vdxfid]: { name: "Documents Verified", type: AttestationClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_APPROVALS_SELFIECHECKED.vdxfid]: { name: "Selfie Checked", type: AttestationClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_APPROVALS_WATCHLIST_OK.vdxfid]: { name: "Watchlist ok", type: AttestationClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Riskcheck ok", type: AttestationClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE.vdxfid]: { name: "Driving Licence", type: AttestationClassTypes.KEY_ONLY }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_FRONT.vdxfid]: { name: "Driving Licence Front", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_BACK.vdxfid]: { name: "Driving Licence Back", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_FRONT.vdxfid]: { name: "Driving Licence Front", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_BACK.vdxfid]: { name: "Driving Licence Back", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_FACE.vdxfid]: { name: "Driving Licence Face", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_IDNUMBER.vdxfid]: { name: "Driving Licence Number", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CATEGORY.vdxfid]: { name: "Driving Licence Catagory", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_EXPIRATIONDATE.vdxfid]: { name: "Driving Licence expiry date", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Driving Licence matches country", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION.vdxfid]: { name: "Driving Licence issuing reigon", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH.vdxfid]: { name: "Driving Licence Date of Birth", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ADDRESS.vdxfid]: { name: "Driving Licence Address", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_STREET1.vdxfid]: { name: "Driving Licence Street 1", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CITY.vdxfid]: { name: "Driving Licence City", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_REGION.vdxfid]: { name: "Driving Licence Region", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_POSTCODE.vdxfid]: { name: "Driving Licence ZIP/Post Code", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_COUNTRY.vdxfid]: { name: "Driving Licence Country", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_MATCHED.vdxfid]: { name: "Driving Licence Matched all", type: AttestationClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_NAME_MATCHED.vdxfid]: { name: "Driving Licence name matched", type: AttestationClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH_MATCHED.vdxfid]: { name: "Driving Licence Date of Birth Matched", type: AttestationClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_SELFIECHECK_SUCCESS.vdxfid]: { name: "Selfie Check success", type: AttestationClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_SELFIECHECK_IMAGE.vdxfid]: { name: "Selfie Check image", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_SELFIECHECK_VIDEO.vdxfid]: { name: "Selfie Check video", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_SELFIECHECK_DRIVINGLICENCE_MATCH.vdxfid]: { name: "Selfie Driving Licence match", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_KYC_SUCCESS.vdxfid]: { name: "KYC Success", type: AttestationClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_KYC_ADDRESS_MATCHED.vdxfid]: { name: "KYC Address Matched", type: AttestationClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_KYC_TYPE.vdxfid]: { name: "KYC Type", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_KYC_NAME_MATCHED.vdxfid]: { name: "KYC Name Matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_KYC_DATEOFBIRTH_MATCHED.vdxfid]: { name: "KYC Date of Birth Matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_KYC_IDNUMBER_MATCHED.vdxfid]: { name: "KYC ID Matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_KYC_PHONENUMBER_MATCHED.vdxfid]: { name: "KYC Phone number matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_KYC_AREACODE_MATCHED.vdxfid]: { name: "KYC Areacode Matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RISKCHECK_STATUS.vdxfid]: { name: "Risk Check Status", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RISKCHECK_USERINTERACTIONS.vdxfid]: { name: "Risck Check User Interactions", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RISKCHECK_FRAUDRINGOK.vdxfid]: { name: "Risk Check No Fraudring", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RISKCHECK_BOTNOTDETECTED.vdxfid]: { name: "Risk Check bot free", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_EMAIL_ISDELIVERABLE.vdxfid]: { name: "Email address is deliverable", type: AttestationClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_EMAIL_BREACHCOUNT.vdxfid]: { name: "Email breach count", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_EMAIL_FIRSTBREACHEDAT.vdxfid]: { name: "Email first breach date", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_EMAIL_LASTBREACHEDAT.vdxfid]: { name: "Email last breach date", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_REGISTEREDAT.vdxfid]: { name: "Email domain registered at", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_FREEPROVIDER.vdxfid]: { name: "Email is free provider", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_CUSTOM.vdxfid]: { name: "Email Domain is custom", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_DISPOSABLE.vdxfid]: { name: "Email Domain Disposable", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS.vdxfid]: { name: "Email top level Domain Suspicious", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD.vdxfid]: { name: "ID Card", type: AttestationClassTypes.KEY_ONLY }, + [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_FRONT.vdxfid]: { name: "ID Card Front", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_BACK.vdxfid]: { name: "ID Card Back", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_IDCARD_CROPPED_FRONT.vdxfid]: { name: "ID Card Front", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_IDCARD_CROPPED_BACK.vdxfid]: { name: "ID Card Back", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_IDCARD_FACE.vdxfid]: { name: "ID Card Face", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_IDCARD_IDNUMBER.vdxfid]: { name: "ID Card ID Number", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_CATEGORY.vdxfid]: { name: "ID Card Category", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_EXPIRATIONDATE.vdxfid]: { name: "ID Card Expiry date", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "ID Card Issuing Country Matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_ISSUING_REGION.vdxfid]: { name: "ID Card Issuing Region", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTH.vdxfid]: { name: "ID Card Date of Birth", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS.vdxfid]: { name: "ID Card Address", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_STREET1.vdxfid]: { name: "ID Card Street 1", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_CITY.vdxfid]: { name: "ID Card City", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_REGION.vdxfid]: { name: "ID Card Region", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_POSTCODE.vdxfid]: { name: "ID Card Zip/Post Code", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_COUNTRY.vdxfid]: { name: "ID Card Country", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "ID Card Matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_NAME_MATCHED.vdxfid]: { name: "ID Card Name Matched", type: AttestationClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "ID Card Date of Birth Matched", type: AttestationClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_PASSPORT.vdxfid]: { name: "Passport", type: AttestationClassTypes.KEY_ONLY }, + [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_FRONT.vdxfid]: { name: "Passport front", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_BACK.vdxfid]: { name: "Passport back", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_FRONT.vdxfid]: { name: "Passport front", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_BACK.vdxfid]: { name: "Passport back", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_PASSPORT_FACE.vdxfid]: { name: "Passport face", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_PASSPORT_IDNUMBER.vdxfid]: { name: "Passport ID Number", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_CATEGORY.vdxfid]: { name: "Passport Category", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_EXPIRATIONDATE.vdxfid]: { name: "Passport expiry date", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Passport issuing country matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_REGION.vdxfid]: { name: "Passport issuing region matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTH.vdxfid]: { name: "Passport date of birth", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS.vdxfid]: { name: "Passport address", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_STREET1.vdxfid]: { name: "Passport street 1", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_CITY.vdxfid]: { name: "Passport city", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_REGION.vdxfid]: { name: "Passport region", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_POSTCODE.vdxfid]: { name: "Passport zip/post code", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_COUNTRY.vdxfid]: { name: "Passport country", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Passport matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_NAME_MATCHED.vdxfid]: { name: "Passport Name Matched", type: AttestationClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTHMATCHED.vdxfid]: { name: "Passport date of birth matched", type: AttestationClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT.vdxfid]: { name: "Residence Permit", type: AttestationClassTypes.KEY_ONLY }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_FRONT.vdxfid]: { name: "Residence Permit front", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_BACK.vdxfid]: { name: "Residence Permit back", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_FRONT.vdxfid]: { name: "Residence Permit front", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_BACK.vdxfid]: { name: "Residence Permit back", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_FACE.vdxfid]: { name: "Residence Permit face", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_IDNUMBER.vdxfid]: { name: "Residence Permit ID Number", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CATEGORY.vdxfid]: { name: "Residence Permit category", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_EXPIRATIONDATE.vdxfid]: { name: "Residence Permit expiry date", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Residence Permit issuing country matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_REGION.vdxfid]: { name: "Residence Permit issuing region matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTH.vdxfid]: { name: "Residence Permit date of birth", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS.vdxfid]: { name: "Residence Permit Address", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_STREET1.vdxfid]: { name: "Residence Permit Street 1", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_CITY.vdxfid]: { name: "Residence Permit City", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_REGION.vdxfid]: { name: "Residence Permit Region", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_POSTCODE.vdxfid]: { name: "Residence Permit Zip/Post code", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_COUNTRY.vdxfid]: { name: "Residence Permit Country", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Residence Permit Matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_NAME_MATCHED.vdxfid]: { name: "Residence Permit name matched", type: AttestationClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTHMATCHED.vdxfid]: { name: "Residence Permit date of birth matched", type: AttestationClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_RESIDENTCARD.vdxfid]: { name: "Resident Card", type: AttestationClassTypes.KEY_ONLY }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_FRONT.vdxfid]: { name: "Resident Card Front", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_BACK.vdxfid]: { name: "Resident Card Back", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_FRONT.vdxfid]: { name: "Resident Card Front", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_BACK.vdxfid]: { name: "Resident Card Back", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_FACE.vdxfid]: { name: "Resident Card Face", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_IDNUMBER.vdxfid]: { name: "Resident Card ID Number", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_CATEGORY.vdxfid]: { name: "Resident Card Category", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_EXPIRATIONDATE.vdxfid]: { name: "Resident Card Expiry Date", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Resident Card Issuing Country Matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_REGION.vdxfid]: { name: "Resident Card Issuing Region", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTH.vdxfid]: { name: "Resident Card date of birth", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS.vdxfid]: { name: "Resident Card address", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_STREET1.vdxfid]: { name: "Resident Card Street 1", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_CITY.vdxfid]: { name: "Resident Card City", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_REGION.vdxfid]: { name: "Resident Card Region", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_POSTCODE.vdxfid]: { name: "Resident Card Zip/Post Code", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_COUNTRY.vdxfid]: { name: "Resident Card Country", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Resident Card Matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_NAME_MATCHED.vdxfid]: { name: "Resident Card Name Matched", type: AttestationClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "Resident Card date of birth Matched", type: AttestationClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_VISA.vdxfid]: { name: "Visa", type: AttestationClassTypes.KEY_ONLY }, + [identitykeys.IDENTITYDATA_VISA_ORIGINAL_FRONT.vdxfid]: { name: "Visa front", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_VISA_ORIGINAL_BACK.vdxfid]: { name: "Visa back", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_VISA_CROPPED_FRONT.vdxfid]: { name: "Visa front", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_VISA_CROPPED_BACK.vdxfid]: { name: "Visa back", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_VISA_FACE.vdxfid]: { name: "Visa face", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_VISA_IDNUMBER.vdxfid]: { name: "Visa ID Number", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_CATEGORY.vdxfid]: { name: "Visa Category", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_EXPIRATIONDATE.vdxfid]: { name: "Visa expiry date", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Visa issuing country matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_ISSUING_REGION.vdxfid]: { name: "Visa issuing region", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTH.vdxfid]: { name: "Visa date of birth", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS.vdxfid]: { name: "Visa address", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_STREET1.vdxfid]: { name: "Visa Street 1", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_CITY.vdxfid]: { name: "Visa City", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_REGION.vdxfid]: { name: "Visa Region", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_POSTCODE.vdxfid]: { name: "Visa Zip/Post Code", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_COUNTRY.vdxfid]: { name: "Visa Country", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Visa document matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_NAME_MATCHED.vdxfid]: { name: "Visa name matched", type: AttestationClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTHMATCHED.vdxfid]: { name: "Visa date of birth matched", type: AttestationClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALFRONT.vdxfid]: { name: "Original Front", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALBACK.vdxfid]: { name: "Original Back", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDFRONT.vdxfid]: { name: "Cropped Front", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDBACK.vdxfid]: { name: "Cropped Back", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_FACE.vdxfid]: { name: "Face", type: AttestationClassTypes.URL }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_IDNUMBER.vdxfid]: { name: "ID Number", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CATEGORY.vdxfid]: { name: "Category", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_EXPIRATIONDATE.vdxfid]: { name: "Expiry Date", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY.vdxfid]: { name: "Issuing Country", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUING_REGION.vdxfid]: { name: "Issuing Region", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ADDRESS.vdxfid]: { name: "Address", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_ADDRESS_STREET1.vdxfid]: { name: "Street 1", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_ADDRESS_STREET2.vdxfid]: { name: "Street 2", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_ADDRESS_CITY.vdxfid]: { name: "City", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_ADDRESS_REGION.vdxfid]: { name: "Region", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_ADDRESS_POSTCODE.vdxfid]: { name: "Zip/Postal Code", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_ADDRESS_COUNTRY.vdxfid]: { name: "Country", type: AttestationClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Document Matched", type: AttestationClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED.vdxfid]: { name: "Name Matched", type: AttestationClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED.vdxfid]: { name: "Date of Birth Matched", type: AttestationClassTypes.BOOLEAN }, [keylist.ATTESTATION_TYPE.vdxfid]: { name: "Attestation Type", type: AttestationClassTypes.BUFFER_DATA_STRING }, }; export class AttestationDataType { - dataItem: Utf8DataVdxfObject | HexDataVdxfObject | BufferDataVdxfObject | PNGImageVdxfObject; + dataItem: Utf8DataVdxfObject | HexDataVdxfObject | BufferDataVdxfObject | PNGImageVdxfObject | VDXFObject; salt: Buffer; constructor(data: any, vdxfkey: string, salt?: string) { @@ -256,6 +259,12 @@ export class AttestationDataType { case AttestationClassTypes.PNG_IMAGE: this.dataItem = new PNGImageVdxfObject(data, vdxfkey); break; + case AttestationClassTypes.KEY_ONLY: + this.dataItem = new VDXFObject(vdxfkey); + break; + case AttestationClassTypes.BOOLEAN: + this.dataItem = new HexDataVdxfObject(data, vdxfkey); + break; default: this.dataItem = new HexDataVdxfObject(data, vdxfkey); break; diff --git a/src/vdxf/identityDataKeys.ts b/src/vdxf/identityDataKeys.ts index 441e9e3..9517ed5 100644 --- a/src/vdxf/identityDataKeys.ts +++ b/src/vdxf/identityDataKeys.ts @@ -1293,7 +1293,7 @@ export const IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED: VDXFKeyInterface = { } } -export const IDENTITYDATA_PASSPORT_ISSUINGREGION: VDXFKeyInterface = { +export const IDENTITYDATA_PASSPORT_ISSUING_REGION: VDXFKeyInterface = { "vdxfid": "i87HPTEfVQ9HKF8zrNppBEBF8wur6BAGBf", "indexid": "xCwPrFfkLiMwwR22i4Uy9chnAbvrufhBnx", "hash160result": "3f8308ca4fe693714fdab6fb3871698a5a2bd432", @@ -1563,7 +1563,7 @@ export const IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED: VDXFKeyInterf } } -export const IDENTITYDATA_RESIDENCEPERMIT_ISSUINGREGION: VDXFKeyInterface = { +export const IDENTITYDATA_RESIDENCEPERMIT_ISSUING_REGION: VDXFKeyInterface = { "vdxfid": "iLZnhoDnggyo9LGiyS8xvEovkSn1yRuRjz", "indexid": "xRPuAbesY1CTmW9kq7o7tdLTn6o2m96TLY", "hash160result": "f969f7afa0599e431674b2e76bc4ee5f3cf778bb", @@ -1833,7 +1833,7 @@ export const IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED: VDXFKeyInterface } } -export const IDENTITYDATA_RESIDENTCARD_ISSUINGREGION: VDXFKeyInterface = { +export const IDENTITYDATA_RESIDENTCARD_ISSUING_REGION: VDXFKeyInterface = { "vdxfid": "iQSeWkZJbBknqaAvrVk8UpzXcbDcD3JwZK", "indexid": "xVGkyYzPSVyTTk3xiBQHTDX4eFEd6nwER3", "hash160result": "f46eda08f73c5415674385dafb8f913a5ab8ffe5", @@ -2103,7 +2103,7 @@ export const IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED: VDXFKeyInterface = { } } -export const IDENTITYDATA_VISA_ISSUINGREGION: VDXFKeyInterface = { +export const IDENTITYDATA_VISA_ISSUING_REGION: VDXFKeyInterface = { "vdxfid": "iE5fNZUT4G8ZnR1BbJTNCgc54FUFwqeUcp", "indexid": "xJumqMuXuaMEQatDSz7XB58c5uVGrJL3e3", "hash160result": "d7dd15c309c0ae09f5a7293b4b0cf15ca7715674", @@ -2336,7 +2336,7 @@ export const IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY: VDXFKeyInterface } } -export const IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGREGION: VDXFKeyInterface = { +export const IDENTITYDATA_DOCUMENTVERIFICATION_ISSUING_REGION: VDXFKeyInterface = { "vdxfid": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL", "indexid": "xGomhGg7SbfRombFesZCzxapM7Lc5aQFa4", "hash160result": "1ff5e3f915ccb6616cbc04e0b51961f98694435d", diff --git a/src/vdxf/keymap.ts b/src/vdxf/keymap.ts index 754a07e..8982b1e 100644 --- a/src/vdxf/keymap.ts +++ b/src/vdxf/keymap.ts @@ -1,5 +1,5 @@ import * as keylist from './keys'; import * as AttestationData from './classes/attestationData'; -export let keymap = Object.keys(keylist).reduce((obj: { [key: string]: any }, item) => { obj[keylist[item].vdxfid] = keylist[item]; return obj }, {}); - -export const AttestationVdxfidMap = AttestationData.AttestationVdxfidMap; \ No newline at end of file +export const keymap = Object.keys(keylist).reduce((obj: { [key: string]: any }, item) => { obj[keylist[item].vdxfid] = keylist[item]; return obj }, {}); +export const attestationDataKeys = Object.keys(AttestationData).reduce((obj: { [key: string]: any }, item) => { obj[AttestationData[item].vdxfid] = AttestationData[item]; return obj }, {}); +export const AttestationDataVdxfidMap = AttestationData.AttestationVdxfidMap; \ No newline at end of file From fe71ac87c0134fd8a1c1617ef0b3d0e8aa415895 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Fri, 16 Feb 2024 14:40:56 +0000 Subject: [PATCH 067/120] Dependencies updates --- dist/vdxf/classes/MMR.js | 1 - package.json | 8 +++----- src/vdxf/classes/MMR.ts | 2 +- yarn.lock | 18 ++++-------------- 4 files changed, 8 insertions(+), 21 deletions(-) diff --git a/dist/vdxf/classes/MMR.js b/dist/vdxf/classes/MMR.js index 5caf01b..6d6e7ee 100644 --- a/dist/vdxf/classes/MMR.js +++ b/dist/vdxf/classes/MMR.js @@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.CMerkleMountainView = exports.CMMRProof = exports.CMMRBranch = exports.CMerkleMountainRange = exports.CMMRNode = void 0; var blake2b = require('blake2b'); -const { Lock } = require('semaphore-async-await'); const bn_js_1 = require("bn.js"); const varuint_1 = require("../../utils/varuint"); const bufferutils_1 = require("../../utils/bufferutils"); diff --git a/package.json b/package.json index 5641309..75aedaf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "verus-typescript-primitives", - "version": "1.0.0", + "version": "1.0.1", "main": "dist/index.js", "types": "dist/index.d.ts", "files": [ @@ -21,15 +21,13 @@ "license": "MIT", "dependencies": { "base64url": "3.0.1", - "bech32": "^1.1.3", + "bech32": "0.0.3", "blake2b": "https://github.com/VerusCoin/blake2b", "bn.js": "5.2.1", "bs58check": "https://github.com/bitcoinjs/bs58check", - "create-hash": "1.2.0", - "semaphore-async-await": "^1.5.1" + "create-hash": "1.2.0" }, "devDependencies": { - "@types/blake2b": "^2.1.3", "@types/bn.js": "5.1.1", "@types/bs58check": "2.1.0", "@types/create-hash": "1.2.2", diff --git a/src/vdxf/classes/MMR.ts b/src/vdxf/classes/MMR.ts index 92549ea..c115e05 100644 --- a/src/vdxf/classes/MMR.ts +++ b/src/vdxf/classes/MMR.ts @@ -2,7 +2,7 @@ // Adapted to Verus Blake2b MMR. var blake2b = require('blake2b') -const { Lock } = require('semaphore-async-await') + import { BN } from 'bn.js'; import { VDXFObject } from "../"; import varuint from '../../utils/varuint' diff --git a/yarn.lock b/yarn.lock index 4faeb6d..cc62980 100644 --- a/yarn.lock +++ b/yarn.lock @@ -641,11 +641,6 @@ dependencies: "@babel/types" "^7.3.0" -"@types/blake2b@^2.1.3": - version "2.1.3" - resolved "https://registry.yarnpkg.com/@types/blake2b/-/blake2b-2.1.3.tgz#bd6bf2fbabd888b5580d7e932de5960d087db094" - integrity sha512-MFCdX0MNxFBP/xEILO5Td0kv6nI7+Q2iRWZbTL/yzH2/eDVZS5Wd1LHdsmXClvsCyzqaZfHFzZaN6BUeUCfSDA== - "@types/bn.js@5.1.1": version "5.1.1" resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.1.tgz#b51e1b55920a4ca26e9285ff79936bbdec910682" @@ -1022,10 +1017,10 @@ base64url@3.0.1: resolved "https://registry.yarnpkg.com/base64url/-/base64url-3.0.1.tgz#6399d572e2bc3f90a9a8b22d5dbb0a32d33f788d" integrity sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A== -bech32@^1.1.3: - version "1.1.4" - resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" - integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== +bech32@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/bech32/-/bech32-0.0.3.tgz#736747c4a6531c5d8937d0400498de30e93b2f9c" + integrity sha512-O+K1w8P/aAOLcYwwQ4sbiPYZ51ZIW95lnS4/6nE8Aib/z+OOddQIIPdu2qi94qGDp4HhYy/wJotttXKkak1lXg== blake2b-wasm@^2.4.0: version "2.4.0" @@ -2611,11 +2606,6 @@ safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -semaphore-async-await@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/semaphore-async-await/-/semaphore-async-await-1.5.1.tgz#857bef5e3644601ca4b9570b87e9df5ca12974fa" - integrity sha512-b/ptP11hETwYWpeilHXXQiV5UJNJl7ZWWooKRE5eBIYWoom6dZ0SluCIdCtKycsMtZgKWE01/qAw6jblw1YVhg== - semver@7.x, semver@^7.3.5, semver@^7.3.7: version "7.3.7" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" From 66a1ca0ab971a5ba86bb9eb6b3486ee805e872ce Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Mon, 19 Feb 2024 15:55:27 +0000 Subject: [PATCH 068/120] Added Personal Info --- dist/vdxf/classes/PersonalData.d.ts | 37 +++++ dist/vdxf/classes/PersonalData.js | 92 ++++++++++++ dist/vdxf/classes/attestationData.d.ts | 3 +- dist/vdxf/classes/attestationData.js | 17 ++- dist/vdxf/identityDataKeys.d.ts | 7 + dist/vdxf/identityDataKeys.js | 65 ++++++++- src/__tests__/attestation/attestation.test.ts | 10 +- .../attestation/personalInfo.test.ts | 42 ++++++ src/vdxf/classes/PersonalData.ts | 132 ++++++++++++++++++ src/vdxf/classes/attestationData.ts | 23 +-- src/vdxf/identityDataKeys.ts | 69 +++++++++ 11 files changed, 475 insertions(+), 22 deletions(-) create mode 100644 dist/vdxf/classes/PersonalData.d.ts create mode 100644 dist/vdxf/classes/PersonalData.js create mode 100644 src/__tests__/attestation/personalInfo.test.ts create mode 100644 src/vdxf/classes/PersonalData.ts diff --git a/dist/vdxf/classes/PersonalData.d.ts b/dist/vdxf/classes/PersonalData.d.ts new file mode 100644 index 0000000..1a31214 --- /dev/null +++ b/dist/vdxf/classes/PersonalData.d.ts @@ -0,0 +1,37 @@ +/// +import { VDXFObject } from ".."; +import { AttestationDataType } from './attestationData'; +export declare class PersonalData extends VDXFObject { + type: PersonalData.TYPE; + id: string; + data: { + [category: string]: Array; + }; + linkedAttestation: string; + constructor(data?: { + type?: PersonalData.TYPE; + id?: string; + data?: { + [category: string]: Array; + }; + linkedAttestation?: string; + }, vdxfkey?: string); + dataByteLength(): number; + toDataBuffer(): Buffer; + fromDataBuffer(buffer: Buffer, offset?: number): number; + toJson(): { + type: PersonalData.TYPE; + id: string; + data: { + [category: string]: AttestationDataType[]; + }; + linkedAttestation: string; + }; +} +export declare namespace PersonalData { + enum TYPE { + REQUEST = 1, + SUBMITTED = 2, + DESIGNATED = 3 + } +} diff --git a/dist/vdxf/classes/PersonalData.js b/dist/vdxf/classes/PersonalData.js new file mode 100644 index 0000000..1c82868 --- /dev/null +++ b/dist/vdxf/classes/PersonalData.js @@ -0,0 +1,92 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PersonalData = void 0; +const varuint_1 = require("../../utils/varuint"); +const bufferutils_1 = require("../../utils/bufferutils"); +const address_1 = require("../../utils/address"); +const vdxf_1 = require("../../constants/vdxf"); +const __1 = require(".."); +const identityDataKeys_1 = require("../identityDataKeys"); +const attestationData_1 = require("./attestationData"); +const { BufferReader, BufferWriter } = bufferutils_1.default; +class PersonalData extends __1.VDXFObject { + constructor(data, vdxfkey = identityDataKeys_1.PERSONAL_INFO_OBJECT.vdxfid) { + super(vdxfkey); + this.id = ''; + this.linkedAttestation = ''; + if (data) { + Object.assign(this, data); + } + } + dataByteLength() { + let byteLength = 0; + byteLength += 1; // type + byteLength += varuint_1.default.encodingLength(this.id.length); + byteLength += this.id.length; + byteLength += varuint_1.default.encodingLength(Object.keys(this.data).length); + for (const [key, value] of Object.entries(this.data)) { + byteLength += vdxf_1.HASH160_BYTE_LENGTH; // category + byteLength += varuint_1.default.encodingLength(value.length); + for (const attestation of value) { + byteLength += attestation.dataBytelength(); + } + } + byteLength += varuint_1.default.encodingLength(this.linkedAttestation.length); + byteLength += this.linkedAttestation.length; + return byteLength; + } + toDataBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); + bufferWriter.writeCompactSize(this.type); + bufferWriter.writeVarSlice(Buffer.from(this.id, 'utf8')); + bufferWriter.writeCompactSize(Object.keys(this.data).length); + for (const [key, value] of Object.entries(this.data)) { + bufferWriter.writeSlice((0, address_1.fromBase58Check)(key).hash); + bufferWriter.writeCompactSize(value.length); + for (const attestation of value) { + bufferWriter.writeSlice(attestation.toBuffer()); + } + } + bufferWriter.writeVarSlice(Buffer.from(this.linkedAttestation, 'utf8')); + return bufferWriter.buffer; + } + fromDataBuffer(buffer, offset) { + const reader = new BufferReader(buffer, offset); + this.type = reader.readCompactSize(); + this.id = reader.readVarSlice().toString('utf8'); + const dataLength = reader.readCompactSize(); + if (!this.data) { + this.data = {}; + } + for (var i = 0; i < dataLength; i++) { + const category = (0, address_1.toBase58Check)(reader.readSlice(vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION); + const attestationLength = reader.readCompactSize(); + const attestations = []; + for (var j = 0; j < attestationLength; j++) { + const attestation = new attestationData_1.AttestationDataType(null, (0, address_1.toBase58Check)(reader.buffer.slice(reader.offset, reader.offset + vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION)); + reader.offset = attestation.fromDataBuffer(reader.buffer, reader.offset); + attestations.push(attestation); + } + this.data[category] = attestations; + } + this.linkedAttestation = reader.readVarSlice().toString('utf8'); + return reader.offset; + } + toJson() { + return { + type: this.type, + id: this.id, + data: this.data, + linkedAttestation: this.linkedAttestation + }; + } +} +exports.PersonalData = PersonalData; +(function (PersonalData) { + let TYPE; + (function (TYPE) { + TYPE[TYPE["REQUEST"] = 1] = "REQUEST"; + TYPE[TYPE["SUBMITTED"] = 2] = "SUBMITTED"; + TYPE[TYPE["DESIGNATED"] = 3] = "DESIGNATED"; + })(TYPE = PersonalData.TYPE || (PersonalData.TYPE = {})); +})(PersonalData = exports.PersonalData || (exports.PersonalData = {})); diff --git a/dist/vdxf/classes/attestationData.d.ts b/dist/vdxf/classes/attestationData.d.ts index a7543ca..279c2d8 100644 --- a/dist/vdxf/classes/attestationData.d.ts +++ b/dist/vdxf/classes/attestationData.d.ts @@ -18,7 +18,8 @@ export declare const AttestationVdxfidMap: { export declare class AttestationDataType { dataItem: Utf8DataVdxfObject | HexDataVdxfObject | BufferDataVdxfObject | PNGImageVdxfObject | VDXFObject; salt: Buffer; - constructor(data: any, vdxfkey: string, salt?: string); + constructor(data?: any, vdxfkey?: string, salt?: string); + getDataItem(vdxfkey: any, data: any): any; dataBytelength(): number; toBuffer(): Buffer; fromDataBuffer(buffer: Buffer, offset?: number, vdxfkey?: string): number; diff --git a/dist/vdxf/classes/attestationData.js b/dist/vdxf/classes/attestationData.js index 053de9e..1d6448d 100644 --- a/dist/vdxf/classes/attestationData.js +++ b/dist/vdxf/classes/attestationData.js @@ -223,7 +223,14 @@ exports.AttestationVdxfidMap = { }; class AttestationDataType { constructor(data, vdxfkey, salt) { - switch (exports.AttestationVdxfidMap[vdxfkey].type) { + this.salt = Buffer.alloc(0); + this.getDataItem(vdxfkey, data); + if (salt) { + this.salt = Buffer.from(salt, "hex"); + } + } + getDataItem(vdxfkey, data) { + switch (vdxfkey && exports.AttestationVdxfidMap[vdxfkey].type || null) { case 1 /* AttestationClassTypes.BUFFER_DATA_STRING */: this.dataItem = new __1.Utf8DataVdxfObject(data, vdxfkey); break; @@ -249,13 +256,11 @@ class AttestationDataType { this.dataItem = new __1.HexDataVdxfObject(data, vdxfkey); break; } - if (salt) { - this.salt = Buffer.from(salt, "hex"); - } } dataBytelength() { let length = 0; length += this.dataItem.byteLength(); + length += varuint_1.default.encodingLength(this.salt.length); length += this.salt.length; return length; } @@ -263,13 +268,13 @@ class AttestationDataType { const buffer = Buffer.alloc(this.dataBytelength()); const writer = new bufferutils_1.default.BufferWriter(buffer); writer.writeSlice(this.dataItem.toBuffer()); - writer.writeSlice(this.salt); + writer.writeVarSlice(this.salt); return writer.buffer; } fromDataBuffer(buffer, offset = 0, vdxfkey) { const reader = new bufferutils_1.default.BufferReader(buffer, offset); reader.offset = this.dataItem.fromBuffer(reader.buffer, reader.offset, vdxfkey); - this.salt = reader.readSlice(32); + this.salt = reader.readVarSlice(); return reader.offset; } } diff --git a/dist/vdxf/identityDataKeys.d.ts b/dist/vdxf/identityDataKeys.d.ts index b7f4362..9714003 100644 --- a/dist/vdxf/identityDataKeys.d.ts +++ b/dist/vdxf/identityDataKeys.d.ts @@ -207,3 +207,10 @@ export declare const IDENTITYDATA_ADDRESS_COUNTRY: VDXFKeyInterface; export declare const IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED: VDXFKeyInterface; export declare const IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED: VDXFKeyInterface; export declare const IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED: VDXFKeyInterface; +export declare const IDENTITYDATA_NAME: VDXFKeyInterface; +export declare const IDENTITYDATA_PERSONAL_DETAILS: VDXFKeyInterface; +export declare const IDENTITYDATA_CONTACT: VDXFKeyInterface; +export declare const IDENTITYDATA_LOCATIONS: VDXFKeyInterface; +export declare const IDENTITYDATA_BANKING_INFORMATION: VDXFKeyInterface; +export declare const IDENTITYDATA_DOCUMENTS_AND_IMAGES: VDXFKeyInterface; +export declare const PERSONAL_INFO_OBJECT: VDXFKeyInterface; diff --git a/dist/vdxf/identityDataKeys.js b/dist/vdxf/identityDataKeys.js index 60813d7..3013c1c 100644 --- a/dist/vdxf/identityDataKeys.js +++ b/dist/vdxf/identityDataKeys.js @@ -4,7 +4,7 @@ exports.IDENTITYDATA_DRIVINGLICENCE_STREET1 = exports.IDENTITYDATA_DRIVINGLICENC exports.IDENTITYDATA_IDCARD_ADDRESS_COUNTRY = exports.IDENTITYDATA_IDCARD_ADDRESS_POSTCODE = exports.IDENTITYDATA_IDCARD_ADDRESS_REGION = exports.IDENTITYDATA_IDCARD_ADDRESS_CITY = exports.IDENTITYDATA_IDCARD_ADDRESS_STREET1 = exports.IDENTITYDATA_IDCARD_ADDRESS = exports.IDENTITYDATA_IDCARD_DATEOFBIRTH = exports.IDENTITYDATA_IDCARD_ISSUING_REGION = exports.IDENTITYDATA_IDCARD_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_IDCARD_EXPIRATIONDATE = exports.IDENTITYDATA_IDCARD_CATEGORY = exports.IDENTITYDATA_IDCARD_IDNUMBER = exports.IDENTITYDATA_IDCARD_FACE = exports.IDENTITYDATA_IDCARD_CROPPED_BACK = exports.IDENTITYDATA_IDCARD_CROPPED_FRONT = exports.IDENTITYDATA_IDCARD_ORIGINAL_BACK = exports.IDENTITYDATA_IDCARD_ORIGINAL_FRONT = exports.IDENTITYDATA_IDCARD = exports.IDENTITYDATA_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS = exports.IDENTITYDATA_EMAIL_DOMAIN_DISPOSABLE = exports.IDENTITYDATA_EMAIL_DOMAIN_CUSTOM = exports.IDENTITYDATA_EMAIL_DOMAIN_FREEPROVIDER = exports.IDENTITYDATA_EMAIL_DOMAIN_REGISTEREDAT = exports.IDENTITYDATA_EMAIL_LASTBREACHEDAT = exports.IDENTITYDATA_EMAIL_FIRSTBREACHEDAT = exports.IDENTITYDATA_EMAIL_BREACHCOUNT = exports.IDENTITYDATA_EMAIL_ISDELIVERABLE = exports.IDENTITYDATA_RISKCHECK_BOTNOTDETECTED = exports.IDENTITYDATA_RISKCHECK_FRAUDRINGOK = exports.IDENTITYDATA_RISKCHECK_USERINTERACTIONS = exports.IDENTITYDATA_RISKCHECK_STATUS = exports.IDENTITYDATA_KYC_AREACODE_MATCHED = exports.IDENTITYDATA_KYC_PHONENUMBER_MATCHED = exports.IDENTITYDATA_KYC_IDNUMBER_MATCHED = exports.IDENTITYDATA_KYC_DATEOFBIRTH_MATCHED = exports.IDENTITYDATA_KYC_NAME_MATCHED = exports.IDENTITYDATA_KYC_TYPE = exports.IDENTITYDATA_KYC_ADDRESS_MATCHED = exports.IDENTITYDATA_KYC_SUCCESS = exports.IDENTITYDATA_SELFIECHECK_DRIVINGLICENCE_MATCH = exports.IDENTITYDATA_SELFIECHECK_VIDEO = exports.IDENTITYDATA_SELFIECHECK_IMAGE = exports.IDENTITYDATA_SELFIECHECK_SUCCESS = exports.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH_MATCHED = exports.IDENTITYDATA_DRIVINGLICENCE_NAME_MATCHED = exports.IDENTITYDATA_DRIVINGLICENCE_MATCHED = exports.IDENTITYDATA_DRIVINGLICENCE_COUNTRY = exports.IDENTITYDATA_DRIVINGLICENCE_POSTCODE = exports.IDENTITYDATA_DRIVINGLICENCE_REGION = exports.IDENTITYDATA_DRIVINGLICENCE_CITY = void 0; exports.IDENTITYDATA_RESIDENTCARD_CROPPED_BACK = exports.IDENTITYDATA_RESIDENTCARD_CROPPED_FRONT = exports.IDENTITYDATA_RESIDENTCARD_ORIGINAL_BACK = exports.IDENTITYDATA_RESIDENTCARD_ORIGINAL_FRONT = exports.IDENTITYDATA_RESIDENTCARD = exports.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_RESIDENCEPERMIT_NAME_MATCHED = exports.IDENTITYDATA_RESIDENCEPERMIT_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_COUNTRY = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_POSTCODE = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_REGION = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_CITY = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_STREET1 = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS = exports.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTH = exports.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_REGION = exports.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_RESIDENCEPERMIT_EXPIRATIONDATE = exports.IDENTITYDATA_RESIDENCEPERMIT_CATEGORY = exports.IDENTITYDATA_RESIDENCEPERMIT_IDNUMBER = exports.IDENTITYDATA_RESIDENCEPERMIT_FACE = exports.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_BACK = exports.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_FRONT = exports.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_BACK = exports.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_FRONT = exports.IDENTITYDATA_RESIDENCEPERMIT = exports.IDENTITYDATA_PASSPORT_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_PASSPORT_NAME_MATCHED = exports.IDENTITYDATA_PASSPORT_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_PASSPORT_ADDRESS_COUNTRY = exports.IDENTITYDATA_PASSPORT_ADDRESS_POSTCODE = exports.IDENTITYDATA_PASSPORT_ADDRESS_REGION = exports.IDENTITYDATA_PASSPORT_ADDRESS_CITY = exports.IDENTITYDATA_PASSPORT_ADDRESS_STREET1 = exports.IDENTITYDATA_PASSPORT_ADDRESS = exports.IDENTITYDATA_PASSPORT_DATEOFBIRTH = exports.IDENTITYDATA_PASSPORT_ISSUING_REGION = exports.IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_PASSPORT_EXPIRATIONDATE = exports.IDENTITYDATA_PASSPORT_CATEGORY = exports.IDENTITYDATA_PASSPORT_IDNUMBER = exports.IDENTITYDATA_PASSPORT_FACE = exports.IDENTITYDATA_PASSPORT_CROPPED_BACK = exports.IDENTITYDATA_PASSPORT_CROPPED_FRONT = exports.IDENTITYDATA_PASSPORT_ORIGINAL_BACK = exports.IDENTITYDATA_PASSPORT_ORIGINAL_FRONT = exports.IDENTITYDATA_PASSPORT = exports.IDENTITYDATA_IDCARD_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_IDCARD_NAME_MATCHED = exports.IDENTITYDATA_IDCARD_DOCUMENTVERIFICATION_MATCHED = void 0; exports.IDENTITYDATA_ADDRESS_STREET1 = exports.IDENTITYDATA_DOCUMENTVERIFICATION_ADDRESS = exports.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTH = exports.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUING_REGION = exports.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY = exports.IDENTITYDATA_DOCUMENTVERIFICATION_EXPIRATIONDATE = exports.IDENTITYDATA_DOCUMENTVERIFICATION_CATEGORY = exports.IDENTITYDATA_DOCUMENTVERIFICATION_IDNUMBER = exports.IDENTITYDATA_DOCUMENTVERIFICATION_FACE = exports.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDBACK = exports.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDFRONT = exports.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALBACK = exports.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALFRONT = exports.IDENTITYDATA_VISA_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_VISA_NAME_MATCHED = exports.IDENTITYDATA_VISA_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_VISA_ADDRESS_COUNTRY = exports.IDENTITYDATA_VISA_ADDRESS_POSTCODE = exports.IDENTITYDATA_VISA_ADDRESS_REGION = exports.IDENTITYDATA_VISA_ADDRESS_CITY = exports.IDENTITYDATA_VISA_ADDRESS_STREET1 = exports.IDENTITYDATA_VISA_ADDRESS = exports.IDENTITYDATA_VISA_DATEOFBIRTH = exports.IDENTITYDATA_VISA_ISSUING_REGION = exports.IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_VISA_EXPIRATIONDATE = exports.IDENTITYDATA_VISA_CATEGORY = exports.IDENTITYDATA_VISA_IDNUMBER = exports.IDENTITYDATA_VISA_FACE = exports.IDENTITYDATA_VISA_CROPPED_BACK = exports.IDENTITYDATA_VISA_CROPPED_FRONT = exports.IDENTITYDATA_VISA_ORIGINAL_BACK = exports.IDENTITYDATA_VISA_ORIGINAL_FRONT = exports.IDENTITYDATA_VISA = exports.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_RESIDENTCARD_NAME_MATCHED = exports.IDENTITYDATA_RESIDENTCARD_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_COUNTRY = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_POSTCODE = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_REGION = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_CITY = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_STREET1 = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS = exports.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTH = exports.IDENTITYDATA_RESIDENTCARD_ISSUING_REGION = exports.IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_RESIDENTCARD_EXPIRATIONDATE = exports.IDENTITYDATA_RESIDENTCARD_CATEGORY = exports.IDENTITYDATA_RESIDENTCARD_IDNUMBER = exports.IDENTITYDATA_RESIDENTCARD_FACE = void 0; -exports.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED = exports.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_ADDRESS_COUNTRY = exports.IDENTITYDATA_ADDRESS_POSTCODE = exports.IDENTITYDATA_ADDRESS_REGION = exports.IDENTITYDATA_ADDRESS_CITY = exports.IDENTITYDATA_ADDRESS_STREET2 = void 0; +exports.PERSONAL_INFO_OBJECT = exports.IDENTITYDATA_DOCUMENTS_AND_IMAGES = exports.IDENTITYDATA_BANKING_INFORMATION = exports.IDENTITYDATA_LOCATIONS = exports.IDENTITYDATA_CONTACT = exports.IDENTITYDATA_PERSONAL_DETAILS = exports.IDENTITYDATA_NAME = exports.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED = exports.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_ADDRESS_COUNTRY = exports.IDENTITYDATA_ADDRESS_POSTCODE = exports.IDENTITYDATA_ADDRESS_REGION = exports.IDENTITYDATA_ADDRESS_CITY = exports.IDENTITYDATA_ADDRESS_STREET2 = void 0; exports.IDENTITYDATA_ATTESTOR = { "vdxfid": "iNe8VaRBRFDhb6xjZ7WHNWgfM73428GN8B", "hash160result": "5e01d5d356d517df57ea0f391c86e11a84663bd2", @@ -2253,3 +2253,66 @@ exports.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED = { "name": "vrsc::identitydata.documentverification.dateofbirthmatched" } }; +exports.IDENTITYDATA_NAME = { + "vdxfid": "iNtCaMhqbpwGubHkaepi9mhVFg8jPj2Sk4", + "indexid": "xTiK3A8vT99wXmAnSLUs8AE2HL9kKfRmzC", + "hash160result": "272c6f542e769f1006ee6db29be51ddbbaa1e4d4", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.name" + } +}; +exports.IDENTITYDATA_PERSONAL_DETAILS = { + "vdxfid": "iDeQpqFQNNxQaTGDJd762poXE9eCBNEELD", + "indexid": "xJUXHdgVDhB5Cd9FAJmF1DL4FofD5W44Wa", + "hash160result": "78d7089e964a3f6e6ae0233346554555d3e68f6f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.personaldetails" + } +}; +exports.IDENTITYDATA_CONTACT = { + "vdxfid": "iPHGUT7FpBbUjBKoPiuwTCzVFtcbQfkrs4", + "indexid": "xU7NwFYLfVp9MMCqFQa6RbX2HYdcGVBu6v", + "hash160result": "cef7d037aa9c9342008cc13ea0173610f17341d9", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.contactdetails" + } +}; +exports.IDENTITYDATA_LOCATIONS = { + "vdxfid": "iREAoeQFDuJA751i86EBWmDthRuZoGEKBi", + "indexid": "xW4HGSqL5DWpjEtjymtLV9kRj5vaeyFTX7", + "hash160result": "e89b7bc01f7fececa737c5451a6889006bb99bee", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.locationdetails" + } +}; +exports.IDENTITYDATA_BANKING_INFORMATION = { + "vdxfid": "iJPS5WjFmKhjJjNxA2m2CJUus8swyBSTWy", + "indexid": "xPDYYKALcdvPvuFz1iRBAh1StntxrcEUeM", + "hash160result": "1a79f042ce08168d0dcaf4b1062eb1e3525693a3", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankingdetails" + } +}; +exports.IDENTITYDATA_DOCUMENTS_AND_IMAGES = { + "vdxfid": "iDqUNrjpcHvenVoJUzkWxeo93txZJLRMsY", + "indexid": "xJfaqfAuTc9KQfgLLgQfw3Kg5Yya97dwwF", + "hash160result": "b93a86e345efacfa4cdd5ab1a07f41da4371a771", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documents" + } +}; +exports.PERSONAL_INFO_OBJECT = { + "vdxfid": "i6BFmbneE8TJHego8AkeX1iYMbQ4KXHLr9", + "indexid": "xB1NEQDj5SfxupZpyrQoVQF5PFR5Foqja6", + "hash160result": "50b7fa643e4b024ffbcaabd40403d22e1a3ba41d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.personalinfo" + } +}; diff --git a/src/__tests__/attestation/attestation.test.ts b/src/__tests__/attestation/attestation.test.ts index 82ba1c3..13e082f 100644 --- a/src/__tests__/attestation/attestation.test.ts +++ b/src/__tests__/attestation/attestation.test.ts @@ -70,11 +70,11 @@ describe('Serializes and deserializes attestation request', () => { for (let i = 0; i < 5; i++) { const rootOfItem = proofOfAll.checkProof(i); - expect(rootOfItem.toString('hex')).toStrictEqual("bfa5d560098bcc51df0341b18922db0987907febe4eb44958866c015c36919f0"); + expect(rootOfItem.toString('hex')).toStrictEqual("8a91a7f15b24e9e75fc5b02ae2131b0b08a540ebb9e9e1a859132f9879366eb5"); } - expect(proofResponseRoot.toString('hex')).toStrictEqual("bfa5d560098bcc51df0341b18922db0987907febe4eb44958866c015c36919f0"); - expect(rootOfItemZero.toString('hex')).toStrictEqual("bfa5d560098bcc51df0341b18922db0987907febe4eb44958866c015c36919f0"); + expect(proofResponseRoot.toString('hex')).toStrictEqual("8a91a7f15b24e9e75fc5b02ae2131b0b08a540ebb9e9e1a859132f9879366eb5"); + expect(rootOfItemZero.toString('hex')).toStrictEqual("8a91a7f15b24e9e75fc5b02ae2131b0b08a540ebb9e9e1a859132f9879366eb5"); // check attestation serializes and deserializes correctly @@ -84,7 +84,7 @@ describe('Serializes and deserializes attestation request', () => { attestationFromBuffer.fromBuffer(attestationResponseBuffer); const proofResponseRootFromBuffer = attestationResponse.rootHash(); - expect(proofResponseRootFromBuffer.toString('hex')).toStrictEqual("bfa5d560098bcc51df0341b18922db0987907febe4eb44958866c015c36919f0"); + expect(proofResponseRootFromBuffer.toString('hex')).toStrictEqual("8a91a7f15b24e9e75fc5b02ae2131b0b08a540ebb9e9e1a859132f9879366eb5"); //check the partialproofs serialize and desserialize @@ -96,7 +96,7 @@ describe('Serializes and deserializes attestation request', () => { const rootOfItemZerofromBuffer = proofOfItemZero.checkProof(0); - expect(rootOfItemZerofromBuffer.toString('hex')).toStrictEqual("bfa5d560098bcc51df0341b18922db0987907febe4eb44958866c015c36919f0"); + expect(rootOfItemZerofromBuffer.toString('hex')).toStrictEqual("8a91a7f15b24e9e75fc5b02ae2131b0b08a540ebb9e9e1a859132f9879366eb5"); }); test('no duplicate keys', async () => { diff --git a/src/__tests__/attestation/personalInfo.test.ts b/src/__tests__/attestation/personalInfo.test.ts new file mode 100644 index 0000000..513120c --- /dev/null +++ b/src/__tests__/attestation/personalInfo.test.ts @@ -0,0 +1,42 @@ +import { ATTESTATION_READ_REQUEST, IDENTITYDATA_NAME, IDENTITYDATA_FIRSTNAME, IDENTITYDATA_PERSONAL_DETAILS, IDENTITYDATA_LASTNAME, IDENTITYDATA_ATTESTOR, IDENTITYDATA_IDENTITY, ATTESTATION_TYPE } from "../../vdxf"; +import { Attestation, LoginConsentRequest } from "../../vdxf/classes"; +import { RedirectUri, RequestedPermission } from "../../vdxf/classes/Challenge"; +import { Context } from "../../vdxf/classes/Context"; +import { CPartialAttestationProof } from "../../vdxf/classes/Attestation"; +import { AttestationData, AttestationDataType } from "../../vdxf/classes/attestationData"; +import * as idkeys from "../../vdxf/identityDataKeys"; +import { PersonalData } from "../../vdxf/classes/PersonalData"; + +describe('Create a personal info request', () => { + test('attestation request with reply', async () => { + + + let nameMap = new Array(); + // requested data from user. + nameMap.push(new AttestationDataType("", IDENTITYDATA_FIRSTNAME.vdxfid, "")); + nameMap.push(new AttestationDataType("", IDENTITYDATA_LASTNAME.vdxfid, "")); + nameMap.push(new AttestationDataType("", IDENTITYDATA_IDENTITY.vdxfid, "")); + + let personalMap = new Array(); + personalMap.push(new AttestationDataType("", IDENTITYDATA_ATTESTOR.vdxfid, "")); + personalMap.push(new AttestationDataType("", ATTESTATION_TYPE.vdxfid, "")); + + const personalData = new PersonalData({ + type: PersonalData.TYPE.REQUEST, + id: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + data: { + [IDENTITYDATA_NAME.vdxfid]: nameMap, + [IDENTITYDATA_PERSONAL_DETAILS.vdxfid]: personalMap + }, + linkedAttestation: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV" + }); + + const personalDataBuffer = personalData.toDataBuffer(); + + const personalData2 = new PersonalData(); + personalData2.fromDataBuffer(personalDataBuffer); + + expect(personalData2.toBuffer().toString('hex')).toEqual(personalData.toBuffer().toString('hex')); + }); + +}); diff --git a/src/vdxf/classes/PersonalData.ts b/src/vdxf/classes/PersonalData.ts new file mode 100644 index 0000000..991c3a8 --- /dev/null +++ b/src/vdxf/classes/PersonalData.ts @@ -0,0 +1,132 @@ +import varuint from '../../utils/varuint' +import bufferutils from '../../utils/bufferutils' +import createHash = require("create-hash"); +import { fromBase58Check, toBase58Check } from '../../utils/address'; +import { I_ADDR_VERSION, HASH160_BYTE_LENGTH } from '../../constants/vdxf'; +import { VDXFObject, VerusIDSignature } from ".."; +import { CMerkleMountainRange, CMMRNode, CMerkleMountainView, CMMRProof } from "./MMR" +import { PERSONAL_INFO_OBJECT } from '../identityDataKeys'; +import { Hash160 } from "./Hash160"; +import { AttestationDataType } from './attestationData'; + +const { BufferReader, BufferWriter } = bufferutils; + +export class PersonalData extends VDXFObject { + + type: PersonalData.TYPE; + id: string = ''; + data: {[category: string]: Array}; + linkedAttestation: string = ''; + + constructor(data?: { + type?: PersonalData.TYPE, + id?: string, + data?: {[category: string]: Array}, + linkedAttestation?: string + }, vdxfkey: string = PERSONAL_INFO_OBJECT.vdxfid) { + super(vdxfkey); + + if (data) { + Object.assign(this, data); + } + } + + dataByteLength(): number { + + let byteLength = 0; + byteLength += 1; // type + byteLength += varuint.encodingLength(this.id.length); + byteLength += this.id.length; + + byteLength += varuint.encodingLength(Object.keys(this.data).length); + + for (const [key, value] of Object.entries(this.data)) { + + byteLength += HASH160_BYTE_LENGTH; // category + byteLength += varuint.encodingLength(value.length); + + for (const attestation of value) { + byteLength += attestation.dataBytelength(); + } + } + + byteLength += varuint.encodingLength(this.linkedAttestation.length); + byteLength += this.linkedAttestation.length; + + return byteLength; + } + + toDataBuffer(): Buffer { + const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); + + bufferWriter.writeCompactSize(this.type); + bufferWriter.writeVarSlice(Buffer.from(this.id, 'utf8')); + + bufferWriter.writeCompactSize(Object.keys(this.data).length); + + for (const [key, value] of Object.entries(this.data)) { + + bufferWriter.writeSlice(fromBase58Check(key).hash); + bufferWriter.writeCompactSize(value.length); + + for (const attestation of value) { + bufferWriter.writeSlice(attestation.toBuffer()); + } + } + + bufferWriter.writeVarSlice(Buffer.from(this.linkedAttestation, 'utf8')); + return bufferWriter.buffer + } + + fromDataBuffer(buffer: Buffer, offset?: number): number { + + const reader = new BufferReader(buffer, offset); + + this.type = reader.readCompactSize(); + + this.id = reader.readVarSlice().toString('utf8'); + + const dataLength = reader.readCompactSize(); + + if (!this.data) { + this.data = {}; + } + + for (var i = 0; i < dataLength; i++) { + + const category = toBase58Check(reader.readSlice(HASH160_BYTE_LENGTH), I_ADDR_VERSION); + const attestationLength = reader.readCompactSize(); + const attestations = []; + + for (var j = 0; j < attestationLength; j++) { + + const attestation = new AttestationDataType(null, toBase58Check(reader.buffer.slice(reader.offset, reader.offset + HASH160_BYTE_LENGTH), I_ADDR_VERSION)); + reader.offset = attestation.fromDataBuffer(reader.buffer, reader.offset); + attestations.push(attestation); + } + + this.data[category] = attestations; + } + + this.linkedAttestation = reader.readVarSlice().toString('utf8'); + + return reader.offset; + } + + toJson() { + return { + type: this.type, + id: this.id, + data: this.data, + linkedAttestation: this.linkedAttestation + }; + } +} + +export namespace PersonalData { + export enum TYPE { + REQUEST = 1, + SUBMITTED = 2, + DESIGNATED = 3, + } +} diff --git a/src/vdxf/classes/attestationData.ts b/src/vdxf/classes/attestationData.ts index 034de29..ed63574 100644 --- a/src/vdxf/classes/attestationData.ts +++ b/src/vdxf/classes/attestationData.ts @@ -239,11 +239,19 @@ export const AttestationVdxfidMap = { export class AttestationDataType { dataItem: Utf8DataVdxfObject | HexDataVdxfObject | BufferDataVdxfObject | PNGImageVdxfObject | VDXFObject; - salt: Buffer; + salt: Buffer = Buffer.alloc(0); - constructor(data: any, vdxfkey: string, salt?: string) { + constructor(data?: any, vdxfkey?: string, salt?: string) { - switch (AttestationVdxfidMap[vdxfkey].type) { + this.getDataItem(vdxfkey, data); + + if (salt) { + this.salt = Buffer.from(salt, "hex"); + } + } + + getDataItem(vdxfkey, data): any { + switch (vdxfkey && AttestationVdxfidMap[vdxfkey].type || null) { case AttestationClassTypes.BUFFER_DATA_STRING: this.dataItem = new Utf8DataVdxfObject(data, vdxfkey); break; @@ -269,10 +277,6 @@ export class AttestationDataType { this.dataItem = new HexDataVdxfObject(data, vdxfkey); break; } - - if (salt) { - this.salt = Buffer.from(salt, "hex"); - } } dataBytelength(): number { @@ -280,6 +284,7 @@ export class AttestationDataType { let length = 0; length += this.dataItem.byteLength(); + length += varuint.encodingLength(this.salt.length); length += this.salt.length; return length; @@ -290,7 +295,7 @@ export class AttestationDataType { const buffer = Buffer.alloc(this.dataBytelength()); const writer = new bufferutils.BufferWriter(buffer); writer.writeSlice(this.dataItem.toBuffer()); - writer.writeSlice(this.salt); + writer.writeVarSlice(this.salt); return writer.buffer; } @@ -299,7 +304,7 @@ export class AttestationDataType { const reader = new bufferutils.BufferReader(buffer, offset); reader.offset = this.dataItem.fromBuffer(reader.buffer, reader.offset, vdxfkey); - this.salt = reader.readSlice(32); + this.salt = reader.readVarSlice(); return reader.offset; } diff --git a/src/vdxf/identityDataKeys.ts b/src/vdxf/identityDataKeys.ts index 9517ed5..55303ae 100644 --- a/src/vdxf/identityDataKeys.ts +++ b/src/vdxf/identityDataKeys.ts @@ -2456,3 +2456,72 @@ export const IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED: VDXFKeyInterf } } +export const IDENTITYDATA_NAME: VDXFKeyInterface = { +"vdxfid": "iNtCaMhqbpwGubHkaepi9mhVFg8jPj2Sk4", + "indexid": "xTiK3A8vT99wXmAnSLUs8AE2HL9kKfRmzC", + "hash160result": "272c6f542e769f1006ee6db29be51ddbbaa1e4d4", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.name" + } +} + +export const IDENTITYDATA_PERSONAL_DETAILS: VDXFKeyInterface = { + "vdxfid": "iDeQpqFQNNxQaTGDJd762poXE9eCBNEELD", + "indexid": "xJUXHdgVDhB5Cd9FAJmF1DL4FofD5W44Wa", + "hash160result": "78d7089e964a3f6e6ae0233346554555d3e68f6f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.personaldetails" + } +} + +export const IDENTITYDATA_CONTACT: VDXFKeyInterface = { + "vdxfid": "iPHGUT7FpBbUjBKoPiuwTCzVFtcbQfkrs4", + "indexid": "xU7NwFYLfVp9MMCqFQa6RbX2HYdcGVBu6v", + "hash160result": "cef7d037aa9c9342008cc13ea0173610f17341d9", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.contactdetails" + } +} + +export const IDENTITYDATA_LOCATIONS: VDXFKeyInterface = { + "vdxfid": "iREAoeQFDuJA751i86EBWmDthRuZoGEKBi", + "indexid": "xW4HGSqL5DWpjEtjymtLV9kRj5vaeyFTX7", + "hash160result": "e89b7bc01f7fececa737c5451a6889006bb99bee", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.locationdetails" + } +} + +export const IDENTITYDATA_BANKING_INFORMATION: VDXFKeyInterface = { + "vdxfid": "iJPS5WjFmKhjJjNxA2m2CJUus8swyBSTWy", + "indexid": "xPDYYKALcdvPvuFz1iRBAh1StntxrcEUeM", + "hash160result": "1a79f042ce08168d0dcaf4b1062eb1e3525693a3", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankingdetails" + } +} + +export const IDENTITYDATA_DOCUMENTS_AND_IMAGES: VDXFKeyInterface = { + "vdxfid": "iDqUNrjpcHvenVoJUzkWxeo93txZJLRMsY", + "indexid": "xJfaqfAuTc9KQfgLLgQfw3Kg5Yya97dwwF", + "hash160result": "b93a86e345efacfa4cdd5ab1a07f41da4371a771", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documents" + } +} + +export const PERSONAL_INFO_OBJECT: VDXFKeyInterface = { + "vdxfid": "i6BFmbneE8TJHego8AkeX1iYMbQ4KXHLr9", + "indexid": "xB1NEQDj5SfxupZpyrQoVQF5PFR5Foqja6", + "hash160result": "50b7fa643e4b024ffbcaabd40403d22e1a3ba41d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.personalinfo" + } +} From d8894954402187e23f3b12055b26b83083e1b29a Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Tue, 20 Feb 2024 13:20:24 +0000 Subject: [PATCH 069/120] Update bech32 version and filenames --- dist/vdxf/classes/Attestation.d.ts | 2 +- dist/vdxf/classes/Attestation.js | 10 +++++----- dist/vdxf/classes/PersonalData.d.ts | 2 +- dist/vdxf/classes/PersonalData.js | 8 ++++---- dist/vdxf/classes/attestationData.js | 2 +- dist/vdxf/classes/index.d.ts | 2 +- dist/vdxf/classes/index.js | 6 +++--- dist/vdxf/index.d.ts | 2 +- dist/vdxf/index.js | 2 +- dist/vdxf/keymap.d.ts | 2 +- dist/vdxf/keymap.js | 2 +- package.json | 2 +- src/__tests__/attestation/personalInfo.test.ts | 4 ++-- src/vdxf/classes/Attestation.ts | 2 +- src/vdxf/classes/PersonalData.ts | 4 ++-- src/vdxf/classes/attestationData.ts | 2 +- src/vdxf/classes/index.ts | 2 +- src/vdxf/index.ts | 2 +- src/vdxf/keymap.ts | 2 +- yarn.lock | 8 ++++---- 20 files changed, 34 insertions(+), 34 deletions(-) diff --git a/dist/vdxf/classes/Attestation.d.ts b/dist/vdxf/classes/Attestation.d.ts index 39425fc..9c66553 100644 --- a/dist/vdxf/classes/Attestation.d.ts +++ b/dist/vdxf/classes/Attestation.d.ts @@ -1,7 +1,7 @@ /// import { VDXFObject, VerusIDSignature } from "../"; import { CMerkleMountainRange, CMMRProof } from "./MMR"; -import { AttestationData } from './attestationData'; +import { AttestationData } from './AttestationData'; export declare class Attestation extends VDXFObject { static TYPE_STRING: number; static TYPE_BYTES: number; diff --git a/dist/vdxf/classes/Attestation.js b/dist/vdxf/classes/Attestation.js index d3e38b7..55d057a 100644 --- a/dist/vdxf/classes/Attestation.js +++ b/dist/vdxf/classes/Attestation.js @@ -19,7 +19,7 @@ const __1 = require("../"); const MMR_1 = require("./MMR"); const keys_1 = require("../keys"); const Hash160_1 = require("./Hash160"); -const attestationData_1 = require("./attestationData"); +const AttestationData_1 = require("./AttestationData"); const { BufferReader, BufferWriter } = bufferutils_1.default; class Attestation extends __1.VDXFObject { constructor(data, vdxfkey = keys_1.ATTESTATION_OBJECT.vdxfid) { @@ -74,7 +74,7 @@ class Attestation extends __1.VDXFObject { const reader = new bufferutils_1.default.BufferReader(buffer, offset); const attestationsByteLength = reader.readCompactSize(); //dummy read if (!this.data) { - this.data = new attestationData_1.AttestationData(); + this.data = new AttestationData_1.AttestationData(); } reader.offset = this.data.fromDataBuffer(reader.buffer, reader.offset); this.system_id = (0, address_1.toBase58Check)(reader.readSlice(vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION); @@ -119,7 +119,7 @@ class Attestation extends __1.VDXFObject { // returns an attestation with a sparse MMR containing the leaves specified getProof(keys) { const view = new MMR_1.CMerkleMountainView(this.mmr); - const attestationItems = new attestationData_1.AttestationData(); + const attestationItems = new AttestationData_1.AttestationData(); const localCMMR = new MMR_1.CMMRProof(); keys.forEach((key, index) => { view.GetProof(localCMMR, key); @@ -171,7 +171,7 @@ class CPartialAttestationProof extends __1.VDXFObject { this.type = this.EType.TYPE_ATTESTATION; if (data) { this.proof = data.proof || new MMR_1.CMMRProof(); - this.componentsArray = data.componentsArray || new attestationData_1.AttestationData(); + this.componentsArray = data.componentsArray || new AttestationData_1.AttestationData(); this.system_id = data.system_id; this.signing_id = data.signing_id; } @@ -212,7 +212,7 @@ class CPartialAttestationProof extends __1.VDXFObject { this.type = reader.readCompactSize(); this.proof = new MMR_1.CMMRProof(); reader.offset = this.proof.fromDataBuffer(reader.buffer, reader.offset); - this.componentsArray = new attestationData_1.AttestationData(); + this.componentsArray = new AttestationData_1.AttestationData(); reader.offset = this.componentsArray.fromDataBuffer(reader.buffer, reader.offset); this.system_id = (0, address_1.toBase58Check)(reader.readSlice(vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION); this.signing_id = (0, address_1.toBase58Check)(reader.readSlice(vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION); diff --git a/dist/vdxf/classes/PersonalData.d.ts b/dist/vdxf/classes/PersonalData.d.ts index 1a31214..1c2d4b2 100644 --- a/dist/vdxf/classes/PersonalData.d.ts +++ b/dist/vdxf/classes/PersonalData.d.ts @@ -1,6 +1,6 @@ /// import { VDXFObject } from ".."; -import { AttestationDataType } from './attestationData'; +import { AttestationDataType } from './AttestationData'; export declare class PersonalData extends VDXFObject { type: PersonalData.TYPE; id: string; diff --git a/dist/vdxf/classes/PersonalData.js b/dist/vdxf/classes/PersonalData.js index 1c82868..360a5ee 100644 --- a/dist/vdxf/classes/PersonalData.js +++ b/dist/vdxf/classes/PersonalData.js @@ -6,11 +6,11 @@ const bufferutils_1 = require("../../utils/bufferutils"); const address_1 = require("../../utils/address"); const vdxf_1 = require("../../constants/vdxf"); const __1 = require(".."); -const identityDataKeys_1 = require("../identityDataKeys"); -const attestationData_1 = require("./attestationData"); +const identitydatakeys_1 = require("../identitydatakeys"); +const AttestationData_1 = require("./AttestationData"); const { BufferReader, BufferWriter } = bufferutils_1.default; class PersonalData extends __1.VDXFObject { - constructor(data, vdxfkey = identityDataKeys_1.PERSONAL_INFO_OBJECT.vdxfid) { + constructor(data, vdxfkey = identitydatakeys_1.PERSONAL_INFO_OBJECT.vdxfid) { super(vdxfkey); this.id = ''; this.linkedAttestation = ''; @@ -63,7 +63,7 @@ class PersonalData extends __1.VDXFObject { const attestationLength = reader.readCompactSize(); const attestations = []; for (var j = 0; j < attestationLength; j++) { - const attestation = new attestationData_1.AttestationDataType(null, (0, address_1.toBase58Check)(reader.buffer.slice(reader.offset, reader.offset + vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION)); + const attestation = new AttestationData_1.AttestationDataType(null, (0, address_1.toBase58Check)(reader.buffer.slice(reader.offset, reader.offset + vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION)); reader.offset = attestation.fromDataBuffer(reader.buffer, reader.offset); attestations.push(attestation); } diff --git a/dist/vdxf/classes/attestationData.js b/dist/vdxf/classes/attestationData.js index 1d6448d..5b0f340 100644 --- a/dist/vdxf/classes/attestationData.js +++ b/dist/vdxf/classes/attestationData.js @@ -2,7 +2,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.AttestationData = exports.friendlyNames = exports.AttestationDataType = exports.AttestationVdxfidMap = void 0; const __1 = require(".."); -const identitykeys = require("../identityDataKeys"); +const identitykeys = require("../identitydatakeys"); const keylist = require("../keys"); const bufferutils_1 = require("../../utils/bufferutils"); const createHash = require("create-hash"); diff --git a/dist/vdxf/classes/index.d.ts b/dist/vdxf/classes/index.d.ts index 75b7125..3a730c8 100644 --- a/dist/vdxf/classes/index.d.ts +++ b/dist/vdxf/classes/index.d.ts @@ -23,6 +23,6 @@ export { ProvisioningResultInterface as LoginConsentProvisioningResultInterface export { Hash160 } from './Hash160'; export { RedirectUri, Subject, ProvisioningInfo, RequestedPermission, Audience, AltAuthFactor, } from "./Challenge"; export { Attestation } from './Attestation'; -export { AttestationData, AttestationDataType } from './attestationData'; +export { AttestationData, AttestationDataType } from './AttestationData'; export { ProvisioningTxid } from './provisioning/ProvisioningResult'; export { Context } from './Context'; diff --git a/dist/vdxf/classes/index.js b/dist/vdxf/classes/index.js index 3d15749..9a5298a 100644 --- a/dist/vdxf/classes/index.js +++ b/dist/vdxf/classes/index.js @@ -38,9 +38,9 @@ Object.defineProperty(exports, "Audience", { enumerable: true, get: function () Object.defineProperty(exports, "AltAuthFactor", { enumerable: true, get: function () { return Challenge_2.AltAuthFactor; } }); var Attestation_1 = require("./Attestation"); Object.defineProperty(exports, "Attestation", { enumerable: true, get: function () { return Attestation_1.Attestation; } }); -var attestationData_1 = require("./attestationData"); -Object.defineProperty(exports, "AttestationData", { enumerable: true, get: function () { return attestationData_1.AttestationData; } }); -Object.defineProperty(exports, "AttestationDataType", { enumerable: true, get: function () { return attestationData_1.AttestationDataType; } }); +var AttestationData_1 = require("./AttestationData"); +Object.defineProperty(exports, "AttestationData", { enumerable: true, get: function () { return AttestationData_1.AttestationData; } }); +Object.defineProperty(exports, "AttestationDataType", { enumerable: true, get: function () { return AttestationData_1.AttestationDataType; } }); var ProvisioningResult_2 = require("./provisioning/ProvisioningResult"); Object.defineProperty(exports, "ProvisioningTxid", { enumerable: true, get: function () { return ProvisioningResult_2.ProvisioningTxid; } }); var Context_1 = require("./Context"); diff --git a/dist/vdxf/index.d.ts b/dist/vdxf/index.d.ts index 7e0be37..7ea78c8 100644 --- a/dist/vdxf/index.d.ts +++ b/dist/vdxf/index.d.ts @@ -5,7 +5,7 @@ import { BigNumber } from "../utils/types/BigNumber"; export * from './keys'; export * from './scopes'; export * from './keymap'; -export * from './identityDataKeys'; +export * from './identitydatakeys'; export interface VDXFObjectInterface { vdxfkey: string; toString: () => string; diff --git a/dist/vdxf/index.js b/dist/vdxf/index.js index 01af924..f14e909 100644 --- a/dist/vdxf/index.js +++ b/dist/vdxf/index.js @@ -28,7 +28,7 @@ const bn_js_1 = require("bn.js"); __exportStar(require("./keys"), exports); __exportStar(require("./scopes"), exports); __exportStar(require("./keymap"), exports); -__exportStar(require("./identityDataKeys"), exports); +__exportStar(require("./identitydatakeys"), exports); class VDXFObject { constructor(key = "", serializekey = true) { this.serializekey = true; diff --git a/dist/vdxf/keymap.d.ts b/dist/vdxf/keymap.d.ts index 573ae7b..c600b92 100644 --- a/dist/vdxf/keymap.d.ts +++ b/dist/vdxf/keymap.d.ts @@ -1,4 +1,4 @@ -import * as AttestationData from './classes/attestationData'; +import * as AttestationData from './classes/AttestationData'; export declare const keymap: { [key: string]: any; }; diff --git a/dist/vdxf/keymap.js b/dist/vdxf/keymap.js index 8fd9780..3168796 100644 --- a/dist/vdxf/keymap.js +++ b/dist/vdxf/keymap.js @@ -2,7 +2,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.AttestationDataVdxfidMap = exports.attestationDataKeys = exports.keymap = void 0; const keylist = require("./keys"); -const AttestationData = require("./classes/attestationData"); +const AttestationData = require("./classes/AttestationData"); exports.keymap = Object.keys(keylist).reduce((obj, item) => { obj[keylist[item].vdxfid] = keylist[item]; return obj; }, {}); exports.attestationDataKeys = Object.keys(AttestationData).reduce((obj, item) => { obj[AttestationData[item].vdxfid] = AttestationData[item]; return obj; }, {}); exports.AttestationDataVdxfidMap = AttestationData.AttestationVdxfidMap; diff --git a/package.json b/package.json index 75aedaf..566ea9c 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "license": "MIT", "dependencies": { "base64url": "3.0.1", - "bech32": "0.0.3", + "bech32": "^2.0.0", "blake2b": "https://github.com/VerusCoin/blake2b", "bn.js": "5.2.1", "bs58check": "https://github.com/bitcoinjs/bs58check", diff --git a/src/__tests__/attestation/personalInfo.test.ts b/src/__tests__/attestation/personalInfo.test.ts index 513120c..ffd16e0 100644 --- a/src/__tests__/attestation/personalInfo.test.ts +++ b/src/__tests__/attestation/personalInfo.test.ts @@ -3,8 +3,8 @@ import { Attestation, LoginConsentRequest } from "../../vdxf/classes"; import { RedirectUri, RequestedPermission } from "../../vdxf/classes/Challenge"; import { Context } from "../../vdxf/classes/Context"; import { CPartialAttestationProof } from "../../vdxf/classes/Attestation"; -import { AttestationData, AttestationDataType } from "../../vdxf/classes/attestationData"; -import * as idkeys from "../../vdxf/identityDataKeys"; +import { AttestationData, AttestationDataType } from "../../vdxf/classes/AttestationData"; +import * as idkeys from "../../vdxf/identitydatakeys"; import { PersonalData } from "../../vdxf/classes/PersonalData"; describe('Create a personal info request', () => { diff --git a/src/vdxf/classes/Attestation.ts b/src/vdxf/classes/Attestation.ts index 20be59c..481a138 100644 --- a/src/vdxf/classes/Attestation.ts +++ b/src/vdxf/classes/Attestation.ts @@ -7,7 +7,7 @@ import { VDXFObject, VerusIDSignature } from "../"; import { CMerkleMountainRange, CMMRNode, CMerkleMountainView, CMMRProof } from "./MMR" import { ATTESTATION_OBJECT, ATTESTATION_VIEW_RESPONSE } from '../keys'; import { Hash160 } from "./Hash160"; -import { AttestationData } from './attestationData'; +import { AttestationData } from './AttestationData'; const { BufferReader, BufferWriter } = bufferutils; diff --git a/src/vdxf/classes/PersonalData.ts b/src/vdxf/classes/PersonalData.ts index 991c3a8..9b259d0 100644 --- a/src/vdxf/classes/PersonalData.ts +++ b/src/vdxf/classes/PersonalData.ts @@ -5,9 +5,9 @@ import { fromBase58Check, toBase58Check } from '../../utils/address'; import { I_ADDR_VERSION, HASH160_BYTE_LENGTH } from '../../constants/vdxf'; import { VDXFObject, VerusIDSignature } from ".."; import { CMerkleMountainRange, CMMRNode, CMerkleMountainView, CMMRProof } from "./MMR" -import { PERSONAL_INFO_OBJECT } from '../identityDataKeys'; +import { PERSONAL_INFO_OBJECT } from '../identitydatakeys'; import { Hash160 } from "./Hash160"; -import { AttestationDataType } from './attestationData'; +import { AttestationDataType } from './AttestationData'; const { BufferReader, BufferWriter } = bufferutils; diff --git a/src/vdxf/classes/attestationData.ts b/src/vdxf/classes/attestationData.ts index ed63574..a962959 100644 --- a/src/vdxf/classes/attestationData.ts +++ b/src/vdxf/classes/attestationData.ts @@ -5,7 +5,7 @@ import { PNGImageVdxfObject, VDXFObject } from ".."; -import * as identitykeys from '../identityDataKeys'; +import * as identitykeys from '../identitydatakeys'; import * as keylist from '../keys'; import bufferutils from '../../utils/bufferutils'; import createHash = require("create-hash"); diff --git a/src/vdxf/classes/index.ts b/src/vdxf/classes/index.ts index 08c771f..bcf7357 100644 --- a/src/vdxf/classes/index.ts +++ b/src/vdxf/classes/index.ts @@ -34,7 +34,7 @@ export { AltAuthFactor, } from "./Challenge"; export {Attestation} from './Attestation' -export {AttestationData, AttestationDataType} from './attestationData' +export {AttestationData, AttestationDataType} from './AttestationData' export { ProvisioningTxid } from './provisioning/ProvisioningResult' diff --git a/src/vdxf/index.ts b/src/vdxf/index.ts index 76d224f..4a34371 100644 --- a/src/vdxf/index.ts +++ b/src/vdxf/index.ts @@ -12,7 +12,7 @@ import { BigNumber } from "../utils/types/BigNumber"; export * from './keys' export * from './scopes' export * from './keymap' -export * from './identityDataKeys' +export * from './identitydatakeys' export interface VDXFObjectInterface { vdxfkey: string; diff --git a/src/vdxf/keymap.ts b/src/vdxf/keymap.ts index 8982b1e..c7457b0 100644 --- a/src/vdxf/keymap.ts +++ b/src/vdxf/keymap.ts @@ -1,5 +1,5 @@ import * as keylist from './keys'; -import * as AttestationData from './classes/attestationData'; +import * as AttestationData from './classes/AttestationData'; export const keymap = Object.keys(keylist).reduce((obj: { [key: string]: any }, item) => { obj[keylist[item].vdxfid] = keylist[item]; return obj }, {}); export const attestationDataKeys = Object.keys(AttestationData).reduce((obj: { [key: string]: any }, item) => { obj[AttestationData[item].vdxfid] = AttestationData[item]; return obj }, {}); export const AttestationDataVdxfidMap = AttestationData.AttestationVdxfidMap; \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index cc62980..a0e5515 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1017,10 +1017,10 @@ base64url@3.0.1: resolved "https://registry.yarnpkg.com/base64url/-/base64url-3.0.1.tgz#6399d572e2bc3f90a9a8b22d5dbb0a32d33f788d" integrity sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A== -bech32@0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/bech32/-/bech32-0.0.3.tgz#736747c4a6531c5d8937d0400498de30e93b2f9c" - integrity sha512-O+K1w8P/aAOLcYwwQ4sbiPYZ51ZIW95lnS4/6nE8Aib/z+OOddQIIPdu2qi94qGDp4HhYy/wJotttXKkak1lXg== +bech32@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/bech32/-/bech32-2.0.0.tgz#078d3686535075c8c79709f054b1b226a133b355" + integrity sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg== blake2b-wasm@^2.4.0: version "2.4.0" From 5a4e3d30798e7d57947289a3016cf997db2cd854 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Fri, 23 Feb 2024 17:26:58 +0000 Subject: [PATCH 070/120] Updates to Personal Data and Attestations --- dist/pbaas/index.d.ts | 1 - dist/pbaas/index.js | 1 - dist/vdxf/classes/Attestation.d.ts | 43 +- dist/vdxf/classes/Attestation.js | 210 ++++++++- dist/vdxf/classes/Challenge.d.ts | 22 +- dist/vdxf/classes/Challenge.js | 75 +--- dist/vdxf/classes/IdentityData.d.ts | 15 + dist/vdxf/classes/IdentityData.js | 218 +++++++++ dist/vdxf/classes/PersonalData.js | 2 +- dist/vdxf/classes/PersonalProfile.d.ts | 24 + dist/vdxf/classes/PersonalProfile.js | 125 ++++++ dist/vdxf/classes/attestationData.d.ts | 2 +- dist/vdxf/classes/attestationData.js | 6 +- dist/vdxf/classes/index.d.ts | 2 +- dist/vdxf/classes/index.js | 6 +- dist/vdxf/keymap.d.ts | 11 +- dist/vdxf/keymap.js | 6 +- src/__tests__/attestation/attestation.test.ts | 4 +- .../attestation/personalInfo.test.ts | 65 +-- src/__tests__/pbaas/identity.test.ts | 43 -- src/pbaas/Identity.ts | 416 ------------------ src/pbaas/index.ts | 1 - src/vdxf/classes/Attestation.ts | 262 ++++++++++- src/vdxf/classes/Challenge.ts | 87 +--- src/vdxf/classes/IdentityData.ts | 238 ++++++++++ src/vdxf/classes/PersonalData.ts | 132 ------ src/vdxf/classes/PersonalProfile.ts | 158 +++++++ src/vdxf/classes/attestationData.ts | 416 ------------------ src/vdxf/classes/index.ts | 2 +- src/vdxf/keymap.ts | 9 +- 30 files changed, 1350 insertions(+), 1252 deletions(-) create mode 100644 dist/vdxf/classes/IdentityData.d.ts create mode 100644 dist/vdxf/classes/IdentityData.js create mode 100644 dist/vdxf/classes/PersonalProfile.d.ts create mode 100644 dist/vdxf/classes/PersonalProfile.js delete mode 100644 src/__tests__/pbaas/identity.test.ts delete mode 100644 src/pbaas/Identity.ts create mode 100644 src/vdxf/classes/IdentityData.ts delete mode 100644 src/vdxf/classes/PersonalData.ts create mode 100644 src/vdxf/classes/PersonalProfile.ts delete mode 100644 src/vdxf/classes/attestationData.ts diff --git a/dist/pbaas/index.d.ts b/dist/pbaas/index.d.ts index 809e8d4..b665eda 100644 --- a/dist/pbaas/index.d.ts +++ b/dist/pbaas/index.d.ts @@ -1,5 +1,4 @@ export * from './CurrencyValueMap'; -export * from './Identity'; export * from './ReserveTransfer'; export * from './TokenOutput'; export * from './TransferDestination'; diff --git a/dist/pbaas/index.js b/dist/pbaas/index.js index a16a73b..27f8ff8 100644 --- a/dist/pbaas/index.js +++ b/dist/pbaas/index.js @@ -15,7 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./CurrencyValueMap"), exports); -__exportStar(require("./Identity"), exports); __exportStar(require("./ReserveTransfer"), exports); __exportStar(require("./TokenOutput"), exports); __exportStar(require("./TransferDestination"), exports); diff --git a/dist/vdxf/classes/Attestation.d.ts b/dist/vdxf/classes/Attestation.d.ts index 9c66553..f60ae58 100644 --- a/dist/vdxf/classes/Attestation.d.ts +++ b/dist/vdxf/classes/Attestation.d.ts @@ -1,7 +1,48 @@ /// import { VDXFObject, VerusIDSignature } from "../"; import { CMerkleMountainRange, CMMRProof } from "./MMR"; -import { AttestationData } from './AttestationData'; +import { Hash160 } from "./Hash160"; +import { Utf8DataVdxfObject, HexDataVdxfObject, BufferDataVdxfObject, PNGImageVdxfObject } from '..'; +export declare class AttestationDataType { + dataItem: Utf8DataVdxfObject | HexDataVdxfObject | BufferDataVdxfObject | PNGImageVdxfObject | VDXFObject; + salt: Buffer; + constructor(data?: any, vdxfkey?: string, salt?: string); + static getDataItem(vdxfkey: any, data: any): any; + dataByteLength(): number; + toBuffer(): Buffer; + fromDataBuffer(buffer: Buffer, offset?: number, vdxfkey?: string): number; +} +export declare const friendlyNames: (vdfxkey: any) => string; +export declare class AttestationData { + components: Map; + constructor(components?: Map); + dataByteLength(): number; + toDataBuffer(): Buffer; + fromDataBuffer(buffer: Buffer, offset?: number): number; + size(): number; + setDataFromJson(data: Array, getSalt: Function): void; + getHash(key: any): Buffer; +} +export interface AttestationRequestInterfaceDataInterface { + accepted_attestors: Array; + attestation_keys: Array; + attestor_filters?: Array; +} +export declare class AttestationRequest extends VDXFObject { + data: AttestationRequestInterfaceDataInterface; + dataByteLength(): number; + toDataBuffer(): Buffer; + fromDataBuffer(buffer: Buffer, offset?: number): number; + static initializeData(data: string | AttestationRequestInterfaceDataInterface): any; + toJson(): { + vdxfkey: string; + data: { + accepted_attestors: string[]; + attestation_keys: string[]; + attestor_filters: string[]; + }; + }; +} export declare class Attestation extends VDXFObject { static TYPE_STRING: number; static TYPE_BYTES: number; diff --git a/dist/vdxf/classes/Attestation.js b/dist/vdxf/classes/Attestation.js index 55d057a..6eab70a 100644 --- a/dist/vdxf/classes/Attestation.js +++ b/dist/vdxf/classes/Attestation.js @@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.CPartialAttestationProof = exports.Attestation = void 0; +exports.CPartialAttestationProof = exports.Attestation = exports.AttestationRequest = exports.AttestationData = exports.friendlyNames = exports.AttestationDataType = void 0; const varuint_1 = require("../../utils/varuint"); const bufferutils_1 = require("../../utils/bufferutils"); const createHash = require("create-hash"); @@ -19,8 +19,206 @@ const __1 = require("../"); const MMR_1 = require("./MMR"); const keys_1 = require("../keys"); const Hash160_1 = require("./Hash160"); -const AttestationData_1 = require("./AttestationData"); +const __2 = require(".."); +const IdentityData_1 = require("./IdentityData"); const { BufferReader, BufferWriter } = bufferutils_1.default; +class AttestationDataType { + constructor(data, vdxfkey, salt) { + this.salt = Buffer.alloc(0); + this.dataItem = AttestationDataType.getDataItem(vdxfkey, data); + if (salt) { + this.salt = Buffer.from(salt, "hex"); + } + } + static getDataItem(vdxfkey, data) { + var _a; + switch (vdxfkey && ((_a = IdentityData_1.IdentityVdxfidMap[vdxfkey]) === null || _a === void 0 ? void 0 : _a.type)) { + case 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */: + return new __2.Utf8DataVdxfObject(data, vdxfkey); + case 2 /* IdentityDataClassTypes.BUFFER_DATA_BYTES */: + return new __2.HexDataVdxfObject(data, vdxfkey); + case 3 /* IdentityDataClassTypes.BUFFER_DATA_BASE64 */: + return new __2.BufferDataVdxfObject(data, vdxfkey, "base64"); + case 4 /* IdentityDataClassTypes.URL */: + return new __2.BufferDataVdxfObject(data, vdxfkey, "utf8"); + case 5 /* IdentityDataClassTypes.PNG_IMAGE */: + return new __2.PNGImageVdxfObject(data, vdxfkey); + case 6 /* IdentityDataClassTypes.KEY_ONLY */: + return new __1.VDXFObject(vdxfkey); + case 7 /* IdentityDataClassTypes.BOOLEAN */: + return new __2.HexDataVdxfObject(data, vdxfkey); + case undefined: + default: + return new __2.HexDataVdxfObject(data, vdxfkey); + } + } + dataByteLength() { + let length = 0; + length += this.dataItem.byteLength(); + length += varuint_1.default.encodingLength(this.salt.length); + length += this.salt.length; + return length; + } + toBuffer() { + const buffer = Buffer.alloc(this.dataByteLength()); + const writer = new bufferutils_1.default.BufferWriter(buffer); + writer.writeSlice(this.dataItem.toBuffer()); + writer.writeVarSlice(this.salt); + return writer.buffer; + } + fromDataBuffer(buffer, offset = 0, vdxfkey) { + const reader = new bufferutils_1.default.BufferReader(buffer, offset); + reader.offset = this.dataItem.fromBuffer(reader.buffer, reader.offset, vdxfkey); + this.salt = reader.readVarSlice(); + return reader.offset; + } +} +exports.AttestationDataType = AttestationDataType; +const friendlyNames = (vdfxkey) => { + if (vdfxkey in IdentityData_1.IdentityVdxfidMap) { + return IdentityData_1.IdentityVdxfidMap[vdfxkey].name; + } + else { + throw new Error("Unknown VDXF key"); + } +}; +exports.friendlyNames = friendlyNames; +class AttestationData { + constructor(components = new Map()) { + this.components = components; + } + dataByteLength() { + let byteLength = 0; + byteLength += varuint_1.default.encodingLength(this.components.size); + for (const [key, item] of this.components) { + byteLength += varuint_1.default.encodingLength(key); + byteLength += item.dataByteLength(); + } + return byteLength; + } + toDataBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); + bufferWriter.writeCompactSize(this.components.size); + for (const [key, item] of this.components) { + bufferWriter.writeCompactSize(key); + bufferWriter.writeSlice(item.toBuffer()); + } + return bufferWriter.buffer; + } + fromDataBuffer(buffer, offset) { + const reader = new bufferutils_1.default.BufferReader(buffer, offset); + const componentsLength = reader.readCompactSize(); + this.components = new Map(); + for (var i = 0; i < componentsLength; i++) { + const key = reader.readCompactSize(); + const vdxfid = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + const attestationData = new AttestationDataType(null, vdxfid); + reader.offset = attestationData.fromDataBuffer(reader.buffer, reader.offset, vdxfid); + this.components.set(key, attestationData); + } + return reader.offset; + } + size() { + return this.components.size; + } + setDataFromJson(data, getSalt) { + if (!this.components) { + this.components = new Map(); + } + for (let i = 0; i < data.length; i++) { + const item = data[i]; + if (!(item.salt instanceof Buffer) || item.salt.length !== 32) { + if (typeof getSalt === "function") { + item.salt = getSalt(); + } + else { + throw new Error("Salt is required to be a 32 random byte Buffer"); + } + } + try { + (0, address_1.fromBase58Check)(item.dataItem.vdxfkey); + } + catch (e) { + throw new Error("Attestation Key is required to be base58 format"); + } + this.components.set(i, item); + } + } + getHash(key) { + let value; + value = this.components.get(key).toBuffer(); + return createHash("sha256").update(value).digest(); + } +} +exports.AttestationData = AttestationData; +class AttestationRequest extends __1.VDXFObject { + dataByteLength() { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; + let length = 0; + length += varuint_1.default.encodingLength((_b = (_a = this.data.accepted_attestors) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0); + length += (_d = (_c = this.data.accepted_attestors) === null || _c === void 0 ? void 0 : _c.reduce((sum, current) => sum + current.byteLength(), 0)) !== null && _d !== void 0 ? _d : 0; + length += varuint_1.default.encodingLength((_f = (_e = this.data.attestation_keys) === null || _e === void 0 ? void 0 : _e.length) !== null && _f !== void 0 ? _f : 0); + length += (_h = (_g = this.data.attestation_keys) === null || _g === void 0 ? void 0 : _g.reduce((sum, current) => sum + current.byteLength(), 0)) !== null && _h !== void 0 ? _h : 0; + length += varuint_1.default.encodingLength((_k = (_j = this.data.attestor_filters) === null || _j === void 0 ? void 0 : _j.length) !== null && _k !== void 0 ? _k : 0); + length += (_m = (_l = this.data.attestor_filters) === null || _l === void 0 ? void 0 : _l.reduce((sum, current) => sum + current.byteLength(), 0)) !== null && _m !== void 0 ? _m : 0; + return length; + } + toDataBuffer() { + const writer = new bufferutils_1.default.BufferWriter(Buffer.alloc(this.dataByteLength())); + writer.writeArray(this.data.accepted_attestors.map((x) => x.toBuffer())); + writer.writeArray(this.data.attestation_keys.map((x) => x.toBuffer())); + writer.writeArray(this.data.attestor_filters.map((x) => x.toBuffer())); + return writer.buffer; + } + fromDataBuffer(buffer, offset) { + const reader = new bufferutils_1.default.BufferReader(buffer, offset); + reader.readVarInt(); //skip data length + function readHash160Array(arr) { + const length = reader.readVarInt(); + for (let i = 0; i < length.toNumber(); i++) { + const member = new Hash160_1.Hash160(); + reader.offset = member.fromBuffer(reader.buffer, false, reader.offset); + arr.push(member); + } + if (length.toNumber() === 0) + arr = []; + } + readHash160Array(this.data.accepted_attestors); + readHash160Array(this.data.attestation_keys); + readHash160Array(this.data.attestor_filters); + return reader.offset; + } + static initializeData(data) { + var retData; + if (typeof data === 'object') { + retData = { + accepted_attestors: (data.accepted_attestors || []).map((x) => typeof x === 'string' ? Hash160_1.Hash160.fromAddress(x) : x), + attestation_keys: (data.attestation_keys || []).map((x) => typeof x === 'string' ? Hash160_1.Hash160.fromAddress(x) : x), + attestor_filters: (data.attestor_filters || []).map((x) => typeof x === 'string' ? Hash160_1.Hash160.fromAddress(x) : x) + }; + } + else { + retData = { + accepted_attestors: [], + attestation_keys: [], + attestor_filters: [] + }; + } + return retData; + } + toJson() { + const { accepted_attestors, attestation_keys, attestor_filters } = this.data; + return { + vdxfkey: this.vdxfkey, + data: { + accepted_attestors: (accepted_attestors === null || accepted_attestors === void 0 ? void 0 : accepted_attestors.map((x) => x.toAddress())) || [], + attestation_keys: (attestation_keys === null || attestation_keys === void 0 ? void 0 : attestation_keys.map((x) => x.toAddress())) || [], + attestor_filters: (attestor_filters === null || attestor_filters === void 0 ? void 0 : attestor_filters.map((x) => x.toAddress())) || [] + } + }; + } +} +exports.AttestationRequest = AttestationRequest; class Attestation extends __1.VDXFObject { constructor(data, vdxfkey = keys_1.ATTESTATION_OBJECT.vdxfid) { super(vdxfkey); @@ -74,7 +272,7 @@ class Attestation extends __1.VDXFObject { const reader = new bufferutils_1.default.BufferReader(buffer, offset); const attestationsByteLength = reader.readCompactSize(); //dummy read if (!this.data) { - this.data = new AttestationData_1.AttestationData(); + this.data = new AttestationData(); } reader.offset = this.data.fromDataBuffer(reader.buffer, reader.offset); this.system_id = (0, address_1.toBase58Check)(reader.readSlice(vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION); @@ -119,7 +317,7 @@ class Attestation extends __1.VDXFObject { // returns an attestation with a sparse MMR containing the leaves specified getProof(keys) { const view = new MMR_1.CMerkleMountainView(this.mmr); - const attestationItems = new AttestationData_1.AttestationData(); + const attestationItems = new AttestationData(); const localCMMR = new MMR_1.CMMRProof(); keys.forEach((key, index) => { view.GetProof(localCMMR, key); @@ -171,7 +369,7 @@ class CPartialAttestationProof extends __1.VDXFObject { this.type = this.EType.TYPE_ATTESTATION; if (data) { this.proof = data.proof || new MMR_1.CMMRProof(); - this.componentsArray = data.componentsArray || new AttestationData_1.AttestationData(); + this.componentsArray = data.componentsArray || new AttestationData(); this.system_id = data.system_id; this.signing_id = data.signing_id; } @@ -212,7 +410,7 @@ class CPartialAttestationProof extends __1.VDXFObject { this.type = reader.readCompactSize(); this.proof = new MMR_1.CMMRProof(); reader.offset = this.proof.fromDataBuffer(reader.buffer, reader.offset); - this.componentsArray = new AttestationData_1.AttestationData(); + this.componentsArray = new AttestationData(); reader.offset = this.componentsArray.fromDataBuffer(reader.buffer, reader.offset); this.system_id = (0, address_1.toBase58Check)(reader.readSlice(vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION); this.signing_id = (0, address_1.toBase58Check)(reader.readSlice(vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION); diff --git a/dist/vdxf/classes/Challenge.d.ts b/dist/vdxf/classes/Challenge.d.ts index 8eb42a4..c59455c 100644 --- a/dist/vdxf/classes/Challenge.d.ts +++ b/dist/vdxf/classes/Challenge.d.ts @@ -1,8 +1,8 @@ /// import { Utf8DataVdxfObject, VDXFObject, Utf8OrBase58Object } from "../"; import { Context } from "./Context"; -import { Hash160 } from "./Hash160"; import { Attestation } from "./Attestation"; +import { AttestationRequestInterfaceDataInterface } from './Attestation'; export declare class RedirectUri extends VDXFObject { uri: string; constructor(uri?: string, vdxfkey?: string); @@ -77,26 +77,6 @@ export declare class Challenge extends VDXFObject implements ChallengeInterface skip: boolean; }; } -export interface AttestationRequestInterfaceDataInterface { - accepted_attestors: Array; - attestation_keys: Array; - attestor_filters?: Array; -} -export declare class AttestationRequest extends VDXFObject { - data: AttestationRequestInterfaceDataInterface; - dataByteLength(): number; - toDataBuffer(): Buffer; - fromDataBuffer(buffer: Buffer, offset?: number): number; - static initializeData(data: string | AttestationRequestInterfaceDataInterface): any; - toJson(): { - vdxfkey: string; - data: { - accepted_attestors: string[]; - attestation_keys: string[]; - attestor_filters: string[]; - }; - }; -} export declare class RequestedPermission extends VDXFObject { data: string | AttestationRequestInterfaceDataInterface; encoding?: BufferEncoding; diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index af3a6da..e82cc03 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.RequestedPermission = exports.AttestationRequest = exports.Challenge = exports.AltAuthFactor = exports.Audience = exports.ProvisioningInfo = exports.Subject = exports.RedirectUri = void 0; +exports.RequestedPermission = exports.Challenge = exports.AltAuthFactor = exports.Audience = exports.ProvisioningInfo = exports.Subject = exports.RedirectUri = void 0; const __1 = require("../"); const bufferutils_1 = require("../../utils/bufferutils"); const varuint_1 = require("../../utils/varuint"); @@ -10,6 +10,7 @@ const Attestation_1 = require("./Attestation"); const address_1 = require("../../utils/address"); const vdxf_1 = require("../../constants/vdxf"); const index_1 = require("../index"); +const Attestation_2 = require("./Attestation"); class RedirectUri extends __1.VDXFObject { constructor(uri = "", vdxfkey = "") { super(vdxfkey); @@ -259,74 +260,6 @@ class Challenge extends __1.VDXFObject { } } exports.Challenge = Challenge; -class AttestationRequest extends __1.VDXFObject { - dataByteLength() { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; - let length = 0; - length += varuint_1.default.encodingLength((_b = (_a = this.data.accepted_attestors) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0); - length += (_d = (_c = this.data.accepted_attestors) === null || _c === void 0 ? void 0 : _c.reduce((sum, current) => sum + current.byteLength(), 0)) !== null && _d !== void 0 ? _d : 0; - length += varuint_1.default.encodingLength((_f = (_e = this.data.attestation_keys) === null || _e === void 0 ? void 0 : _e.length) !== null && _f !== void 0 ? _f : 0); - length += (_h = (_g = this.data.attestation_keys) === null || _g === void 0 ? void 0 : _g.reduce((sum, current) => sum + current.byteLength(), 0)) !== null && _h !== void 0 ? _h : 0; - length += varuint_1.default.encodingLength((_k = (_j = this.data.attestor_filters) === null || _j === void 0 ? void 0 : _j.length) !== null && _k !== void 0 ? _k : 0); - length += (_m = (_l = this.data.attestor_filters) === null || _l === void 0 ? void 0 : _l.reduce((sum, current) => sum + current.byteLength(), 0)) !== null && _m !== void 0 ? _m : 0; - return length; - } - toDataBuffer() { - const writer = new bufferutils_1.default.BufferWriter(Buffer.alloc(this.dataByteLength())); - writer.writeArray(this.data.accepted_attestors.map((x) => x.toBuffer())); - writer.writeArray(this.data.attestation_keys.map((x) => x.toBuffer())); - writer.writeArray(this.data.attestor_filters.map((x) => x.toBuffer())); - return writer.buffer; - } - fromDataBuffer(buffer, offset) { - const reader = new bufferutils_1.default.BufferReader(buffer, offset); - reader.readVarInt(); //skip data length - function readHash160Array(arr) { - const length = reader.readVarInt(); - for (let i = 0; i < length.toNumber(); i++) { - const member = new Hash160_1.Hash160(); - reader.offset = member.fromBuffer(reader.buffer, false, reader.offset); - arr.push(member); - } - if (length.toNumber() === 0) - arr = []; - } - readHash160Array(this.data.accepted_attestors); - readHash160Array(this.data.attestation_keys); - readHash160Array(this.data.attestor_filters); - return reader.offset; - } - static initializeData(data) { - var retData; - if (typeof data === 'object') { - retData = { - accepted_attestors: (data.accepted_attestors || []).map((x) => typeof x === 'string' ? Hash160_1.Hash160.fromAddress(x) : x), - attestation_keys: (data.attestation_keys || []).map((x) => typeof x === 'string' ? Hash160_1.Hash160.fromAddress(x) : x), - attestor_filters: (data.attestor_filters || []).map((x) => typeof x === 'string' ? Hash160_1.Hash160.fromAddress(x) : x) - }; - } - else { - retData = { - accepted_attestors: [], - attestation_keys: [], - attestor_filters: [] - }; - } - return retData; - } - toJson() { - const { accepted_attestors, attestation_keys, attestor_filters } = this.data; - return { - vdxfkey: this.vdxfkey, - data: { - accepted_attestors: (accepted_attestors === null || accepted_attestors === void 0 ? void 0 : accepted_attestors.map((x) => x.toAddress())) || [], - attestation_keys: (attestation_keys === null || attestation_keys === void 0 ? void 0 : attestation_keys.map((x) => x.toAddress())) || [], - attestor_filters: (attestor_filters === null || attestor_filters === void 0 ? void 0 : attestor_filters.map((x) => x.toAddress())) || [] - } - }; - } -} -exports.AttestationRequest = AttestationRequest; class RequestedPermission extends __1.VDXFObject { constructor(data = "", vdxfkey = "") { super(vdxfkey); @@ -337,8 +270,8 @@ class RequestedPermission extends __1.VDXFObject { var classType; switch (this.vdxfkey) { case __1.ATTESTATION_READ_REQUEST.vdxfid: - classType = AttestationRequest; - this.data = AttestationRequest.initializeData(data); + classType = Attestation_2.AttestationRequest; + this.data = Attestation_2.AttestationRequest.initializeData(data); break; case __1.IDENTITY_AGREEMENT.vdxfid: classType = index_1.BufferDataVdxfObject; diff --git a/dist/vdxf/classes/IdentityData.d.ts b/dist/vdxf/classes/IdentityData.d.ts new file mode 100644 index 0000000..a495f91 --- /dev/null +++ b/dist/vdxf/classes/IdentityData.d.ts @@ -0,0 +1,15 @@ +export declare const enum IdentityDataClassTypes { + BUFFER_DATA_STRING = 1, + BUFFER_DATA_BYTES = 2, + BUFFER_DATA_BASE64 = 3, + URL = 4, + PNG_IMAGE = 5, + KEY_ONLY = 6, + BOOLEAN = 7 +} +export declare const IdentityVdxfidMap: { + [x: string]: { + name: string; + type: IdentityDataClassTypes; + }; +}; diff --git a/dist/vdxf/classes/IdentityData.js b/dist/vdxf/classes/IdentityData.js new file mode 100644 index 0000000..af56b30 --- /dev/null +++ b/dist/vdxf/classes/IdentityData.js @@ -0,0 +1,218 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.IdentityVdxfidMap = void 0; +const identitykeys = require("../identitydatakeys"); +const keylist = require("../keys"); +const bufferutils_1 = require("../../utils/bufferutils"); +const { BufferReader, BufferWriter } = bufferutils_1.default; +exports.IdentityVdxfidMap = { + [identitykeys.IDENTITYDATA_FIRSTNAME.vdxfid]: { name: "First Name", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_LASTNAME.vdxfid]: { name: "Last Name", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_ATTESTOR.vdxfid]: { name: "Attestor ID", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDENTITY.vdxfid]: { name: "Identity", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_ID.vdxfid]: { name: "ID", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_USERID.vdxfid]: { name: "User ID", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_CREATEDAT.vdxfid]: { name: "Created at", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_COMPLETEDAT.vdxfid]: { name: "Completed at", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PREVIOUSATTEMPTID.vdxfid]: { name: "Previous attempt ID", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_SHAREABLEURL.vdxfid]: { name: "Shareable URL", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_TEMPLATEID.vdxfid]: { name: "Template ID", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_TEMPLATEVERSION.vdxfid]: { name: "Template Version", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PHONENUMBER.vdxfid]: { name: "Phone Number", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_OVER18.vdxfid]: { name: "Over 18", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_OVER21.vdxfid]: { name: "Over 21", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_OVER25.vdxfid]: { name: "Over 25", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_IPADDRESS.vdxfid]: { name: "IP Address", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_EMAIL.vdxfid]: { name: "Email Address", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_HOMEADDRESS.vdxfid]: { name: "Home address", type: 6 /* IdentityDataClassTypes.KEY_ONLY */ }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1.vdxfid]: { name: "Street 1", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2.vdxfid]: { name: "Street 2", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_CITY.vdxfid]: { name: "City", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_REGION.vdxfid]: { name: "Region", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE.vdxfid]: { name: "Post Code", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY.vdxfid]: { name: "Country", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDNUMBER_VALUE.vdxfid]: { name: "ID Number", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDNUMBER_TYPE.vdxfid]: { name: "ID Type", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_STATUS.vdxfid]: { name: "Status", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_APPROVALS_ACCEPTEDTOS.vdxfid]: { name: "Accepted Terms and Conditions", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_APPROVALS_VERIFIEDSMS.vdxfid]: { name: "SMS Verified", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_APPROVALS_KYCCHECKED.vdxfid]: { name: "KYC Checked ok", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_APPROVALS_DOCUMENTSVERIFIED.vdxfid]: { name: "Documents Verified", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_APPROVALS_SELFIECHECKED.vdxfid]: { name: "Selfie Checked", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_APPROVALS_WATCHLIST_OK.vdxfid]: { name: "Watchlist ok", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Riskcheck ok", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE.vdxfid]: { name: "Driving Licence", type: 6 /* IdentityDataClassTypes.KEY_ONLY */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_FRONT.vdxfid]: { name: "Driving Licence Front", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_BACK.vdxfid]: { name: "Driving Licence Back", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_FRONT.vdxfid]: { name: "Driving Licence Front", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_BACK.vdxfid]: { name: "Driving Licence Back", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_FACE.vdxfid]: { name: "Driving Licence Face", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_IDNUMBER.vdxfid]: { name: "Driving Licence Number", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CATEGORY.vdxfid]: { name: "Driving Licence Catagory", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_EXPIRATIONDATE.vdxfid]: { name: "Driving Licence expiry date", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Driving Licence matches country", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION.vdxfid]: { name: "Driving Licence issuing reigon", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH.vdxfid]: { name: "Driving Licence Date of Birth", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ADDRESS.vdxfid]: { name: "Driving Licence Address", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_STREET1.vdxfid]: { name: "Driving Licence Street 1", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CITY.vdxfid]: { name: "Driving Licence City", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_REGION.vdxfid]: { name: "Driving Licence Region", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_POSTCODE.vdxfid]: { name: "Driving Licence ZIP/Post Code", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_COUNTRY.vdxfid]: { name: "Driving Licence Country", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_MATCHED.vdxfid]: { name: "Driving Licence Matched all", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_NAME_MATCHED.vdxfid]: { name: "Driving Licence name matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH_MATCHED.vdxfid]: { name: "Driving Licence Date of Birth Matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_SELFIECHECK_SUCCESS.vdxfid]: { name: "Selfie Check success", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_SELFIECHECK_IMAGE.vdxfid]: { name: "Selfie Check image", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_SELFIECHECK_VIDEO.vdxfid]: { name: "Selfie Check video", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_SELFIECHECK_DRIVINGLICENCE_MATCH.vdxfid]: { name: "Selfie Driving Licence match", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_KYC_SUCCESS.vdxfid]: { name: "KYC Success", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_KYC_ADDRESS_MATCHED.vdxfid]: { name: "KYC Address Matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_KYC_TYPE.vdxfid]: { name: "KYC Type", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_KYC_NAME_MATCHED.vdxfid]: { name: "KYC Name Matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_KYC_DATEOFBIRTH_MATCHED.vdxfid]: { name: "KYC Date of Birth Matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_KYC_IDNUMBER_MATCHED.vdxfid]: { name: "KYC ID Matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_KYC_PHONENUMBER_MATCHED.vdxfid]: { name: "KYC Phone number matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_KYC_AREACODE_MATCHED.vdxfid]: { name: "KYC Areacode Matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RISKCHECK_STATUS.vdxfid]: { name: "Risk Check Status", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RISKCHECK_USERINTERACTIONS.vdxfid]: { name: "Risck Check User Interactions", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RISKCHECK_FRAUDRINGOK.vdxfid]: { name: "Risk Check No Fraudring", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RISKCHECK_BOTNOTDETECTED.vdxfid]: { name: "Risk Check bot free", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_EMAIL_ISDELIVERABLE.vdxfid]: { name: "Email address is deliverable", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_EMAIL_BREACHCOUNT.vdxfid]: { name: "Email breach count", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_EMAIL_FIRSTBREACHEDAT.vdxfid]: { name: "Email first breach date", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_EMAIL_LASTBREACHEDAT.vdxfid]: { name: "Email last breach date", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_REGISTEREDAT.vdxfid]: { name: "Email domain registered at", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_FREEPROVIDER.vdxfid]: { name: "Email is free provider", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_CUSTOM.vdxfid]: { name: "Email Domain is custom", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_DISPOSABLE.vdxfid]: { name: "Email Domain Disposable", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS.vdxfid]: { name: "Email top level Domain Suspicious", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDCARD.vdxfid]: { name: "ID Card", type: 6 /* IdentityDataClassTypes.KEY_ONLY */ }, + [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_FRONT.vdxfid]: { name: "ID Card Front", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_BACK.vdxfid]: { name: "ID Card Back", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_IDCARD_CROPPED_FRONT.vdxfid]: { name: "ID Card Front", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_IDCARD_CROPPED_BACK.vdxfid]: { name: "ID Card Back", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_IDCARD_FACE.vdxfid]: { name: "ID Card Face", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_IDCARD_IDNUMBER.vdxfid]: { name: "ID Card ID Number", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDCARD_CATEGORY.vdxfid]: { name: "ID Card Category", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDCARD_EXPIRATIONDATE.vdxfid]: { name: "ID Card Expiry date", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "ID Card Issuing Country Matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDCARD_ISSUING_REGION.vdxfid]: { name: "ID Card Issuing Region", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTH.vdxfid]: { name: "ID Card Date of Birth", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS.vdxfid]: { name: "ID Card Address", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_STREET1.vdxfid]: { name: "ID Card Street 1", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_CITY.vdxfid]: { name: "ID Card City", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_REGION.vdxfid]: { name: "ID Card Region", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_POSTCODE.vdxfid]: { name: "ID Card Zip/Post Code", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_COUNTRY.vdxfid]: { name: "ID Card Country", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "ID Card Matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_IDCARD_NAME_MATCHED.vdxfid]: { name: "ID Card Name Matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "ID Card Date of Birth Matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_PASSPORT.vdxfid]: { name: "Passport", type: 6 /* IdentityDataClassTypes.KEY_ONLY */ }, + [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_FRONT.vdxfid]: { name: "Passport front", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_BACK.vdxfid]: { name: "Passport back", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_FRONT.vdxfid]: { name: "Passport front", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_BACK.vdxfid]: { name: "Passport back", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_PASSPORT_FACE.vdxfid]: { name: "Passport face", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_PASSPORT_IDNUMBER.vdxfid]: { name: "Passport ID Number", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PASSPORT_CATEGORY.vdxfid]: { name: "Passport Category", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PASSPORT_EXPIRATIONDATE.vdxfid]: { name: "Passport expiry date", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Passport issuing country matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_REGION.vdxfid]: { name: "Passport issuing region matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTH.vdxfid]: { name: "Passport date of birth", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS.vdxfid]: { name: "Passport address", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_STREET1.vdxfid]: { name: "Passport street 1", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_CITY.vdxfid]: { name: "Passport city", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_REGION.vdxfid]: { name: "Passport region", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_POSTCODE.vdxfid]: { name: "Passport zip/post code", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_COUNTRY.vdxfid]: { name: "Passport country", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PASSPORT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Passport matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_PASSPORT_NAME_MATCHED.vdxfid]: { name: "Passport Name Matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTHMATCHED.vdxfid]: { name: "Passport date of birth matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT.vdxfid]: { name: "Residence Permit", type: 6 /* IdentityDataClassTypes.KEY_ONLY */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_FRONT.vdxfid]: { name: "Residence Permit front", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_BACK.vdxfid]: { name: "Residence Permit back", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_FRONT.vdxfid]: { name: "Residence Permit front", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_BACK.vdxfid]: { name: "Residence Permit back", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_FACE.vdxfid]: { name: "Residence Permit face", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_IDNUMBER.vdxfid]: { name: "Residence Permit ID Number", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CATEGORY.vdxfid]: { name: "Residence Permit category", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_EXPIRATIONDATE.vdxfid]: { name: "Residence Permit expiry date", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Residence Permit issuing country matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_REGION.vdxfid]: { name: "Residence Permit issuing region matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTH.vdxfid]: { name: "Residence Permit date of birth", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS.vdxfid]: { name: "Residence Permit Address", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_STREET1.vdxfid]: { name: "Residence Permit Street 1", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_CITY.vdxfid]: { name: "Residence Permit City", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_REGION.vdxfid]: { name: "Residence Permit Region", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_POSTCODE.vdxfid]: { name: "Residence Permit Zip/Post code", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_COUNTRY.vdxfid]: { name: "Residence Permit Country", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Residence Permit Matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_NAME_MATCHED.vdxfid]: { name: "Residence Permit name matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTHMATCHED.vdxfid]: { name: "Residence Permit date of birth matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD.vdxfid]: { name: "Resident Card", type: 6 /* IdentityDataClassTypes.KEY_ONLY */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_FRONT.vdxfid]: { name: "Resident Card Front", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_BACK.vdxfid]: { name: "Resident Card Back", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_FRONT.vdxfid]: { name: "Resident Card Front", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_BACK.vdxfid]: { name: "Resident Card Back", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_FACE.vdxfid]: { name: "Resident Card Face", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_IDNUMBER.vdxfid]: { name: "Resident Card ID Number", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_CATEGORY.vdxfid]: { name: "Resident Card Category", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_EXPIRATIONDATE.vdxfid]: { name: "Resident Card Expiry Date", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Resident Card Issuing Country Matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_REGION.vdxfid]: { name: "Resident Card Issuing Region", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTH.vdxfid]: { name: "Resident Card date of birth", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS.vdxfid]: { name: "Resident Card address", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_STREET1.vdxfid]: { name: "Resident Card Street 1", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_CITY.vdxfid]: { name: "Resident Card City", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_REGION.vdxfid]: { name: "Resident Card Region", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_POSTCODE.vdxfid]: { name: "Resident Card Zip/Post Code", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_COUNTRY.vdxfid]: { name: "Resident Card Country", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Resident Card Matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_NAME_MATCHED.vdxfid]: { name: "Resident Card Name Matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "Resident Card date of birth Matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_VISA.vdxfid]: { name: "Visa", type: 6 /* IdentityDataClassTypes.KEY_ONLY */ }, + [identitykeys.IDENTITYDATA_VISA_ORIGINAL_FRONT.vdxfid]: { name: "Visa front", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_VISA_ORIGINAL_BACK.vdxfid]: { name: "Visa back", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_VISA_CROPPED_FRONT.vdxfid]: { name: "Visa front", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_VISA_CROPPED_BACK.vdxfid]: { name: "Visa back", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_VISA_FACE.vdxfid]: { name: "Visa face", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_VISA_IDNUMBER.vdxfid]: { name: "Visa ID Number", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_VISA_CATEGORY.vdxfid]: { name: "Visa Category", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_VISA_EXPIRATIONDATE.vdxfid]: { name: "Visa expiry date", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Visa issuing country matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_VISA_ISSUING_REGION.vdxfid]: { name: "Visa issuing region", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTH.vdxfid]: { name: "Visa date of birth", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS.vdxfid]: { name: "Visa address", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_STREET1.vdxfid]: { name: "Visa Street 1", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_CITY.vdxfid]: { name: "Visa City", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_REGION.vdxfid]: { name: "Visa Region", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_POSTCODE.vdxfid]: { name: "Visa Zip/Post Code", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_COUNTRY.vdxfid]: { name: "Visa Country", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_VISA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Visa document matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_VISA_NAME_MATCHED.vdxfid]: { name: "Visa name matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTHMATCHED.vdxfid]: { name: "Visa date of birth matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALFRONT.vdxfid]: { name: "Original Front", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALBACK.vdxfid]: { name: "Original Back", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDFRONT.vdxfid]: { name: "Cropped Front", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDBACK.vdxfid]: { name: "Cropped Back", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_FACE.vdxfid]: { name: "Face", type: 4 /* IdentityDataClassTypes.URL */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_IDNUMBER.vdxfid]: { name: "ID Number", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CATEGORY.vdxfid]: { name: "Category", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_EXPIRATIONDATE.vdxfid]: { name: "Expiry Date", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY.vdxfid]: { name: "Issuing Country", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUING_REGION.vdxfid]: { name: "Issuing Region", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ADDRESS.vdxfid]: { name: "Address", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_ADDRESS_STREET1.vdxfid]: { name: "Street 1", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_ADDRESS_STREET2.vdxfid]: { name: "Street 2", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_ADDRESS_CITY.vdxfid]: { name: "City", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_ADDRESS_REGION.vdxfid]: { name: "Region", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_ADDRESS_POSTCODE.vdxfid]: { name: "Zip/Postal Code", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_ADDRESS_COUNTRY.vdxfid]: { name: "Country", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Document Matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED.vdxfid]: { name: "Name Matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED.vdxfid]: { name: "Date of Birth Matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [keylist.ATTESTATION_TYPE.vdxfid]: { name: "Attestation Type", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, +}; diff --git a/dist/vdxf/classes/PersonalData.js b/dist/vdxf/classes/PersonalData.js index 360a5ee..658cc83 100644 --- a/dist/vdxf/classes/PersonalData.js +++ b/dist/vdxf/classes/PersonalData.js @@ -28,7 +28,7 @@ class PersonalData extends __1.VDXFObject { byteLength += vdxf_1.HASH160_BYTE_LENGTH; // category byteLength += varuint_1.default.encodingLength(value.length); for (const attestation of value) { - byteLength += attestation.dataBytelength(); + byteLength += attestation.dataByteLength(); } } byteLength += varuint_1.default.encodingLength(this.linkedAttestation.length); diff --git a/dist/vdxf/classes/PersonalProfile.d.ts b/dist/vdxf/classes/PersonalProfile.d.ts new file mode 100644 index 0000000..99d741d --- /dev/null +++ b/dist/vdxf/classes/PersonalProfile.d.ts @@ -0,0 +1,24 @@ +/// +import { VDXFObject } from ".."; +export declare class DataCategory { + data: Array; + category: string; + vdxfid: string; + constructor(data: Array | Array<{ + vdxfid: string; + }>, category: string, vdxfid: string); +} +export declare class PersonalProfileDataStore extends VDXFObject { + data: { + [key: string]: DataCategory; + }; + constructor(data?: Array); + dataByteLength(): number; + toDataBuffer(): Buffer; + fromDataBuffer(buffer: Buffer, offset?: number): number; + toJson(): { + data: { + [key: string]: DataCategory; + }; + }; +} diff --git a/dist/vdxf/classes/PersonalProfile.js b/dist/vdxf/classes/PersonalProfile.js new file mode 100644 index 0000000..e619833 --- /dev/null +++ b/dist/vdxf/classes/PersonalProfile.js @@ -0,0 +1,125 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PersonalProfileDataStore = exports.DataCategory = void 0; +const varuint_1 = require("../../utils/varuint"); +const bufferutils_1 = require("../../utils/bufferutils"); +const address_1 = require("../../utils/address"); +const vdxf_1 = require("../../constants/vdxf"); +const __1 = require(".."); +const Attestation_1 = require("./Attestation"); +const identitykeys = require("../identitydatakeys"); +const { BufferReader, BufferWriter } = bufferutils_1.default; +class DataCategory { + constructor(data, category, vdxfid) { + if (data && data[0] instanceof __1.VDXFObject) { + this.data = data; + } + else if (data) { + this.data = data.map(key => { return Attestation_1.AttestationDataType.getDataItem(key.vdxfid, null); }); + } + this.category = category; + this.vdxfid = vdxfid; + } +} +exports.DataCategory = DataCategory; +class PersonalDataCategory extends DataCategory { + constructor() { + super([ + identitykeys.IDENTITYDATA_FIRSTNAME, + identitykeys.IDENTITYDATA_LASTNAME, + identitykeys.IDENTITYDATA_DATEOFBIRTH, + identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY + ], "personal", identitykeys.IDENTITYDATA_PERSONAL_DETAILS.vdxfid); + } +} +class ContactDataCategory extends DataCategory { + constructor() { + super([ + identitykeys.IDENTITYDATA_EMAIL, + identitykeys.IDENTITYDATA_PHONENUMBER + ], "contact", identitykeys.IDENTITYDATA_CONTACT.vdxfid); + } +} +class LocationDataCategory extends DataCategory { + constructor() { + super([ + identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1, + identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2, + identitykeys.IDENTITYDATA_HOMEADDRESS_CITY, + identitykeys.IDENTITYDATA_HOMEADDRESS_REGION, + identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE + ], "locations", identitykeys.IDENTITYDATA_LOCATIONS.vdxfid); + } +} +const defaultPersonalProfileDataTemplate = [ + new PersonalDataCategory(), + new ContactDataCategory(), + new LocationDataCategory() +]; +class PersonalProfileDataStore extends __1.VDXFObject { + constructor(data) { + super(identitykeys.PERSONAL_INFO_OBJECT.vdxfid); + if (data) { + this.data = {}; + for (const item of data) { + this.data[item.category] = item; + } + } + else { + this.data = {}; + for (const item of defaultPersonalProfileDataTemplate) { + this.data[item.category] = item; + } + } + } + dataByteLength() { + let byteLength = 0; + byteLength += varuint_1.default.encodingLength(Object.keys(this.data).length); + for (const [key, value] of Object.entries(this.data)) { + byteLength += vdxf_1.HASH160_BYTE_LENGTH; // category + byteLength += varuint_1.default.encodingLength(value.data.length); + for (const attestation of value.data) { + byteLength += attestation.toBuffer().length; + } + } + return byteLength; + } + toDataBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); + bufferWriter.writeCompactSize(Object.keys(this.data).length); + for (const [key, value] of Object.entries(this.data)) { + bufferWriter.writeSlice((0, address_1.fromBase58Check)(value.vdxfid).hash); + bufferWriter.writeCompactSize(value.data.length); + for (const dataType of value.data) { + bufferWriter.writeSlice(dataType.toBuffer()); + } + } + return bufferWriter.buffer; + } + fromDataBuffer(buffer, offset) { + const reader = new BufferReader(buffer, offset); + const dataLength = reader.readCompactSize(); + if (!this.data) { + this.data = {}; + } + for (var i = 0; i < dataLength; i++) { + const vdxfkey = (0, address_1.toBase58Check)(reader.readSlice(vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION); + const dataLength = reader.readCompactSize(); + const data = []; + for (var j = 0; j < dataLength; j++) { + const attestation = Attestation_1.AttestationDataType.getDataItem((0, address_1.toBase58Check)(reader.buffer.slice(reader.offset, reader.offset + vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION), null); + reader.offset = attestation.fromBuffer(reader.buffer, reader.offset); + data.push(attestation); + } + const categoryType = Object.entries(this.data).find(([key, value]) => value.vdxfid === vdxfkey); + this.data[categoryType[1].category].data = data; + } + return reader.offset; + } + toJson() { + return { + data: this.data, + }; + } +} +exports.PersonalProfileDataStore = PersonalProfileDataStore; diff --git a/dist/vdxf/classes/attestationData.d.ts b/dist/vdxf/classes/attestationData.d.ts index 279c2d8..0136d88 100644 --- a/dist/vdxf/classes/attestationData.d.ts +++ b/dist/vdxf/classes/attestationData.d.ts @@ -20,7 +20,7 @@ export declare class AttestationDataType { salt: Buffer; constructor(data?: any, vdxfkey?: string, salt?: string); getDataItem(vdxfkey: any, data: any): any; - dataBytelength(): number; + dataByteLength(): number; toBuffer(): Buffer; fromDataBuffer(buffer: Buffer, offset?: number, vdxfkey?: string): number; } diff --git a/dist/vdxf/classes/attestationData.js b/dist/vdxf/classes/attestationData.js index 5b0f340..14b2a4f 100644 --- a/dist/vdxf/classes/attestationData.js +++ b/dist/vdxf/classes/attestationData.js @@ -257,7 +257,7 @@ class AttestationDataType { break; } } - dataBytelength() { + dataByteLength() { let length = 0; length += this.dataItem.byteLength(); length += varuint_1.default.encodingLength(this.salt.length); @@ -265,7 +265,7 @@ class AttestationDataType { return length; } toBuffer() { - const buffer = Buffer.alloc(this.dataBytelength()); + const buffer = Buffer.alloc(this.dataByteLength()); const writer = new bufferutils_1.default.BufferWriter(buffer); writer.writeSlice(this.dataItem.toBuffer()); writer.writeVarSlice(this.salt); @@ -297,7 +297,7 @@ class AttestationData { byteLength += varuint_1.default.encodingLength(this.components.size); for (const [key, item] of this.components) { byteLength += varuint_1.default.encodingLength(key); - byteLength += item.dataBytelength(); + byteLength += item.dataByteLength(); } return byteLength; } diff --git a/dist/vdxf/classes/index.d.ts b/dist/vdxf/classes/index.d.ts index 3a730c8..a4bd3ec 100644 --- a/dist/vdxf/classes/index.d.ts +++ b/dist/vdxf/classes/index.d.ts @@ -23,6 +23,6 @@ export { ProvisioningResultInterface as LoginConsentProvisioningResultInterface export { Hash160 } from './Hash160'; export { RedirectUri, Subject, ProvisioningInfo, RequestedPermission, Audience, AltAuthFactor, } from "./Challenge"; export { Attestation } from './Attestation'; -export { AttestationData, AttestationDataType } from './AttestationData'; +export { AttestationData, AttestationDataType } from './Attestation'; export { ProvisioningTxid } from './provisioning/ProvisioningResult'; export { Context } from './Context'; diff --git a/dist/vdxf/classes/index.js b/dist/vdxf/classes/index.js index 9a5298a..48598e6 100644 --- a/dist/vdxf/classes/index.js +++ b/dist/vdxf/classes/index.js @@ -38,9 +38,9 @@ Object.defineProperty(exports, "Audience", { enumerable: true, get: function () Object.defineProperty(exports, "AltAuthFactor", { enumerable: true, get: function () { return Challenge_2.AltAuthFactor; } }); var Attestation_1 = require("./Attestation"); Object.defineProperty(exports, "Attestation", { enumerable: true, get: function () { return Attestation_1.Attestation; } }); -var AttestationData_1 = require("./AttestationData"); -Object.defineProperty(exports, "AttestationData", { enumerable: true, get: function () { return AttestationData_1.AttestationData; } }); -Object.defineProperty(exports, "AttestationDataType", { enumerable: true, get: function () { return AttestationData_1.AttestationDataType; } }); +var Attestation_2 = require("./Attestation"); +Object.defineProperty(exports, "AttestationData", { enumerable: true, get: function () { return Attestation_2.AttestationData; } }); +Object.defineProperty(exports, "AttestationDataType", { enumerable: true, get: function () { return Attestation_2.AttestationDataType; } }); var ProvisioningResult_2 = require("./provisioning/ProvisioningResult"); Object.defineProperty(exports, "ProvisioningTxid", { enumerable: true, get: function () { return ProvisioningResult_2.ProvisioningTxid; } }); var Context_1 = require("./Context"); diff --git a/dist/vdxf/keymap.d.ts b/dist/vdxf/keymap.d.ts index c600b92..bcc3e15 100644 --- a/dist/vdxf/keymap.d.ts +++ b/dist/vdxf/keymap.d.ts @@ -1,13 +1,14 @@ -import * as AttestationData from './classes/AttestationData'; +import * as keylist from './keys'; +import * as AttestationData from './classes/IdentityData'; export declare const keymap: { - [key: string]: any; + [key: string]: keylist.VDXFKeyInterface; }; export declare const attestationDataKeys: { - [key: string]: any; + [key: string]: keylist.VDXFKeyInterface; }; -export declare const AttestationDataVdxfidMap: { +export declare const IdentityVdxfidMap: { [x: string]: { name: string; - type: AttestationData.AttestationClassTypes; + type: AttestationData.IdentityDataClassTypes; }; }; diff --git a/dist/vdxf/keymap.js b/dist/vdxf/keymap.js index 3168796..ce91803 100644 --- a/dist/vdxf/keymap.js +++ b/dist/vdxf/keymap.js @@ -1,8 +1,8 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.AttestationDataVdxfidMap = exports.attestationDataKeys = exports.keymap = void 0; +exports.IdentityVdxfidMap = exports.attestationDataKeys = exports.keymap = void 0; const keylist = require("./keys"); -const AttestationData = require("./classes/AttestationData"); +const AttestationData = require("./classes/IdentityData"); exports.keymap = Object.keys(keylist).reduce((obj, item) => { obj[keylist[item].vdxfid] = keylist[item]; return obj; }, {}); exports.attestationDataKeys = Object.keys(AttestationData).reduce((obj, item) => { obj[AttestationData[item].vdxfid] = AttestationData[item]; return obj; }, {}); -exports.AttestationDataVdxfidMap = AttestationData.AttestationVdxfidMap; +exports.IdentityVdxfidMap = AttestationData.IdentityVdxfidMap; diff --git a/src/__tests__/attestation/attestation.test.ts b/src/__tests__/attestation/attestation.test.ts index 13e082f..b531c2e 100644 --- a/src/__tests__/attestation/attestation.test.ts +++ b/src/__tests__/attestation/attestation.test.ts @@ -3,8 +3,8 @@ import { Attestation, LoginConsentRequest } from "../../vdxf/classes"; import { RedirectUri, RequestedPermission } from "../../vdxf/classes/Challenge"; import { Context } from "../../vdxf/classes/Context"; import { CPartialAttestationProof } from "../../vdxf/classes/Attestation"; -import { AttestationData, AttestationDataType } from "../../vdxf/classes/attestationData"; -import * as idkeys from "../../vdxf/identityDataKeys"; +import { AttestationData, AttestationDataType } from "../../vdxf/classes/Attestation"; +import * as idkeys from "../../vdxf/identitydatakeys"; describe('Serializes and deserializes attestation request', () => { test('attestation request with reply', async () => { diff --git a/src/__tests__/attestation/personalInfo.test.ts b/src/__tests__/attestation/personalInfo.test.ts index ffd16e0..585f6f4 100644 --- a/src/__tests__/attestation/personalInfo.test.ts +++ b/src/__tests__/attestation/personalInfo.test.ts @@ -1,42 +1,45 @@ -import { ATTESTATION_READ_REQUEST, IDENTITYDATA_NAME, IDENTITYDATA_FIRSTNAME, IDENTITYDATA_PERSONAL_DETAILS, IDENTITYDATA_LASTNAME, IDENTITYDATA_ATTESTOR, IDENTITYDATA_IDENTITY, ATTESTATION_TYPE } from "../../vdxf"; -import { Attestation, LoginConsentRequest } from "../../vdxf/classes"; -import { RedirectUri, RequestedPermission } from "../../vdxf/classes/Challenge"; -import { Context } from "../../vdxf/classes/Context"; -import { CPartialAttestationProof } from "../../vdxf/classes/Attestation"; -import { AttestationData, AttestationDataType } from "../../vdxf/classes/AttestationData"; -import * as idkeys from "../../vdxf/identitydatakeys"; -import { PersonalData } from "../../vdxf/classes/PersonalData"; +import * as identitykeys from "../../vdxf"; +import {AttestationDataType } from "../../vdxf/classes/Attestation"; +import { PersonalProfileDataStore, DataCategory } from "../../vdxf/classes/PersonalProfile"; describe('Create a personal info request', () => { test('attestation request with reply', async () => { - let nameMap = new Array(); + const profileData = new PersonalProfileDataStore(); // requested data from user. - nameMap.push(new AttestationDataType("", IDENTITYDATA_FIRSTNAME.vdxfid, "")); - nameMap.push(new AttestationDataType("", IDENTITYDATA_LASTNAME.vdxfid, "")); - nameMap.push(new AttestationDataType("", IDENTITYDATA_IDENTITY.vdxfid, "")); - - let personalMap = new Array(); - personalMap.push(new AttestationDataType("", IDENTITYDATA_ATTESTOR.vdxfid, "")); - personalMap.push(new AttestationDataType("", ATTESTATION_TYPE.vdxfid, "")); - - const personalData = new PersonalData({ - type: PersonalData.TYPE.REQUEST, - id: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - data: { - [IDENTITYDATA_NAME.vdxfid]: nameMap, - [IDENTITYDATA_PERSONAL_DETAILS.vdxfid]: personalMap - }, - linkedAttestation: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV" - }); - - const personalDataBuffer = personalData.toDataBuffer(); - - const personalData2 = new PersonalData(); + const personalDataCategory = new DataCategory([ + AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_FIRSTNAME.vdxfid, "Fred"), + AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_LASTNAME.vdxfid, "Stones"), + AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY.vdxfid, "USA"), + AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_DATEOFBIRTH.vdxfid, "01/01/1950"), + ], "personal", identitykeys.IDENTITYDATA_PERSONAL_DETAILS.vdxfid); + + profileData.data.personal = personalDataCategory; + + const contractDataCategory = profileData.data.contact; + + contractDataCategory.data = [ + AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_EMAIL.vdxfid, "abc@def.com"), + AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_PHONENUMBER.vdxfid, "123-456-7890") + ]; + + const LocationDataCategory = profileData.data.locations; + + LocationDataCategory.data = [ + AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1.vdxfid, "123 Main St"), + AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2.vdxfid, "Cobham"), + AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_HOMEADDRESS_CITY.vdxfid, "Anytown"), + AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_HOMEADDRESS_REGION.vdxfid, "AnyState"), + AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE.vdxfid, "12345") + ]; + + const personalDataBuffer = profileData.toDataBuffer(); + + const personalData2 = new PersonalProfileDataStore(); personalData2.fromDataBuffer(personalDataBuffer); - expect(personalData2.toBuffer().toString('hex')).toEqual(personalData.toBuffer().toString('hex')); + expect(personalData2.toBuffer().toString('hex')).toEqual(profileData.toBuffer().toString('hex')); }); }); diff --git a/src/__tests__/pbaas/identity.test.ts b/src/__tests__/pbaas/identity.test.ts deleted file mode 100644 index 9a6e57a..0000000 --- a/src/__tests__/pbaas/identity.test.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Identity } from "../../pbaas/Identity"; - -describe('Serializes and deserializes identity properly', () => { - test('deserialize id with contentmultimap', async () => { - const vdata = "0300000000000000011472aa70e6a4c0d0ff07541c5fbe4f08cacd89d35b01000000a6ef9ea235635e328124ff3429db9f9e91b64e2d0543687269730250d65f0c3aea3fd55eadf3b6f31f123fe8f9dbe001fdda02ab8b7b8b4418de66e611921699a328126461c0e5018443fdc0027b226172746973744e616d65223a20226976616e40222c2022616c62756d4e616d65223a202274657374416c62756d222c202267656e7265223a2022726f636b222c202275726c223a202268747470733a2f2f2f6a756b65626f78222c20226e6574776f726b4964223a2022726f6f6d66756c222c20227369676e6174757265223a20224167586d4567414141554567774c45516a534f4d44477651394f715859433654706d766c536a2b6c596731374d57336161494d3538634539756657376746344a7966364d2f6e4a4a564d3377466f64496d344972622f545565466a654b43616e35673d3d222c2022747261636b73223a205b7b227265736f757263654964223a20223139343564633964717472673231222c20226e616d65223a20225c75303431325c75303433655c75303433665c75303433625c7530343536205c75303431325c75303435365c75303433345c75303433655c75303433665c75303433625c75303434665c75303434315c75303433655c75303433325c7530343330202d205c75303431325c75303433355c75303434315c75303433645c75303433302028436f766572206279204772616e646d615c7320536d757a6929222c20226475726174696f6e223a203234302e3433327d5d2c2022616c62756d436f766572223a207b227265736f757263654964223a20223931647370387471367273713176227d2c20226172746973744c6f676f223a207b227265736f757263654964223a202272326630366267747a6872386276227d2c2022736c65657665446f63756d656e74223a207b227265736f757263654964223a202235706336307773713335337a736d227d2c2022636f70696573536f6c64223a20302c202272656c6561736554696d657374616d70223a202231363832353539323132222c20227072696365223a207b2256414c55223a20312c202255534443223a203230307d7d652741687b7ab1473754858d7b8b10886945eaf801fddc02ab8b7b8b4418de66e611921699a328126461c0e5018445fdc2027b22616c62756d436f766572223a207b227265736f757263654964223a20223931647370387471367273713176227d2c2022616c62756d4e616d65223a202274657374416c62756d3131222c20226172746973744c6f676f223a207b227265736f757263654964223a202272326630366267747a6872386276227d2c20226172746973744e616d65223a20226976616e40222c202267656e7265223a2022726f636b222c20226e6574776f726b4964223a2022726f6f6d66756c222c20227369676e6174757265223a20224167586d4567414141554567774c45516a534f4d44477651394f715859433654706d766c536a2b6c596731374d57336161494d3538634539756657376746344a7966364d2f6e4a4a564d3377466f64496d344972622f545565466a654b43616e35673d3d222c2022736c65657665446f63756d656e74223a207b227265736f757263654964223a202235706336307773713335337a736d227d2c2022747261636b73223a205b7b226475726174696f6e223a203234302e3433322c20226e616d65223a20225c75303431325c75303433655c75303433665c75303433625c7530343536205c75303431325c75303435365c75303433345c75303433655c75303433665c75303433625c75303434665c75303434315c75303433655c75303433325c7530343330202d205c75303431325c75303433355c75303434315c75303433645c75303433302028436f766572206279204772616e646d615c7320536d757a6929222c20227265736f757263654964223a20223139343564633964717472673231227d5d2c202275726c223a202268747470733a2f2f2f6a756b65626f78222c2022636f70696573536f6c64223a20302c202272656c6561736554696d657374616d70223a202231363832353336313730222c20227072696365223a207b2256414c55223a20312c202255534443223a203230307d7d00dfae84e93ab133b739076354e9fbb2de42887212dfae84e93ab133b739076354e9fbb2de4288721200a6ef9ea235635e328124ff3429db9f9e91b64e2d00000000" - - const identity_frombuf = new Identity() - identity_frombuf.fromBuffer(Buffer.from(vdata, 'hex')) - expect(identity_frombuf.toBuffer().toString('hex')).toBe(vdata) - - const identity_tobuf = new Identity({ - "version":3, - "flags":0, - "primaryaddresses":[ - "RKjVHqM4VF2pCfVcwGzKH7CxvfMUE4H6o8" - ], - "minimumsignatures":1, - "name":"Chris", - "identityaddress":"iPsFBfFoCcxtuZNzE8yxPQhXVn4dmytf8j", - "parent":"iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq", - "systemid":"iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq", - "contentmultimap":{ - "iAqxJCbv2veLLHGdantvrzJRupyh3dkT6B":[ - { - "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c":"{\"artistName\": \"ivan@\", \"albumName\": \"testAlbum\", \"genre\": \"rock\", \"url\": \"https:///jukebox\", \"networkId\": \"roomful\", \"signature\": \"AgXmEgAAAUEgwLEQjSOMDGvQ9OqXYC6TpmvlSj+lYg17MW3aaIM58cE9ufW7gF4Jyf6M/nJJVM3wFodIm4Irb/TUeFjeKCan5g==\", \"tracks\": [{\"resourceId\": \"1945dc9dqtrg21\", \"name\": \"\\u0412\\u043e\\u043f\\u043b\\u0456 \\u0412\\u0456\\u0434\\u043e\\u043f\\u043b\\u044f\\u0441\\u043e\\u0432\\u0430 - \\u0412\\u0435\\u0441\\u043d\\u0430 (Cover by Grandma\\s Smuzi)\", \"duration\": 240.432}], \"albumCover\": {\"resourceId\": \"91dsp8tq6rsq1v\"}, \"artistLogo\": {\"resourceId\": \"r2f06bgtzhr8bv\"}, \"sleeveDocument\": {\"resourceId\": \"5pc60wsq353zsm\"}, \"copiesSold\": 0, \"releaseTimestamp\": \"1682559212\", \"price\": {\"VALU\": 1, \"USDC\": 200}}" - } - ], - "iChNhyJiQSZ3HumofCBhuASjgupq1m1NgP":[ - { - "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c":"{\"albumCover\": {\"resourceId\": \"91dsp8tq6rsq1v\"}, \"albumName\": \"testAlbum11\", \"artistLogo\": {\"resourceId\": \"r2f06bgtzhr8bv\"}, \"artistName\": \"ivan@\", \"genre\": \"rock\", \"networkId\": \"roomful\", \"signature\": \"AgXmEgAAAUEgwLEQjSOMDGvQ9OqXYC6TpmvlSj+lYg17MW3aaIM58cE9ufW7gF4Jyf6M/nJJVM3wFodIm4Irb/TUeFjeKCan5g==\", \"sleeveDocument\": {\"resourceId\": \"5pc60wsq353zsm\"}, \"tracks\": [{\"duration\": 240.432, \"name\": \"\\u0412\\u043e\\u043f\\u043b\\u0456 \\u0412\\u0456\\u0434\\u043e\\u043f\\u043b\\u044f\\u0441\\u043e\\u0432\\u0430 - \\u0412\\u0435\\u0441\\u043d\\u0430 (Cover by Grandma\\s Smuzi)\", \"resourceId\": \"1945dc9dqtrg21\"}], \"url\": \"https:///jukebox\", \"copiesSold\": 0, \"releaseTimestamp\": \"1682536170\", \"price\": {\"VALU\": 1, \"USDC\": 200}}" - } - ] - }, - "revocationauthority":"iPsFBfFoCcxtuZNzE8yxPQhXVn4dmytf8j", - "recoveryauthority":"iPsFBfFoCcxtuZNzE8yxPQhXVn4dmytf8j", - "timelock":0 - }) - expect(identity_tobuf.toBuffer().toString('hex')).toBe(vdata) - - }); - - -}); \ No newline at end of file diff --git a/src/pbaas/Identity.ts b/src/pbaas/Identity.ts deleted file mode 100644 index 4c04ad8..0000000 --- a/src/pbaas/Identity.ts +++ /dev/null @@ -1,416 +0,0 @@ -import varuint from '../utils/varuint' -import bufferutils from '../utils/bufferutils' -import { BigNumber } from '../utils/types/BigNumber'; -import { Principal } from './Principal'; -import { fromBase58Check, toBase58Check } from '../utils/address'; -import { I_ADDR_VERSION, HASH160_BYTE_LENGTH } from '../constants/vdxf'; -import { DATA_TYPE_STRING, keymap } from "../vdxf"; -import { R_ADDR_VERSION } from '../constants/vdxf'; -import { BN } from 'bn.js'; -const bech32 = require('bech32') - -const VERSION_PBAAS = 3; -const VERSION_INVALID = 0; - -const { BufferReader, BufferWriter } = bufferutils - -function fromBech32(address) { - var result = bech32.decode(address) - var data = bech32.fromWords(result.words.slice(1)) - - return { - version: result.words[0], - prefix: result.prefix, - data: Buffer.from(data) - } -} - -function convertBits(data, from, to, strictMode) { - const length = strictMode - ? Math.floor((data.length * from) / to) - : Math.ceil((data.length * from) / to); - const mask = (1 << to) - 1; - const result = Buffer.alloc(length); - let index = 0; - let accumulator = 0; - let bits = 0; - for (const value of data) { - accumulator = (accumulator << from) | value; - bits += from; - while (bits >= to) { - bits -= to; - result[index] = (accumulator >> bits) & mask; - ++index; - } - } - if (!strictMode) { - if (bits > 0) { - result[index] = (accumulator << (to - bits)) & mask; - ++index; - } - } else { - throw new Error("Input cannot be converted") - } - return result; -} - -function decodeSaplingAddress(address) { - - - const result = fromBech32(address) - - const data = convertBits(result.data, 5, 8, false); - - return { d: data.slice(0, 10), pk_d: data.slice(10) } - -} - -export class Identity extends Principal { - - parent: string; - system_id: string; - name: string; - contentmap: Map; - contentmultimap: Map>; - revocation_authority: string; - recovery_authority: string; - private_addresses: Array<{ d: Buffer, pk_d: Buffer }>; - timelock: number; - - constructor(data?: { - version?: BigNumber | number, - flags?: BigNumber | number, - primaryaddresses?: Array, - minimumsignatures?: BigNumber | number, - parent?: string, - systemid?: string, - name?: string, - contentmap?: Map; - contentmultimap?: Map> | { [name: string]: Array<{ [name: string]: string }> }; - revocationauthority?: string; - recoveryauthority?: string; - private_addresses?: Array<{ d: Buffer, pk_d: Buffer }> | []; - timelock?: number; - identityaddress?: string; - - }) { - - super(data) - - if (data?.parent) this.parent = data.parent; - if (data?.name) this.name = data.name; - if (data?.systemid) this.system_id = data.systemid; - this.contentmap = data?.contentmap ? new Map(data.contentmap) : new Map(); - if (data?.contentmultimap) { - - if (typeof data.contentmultimap == "object") { - - this.contentmultimap = contentmultimapFromObject(data.contentmultimap); - - } - else { - throw new Error("multimap root not an object") - } - - } - if (data?.revocationauthority) this.revocation_authority = data.revocationauthority - if (data?.recoveryauthority) this.recovery_authority = data.recoveryauthority - if (data?.timelock) this.timelock = data.timelock - - this.private_addresses = data?.private_addresses?.map((addr) => { return decodeSaplingAddress(addr) }) || new Array(); - } - - dataByteLength() { - let byteLength = 0; - - byteLength += this._dataByteLength(); //get the principal byte length - byteLength += 20; //uint160 parent - byteLength += varuint.encodingLength(Buffer.from(this.name, "utf8").length); // name compact size - byteLength += Buffer.from(this.name, "utf8").length; // name_in_utf8_bytes - - // contentmultimap - if (this.version.toNumber() >= VERSION_PBAAS) { - - byteLength += this.contentmultimap ? varuint.encodingLength(this.contentmultimap.size) : 0 - - if (this.contentmultimap) { - for (const [key, value] of this.contentmultimap.entries()) { - byteLength += 20; //uint160 key - byteLength += varuint.encodingLength(value.length) - for (const n of value) { - byteLength += varuint.encodingLength(n.length); - byteLength += n.length; - } - } - } - } - - //contentmap - if (this.version.toNumber() < VERSION_PBAAS) { - byteLength += varuint.encodingLength(this.contentmap.size) - for (const m in this.contentmap) { - byteLength += 20; //uint160 key - byteLength += 32; //uint256 hash - } - } - //contentmap2 - byteLength += varuint.encodingLength(this.contentmap.size) - for (const m in this.contentmap) { - byteLength += 20; //uint160 key - byteLength += 32; //uint256 hash - } - - byteLength += 20; //uint160 revocation authority - byteLength += 20; //uint160 recovery authority - - // privateaddresses - byteLength += varuint.encodingLength(this.private_addresses.length | 0); - - for (const n of this.private_addresses) { - byteLength += varuint.encodingLength(n.d.length); - byteLength += n.d.length; // const 11 - byteLength += 32; //pk_d hash - } - - // post PBAAS - if (this.version.toNumber() >= VERSION_PBAAS) { - byteLength += 20; //uint160 systemid - byteLength += 4; //uint32 unlockafter - } - - return byteLength - } - - toBuffer() { - const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())) - - bufferWriter.writeSlice(this._toBuffer()); - bufferWriter.writeSlice(fromBase58Check(this.parent).hash); - bufferWriter.writeCompactSize(Buffer.from(this.name, "utf8").length) - bufferWriter.writeSlice(Buffer.from(this.name, "utf8")); - - //contentmultimap - if (this.version.toNumber() >= VERSION_PBAAS) { - - bufferWriter.writeCompactSize(this.contentmultimap.size) - - for (const [key, value] of this.contentmultimap.entries()) { - - bufferWriter.writeSlice(fromBase58Check(key).hash) - bufferWriter.writeCompactSize(value.length) - - for (const n of value) { - bufferWriter.writeCompactSize(n.length) - bufferWriter.writeSlice(n); - - } - } - } - - //contentmap - if (this.version.toNumber() < VERSION_PBAAS) { - bufferWriter.writeCompactSize(this.contentmap.size) - for (const [key, value] of this.contentmap.entries()) { - bufferWriter.writeSlice(value); - } - } - - //contentmap2 - bufferWriter.writeCompactSize(this.contentmap.size) - for (const [key, value] of this.contentmap.entries()) { - bufferWriter.writeSlice(value); - } - - bufferWriter.writeSlice(fromBase58Check(this.revocation_authority).hash) - bufferWriter.writeSlice(fromBase58Check(this.recovery_authority).hash) - - // privateaddresses - bufferWriter.writeCompactSize(this.private_addresses.length); - - for (const n of this.private_addresses) { - bufferWriter.writeCompactSize(n.d.length); - bufferWriter.writeSlice(n.d); - bufferWriter.writeSlice(n.pk_d); - } - - // post PBAAS - if (this.version.toNumber() >= VERSION_PBAAS) { - bufferWriter.writeSlice(fromBase58Check(this.system_id).hash) - bufferWriter.writeUInt32(this.timelock) - } - return bufferWriter.buffer - } - - fromBuffer(buffer, offset: number = 0) { - const reader = new BufferReader(buffer, offset); - - reader.offset = this._fromBuffer(reader.buffer, reader.offset); - - this.parent = toBase58Check(reader.readSlice(20), I_ADDR_VERSION) - - this.name = Buffer.from(reader.readVarSlice()).toString('utf8') - - //contentmultimap - if (this.version.toNumber() >= VERSION_PBAAS) { - - const contentMapSize = reader.readVarInt(); - this.contentmultimap = new Map(); - - for (var i = 0; i < contentMapSize.toNumber(); i++) { - - const contentMapKey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION) - var innervector = reader.readVector(); - - this.contentmultimap.set(contentMapKey, innervector); - - } - } - - // contentmap - if (this.version.toNumber() < VERSION_PBAAS) { - - const contentMultiMapSize = reader.readVarInt(); - this.contentmap = new Map(); - - for (var i = 0; i < contentMultiMapSize.toNumber(); i++) { - - const contentMapKey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION) - const hash = reader.readSlice(32); - this.contentmap.set(contentMapKey, hash); - } - } - - const contentMapSize = reader.readVarInt(); - this.contentmap = new Map(); - - for (var i = 0; i < contentMapSize.toNumber(); i++) { - const contentMapKey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION) - const hash = reader.readSlice(32); - this.contentmap.set(contentMapKey, hash); - } - - this.revocation_authority = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); - this.recovery_authority = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); - - const numPrivateAddresses = reader.readVarInt(); - - for (var i = 0; i < numPrivateAddresses.toNumber(); i++) { - this.private_addresses.push({ d: Buffer.from(reader.readVector()), pk_d: reader.readSlice(20) }) - } - - if (this.version.toNumber() >= VERSION_PBAAS) { - this.system_id = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); - this.timelock = reader.readUInt32(); - } - - return reader.offset; - } -} - -function contentmultimapFromObject(input) { - - var contentmultimap = new Map; - var nVersion = 1; - const keys = Object.keys(input); - const values = keys.map((item) => input[item]); - - for (var i = 0; i < keys.length; i++) { - try { - const key = fromBase58Check(keys[i]).hash; - if (key != null) { - if (Array.isArray(values[i])) { - for (var j = 0; j < values[i].length; j++) { - const oneValue = values[i][j]; - var items = []; - if (typeof oneValue == "string") { - items.push(Buffer.from(oneValue, 'hex')); - } - else if (typeof oneValue == "object") { - const mapBytesValue = VectorEncodeVDXFUni(oneValue); - if (mapBytesValue.length === 0 || nVersion == VERSION_INVALID) { - nVersion = VERSION_INVALID; - throw new Error("object not as expected") - } - items.push(mapBytesValue); - } - } - contentmultimap.set(keys[i], items); - } - else if (typeof values[i] === "string") { - if (isHexByteString(values[i])) { - contentmultimap.set(keys[i], Buffer.from(items)); - } - else { - nVersion = VERSION_INVALID; - throw new Error("string not formatted as hex") - - } - } - else if (typeof values[i] === "object") { - const mapBytesValue = VectorEncodeVDXFUni(values[i]); - var item = []; - if (mapBytesValue.length === 0 || nVersion == VERSION_INVALID) { - nVersion = VERSION_INVALID; - throw new Error("object not as expected") - } - item.push(mapBytesValue); - contentmultimap.set(keys[i], item); - } - else { - nVersion = VERSION_INVALID; - throw new Error("not valid content multimap sub type") - } - } - else { - nVersion = VERSION_INVALID; - throw new Error("key in multimap == null") - } - } - catch (e) { - nVersion = VERSION_INVALID; - throw new Error(e.message) - } - } - return contentmultimap; -} - - -function VectorEncodeVDXFUni(obj) { - - const keys = Object.keys(obj); - const values = keys.map((item) => obj[item]); - var bufsize = 0; - - for (var i = 0; i < keys.length; i++) { - if (keys[i] == DATA_TYPE_STRING.vdxfid) { - bufsize += HASH160_BYTE_LENGTH; - bufsize += 1; // varint length 1 - bufsize += 2; // ss type + ver (lengths) - bufsize += varuint.encodingLength(Buffer.from(values[i], 'utf8').length); - bufsize += Buffer.from(values[i], 'utf8').length; - } else { - throw new Error("VDXF key not found: " + keys[i]) - } - // TODO: add alltypes - } - const bufferWriter = new BufferWriter(Buffer.alloc(bufsize)) - - for (var i = 0; i < keys.length; i++) { - if (keys[i] === DATA_TYPE_STRING.vdxfid) { - bufferWriter.writeSlice(fromBase58Check(keys[i]).hash) - bufferWriter.writeVarInt(new BN(1)); - bufferWriter.writeVarInt(new BN(Buffer.from(values[i], 'utf8').length + 3)) //NOTE 3 is from ss type + ver + vdxfidver - bufferWriter.writeVarSlice(Buffer.from(values[i], 'utf8')); - } - else { - throw new Error("VDXF key not found: " + keys[i]) - } - // TODO: add alltypes - } - return bufferWriter.buffer; -} - -function isHexByteString(str: string): boolean { - const hexByteRegex = /^[0-9a-fA-F]{2}$/; - return hexByteRegex.test(str); -} \ No newline at end of file diff --git a/src/pbaas/index.ts b/src/pbaas/index.ts index 7d18df1..805ff8d 100644 --- a/src/pbaas/index.ts +++ b/src/pbaas/index.ts @@ -1,5 +1,4 @@ export * from './CurrencyValueMap' -export * from './Identity' export * from './ReserveTransfer' export * from './TokenOutput' export * from './TransferDestination' \ No newline at end of file diff --git a/src/vdxf/classes/Attestation.ts b/src/vdxf/classes/Attestation.ts index 481a138..b5adf76 100644 --- a/src/vdxf/classes/Attestation.ts +++ b/src/vdxf/classes/Attestation.ts @@ -7,10 +7,268 @@ import { VDXFObject, VerusIDSignature } from "../"; import { CMerkleMountainRange, CMMRNode, CMerkleMountainView, CMMRProof } from "./MMR" import { ATTESTATION_OBJECT, ATTESTATION_VIEW_RESPONSE } from '../keys'; import { Hash160 } from "./Hash160"; -import { AttestationData } from './AttestationData'; - +import { Utf8DataVdxfObject, HexDataVdxfObject, BufferDataVdxfObject, PNGImageVdxfObject } from '..'; +import { IdentityDataClassTypes, IdentityVdxfidMap } from './IdentityData'; const { BufferReader, BufferWriter } = bufferutils; +export class AttestationDataType { + + dataItem: Utf8DataVdxfObject | HexDataVdxfObject | BufferDataVdxfObject | PNGImageVdxfObject | VDXFObject; + salt: Buffer = Buffer.alloc(0); + + constructor(data?: any, vdxfkey?: string, salt?: string) { + + this.dataItem = AttestationDataType.getDataItem(vdxfkey, data); + + if (salt) { + this.salt = Buffer.from(salt, "hex"); + } + } + + static getDataItem(vdxfkey, data): any { + switch (vdxfkey && IdentityVdxfidMap[vdxfkey]?.type) { + case IdentityDataClassTypes.BUFFER_DATA_STRING: + return new Utf8DataVdxfObject(data, vdxfkey); + case IdentityDataClassTypes.BUFFER_DATA_BYTES: + return new HexDataVdxfObject(data, vdxfkey); + case IdentityDataClassTypes.BUFFER_DATA_BASE64: + return new BufferDataVdxfObject(data, vdxfkey, "base64"); + case IdentityDataClassTypes.URL: + return new BufferDataVdxfObject(data, vdxfkey, "utf8"); + case IdentityDataClassTypes.PNG_IMAGE: + return new PNGImageVdxfObject(data, vdxfkey); + case IdentityDataClassTypes.KEY_ONLY: + return new VDXFObject(vdxfkey); + case IdentityDataClassTypes.BOOLEAN: + return new HexDataVdxfObject(data, vdxfkey); + case undefined: + default: + return new HexDataVdxfObject(data, vdxfkey); + } + } + + dataByteLength(): number { + + let length = 0; + + length += this.dataItem.byteLength(); + length += varuint.encodingLength(this.salt.length); + length += this.salt.length; + + return length; + } + + toBuffer(): Buffer { + + const buffer = Buffer.alloc(this.dataByteLength()); + const writer = new bufferutils.BufferWriter(buffer); + writer.writeSlice(this.dataItem.toBuffer()); + writer.writeVarSlice(this.salt); + + return writer.buffer; + } + + fromDataBuffer(buffer: Buffer, offset = 0, vdxfkey?: string): number { + + const reader = new bufferutils.BufferReader(buffer, offset); + reader.offset = this.dataItem.fromBuffer(reader.buffer, reader.offset, vdxfkey); + this.salt = reader.readVarSlice(); + + return reader.offset; + } +} + +export const friendlyNames = (vdfxkey) => { + + if (vdfxkey in IdentityVdxfidMap) { + + return IdentityVdxfidMap[vdfxkey].name; + + } else { + throw new Error("Unknown VDXF key"); + } +} + +export class AttestationData { + + components: Map; + constructor(components: Map = new Map()) { + this.components = components; + } + + dataByteLength(): number { + let byteLength = 0; + byteLength += varuint.encodingLength(this.components.size) + + for (const [key, item] of this.components) { + byteLength += varuint.encodingLength(key); + byteLength += item.dataByteLength(); + } + + return byteLength; + } + + toDataBuffer(): Buffer { + const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); + + bufferWriter.writeCompactSize(this.components.size); + + for (const [key, item] of this.components) { + bufferWriter.writeCompactSize(key); + bufferWriter.writeSlice(item.toBuffer()); + } + + return bufferWriter.buffer; + } + + fromDataBuffer(buffer: Buffer, offset?: number): number { + + const reader = new bufferutils.BufferReader(buffer, offset); + const componentsLength = reader.readCompactSize(); + this.components = new Map(); + + for (var i = 0; i < componentsLength; i++) { + const key = reader.readCompactSize(); + const vdxfid = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + const attestationData = new AttestationDataType(null, vdxfid); + reader.offset = attestationData.fromDataBuffer(reader.buffer, reader.offset, vdxfid); + + this.components.set(key, attestationData); + } + + return reader.offset; + } + + size(): number { + return this.components.size; + } + + setDataFromJson(data: Array, getSalt: Function) { + + if (!this.components) { + this.components = new Map(); + } + + for (let i = 0; i < data.length; i++) { + + const item = data[i]; + + if (!(item.salt instanceof Buffer) || item.salt.length !== 32) { + if (typeof getSalt === "function") { + item.salt = getSalt(); + } else { + throw new Error("Salt is required to be a 32 random byte Buffer"); + } + } + + try { + fromBase58Check(item.dataItem.vdxfkey) + } catch (e) { + throw new Error("Attestation Key is required to be base58 format"); + } + + this.components.set(i, item); + } + + } + + getHash(key): Buffer { + + let value: Buffer; + + value = this.components.get(key).toBuffer(); + + return createHash("sha256").update(value).digest(); + } + +} + +export interface AttestationRequestInterfaceDataInterface { + accepted_attestors: Array, + attestation_keys: Array, + attestor_filters?: Array +} +export class AttestationRequest extends VDXFObject { + data: AttestationRequestInterfaceDataInterface; + + dataByteLength(): number { + + let length = 0; + length += varuint.encodingLength(this.data.accepted_attestors?.length ?? 0); + length += this.data.accepted_attestors?.reduce((sum, current: Hash160) => sum + current.byteLength(), 0) ?? 0; + length += varuint.encodingLength(this.data.attestation_keys?.length ?? 0); + length += this.data.attestation_keys?.reduce((sum, current: Hash160) => sum + current.byteLength(), 0) ?? 0; + length += varuint.encodingLength(this.data.attestor_filters?.length ?? 0); + length += this.data.attestor_filters?.reduce((sum, current: Hash160) => sum + current.byteLength(), 0) ?? 0; + + return length; + } + + toDataBuffer(): Buffer { + + const writer = new bufferutils.BufferWriter(Buffer.alloc(this.dataByteLength())) + + writer.writeArray(this.data.accepted_attestors.map((x: Hash160) => x.toBuffer())); + writer.writeArray(this.data.attestation_keys.map((x: Hash160) => x.toBuffer())); + writer.writeArray(this.data.attestor_filters.map((x: Hash160) => x.toBuffer())); + + return writer.buffer; + } + + fromDataBuffer(buffer: Buffer, offset?: number): number { + + const reader = new bufferutils.BufferReader(buffer, offset); + reader.readVarInt(); //skip data length + + function readHash160Array(arr: (Hash160 | string)[]): void { + const length = reader.readVarInt(); + for (let i = 0; i < length.toNumber(); i++) { + const member = new Hash160(); + reader.offset = member.fromBuffer(reader.buffer, false, reader.offset); + arr.push(member); + } + if (length.toNumber() === 0) arr = []; + } + + readHash160Array(this.data.accepted_attestors); + readHash160Array(this.data.attestation_keys); + readHash160Array(this.data.attestor_filters); + return reader.offset; + } + + static initializeData(data: string | AttestationRequestInterfaceDataInterface) { + var retData; + if (typeof data === 'object') { + retData = { + accepted_attestors: (data.accepted_attestors || []).map((x) => typeof x === 'string' ? Hash160.fromAddress(x) : x), + attestation_keys: (data.attestation_keys || []).map((x) => typeof x === 'string' ? Hash160.fromAddress(x) : x), + attestor_filters: (data.attestor_filters || []).map((x) => typeof x === 'string' ? Hash160.fromAddress(x) : x) + } + } + else { + retData = { + accepted_attestors: [], + attestation_keys: [], + attestor_filters: [] + } + } + return retData; + } + + toJson() { + const { accepted_attestors, attestation_keys, attestor_filters } = this.data; + return { + vdxfkey: this.vdxfkey, + data: { + accepted_attestors: accepted_attestors?.map((x: Hash160) => x.toAddress()) || [], + attestation_keys: attestation_keys?.map((x: Hash160) => x.toAddress()) || [], + attestor_filters: attestor_filters?.map((x: Hash160) => x.toAddress()) || [] + } + }; + } + +} + export class Attestation extends VDXFObject { static TYPE_STRING = 1; diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index dc792d7..f17d377 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -18,6 +18,7 @@ import { Attestation } from "./Attestation"; import { fromBase58Check, toBase58Check } from '../../utils/address'; import { HASH160_BYTE_LENGTH, I_ADDR_VERSION } from '../../constants/vdxf'; import { BufferDataVdxfObject } from '../index' +import { AttestationRequest, AttestationRequestInterfaceDataInterface } from './Attestation'; export class RedirectUri extends VDXFObject { uri: string; @@ -419,92 +420,6 @@ export class Challenge extends VDXFObject implements ChallengeInterface { } } -export interface AttestationRequestInterfaceDataInterface { - accepted_attestors: Array, - attestation_keys: Array, - attestor_filters?: Array -} -export class AttestationRequest extends VDXFObject { - data: AttestationRequestInterfaceDataInterface; - - dataByteLength(): number { - - let length = 0; - length += varuint.encodingLength(this.data.accepted_attestors?.length ?? 0); - length += this.data.accepted_attestors?.reduce((sum, current: Hash160) => sum + current.byteLength(), 0) ?? 0; - length += varuint.encodingLength(this.data.attestation_keys?.length ?? 0); - length += this.data.attestation_keys?.reduce((sum, current: Hash160) => sum + current.byteLength(), 0) ?? 0; - length += varuint.encodingLength(this.data.attestor_filters?.length ?? 0); - length += this.data.attestor_filters?.reduce((sum, current: Hash160) => sum + current.byteLength(), 0) ?? 0; - - return length; - } - - toDataBuffer(): Buffer { - - const writer = new bufferutils.BufferWriter(Buffer.alloc(this.dataByteLength())) - - writer.writeArray(this.data.accepted_attestors.map((x: Hash160) => x.toBuffer())); - writer.writeArray(this.data.attestation_keys.map((x: Hash160) => x.toBuffer())); - writer.writeArray(this.data.attestor_filters.map((x: Hash160) => x.toBuffer())); - - return writer.buffer; - } - - fromDataBuffer(buffer: Buffer, offset?: number): number { - - const reader = new bufferutils.BufferReader(buffer, offset); - reader.readVarInt(); //skip data length - - function readHash160Array(arr: (Hash160 | string)[]): void { - const length = reader.readVarInt(); - for (let i = 0; i < length.toNumber(); i++) { - const member = new Hash160(); - reader.offset = member.fromBuffer(reader.buffer, false, reader.offset); - arr.push(member); - } - if (length.toNumber() === 0) arr = []; - } - - readHash160Array(this.data.accepted_attestors); - readHash160Array(this.data.attestation_keys); - readHash160Array(this.data.attestor_filters); - return reader.offset; - } - - static initializeData(data: string | AttestationRequestInterfaceDataInterface) { - var retData; - if (typeof data === 'object') { - retData = { - accepted_attestors: (data.accepted_attestors || []).map((x) => typeof x === 'string' ? Hash160.fromAddress(x) : x), - attestation_keys: (data.attestation_keys || []).map((x) => typeof x === 'string' ? Hash160.fromAddress(x) : x), - attestor_filters: (data.attestor_filters || []).map((x) => typeof x === 'string' ? Hash160.fromAddress(x) : x) - } - } - else { - retData = { - accepted_attestors: [], - attestation_keys: [], - attestor_filters: [] - } - } - return retData; - } - - toJson() { - const { accepted_attestors, attestation_keys, attestor_filters } = this.data; - return { - vdxfkey: this.vdxfkey, - data: { - accepted_attestors: accepted_attestors?.map((x: Hash160) => x.toAddress()) || [], - attestation_keys: attestation_keys?.map((x: Hash160) => x.toAddress()) || [], - attestor_filters: attestor_filters?.map((x: Hash160) => x.toAddress()) || [] - } - }; - } - -} - export class RequestedPermission extends VDXFObject { data: string | AttestationRequestInterfaceDataInterface; encoding?: BufferEncoding; diff --git a/src/vdxf/classes/IdentityData.ts b/src/vdxf/classes/IdentityData.ts new file mode 100644 index 0000000..1180792 --- /dev/null +++ b/src/vdxf/classes/IdentityData.ts @@ -0,0 +1,238 @@ +import { + Utf8DataVdxfObject, + HexDataVdxfObject, + BufferDataVdxfObject, + PNGImageVdxfObject, + VDXFObject +} from ".."; +import * as identitykeys from '../identitydatakeys'; +import * as keylist from '../keys'; +import bufferutils from '../../utils/bufferutils'; +import createHash = require("create-hash"); +import { fromBase58Check, toBase58Check } from '../../utils/address'; +import varuint from '../../utils/varuint' +import { I_ADDR_VERSION, HASH160_BYTE_LENGTH } from '../../constants/vdxf'; +const { BufferReader, BufferWriter } = bufferutils; + +export const enum IdentityDataClassTypes { + BUFFER_DATA_STRING = 1, + BUFFER_DATA_BYTES = 2, + BUFFER_DATA_BASE64 = 3, + URL = 4, + PNG_IMAGE = 5, + KEY_ONLY = 6, + BOOLEAN = 7, +} + +export const IdentityVdxfidMap = { + [identitykeys.IDENTITYDATA_FIRSTNAME.vdxfid]: { name: "First Name", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_LASTNAME.vdxfid]: { name: "Last Name", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_ATTESTOR.vdxfid]: { name: "Attestor ID", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDENTITY.vdxfid]: { name: "Identity", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_ID.vdxfid]: { name: "ID", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_USERID.vdxfid]: { name: "User ID", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_CREATEDAT.vdxfid]: { name: "Created at", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_COMPLETEDAT.vdxfid]: { name: "Completed at", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PREVIOUSATTEMPTID.vdxfid]: { name: "Previous attempt ID", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_SHAREABLEURL.vdxfid]: { name: "Shareable URL", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_TEMPLATEID.vdxfid]: { name: "Template ID", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_TEMPLATEVERSION.vdxfid]: { name: "Template Version", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PHONENUMBER.vdxfid]: { name: "Phone Number", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_OVER18.vdxfid]: { name: "Over 18", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_OVER21.vdxfid]: { name: "Over 21", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_OVER25.vdxfid]: { name: "Over 25", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_IPADDRESS.vdxfid]: { name: "IP Address", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_EMAIL.vdxfid]: { name: "Email Address", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_HOMEADDRESS.vdxfid]: { name: "Home address", type: IdentityDataClassTypes.KEY_ONLY }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1.vdxfid]: { name: "Street 1", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2.vdxfid]: { name: "Street 2", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_CITY.vdxfid]: { name: "City", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_REGION.vdxfid]: { name: "Region", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE.vdxfid]: { name: "Post Code", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY.vdxfid]: { name: "Country", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDNUMBER_VALUE.vdxfid]: { name: "ID Number", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDNUMBER_TYPE.vdxfid]: { name: "ID Type", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_STATUS.vdxfid]: { name: "Status", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_APPROVALS_ACCEPTEDTOS.vdxfid]: { name: "Accepted Terms and Conditions", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_APPROVALS_VERIFIEDSMS.vdxfid]: { name: "SMS Verified", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_APPROVALS_KYCCHECKED.vdxfid]: { name: "KYC Checked ok", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_APPROVALS_DOCUMENTSVERIFIED.vdxfid]: { name: "Documents Verified", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_APPROVALS_SELFIECHECKED.vdxfid]: { name: "Selfie Checked", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_APPROVALS_WATCHLIST_OK.vdxfid]: { name: "Watchlist ok", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Riskcheck ok", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE.vdxfid]: { name: "Driving Licence", type: IdentityDataClassTypes.KEY_ONLY }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_FRONT.vdxfid]: { name: "Driving Licence Front", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_BACK.vdxfid]: { name: "Driving Licence Back", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_FRONT.vdxfid]: { name: "Driving Licence Front", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_BACK.vdxfid]: { name: "Driving Licence Back", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_FACE.vdxfid]: { name: "Driving Licence Face", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_IDNUMBER.vdxfid]: { name: "Driving Licence Number", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CATEGORY.vdxfid]: { name: "Driving Licence Catagory", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_EXPIRATIONDATE.vdxfid]: { name: "Driving Licence expiry date", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Driving Licence matches country", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION.vdxfid]: { name: "Driving Licence issuing reigon", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH.vdxfid]: { name: "Driving Licence Date of Birth", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ADDRESS.vdxfid]: { name: "Driving Licence Address", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_STREET1.vdxfid]: { name: "Driving Licence Street 1", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CITY.vdxfid]: { name: "Driving Licence City", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_REGION.vdxfid]: { name: "Driving Licence Region", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_POSTCODE.vdxfid]: { name: "Driving Licence ZIP/Post Code", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_COUNTRY.vdxfid]: { name: "Driving Licence Country", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_MATCHED.vdxfid]: { name: "Driving Licence Matched all", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_NAME_MATCHED.vdxfid]: { name: "Driving Licence name matched", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH_MATCHED.vdxfid]: { name: "Driving Licence Date of Birth Matched", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_SELFIECHECK_SUCCESS.vdxfid]: { name: "Selfie Check success", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_SELFIECHECK_IMAGE.vdxfid]: { name: "Selfie Check image", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_SELFIECHECK_VIDEO.vdxfid]: { name: "Selfie Check video", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_SELFIECHECK_DRIVINGLICENCE_MATCH.vdxfid]: { name: "Selfie Driving Licence match", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_KYC_SUCCESS.vdxfid]: { name: "KYC Success", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_KYC_ADDRESS_MATCHED.vdxfid]: { name: "KYC Address Matched", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_KYC_TYPE.vdxfid]: { name: "KYC Type", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_KYC_NAME_MATCHED.vdxfid]: { name: "KYC Name Matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_KYC_DATEOFBIRTH_MATCHED.vdxfid]: { name: "KYC Date of Birth Matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_KYC_IDNUMBER_MATCHED.vdxfid]: { name: "KYC ID Matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_KYC_PHONENUMBER_MATCHED.vdxfid]: { name: "KYC Phone number matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_KYC_AREACODE_MATCHED.vdxfid]: { name: "KYC Areacode Matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RISKCHECK_STATUS.vdxfid]: { name: "Risk Check Status", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RISKCHECK_USERINTERACTIONS.vdxfid]: { name: "Risck Check User Interactions", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RISKCHECK_FRAUDRINGOK.vdxfid]: { name: "Risk Check No Fraudring", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RISKCHECK_BOTNOTDETECTED.vdxfid]: { name: "Risk Check bot free", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_EMAIL_ISDELIVERABLE.vdxfid]: { name: "Email address is deliverable", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_EMAIL_BREACHCOUNT.vdxfid]: { name: "Email breach count", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_EMAIL_FIRSTBREACHEDAT.vdxfid]: { name: "Email first breach date", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_EMAIL_LASTBREACHEDAT.vdxfid]: { name: "Email last breach date", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_REGISTEREDAT.vdxfid]: { name: "Email domain registered at", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_FREEPROVIDER.vdxfid]: { name: "Email is free provider", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_CUSTOM.vdxfid]: { name: "Email Domain is custom", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_DISPOSABLE.vdxfid]: { name: "Email Domain Disposable", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS.vdxfid]: { name: "Email top level Domain Suspicious", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD.vdxfid]: { name: "ID Card", type: IdentityDataClassTypes.KEY_ONLY }, + [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_FRONT.vdxfid]: { name: "ID Card Front", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_BACK.vdxfid]: { name: "ID Card Back", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_IDCARD_CROPPED_FRONT.vdxfid]: { name: "ID Card Front", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_IDCARD_CROPPED_BACK.vdxfid]: { name: "ID Card Back", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_IDCARD_FACE.vdxfid]: { name: "ID Card Face", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_IDCARD_IDNUMBER.vdxfid]: { name: "ID Card ID Number", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_CATEGORY.vdxfid]: { name: "ID Card Category", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_EXPIRATIONDATE.vdxfid]: { name: "ID Card Expiry date", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "ID Card Issuing Country Matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_ISSUING_REGION.vdxfid]: { name: "ID Card Issuing Region", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTH.vdxfid]: { name: "ID Card Date of Birth", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS.vdxfid]: { name: "ID Card Address", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_STREET1.vdxfid]: { name: "ID Card Street 1", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_CITY.vdxfid]: { name: "ID Card City", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_REGION.vdxfid]: { name: "ID Card Region", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_POSTCODE.vdxfid]: { name: "ID Card Zip/Post Code", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_COUNTRY.vdxfid]: { name: "ID Card Country", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "ID Card Matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_IDCARD_NAME_MATCHED.vdxfid]: { name: "ID Card Name Matched", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "ID Card Date of Birth Matched", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_PASSPORT.vdxfid]: { name: "Passport", type: IdentityDataClassTypes.KEY_ONLY }, + [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_FRONT.vdxfid]: { name: "Passport front", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_BACK.vdxfid]: { name: "Passport back", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_FRONT.vdxfid]: { name: "Passport front", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_BACK.vdxfid]: { name: "Passport back", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_PASSPORT_FACE.vdxfid]: { name: "Passport face", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_PASSPORT_IDNUMBER.vdxfid]: { name: "Passport ID Number", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_CATEGORY.vdxfid]: { name: "Passport Category", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_EXPIRATIONDATE.vdxfid]: { name: "Passport expiry date", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Passport issuing country matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_REGION.vdxfid]: { name: "Passport issuing region matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTH.vdxfid]: { name: "Passport date of birth", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS.vdxfid]: { name: "Passport address", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_STREET1.vdxfid]: { name: "Passport street 1", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_CITY.vdxfid]: { name: "Passport city", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_REGION.vdxfid]: { name: "Passport region", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_POSTCODE.vdxfid]: { name: "Passport zip/post code", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_COUNTRY.vdxfid]: { name: "Passport country", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Passport matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_PASSPORT_NAME_MATCHED.vdxfid]: { name: "Passport Name Matched", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTHMATCHED.vdxfid]: { name: "Passport date of birth matched", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT.vdxfid]: { name: "Residence Permit", type: IdentityDataClassTypes.KEY_ONLY }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_FRONT.vdxfid]: { name: "Residence Permit front", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_BACK.vdxfid]: { name: "Residence Permit back", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_FRONT.vdxfid]: { name: "Residence Permit front", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_BACK.vdxfid]: { name: "Residence Permit back", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_FACE.vdxfid]: { name: "Residence Permit face", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_IDNUMBER.vdxfid]: { name: "Residence Permit ID Number", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CATEGORY.vdxfid]: { name: "Residence Permit category", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_EXPIRATIONDATE.vdxfid]: { name: "Residence Permit expiry date", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Residence Permit issuing country matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_REGION.vdxfid]: { name: "Residence Permit issuing region matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTH.vdxfid]: { name: "Residence Permit date of birth", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS.vdxfid]: { name: "Residence Permit Address", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_STREET1.vdxfid]: { name: "Residence Permit Street 1", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_CITY.vdxfid]: { name: "Residence Permit City", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_REGION.vdxfid]: { name: "Residence Permit Region", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_POSTCODE.vdxfid]: { name: "Residence Permit Zip/Post code", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_COUNTRY.vdxfid]: { name: "Residence Permit Country", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Residence Permit Matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_NAME_MATCHED.vdxfid]: { name: "Residence Permit name matched", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTHMATCHED.vdxfid]: { name: "Residence Permit date of birth matched", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_RESIDENTCARD.vdxfid]: { name: "Resident Card", type: IdentityDataClassTypes.KEY_ONLY }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_FRONT.vdxfid]: { name: "Resident Card Front", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_BACK.vdxfid]: { name: "Resident Card Back", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_FRONT.vdxfid]: { name: "Resident Card Front", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_BACK.vdxfid]: { name: "Resident Card Back", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_FACE.vdxfid]: { name: "Resident Card Face", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_IDNUMBER.vdxfid]: { name: "Resident Card ID Number", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_CATEGORY.vdxfid]: { name: "Resident Card Category", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_EXPIRATIONDATE.vdxfid]: { name: "Resident Card Expiry Date", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Resident Card Issuing Country Matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_REGION.vdxfid]: { name: "Resident Card Issuing Region", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTH.vdxfid]: { name: "Resident Card date of birth", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS.vdxfid]: { name: "Resident Card address", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_STREET1.vdxfid]: { name: "Resident Card Street 1", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_CITY.vdxfid]: { name: "Resident Card City", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_REGION.vdxfid]: { name: "Resident Card Region", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_POSTCODE.vdxfid]: { name: "Resident Card Zip/Post Code", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_COUNTRY.vdxfid]: { name: "Resident Card Country", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Resident Card Matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_NAME_MATCHED.vdxfid]: { name: "Resident Card Name Matched", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "Resident Card date of birth Matched", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_VISA.vdxfid]: { name: "Visa", type: IdentityDataClassTypes.KEY_ONLY }, + [identitykeys.IDENTITYDATA_VISA_ORIGINAL_FRONT.vdxfid]: { name: "Visa front", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_VISA_ORIGINAL_BACK.vdxfid]: { name: "Visa back", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_VISA_CROPPED_FRONT.vdxfid]: { name: "Visa front", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_VISA_CROPPED_BACK.vdxfid]: { name: "Visa back", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_VISA_FACE.vdxfid]: { name: "Visa face", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_VISA_IDNUMBER.vdxfid]: { name: "Visa ID Number", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_CATEGORY.vdxfid]: { name: "Visa Category", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_EXPIRATIONDATE.vdxfid]: { name: "Visa expiry date", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Visa issuing country matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_ISSUING_REGION.vdxfid]: { name: "Visa issuing region", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTH.vdxfid]: { name: "Visa date of birth", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS.vdxfid]: { name: "Visa address", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_STREET1.vdxfid]: { name: "Visa Street 1", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_CITY.vdxfid]: { name: "Visa City", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_REGION.vdxfid]: { name: "Visa Region", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_POSTCODE.vdxfid]: { name: "Visa Zip/Post Code", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_COUNTRY.vdxfid]: { name: "Visa Country", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Visa document matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_VISA_NAME_MATCHED.vdxfid]: { name: "Visa name matched", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTHMATCHED.vdxfid]: { name: "Visa date of birth matched", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALFRONT.vdxfid]: { name: "Original Front", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALBACK.vdxfid]: { name: "Original Back", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDFRONT.vdxfid]: { name: "Cropped Front", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDBACK.vdxfid]: { name: "Cropped Back", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_FACE.vdxfid]: { name: "Face", type: IdentityDataClassTypes.URL }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_IDNUMBER.vdxfid]: { name: "ID Number", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CATEGORY.vdxfid]: { name: "Category", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_EXPIRATIONDATE.vdxfid]: { name: "Expiry Date", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY.vdxfid]: { name: "Issuing Country", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUING_REGION.vdxfid]: { name: "Issuing Region", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ADDRESS.vdxfid]: { name: "Address", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_ADDRESS_STREET1.vdxfid]: { name: "Street 1", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_ADDRESS_STREET2.vdxfid]: { name: "Street 2", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_ADDRESS_CITY.vdxfid]: { name: "City", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_ADDRESS_REGION.vdxfid]: { name: "Region", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_ADDRESS_POSTCODE.vdxfid]: { name: "Zip/Postal Code", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_ADDRESS_COUNTRY.vdxfid]: { name: "Country", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Document Matched", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED.vdxfid]: { name: "Name Matched", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED.vdxfid]: { name: "Date of Birth Matched", type: IdentityDataClassTypes.BOOLEAN }, + [keylist.ATTESTATION_TYPE.vdxfid]: { name: "Attestation Type", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, +}; + diff --git a/src/vdxf/classes/PersonalData.ts b/src/vdxf/classes/PersonalData.ts deleted file mode 100644 index 9b259d0..0000000 --- a/src/vdxf/classes/PersonalData.ts +++ /dev/null @@ -1,132 +0,0 @@ -import varuint from '../../utils/varuint' -import bufferutils from '../../utils/bufferutils' -import createHash = require("create-hash"); -import { fromBase58Check, toBase58Check } from '../../utils/address'; -import { I_ADDR_VERSION, HASH160_BYTE_LENGTH } from '../../constants/vdxf'; -import { VDXFObject, VerusIDSignature } from ".."; -import { CMerkleMountainRange, CMMRNode, CMerkleMountainView, CMMRProof } from "./MMR" -import { PERSONAL_INFO_OBJECT } from '../identitydatakeys'; -import { Hash160 } from "./Hash160"; -import { AttestationDataType } from './AttestationData'; - -const { BufferReader, BufferWriter } = bufferutils; - -export class PersonalData extends VDXFObject { - - type: PersonalData.TYPE; - id: string = ''; - data: {[category: string]: Array}; - linkedAttestation: string = ''; - - constructor(data?: { - type?: PersonalData.TYPE, - id?: string, - data?: {[category: string]: Array}, - linkedAttestation?: string - }, vdxfkey: string = PERSONAL_INFO_OBJECT.vdxfid) { - super(vdxfkey); - - if (data) { - Object.assign(this, data); - } - } - - dataByteLength(): number { - - let byteLength = 0; - byteLength += 1; // type - byteLength += varuint.encodingLength(this.id.length); - byteLength += this.id.length; - - byteLength += varuint.encodingLength(Object.keys(this.data).length); - - for (const [key, value] of Object.entries(this.data)) { - - byteLength += HASH160_BYTE_LENGTH; // category - byteLength += varuint.encodingLength(value.length); - - for (const attestation of value) { - byteLength += attestation.dataBytelength(); - } - } - - byteLength += varuint.encodingLength(this.linkedAttestation.length); - byteLength += this.linkedAttestation.length; - - return byteLength; - } - - toDataBuffer(): Buffer { - const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); - - bufferWriter.writeCompactSize(this.type); - bufferWriter.writeVarSlice(Buffer.from(this.id, 'utf8')); - - bufferWriter.writeCompactSize(Object.keys(this.data).length); - - for (const [key, value] of Object.entries(this.data)) { - - bufferWriter.writeSlice(fromBase58Check(key).hash); - bufferWriter.writeCompactSize(value.length); - - for (const attestation of value) { - bufferWriter.writeSlice(attestation.toBuffer()); - } - } - - bufferWriter.writeVarSlice(Buffer.from(this.linkedAttestation, 'utf8')); - return bufferWriter.buffer - } - - fromDataBuffer(buffer: Buffer, offset?: number): number { - - const reader = new BufferReader(buffer, offset); - - this.type = reader.readCompactSize(); - - this.id = reader.readVarSlice().toString('utf8'); - - const dataLength = reader.readCompactSize(); - - if (!this.data) { - this.data = {}; - } - - for (var i = 0; i < dataLength; i++) { - - const category = toBase58Check(reader.readSlice(HASH160_BYTE_LENGTH), I_ADDR_VERSION); - const attestationLength = reader.readCompactSize(); - const attestations = []; - - for (var j = 0; j < attestationLength; j++) { - - const attestation = new AttestationDataType(null, toBase58Check(reader.buffer.slice(reader.offset, reader.offset + HASH160_BYTE_LENGTH), I_ADDR_VERSION)); - reader.offset = attestation.fromDataBuffer(reader.buffer, reader.offset); - attestations.push(attestation); - } - - this.data[category] = attestations; - } - - this.linkedAttestation = reader.readVarSlice().toString('utf8'); - - return reader.offset; - } - - toJson() { - return { - type: this.type, - id: this.id, - data: this.data, - linkedAttestation: this.linkedAttestation - }; - } -} - -export namespace PersonalData { - export enum TYPE { - REQUEST = 1, - SUBMITTED = 2, - DESIGNATED = 3, - } -} diff --git a/src/vdxf/classes/PersonalProfile.ts b/src/vdxf/classes/PersonalProfile.ts new file mode 100644 index 0000000..271bb71 --- /dev/null +++ b/src/vdxf/classes/PersonalProfile.ts @@ -0,0 +1,158 @@ +import varuint from '../../utils/varuint' +import bufferutils from '../../utils/bufferutils' +import createHash = require("create-hash"); +import { fromBase58Check, toBase58Check } from '../../utils/address'; +import { I_ADDR_VERSION, HASH160_BYTE_LENGTH } from '../../constants/vdxf'; +import { BufferDataVdxfObject, HexDataVdxfObject, PNGImageVdxfObject, Utf8DataVdxfObject, VDXFObject, VerusIDSignature } from ".."; +import { CMerkleMountainRange, CMMRNode, CMerkleMountainView, CMMRProof } from "./MMR" +import { Hash160 } from "./Hash160"; +import { AttestationDataType } from './Attestation'; +import * as identitykeys from '../identitydatakeys'; +import { attestationDataKeys } from '../keymap'; +const { BufferReader, BufferWriter } = bufferutils; + +export class DataCategory { + data: Array; + category: string; + vdxfid: string; + constructor(data: Array | Array<{vdxfid: string}>, category: string, vdxfid: string) { + if (data && data[0] instanceof VDXFObject) { + this.data = data as Array; + } else if (data){ + this.data = (data as Array<{vdxfid: string}>).map(key => {return AttestationDataType.getDataItem(key.vdxfid, null)}); + } + this.category = category; + this.vdxfid = vdxfid; + } +} + +class PersonalDataCategory extends DataCategory { + constructor() { + super([ + identitykeys.IDENTITYDATA_FIRSTNAME, + identitykeys.IDENTITYDATA_LASTNAME, + identitykeys.IDENTITYDATA_DATEOFBIRTH, + identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY + ], "personal", + identitykeys.IDENTITYDATA_PERSONAL_DETAILS.vdxfid); + } +} + +class ContactDataCategory extends DataCategory { + constructor() { + super([ + identitykeys.IDENTITYDATA_EMAIL, + identitykeys.IDENTITYDATA_PHONENUMBER + ], "contact", + identitykeys.IDENTITYDATA_CONTACT.vdxfid); + } +} + +class LocationDataCategory extends DataCategory { + constructor() { + super([ + identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1, + identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2, + identitykeys.IDENTITYDATA_HOMEADDRESS_CITY, + identitykeys.IDENTITYDATA_HOMEADDRESS_REGION, + identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE + ], "locations", + identitykeys.IDENTITYDATA_LOCATIONS.vdxfid); + } +} + +const defaultPersonalProfileDataTemplate = [ + new PersonalDataCategory(), + new ContactDataCategory(), + new LocationDataCategory() +] + +export class PersonalProfileDataStore extends VDXFObject { + data: { [key: string]: DataCategory }; + + constructor(data?: Array) { + super(identitykeys.PERSONAL_INFO_OBJECT.vdxfid); + if (data) { + this.data = {} + for (const item of data) { + this.data[item.category] = item; + } + } else { + this.data = {} + for (const item of defaultPersonalProfileDataTemplate) { + this.data[item.category] = item; + } + } + } + + dataByteLength(): number { + + let byteLength = 0; + byteLength += varuint.encodingLength(Object.keys(this.data).length); + + for (const [key, value] of Object.entries(this.data)) { + + byteLength += HASH160_BYTE_LENGTH; // category + byteLength += varuint.encodingLength(value.data.length); + + for (const attestation of value.data) { + byteLength += attestation.toBuffer().length; + } + } + return byteLength; + } + + toDataBuffer(): Buffer { + const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); + + bufferWriter.writeCompactSize(Object.keys(this.data).length); + + for (const [key, value] of Object.entries(this.data)) { + + bufferWriter.writeSlice(fromBase58Check(value.vdxfid).hash); + bufferWriter.writeCompactSize(value.data.length); + + for (const dataType of value.data) { + bufferWriter.writeSlice(dataType.toBuffer()); + } + } + return bufferWriter.buffer + } + + fromDataBuffer(buffer: Buffer, offset?: number): number { + + const reader = new BufferReader(buffer, offset); + + const dataLength = reader.readCompactSize(); + + if (!this.data) { + this.data = {}; + } + + for (var i = 0; i < dataLength; i++) { + + const vdxfkey = toBase58Check(reader.readSlice(HASH160_BYTE_LENGTH), I_ADDR_VERSION); + const dataLength = reader.readCompactSize(); + const data = []; + + for (var j = 0; j < dataLength; j++) { + + const attestation = AttestationDataType.getDataItem(toBase58Check(reader.buffer.slice(reader.offset, reader.offset + HASH160_BYTE_LENGTH), I_ADDR_VERSION), null); + reader.offset = attestation.fromBuffer(reader.buffer, reader.offset); + data.push(attestation); + } + + const categoryType = Object.entries(this.data).find(([key, value]) => value.vdxfid === vdxfkey ); + + this.data[categoryType[1].category].data = data; + } + + return reader.offset; + } + + toJson() { + return { + data: this.data, + }; + } +} diff --git a/src/vdxf/classes/attestationData.ts b/src/vdxf/classes/attestationData.ts deleted file mode 100644 index a962959..0000000 --- a/src/vdxf/classes/attestationData.ts +++ /dev/null @@ -1,416 +0,0 @@ -import { - Utf8DataVdxfObject, - HexDataVdxfObject, - BufferDataVdxfObject, - PNGImageVdxfObject, - VDXFObject -} from ".."; -import * as identitykeys from '../identitydatakeys'; -import * as keylist from '../keys'; -import bufferutils from '../../utils/bufferutils'; -import createHash = require("create-hash"); -import { fromBase58Check, toBase58Check } from '../../utils/address'; -import varuint from '../../utils/varuint' -import { I_ADDR_VERSION, HASH160_BYTE_LENGTH } from '../../constants/vdxf'; -const { BufferReader, BufferWriter } = bufferutils; - -export const enum AttestationClassTypes { - BUFFER_DATA_STRING = 1, - BUFFER_DATA_BYTES = 2, - BUFFER_DATA_BASE64 = 3, - URL = 4, - PNG_IMAGE = 5, - KEY_ONLY = 6, - BOOLEAN = 7, -} - -export const AttestationVdxfidMap = { - [identitykeys.IDENTITYDATA_FIRSTNAME.vdxfid]: { name: "First Name", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_LASTNAME.vdxfid]: { name: "Last Name", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_ATTESTOR.vdxfid]: { name: "Attestor ID", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDENTITY.vdxfid]: { name: "Identity", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_ID.vdxfid]: { name: "ID", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_USERID.vdxfid]: { name: "User ID", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_CREATEDAT.vdxfid]: { name: "Created at", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_COMPLETEDAT.vdxfid]: { name: "Completed at", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PREVIOUSATTEMPTID.vdxfid]: { name: "Previous attempt ID", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_SHAREABLEURL.vdxfid]: { name: "Shareable URL", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_TEMPLATEID.vdxfid]: { name: "Template ID", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_TEMPLATEVERSION.vdxfid]: { name: "Template Version", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PHONENUMBER.vdxfid]: { name: "Phone Number", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_OVER18.vdxfid]: { name: "Over 18", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_OVER21.vdxfid]: { name: "Over 21", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_OVER25.vdxfid]: { name: "Over 25", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_IPADDRESS.vdxfid]: { name: "IP Address", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_EMAIL.vdxfid]: { name: "Email Address", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_HOMEADDRESS.vdxfid]: { name: "Home address", type: AttestationClassTypes.KEY_ONLY }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1.vdxfid]: { name: "Street 1", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2.vdxfid]: { name: "Street 2", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_CITY.vdxfid]: { name: "City", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_REGION.vdxfid]: { name: "Region", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE.vdxfid]: { name: "Post Code", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY.vdxfid]: { name: "Country", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDNUMBER_VALUE.vdxfid]: { name: "ID Number", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDNUMBER_TYPE.vdxfid]: { name: "ID Type", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_STATUS.vdxfid]: { name: "Status", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_APPROVALS_ACCEPTEDTOS.vdxfid]: { name: "Accepted Terms and Conditions", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_APPROVALS_VERIFIEDSMS.vdxfid]: { name: "SMS Verified", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_APPROVALS_KYCCHECKED.vdxfid]: { name: "KYC Checked ok", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_APPROVALS_DOCUMENTSVERIFIED.vdxfid]: { name: "Documents Verified", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_APPROVALS_SELFIECHECKED.vdxfid]: { name: "Selfie Checked", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_APPROVALS_WATCHLIST_OK.vdxfid]: { name: "Watchlist ok", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Riskcheck ok", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE.vdxfid]: { name: "Driving Licence", type: AttestationClassTypes.KEY_ONLY }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_FRONT.vdxfid]: { name: "Driving Licence Front", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_BACK.vdxfid]: { name: "Driving Licence Back", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_FRONT.vdxfid]: { name: "Driving Licence Front", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_BACK.vdxfid]: { name: "Driving Licence Back", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_FACE.vdxfid]: { name: "Driving Licence Face", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_IDNUMBER.vdxfid]: { name: "Driving Licence Number", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CATEGORY.vdxfid]: { name: "Driving Licence Catagory", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_EXPIRATIONDATE.vdxfid]: { name: "Driving Licence expiry date", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Driving Licence matches country", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION.vdxfid]: { name: "Driving Licence issuing reigon", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH.vdxfid]: { name: "Driving Licence Date of Birth", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ADDRESS.vdxfid]: { name: "Driving Licence Address", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_STREET1.vdxfid]: { name: "Driving Licence Street 1", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CITY.vdxfid]: { name: "Driving Licence City", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_REGION.vdxfid]: { name: "Driving Licence Region", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_POSTCODE.vdxfid]: { name: "Driving Licence ZIP/Post Code", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_COUNTRY.vdxfid]: { name: "Driving Licence Country", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_MATCHED.vdxfid]: { name: "Driving Licence Matched all", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_NAME_MATCHED.vdxfid]: { name: "Driving Licence name matched", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH_MATCHED.vdxfid]: { name: "Driving Licence Date of Birth Matched", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_SELFIECHECK_SUCCESS.vdxfid]: { name: "Selfie Check success", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_SELFIECHECK_IMAGE.vdxfid]: { name: "Selfie Check image", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_SELFIECHECK_VIDEO.vdxfid]: { name: "Selfie Check video", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_SELFIECHECK_DRIVINGLICENCE_MATCH.vdxfid]: { name: "Selfie Driving Licence match", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_KYC_SUCCESS.vdxfid]: { name: "KYC Success", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_KYC_ADDRESS_MATCHED.vdxfid]: { name: "KYC Address Matched", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_KYC_TYPE.vdxfid]: { name: "KYC Type", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_KYC_NAME_MATCHED.vdxfid]: { name: "KYC Name Matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_KYC_DATEOFBIRTH_MATCHED.vdxfid]: { name: "KYC Date of Birth Matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_KYC_IDNUMBER_MATCHED.vdxfid]: { name: "KYC ID Matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_KYC_PHONENUMBER_MATCHED.vdxfid]: { name: "KYC Phone number matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_KYC_AREACODE_MATCHED.vdxfid]: { name: "KYC Areacode Matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RISKCHECK_STATUS.vdxfid]: { name: "Risk Check Status", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RISKCHECK_USERINTERACTIONS.vdxfid]: { name: "Risck Check User Interactions", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RISKCHECK_FRAUDRINGOK.vdxfid]: { name: "Risk Check No Fraudring", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RISKCHECK_BOTNOTDETECTED.vdxfid]: { name: "Risk Check bot free", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_EMAIL_ISDELIVERABLE.vdxfid]: { name: "Email address is deliverable", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_EMAIL_BREACHCOUNT.vdxfid]: { name: "Email breach count", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_EMAIL_FIRSTBREACHEDAT.vdxfid]: { name: "Email first breach date", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_EMAIL_LASTBREACHEDAT.vdxfid]: { name: "Email last breach date", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_REGISTEREDAT.vdxfid]: { name: "Email domain registered at", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_FREEPROVIDER.vdxfid]: { name: "Email is free provider", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_CUSTOM.vdxfid]: { name: "Email Domain is custom", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_DISPOSABLE.vdxfid]: { name: "Email Domain Disposable", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS.vdxfid]: { name: "Email top level Domain Suspicious", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD.vdxfid]: { name: "ID Card", type: AttestationClassTypes.KEY_ONLY }, - [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_FRONT.vdxfid]: { name: "ID Card Front", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_BACK.vdxfid]: { name: "ID Card Back", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_IDCARD_CROPPED_FRONT.vdxfid]: { name: "ID Card Front", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_IDCARD_CROPPED_BACK.vdxfid]: { name: "ID Card Back", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_IDCARD_FACE.vdxfid]: { name: "ID Card Face", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_IDCARD_IDNUMBER.vdxfid]: { name: "ID Card ID Number", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_CATEGORY.vdxfid]: { name: "ID Card Category", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_EXPIRATIONDATE.vdxfid]: { name: "ID Card Expiry date", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "ID Card Issuing Country Matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_ISSUING_REGION.vdxfid]: { name: "ID Card Issuing Region", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTH.vdxfid]: { name: "ID Card Date of Birth", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS.vdxfid]: { name: "ID Card Address", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_STREET1.vdxfid]: { name: "ID Card Street 1", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_CITY.vdxfid]: { name: "ID Card City", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_REGION.vdxfid]: { name: "ID Card Region", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_POSTCODE.vdxfid]: { name: "ID Card Zip/Post Code", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_COUNTRY.vdxfid]: { name: "ID Card Country", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "ID Card Matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_NAME_MATCHED.vdxfid]: { name: "ID Card Name Matched", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "ID Card Date of Birth Matched", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_PASSPORT.vdxfid]: { name: "Passport", type: AttestationClassTypes.KEY_ONLY }, - [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_FRONT.vdxfid]: { name: "Passport front", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_BACK.vdxfid]: { name: "Passport back", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_FRONT.vdxfid]: { name: "Passport front", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_BACK.vdxfid]: { name: "Passport back", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_PASSPORT_FACE.vdxfid]: { name: "Passport face", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_PASSPORT_IDNUMBER.vdxfid]: { name: "Passport ID Number", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_CATEGORY.vdxfid]: { name: "Passport Category", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_EXPIRATIONDATE.vdxfid]: { name: "Passport expiry date", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Passport issuing country matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_REGION.vdxfid]: { name: "Passport issuing region matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTH.vdxfid]: { name: "Passport date of birth", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS.vdxfid]: { name: "Passport address", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_STREET1.vdxfid]: { name: "Passport street 1", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_CITY.vdxfid]: { name: "Passport city", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_REGION.vdxfid]: { name: "Passport region", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_POSTCODE.vdxfid]: { name: "Passport zip/post code", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_COUNTRY.vdxfid]: { name: "Passport country", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Passport matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_NAME_MATCHED.vdxfid]: { name: "Passport Name Matched", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTHMATCHED.vdxfid]: { name: "Passport date of birth matched", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT.vdxfid]: { name: "Residence Permit", type: AttestationClassTypes.KEY_ONLY }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_FRONT.vdxfid]: { name: "Residence Permit front", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_BACK.vdxfid]: { name: "Residence Permit back", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_FRONT.vdxfid]: { name: "Residence Permit front", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_BACK.vdxfid]: { name: "Residence Permit back", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_FACE.vdxfid]: { name: "Residence Permit face", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_IDNUMBER.vdxfid]: { name: "Residence Permit ID Number", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CATEGORY.vdxfid]: { name: "Residence Permit category", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_EXPIRATIONDATE.vdxfid]: { name: "Residence Permit expiry date", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Residence Permit issuing country matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_REGION.vdxfid]: { name: "Residence Permit issuing region matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTH.vdxfid]: { name: "Residence Permit date of birth", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS.vdxfid]: { name: "Residence Permit Address", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_STREET1.vdxfid]: { name: "Residence Permit Street 1", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_CITY.vdxfid]: { name: "Residence Permit City", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_REGION.vdxfid]: { name: "Residence Permit Region", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_POSTCODE.vdxfid]: { name: "Residence Permit Zip/Post code", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_COUNTRY.vdxfid]: { name: "Residence Permit Country", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Residence Permit Matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_NAME_MATCHED.vdxfid]: { name: "Residence Permit name matched", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTHMATCHED.vdxfid]: { name: "Residence Permit date of birth matched", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_RESIDENTCARD.vdxfid]: { name: "Resident Card", type: AttestationClassTypes.KEY_ONLY }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_FRONT.vdxfid]: { name: "Resident Card Front", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_BACK.vdxfid]: { name: "Resident Card Back", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_FRONT.vdxfid]: { name: "Resident Card Front", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_BACK.vdxfid]: { name: "Resident Card Back", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_FACE.vdxfid]: { name: "Resident Card Face", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_IDNUMBER.vdxfid]: { name: "Resident Card ID Number", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_CATEGORY.vdxfid]: { name: "Resident Card Category", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_EXPIRATIONDATE.vdxfid]: { name: "Resident Card Expiry Date", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Resident Card Issuing Country Matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_REGION.vdxfid]: { name: "Resident Card Issuing Region", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTH.vdxfid]: { name: "Resident Card date of birth", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS.vdxfid]: { name: "Resident Card address", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_STREET1.vdxfid]: { name: "Resident Card Street 1", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_CITY.vdxfid]: { name: "Resident Card City", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_REGION.vdxfid]: { name: "Resident Card Region", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_POSTCODE.vdxfid]: { name: "Resident Card Zip/Post Code", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_COUNTRY.vdxfid]: { name: "Resident Card Country", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Resident Card Matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_NAME_MATCHED.vdxfid]: { name: "Resident Card Name Matched", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "Resident Card date of birth Matched", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_VISA.vdxfid]: { name: "Visa", type: AttestationClassTypes.KEY_ONLY }, - [identitykeys.IDENTITYDATA_VISA_ORIGINAL_FRONT.vdxfid]: { name: "Visa front", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_VISA_ORIGINAL_BACK.vdxfid]: { name: "Visa back", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_VISA_CROPPED_FRONT.vdxfid]: { name: "Visa front", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_VISA_CROPPED_BACK.vdxfid]: { name: "Visa back", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_VISA_FACE.vdxfid]: { name: "Visa face", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_VISA_IDNUMBER.vdxfid]: { name: "Visa ID Number", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_CATEGORY.vdxfid]: { name: "Visa Category", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_EXPIRATIONDATE.vdxfid]: { name: "Visa expiry date", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Visa issuing country matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_ISSUING_REGION.vdxfid]: { name: "Visa issuing region", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTH.vdxfid]: { name: "Visa date of birth", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS.vdxfid]: { name: "Visa address", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_STREET1.vdxfid]: { name: "Visa Street 1", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_CITY.vdxfid]: { name: "Visa City", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_REGION.vdxfid]: { name: "Visa Region", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_POSTCODE.vdxfid]: { name: "Visa Zip/Post Code", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_COUNTRY.vdxfid]: { name: "Visa Country", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Visa document matched", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_NAME_MATCHED.vdxfid]: { name: "Visa name matched", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTHMATCHED.vdxfid]: { name: "Visa date of birth matched", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALFRONT.vdxfid]: { name: "Original Front", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALBACK.vdxfid]: { name: "Original Back", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDFRONT.vdxfid]: { name: "Cropped Front", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDBACK.vdxfid]: { name: "Cropped Back", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_FACE.vdxfid]: { name: "Face", type: AttestationClassTypes.URL }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_IDNUMBER.vdxfid]: { name: "ID Number", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CATEGORY.vdxfid]: { name: "Category", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_EXPIRATIONDATE.vdxfid]: { name: "Expiry Date", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY.vdxfid]: { name: "Issuing Country", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUING_REGION.vdxfid]: { name: "Issuing Region", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ADDRESS.vdxfid]: { name: "Address", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_ADDRESS_STREET1.vdxfid]: { name: "Street 1", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_ADDRESS_STREET2.vdxfid]: { name: "Street 2", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_ADDRESS_CITY.vdxfid]: { name: "City", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_ADDRESS_REGION.vdxfid]: { name: "Region", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_ADDRESS_POSTCODE.vdxfid]: { name: "Zip/Postal Code", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_ADDRESS_COUNTRY.vdxfid]: { name: "Country", type: AttestationClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Document Matched", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED.vdxfid]: { name: "Name Matched", type: AttestationClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED.vdxfid]: { name: "Date of Birth Matched", type: AttestationClassTypes.BOOLEAN }, - [keylist.ATTESTATION_TYPE.vdxfid]: { name: "Attestation Type", type: AttestationClassTypes.BUFFER_DATA_STRING }, -}; - -export class AttestationDataType { - - dataItem: Utf8DataVdxfObject | HexDataVdxfObject | BufferDataVdxfObject | PNGImageVdxfObject | VDXFObject; - salt: Buffer = Buffer.alloc(0); - - constructor(data?: any, vdxfkey?: string, salt?: string) { - - this.getDataItem(vdxfkey, data); - - if (salt) { - this.salt = Buffer.from(salt, "hex"); - } - } - - getDataItem(vdxfkey, data): any { - switch (vdxfkey && AttestationVdxfidMap[vdxfkey].type || null) { - case AttestationClassTypes.BUFFER_DATA_STRING: - this.dataItem = new Utf8DataVdxfObject(data, vdxfkey); - break; - case AttestationClassTypes.BUFFER_DATA_BYTES: - this.dataItem = new HexDataVdxfObject(data, vdxfkey); - break; - case AttestationClassTypes.BUFFER_DATA_BASE64: - this.dataItem = new BufferDataVdxfObject(data, vdxfkey, "base64"); - break; - case AttestationClassTypes.URL: - this.dataItem = new BufferDataVdxfObject(data, vdxfkey, "utf8"); - break; - case AttestationClassTypes.PNG_IMAGE: - this.dataItem = new PNGImageVdxfObject(data, vdxfkey); - break; - case AttestationClassTypes.KEY_ONLY: - this.dataItem = new VDXFObject(vdxfkey); - break; - case AttestationClassTypes.BOOLEAN: - this.dataItem = new HexDataVdxfObject(data, vdxfkey); - break; - default: - this.dataItem = new HexDataVdxfObject(data, vdxfkey); - break; - } - } - - dataBytelength(): number { - - let length = 0; - - length += this.dataItem.byteLength(); - length += varuint.encodingLength(this.salt.length); - length += this.salt.length; - - return length; - } - - toBuffer(): Buffer { - - const buffer = Buffer.alloc(this.dataBytelength()); - const writer = new bufferutils.BufferWriter(buffer); - writer.writeSlice(this.dataItem.toBuffer()); - writer.writeVarSlice(this.salt); - - return writer.buffer; - } - - fromDataBuffer(buffer: Buffer, offset = 0, vdxfkey?: string): number { - - const reader = new bufferutils.BufferReader(buffer, offset); - reader.offset = this.dataItem.fromBuffer(reader.buffer, reader.offset, vdxfkey); - this.salt = reader.readVarSlice(); - - return reader.offset; - } -} - -export const friendlyNames = (vdfxkey) => { - - if (vdfxkey in AttestationVdxfidMap) { - - return AttestationVdxfidMap[vdfxkey].name; - - } else { - throw new Error("Unknown VDXF key"); - } -} - -export class AttestationData { - - components: Map; - constructor(components: Map = new Map()) { - this.components = components; - } - - dataByteLength(): number { - let byteLength = 0; - byteLength += varuint.encodingLength(this.components.size) - - for (const [key, item] of this.components) { - byteLength += varuint.encodingLength(key); - byteLength += item.dataBytelength(); - } - - return byteLength; - } - - toDataBuffer(): Buffer { - const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); - - bufferWriter.writeCompactSize(this.components.size); - - for (const [key, item] of this.components) { - bufferWriter.writeCompactSize(key); - bufferWriter.writeSlice(item.toBuffer()); - } - - return bufferWriter.buffer; - } - - fromDataBuffer(buffer: Buffer, offset?: number): number { - - const reader = new bufferutils.BufferReader(buffer, offset); - const componentsLength = reader.readCompactSize(); - this.components = new Map(); - - for (var i = 0; i < componentsLength; i++) { - const key = reader.readCompactSize(); - const vdxfid = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); - const attestationData = new AttestationDataType(null, vdxfid); - reader.offset = attestationData.fromDataBuffer(reader.buffer, reader.offset, vdxfid); - - this.components.set(key, attestationData); - } - - return reader.offset; - } - - size(): number { - return this.components.size; - } - - setDataFromJson(data: Array, getSalt: Function) { - - if (!this.components) { - this.components = new Map(); - } - - for (let i = 0; i < data.length; i++) { - - const item = data[i]; - - if (!(item.salt instanceof Buffer) || item.salt.length !== 32) { - if (typeof getSalt === "function") { - item.salt = getSalt(); - } else { - throw new Error("Salt is required to be a 32 random byte Buffer"); - } - } - - try { - fromBase58Check(item.dataItem.vdxfkey) - } catch (e) { - throw new Error("Attestation Key is required to be base58 format"); - } - - this.components.set(i, item); - } - - } - - getHash(key): Buffer { - - let value: Buffer; - - value = this.components.get(key).toBuffer(); - - return createHash("sha256").update(value).digest(); - } - -} \ No newline at end of file diff --git a/src/vdxf/classes/index.ts b/src/vdxf/classes/index.ts index bcf7357..dbdbd7d 100644 --- a/src/vdxf/classes/index.ts +++ b/src/vdxf/classes/index.ts @@ -34,7 +34,7 @@ export { AltAuthFactor, } from "./Challenge"; export {Attestation} from './Attestation' -export {AttestationData, AttestationDataType} from './AttestationData' +export {AttestationData, AttestationDataType} from './Attestation' export { ProvisioningTxid } from './provisioning/ProvisioningResult' diff --git a/src/vdxf/keymap.ts b/src/vdxf/keymap.ts index c7457b0..b37e0c8 100644 --- a/src/vdxf/keymap.ts +++ b/src/vdxf/keymap.ts @@ -1,5 +1,6 @@ import * as keylist from './keys'; -import * as AttestationData from './classes/AttestationData'; -export const keymap = Object.keys(keylist).reduce((obj: { [key: string]: any }, item) => { obj[keylist[item].vdxfid] = keylist[item]; return obj }, {}); -export const attestationDataKeys = Object.keys(AttestationData).reduce((obj: { [key: string]: any }, item) => { obj[AttestationData[item].vdxfid] = AttestationData[item]; return obj }, {}); -export const AttestationDataVdxfidMap = AttestationData.AttestationVdxfidMap; \ No newline at end of file +import * as AttestationData from './classes/IdentityData'; +import { VDXFKeyInterface } from './keys'; +export const keymap = Object.keys(keylist).reduce((obj: { [key: string]: VDXFKeyInterface }, item) => { obj[keylist[item].vdxfid] = keylist[item]; return obj }, {}); +export const attestationDataKeys = Object.keys(AttestationData).reduce((obj: { [key: string]: VDXFKeyInterface }, item) => { obj[AttestationData[item].vdxfid] = AttestationData[item]; return obj }, {}); +export const IdentityVdxfidMap = AttestationData.IdentityVdxfidMap; \ No newline at end of file From 225644302c69078d0eb712aedaf122a2ab4fcac4 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Tue, 27 Feb 2024 11:33:58 +0000 Subject: [PATCH 071/120] camalcase fix --- dist/vdxf/classes/IdentityData.js | 2 +- dist/vdxf/classes/PersonalData.js | 4 ++-- dist/vdxf/classes/PersonalProfile.js | 2 +- dist/vdxf/classes/attestationData.js | 2 +- dist/vdxf/index.d.ts | 2 +- dist/vdxf/index.js | 2 +- src/__tests__/attestation/attestation.test.ts | 2 +- src/vdxf/classes/IdentityData.ts | 2 +- src/vdxf/classes/PersonalProfile.ts | 2 +- src/vdxf/index.ts | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dist/vdxf/classes/IdentityData.js b/dist/vdxf/classes/IdentityData.js index af56b30..4e0c5c0 100644 --- a/dist/vdxf/classes/IdentityData.js +++ b/dist/vdxf/classes/IdentityData.js @@ -1,7 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.IdentityVdxfidMap = void 0; -const identitykeys = require("../identitydatakeys"); +const identitykeys = require("../identityDataKeys"); const keylist = require("../keys"); const bufferutils_1 = require("../../utils/bufferutils"); const { BufferReader, BufferWriter } = bufferutils_1.default; diff --git a/dist/vdxf/classes/PersonalData.js b/dist/vdxf/classes/PersonalData.js index 658cc83..8809b7e 100644 --- a/dist/vdxf/classes/PersonalData.js +++ b/dist/vdxf/classes/PersonalData.js @@ -6,11 +6,11 @@ const bufferutils_1 = require("../../utils/bufferutils"); const address_1 = require("../../utils/address"); const vdxf_1 = require("../../constants/vdxf"); const __1 = require(".."); -const identitydatakeys_1 = require("../identitydatakeys"); +const identityDataKeys_1 = require("../identityDataKeys"); const AttestationData_1 = require("./AttestationData"); const { BufferReader, BufferWriter } = bufferutils_1.default; class PersonalData extends __1.VDXFObject { - constructor(data, vdxfkey = identitydatakeys_1.PERSONAL_INFO_OBJECT.vdxfid) { + constructor(data, vdxfkey = identityDataKeys_1.PERSONAL_INFO_OBJECT.vdxfid) { super(vdxfkey); this.id = ''; this.linkedAttestation = ''; diff --git a/dist/vdxf/classes/PersonalProfile.js b/dist/vdxf/classes/PersonalProfile.js index e619833..f33d4e9 100644 --- a/dist/vdxf/classes/PersonalProfile.js +++ b/dist/vdxf/classes/PersonalProfile.js @@ -7,7 +7,7 @@ const address_1 = require("../../utils/address"); const vdxf_1 = require("../../constants/vdxf"); const __1 = require(".."); const Attestation_1 = require("./Attestation"); -const identitykeys = require("../identitydatakeys"); +const identitykeys = require("../identityDataKeys"); const { BufferReader, BufferWriter } = bufferutils_1.default; class DataCategory { constructor(data, category, vdxfid) { diff --git a/dist/vdxf/classes/attestationData.js b/dist/vdxf/classes/attestationData.js index 14b2a4f..9dacec6 100644 --- a/dist/vdxf/classes/attestationData.js +++ b/dist/vdxf/classes/attestationData.js @@ -2,7 +2,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.AttestationData = exports.friendlyNames = exports.AttestationDataType = exports.AttestationVdxfidMap = void 0; const __1 = require(".."); -const identitykeys = require("../identitydatakeys"); +const identitykeys = require("../identityDataKeys"); const keylist = require("../keys"); const bufferutils_1 = require("../../utils/bufferutils"); const createHash = require("create-hash"); diff --git a/dist/vdxf/index.d.ts b/dist/vdxf/index.d.ts index 7ea78c8..7e0be37 100644 --- a/dist/vdxf/index.d.ts +++ b/dist/vdxf/index.d.ts @@ -5,7 +5,7 @@ import { BigNumber } from "../utils/types/BigNumber"; export * from './keys'; export * from './scopes'; export * from './keymap'; -export * from './identitydatakeys'; +export * from './identityDataKeys'; export interface VDXFObjectInterface { vdxfkey: string; toString: () => string; diff --git a/dist/vdxf/index.js b/dist/vdxf/index.js index f14e909..01af924 100644 --- a/dist/vdxf/index.js +++ b/dist/vdxf/index.js @@ -28,7 +28,7 @@ const bn_js_1 = require("bn.js"); __exportStar(require("./keys"), exports); __exportStar(require("./scopes"), exports); __exportStar(require("./keymap"), exports); -__exportStar(require("./identitydatakeys"), exports); +__exportStar(require("./identityDataKeys"), exports); class VDXFObject { constructor(key = "", serializekey = true) { this.serializekey = true; diff --git a/src/__tests__/attestation/attestation.test.ts b/src/__tests__/attestation/attestation.test.ts index b531c2e..e79319a 100644 --- a/src/__tests__/attestation/attestation.test.ts +++ b/src/__tests__/attestation/attestation.test.ts @@ -4,7 +4,7 @@ import { RedirectUri, RequestedPermission } from "../../vdxf/classes/Challenge"; import { Context } from "../../vdxf/classes/Context"; import { CPartialAttestationProof } from "../../vdxf/classes/Attestation"; import { AttestationData, AttestationDataType } from "../../vdxf/classes/Attestation"; -import * as idkeys from "../../vdxf/identitydatakeys"; +import * as idkeys from "../../vdxf/identityDataKeys"; describe('Serializes and deserializes attestation request', () => { test('attestation request with reply', async () => { diff --git a/src/vdxf/classes/IdentityData.ts b/src/vdxf/classes/IdentityData.ts index 1180792..1b67473 100644 --- a/src/vdxf/classes/IdentityData.ts +++ b/src/vdxf/classes/IdentityData.ts @@ -5,7 +5,7 @@ import { PNGImageVdxfObject, VDXFObject } from ".."; -import * as identitykeys from '../identitydatakeys'; +import * as identitykeys from '../identityDataKeys'; import * as keylist from '../keys'; import bufferutils from '../../utils/bufferutils'; import createHash = require("create-hash"); diff --git a/src/vdxf/classes/PersonalProfile.ts b/src/vdxf/classes/PersonalProfile.ts index 271bb71..4e50f56 100644 --- a/src/vdxf/classes/PersonalProfile.ts +++ b/src/vdxf/classes/PersonalProfile.ts @@ -7,7 +7,7 @@ import { BufferDataVdxfObject, HexDataVdxfObject, PNGImageVdxfObject, Utf8DataVd import { CMerkleMountainRange, CMMRNode, CMerkleMountainView, CMMRProof } from "./MMR" import { Hash160 } from "./Hash160"; import { AttestationDataType } from './Attestation'; -import * as identitykeys from '../identitydatakeys'; +import * as identitykeys from '../identityDataKeys'; import { attestationDataKeys } from '../keymap'; const { BufferReader, BufferWriter } = bufferutils; diff --git a/src/vdxf/index.ts b/src/vdxf/index.ts index 4a34371..76d224f 100644 --- a/src/vdxf/index.ts +++ b/src/vdxf/index.ts @@ -12,7 +12,7 @@ import { BigNumber } from "../utils/types/BigNumber"; export * from './keys' export * from './scopes' export * from './keymap' -export * from './identitydatakeys' +export * from './identityDataKeys' export interface VDXFObjectInterface { vdxfkey: string; From 0b2486946f920944aebf97aad34a735c0df04e0c Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Tue, 27 Feb 2024 12:32:38 +0000 Subject: [PATCH 072/120] Remove unused imports --- dist/vdxf/classes/IdentityData.js | 2 -- src/vdxf/classes/IdentityData.ts | 14 +------------- src/vdxf/classes/PersonalProfile.ts | 6 +----- 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/dist/vdxf/classes/IdentityData.js b/dist/vdxf/classes/IdentityData.js index 4e0c5c0..0fb4e23 100644 --- a/dist/vdxf/classes/IdentityData.js +++ b/dist/vdxf/classes/IdentityData.js @@ -3,8 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.IdentityVdxfidMap = void 0; const identitykeys = require("../identityDataKeys"); const keylist = require("../keys"); -const bufferutils_1 = require("../../utils/bufferutils"); -const { BufferReader, BufferWriter } = bufferutils_1.default; exports.IdentityVdxfidMap = { [identitykeys.IDENTITYDATA_FIRSTNAME.vdxfid]: { name: "First Name", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, [identitykeys.IDENTITYDATA_LASTNAME.vdxfid]: { name: "Last Name", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, diff --git a/src/vdxf/classes/IdentityData.ts b/src/vdxf/classes/IdentityData.ts index 1b67473..f5bebc9 100644 --- a/src/vdxf/classes/IdentityData.ts +++ b/src/vdxf/classes/IdentityData.ts @@ -1,18 +1,6 @@ -import { - Utf8DataVdxfObject, - HexDataVdxfObject, - BufferDataVdxfObject, - PNGImageVdxfObject, - VDXFObject -} from ".."; + import * as identitykeys from '../identityDataKeys'; import * as keylist from '../keys'; -import bufferutils from '../../utils/bufferutils'; -import createHash = require("create-hash"); -import { fromBase58Check, toBase58Check } from '../../utils/address'; -import varuint from '../../utils/varuint' -import { I_ADDR_VERSION, HASH160_BYTE_LENGTH } from '../../constants/vdxf'; -const { BufferReader, BufferWriter } = bufferutils; export const enum IdentityDataClassTypes { BUFFER_DATA_STRING = 1, diff --git a/src/vdxf/classes/PersonalProfile.ts b/src/vdxf/classes/PersonalProfile.ts index 4e50f56..cb009ad 100644 --- a/src/vdxf/classes/PersonalProfile.ts +++ b/src/vdxf/classes/PersonalProfile.ts @@ -1,14 +1,10 @@ import varuint from '../../utils/varuint' import bufferutils from '../../utils/bufferutils' -import createHash = require("create-hash"); import { fromBase58Check, toBase58Check } from '../../utils/address'; import { I_ADDR_VERSION, HASH160_BYTE_LENGTH } from '../../constants/vdxf'; -import { BufferDataVdxfObject, HexDataVdxfObject, PNGImageVdxfObject, Utf8DataVdxfObject, VDXFObject, VerusIDSignature } from ".."; -import { CMerkleMountainRange, CMMRNode, CMerkleMountainView, CMMRProof } from "./MMR" -import { Hash160 } from "./Hash160"; +import { VDXFObject } from ".."; import { AttestationDataType } from './Attestation'; import * as identitykeys from '../identityDataKeys'; -import { attestationDataKeys } from '../keymap'; const { BufferReader, BufferWriter } = bufferutils; export class DataCategory { From 4f05c8f4913f540ab841480f27812f4167c29b52 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Thu, 29 Feb 2024 16:56:11 +0000 Subject: [PATCH 073/120] Add view keys --- dist/vdxf/classes/Challenge.js | 5 +++++ dist/vdxf/keys.d.ts | 2 ++ dist/vdxf/keys.js | 20 +++++++++++++++++++- package.json | 2 +- src/vdxf/classes/Challenge.ts | 6 ++++++ src/vdxf/keys.ts | 23 ++++++++++++++++++++++- 6 files changed, 55 insertions(+), 3 deletions(-) diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index e82cc03..70d55c1 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -283,6 +283,11 @@ class RequestedPermission extends __1.VDXFObject { this.data = data; this.encoding = "utf-8"; break; + case __1.PROFILE_DATA_VIEW_REQUEST.vdxfid: + classType = index_1.BufferDataVdxfObject; + this.data = data; + this.encoding = "utf-8"; + break; default: throw new Error("Invalid vdxfkey"); } diff --git a/dist/vdxf/keys.d.ts b/dist/vdxf/keys.d.ts index e6bf49b..07bf330 100644 --- a/dist/vdxf/keys.d.ts +++ b/dist/vdxf/keys.d.ts @@ -52,3 +52,5 @@ export declare const ATTESTATION_OBJECT: VDXFKeyInterface; export declare const ATTESTATION_VIEW_RESPONSE: VDXFKeyInterface; export declare const ATTESTATION_TYPE: VDXFKeyInterface; export declare const DATA_TYPE_STRING: VDXFKeyInterface; +export declare const PROFILE_DATA_VIEW_REQUEST: VDXFKeyInterface; +export declare const PROFILE_DATA_VIEW_RESPONSE: VDXFKeyInterface; diff --git a/dist/vdxf/keys.js b/dist/vdxf/keys.js index b1948e5..c8dc1bd 100644 --- a/dist/vdxf/keys.js +++ b/dist/vdxf/keys.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.DATA_TYPE_STRING = exports.ATTESTATION_TYPE = exports.ATTESTATION_VIEW_RESPONSE = exports.ATTESTATION_OBJECT = exports.ATTESTATION_RECIPIENT = exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.IDENTITY_AUTH_SIG_VDXF_KEY = exports.VERUSPAY_INVOICE_VDXF_KEY = void 0; +exports.PROFILE_DATA_VIEW_RESPONSE = exports.PROFILE_DATA_VIEW_REQUEST = exports.DATA_TYPE_STRING = exports.ATTESTATION_TYPE = exports.ATTESTATION_VIEW_RESPONSE = exports.ATTESTATION_OBJECT = exports.ATTESTATION_RECIPIENT = exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.IDENTITY_AUTH_SIG_VDXF_KEY = exports.VERUSPAY_INVOICE_VDXF_KEY = void 0; exports.VERUSPAY_INVOICE_VDXF_KEY = { hash160result: "628efc28c2e2d40050e1a9de7a93e7ddf2aa0076", qualifiedname: { @@ -338,3 +338,21 @@ exports.DATA_TYPE_STRING = { "name": "vrsc::data.type.string" }, }; +exports.PROFILE_DATA_VIEW_REQUEST = { + "vdxfid": "iFYznrRxyHaoJZ91cFDSYGT4szETf4RLRV", + "indexid": "xLP7Fes3pboTvj23TvsbWeybueFUatbQQh", + "hash160result": "d3f2168aad438c6c6eab8f3384458cbebf027a84", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::profile.data.view" + } +}; +exports.PROFILE_DATA_VIEW_RESPONSE = { + "vdxfid": "i5CWyoGHTzCAtt8MZWnH5C4y2GiSyZd56R", + "indexid": "xA2dSbhNKJQqX41PRCSS3abW3vjTq9KDZw", + "hash160result": "1f8ffc67110757607bd7334034251405cd37e912", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::profile.data.response" + } +}; diff --git a/package.json b/package.json index 566ea9c..ecad87e 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "license": "MIT", "dependencies": { "base64url": "3.0.1", - "bech32": "^2.0.0", + "bech32": "2.0.0", "blake2b": "https://github.com/VerusCoin/blake2b", "bn.js": "5.2.1", "bs58check": "https://github.com/bitcoinjs/bs58check", diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index f17d377..8f7d4dd 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -9,6 +9,7 @@ import { ATTESTATION_READ_REQUEST, IDENTITY_VIEW, IDENTITY_AGREEMENT, + PROFILE_DATA_VIEW_REQUEST, } from "../"; import bufferutils from "../../utils/bufferutils"; import varuint from "../../utils/varuint"; @@ -445,6 +446,11 @@ export class RequestedPermission extends VDXFObject { this.data = data; this.encoding = "utf-8"; break; + case PROFILE_DATA_VIEW_REQUEST.vdxfid: + classType = BufferDataVdxfObject; + this.data = data; + this.encoding = "utf-8"; + break; default: throw new Error("Invalid vdxfkey") } diff --git a/src/vdxf/keys.ts b/src/vdxf/keys.ts index db88bcd..3211c1c 100644 --- a/src/vdxf/keys.ts +++ b/src/vdxf/keys.ts @@ -398,4 +398,25 @@ export const DATA_TYPE_STRING: VDXFKeyInterface = "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", "name": "vrsc::data.type.string" }, -}; \ No newline at end of file +}; + +export const PROFILE_DATA_VIEW_REQUEST: VDXFKeyInterface = { + "vdxfid": "iFYznrRxyHaoJZ91cFDSYGT4szETf4RLRV", + "indexid": "xLP7Fes3pboTvj23TvsbWeybueFUatbQQh", + "hash160result": "d3f2168aad438c6c6eab8f3384458cbebf027a84", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::profile.data.view" + } +} + +export const PROFILE_DATA_VIEW_RESPONSE: VDXFKeyInterface = { + "vdxfid": "i5CWyoGHTzCAtt8MZWnH5C4y2GiSyZd56R", + "indexid": "xA2dSbhNKJQqX41PRCSS3abW3vjTq9KDZw", + "hash160result": "1f8ffc67110757607bd7334034251405cd37e912", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::profile.data.response" + } + +} \ No newline at end of file From f51d0f95a3bb74eb8915641f9f642813128f2cd4 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Fri, 8 Mar 2024 18:37:10 +0000 Subject: [PATCH 074/120] Update Catagories --- dist/vdxf/classes/PersonalProfile.d.ts | 11 +++++++++++ dist/vdxf/classes/PersonalProfile.js | 12 ++++++------ src/vdxf/classes/PersonalProfile.ts | 8 ++++---- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/dist/vdxf/classes/PersonalProfile.d.ts b/dist/vdxf/classes/PersonalProfile.d.ts index 99d741d..33d6787 100644 --- a/dist/vdxf/classes/PersonalProfile.d.ts +++ b/dist/vdxf/classes/PersonalProfile.d.ts @@ -8,6 +8,16 @@ export declare class DataCategory { vdxfid: string; }>, category: string, vdxfid: string); } +declare class PersonalDataCategory extends DataCategory { + constructor(); +} +declare class ContactDataCategory extends DataCategory { + constructor(); +} +declare class LocationDataCategory extends DataCategory { + constructor(); +} +export declare const defaultPersonalProfileDataTemplate: (PersonalDataCategory | ContactDataCategory | LocationDataCategory)[]; export declare class PersonalProfileDataStore extends VDXFObject { data: { [key: string]: DataCategory; @@ -22,3 +32,4 @@ export declare class PersonalProfileDataStore extends VDXFObject { }; }; } +export {}; diff --git a/dist/vdxf/classes/PersonalProfile.js b/dist/vdxf/classes/PersonalProfile.js index f33d4e9..c0c5184 100644 --- a/dist/vdxf/classes/PersonalProfile.js +++ b/dist/vdxf/classes/PersonalProfile.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.PersonalProfileDataStore = exports.DataCategory = void 0; +exports.PersonalProfileDataStore = exports.defaultPersonalProfileDataTemplate = exports.DataCategory = void 0; const varuint_1 = require("../../utils/varuint"); const bufferutils_1 = require("../../utils/bufferutils"); const address_1 = require("../../utils/address"); @@ -29,7 +29,7 @@ class PersonalDataCategory extends DataCategory { identitykeys.IDENTITYDATA_LASTNAME, identitykeys.IDENTITYDATA_DATEOFBIRTH, identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY - ], "personal", identitykeys.IDENTITYDATA_PERSONAL_DETAILS.vdxfid); + ], "Personal Details", identitykeys.IDENTITYDATA_PERSONAL_DETAILS.vdxfid); } } class ContactDataCategory extends DataCategory { @@ -37,7 +37,7 @@ class ContactDataCategory extends DataCategory { super([ identitykeys.IDENTITYDATA_EMAIL, identitykeys.IDENTITYDATA_PHONENUMBER - ], "contact", identitykeys.IDENTITYDATA_CONTACT.vdxfid); + ], "Contact", identitykeys.IDENTITYDATA_CONTACT.vdxfid); } } class LocationDataCategory extends DataCategory { @@ -48,10 +48,10 @@ class LocationDataCategory extends DataCategory { identitykeys.IDENTITYDATA_HOMEADDRESS_CITY, identitykeys.IDENTITYDATA_HOMEADDRESS_REGION, identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE - ], "locations", identitykeys.IDENTITYDATA_LOCATIONS.vdxfid); + ], "Locations", identitykeys.IDENTITYDATA_LOCATIONS.vdxfid); } } -const defaultPersonalProfileDataTemplate = [ +exports.defaultPersonalProfileDataTemplate = [ new PersonalDataCategory(), new ContactDataCategory(), new LocationDataCategory() @@ -67,7 +67,7 @@ class PersonalProfileDataStore extends __1.VDXFObject { } else { this.data = {}; - for (const item of defaultPersonalProfileDataTemplate) { + for (const item of exports.defaultPersonalProfileDataTemplate) { this.data[item.category] = item; } } diff --git a/src/vdxf/classes/PersonalProfile.ts b/src/vdxf/classes/PersonalProfile.ts index cb009ad..1219db3 100644 --- a/src/vdxf/classes/PersonalProfile.ts +++ b/src/vdxf/classes/PersonalProfile.ts @@ -29,7 +29,7 @@ class PersonalDataCategory extends DataCategory { identitykeys.IDENTITYDATA_LASTNAME, identitykeys.IDENTITYDATA_DATEOFBIRTH, identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY - ], "personal", + ], "Personal Details", identitykeys.IDENTITYDATA_PERSONAL_DETAILS.vdxfid); } } @@ -39,7 +39,7 @@ class ContactDataCategory extends DataCategory { super([ identitykeys.IDENTITYDATA_EMAIL, identitykeys.IDENTITYDATA_PHONENUMBER - ], "contact", + ], "Contact", identitykeys.IDENTITYDATA_CONTACT.vdxfid); } } @@ -52,12 +52,12 @@ class LocationDataCategory extends DataCategory { identitykeys.IDENTITYDATA_HOMEADDRESS_CITY, identitykeys.IDENTITYDATA_HOMEADDRESS_REGION, identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE - ], "locations", + ], "Locations", identitykeys.IDENTITYDATA_LOCATIONS.vdxfid); } } -const defaultPersonalProfileDataTemplate = [ +export const defaultPersonalProfileDataTemplate = [ new PersonalDataCategory(), new ContactDataCategory(), new LocationDataCategory() From 306ea8def671c59cd8e7f9e90e4599b387073c92 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Fri, 8 Mar 2024 19:04:40 +0000 Subject: [PATCH 075/120] export profile types --- dist/vdxf/classes/index.d.ts | 1 + dist/vdxf/classes/index.js | 6 +++++- src/vdxf/classes/index.ts | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dist/vdxf/classes/index.d.ts b/dist/vdxf/classes/index.d.ts index a4bd3ec..2dbc453 100644 --- a/dist/vdxf/classes/index.d.ts +++ b/dist/vdxf/classes/index.d.ts @@ -26,3 +26,4 @@ export { Attestation } from './Attestation'; export { AttestationData, AttestationDataType } from './Attestation'; export { ProvisioningTxid } from './provisioning/ProvisioningResult'; export { Context } from './Context'; +export { defaultPersonalProfileDataTemplate, DataCategory, PersonalProfileDataStore } from './PersonalProfile'; diff --git a/dist/vdxf/classes/index.js b/dist/vdxf/classes/index.js index 48598e6..f09679d 100644 --- a/dist/vdxf/classes/index.js +++ b/dist/vdxf/classes/index.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.Context = exports.ProvisioningTxid = exports.AttestationDataType = exports.AttestationData = exports.Attestation = exports.AltAuthFactor = exports.Audience = exports.RequestedPermission = exports.ProvisioningInfo = exports.Subject = exports.RedirectUri = exports.Hash160 = exports.LoginConsentProvisioningResult = exports.LoginConsentProvisioningDecision = exports.LoginConsentProvisioningResponse = exports.LoginConsentProvisioningChallenge = exports.LoginConsentProvisioningRequest = exports.VerusPayInvoice = exports.VerusPayInvoiceDetails = exports.SignedSessionObjectData = exports.SignedSessionObject = exports.LoginConsentResponse = exports.LoginConsentRequest = exports.LoginConsentDecision = exports.LoginConsentChallenge = void 0; +exports.PersonalProfileDataStore = exports.DataCategory = exports.defaultPersonalProfileDataTemplate = exports.Context = exports.ProvisioningTxid = exports.AttestationDataType = exports.AttestationData = exports.Attestation = exports.AltAuthFactor = exports.Audience = exports.RequestedPermission = exports.ProvisioningInfo = exports.Subject = exports.RedirectUri = exports.Hash160 = exports.LoginConsentProvisioningResult = exports.LoginConsentProvisioningDecision = exports.LoginConsentProvisioningResponse = exports.LoginConsentProvisioningChallenge = exports.LoginConsentProvisioningRequest = exports.VerusPayInvoice = exports.VerusPayInvoiceDetails = exports.SignedSessionObjectData = exports.SignedSessionObject = exports.LoginConsentResponse = exports.LoginConsentRequest = exports.LoginConsentDecision = exports.LoginConsentChallenge = void 0; var Challenge_1 = require("./Challenge"); Object.defineProperty(exports, "LoginConsentChallenge", { enumerable: true, get: function () { return Challenge_1.Challenge; } }); var Decision_1 = require("./Decision"); @@ -45,3 +45,7 @@ var ProvisioningResult_2 = require("./provisioning/ProvisioningResult"); Object.defineProperty(exports, "ProvisioningTxid", { enumerable: true, get: function () { return ProvisioningResult_2.ProvisioningTxid; } }); var Context_1 = require("./Context"); Object.defineProperty(exports, "Context", { enumerable: true, get: function () { return Context_1.Context; } }); +var PersonalProfile_1 = require("./PersonalProfile"); +Object.defineProperty(exports, "defaultPersonalProfileDataTemplate", { enumerable: true, get: function () { return PersonalProfile_1.defaultPersonalProfileDataTemplate; } }); +Object.defineProperty(exports, "DataCategory", { enumerable: true, get: function () { return PersonalProfile_1.DataCategory; } }); +Object.defineProperty(exports, "PersonalProfileDataStore", { enumerable: true, get: function () { return PersonalProfile_1.PersonalProfileDataStore; } }); diff --git a/src/vdxf/classes/index.ts b/src/vdxf/classes/index.ts index dbdbd7d..025d48d 100644 --- a/src/vdxf/classes/index.ts +++ b/src/vdxf/classes/index.ts @@ -38,4 +38,5 @@ export {AttestationData, AttestationDataType} from './Attestation' export { ProvisioningTxid } from './provisioning/ProvisioningResult' -export { Context } from './Context' \ No newline at end of file +export { Context } from './Context' +export { defaultPersonalProfileDataTemplate, DataCategory, PersonalProfileDataStore } from './PersonalProfile' \ No newline at end of file From 0687804ea968b40d259ea8eacdf3e65e3fc8ce3e Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Tue, 12 Mar 2024 09:44:35 +0000 Subject: [PATCH 076/120] Updates to add more categories --- dist/vdxf/classes/PersonalProfile.d.ts | 11 +- dist/vdxf/classes/PersonalProfile.js | 37 +++- dist/vdxf/identityDataKeys.d.ts | 18 ++ dist/vdxf/identityDataKeys.js | 200 ++++++++++++++++++- src/vdxf/classes/PersonalProfile.ts | 47 ++++- src/vdxf/identityDataKeys.ts | 263 +++++++++++++++++++++++-- 6 files changed, 542 insertions(+), 34 deletions(-) diff --git a/dist/vdxf/classes/PersonalProfile.d.ts b/dist/vdxf/classes/PersonalProfile.d.ts index 33d6787..3d08582 100644 --- a/dist/vdxf/classes/PersonalProfile.d.ts +++ b/dist/vdxf/classes/PersonalProfile.d.ts @@ -3,10 +3,11 @@ import { VDXFObject } from ".."; export declare class DataCategory { data: Array; category: string; + details: string; vdxfid: string; constructor(data: Array | Array<{ vdxfid: string; - }>, category: string, vdxfid: string); + }>, category: string, vdxfid: string, details: string); } declare class PersonalDataCategory extends DataCategory { constructor(); @@ -17,7 +18,13 @@ declare class ContactDataCategory extends DataCategory { declare class LocationDataCategory extends DataCategory { constructor(); } -export declare const defaultPersonalProfileDataTemplate: (PersonalDataCategory | ContactDataCategory | LocationDataCategory)[]; +declare class BankingDataCategory extends DataCategory { + constructor(); +} +declare class DocumentsCategory extends DataCategory { + constructor(); +} +export declare const defaultPersonalProfileDataTemplate: (PersonalDataCategory | ContactDataCategory | LocationDataCategory | BankingDataCategory | DocumentsCategory)[]; export declare class PersonalProfileDataStore extends VDXFObject { data: { [key: string]: DataCategory; diff --git a/dist/vdxf/classes/PersonalProfile.js b/dist/vdxf/classes/PersonalProfile.js index c0c5184..c6169de 100644 --- a/dist/vdxf/classes/PersonalProfile.js +++ b/dist/vdxf/classes/PersonalProfile.js @@ -10,7 +10,7 @@ const Attestation_1 = require("./Attestation"); const identitykeys = require("../identityDataKeys"); const { BufferReader, BufferWriter } = bufferutils_1.default; class DataCategory { - constructor(data, category, vdxfid) { + constructor(data, category, vdxfid, details) { if (data && data[0] instanceof __1.VDXFObject) { this.data = data; } @@ -19,6 +19,7 @@ class DataCategory { } this.category = category; this.vdxfid = vdxfid; + this.details = details; } } exports.DataCategory = DataCategory; @@ -29,7 +30,7 @@ class PersonalDataCategory extends DataCategory { identitykeys.IDENTITYDATA_LASTNAME, identitykeys.IDENTITYDATA_DATEOFBIRTH, identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY - ], "Personal Details", identitykeys.IDENTITYDATA_PERSONAL_DETAILS.vdxfid); + ], "Personal Details", identitykeys.IDENTITYDATA_PERSONAL_DETAILS.vdxfid, "Name, birthday, nationality"); } } class ContactDataCategory extends DataCategory { @@ -37,7 +38,7 @@ class ContactDataCategory extends DataCategory { super([ identitykeys.IDENTITYDATA_EMAIL, identitykeys.IDENTITYDATA_PHONENUMBER - ], "Contact", identitykeys.IDENTITYDATA_CONTACT.vdxfid); + ], "Contact", identitykeys.IDENTITYDATA_CONTACT.vdxfid, "Email, phone number"); } } class LocationDataCategory extends DataCategory { @@ -48,13 +49,39 @@ class LocationDataCategory extends DataCategory { identitykeys.IDENTITYDATA_HOMEADDRESS_CITY, identitykeys.IDENTITYDATA_HOMEADDRESS_REGION, identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE - ], "Locations", identitykeys.IDENTITYDATA_LOCATIONS.vdxfid); + ], "Locations", identitykeys.IDENTITYDATA_LOCATIONS.vdxfid, "Tax residency, home address"); + } +} +class BankingDataCategory extends DataCategory { + constructor() { + super([ + identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1, + identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2, + identitykeys.IDENTITYDATA_HOMEADDRESS_CITY, + identitykeys.IDENTITYDATA_HOMEADDRESS_REGION, + identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE + ], "Banking Information", identitykeys.IDENTITYDATA_BANKING_INFORMATION.vdxfid, "Bank accounts"); + } +} +class DocumentsCategory extends DataCategory { + constructor() { + super([ + identitykeys.IDENTITYDATA_PASSPORT, + identitykeys.IDENTITYDATA_DRIVINGLICENCE, + identitykeys.IDENTITYDATA_RESIDENCEPERMIT, + identitykeys.IDENTITYDATA_RESIDENTCARD, + identitykeys.IDENTITYDATA_VISA, + identitykeys.IDENTITYDATA_IDCARD, + identitykeys.IDENTITYDATA_SELFIECHECK_IMAGE, + ], "Documents", identitykeys.IDENTITYDATA_DOCUMENTS_AND_IMAGES.vdxfid, "Passport, ID, driving license"); } } exports.defaultPersonalProfileDataTemplate = [ new PersonalDataCategory(), new ContactDataCategory(), - new LocationDataCategory() + new LocationDataCategory(), + new BankingDataCategory(), + new DocumentsCategory() ]; class PersonalProfileDataStore extends __1.VDXFObject { constructor(data) { diff --git a/dist/vdxf/identityDataKeys.d.ts b/dist/vdxf/identityDataKeys.d.ts index 9714003..ef13e37 100644 --- a/dist/vdxf/identityDataKeys.d.ts +++ b/dist/vdxf/identityDataKeys.d.ts @@ -214,3 +214,21 @@ export declare const IDENTITYDATA_LOCATIONS: VDXFKeyInterface; export declare const IDENTITYDATA_BANKING_INFORMATION: VDXFKeyInterface; export declare const IDENTITYDATA_DOCUMENTS_AND_IMAGES: VDXFKeyInterface; export declare const PERSONAL_INFO_OBJECT: VDXFKeyInterface; +export declare const FIAT_CURRENCEY: VDXFKeyInterface; +export declare const BANK_ACCOUNT: VDXFKeyInterface; +export declare const BANK_ACCOUNT_CURRENCY: VDXFKeyInterface; +export declare const BANK_ACCOUNT_COUNTRY: VDXFKeyInterface; +export declare const BANK_ACCOUNT_STREET1: VDXFKeyInterface; +export declare const BANK_ACCOUNT_STREET2: VDXFKeyInterface; +export declare const BANK_ACCOUNT_CITY: VDXFKeyInterface; +export declare const BANK_ACCOUNT_REGION: VDXFKeyInterface; +export declare const BANK_ACCOUNT_POSTALCODE: VDXFKeyInterface; +export declare const BANK_ACCOUNT_TAXNUMBER: VDXFKeyInterface; +export declare const BANK_ACCOUNT_TAXCOUNTRY: VDXFKeyInterface; +export declare const BANK_ACCOUNT_FIRSTNAME: VDXFKeyInterface; +export declare const BANK_ACCOUNT_LASTNAME: VDXFKeyInterface; +export declare const BANK_ACCOUNT_PHONENUMBER: VDXFKeyInterface; +export declare const ACCOUNT_NUMBER: VDXFKeyInterface; +export declare const ACCOUNT_TYPE: VDXFKeyInterface; +export declare const BANK_ACCOUNT_NUMBER: VDXFKeyInterface; +export declare const BANK_ACCOUNT_TYPE: VDXFKeyInterface; diff --git a/dist/vdxf/identityDataKeys.js b/dist/vdxf/identityDataKeys.js index 3013c1c..411fc15 100644 --- a/dist/vdxf/identityDataKeys.js +++ b/dist/vdxf/identityDataKeys.js @@ -4,7 +4,7 @@ exports.IDENTITYDATA_DRIVINGLICENCE_STREET1 = exports.IDENTITYDATA_DRIVINGLICENC exports.IDENTITYDATA_IDCARD_ADDRESS_COUNTRY = exports.IDENTITYDATA_IDCARD_ADDRESS_POSTCODE = exports.IDENTITYDATA_IDCARD_ADDRESS_REGION = exports.IDENTITYDATA_IDCARD_ADDRESS_CITY = exports.IDENTITYDATA_IDCARD_ADDRESS_STREET1 = exports.IDENTITYDATA_IDCARD_ADDRESS = exports.IDENTITYDATA_IDCARD_DATEOFBIRTH = exports.IDENTITYDATA_IDCARD_ISSUING_REGION = exports.IDENTITYDATA_IDCARD_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_IDCARD_EXPIRATIONDATE = exports.IDENTITYDATA_IDCARD_CATEGORY = exports.IDENTITYDATA_IDCARD_IDNUMBER = exports.IDENTITYDATA_IDCARD_FACE = exports.IDENTITYDATA_IDCARD_CROPPED_BACK = exports.IDENTITYDATA_IDCARD_CROPPED_FRONT = exports.IDENTITYDATA_IDCARD_ORIGINAL_BACK = exports.IDENTITYDATA_IDCARD_ORIGINAL_FRONT = exports.IDENTITYDATA_IDCARD = exports.IDENTITYDATA_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS = exports.IDENTITYDATA_EMAIL_DOMAIN_DISPOSABLE = exports.IDENTITYDATA_EMAIL_DOMAIN_CUSTOM = exports.IDENTITYDATA_EMAIL_DOMAIN_FREEPROVIDER = exports.IDENTITYDATA_EMAIL_DOMAIN_REGISTEREDAT = exports.IDENTITYDATA_EMAIL_LASTBREACHEDAT = exports.IDENTITYDATA_EMAIL_FIRSTBREACHEDAT = exports.IDENTITYDATA_EMAIL_BREACHCOUNT = exports.IDENTITYDATA_EMAIL_ISDELIVERABLE = exports.IDENTITYDATA_RISKCHECK_BOTNOTDETECTED = exports.IDENTITYDATA_RISKCHECK_FRAUDRINGOK = exports.IDENTITYDATA_RISKCHECK_USERINTERACTIONS = exports.IDENTITYDATA_RISKCHECK_STATUS = exports.IDENTITYDATA_KYC_AREACODE_MATCHED = exports.IDENTITYDATA_KYC_PHONENUMBER_MATCHED = exports.IDENTITYDATA_KYC_IDNUMBER_MATCHED = exports.IDENTITYDATA_KYC_DATEOFBIRTH_MATCHED = exports.IDENTITYDATA_KYC_NAME_MATCHED = exports.IDENTITYDATA_KYC_TYPE = exports.IDENTITYDATA_KYC_ADDRESS_MATCHED = exports.IDENTITYDATA_KYC_SUCCESS = exports.IDENTITYDATA_SELFIECHECK_DRIVINGLICENCE_MATCH = exports.IDENTITYDATA_SELFIECHECK_VIDEO = exports.IDENTITYDATA_SELFIECHECK_IMAGE = exports.IDENTITYDATA_SELFIECHECK_SUCCESS = exports.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH_MATCHED = exports.IDENTITYDATA_DRIVINGLICENCE_NAME_MATCHED = exports.IDENTITYDATA_DRIVINGLICENCE_MATCHED = exports.IDENTITYDATA_DRIVINGLICENCE_COUNTRY = exports.IDENTITYDATA_DRIVINGLICENCE_POSTCODE = exports.IDENTITYDATA_DRIVINGLICENCE_REGION = exports.IDENTITYDATA_DRIVINGLICENCE_CITY = void 0; exports.IDENTITYDATA_RESIDENTCARD_CROPPED_BACK = exports.IDENTITYDATA_RESIDENTCARD_CROPPED_FRONT = exports.IDENTITYDATA_RESIDENTCARD_ORIGINAL_BACK = exports.IDENTITYDATA_RESIDENTCARD_ORIGINAL_FRONT = exports.IDENTITYDATA_RESIDENTCARD = exports.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_RESIDENCEPERMIT_NAME_MATCHED = exports.IDENTITYDATA_RESIDENCEPERMIT_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_COUNTRY = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_POSTCODE = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_REGION = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_CITY = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_STREET1 = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS = exports.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTH = exports.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_REGION = exports.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_RESIDENCEPERMIT_EXPIRATIONDATE = exports.IDENTITYDATA_RESIDENCEPERMIT_CATEGORY = exports.IDENTITYDATA_RESIDENCEPERMIT_IDNUMBER = exports.IDENTITYDATA_RESIDENCEPERMIT_FACE = exports.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_BACK = exports.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_FRONT = exports.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_BACK = exports.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_FRONT = exports.IDENTITYDATA_RESIDENCEPERMIT = exports.IDENTITYDATA_PASSPORT_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_PASSPORT_NAME_MATCHED = exports.IDENTITYDATA_PASSPORT_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_PASSPORT_ADDRESS_COUNTRY = exports.IDENTITYDATA_PASSPORT_ADDRESS_POSTCODE = exports.IDENTITYDATA_PASSPORT_ADDRESS_REGION = exports.IDENTITYDATA_PASSPORT_ADDRESS_CITY = exports.IDENTITYDATA_PASSPORT_ADDRESS_STREET1 = exports.IDENTITYDATA_PASSPORT_ADDRESS = exports.IDENTITYDATA_PASSPORT_DATEOFBIRTH = exports.IDENTITYDATA_PASSPORT_ISSUING_REGION = exports.IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_PASSPORT_EXPIRATIONDATE = exports.IDENTITYDATA_PASSPORT_CATEGORY = exports.IDENTITYDATA_PASSPORT_IDNUMBER = exports.IDENTITYDATA_PASSPORT_FACE = exports.IDENTITYDATA_PASSPORT_CROPPED_BACK = exports.IDENTITYDATA_PASSPORT_CROPPED_FRONT = exports.IDENTITYDATA_PASSPORT_ORIGINAL_BACK = exports.IDENTITYDATA_PASSPORT_ORIGINAL_FRONT = exports.IDENTITYDATA_PASSPORT = exports.IDENTITYDATA_IDCARD_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_IDCARD_NAME_MATCHED = exports.IDENTITYDATA_IDCARD_DOCUMENTVERIFICATION_MATCHED = void 0; exports.IDENTITYDATA_ADDRESS_STREET1 = exports.IDENTITYDATA_DOCUMENTVERIFICATION_ADDRESS = exports.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTH = exports.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUING_REGION = exports.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY = exports.IDENTITYDATA_DOCUMENTVERIFICATION_EXPIRATIONDATE = exports.IDENTITYDATA_DOCUMENTVERIFICATION_CATEGORY = exports.IDENTITYDATA_DOCUMENTVERIFICATION_IDNUMBER = exports.IDENTITYDATA_DOCUMENTVERIFICATION_FACE = exports.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDBACK = exports.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDFRONT = exports.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALBACK = exports.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALFRONT = exports.IDENTITYDATA_VISA_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_VISA_NAME_MATCHED = exports.IDENTITYDATA_VISA_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_VISA_ADDRESS_COUNTRY = exports.IDENTITYDATA_VISA_ADDRESS_POSTCODE = exports.IDENTITYDATA_VISA_ADDRESS_REGION = exports.IDENTITYDATA_VISA_ADDRESS_CITY = exports.IDENTITYDATA_VISA_ADDRESS_STREET1 = exports.IDENTITYDATA_VISA_ADDRESS = exports.IDENTITYDATA_VISA_DATEOFBIRTH = exports.IDENTITYDATA_VISA_ISSUING_REGION = exports.IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_VISA_EXPIRATIONDATE = exports.IDENTITYDATA_VISA_CATEGORY = exports.IDENTITYDATA_VISA_IDNUMBER = exports.IDENTITYDATA_VISA_FACE = exports.IDENTITYDATA_VISA_CROPPED_BACK = exports.IDENTITYDATA_VISA_CROPPED_FRONT = exports.IDENTITYDATA_VISA_ORIGINAL_BACK = exports.IDENTITYDATA_VISA_ORIGINAL_FRONT = exports.IDENTITYDATA_VISA = exports.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_RESIDENTCARD_NAME_MATCHED = exports.IDENTITYDATA_RESIDENTCARD_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_COUNTRY = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_POSTCODE = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_REGION = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_CITY = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_STREET1 = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS = exports.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTH = exports.IDENTITYDATA_RESIDENTCARD_ISSUING_REGION = exports.IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_RESIDENTCARD_EXPIRATIONDATE = exports.IDENTITYDATA_RESIDENTCARD_CATEGORY = exports.IDENTITYDATA_RESIDENTCARD_IDNUMBER = exports.IDENTITYDATA_RESIDENTCARD_FACE = void 0; -exports.PERSONAL_INFO_OBJECT = exports.IDENTITYDATA_DOCUMENTS_AND_IMAGES = exports.IDENTITYDATA_BANKING_INFORMATION = exports.IDENTITYDATA_LOCATIONS = exports.IDENTITYDATA_CONTACT = exports.IDENTITYDATA_PERSONAL_DETAILS = exports.IDENTITYDATA_NAME = exports.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED = exports.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_ADDRESS_COUNTRY = exports.IDENTITYDATA_ADDRESS_POSTCODE = exports.IDENTITYDATA_ADDRESS_REGION = exports.IDENTITYDATA_ADDRESS_CITY = exports.IDENTITYDATA_ADDRESS_STREET2 = void 0; +exports.BANK_ACCOUNT_TYPE = exports.BANK_ACCOUNT_NUMBER = exports.ACCOUNT_TYPE = exports.ACCOUNT_NUMBER = exports.BANK_ACCOUNT_PHONENUMBER = exports.BANK_ACCOUNT_LASTNAME = exports.BANK_ACCOUNT_FIRSTNAME = exports.BANK_ACCOUNT_TAXCOUNTRY = exports.BANK_ACCOUNT_TAXNUMBER = exports.BANK_ACCOUNT_POSTALCODE = exports.BANK_ACCOUNT_REGION = exports.BANK_ACCOUNT_CITY = exports.BANK_ACCOUNT_STREET2 = exports.BANK_ACCOUNT_STREET1 = exports.BANK_ACCOUNT_COUNTRY = exports.BANK_ACCOUNT_CURRENCY = exports.BANK_ACCOUNT = exports.FIAT_CURRENCEY = exports.PERSONAL_INFO_OBJECT = exports.IDENTITYDATA_DOCUMENTS_AND_IMAGES = exports.IDENTITYDATA_BANKING_INFORMATION = exports.IDENTITYDATA_LOCATIONS = exports.IDENTITYDATA_CONTACT = exports.IDENTITYDATA_PERSONAL_DETAILS = exports.IDENTITYDATA_NAME = exports.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED = exports.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_ADDRESS_COUNTRY = exports.IDENTITYDATA_ADDRESS_POSTCODE = exports.IDENTITYDATA_ADDRESS_REGION = exports.IDENTITYDATA_ADDRESS_CITY = exports.IDENTITYDATA_ADDRESS_STREET2 = void 0; exports.IDENTITYDATA_ATTESTOR = { "vdxfid": "iNe8VaRBRFDhb6xjZ7WHNWgfM73428GN8B", "hash160result": "5e01d5d356d517df57ea0f391c86e11a84663bd2", @@ -2316,3 +2316,201 @@ exports.PERSONAL_INFO_OBJECT = { "name": "vrsc::identitydata.personalinfo" } }; +exports.FIAT_CURRENCEY = { + "vdxfid": "i8sgE4s24ZZE9ts4MiYbWpng419T8a5yfW", + "indexid": "xDhngsJ6usmtn4k6DQCkVDKD5fATwqdYBr", + "hash160result": "f24235e62affcb4c57faecc6d0e3b3893889393b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.fiatcurrency" + } +}; +exports.BANK_ACCOUNT = { + "vdxfid": "i7QCof7PM8unmLKefzRKokd6oHtkRN5NK4", + "indexid": "xCEKGTYUCT8TPWCgXg5Un99dpwumKZ9uek", + "hash160result": "c34f89a8cd8b6a32848632597ea0bd111c4a0f2b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankaccount" + } +}; +exports.BANK_ACCOUNT_CURRENCY = { + "vdxfid": "iJdQpLtdyAgiRfoJstY8utsY5wEQZdM91y", + "indexid": "xPTXH9KipUuP3qgLjaCHtHQ57bFRREieor", + "hash160result": "2d60e910979af52ce62167b5ec5224858a1b38a6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankaccount" + }, + "bounddata": { + "vdxfkey": "i8sgE4s24ZZE9ts4MiYbWpng419T8a5yfW" + } +}; +exports.BANK_ACCOUNT_COUNTRY = { + "vdxfid": "iLcX5aezEdeeX63ZAk1fzh1qBVc5gr3hyT", + "indexid": "xRSdYP655wsK9Fvb2Rfpy5YND9d6Z9EL9o", + "hash160result": "0939ad4a2dcb7c1030a2f4efd046a818c92bfdbb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankaccount" + }, + "bounddata": { + "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" + } +}; +exports.BANK_ACCOUNT_STREET1 = { + "vdxfid": "iDzy4tzp8CQqG4fh4qwyhjeM1EDgZvauwy", + "indexid": "xJq5XhRtyWdVtEYivXc8g8At2tEhSpargH", + "hash160result": "93a2d4461521cffba345fe384c86561fb5227373", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankaccount" + }, + "bounddata": { + "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + } +}; +exports.BANK_ACCOUNT_STREET2 = { + "vdxfid": "iMf5baQkrp6EuacyScGu3vQ7EHt4vSiUsz", + "indexid": "xSVC4Nqqi8JuXkW1JHw42JveFwu5qj1Gkv", + "hash160result": "d3da8b39e046268d93d25d6b9f780950d04571c7", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankaccount" + }, + "bounddata": { + "vdxfkey": "i3h8D5kGtn6DCVCwPFvbypbFCqfzAhXiD2" + } +}; +exports.BANK_ACCOUNT_CITY = { + "vdxfid": "iBgQ4ev7sBd1FodofzgyfEriHWQw6phnwm", + "indexid": "xGWWXTMCiVqfsyWqXgM8ddPFKARx1ok9eq", + "hash160result": "aad5a1798ce03abfbe5166989f9bade19fd8ff59", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankaccount" + }, + "bounddata": { + "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + } +}; +exports.BANK_ACCOUNT_REGION = { + "vdxfid": "iE2HNu3NkhUpFanwjq7z3K14pSKCVh2Yku", + "indexid": "xJrPqhUTc1hUskfybWn91hXbr6LDLwguv5", + "hash160result": "f8b4b7681f399f4ce6f77b16a3034cd014d6b273", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankaccount" + }, + "bounddata": { + "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" + } +}; +exports.BANK_ACCOUNT_POSTALCODE = { + "vdxfid": "iEnvTt4zt1iXttDpDCcqvfNYhbReBSeGoa", + "indexid": "xKd2vgW5jKwCX46r4tGzu3u5jFSf33Qv7t", + "hash160result": "23439436b34068051f5dfdaf133ae7ada918247c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankaccount" + }, + "bounddata": { + "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" + } +}; +exports.BANK_ACCOUNT_TAXNUMBER = { + "vdxfid": "iLZMhFEyg2BysiG8eQabdeGYLpNRzWUvVG", + "indexid": "xRPUA3g4XLQeVt9AW6Ekc2o5NUPSxw2wvq", + "hash160result": "fa32239bcdc55780096b55ce3e7ae9ddc01664bb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.taxnumber" + } +}; +exports.BANK_ACCOUNT_TAXCOUNTRY = { + "vdxfid": "iNfhYoUGzruHxihV5dYSYnsruD4STZaKvF", + "indexid": "xTVp1buMrB7xataWwKCbXBQPvs5TN85VEX", + "hash160result": "c0728dd8a0644b69a990c7cddc133a8aeb6887d2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.taxcountry" + } +}; +exports.BANK_ACCOUNT_FIRSTNAME = { + "vdxfid": "iLaKzdEJgoztyM5f9YnLoGBPQYpq3d6FxF", + "indexid": "xRQSTRfPY8DZbWxh1ESVmehvSCqqw8EGSr", + "hash160result": "25041a54186ca5d8c277e7a1a498c33fe01593bb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankaccount" + }, + "bounddata": { + "vdxfkey": "i4GqsotHGa4czCdtg2d8FVHKfJFzVyBPrM" + } +}; +exports.BANK_ACCOUNT_LASTNAME = { + "vdxfid": "iR2fNBYnQDAgfU2BxvC7c4CJQPRY7LXAzm", + "indexid": "xVrmpyysFXPMHduDpbrGaSiqS3SYznwXmR", + "hash160result": "c4b8f6772ae63a6265c814ebf1637f6902936eec", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankaccount" + }, + "bounddata": { + "vdxfkey": "iHybTrNB1kXRrjsCtJXd6fvBKxepqMpS5Z" + } +}; +exports.BANK_ACCOUNT_PHONENUMBER = { + "vdxfid": "iNNkwqvht83J1HZyopGaqVXKMAzTQkj9zM", + "indexid": "xTCsQeMnjSFxdTT1fVvjot3rNq1UHrb19r", + "hash160result": "95d0bc46ca38214dcca8220507da3295a52c53cf", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankaccount" + }, + "bounddata": { + "vdxfkey": "i9ZQ5degEh3wQg5vNm8Tod88bcJBrLs5p3" + } +}; +exports.ACCOUNT_NUMBER = { + "vdxfid": "iS6TbNSaquK5uDZemFF9DLP6K6ZciN6TBd", + "indexid": "xWva4AsfhDXkXPSgcvuJBiudLkadg3ZHt5", + "hash160result": "8b15e73e57238a3dc6bcb31b368328495e891ef8", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.accountnumber" + } +}; +exports.ACCOUNT_TYPE = { + "vdxfid": "iNdRtUasuiojMC2sw35Nbs4W6hq7o8bWqY", + "indexid": "xTTYMH1xm32PyMuunijXaFb38Mr8ipmsky", + "hash160result": "b1d14abf13ce26753676953ec88c00ad448119d2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.accounttype" + } +}; +exports.BANK_ACCOUNT_NUMBER = { + "vdxfid": "i64P8QWcucELMgrq1uxY7uKCq3eymRcwaQ", + "indexid": "xAtVbCwhkvSzyrjrsbch6Hqjrhfzdz82YM", + "hash160result": "240b1dd30e88528bc9307d3158ccb5fb3d76571c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankaccount" + }, + "bounddata": { + "vdxfkey": "iS6TbNSaquK5uDZemFF9DLP6K6ZciN6TBd" + } +}; +exports.BANK_ACCOUNT_TYPE = { + "vdxfid": "iLMsPy8GhsGSNDzXDpZ8SEcymJfgGrLUVj", + "indexid": "xRByrmZMZBV6zPsZ5WDHQd9Wnxgh8bD1RJ", + "hash160result": "faf99925bc81dc052b9deb8c3321965633e437b9", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankaccount" + }, + "bounddata": { + "vdxfkey": "iNdRtUasuiojMC2sw35Nbs4W6hq7o8bWqY" + } +}; diff --git a/src/vdxf/classes/PersonalProfile.ts b/src/vdxf/classes/PersonalProfile.ts index 1219db3..cb3dce3 100644 --- a/src/vdxf/classes/PersonalProfile.ts +++ b/src/vdxf/classes/PersonalProfile.ts @@ -10,8 +10,9 @@ const { BufferReader, BufferWriter } = bufferutils; export class DataCategory { data: Array; category: string; + details: string; vdxfid: string; - constructor(data: Array | Array<{vdxfid: string}>, category: string, vdxfid: string) { + constructor(data: Array | Array<{vdxfid: string}>, category: string, vdxfid: string, details: string) { if (data && data[0] instanceof VDXFObject) { this.data = data as Array; } else if (data){ @@ -19,6 +20,7 @@ export class DataCategory { } this.category = category; this.vdxfid = vdxfid; + this.details = details; } } @@ -30,7 +32,8 @@ class PersonalDataCategory extends DataCategory { identitykeys.IDENTITYDATA_DATEOFBIRTH, identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY ], "Personal Details", - identitykeys.IDENTITYDATA_PERSONAL_DETAILS.vdxfid); + identitykeys.IDENTITYDATA_PERSONAL_DETAILS.vdxfid, + "Name, birthday, nationality"); } } @@ -40,7 +43,8 @@ class ContactDataCategory extends DataCategory { identitykeys.IDENTITYDATA_EMAIL, identitykeys.IDENTITYDATA_PHONENUMBER ], "Contact", - identitykeys.IDENTITYDATA_CONTACT.vdxfid); + identitykeys.IDENTITYDATA_CONTACT.vdxfid, + "Email, phone number"); } } @@ -53,14 +57,47 @@ class LocationDataCategory extends DataCategory { identitykeys.IDENTITYDATA_HOMEADDRESS_REGION, identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE ], "Locations", - identitykeys.IDENTITYDATA_LOCATIONS.vdxfid); + identitykeys.IDENTITYDATA_LOCATIONS.vdxfid, + "Tax residency, home address"); + } +} + +class BankingDataCategory extends DataCategory { + constructor() { + super([ + identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1, + identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2, + identitykeys.IDENTITYDATA_HOMEADDRESS_CITY, + identitykeys.IDENTITYDATA_HOMEADDRESS_REGION, + identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE + ], "Banking Information", + identitykeys.IDENTITYDATA_BANKING_INFORMATION.vdxfid, + "Bank accounts"); + } +} + +class DocumentsCategory extends DataCategory { + constructor() { + super([ + identitykeys.IDENTITYDATA_PASSPORT, + identitykeys.IDENTITYDATA_DRIVINGLICENCE, + identitykeys.IDENTITYDATA_RESIDENCEPERMIT, + identitykeys.IDENTITYDATA_RESIDENTCARD, + identitykeys.IDENTITYDATA_VISA, + identitykeys.IDENTITYDATA_IDCARD, + identitykeys.IDENTITYDATA_SELFIECHECK_IMAGE, + ], "Documents", + identitykeys.IDENTITYDATA_DOCUMENTS_AND_IMAGES.vdxfid, + "Passport, ID, driving license"); } } export const defaultPersonalProfileDataTemplate = [ new PersonalDataCategory(), new ContactDataCategory(), - new LocationDataCategory() + new LocationDataCategory(), + new BankingDataCategory(), + new DocumentsCategory() ] export class PersonalProfileDataStore extends VDXFObject { diff --git a/src/vdxf/identityDataKeys.ts b/src/vdxf/identityDataKeys.ts index 55303ae..db09124 100644 --- a/src/vdxf/identityDataKeys.ts +++ b/src/vdxf/identityDataKeys.ts @@ -2457,13 +2457,13 @@ export const IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED: VDXFKeyInterf } export const IDENTITYDATA_NAME: VDXFKeyInterface = { -"vdxfid": "iNtCaMhqbpwGubHkaepi9mhVFg8jPj2Sk4", - "indexid": "xTiK3A8vT99wXmAnSLUs8AE2HL9kKfRmzC", - "hash160result": "272c6f542e769f1006ee6db29be51ddbbaa1e4d4", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.name" - } + "vdxfid": "iNtCaMhqbpwGubHkaepi9mhVFg8jPj2Sk4", + "indexid": "xTiK3A8vT99wXmAnSLUs8AE2HL9kKfRmzC", + "hash160result": "272c6f542e769f1006ee6db29be51ddbbaa1e4d4", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.name" + } } export const IDENTITYDATA_PERSONAL_DETAILS: VDXFKeyInterface = { @@ -2471,8 +2471,8 @@ export const IDENTITYDATA_PERSONAL_DETAILS: VDXFKeyInterface = { "indexid": "xJUXHdgVDhB5Cd9FAJmF1DL4FofD5W44Wa", "hash160result": "78d7089e964a3f6e6ae0233346554555d3e68f6f", "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.personaldetails" + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.personaldetails" } } @@ -2481,9 +2481,9 @@ export const IDENTITYDATA_CONTACT: VDXFKeyInterface = { "indexid": "xU7NwFYLfVp9MMCqFQa6RbX2HYdcGVBu6v", "hash160result": "cef7d037aa9c9342008cc13ea0173610f17341d9", "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.contactdetails" - } + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.contactdetails" + } } export const IDENTITYDATA_LOCATIONS: VDXFKeyInterface = { @@ -2491,8 +2491,8 @@ export const IDENTITYDATA_LOCATIONS: VDXFKeyInterface = { "indexid": "xW4HGSqL5DWpjEtjymtLV9kRj5vaeyFTX7", "hash160result": "e89b7bc01f7fececa737c5451a6889006bb99bee", "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.locationdetails" + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.locationdetails" } } @@ -2501,8 +2501,8 @@ export const IDENTITYDATA_BANKING_INFORMATION: VDXFKeyInterface = { "indexid": "xPDYYKALcdvPvuFz1iRBAh1StntxrcEUeM", "hash160result": "1a79f042ce08168d0dcaf4b1062eb1e3525693a3", "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankingdetails" + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankingdetails" } } @@ -2511,9 +2511,9 @@ export const IDENTITYDATA_DOCUMENTS_AND_IMAGES: VDXFKeyInterface = { "indexid": "xJfaqfAuTc9KQfgLLgQfw3Kg5Yya97dwwF", "hash160result": "b93a86e345efacfa4cdd5ab1a07f41da4371a771", "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documents" - } + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.documents" + } } export const PERSONAL_INFO_OBJECT: VDXFKeyInterface = { @@ -2521,7 +2521,228 @@ export const PERSONAL_INFO_OBJECT: VDXFKeyInterface = { "indexid": "xB1NEQDj5SfxupZpyrQoVQF5PFR5Foqja6", "hash160result": "50b7fa643e4b024ffbcaabd40403d22e1a3ba41d", "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.personalinfo" + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.personalinfo" + } +} + +export const FIAT_CURRENCEY: VDXFKeyInterface = { + "vdxfid": "i8sgE4s24ZZE9ts4MiYbWpng419T8a5yfW", + "indexid": "xDhngsJ6usmtn4k6DQCkVDKD5fATwqdYBr", + "hash160result": "f24235e62affcb4c57faecc6d0e3b3893889393b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.fiatcurrency" + } +} + + +export const BANK_ACCOUNT: VDXFKeyInterface = { + "vdxfid": "i7QCof7PM8unmLKefzRKokd6oHtkRN5NK4", + "indexid": "xCEKGTYUCT8TPWCgXg5Un99dpwumKZ9uek", + "hash160result": "c34f89a8cd8b6a32848632597ea0bd111c4a0f2b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankaccount" + } +} + +export const BANK_ACCOUNT_CURRENCY: VDXFKeyInterface = +{ + "vdxfid": "iJdQpLtdyAgiRfoJstY8utsY5wEQZdM91y", + "indexid": "xPTXH9KipUuP3qgLjaCHtHQ57bFRREieor", + "hash160result": "2d60e910979af52ce62167b5ec5224858a1b38a6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankaccount" + }, + "bounddata": { + "vdxfkey": "i8sgE4s24ZZE9ts4MiYbWpng419T8a5yfW" + } +} + +export const BANK_ACCOUNT_COUNTRY: VDXFKeyInterface = { + "vdxfid": "iLcX5aezEdeeX63ZAk1fzh1qBVc5gr3hyT", + "indexid": "xRSdYP655wsK9Fvb2Rfpy5YND9d6Z9EL9o", + "hash160result": "0939ad4a2dcb7c1030a2f4efd046a818c92bfdbb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankaccount" + }, + "bounddata": { + "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" + } +} + +export const BANK_ACCOUNT_STREET1: VDXFKeyInterface = { + "vdxfid": "iDzy4tzp8CQqG4fh4qwyhjeM1EDgZvauwy", + "indexid": "xJq5XhRtyWdVtEYivXc8g8At2tEhSpargH", + "hash160result": "93a2d4461521cffba345fe384c86561fb5227373", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankaccount" + }, + "bounddata": { + "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + } +} + +export const BANK_ACCOUNT_STREET2: VDXFKeyInterface = +{ + "vdxfid": "iMf5baQkrp6EuacyScGu3vQ7EHt4vSiUsz", + "indexid": "xSVC4Nqqi8JuXkW1JHw42JveFwu5qj1Gkv", + "hash160result": "d3da8b39e046268d93d25d6b9f780950d04571c7", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankaccount" + }, + "bounddata": { + "vdxfkey": "i3h8D5kGtn6DCVCwPFvbypbFCqfzAhXiD2" + } +} + +export const BANK_ACCOUNT_CITY: VDXFKeyInterface = { + "vdxfid": "iBgQ4ev7sBd1FodofzgyfEriHWQw6phnwm", + "indexid": "xGWWXTMCiVqfsyWqXgM8ddPFKARx1ok9eq", + "hash160result": "aad5a1798ce03abfbe5166989f9bade19fd8ff59", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankaccount" + }, + "bounddata": { + "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + } +} + +export const BANK_ACCOUNT_REGION: VDXFKeyInterface = { + "vdxfid": "iE2HNu3NkhUpFanwjq7z3K14pSKCVh2Yku", + "indexid": "xJrPqhUTc1hUskfybWn91hXbr6LDLwguv5", + "hash160result": "f8b4b7681f399f4ce6f77b16a3034cd014d6b273", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankaccount" + }, + "bounddata": { + "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" + } +} + +export const BANK_ACCOUNT_POSTALCODE: VDXFKeyInterface = { + "vdxfid": "iEnvTt4zt1iXttDpDCcqvfNYhbReBSeGoa", + "indexid": "xKd2vgW5jKwCX46r4tGzu3u5jFSf33Qv7t", + "hash160result": "23439436b34068051f5dfdaf133ae7ada918247c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankaccount" + }, + "bounddata": { + "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" + } +} + +export const BANK_ACCOUNT_TAXNUMBER: VDXFKeyInterface = { + "vdxfid": "iLZMhFEyg2BysiG8eQabdeGYLpNRzWUvVG", + "indexid": "xRPUA3g4XLQeVt9AW6Ekc2o5NUPSxw2wvq", + "hash160result": "fa32239bcdc55780096b55ce3e7ae9ddc01664bb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.taxnumber" + } +} + +export const BANK_ACCOUNT_TAXCOUNTRY: VDXFKeyInterface = { + "vdxfid": "iNfhYoUGzruHxihV5dYSYnsruD4STZaKvF", + "indexid": "xTVp1buMrB7xataWwKCbXBQPvs5TN85VEX", + "hash160result": "c0728dd8a0644b69a990c7cddc133a8aeb6887d2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.taxcountry" + } +} + +export const BANK_ACCOUNT_FIRSTNAME: VDXFKeyInterface = +{ + "vdxfid": "iLaKzdEJgoztyM5f9YnLoGBPQYpq3d6FxF", + "indexid": "xRQSTRfPY8DZbWxh1ESVmehvSCqqw8EGSr", + "hash160result": "25041a54186ca5d8c277e7a1a498c33fe01593bb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankaccount" + }, + "bounddata": { + "vdxfkey": "i4GqsotHGa4czCdtg2d8FVHKfJFzVyBPrM" + } +} + +export const BANK_ACCOUNT_LASTNAME: VDXFKeyInterface = { + "vdxfid": "iR2fNBYnQDAgfU2BxvC7c4CJQPRY7LXAzm", + "indexid": "xVrmpyysFXPMHduDpbrGaSiqS3SYznwXmR", + "hash160result": "c4b8f6772ae63a6265c814ebf1637f6902936eec", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankaccount" + }, + "bounddata": { + "vdxfkey": "iHybTrNB1kXRrjsCtJXd6fvBKxepqMpS5Z" + } +} + +export const BANK_ACCOUNT_PHONENUMBER: VDXFKeyInterface = +{ + "vdxfid": "iNNkwqvht83J1HZyopGaqVXKMAzTQkj9zM", + "indexid": "xTCsQeMnjSFxdTT1fVvjot3rNq1UHrb19r", + "hash160result": "95d0bc46ca38214dcca8220507da3295a52c53cf", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankaccount" + }, + "bounddata": { + "vdxfkey": "i9ZQ5degEh3wQg5vNm8Tod88bcJBrLs5p3" } } + +export const ACCOUNT_NUMBER: VDXFKeyInterface = { + "vdxfid": "iS6TbNSaquK5uDZemFF9DLP6K6ZciN6TBd", + "indexid": "xWva4AsfhDXkXPSgcvuJBiudLkadg3ZHt5", + "hash160result": "8b15e73e57238a3dc6bcb31b368328495e891ef8", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.accountnumber" + } +} +export const ACCOUNT_TYPE: VDXFKeyInterface = { + "vdxfid": "iNdRtUasuiojMC2sw35Nbs4W6hq7o8bWqY", + "indexid": "xTTYMH1xm32PyMuunijXaFb38Mr8ipmsky", + "hash160result": "b1d14abf13ce26753676953ec88c00ad448119d2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.accounttype" + } +} + +export const BANK_ACCOUNT_NUMBER: VDXFKeyInterface = { + "vdxfid": "i64P8QWcucELMgrq1uxY7uKCq3eymRcwaQ", + "indexid": "xAtVbCwhkvSzyrjrsbch6Hqjrhfzdz82YM", + "hash160result": "240b1dd30e88528bc9307d3158ccb5fb3d76571c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankaccount" + }, + "bounddata": { + "vdxfkey": "iS6TbNSaquK5uDZemFF9DLP6K6ZciN6TBd" + } +} + +export const BANK_ACCOUNT_TYPE: VDXFKeyInterface = { + "vdxfid": "iLMsPy8GhsGSNDzXDpZ8SEcymJfgGrLUVj", + "indexid": "xRByrmZMZBV6zPsZ5WDHQd9Wnxgh8bD1RJ", + "hash160result": "faf99925bc81dc052b9deb8c3321965633e437b9", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.bankaccount" + }, + "bounddata": { + "vdxfkey": "iNdRtUasuiojMC2sw35Nbs4W6hq7o8bWqY" + } +} + From 9453bf9b9f3fe0658417169821e2726fd67b9c0a Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Thu, 14 Mar 2024 11:06:49 +0000 Subject: [PATCH 077/120] Key Updates --- dist/vdxf/classes/PersonalProfile.js | 26 +++++++++++++++++++------- dist/vdxf/identityDataKeys.d.ts | 2 ++ dist/vdxf/identityDataKeys.js | 28 +++++++++++++++++++++++----- src/vdxf/classes/PersonalProfile.ts | 26 +++++++++++++++++++------- src/vdxf/identityDataKeys.ts | 21 +++++++++++++++++++++ 5 files changed, 84 insertions(+), 19 deletions(-) diff --git a/dist/vdxf/classes/PersonalProfile.js b/dist/vdxf/classes/PersonalProfile.js index c6169de..5f309cb 100644 --- a/dist/vdxf/classes/PersonalProfile.js +++ b/dist/vdxf/classes/PersonalProfile.js @@ -28,8 +28,9 @@ class PersonalDataCategory extends DataCategory { super([ identitykeys.IDENTITYDATA_FIRSTNAME, identitykeys.IDENTITYDATA_LASTNAME, + identitykeys.IDENTITYDATA_MIDDLENAME, identitykeys.IDENTITYDATA_DATEOFBIRTH, - identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY + identitykeys.IDENTITYDATA_NATIONALITY ], "Personal Details", identitykeys.IDENTITYDATA_PERSONAL_DETAILS.vdxfid, "Name, birthday, nationality"); } } @@ -48,18 +49,29 @@ class LocationDataCategory extends DataCategory { identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2, identitykeys.IDENTITYDATA_HOMEADDRESS_CITY, identitykeys.IDENTITYDATA_HOMEADDRESS_REGION, - identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE + identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE, + identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY, ], "Locations", identitykeys.IDENTITYDATA_LOCATIONS.vdxfid, "Tax residency, home address"); } } class BankingDataCategory extends DataCategory { constructor() { super([ - identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1, - identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2, - identitykeys.IDENTITYDATA_HOMEADDRESS_CITY, - identitykeys.IDENTITYDATA_HOMEADDRESS_REGION, - identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE + identitykeys.BANK_ACCOUNT, + identitykeys.BANK_ACCOUNT_CURRENCY, + identitykeys.BANK_ACCOUNT_COUNTRY, + identitykeys.BANK_ACCOUNT_STREET1, + identitykeys.BANK_ACCOUNT_STREET2, + identitykeys.BANK_ACCOUNT_CITY, + identitykeys.BANK_ACCOUNT_REGION, + identitykeys.BANK_ACCOUNT_POSTALCODE, + identitykeys.BANK_ACCOUNT_TAXNUMBER, + identitykeys.BANK_ACCOUNT_TAXCOUNTRY, + identitykeys.BANK_ACCOUNT_FIRSTNAME, + identitykeys.BANK_ACCOUNT_LASTNAME, + identitykeys.BANK_ACCOUNT_PHONENUMBER, + identitykeys.BANK_ACCOUNT_NUMBER, + identitykeys.BANK_ACCOUNT_TYPE ], "Banking Information", identitykeys.IDENTITYDATA_BANKING_INFORMATION.vdxfid, "Bank accounts"); } } diff --git a/dist/vdxf/identityDataKeys.d.ts b/dist/vdxf/identityDataKeys.d.ts index ef13e37..cb93137 100644 --- a/dist/vdxf/identityDataKeys.d.ts +++ b/dist/vdxf/identityDataKeys.d.ts @@ -17,6 +17,7 @@ export declare const IDENTITYDATA_OVER25: VDXFKeyInterface; export declare const IDENTITYDATA_IPADDRESS: VDXFKeyInterface; export declare const IDENTITYDATA_EMAIL: VDXFKeyInterface; export declare const IDENTITYDATA_FIRSTNAME: VDXFKeyInterface; +export declare const IDENTITYDATA_MIDDLENAME: VDXFKeyInterface; export declare const IDENTITYDATA_LASTNAME: VDXFKeyInterface; export declare const IDENTITYDATA_HOMEADDRESS: VDXFKeyInterface; export declare const IDENTITYDATA_HOMEADDRESS_STREET1: VDXFKeyInterface; @@ -204,6 +205,7 @@ export declare const IDENTITYDATA_ADDRESS_CITY: VDXFKeyInterface; export declare const IDENTITYDATA_ADDRESS_REGION: VDXFKeyInterface; export declare const IDENTITYDATA_ADDRESS_POSTCODE: VDXFKeyInterface; export declare const IDENTITYDATA_ADDRESS_COUNTRY: VDXFKeyInterface; +export declare const IDENTITYDATA_NATIONALITY: VDXFKeyInterface; export declare const IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED: VDXFKeyInterface; export declare const IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED: VDXFKeyInterface; export declare const IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED: VDXFKeyInterface; diff --git a/dist/vdxf/identityDataKeys.js b/dist/vdxf/identityDataKeys.js index 411fc15..592c8b2 100644 --- a/dist/vdxf/identityDataKeys.js +++ b/dist/vdxf/identityDataKeys.js @@ -1,10 +1,10 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.IDENTITYDATA_DRIVINGLICENCE_STREET1 = exports.IDENTITYDATA_DRIVINGLICENCE_ADDRESS = exports.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH = exports.IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION = exports.IDENTITYDATA_DRIVINGLICENCE_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_DRIVINGLICENCE_EXPIRATIONDATE = exports.IDENTITYDATA_DRIVINGLICENCE_CATEGORY = exports.IDENTITYDATA_DRIVINGLICENCE_IDNUMBER = exports.IDENTITYDATA_DRIVINGLICENCE_FACE = exports.IDENTITYDATA_DRIVINGLICENCE_CROPPED_BACK = exports.IDENTITYDATA_DRIVINGLICENCE_CROPPED_FRONT = exports.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_BACK = exports.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_FRONT = exports.IDENTITYDATA_DRIVINGLICENCE = exports.IDENTITYDATA_APPROVALS_RISKCHECKOK = exports.IDENTITYDATA_APPROVALS_WATCHLIST_OK = exports.IDENTITYDATA_APPROVALS_SELFIECHECKED = exports.IDENTITYDATA_APPROVALS_DOCUMENTSVERIFIED = exports.IDENTITYDATA_APPROVALS_KYCCHECKED = exports.IDENTITYDATA_APPROVALS_VERIFIEDSMS = exports.IDENTITYDATA_APPROVALS_ACCEPTEDTOS = exports.IDENTITYDATA_STATUS = exports.IDENTITYDATA_IDNUMBER_TYPE = exports.IDENTITYDATA_IDNUMBER_VALUE = exports.IDENTITYDATA_HOMEADDRESS_COUNTRY = exports.IDENTITYDATA_HOMEADDRESS_POSTCODE = exports.IDENTITYDATA_HOMEADDRESS_REGION = exports.IDENTITYDATA_HOMEADDRESS_CITY = exports.IDENTITYDATA_HOMEADDRESS_STREET2 = exports.IDENTITYDATA_HOMEADDRESS_STREET1 = exports.IDENTITYDATA_HOMEADDRESS = exports.IDENTITYDATA_LASTNAME = exports.IDENTITYDATA_FIRSTNAME = exports.IDENTITYDATA_EMAIL = exports.IDENTITYDATA_IPADDRESS = exports.IDENTITYDATA_OVER25 = exports.IDENTITYDATA_OVER21 = exports.IDENTITYDATA_OVER18 = exports.IDENTITYDATA_DATEOFBIRTH = exports.IDENTITYDATA_PHONENUMBER = exports.IDENTITYDATA_TEMPLATEVERSION = exports.IDENTITYDATA_TEMPLATEID = exports.IDENTITYDATA_SHAREABLEURL = exports.IDENTITYDATA_PREVIOUSATTEMPTID = exports.IDENTITYDATA_COMPLETEDAT = exports.IDENTITYDATA_CREATEDAT = exports.IDENTITYDATA_USERID = exports.IDENTITYDATA_ID = exports.IDENTITYDATA_IDENTITY = exports.IDENTITYDATA_ATTESTOR = void 0; -exports.IDENTITYDATA_IDCARD_ADDRESS_COUNTRY = exports.IDENTITYDATA_IDCARD_ADDRESS_POSTCODE = exports.IDENTITYDATA_IDCARD_ADDRESS_REGION = exports.IDENTITYDATA_IDCARD_ADDRESS_CITY = exports.IDENTITYDATA_IDCARD_ADDRESS_STREET1 = exports.IDENTITYDATA_IDCARD_ADDRESS = exports.IDENTITYDATA_IDCARD_DATEOFBIRTH = exports.IDENTITYDATA_IDCARD_ISSUING_REGION = exports.IDENTITYDATA_IDCARD_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_IDCARD_EXPIRATIONDATE = exports.IDENTITYDATA_IDCARD_CATEGORY = exports.IDENTITYDATA_IDCARD_IDNUMBER = exports.IDENTITYDATA_IDCARD_FACE = exports.IDENTITYDATA_IDCARD_CROPPED_BACK = exports.IDENTITYDATA_IDCARD_CROPPED_FRONT = exports.IDENTITYDATA_IDCARD_ORIGINAL_BACK = exports.IDENTITYDATA_IDCARD_ORIGINAL_FRONT = exports.IDENTITYDATA_IDCARD = exports.IDENTITYDATA_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS = exports.IDENTITYDATA_EMAIL_DOMAIN_DISPOSABLE = exports.IDENTITYDATA_EMAIL_DOMAIN_CUSTOM = exports.IDENTITYDATA_EMAIL_DOMAIN_FREEPROVIDER = exports.IDENTITYDATA_EMAIL_DOMAIN_REGISTEREDAT = exports.IDENTITYDATA_EMAIL_LASTBREACHEDAT = exports.IDENTITYDATA_EMAIL_FIRSTBREACHEDAT = exports.IDENTITYDATA_EMAIL_BREACHCOUNT = exports.IDENTITYDATA_EMAIL_ISDELIVERABLE = exports.IDENTITYDATA_RISKCHECK_BOTNOTDETECTED = exports.IDENTITYDATA_RISKCHECK_FRAUDRINGOK = exports.IDENTITYDATA_RISKCHECK_USERINTERACTIONS = exports.IDENTITYDATA_RISKCHECK_STATUS = exports.IDENTITYDATA_KYC_AREACODE_MATCHED = exports.IDENTITYDATA_KYC_PHONENUMBER_MATCHED = exports.IDENTITYDATA_KYC_IDNUMBER_MATCHED = exports.IDENTITYDATA_KYC_DATEOFBIRTH_MATCHED = exports.IDENTITYDATA_KYC_NAME_MATCHED = exports.IDENTITYDATA_KYC_TYPE = exports.IDENTITYDATA_KYC_ADDRESS_MATCHED = exports.IDENTITYDATA_KYC_SUCCESS = exports.IDENTITYDATA_SELFIECHECK_DRIVINGLICENCE_MATCH = exports.IDENTITYDATA_SELFIECHECK_VIDEO = exports.IDENTITYDATA_SELFIECHECK_IMAGE = exports.IDENTITYDATA_SELFIECHECK_SUCCESS = exports.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH_MATCHED = exports.IDENTITYDATA_DRIVINGLICENCE_NAME_MATCHED = exports.IDENTITYDATA_DRIVINGLICENCE_MATCHED = exports.IDENTITYDATA_DRIVINGLICENCE_COUNTRY = exports.IDENTITYDATA_DRIVINGLICENCE_POSTCODE = exports.IDENTITYDATA_DRIVINGLICENCE_REGION = exports.IDENTITYDATA_DRIVINGLICENCE_CITY = void 0; -exports.IDENTITYDATA_RESIDENTCARD_CROPPED_BACK = exports.IDENTITYDATA_RESIDENTCARD_CROPPED_FRONT = exports.IDENTITYDATA_RESIDENTCARD_ORIGINAL_BACK = exports.IDENTITYDATA_RESIDENTCARD_ORIGINAL_FRONT = exports.IDENTITYDATA_RESIDENTCARD = exports.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_RESIDENCEPERMIT_NAME_MATCHED = exports.IDENTITYDATA_RESIDENCEPERMIT_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_COUNTRY = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_POSTCODE = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_REGION = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_CITY = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_STREET1 = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS = exports.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTH = exports.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_REGION = exports.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_RESIDENCEPERMIT_EXPIRATIONDATE = exports.IDENTITYDATA_RESIDENCEPERMIT_CATEGORY = exports.IDENTITYDATA_RESIDENCEPERMIT_IDNUMBER = exports.IDENTITYDATA_RESIDENCEPERMIT_FACE = exports.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_BACK = exports.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_FRONT = exports.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_BACK = exports.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_FRONT = exports.IDENTITYDATA_RESIDENCEPERMIT = exports.IDENTITYDATA_PASSPORT_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_PASSPORT_NAME_MATCHED = exports.IDENTITYDATA_PASSPORT_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_PASSPORT_ADDRESS_COUNTRY = exports.IDENTITYDATA_PASSPORT_ADDRESS_POSTCODE = exports.IDENTITYDATA_PASSPORT_ADDRESS_REGION = exports.IDENTITYDATA_PASSPORT_ADDRESS_CITY = exports.IDENTITYDATA_PASSPORT_ADDRESS_STREET1 = exports.IDENTITYDATA_PASSPORT_ADDRESS = exports.IDENTITYDATA_PASSPORT_DATEOFBIRTH = exports.IDENTITYDATA_PASSPORT_ISSUING_REGION = exports.IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_PASSPORT_EXPIRATIONDATE = exports.IDENTITYDATA_PASSPORT_CATEGORY = exports.IDENTITYDATA_PASSPORT_IDNUMBER = exports.IDENTITYDATA_PASSPORT_FACE = exports.IDENTITYDATA_PASSPORT_CROPPED_BACK = exports.IDENTITYDATA_PASSPORT_CROPPED_FRONT = exports.IDENTITYDATA_PASSPORT_ORIGINAL_BACK = exports.IDENTITYDATA_PASSPORT_ORIGINAL_FRONT = exports.IDENTITYDATA_PASSPORT = exports.IDENTITYDATA_IDCARD_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_IDCARD_NAME_MATCHED = exports.IDENTITYDATA_IDCARD_DOCUMENTVERIFICATION_MATCHED = void 0; -exports.IDENTITYDATA_ADDRESS_STREET1 = exports.IDENTITYDATA_DOCUMENTVERIFICATION_ADDRESS = exports.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTH = exports.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUING_REGION = exports.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY = exports.IDENTITYDATA_DOCUMENTVERIFICATION_EXPIRATIONDATE = exports.IDENTITYDATA_DOCUMENTVERIFICATION_CATEGORY = exports.IDENTITYDATA_DOCUMENTVERIFICATION_IDNUMBER = exports.IDENTITYDATA_DOCUMENTVERIFICATION_FACE = exports.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDBACK = exports.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDFRONT = exports.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALBACK = exports.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALFRONT = exports.IDENTITYDATA_VISA_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_VISA_NAME_MATCHED = exports.IDENTITYDATA_VISA_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_VISA_ADDRESS_COUNTRY = exports.IDENTITYDATA_VISA_ADDRESS_POSTCODE = exports.IDENTITYDATA_VISA_ADDRESS_REGION = exports.IDENTITYDATA_VISA_ADDRESS_CITY = exports.IDENTITYDATA_VISA_ADDRESS_STREET1 = exports.IDENTITYDATA_VISA_ADDRESS = exports.IDENTITYDATA_VISA_DATEOFBIRTH = exports.IDENTITYDATA_VISA_ISSUING_REGION = exports.IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_VISA_EXPIRATIONDATE = exports.IDENTITYDATA_VISA_CATEGORY = exports.IDENTITYDATA_VISA_IDNUMBER = exports.IDENTITYDATA_VISA_FACE = exports.IDENTITYDATA_VISA_CROPPED_BACK = exports.IDENTITYDATA_VISA_CROPPED_FRONT = exports.IDENTITYDATA_VISA_ORIGINAL_BACK = exports.IDENTITYDATA_VISA_ORIGINAL_FRONT = exports.IDENTITYDATA_VISA = exports.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_RESIDENTCARD_NAME_MATCHED = exports.IDENTITYDATA_RESIDENTCARD_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_COUNTRY = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_POSTCODE = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_REGION = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_CITY = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_STREET1 = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS = exports.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTH = exports.IDENTITYDATA_RESIDENTCARD_ISSUING_REGION = exports.IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_RESIDENTCARD_EXPIRATIONDATE = exports.IDENTITYDATA_RESIDENTCARD_CATEGORY = exports.IDENTITYDATA_RESIDENTCARD_IDNUMBER = exports.IDENTITYDATA_RESIDENTCARD_FACE = void 0; -exports.BANK_ACCOUNT_TYPE = exports.BANK_ACCOUNT_NUMBER = exports.ACCOUNT_TYPE = exports.ACCOUNT_NUMBER = exports.BANK_ACCOUNT_PHONENUMBER = exports.BANK_ACCOUNT_LASTNAME = exports.BANK_ACCOUNT_FIRSTNAME = exports.BANK_ACCOUNT_TAXCOUNTRY = exports.BANK_ACCOUNT_TAXNUMBER = exports.BANK_ACCOUNT_POSTALCODE = exports.BANK_ACCOUNT_REGION = exports.BANK_ACCOUNT_CITY = exports.BANK_ACCOUNT_STREET2 = exports.BANK_ACCOUNT_STREET1 = exports.BANK_ACCOUNT_COUNTRY = exports.BANK_ACCOUNT_CURRENCY = exports.BANK_ACCOUNT = exports.FIAT_CURRENCEY = exports.PERSONAL_INFO_OBJECT = exports.IDENTITYDATA_DOCUMENTS_AND_IMAGES = exports.IDENTITYDATA_BANKING_INFORMATION = exports.IDENTITYDATA_LOCATIONS = exports.IDENTITYDATA_CONTACT = exports.IDENTITYDATA_PERSONAL_DETAILS = exports.IDENTITYDATA_NAME = exports.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED = exports.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_ADDRESS_COUNTRY = exports.IDENTITYDATA_ADDRESS_POSTCODE = exports.IDENTITYDATA_ADDRESS_REGION = exports.IDENTITYDATA_ADDRESS_CITY = exports.IDENTITYDATA_ADDRESS_STREET2 = void 0; +exports.IDENTITYDATA_DRIVINGLICENCE_ADDRESS = exports.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH = exports.IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION = exports.IDENTITYDATA_DRIVINGLICENCE_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_DRIVINGLICENCE_EXPIRATIONDATE = exports.IDENTITYDATA_DRIVINGLICENCE_CATEGORY = exports.IDENTITYDATA_DRIVINGLICENCE_IDNUMBER = exports.IDENTITYDATA_DRIVINGLICENCE_FACE = exports.IDENTITYDATA_DRIVINGLICENCE_CROPPED_BACK = exports.IDENTITYDATA_DRIVINGLICENCE_CROPPED_FRONT = exports.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_BACK = exports.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_FRONT = exports.IDENTITYDATA_DRIVINGLICENCE = exports.IDENTITYDATA_APPROVALS_RISKCHECKOK = exports.IDENTITYDATA_APPROVALS_WATCHLIST_OK = exports.IDENTITYDATA_APPROVALS_SELFIECHECKED = exports.IDENTITYDATA_APPROVALS_DOCUMENTSVERIFIED = exports.IDENTITYDATA_APPROVALS_KYCCHECKED = exports.IDENTITYDATA_APPROVALS_VERIFIEDSMS = exports.IDENTITYDATA_APPROVALS_ACCEPTEDTOS = exports.IDENTITYDATA_STATUS = exports.IDENTITYDATA_IDNUMBER_TYPE = exports.IDENTITYDATA_IDNUMBER_VALUE = exports.IDENTITYDATA_HOMEADDRESS_COUNTRY = exports.IDENTITYDATA_HOMEADDRESS_POSTCODE = exports.IDENTITYDATA_HOMEADDRESS_REGION = exports.IDENTITYDATA_HOMEADDRESS_CITY = exports.IDENTITYDATA_HOMEADDRESS_STREET2 = exports.IDENTITYDATA_HOMEADDRESS_STREET1 = exports.IDENTITYDATA_HOMEADDRESS = exports.IDENTITYDATA_LASTNAME = exports.IDENTITYDATA_MIDDLENAME = exports.IDENTITYDATA_FIRSTNAME = exports.IDENTITYDATA_EMAIL = exports.IDENTITYDATA_IPADDRESS = exports.IDENTITYDATA_OVER25 = exports.IDENTITYDATA_OVER21 = exports.IDENTITYDATA_OVER18 = exports.IDENTITYDATA_DATEOFBIRTH = exports.IDENTITYDATA_PHONENUMBER = exports.IDENTITYDATA_TEMPLATEVERSION = exports.IDENTITYDATA_TEMPLATEID = exports.IDENTITYDATA_SHAREABLEURL = exports.IDENTITYDATA_PREVIOUSATTEMPTID = exports.IDENTITYDATA_COMPLETEDAT = exports.IDENTITYDATA_CREATEDAT = exports.IDENTITYDATA_USERID = exports.IDENTITYDATA_ID = exports.IDENTITYDATA_IDENTITY = exports.IDENTITYDATA_ATTESTOR = void 0; +exports.IDENTITYDATA_IDCARD_ADDRESS_POSTCODE = exports.IDENTITYDATA_IDCARD_ADDRESS_REGION = exports.IDENTITYDATA_IDCARD_ADDRESS_CITY = exports.IDENTITYDATA_IDCARD_ADDRESS_STREET1 = exports.IDENTITYDATA_IDCARD_ADDRESS = exports.IDENTITYDATA_IDCARD_DATEOFBIRTH = exports.IDENTITYDATA_IDCARD_ISSUING_REGION = exports.IDENTITYDATA_IDCARD_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_IDCARD_EXPIRATIONDATE = exports.IDENTITYDATA_IDCARD_CATEGORY = exports.IDENTITYDATA_IDCARD_IDNUMBER = exports.IDENTITYDATA_IDCARD_FACE = exports.IDENTITYDATA_IDCARD_CROPPED_BACK = exports.IDENTITYDATA_IDCARD_CROPPED_FRONT = exports.IDENTITYDATA_IDCARD_ORIGINAL_BACK = exports.IDENTITYDATA_IDCARD_ORIGINAL_FRONT = exports.IDENTITYDATA_IDCARD = exports.IDENTITYDATA_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS = exports.IDENTITYDATA_EMAIL_DOMAIN_DISPOSABLE = exports.IDENTITYDATA_EMAIL_DOMAIN_CUSTOM = exports.IDENTITYDATA_EMAIL_DOMAIN_FREEPROVIDER = exports.IDENTITYDATA_EMAIL_DOMAIN_REGISTEREDAT = exports.IDENTITYDATA_EMAIL_LASTBREACHEDAT = exports.IDENTITYDATA_EMAIL_FIRSTBREACHEDAT = exports.IDENTITYDATA_EMAIL_BREACHCOUNT = exports.IDENTITYDATA_EMAIL_ISDELIVERABLE = exports.IDENTITYDATA_RISKCHECK_BOTNOTDETECTED = exports.IDENTITYDATA_RISKCHECK_FRAUDRINGOK = exports.IDENTITYDATA_RISKCHECK_USERINTERACTIONS = exports.IDENTITYDATA_RISKCHECK_STATUS = exports.IDENTITYDATA_KYC_AREACODE_MATCHED = exports.IDENTITYDATA_KYC_PHONENUMBER_MATCHED = exports.IDENTITYDATA_KYC_IDNUMBER_MATCHED = exports.IDENTITYDATA_KYC_DATEOFBIRTH_MATCHED = exports.IDENTITYDATA_KYC_NAME_MATCHED = exports.IDENTITYDATA_KYC_TYPE = exports.IDENTITYDATA_KYC_ADDRESS_MATCHED = exports.IDENTITYDATA_KYC_SUCCESS = exports.IDENTITYDATA_SELFIECHECK_DRIVINGLICENCE_MATCH = exports.IDENTITYDATA_SELFIECHECK_VIDEO = exports.IDENTITYDATA_SELFIECHECK_IMAGE = exports.IDENTITYDATA_SELFIECHECK_SUCCESS = exports.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH_MATCHED = exports.IDENTITYDATA_DRIVINGLICENCE_NAME_MATCHED = exports.IDENTITYDATA_DRIVINGLICENCE_MATCHED = exports.IDENTITYDATA_DRIVINGLICENCE_COUNTRY = exports.IDENTITYDATA_DRIVINGLICENCE_POSTCODE = exports.IDENTITYDATA_DRIVINGLICENCE_REGION = exports.IDENTITYDATA_DRIVINGLICENCE_CITY = exports.IDENTITYDATA_DRIVINGLICENCE_STREET1 = void 0; +exports.IDENTITYDATA_RESIDENTCARD_CROPPED_FRONT = exports.IDENTITYDATA_RESIDENTCARD_ORIGINAL_BACK = exports.IDENTITYDATA_RESIDENTCARD_ORIGINAL_FRONT = exports.IDENTITYDATA_RESIDENTCARD = exports.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_RESIDENCEPERMIT_NAME_MATCHED = exports.IDENTITYDATA_RESIDENCEPERMIT_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_COUNTRY = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_POSTCODE = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_REGION = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_CITY = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_STREET1 = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS = exports.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTH = exports.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_REGION = exports.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_RESIDENCEPERMIT_EXPIRATIONDATE = exports.IDENTITYDATA_RESIDENCEPERMIT_CATEGORY = exports.IDENTITYDATA_RESIDENCEPERMIT_IDNUMBER = exports.IDENTITYDATA_RESIDENCEPERMIT_FACE = exports.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_BACK = exports.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_FRONT = exports.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_BACK = exports.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_FRONT = exports.IDENTITYDATA_RESIDENCEPERMIT = exports.IDENTITYDATA_PASSPORT_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_PASSPORT_NAME_MATCHED = exports.IDENTITYDATA_PASSPORT_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_PASSPORT_ADDRESS_COUNTRY = exports.IDENTITYDATA_PASSPORT_ADDRESS_POSTCODE = exports.IDENTITYDATA_PASSPORT_ADDRESS_REGION = exports.IDENTITYDATA_PASSPORT_ADDRESS_CITY = exports.IDENTITYDATA_PASSPORT_ADDRESS_STREET1 = exports.IDENTITYDATA_PASSPORT_ADDRESS = exports.IDENTITYDATA_PASSPORT_DATEOFBIRTH = exports.IDENTITYDATA_PASSPORT_ISSUING_REGION = exports.IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_PASSPORT_EXPIRATIONDATE = exports.IDENTITYDATA_PASSPORT_CATEGORY = exports.IDENTITYDATA_PASSPORT_IDNUMBER = exports.IDENTITYDATA_PASSPORT_FACE = exports.IDENTITYDATA_PASSPORT_CROPPED_BACK = exports.IDENTITYDATA_PASSPORT_CROPPED_FRONT = exports.IDENTITYDATA_PASSPORT_ORIGINAL_BACK = exports.IDENTITYDATA_PASSPORT_ORIGINAL_FRONT = exports.IDENTITYDATA_PASSPORT = exports.IDENTITYDATA_IDCARD_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_IDCARD_NAME_MATCHED = exports.IDENTITYDATA_IDCARD_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_IDCARD_ADDRESS_COUNTRY = void 0; +exports.IDENTITYDATA_DOCUMENTVERIFICATION_ADDRESS = exports.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTH = exports.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUING_REGION = exports.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY = exports.IDENTITYDATA_DOCUMENTVERIFICATION_EXPIRATIONDATE = exports.IDENTITYDATA_DOCUMENTVERIFICATION_CATEGORY = exports.IDENTITYDATA_DOCUMENTVERIFICATION_IDNUMBER = exports.IDENTITYDATA_DOCUMENTVERIFICATION_FACE = exports.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDBACK = exports.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDFRONT = exports.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALBACK = exports.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALFRONT = exports.IDENTITYDATA_VISA_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_VISA_NAME_MATCHED = exports.IDENTITYDATA_VISA_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_VISA_ADDRESS_COUNTRY = exports.IDENTITYDATA_VISA_ADDRESS_POSTCODE = exports.IDENTITYDATA_VISA_ADDRESS_REGION = exports.IDENTITYDATA_VISA_ADDRESS_CITY = exports.IDENTITYDATA_VISA_ADDRESS_STREET1 = exports.IDENTITYDATA_VISA_ADDRESS = exports.IDENTITYDATA_VISA_DATEOFBIRTH = exports.IDENTITYDATA_VISA_ISSUING_REGION = exports.IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_VISA_EXPIRATIONDATE = exports.IDENTITYDATA_VISA_CATEGORY = exports.IDENTITYDATA_VISA_IDNUMBER = exports.IDENTITYDATA_VISA_FACE = exports.IDENTITYDATA_VISA_CROPPED_BACK = exports.IDENTITYDATA_VISA_CROPPED_FRONT = exports.IDENTITYDATA_VISA_ORIGINAL_BACK = exports.IDENTITYDATA_VISA_ORIGINAL_FRONT = exports.IDENTITYDATA_VISA = exports.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_RESIDENTCARD_NAME_MATCHED = exports.IDENTITYDATA_RESIDENTCARD_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_COUNTRY = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_POSTCODE = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_REGION = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_CITY = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_STREET1 = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS = exports.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTH = exports.IDENTITYDATA_RESIDENTCARD_ISSUING_REGION = exports.IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_RESIDENTCARD_EXPIRATIONDATE = exports.IDENTITYDATA_RESIDENTCARD_CATEGORY = exports.IDENTITYDATA_RESIDENTCARD_IDNUMBER = exports.IDENTITYDATA_RESIDENTCARD_FACE = exports.IDENTITYDATA_RESIDENTCARD_CROPPED_BACK = void 0; +exports.BANK_ACCOUNT_TYPE = exports.BANK_ACCOUNT_NUMBER = exports.ACCOUNT_TYPE = exports.ACCOUNT_NUMBER = exports.BANK_ACCOUNT_PHONENUMBER = exports.BANK_ACCOUNT_LASTNAME = exports.BANK_ACCOUNT_FIRSTNAME = exports.BANK_ACCOUNT_TAXCOUNTRY = exports.BANK_ACCOUNT_TAXNUMBER = exports.BANK_ACCOUNT_POSTALCODE = exports.BANK_ACCOUNT_REGION = exports.BANK_ACCOUNT_CITY = exports.BANK_ACCOUNT_STREET2 = exports.BANK_ACCOUNT_STREET1 = exports.BANK_ACCOUNT_COUNTRY = exports.BANK_ACCOUNT_CURRENCY = exports.BANK_ACCOUNT = exports.FIAT_CURRENCEY = exports.PERSONAL_INFO_OBJECT = exports.IDENTITYDATA_DOCUMENTS_AND_IMAGES = exports.IDENTITYDATA_BANKING_INFORMATION = exports.IDENTITYDATA_LOCATIONS = exports.IDENTITYDATA_CONTACT = exports.IDENTITYDATA_PERSONAL_DETAILS = exports.IDENTITYDATA_NAME = exports.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED = exports.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_NATIONALITY = exports.IDENTITYDATA_ADDRESS_COUNTRY = exports.IDENTITYDATA_ADDRESS_POSTCODE = exports.IDENTITYDATA_ADDRESS_REGION = exports.IDENTITYDATA_ADDRESS_CITY = exports.IDENTITYDATA_ADDRESS_STREET2 = exports.IDENTITYDATA_ADDRESS_STREET1 = void 0; exports.IDENTITYDATA_ATTESTOR = { "vdxfid": "iNe8VaRBRFDhb6xjZ7WHNWgfM73428GN8B", "hash160result": "5e01d5d356d517df57ea0f391c86e11a84663bd2", @@ -165,6 +165,15 @@ exports.IDENTITYDATA_FIRSTNAME = { "name": "vrsc::identitydata.firstname" } }; +exports.IDENTITYDATA_MIDDLENAME = { + "vdxfid": "iB8d3HBPEr3tsxsNoCGxDwfr9teVwugeyK", + "indexid": "xFxjW5cU6AGZW8kQesw7CLCPBYfWtK6d9G", + "hash160result": "2044d9008acd28b1795ff04788289d24135efd53", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.middlename" + } +}; exports.IDENTITYDATA_LASTNAME = { "vdxfid": "iHybTrNB1kXRrjsCtJXd6fvBKxepqMpS5Z", "indexid": "xNohveoFs4k6UukEjzBn54SiMcfqhV66Vg", @@ -2226,6 +2235,15 @@ exports.IDENTITYDATA_ADDRESS_COUNTRY = { "name": "vrsc::identitydata.address.country" } }; +exports.IDENTITYDATA_NATIONALITY = { + "vdxfid": "iDKfQZ4c568VzuikNenCNKffhx3f5pMNvi", + "indexid": "xJ9msMVgvQMAd5bnELSMLiCCjc4g2ZP2rB", + "hash160result": "a44ddb762301e0b405741f9b50dae55a9a2b046c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.nationality" + } +}; exports.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED = { "vdxfid": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk", "indexid": "xPJ2puxZGpXvCmcBkgaaHMJ9vGBNfo83vX", diff --git a/src/vdxf/classes/PersonalProfile.ts b/src/vdxf/classes/PersonalProfile.ts index cb3dce3..4556156 100644 --- a/src/vdxf/classes/PersonalProfile.ts +++ b/src/vdxf/classes/PersonalProfile.ts @@ -29,8 +29,9 @@ class PersonalDataCategory extends DataCategory { super([ identitykeys.IDENTITYDATA_FIRSTNAME, identitykeys.IDENTITYDATA_LASTNAME, + identitykeys.IDENTITYDATA_MIDDLENAME, identitykeys.IDENTITYDATA_DATEOFBIRTH, - identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY + identitykeys.IDENTITYDATA_NATIONALITY ], "Personal Details", identitykeys.IDENTITYDATA_PERSONAL_DETAILS.vdxfid, "Name, birthday, nationality"); @@ -55,7 +56,8 @@ class LocationDataCategory extends DataCategory { identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2, identitykeys.IDENTITYDATA_HOMEADDRESS_CITY, identitykeys.IDENTITYDATA_HOMEADDRESS_REGION, - identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE + identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE, + identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY, ], "Locations", identitykeys.IDENTITYDATA_LOCATIONS.vdxfid, "Tax residency, home address"); @@ -65,11 +67,21 @@ class LocationDataCategory extends DataCategory { class BankingDataCategory extends DataCategory { constructor() { super([ - identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1, - identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2, - identitykeys.IDENTITYDATA_HOMEADDRESS_CITY, - identitykeys.IDENTITYDATA_HOMEADDRESS_REGION, - identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE + identitykeys.BANK_ACCOUNT, + identitykeys.BANK_ACCOUNT_CURRENCY, + identitykeys.BANK_ACCOUNT_COUNTRY, + identitykeys.BANK_ACCOUNT_STREET1, + identitykeys.BANK_ACCOUNT_STREET2, + identitykeys.BANK_ACCOUNT_CITY, + identitykeys.BANK_ACCOUNT_REGION, + identitykeys.BANK_ACCOUNT_POSTALCODE, + identitykeys.BANK_ACCOUNT_TAXNUMBER, + identitykeys.BANK_ACCOUNT_TAXCOUNTRY, + identitykeys.BANK_ACCOUNT_FIRSTNAME, + identitykeys.BANK_ACCOUNT_LASTNAME, + identitykeys.BANK_ACCOUNT_PHONENUMBER, + identitykeys.BANK_ACCOUNT_NUMBER, + identitykeys.BANK_ACCOUNT_TYPE ], "Banking Information", identitykeys.IDENTITYDATA_BANKING_INFORMATION.vdxfid, "Bank accounts"); diff --git a/src/vdxf/identityDataKeys.ts b/src/vdxf/identityDataKeys.ts index db09124..3272d2e 100644 --- a/src/vdxf/identityDataKeys.ts +++ b/src/vdxf/identityDataKeys.ts @@ -178,6 +178,16 @@ export const IDENTITYDATA_FIRSTNAME: VDXFKeyInterface = { } } +export const IDENTITYDATA_MIDDLENAME: VDXFKeyInterface = { + "vdxfid": "iB8d3HBPEr3tsxsNoCGxDwfr9teVwugeyK", + "indexid": "xFxjW5cU6AGZW8kQesw7CLCPBYfWtK6d9G", + "hash160result": "2044d9008acd28b1795ff04788289d24135efd53", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.middlename" + } + } + export const IDENTITYDATA_LASTNAME: VDXFKeyInterface = { "vdxfid": "iHybTrNB1kXRrjsCtJXd6fvBKxepqMpS5Z", "indexid": "xNohveoFs4k6UukEjzBn54SiMcfqhV66Vg", @@ -2426,6 +2436,17 @@ export const IDENTITYDATA_ADDRESS_COUNTRY: VDXFKeyInterface = { } } +export const IDENTITYDATA_NATIONALITY: VDXFKeyInterface = { + "vdxfid": "iDKfQZ4c568VzuikNenCNKffhx3f5pMNvi", + "indexid": "xJ9msMVgvQMAd5bnELSMLiCCjc4g2ZP2rB", + "hash160result": "a44ddb762301e0b405741f9b50dae55a9a2b046c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identitydata.nationality" + } +} + + export const IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED: VDXFKeyInterface = { "vdxfid": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk", "indexid": "xPJ2puxZGpXvCmcBkgaaHMJ9vGBNfo83vX", From f7e2614f02ce0412f12eb5626aa3209cee9eddac Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Thu, 21 Mar 2024 15:33:52 +0000 Subject: [PATCH 078/120] Add Category Keynames --- dist/vdxf/classes/IdentityData.js | 2 ++ src/vdxf/classes/IdentityData.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/dist/vdxf/classes/IdentityData.js b/dist/vdxf/classes/IdentityData.js index 0fb4e23..69afc8d 100644 --- a/dist/vdxf/classes/IdentityData.js +++ b/dist/vdxf/classes/IdentityData.js @@ -212,5 +212,7 @@ exports.IdentityVdxfidMap = { [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Document Matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED.vdxfid]: { name: "Name Matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED.vdxfid]: { name: "Date of Birth Matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, + [identitykeys.BANK_ACCOUNT.vdxfid]: { name: "Bank Account", type: 6 /* IdentityDataClassTypes.KEY_ONLY */ }, + [identitykeys.IDENTITYDATA_DOCUMENTS_AND_IMAGES.vdxfid]: { name: "Offical ID Documents", type: 6 /* IdentityDataClassTypes.KEY_ONLY */ }, [keylist.ATTESTATION_TYPE.vdxfid]: { name: "Attestation Type", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, }; diff --git a/src/vdxf/classes/IdentityData.ts b/src/vdxf/classes/IdentityData.ts index f5bebc9..fad681c 100644 --- a/src/vdxf/classes/IdentityData.ts +++ b/src/vdxf/classes/IdentityData.ts @@ -221,6 +221,8 @@ export const IdentityVdxfidMap = { [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Document Matched", type: IdentityDataClassTypes.BOOLEAN }, [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED.vdxfid]: { name: "Name Matched", type: IdentityDataClassTypes.BOOLEAN }, [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED.vdxfid]: { name: "Date of Birth Matched", type: IdentityDataClassTypes.BOOLEAN }, + [identitykeys.BANK_ACCOUNT.vdxfid]: { name: "Bank Account", type: IdentityDataClassTypes.KEY_ONLY }, + [identitykeys.IDENTITYDATA_DOCUMENTS_AND_IMAGES.vdxfid]: { name: "Offical ID Documents", type: IdentityDataClassTypes.KEY_ONLY }, [keylist.ATTESTATION_TYPE.vdxfid]: { name: "Attestation Type", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, }; From 7e7fbdf59f547196203887ba6e41cabd6d26d193 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Fri, 22 Mar 2024 13:17:49 +0000 Subject: [PATCH 079/120] Add attestation receive request --- dist/vdxf/keys.d.ts | 1 + dist/vdxf/keys.js | 11 ++++++++++- dist/vdxf/scopes.d.ts | 2 ++ dist/vdxf/scopes.js | 20 +++++++++++++++++++- src/vdxf/keys.ts | 10 ++++++++++ src/vdxf/scopes.ts | 23 ++++++++++++++++++++++- 6 files changed, 64 insertions(+), 3 deletions(-) diff --git a/dist/vdxf/keys.d.ts b/dist/vdxf/keys.d.ts index 07bf330..1f5159d 100644 --- a/dist/vdxf/keys.d.ts +++ b/dist/vdxf/keys.d.ts @@ -21,6 +21,7 @@ export declare const WALLET_VDXF_KEY: VDXFKeyInterface; export declare const LOGIN_CONSENT_REDIRECT_VDXF_KEY: VDXFKeyInterface; export declare const LOGIN_CONSENT_WEBHOOK_VDXF_KEY: VDXFKeyInterface; export declare const LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY: VDXFKeyInterface; +export declare const LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY: VDXFKeyInterface; export declare const LOGIN_CONSENT_CONTEXT_VDXF_KEY: VDXFKeyInterface; export declare const LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY: VDXFKeyInterface; export declare const ID_ADDRESS_VDXF_KEY: VDXFKeyInterface; diff --git a/dist/vdxf/keys.js b/dist/vdxf/keys.js index c8dc1bd..573494e 100644 --- a/dist/vdxf/keys.js +++ b/dist/vdxf/keys.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.PROFILE_DATA_VIEW_RESPONSE = exports.PROFILE_DATA_VIEW_REQUEST = exports.DATA_TYPE_STRING = exports.ATTESTATION_TYPE = exports.ATTESTATION_VIEW_RESPONSE = exports.ATTESTATION_OBJECT = exports.ATTESTATION_RECIPIENT = exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.IDENTITY_AUTH_SIG_VDXF_KEY = exports.VERUSPAY_INVOICE_VDXF_KEY = void 0; +exports.PROFILE_DATA_VIEW_RESPONSE = exports.PROFILE_DATA_VIEW_REQUEST = exports.DATA_TYPE_STRING = exports.ATTESTATION_TYPE = exports.ATTESTATION_VIEW_RESPONSE = exports.ATTESTATION_OBJECT = exports.ATTESTATION_RECIPIENT = exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.IDENTITY_AUTH_SIG_VDXF_KEY = exports.VERUSPAY_INVOICE_VDXF_KEY = void 0; exports.VERUSPAY_INVOICE_VDXF_KEY = { hash160result: "628efc28c2e2d40050e1a9de7a93e7ddf2aa0076", qualifiedname: { @@ -89,6 +89,15 @@ exports.LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY = { name: "vrsc::identity.attestation.webhook", }, }; +exports.LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY = { + vdxfid: "i8RW9fcZHh1oaAqR2fWWLCB99mfNW6Q2mQ", + indexid: "xDFccU3e91EUCLiStMAfJahgBRgPHfYq74", + hash160result: "fe40712687cd6f9f288e535ced75b653624f4636", + qualifiedname: { + namespace: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + name: "vrsc::identity.identitydata.webhook" + } +}; exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = { vdxfid: "iBMochrKPSQfua5yZYWyd6p4QnREakqU44", hash160result: "3b605d4ace1e19dd0bddb2eef63171b1879a7b56", diff --git a/dist/vdxf/scopes.d.ts b/dist/vdxf/scopes.d.ts index a10d006..0c3ccd4 100644 --- a/dist/vdxf/scopes.d.ts +++ b/dist/vdxf/scopes.d.ts @@ -2,3 +2,5 @@ import { VDXFKeyInterface } from "./keys"; export declare const IDENTITY_VIEW: VDXFKeyInterface; export declare const IDENTITY_AGREEMENT: VDXFKeyInterface; export declare const ATTESTATION_READ_REQUEST: VDXFKeyInterface; +export declare const PROFILE_DATA_READ_REQUEST: VDXFKeyInterface; +export declare const ATTESTATION_RECEIVE_REQUEST: VDXFKeyInterface; diff --git a/dist/vdxf/scopes.js b/dist/vdxf/scopes.js index 55db654..e2f1baa 100644 --- a/dist/vdxf/scopes.js +++ b/dist/vdxf/scopes.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.ATTESTATION_READ_REQUEST = exports.IDENTITY_AGREEMENT = exports.IDENTITY_VIEW = void 0; +exports.ATTESTATION_RECEIVE_REQUEST = exports.PROFILE_DATA_READ_REQUEST = exports.ATTESTATION_READ_REQUEST = exports.IDENTITY_AGREEMENT = exports.IDENTITY_VIEW = void 0; exports.IDENTITY_VIEW = { vdxfid: "iLUrA89mDKnwxZcMiPadfNB9TLp58A2TKU", hash160result: "aeab47faa1b2bde2633a63b8284770a8e5c489ba", @@ -25,3 +25,21 @@ exports.ATTESTATION_READ_REQUEST = { name: "vrsc::identity.attestation.read" } }; +exports.PROFILE_DATA_READ_REQUEST = { + vdxfid: "iFYznrRxyHaoJZ91cFDSYGT4szETf4RLRV", + indexid: "xLP7Fes3pboTvj23TvsbWeybueFUatbQQh", + hash160result: "d3f2168aad438c6c6eab8f3384458cbebf027a84", + qualifiedname: { + namespace: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + name: "vrsc::profile.data.view" + } +}; +exports.ATTESTATION_RECEIVE_REQUEST = { + "vdxfid": "iQxHMa4cGQRMEVFchV7fah2JDqxjcgMAZK", + "indexid": "xVnPpNVh7ie1rf8eZAmpZ5YqFVykaYqC8E", + "hash160result": "b9af87a7313fff9976f29bc6abaffc1674899aeb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.attestation.receive" + } +}; diff --git a/src/vdxf/keys.ts b/src/vdxf/keys.ts index 3211c1c..89072f8 100644 --- a/src/vdxf/keys.ts +++ b/src/vdxf/keys.ts @@ -110,6 +110,16 @@ export const LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY: VDXFKeyInterface = { }, }; +export const LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY: VDXFKeyInterface ={ + vdxfid: "i8RW9fcZHh1oaAqR2fWWLCB99mfNW6Q2mQ", + indexid: "xDFccU3e91EUCLiStMAfJahgBRgPHfYq74", + hash160result: "fe40712687cd6f9f288e535ced75b653624f4636", + qualifiedname: { + namespace: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + name: "vrsc::identity.identitydata.webhook" + } +} + export const LOGIN_CONSENT_CONTEXT_VDXF_KEY: VDXFKeyInterface = { vdxfid: "iBMochrKPSQfua5yZYWyd6p4QnREakqU44", hash160result: "3b605d4ace1e19dd0bddb2eef63171b1879a7b56", diff --git a/src/vdxf/scopes.ts b/src/vdxf/scopes.ts index cb6753f..13fd1dd 100644 --- a/src/vdxf/scopes.ts +++ b/src/vdxf/scopes.ts @@ -25,4 +25,25 @@ export const ATTESTATION_READ_REQUEST: VDXFKeyInterface = { namespace: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", name: "vrsc::identity.attestation.read" } -}; \ No newline at end of file +}; + +export const PROFILE_DATA_READ_REQUEST: VDXFKeyInterface = { + vdxfid: "iFYznrRxyHaoJZ91cFDSYGT4szETf4RLRV", + indexid: "xLP7Fes3pboTvj23TvsbWeybueFUatbQQh", + hash160result: "d3f2168aad438c6c6eab8f3384458cbebf027a84", + qualifiedname: { + namespace: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + name: "vrsc::profile.data.view" + } +} + +export const ATTESTATION_RECEIVE_REQUEST: VDXFKeyInterface = +{ + "vdxfid": "iQxHMa4cGQRMEVFchV7fah2JDqxjcgMAZK", + "indexid": "xVnPpNVh7ie1rf8eZAmpZ5YqFVykaYqC8E", + "hash160result": "b9af87a7313fff9976f29bc6abaffc1674899aeb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.attestation.receive" + } +} From e216bb3890abbd113fe88193f270cad2f1c78ae7 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Mon, 25 Mar 2024 13:58:30 +0000 Subject: [PATCH 080/120] Added extra requested access item --- dist/vdxf/classes/Challenge.js | 5 +++++ src/vdxf/classes/Challenge.ts | 14 ++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index 70d55c1..9ecb78d 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -288,6 +288,11 @@ class RequestedPermission extends __1.VDXFObject { this.data = data; this.encoding = "utf-8"; break; + case __1.LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY.vdxfid: + classType = index_1.BufferDataVdxfObject; + this.data = data; + this.encoding = "utf-8"; + break; default: throw new Error("Invalid vdxfkey"); } diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index 8f7d4dd..23b64a6 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -10,6 +10,7 @@ import { IDENTITY_VIEW, IDENTITY_AGREEMENT, PROFILE_DATA_VIEW_REQUEST, + LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY } from "../"; import bufferutils from "../../utils/bufferutils"; import varuint from "../../utils/varuint"; @@ -447,10 +448,15 @@ export class RequestedPermission extends VDXFObject { this.encoding = "utf-8"; break; case PROFILE_DATA_VIEW_REQUEST.vdxfid: - classType = BufferDataVdxfObject; - this.data = data; - this.encoding = "utf-8"; - break; + classType = BufferDataVdxfObject; + this.data = data; + this.encoding = "utf-8"; + break; + case LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY.vdxfid: + classType = BufferDataVdxfObject; + this.data = data; + this.encoding = "utf-8"; + break; default: throw new Error("Invalid vdxfkey") } From 17c4f8c84551b5741cfbe160d341584fe183afed Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Tue, 26 Mar 2024 11:50:14 +0000 Subject: [PATCH 081/120] Rebuild error fix --- dist/pbaas/Identity.d.ts | 43 --- dist/pbaas/Identity.js | 325 -------------------- dist/vdxf/classes/PersonalData.d.ts | 37 --- dist/vdxf/classes/PersonalData.js | 92 ------ dist/vdxf/classes/attestationData.d.ts | 37 --- dist/vdxf/classes/attestationData.js | 358 ---------------------- dist/vdxf/classes/oidc/OidcChallenge.d.ts | 92 ------ dist/vdxf/classes/oidc/OidcChallenge.js | 41 --- dist/vdxf/classes/oidc/OidcClient.d.ts | 73 ----- dist/vdxf/classes/oidc/OidcClient.js | 55 ---- dist/vdxf/classes/oidc/OidcDecision.d.ts | 52 ---- dist/vdxf/classes/oidc/OidcDecision.js | 40 --- dist/vdxf/classes/oidc/OidcRequest.d.ts | 0 dist/vdxf/classes/oidc/OidcRequest.js | 34 -- 14 files changed, 1279 deletions(-) delete mode 100644 dist/pbaas/Identity.d.ts delete mode 100644 dist/pbaas/Identity.js delete mode 100644 dist/vdxf/classes/PersonalData.d.ts delete mode 100644 dist/vdxf/classes/PersonalData.js delete mode 100644 dist/vdxf/classes/attestationData.d.ts delete mode 100644 dist/vdxf/classes/attestationData.js delete mode 100644 dist/vdxf/classes/oidc/OidcChallenge.d.ts delete mode 100644 dist/vdxf/classes/oidc/OidcChallenge.js delete mode 100644 dist/vdxf/classes/oidc/OidcClient.d.ts delete mode 100644 dist/vdxf/classes/oidc/OidcClient.js delete mode 100644 dist/vdxf/classes/oidc/OidcDecision.d.ts delete mode 100644 dist/vdxf/classes/oidc/OidcDecision.js delete mode 100644 dist/vdxf/classes/oidc/OidcRequest.d.ts delete mode 100644 dist/vdxf/classes/oidc/OidcRequest.js diff --git a/dist/pbaas/Identity.d.ts b/dist/pbaas/Identity.d.ts deleted file mode 100644 index 6e26977..0000000 --- a/dist/pbaas/Identity.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -/// -import { BigNumber } from '../utils/types/BigNumber'; -import { Principal } from './Principal'; -export declare class Identity extends Principal { - parent: string; - system_id: string; - name: string; - contentmap: Map; - contentmultimap: Map>; - revocation_authority: string; - recovery_authority: string; - private_addresses: Array<{ - d: Buffer; - pk_d: Buffer; - }>; - timelock: number; - constructor(data?: { - version?: BigNumber | number; - flags?: BigNumber | number; - primaryaddresses?: Array; - minimumsignatures?: BigNumber | number; - parent?: string; - systemid?: string; - name?: string; - contentmap?: Map; - contentmultimap?: Map> | { - [name: string]: Array<{ - [name: string]: string; - }>; - }; - revocationauthority?: string; - recoveryauthority?: string; - private_addresses?: Array<{ - d: Buffer; - pk_d: Buffer; - }> | []; - timelock?: number; - identityaddress?: string; - }); - dataByteLength(): number; - toBuffer(): Buffer; - fromBuffer(buffer: any, offset?: number): number; -} diff --git a/dist/pbaas/Identity.js b/dist/pbaas/Identity.js deleted file mode 100644 index adf6a69..0000000 --- a/dist/pbaas/Identity.js +++ /dev/null @@ -1,325 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Identity = void 0; -const varuint_1 = require("../utils/varuint"); -const bufferutils_1 = require("../utils/bufferutils"); -const Principal_1 = require("./Principal"); -const address_1 = require("../utils/address"); -const vdxf_1 = require("../constants/vdxf"); -const vdxf_2 = require("../vdxf"); -const bn_js_1 = require("bn.js"); -const bech32 = require('bech32'); -const VERSION_PBAAS = 3; -const VERSION_INVALID = 0; -const { BufferReader, BufferWriter } = bufferutils_1.default; -function fromBech32(address) { - var result = bech32.decode(address); - var data = bech32.fromWords(result.words.slice(1)); - return { - version: result.words[0], - prefix: result.prefix, - data: Buffer.from(data) - }; -} -function convertBits(data, from, to, strictMode) { - const length = strictMode - ? Math.floor((data.length * from) / to) - : Math.ceil((data.length * from) / to); - const mask = (1 << to) - 1; - const result = Buffer.alloc(length); - let index = 0; - let accumulator = 0; - let bits = 0; - for (const value of data) { - accumulator = (accumulator << from) | value; - bits += from; - while (bits >= to) { - bits -= to; - result[index] = (accumulator >> bits) & mask; - ++index; - } - } - if (!strictMode) { - if (bits > 0) { - result[index] = (accumulator << (to - bits)) & mask; - ++index; - } - } - else { - throw new Error("Input cannot be converted"); - } - return result; -} -function decodeSaplingAddress(address) { - const result = fromBech32(address); - const data = convertBits(result.data, 5, 8, false); - return { d: data.slice(0, 10), pk_d: data.slice(10) }; -} -class Identity extends Principal_1.Principal { - constructor(data) { - var _a; - super(data); - if (data === null || data === void 0 ? void 0 : data.parent) - this.parent = data.parent; - if (data === null || data === void 0 ? void 0 : data.name) - this.name = data.name; - if (data === null || data === void 0 ? void 0 : data.systemid) - this.system_id = data.systemid; - this.contentmap = (data === null || data === void 0 ? void 0 : data.contentmap) ? new Map(data.contentmap) : new Map(); - if (data === null || data === void 0 ? void 0 : data.contentmultimap) { - if (typeof data.contentmultimap == "object") { - this.contentmultimap = contentmultimapFromObject(data.contentmultimap); - } - else { - throw new Error("multimap root not an object"); - } - } - if (data === null || data === void 0 ? void 0 : data.revocationauthority) - this.revocation_authority = data.revocationauthority; - if (data === null || data === void 0 ? void 0 : data.recoveryauthority) - this.recovery_authority = data.recoveryauthority; - if (data === null || data === void 0 ? void 0 : data.timelock) - this.timelock = data.timelock; - this.private_addresses = ((_a = data === null || data === void 0 ? void 0 : data.private_addresses) === null || _a === void 0 ? void 0 : _a.map((addr) => { return decodeSaplingAddress(addr); })) || new Array(); - } - dataByteLength() { - let byteLength = 0; - byteLength += this._dataByteLength(); //get the principal byte length - byteLength += 20; //uint160 parent - byteLength += varuint_1.default.encodingLength(Buffer.from(this.name, "utf8").length); // name compact size - byteLength += Buffer.from(this.name, "utf8").length; // name_in_utf8_bytes - // contentmultimap - if (this.version.toNumber() >= VERSION_PBAAS) { - byteLength += this.contentmultimap ? varuint_1.default.encodingLength(this.contentmultimap.size) : 0; - if (this.contentmultimap) { - for (const [key, value] of this.contentmultimap.entries()) { - byteLength += 20; //uint160 key - byteLength += varuint_1.default.encodingLength(value.length); - for (const n of value) { - byteLength += varuint_1.default.encodingLength(n.length); - byteLength += n.length; - } - } - } - } - //contentmap - if (this.version.toNumber() < VERSION_PBAAS) { - byteLength += varuint_1.default.encodingLength(this.contentmap.size); - for (const m in this.contentmap) { - byteLength += 20; //uint160 key - byteLength += 32; //uint256 hash - } - } - //contentmap2 - byteLength += varuint_1.default.encodingLength(this.contentmap.size); - for (const m in this.contentmap) { - byteLength += 20; //uint160 key - byteLength += 32; //uint256 hash - } - byteLength += 20; //uint160 revocation authority - byteLength += 20; //uint160 recovery authority - // privateaddresses - byteLength += varuint_1.default.encodingLength(this.private_addresses.length | 0); - for (const n of this.private_addresses) { - byteLength += varuint_1.default.encodingLength(n.d.length); - byteLength += n.d.length; // const 11 - byteLength += 32; //pk_d hash - } - // post PBAAS - if (this.version.toNumber() >= VERSION_PBAAS) { - byteLength += 20; //uint160 systemid - byteLength += 4; //uint32 unlockafter - } - return byteLength; - } - toBuffer() { - const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); - bufferWriter.writeSlice(this._toBuffer()); - bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.parent).hash); - bufferWriter.writeCompactSize(Buffer.from(this.name, "utf8").length); - bufferWriter.writeSlice(Buffer.from(this.name, "utf8")); - //contentmultimap - if (this.version.toNumber() >= VERSION_PBAAS) { - bufferWriter.writeCompactSize(this.contentmultimap.size); - for (const [key, value] of this.contentmultimap.entries()) { - bufferWriter.writeSlice((0, address_1.fromBase58Check)(key).hash); - bufferWriter.writeCompactSize(value.length); - for (const n of value) { - bufferWriter.writeCompactSize(n.length); - bufferWriter.writeSlice(n); - } - } - } - //contentmap - if (this.version.toNumber() < VERSION_PBAAS) { - bufferWriter.writeCompactSize(this.contentmap.size); - for (const [key, value] of this.contentmap.entries()) { - bufferWriter.writeSlice(value); - } - } - //contentmap2 - bufferWriter.writeCompactSize(this.contentmap.size); - for (const [key, value] of this.contentmap.entries()) { - bufferWriter.writeSlice(value); - } - bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.revocation_authority).hash); - bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.recovery_authority).hash); - // privateaddresses - bufferWriter.writeCompactSize(this.private_addresses.length); - for (const n of this.private_addresses) { - bufferWriter.writeCompactSize(n.d.length); - bufferWriter.writeSlice(n.d); - bufferWriter.writeSlice(n.pk_d); - } - // post PBAAS - if (this.version.toNumber() >= VERSION_PBAAS) { - bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.system_id).hash); - bufferWriter.writeUInt32(this.timelock); - } - return bufferWriter.buffer; - } - fromBuffer(buffer, offset = 0) { - const reader = new BufferReader(buffer, offset); - reader.offset = this._fromBuffer(reader.buffer, reader.offset); - this.parent = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); - this.name = Buffer.from(reader.readVarSlice()).toString('utf8'); - //contentmultimap - if (this.version.toNumber() >= VERSION_PBAAS) { - const contentMapSize = reader.readVarInt(); - this.contentmultimap = new Map(); - for (var i = 0; i < contentMapSize.toNumber(); i++) { - const contentMapKey = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); - var innervector = reader.readVector(); - this.contentmultimap.set(contentMapKey, innervector); - } - } - // contentmap - if (this.version.toNumber() < VERSION_PBAAS) { - const contentMultiMapSize = reader.readVarInt(); - this.contentmap = new Map(); - for (var i = 0; i < contentMultiMapSize.toNumber(); i++) { - const contentMapKey = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); - const hash = reader.readSlice(32); - this.contentmap.set(contentMapKey, hash); - } - } - const contentMapSize = reader.readVarInt(); - this.contentmap = new Map(); - for (var i = 0; i < contentMapSize.toNumber(); i++) { - const contentMapKey = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); - const hash = reader.readSlice(32); - this.contentmap.set(contentMapKey, hash); - } - this.revocation_authority = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); - this.recovery_authority = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); - const numPrivateAddresses = reader.readVarInt(); - for (var i = 0; i < numPrivateAddresses.toNumber(); i++) { - this.private_addresses.push({ d: Buffer.from(reader.readVector()), pk_d: reader.readSlice(20) }); - } - if (this.version.toNumber() >= VERSION_PBAAS) { - this.system_id = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); - this.timelock = reader.readUInt32(); - } - return reader.offset; - } -} -exports.Identity = Identity; -function contentmultimapFromObject(input) { - var contentmultimap = new Map; - var nVersion = 1; - const keys = Object.keys(input); - const values = keys.map((item) => input[item]); - for (var i = 0; i < keys.length; i++) { - try { - const key = (0, address_1.fromBase58Check)(keys[i]).hash; - if (key != null) { - if (Array.isArray(values[i])) { - for (var j = 0; j < values[i].length; j++) { - const oneValue = values[i][j]; - var items = []; - if (typeof oneValue == "string") { - items.push(Buffer.from(oneValue, 'hex')); - } - else if (typeof oneValue == "object") { - const mapBytesValue = VectorEncodeVDXFUni(oneValue); - if (mapBytesValue.length === 0 || nVersion == VERSION_INVALID) { - nVersion = VERSION_INVALID; - throw new Error("object not as expected"); - } - items.push(mapBytesValue); - } - } - contentmultimap.set(keys[i], items); - } - else if (typeof values[i] === "string") { - if (isHexByteString(values[i])) { - contentmultimap.set(keys[i], Buffer.from(items)); - } - else { - nVersion = VERSION_INVALID; - throw new Error("string not formatted as hex"); - } - } - else if (typeof values[i] === "object") { - const mapBytesValue = VectorEncodeVDXFUni(values[i]); - var item = []; - if (mapBytesValue.length === 0 || nVersion == VERSION_INVALID) { - nVersion = VERSION_INVALID; - throw new Error("object not as expected"); - } - item.push(mapBytesValue); - contentmultimap.set(keys[i], item); - } - else { - nVersion = VERSION_INVALID; - throw new Error("not valid content multimap sub type"); - } - } - else { - nVersion = VERSION_INVALID; - throw new Error("key in multimap == null"); - } - } - catch (e) { - nVersion = VERSION_INVALID; - throw new Error(e.message); - } - } - return contentmultimap; -} -function VectorEncodeVDXFUni(obj) { - const keys = Object.keys(obj); - const values = keys.map((item) => obj[item]); - var bufsize = 0; - for (var i = 0; i < keys.length; i++) { - if (keys[i] == vdxf_2.DATA_TYPE_STRING.vdxfid) { - bufsize += vdxf_1.HASH160_BYTE_LENGTH; - bufsize += 1; // varint length 1 - bufsize += 2; // ss type + ver (lengths) - bufsize += varuint_1.default.encodingLength(Buffer.from(values[i], 'utf8').length); - bufsize += Buffer.from(values[i], 'utf8').length; - } - else { - throw new Error("VDXF key not found: " + keys[i]); - } - // TODO: add alltypes - } - const bufferWriter = new BufferWriter(Buffer.alloc(bufsize)); - for (var i = 0; i < keys.length; i++) { - if (keys[i] === vdxf_2.DATA_TYPE_STRING.vdxfid) { - bufferWriter.writeSlice((0, address_1.fromBase58Check)(keys[i]).hash); - bufferWriter.writeVarInt(new bn_js_1.BN(1)); - bufferWriter.writeVarInt(new bn_js_1.BN(Buffer.from(values[i], 'utf8').length + 3)); //NOTE 3 is from ss type + ver + vdxfidver - bufferWriter.writeVarSlice(Buffer.from(values[i], 'utf8')); - } - else { - throw new Error("VDXF key not found: " + keys[i]); - } - // TODO: add alltypes - } - return bufferWriter.buffer; -} -function isHexByteString(str) { - const hexByteRegex = /^[0-9a-fA-F]{2}$/; - return hexByteRegex.test(str); -} diff --git a/dist/vdxf/classes/PersonalData.d.ts b/dist/vdxf/classes/PersonalData.d.ts deleted file mode 100644 index 1c2d4b2..0000000 --- a/dist/vdxf/classes/PersonalData.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -/// -import { VDXFObject } from ".."; -import { AttestationDataType } from './AttestationData'; -export declare class PersonalData extends VDXFObject { - type: PersonalData.TYPE; - id: string; - data: { - [category: string]: Array; - }; - linkedAttestation: string; - constructor(data?: { - type?: PersonalData.TYPE; - id?: string; - data?: { - [category: string]: Array; - }; - linkedAttestation?: string; - }, vdxfkey?: string); - dataByteLength(): number; - toDataBuffer(): Buffer; - fromDataBuffer(buffer: Buffer, offset?: number): number; - toJson(): { - type: PersonalData.TYPE; - id: string; - data: { - [category: string]: AttestationDataType[]; - }; - linkedAttestation: string; - }; -} -export declare namespace PersonalData { - enum TYPE { - REQUEST = 1, - SUBMITTED = 2, - DESIGNATED = 3 - } -} diff --git a/dist/vdxf/classes/PersonalData.js b/dist/vdxf/classes/PersonalData.js deleted file mode 100644 index 8809b7e..0000000 --- a/dist/vdxf/classes/PersonalData.js +++ /dev/null @@ -1,92 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PersonalData = void 0; -const varuint_1 = require("../../utils/varuint"); -const bufferutils_1 = require("../../utils/bufferutils"); -const address_1 = require("../../utils/address"); -const vdxf_1 = require("../../constants/vdxf"); -const __1 = require(".."); -const identityDataKeys_1 = require("../identityDataKeys"); -const AttestationData_1 = require("./AttestationData"); -const { BufferReader, BufferWriter } = bufferutils_1.default; -class PersonalData extends __1.VDXFObject { - constructor(data, vdxfkey = identityDataKeys_1.PERSONAL_INFO_OBJECT.vdxfid) { - super(vdxfkey); - this.id = ''; - this.linkedAttestation = ''; - if (data) { - Object.assign(this, data); - } - } - dataByteLength() { - let byteLength = 0; - byteLength += 1; // type - byteLength += varuint_1.default.encodingLength(this.id.length); - byteLength += this.id.length; - byteLength += varuint_1.default.encodingLength(Object.keys(this.data).length); - for (const [key, value] of Object.entries(this.data)) { - byteLength += vdxf_1.HASH160_BYTE_LENGTH; // category - byteLength += varuint_1.default.encodingLength(value.length); - for (const attestation of value) { - byteLength += attestation.dataByteLength(); - } - } - byteLength += varuint_1.default.encodingLength(this.linkedAttestation.length); - byteLength += this.linkedAttestation.length; - return byteLength; - } - toDataBuffer() { - const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); - bufferWriter.writeCompactSize(this.type); - bufferWriter.writeVarSlice(Buffer.from(this.id, 'utf8')); - bufferWriter.writeCompactSize(Object.keys(this.data).length); - for (const [key, value] of Object.entries(this.data)) { - bufferWriter.writeSlice((0, address_1.fromBase58Check)(key).hash); - bufferWriter.writeCompactSize(value.length); - for (const attestation of value) { - bufferWriter.writeSlice(attestation.toBuffer()); - } - } - bufferWriter.writeVarSlice(Buffer.from(this.linkedAttestation, 'utf8')); - return bufferWriter.buffer; - } - fromDataBuffer(buffer, offset) { - const reader = new BufferReader(buffer, offset); - this.type = reader.readCompactSize(); - this.id = reader.readVarSlice().toString('utf8'); - const dataLength = reader.readCompactSize(); - if (!this.data) { - this.data = {}; - } - for (var i = 0; i < dataLength; i++) { - const category = (0, address_1.toBase58Check)(reader.readSlice(vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION); - const attestationLength = reader.readCompactSize(); - const attestations = []; - for (var j = 0; j < attestationLength; j++) { - const attestation = new AttestationData_1.AttestationDataType(null, (0, address_1.toBase58Check)(reader.buffer.slice(reader.offset, reader.offset + vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION)); - reader.offset = attestation.fromDataBuffer(reader.buffer, reader.offset); - attestations.push(attestation); - } - this.data[category] = attestations; - } - this.linkedAttestation = reader.readVarSlice().toString('utf8'); - return reader.offset; - } - toJson() { - return { - type: this.type, - id: this.id, - data: this.data, - linkedAttestation: this.linkedAttestation - }; - } -} -exports.PersonalData = PersonalData; -(function (PersonalData) { - let TYPE; - (function (TYPE) { - TYPE[TYPE["REQUEST"] = 1] = "REQUEST"; - TYPE[TYPE["SUBMITTED"] = 2] = "SUBMITTED"; - TYPE[TYPE["DESIGNATED"] = 3] = "DESIGNATED"; - })(TYPE = PersonalData.TYPE || (PersonalData.TYPE = {})); -})(PersonalData = exports.PersonalData || (exports.PersonalData = {})); diff --git a/dist/vdxf/classes/attestationData.d.ts b/dist/vdxf/classes/attestationData.d.ts deleted file mode 100644 index 0136d88..0000000 --- a/dist/vdxf/classes/attestationData.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -/// -import { Utf8DataVdxfObject, HexDataVdxfObject, BufferDataVdxfObject, PNGImageVdxfObject, VDXFObject } from ".."; -export declare const enum AttestationClassTypes { - BUFFER_DATA_STRING = 1, - BUFFER_DATA_BYTES = 2, - BUFFER_DATA_BASE64 = 3, - URL = 4, - PNG_IMAGE = 5, - KEY_ONLY = 6, - BOOLEAN = 7 -} -export declare const AttestationVdxfidMap: { - [x: string]: { - name: string; - type: AttestationClassTypes; - }; -}; -export declare class AttestationDataType { - dataItem: Utf8DataVdxfObject | HexDataVdxfObject | BufferDataVdxfObject | PNGImageVdxfObject | VDXFObject; - salt: Buffer; - constructor(data?: any, vdxfkey?: string, salt?: string); - getDataItem(vdxfkey: any, data: any): any; - dataByteLength(): number; - toBuffer(): Buffer; - fromDataBuffer(buffer: Buffer, offset?: number, vdxfkey?: string): number; -} -export declare const friendlyNames: (vdfxkey: any) => string; -export declare class AttestationData { - components: Map; - constructor(components?: Map); - dataByteLength(): number; - toDataBuffer(): Buffer; - fromDataBuffer(buffer: Buffer, offset?: number): number; - size(): number; - setDataFromJson(data: Array, getSalt: Function): void; - getHash(key: any): Buffer; -} diff --git a/dist/vdxf/classes/attestationData.js b/dist/vdxf/classes/attestationData.js deleted file mode 100644 index 9dacec6..0000000 --- a/dist/vdxf/classes/attestationData.js +++ /dev/null @@ -1,358 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AttestationData = exports.friendlyNames = exports.AttestationDataType = exports.AttestationVdxfidMap = void 0; -const __1 = require(".."); -const identitykeys = require("../identityDataKeys"); -const keylist = require("../keys"); -const bufferutils_1 = require("../../utils/bufferutils"); -const createHash = require("create-hash"); -const address_1 = require("../../utils/address"); -const varuint_1 = require("../../utils/varuint"); -const vdxf_1 = require("../../constants/vdxf"); -const { BufferReader, BufferWriter } = bufferutils_1.default; -exports.AttestationVdxfidMap = { - [identitykeys.IDENTITYDATA_FIRSTNAME.vdxfid]: { name: "First Name", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_LASTNAME.vdxfid]: { name: "Last Name", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_ATTESTOR.vdxfid]: { name: "Attestor ID", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDENTITY.vdxfid]: { name: "Identity", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_ID.vdxfid]: { name: "ID", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_USERID.vdxfid]: { name: "User ID", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_CREATEDAT.vdxfid]: { name: "Created at", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_COMPLETEDAT.vdxfid]: { name: "Completed at", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PREVIOUSATTEMPTID.vdxfid]: { name: "Previous attempt ID", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_SHAREABLEURL.vdxfid]: { name: "Shareable URL", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_TEMPLATEID.vdxfid]: { name: "Template ID", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_TEMPLATEVERSION.vdxfid]: { name: "Template Version", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PHONENUMBER.vdxfid]: { name: "Phone Number", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_OVER18.vdxfid]: { name: "Over 18", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_OVER21.vdxfid]: { name: "Over 21", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_OVER25.vdxfid]: { name: "Over 25", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_IPADDRESS.vdxfid]: { name: "IP Address", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_EMAIL.vdxfid]: { name: "Email Address", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_HOMEADDRESS.vdxfid]: { name: "Home address", type: 6 /* AttestationClassTypes.KEY_ONLY */ }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1.vdxfid]: { name: "Street 1", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2.vdxfid]: { name: "Street 2", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_CITY.vdxfid]: { name: "City", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_REGION.vdxfid]: { name: "Region", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE.vdxfid]: { name: "Post Code", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY.vdxfid]: { name: "Country", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDNUMBER_VALUE.vdxfid]: { name: "ID Number", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDNUMBER_TYPE.vdxfid]: { name: "ID Type", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_STATUS.vdxfid]: { name: "Status", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_APPROVALS_ACCEPTEDTOS.vdxfid]: { name: "Accepted Terms and Conditions", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_APPROVALS_VERIFIEDSMS.vdxfid]: { name: "SMS Verified", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_APPROVALS_KYCCHECKED.vdxfid]: { name: "KYC Checked ok", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_APPROVALS_DOCUMENTSVERIFIED.vdxfid]: { name: "Documents Verified", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_APPROVALS_SELFIECHECKED.vdxfid]: { name: "Selfie Checked", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_APPROVALS_WATCHLIST_OK.vdxfid]: { name: "Watchlist ok", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Riskcheck ok", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE.vdxfid]: { name: "Driving Licence", type: 6 /* AttestationClassTypes.KEY_ONLY */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_FRONT.vdxfid]: { name: "Driving Licence Front", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_BACK.vdxfid]: { name: "Driving Licence Back", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_FRONT.vdxfid]: { name: "Driving Licence Front", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_BACK.vdxfid]: { name: "Driving Licence Back", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_FACE.vdxfid]: { name: "Driving Licence Face", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_IDNUMBER.vdxfid]: { name: "Driving Licence Number", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CATEGORY.vdxfid]: { name: "Driving Licence Catagory", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_EXPIRATIONDATE.vdxfid]: { name: "Driving Licence expiry date", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Driving Licence matches country", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION.vdxfid]: { name: "Driving Licence issuing reigon", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH.vdxfid]: { name: "Driving Licence Date of Birth", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ADDRESS.vdxfid]: { name: "Driving Licence Address", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_STREET1.vdxfid]: { name: "Driving Licence Street 1", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CITY.vdxfid]: { name: "Driving Licence City", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_REGION.vdxfid]: { name: "Driving Licence Region", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_POSTCODE.vdxfid]: { name: "Driving Licence ZIP/Post Code", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_COUNTRY.vdxfid]: { name: "Driving Licence Country", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_MATCHED.vdxfid]: { name: "Driving Licence Matched all", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_NAME_MATCHED.vdxfid]: { name: "Driving Licence name matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH_MATCHED.vdxfid]: { name: "Driving Licence Date of Birth Matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_SELFIECHECK_SUCCESS.vdxfid]: { name: "Selfie Check success", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_SELFIECHECK_IMAGE.vdxfid]: { name: "Selfie Check image", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_SELFIECHECK_VIDEO.vdxfid]: { name: "Selfie Check video", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_SELFIECHECK_DRIVINGLICENCE_MATCH.vdxfid]: { name: "Selfie Driving Licence match", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_KYC_SUCCESS.vdxfid]: { name: "KYC Success", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_KYC_ADDRESS_MATCHED.vdxfid]: { name: "KYC Address Matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_KYC_TYPE.vdxfid]: { name: "KYC Type", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_KYC_NAME_MATCHED.vdxfid]: { name: "KYC Name Matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_KYC_DATEOFBIRTH_MATCHED.vdxfid]: { name: "KYC Date of Birth Matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_KYC_IDNUMBER_MATCHED.vdxfid]: { name: "KYC ID Matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_KYC_PHONENUMBER_MATCHED.vdxfid]: { name: "KYC Phone number matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_KYC_AREACODE_MATCHED.vdxfid]: { name: "KYC Areacode Matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RISKCHECK_STATUS.vdxfid]: { name: "Risk Check Status", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RISKCHECK_USERINTERACTIONS.vdxfid]: { name: "Risck Check User Interactions", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RISKCHECK_FRAUDRINGOK.vdxfid]: { name: "Risk Check No Fraudring", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RISKCHECK_BOTNOTDETECTED.vdxfid]: { name: "Risk Check bot free", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_EMAIL_ISDELIVERABLE.vdxfid]: { name: "Email address is deliverable", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_EMAIL_BREACHCOUNT.vdxfid]: { name: "Email breach count", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_EMAIL_FIRSTBREACHEDAT.vdxfid]: { name: "Email first breach date", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_EMAIL_LASTBREACHEDAT.vdxfid]: { name: "Email last breach date", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_REGISTEREDAT.vdxfid]: { name: "Email domain registered at", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_FREEPROVIDER.vdxfid]: { name: "Email is free provider", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_CUSTOM.vdxfid]: { name: "Email Domain is custom", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_DISPOSABLE.vdxfid]: { name: "Email Domain Disposable", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS.vdxfid]: { name: "Email top level Domain Suspicious", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDCARD.vdxfid]: { name: "ID Card", type: 6 /* AttestationClassTypes.KEY_ONLY */ }, - [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_FRONT.vdxfid]: { name: "ID Card Front", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_BACK.vdxfid]: { name: "ID Card Back", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_IDCARD_CROPPED_FRONT.vdxfid]: { name: "ID Card Front", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_IDCARD_CROPPED_BACK.vdxfid]: { name: "ID Card Back", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_IDCARD_FACE.vdxfid]: { name: "ID Card Face", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_IDCARD_IDNUMBER.vdxfid]: { name: "ID Card ID Number", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDCARD_CATEGORY.vdxfid]: { name: "ID Card Category", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDCARD_EXPIRATIONDATE.vdxfid]: { name: "ID Card Expiry date", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "ID Card Issuing Country Matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDCARD_ISSUING_REGION.vdxfid]: { name: "ID Card Issuing Region", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTH.vdxfid]: { name: "ID Card Date of Birth", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS.vdxfid]: { name: "ID Card Address", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_STREET1.vdxfid]: { name: "ID Card Street 1", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_CITY.vdxfid]: { name: "ID Card City", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_REGION.vdxfid]: { name: "ID Card Region", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_POSTCODE.vdxfid]: { name: "ID Card Zip/Post Code", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_COUNTRY.vdxfid]: { name: "ID Card Country", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "ID Card Matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDCARD_NAME_MATCHED.vdxfid]: { name: "ID Card Name Matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "ID Card Date of Birth Matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_PASSPORT.vdxfid]: { name: "Passport", type: 6 /* AttestationClassTypes.KEY_ONLY */ }, - [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_FRONT.vdxfid]: { name: "Passport front", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_BACK.vdxfid]: { name: "Passport back", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_FRONT.vdxfid]: { name: "Passport front", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_BACK.vdxfid]: { name: "Passport back", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_PASSPORT_FACE.vdxfid]: { name: "Passport face", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_PASSPORT_IDNUMBER.vdxfid]: { name: "Passport ID Number", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PASSPORT_CATEGORY.vdxfid]: { name: "Passport Category", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PASSPORT_EXPIRATIONDATE.vdxfid]: { name: "Passport expiry date", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Passport issuing country matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_REGION.vdxfid]: { name: "Passport issuing region matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTH.vdxfid]: { name: "Passport date of birth", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS.vdxfid]: { name: "Passport address", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_STREET1.vdxfid]: { name: "Passport street 1", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_CITY.vdxfid]: { name: "Passport city", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_REGION.vdxfid]: { name: "Passport region", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_POSTCODE.vdxfid]: { name: "Passport zip/post code", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_COUNTRY.vdxfid]: { name: "Passport country", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PASSPORT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Passport matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PASSPORT_NAME_MATCHED.vdxfid]: { name: "Passport Name Matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTHMATCHED.vdxfid]: { name: "Passport date of birth matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT.vdxfid]: { name: "Residence Permit", type: 6 /* AttestationClassTypes.KEY_ONLY */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_FRONT.vdxfid]: { name: "Residence Permit front", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_BACK.vdxfid]: { name: "Residence Permit back", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_FRONT.vdxfid]: { name: "Residence Permit front", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_BACK.vdxfid]: { name: "Residence Permit back", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_FACE.vdxfid]: { name: "Residence Permit face", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_IDNUMBER.vdxfid]: { name: "Residence Permit ID Number", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CATEGORY.vdxfid]: { name: "Residence Permit category", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_EXPIRATIONDATE.vdxfid]: { name: "Residence Permit expiry date", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Residence Permit issuing country matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_REGION.vdxfid]: { name: "Residence Permit issuing region matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTH.vdxfid]: { name: "Residence Permit date of birth", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS.vdxfid]: { name: "Residence Permit Address", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_STREET1.vdxfid]: { name: "Residence Permit Street 1", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_CITY.vdxfid]: { name: "Residence Permit City", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_REGION.vdxfid]: { name: "Residence Permit Region", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_POSTCODE.vdxfid]: { name: "Residence Permit Zip/Post code", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_COUNTRY.vdxfid]: { name: "Residence Permit Country", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Residence Permit Matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_NAME_MATCHED.vdxfid]: { name: "Residence Permit name matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTHMATCHED.vdxfid]: { name: "Residence Permit date of birth matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD.vdxfid]: { name: "Resident Card", type: 6 /* AttestationClassTypes.KEY_ONLY */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_FRONT.vdxfid]: { name: "Resident Card Front", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_BACK.vdxfid]: { name: "Resident Card Back", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_FRONT.vdxfid]: { name: "Resident Card Front", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_BACK.vdxfid]: { name: "Resident Card Back", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_FACE.vdxfid]: { name: "Resident Card Face", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_IDNUMBER.vdxfid]: { name: "Resident Card ID Number", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_CATEGORY.vdxfid]: { name: "Resident Card Category", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_EXPIRATIONDATE.vdxfid]: { name: "Resident Card Expiry Date", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Resident Card Issuing Country Matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_REGION.vdxfid]: { name: "Resident Card Issuing Region", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTH.vdxfid]: { name: "Resident Card date of birth", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS.vdxfid]: { name: "Resident Card address", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_STREET1.vdxfid]: { name: "Resident Card Street 1", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_CITY.vdxfid]: { name: "Resident Card City", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_REGION.vdxfid]: { name: "Resident Card Region", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_POSTCODE.vdxfid]: { name: "Resident Card Zip/Post Code", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_COUNTRY.vdxfid]: { name: "Resident Card Country", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Resident Card Matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_NAME_MATCHED.vdxfid]: { name: "Resident Card Name Matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "Resident Card date of birth Matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_VISA.vdxfid]: { name: "Visa", type: 6 /* AttestationClassTypes.KEY_ONLY */ }, - [identitykeys.IDENTITYDATA_VISA_ORIGINAL_FRONT.vdxfid]: { name: "Visa front", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_VISA_ORIGINAL_BACK.vdxfid]: { name: "Visa back", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_VISA_CROPPED_FRONT.vdxfid]: { name: "Visa front", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_VISA_CROPPED_BACK.vdxfid]: { name: "Visa back", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_VISA_FACE.vdxfid]: { name: "Visa face", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_VISA_IDNUMBER.vdxfid]: { name: "Visa ID Number", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_VISA_CATEGORY.vdxfid]: { name: "Visa Category", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_VISA_EXPIRATIONDATE.vdxfid]: { name: "Visa expiry date", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Visa issuing country matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_VISA_ISSUING_REGION.vdxfid]: { name: "Visa issuing region", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTH.vdxfid]: { name: "Visa date of birth", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS.vdxfid]: { name: "Visa address", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_STREET1.vdxfid]: { name: "Visa Street 1", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_CITY.vdxfid]: { name: "Visa City", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_REGION.vdxfid]: { name: "Visa Region", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_POSTCODE.vdxfid]: { name: "Visa Zip/Post Code", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_COUNTRY.vdxfid]: { name: "Visa Country", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_VISA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Visa document matched", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_VISA_NAME_MATCHED.vdxfid]: { name: "Visa name matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTHMATCHED.vdxfid]: { name: "Visa date of birth matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALFRONT.vdxfid]: { name: "Original Front", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALBACK.vdxfid]: { name: "Original Back", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDFRONT.vdxfid]: { name: "Cropped Front", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDBACK.vdxfid]: { name: "Cropped Back", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_FACE.vdxfid]: { name: "Face", type: 4 /* AttestationClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_IDNUMBER.vdxfid]: { name: "ID Number", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CATEGORY.vdxfid]: { name: "Category", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_EXPIRATIONDATE.vdxfid]: { name: "Expiry Date", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY.vdxfid]: { name: "Issuing Country", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUING_REGION.vdxfid]: { name: "Issuing Region", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ADDRESS.vdxfid]: { name: "Address", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_ADDRESS_STREET1.vdxfid]: { name: "Street 1", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_ADDRESS_STREET2.vdxfid]: { name: "Street 2", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_ADDRESS_CITY.vdxfid]: { name: "City", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_ADDRESS_REGION.vdxfid]: { name: "Region", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_ADDRESS_POSTCODE.vdxfid]: { name: "Zip/Postal Code", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_ADDRESS_COUNTRY.vdxfid]: { name: "Country", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Document Matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED.vdxfid]: { name: "Name Matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED.vdxfid]: { name: "Date of Birth Matched", type: 7 /* AttestationClassTypes.BOOLEAN */ }, - [keylist.ATTESTATION_TYPE.vdxfid]: { name: "Attestation Type", type: 1 /* AttestationClassTypes.BUFFER_DATA_STRING */ }, -}; -class AttestationDataType { - constructor(data, vdxfkey, salt) { - this.salt = Buffer.alloc(0); - this.getDataItem(vdxfkey, data); - if (salt) { - this.salt = Buffer.from(salt, "hex"); - } - } - getDataItem(vdxfkey, data) { - switch (vdxfkey && exports.AttestationVdxfidMap[vdxfkey].type || null) { - case 1 /* AttestationClassTypes.BUFFER_DATA_STRING */: - this.dataItem = new __1.Utf8DataVdxfObject(data, vdxfkey); - break; - case 2 /* AttestationClassTypes.BUFFER_DATA_BYTES */: - this.dataItem = new __1.HexDataVdxfObject(data, vdxfkey); - break; - case 3 /* AttestationClassTypes.BUFFER_DATA_BASE64 */: - this.dataItem = new __1.BufferDataVdxfObject(data, vdxfkey, "base64"); - break; - case 4 /* AttestationClassTypes.URL */: - this.dataItem = new __1.BufferDataVdxfObject(data, vdxfkey, "utf8"); - break; - case 5 /* AttestationClassTypes.PNG_IMAGE */: - this.dataItem = new __1.PNGImageVdxfObject(data, vdxfkey); - break; - case 6 /* AttestationClassTypes.KEY_ONLY */: - this.dataItem = new __1.VDXFObject(vdxfkey); - break; - case 7 /* AttestationClassTypes.BOOLEAN */: - this.dataItem = new __1.HexDataVdxfObject(data, vdxfkey); - break; - default: - this.dataItem = new __1.HexDataVdxfObject(data, vdxfkey); - break; - } - } - dataByteLength() { - let length = 0; - length += this.dataItem.byteLength(); - length += varuint_1.default.encodingLength(this.salt.length); - length += this.salt.length; - return length; - } - toBuffer() { - const buffer = Buffer.alloc(this.dataByteLength()); - const writer = new bufferutils_1.default.BufferWriter(buffer); - writer.writeSlice(this.dataItem.toBuffer()); - writer.writeVarSlice(this.salt); - return writer.buffer; - } - fromDataBuffer(buffer, offset = 0, vdxfkey) { - const reader = new bufferutils_1.default.BufferReader(buffer, offset); - reader.offset = this.dataItem.fromBuffer(reader.buffer, reader.offset, vdxfkey); - this.salt = reader.readVarSlice(); - return reader.offset; - } -} -exports.AttestationDataType = AttestationDataType; -const friendlyNames = (vdfxkey) => { - if (vdfxkey in exports.AttestationVdxfidMap) { - return exports.AttestationVdxfidMap[vdfxkey].name; - } - else { - throw new Error("Unknown VDXF key"); - } -}; -exports.friendlyNames = friendlyNames; -class AttestationData { - constructor(components = new Map()) { - this.components = components; - } - dataByteLength() { - let byteLength = 0; - byteLength += varuint_1.default.encodingLength(this.components.size); - for (const [key, item] of this.components) { - byteLength += varuint_1.default.encodingLength(key); - byteLength += item.dataByteLength(); - } - return byteLength; - } - toDataBuffer() { - const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); - bufferWriter.writeCompactSize(this.components.size); - for (const [key, item] of this.components) { - bufferWriter.writeCompactSize(key); - bufferWriter.writeSlice(item.toBuffer()); - } - return bufferWriter.buffer; - } - fromDataBuffer(buffer, offset) { - const reader = new bufferutils_1.default.BufferReader(buffer, offset); - const componentsLength = reader.readCompactSize(); - this.components = new Map(); - for (var i = 0; i < componentsLength; i++) { - const key = reader.readCompactSize(); - const vdxfid = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); - const attestationData = new AttestationDataType(null, vdxfid); - reader.offset = attestationData.fromDataBuffer(reader.buffer, reader.offset, vdxfid); - this.components.set(key, attestationData); - } - return reader.offset; - } - size() { - return this.components.size; - } - setDataFromJson(data, getSalt) { - if (!this.components) { - this.components = new Map(); - } - for (let i = 0; i < data.length; i++) { - const item = data[i]; - if (!(item.salt instanceof Buffer) || item.salt.length !== 32) { - if (typeof getSalt === "function") { - item.salt = getSalt(); - } - else { - throw new Error("Salt is required to be a 32 random byte Buffer"); - } - } - try { - (0, address_1.fromBase58Check)(item.dataItem.vdxfkey); - } - catch (e) { - throw new Error("Attestation Key is required to be base58 format"); - } - this.components.set(i, item); - } - } - getHash(key) { - let value; - value = this.components.get(key).toBuffer(); - return createHash("sha256").update(value).digest(); - } -} -exports.AttestationData = AttestationData; diff --git a/dist/vdxf/classes/oidc/OidcChallenge.d.ts b/dist/vdxf/classes/oidc/OidcChallenge.d.ts deleted file mode 100644 index 8121bc6..0000000 --- a/dist/vdxf/classes/oidc/OidcChallenge.d.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { OidcClient, OidcClientInterface } from "./OidcClient"; -import { VDXFObject } from "../.."; -export interface OidcChallengeInterface { - uuid: string; - requested_scope?: Array | null; - requested_access_token_audience?: Array | null; - skip?: boolean; - subject?: string; - oidc_context?: { - acr_values: Array; - display: string; - id_token_hint_claims: { - [key: string]: any; - }; - login_hint: string; - ui_locales: Array; - } | {}; - request_url?: string; - login_challenge?: string; - login_session_id?: string; - acr?: string; - session_id?: string; - client: OidcClientInterface; -} -export declare class OidcChallenge extends VDXFObject { - uuid: string; - client: OidcClient; - requested_scope?: Array | null; - requested_access_token_audience?: Array | null; - skip?: boolean; - subject?: string; - oidc_context?: { - acr_values: Array; - display: string; - id_token_hint_claims: { - [key: string]: any; - }; - login_hint: string; - ui_locales: Array; - } | {}; - request_url?: string; - login_challenge?: string; - login_session_id?: string; - acr?: string; - session_id?: string; - constructor(challenge: OidcChallengeInterface); - toJson(): { - vdxfkey: string; - uuid: string; - client: { - vdxfkey: string; - client_id: string; - name: string; - redirect_uris: import("./OidcClient").RedirectUri[]; - grant_types: string[]; - response_types: string[]; - scope: string; - audience: string[]; - owner: string; - policy_uri: string; - allowed_cors_origins: string[]; - tos_uri: string; - client_uri: string; - logo_uri: string; - contacts: string[]; - client_secret_expires_at: number; - subject_type: string; - token_endpoint_auth_method: string; - userinfo_signed_response_alg: string; - created_at: string; - updated_at: string; - }; - requested_scope: string[]; - requested_access_token_audience: string[]; - skip: boolean; - subject: string; - oidc_context: {} | { - acr_values: string[]; - display: string; - id_token_hint_claims: { - [key: string]: any; - }; - login_hint: string; - ui_locales: string[]; - }; - request_url: string; - login_challenge: string; - login_session_id: string; - acr: string; - session_id: string; - }; -} diff --git a/dist/vdxf/classes/oidc/OidcChallenge.js b/dist/vdxf/classes/oidc/OidcChallenge.js deleted file mode 100644 index aef62f9..0000000 --- a/dist/vdxf/classes/oidc/OidcChallenge.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OidcChallenge = void 0; -const OidcClient_1 = require("./OidcClient"); -const __1 = require("../.."); -class OidcChallenge extends __1.VDXFObject { - constructor(challenge) { - super(__1.LOGIN_CONSENT_OIDC_CHALLENGE_VDXF_KEY.vdxfid); - this.uuid = ""; - this.uuid = challenge.uuid; - this.requested_scope = challenge.requested_scope; - this.requested_access_token_audience = challenge.requested_access_token_audience; - this.skip = challenge.skip; - this.subject = challenge.subject; - this.oidc_context = challenge.oidc_context; - this.request_url = challenge.request_url; - this.login_challenge = challenge.login_challenge; - this.login_session_id = challenge.login_session_id; - this.acr = challenge.acr; - this.session_id = challenge.session_id; - this.client = new OidcClient_1.OidcClient(challenge.client); - } - toJson() { - return { - vdxfkey: this.vdxfkey, - uuid: this.uuid, - client: this.client.toJson(), - requested_scope: this.requested_scope, - requested_access_token_audience: this.requested_access_token_audience, - skip: this.skip, - subject: this.subject, - oidc_context: this.oidc_context, - request_url: this.request_url, - login_challenge: this.login_challenge, - login_session_id: this.login_session_id, - acr: this.acr, - session_id: this.session_id, - }; - } -} -exports.OidcChallenge = OidcChallenge; diff --git a/dist/vdxf/classes/oidc/OidcClient.d.ts b/dist/vdxf/classes/oidc/OidcClient.d.ts deleted file mode 100644 index 7e15124..0000000 --- a/dist/vdxf/classes/oidc/OidcClient.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { VDXFObject } from "../../"; -export interface RedirectUri { - type: string; - uri: string; -} -export interface OidcClientInterface { - client_id: string; - name?: string; - redirect_uris?: Array; - grant_types?: Array; - response_types?: Array; - scope?: string; - audience?: Array | null; - owner?: string; - policy_uri?: string; - allowed_cors_origins?: Array | null; - tos_uri?: string; - client_uri?: string; - logo_uri?: string; - contacts?: Array | null; - client_secret_expires_at?: number; - subject_type?: string; - token_endpoint_auth_method?: string; - userinfo_signed_response_alg?: string; - created_at: string; - updated_at?: string; -} -export declare class OidcClient extends VDXFObject { - client_id: string; - name?: string; - redirect_uris?: Array; - grant_types?: Array; - response_types?: Array; - scope?: string; - audience?: Array | null; - owner?: string; - policy_uri?: string; - allowed_cors_origins?: Array | null; - tos_uri?: string; - client_uri?: string; - logo_uri?: string; - contacts?: Array | null; - client_secret_expires_at?: number; - subject_type?: string; - token_endpoint_auth_method?: string; - userinfo_signed_response_alg?: string; - created_at: string; - updated_at?: string; - constructor(client: OidcClientInterface); - toJson(): { - vdxfkey: string; - client_id: string; - name: string; - redirect_uris: RedirectUri[]; - grant_types: string[]; - response_types: string[]; - scope: string; - audience: string[]; - owner: string; - policy_uri: string; - allowed_cors_origins: string[]; - tos_uri: string; - client_uri: string; - logo_uri: string; - contacts: string[]; - client_secret_expires_at: number; - subject_type: string; - token_endpoint_auth_method: string; - userinfo_signed_response_alg: string; - created_at: string; - updated_at: string; - }; -} diff --git a/dist/vdxf/classes/oidc/OidcClient.js b/dist/vdxf/classes/oidc/OidcClient.js deleted file mode 100644 index e5c0211..0000000 --- a/dist/vdxf/classes/oidc/OidcClient.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OidcClient = void 0; -const __1 = require("../../"); -class OidcClient extends __1.VDXFObject { - constructor(client) { - super(__1.LOGIN_CONSENT_OIDC_CLIENT_VDXF_KEY.vdxfid); - this.client_id = client.client_id; - this.name = client.name; - this.redirect_uris = client.redirect_uris; - this.grant_types = client.grant_types; - this.response_types = client.response_types; - this.scope = client.scope; - this.audience = client.audience; - this.owner = client.owner; - this.policy_uri = client.policy_uri; - this.allowed_cors_origins = client.allowed_cors_origins; - this.tos_uri = client.tos_uri; - this.client_uri = client.client_uri; - this.logo_uri = client.logo_uri; - this.contacts = client.contacts; - this.client_secret_expires_at = client.client_secret_expires_at; - this.subject_type = client.subject_type; - this.token_endpoint_auth_method = client.token_endpoint_auth_method; - this.userinfo_signed_response_alg = client.userinfo_signed_response_alg; - this.created_at = client.created_at; - this.updated_at = client.updated_at; - } - toJson() { - return { - vdxfkey: this.vdxfkey, - client_id: this.client_id, - name: this.name, - redirect_uris: this.redirect_uris, - grant_types: this.grant_types, - response_types: this.response_types, - scope: this.scope, - audience: this.audience, - owner: this.owner, - policy_uri: this.policy_uri, - allowed_cors_origins: this.allowed_cors_origins, - tos_uri: this.tos_uri, - client_uri: this.client_uri, - logo_uri: this.logo_uri, - contacts: this.contacts, - client_secret_expires_at: this.client_secret_expires_at, - subject_type: this.subject_type, - token_endpoint_auth_method: this.token_endpoint_auth_method, - userinfo_signed_response_alg: this.userinfo_signed_response_alg, - created_at: this.created_at, - updated_at: this.updated_at, - }; - } -} -exports.OidcClient = OidcClient; diff --git a/dist/vdxf/classes/oidc/OidcDecision.d.ts b/dist/vdxf/classes/oidc/OidcDecision.d.ts deleted file mode 100644 index 8c0a3a8..0000000 --- a/dist/vdxf/classes/oidc/OidcDecision.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { VDXFObject } from "../../"; -import { OidcRequest, OidcRequestInterface } from "./OidcRequest"; -export interface OidcDecisionInterface { - subject?: string; - remember?: boolean; - remember_for?: number; - acr?: string; - context?: { - [key: string]: any; - }; - force_subject_identifier?: string; - error?: string; - error_description?: string; - error_hint?: string; - error_debug?: string; - status_code?: number; - request: OidcRequestInterface; -} -export declare class OidcDecision extends VDXFObject { - subject?: string; - remember?: boolean; - remember_for?: number; - acr?: string; - context?: { - [key: string]: any; - }; - force_subject_identifier?: string; - error?: string; - error_description?: string; - error_hint?: string; - error_debug?: string; - status_code?: number; - request: OidcRequest; - constructor(decision: OidcDecisionInterface); - toJson(): { - vdxfkey: string; - subject: string; - remember: boolean; - remember_for: number; - acr: string; - context: { - [key: string]: any; - }; - force_subject_identifier: string; - error: string; - error_description: string; - error_hint: string; - error_debug: string; - status_code: number; - request: any; - }; -} diff --git a/dist/vdxf/classes/oidc/OidcDecision.js b/dist/vdxf/classes/oidc/OidcDecision.js deleted file mode 100644 index 1570fc4..0000000 --- a/dist/vdxf/classes/oidc/OidcDecision.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OidcDecision = void 0; -const __1 = require("../../"); -const OidcRequest_1 = require("./OidcRequest"); -class OidcDecision extends __1.VDXFObject { - constructor(decision) { - super(__1.LOGIN_CONSENT_OIDC_DECISION_VDXF_KEY.vdxfid); - this.subject = decision.subject; - this.remember = decision.remember; - this.remember_for = decision.remember_for; - this.acr = decision.acr; - this.context = decision.context; - this.force_subject_identifier = decision.force_subject_identifier; - this.error = decision.error; - this.error_description = decision.error_description; - this.error_hint = decision.error_hint; - this.error_debug = decision.error_debug; - this.status_code = decision.status_code; - this.request = new OidcRequest_1.OidcRequest(decision.request); - } - toJson() { - return { - vdxfkey: this.vdxfkey, - subject: this.subject, - remember: this.remember, - remember_for: this.remember_for, - acr: this.acr, - context: this.context, - force_subject_identifier: this.force_subject_identifier, - error: this.error, - error_description: this.error_description, - error_hint: this.error_hint, - error_debug: this.error_debug, - status_code: this.status_code, - request: this.request.toJson(), - }; - } -} -exports.OidcDecision = OidcDecision; diff --git a/dist/vdxf/classes/oidc/OidcRequest.d.ts b/dist/vdxf/classes/oidc/OidcRequest.d.ts deleted file mode 100644 index e69de29..0000000 diff --git a/dist/vdxf/classes/oidc/OidcRequest.js b/dist/vdxf/classes/oidc/OidcRequest.js deleted file mode 100644 index 0773361..0000000 --- a/dist/vdxf/classes/oidc/OidcRequest.js +++ /dev/null @@ -1,34 +0,0 @@ -// import { LOGIN_CONSENT_OIDC_REQUEST_VDXF_KEY, VDXFObject, VerusIDSignature, VerusIDSignatureInterface } from "../.."; -// import { LOGIN_CONSENT_REQUEST_SIG_VDXF_KEY } from "../../keys"; -// import { OidcChallenge, OidcChallengeInterface } from "./OidcChallenge"; -// export interface OidcRequestInterface { -// chain_id: string; -// signing_id: string; -// signature: VerusIDSignatureInterface; -// challenge: OidcChallengeInterface; -// } -// export class OidcRequest extends VDXFObject { -// chain_id: string; -// signing_id: string; -// signature: VerusIDSignature; -// challenge: OidcChallenge; -// constructor(request: OidcRequestInterface) { -// super(LOGIN_CONSENT_OIDC_REQUEST_VDXF_KEY.vdxfid); -// this.chain_id = request.chain_id; -// this.signing_id = request.signing_id; -// this.signature = new VerusIDSignature(request.signature, LOGIN_CONSENT_REQUEST_SIG_VDXF_KEY); -// this.challenge = new OidcChallenge(request.challenge); -// } -// getSignedData() { -// return this.challenge.toString(); -// } -// toJson() { -// return { -// vdxfkey: this.vdxfkey, -// chain_id: this.chain_id, -// signing_id: this.signing_id, -// signature: this.signature.toJson(), -// challenge: this.challenge.toJson(), -// }; -// } -// } From 9e486e0afe33d66ec345d2e068cd58e1001faad8 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Wed, 27 Mar 2024 10:36:06 +0000 Subject: [PATCH 082/120] Spelling Fixes --- src/vdxf/classes/IdentityData.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vdxf/classes/IdentityData.ts b/src/vdxf/classes/IdentityData.ts index fad681c..ca3da98 100644 --- a/src/vdxf/classes/IdentityData.ts +++ b/src/vdxf/classes/IdentityData.ts @@ -15,6 +15,7 @@ export const enum IdentityDataClassTypes { export const IdentityVdxfidMap = { [identitykeys.IDENTITYDATA_FIRSTNAME.vdxfid]: { name: "First Name", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, [identitykeys.IDENTITYDATA_LASTNAME.vdxfid]: { name: "Last Name", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_NATIONALITY.vdxfid]: { name: "Nationality", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, [identitykeys.IDENTITYDATA_ATTESTOR.vdxfid]: { name: "Attestor ID", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, [identitykeys.IDENTITYDATA_IDENTITY.vdxfid]: { name: "Identity", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, [identitykeys.IDENTITYDATA_ID.vdxfid]: { name: "ID", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, @@ -59,7 +60,7 @@ export const IdentityVdxfidMap = { [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CATEGORY.vdxfid]: { name: "Driving Licence Catagory", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, [identitykeys.IDENTITYDATA_DRIVINGLICENCE_EXPIRATIONDATE.vdxfid]: { name: "Driving Licence expiry date", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Driving Licence matches country", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION.vdxfid]: { name: "Driving Licence issuing reigon", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION.vdxfid]: { name: "Driving Licence issuing region", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH.vdxfid]: { name: "Driving Licence Date of Birth", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ADDRESS.vdxfid]: { name: "Driving Licence Address", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, [identitykeys.IDENTITYDATA_DRIVINGLICENCE_STREET1.vdxfid]: { name: "Driving Licence Street 1", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, @@ -222,7 +223,7 @@ export const IdentityVdxfidMap = { [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED.vdxfid]: { name: "Name Matched", type: IdentityDataClassTypes.BOOLEAN }, [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED.vdxfid]: { name: "Date of Birth Matched", type: IdentityDataClassTypes.BOOLEAN }, [identitykeys.BANK_ACCOUNT.vdxfid]: { name: "Bank Account", type: IdentityDataClassTypes.KEY_ONLY }, - [identitykeys.IDENTITYDATA_DOCUMENTS_AND_IMAGES.vdxfid]: { name: "Offical ID Documents", type: IdentityDataClassTypes.KEY_ONLY }, + [identitykeys.IDENTITYDATA_DOCUMENTS_AND_IMAGES.vdxfid]: { name: "Official ID Documents", type: IdentityDataClassTypes.KEY_ONLY }, [keylist.ATTESTATION_TYPE.vdxfid]: { name: "Attestation Type", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, }; From 07e5840a513b7b18270312c5fa973d3b012de393 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Wed, 27 Mar 2024 12:13:35 +0000 Subject: [PATCH 083/120] sync keys --- dist/vdxf/classes/IdentityData.js | 5 +++-- dist/vdxf/keys.d.ts | 1 - dist/vdxf/keys.js | 11 +---------- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/dist/vdxf/classes/IdentityData.js b/dist/vdxf/classes/IdentityData.js index 69afc8d..400adb0 100644 --- a/dist/vdxf/classes/IdentityData.js +++ b/dist/vdxf/classes/IdentityData.js @@ -6,6 +6,7 @@ const keylist = require("../keys"); exports.IdentityVdxfidMap = { [identitykeys.IDENTITYDATA_FIRSTNAME.vdxfid]: { name: "First Name", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, [identitykeys.IDENTITYDATA_LASTNAME.vdxfid]: { name: "Last Name", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_NATIONALITY.vdxfid]: { name: "Nationality", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, [identitykeys.IDENTITYDATA_ATTESTOR.vdxfid]: { name: "Attestor ID", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, [identitykeys.IDENTITYDATA_IDENTITY.vdxfid]: { name: "Identity", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, [identitykeys.IDENTITYDATA_ID.vdxfid]: { name: "ID", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, @@ -50,7 +51,7 @@ exports.IdentityVdxfidMap = { [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CATEGORY.vdxfid]: { name: "Driving Licence Catagory", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, [identitykeys.IDENTITYDATA_DRIVINGLICENCE_EXPIRATIONDATE.vdxfid]: { name: "Driving Licence expiry date", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Driving Licence matches country", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION.vdxfid]: { name: "Driving Licence issuing reigon", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION.vdxfid]: { name: "Driving Licence issuing region", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH.vdxfid]: { name: "Driving Licence Date of Birth", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ADDRESS.vdxfid]: { name: "Driving Licence Address", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, [identitykeys.IDENTITYDATA_DRIVINGLICENCE_STREET1.vdxfid]: { name: "Driving Licence Street 1", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, @@ -213,6 +214,6 @@ exports.IdentityVdxfidMap = { [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED.vdxfid]: { name: "Name Matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED.vdxfid]: { name: "Date of Birth Matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, [identitykeys.BANK_ACCOUNT.vdxfid]: { name: "Bank Account", type: 6 /* IdentityDataClassTypes.KEY_ONLY */ }, - [identitykeys.IDENTITYDATA_DOCUMENTS_AND_IMAGES.vdxfid]: { name: "Offical ID Documents", type: 6 /* IdentityDataClassTypes.KEY_ONLY */ }, + [identitykeys.IDENTITYDATA_DOCUMENTS_AND_IMAGES.vdxfid]: { name: "Official ID Documents", type: 6 /* IdentityDataClassTypes.KEY_ONLY */ }, [keylist.ATTESTATION_TYPE.vdxfid]: { name: "Attestation Type", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, }; diff --git a/dist/vdxf/keys.d.ts b/dist/vdxf/keys.d.ts index 1f5159d..68f6298 100644 --- a/dist/vdxf/keys.d.ts +++ b/dist/vdxf/keys.d.ts @@ -54,4 +54,3 @@ export declare const ATTESTATION_VIEW_RESPONSE: VDXFKeyInterface; export declare const ATTESTATION_TYPE: VDXFKeyInterface; export declare const DATA_TYPE_STRING: VDXFKeyInterface; export declare const PROFILE_DATA_VIEW_REQUEST: VDXFKeyInterface; -export declare const PROFILE_DATA_VIEW_RESPONSE: VDXFKeyInterface; diff --git a/dist/vdxf/keys.js b/dist/vdxf/keys.js index 573494e..1f4dfc0 100644 --- a/dist/vdxf/keys.js +++ b/dist/vdxf/keys.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.PROFILE_DATA_VIEW_RESPONSE = exports.PROFILE_DATA_VIEW_REQUEST = exports.DATA_TYPE_STRING = exports.ATTESTATION_TYPE = exports.ATTESTATION_VIEW_RESPONSE = exports.ATTESTATION_OBJECT = exports.ATTESTATION_RECIPIENT = exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.IDENTITY_AUTH_SIG_VDXF_KEY = exports.VERUSPAY_INVOICE_VDXF_KEY = void 0; +exports.PROFILE_DATA_VIEW_REQUEST = exports.DATA_TYPE_STRING = exports.ATTESTATION_TYPE = exports.ATTESTATION_VIEW_RESPONSE = exports.ATTESTATION_OBJECT = exports.ATTESTATION_RECIPIENT = exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.IDENTITY_AUTH_SIG_VDXF_KEY = exports.VERUSPAY_INVOICE_VDXF_KEY = void 0; exports.VERUSPAY_INVOICE_VDXF_KEY = { hash160result: "628efc28c2e2d40050e1a9de7a93e7ddf2aa0076", qualifiedname: { @@ -356,12 +356,3 @@ exports.PROFILE_DATA_VIEW_REQUEST = { "name": "vrsc::profile.data.view" } }; -exports.PROFILE_DATA_VIEW_RESPONSE = { - "vdxfid": "i5CWyoGHTzCAtt8MZWnH5C4y2GiSyZd56R", - "indexid": "xA2dSbhNKJQqX41PRCSS3abW3vjTq9KDZw", - "hash160result": "1f8ffc67110757607bd7334034251405cd37e912", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::profile.data.response" - } -}; From 5d669d84396a9f0c35d1a134e7f9b341670497f3 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Mon, 15 Apr 2024 17:12:04 +0100 Subject: [PATCH 084/120] Add DataDescriptor, MMRDescriptor --- src/vdxf/classes/DataDescriptor.ts | 1052 ++++++++++++++++++++++++++++ 1 file changed, 1052 insertions(+) create mode 100644 src/vdxf/classes/DataDescriptor.ts diff --git a/src/vdxf/classes/DataDescriptor.ts b/src/vdxf/classes/DataDescriptor.ts new file mode 100644 index 0000000..f9d5b78 --- /dev/null +++ b/src/vdxf/classes/DataDescriptor.ts @@ -0,0 +1,1052 @@ +import { BigNumber } from '../../utils/types/BigNumber'; +import { BN } from 'bn.js'; +import { BufferDataVdxfObject } from '../index'; +import { VDXFKeyInterface } from "../keys" +import varint from '../../utils/varint' +import varuint from '../../utils/varuint' +import bufferutils from '../../utils/bufferutils' +const { BufferReader, BufferWriter } = bufferutils + +export class CDataDescriptor { + + static VERSION_INVALID = new BN(0); + static VERSION_FIRST = new BN(1); + static FIRST_VERSION = new BN(1); + static LAST_VERSION = new BN(1); + static DEFAULT_VERSION = new BN(1); + + static FLAG_ENCRYPTED_DATA = new BN(1); + static FLAG_SALT_PRESENT = new BN(2); + static FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT = new BN(4); + static FLAG_INCOMING_VIEWING_KEY_PRESENT = new BN(8); + static FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT = new BN(0x10); + static FLAG_LABEL_PRESENT = new BN(0x20); + static FLAG_MIME_TYPE_PRESENT = new BN(0x40); + static FLAG_MASK = (CDataDescriptor.FLAG_ENCRYPTED_DATA.add( + CDataDescriptor.FLAG_SALT_PRESENT).add( + CDataDescriptor.FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT).add( + CDataDescriptor.FLAG_INCOMING_VIEWING_KEY_PRESENT).add( + CDataDescriptor.FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT).add( + CDataDescriptor.FLAG_LABEL_PRESENT).add( + CDataDescriptor.FLAG_MIME_TYPE_PRESENT)); + + + version: BigNumber; + flags: BigNumber; + objectData: Buffer; // either direct data or serialized UTXORef +offset, length, and/or other type of info for different links + label: string; // label associated with this data + mimeType: string; // optional mime type + salt: Buffer; // encryption public key, data only present if encrypted or data referenced by unencrypted link is encrypted + epk: Buffer; // encryption public key, data only present if encrypted or data referenced by unencrypted link is encrypted + ivk: Buffer; // incoming viewing key, optional and contains data only if full viewing key is published at this encryption level + ssk: Buffer; // specific symmetric key, optional and only to decrypt this linked sub-object + + constructor(data?: { + version?: BigNumber, + flags?: BigNumber, + objectData?: Buffer, + label?: string, + mimeType?: string, + salt?: Buffer, + epk?: Buffer, + ivk?: Buffer, + ssk?: Buffer + }) { + this.flags = new BN(0); + this.version = CDataDescriptor.DEFAULT_VERSION; + + if (data != null) { + if (data.flags != null) this.flags = data.flags + if (data.version != null) this.version = data.version + if (data.objectData != null) this.objectData = data.objectData + if (data.label != null) this.label = data.label; + if (data.mimeType != null) this.mimeType = data.mimeType; + if (data.salt != null) this.salt = data.salt; + if (data.epk != null) this.epk = data.epk; + if (data.ivk != null) this.ivk = data.ivk; + if (data.ssk != null) this.ssk = data.ssk; + + if (this.label && this.label.length > 64) { + this.label = this.label.slice(0, 64); + } + if (this.mimeType && this.mimeType.length > 128) { + this.mimeType = this.mimeType.slice(0, 128); + } + + this.SetFlags(); + + } + } + + byteLength(): number { + + let length = 0; + + length += varint.encodingLength(this.version); + length += varint.encodingLength(this.flags); + length += varuint.encodingLength(this.objectData.length); + length += this.objectData.length; + + if(this.HasLabel()) { + if(this.label.length > 64) { + throw new Error("Label too long"); + } + length += varuint.encodingLength(this.label.length); + length += this.label.length; + } + + if(this.HasMIME()) { + if(this.mimeType.length > 128) { + throw new Error("MIME type too long"); + } + length += varuint.encodingLength(this.mimeType.length); + length += this.mimeType.length; + } + + if(this.HasSalt()) { + length += varuint.encodingLength(this.salt.length); + length += this.salt.length; + } + + if(this.HasEPK()) { + length += varuint.encodingLength(this.epk.length); + length += this.epk.length; + } + + if(this.HasIVK()) { + length += varuint.encodingLength(this.ivk.length); + length += this.ivk.length; + } + + if(this.HasSSK()) { + length += varuint.encodingLength(this.ssk.length); + length += this.ssk.length; + } + return length; + } + + toBuffer(): Buffer { + const writer = new BufferWriter(Buffer.alloc(this.byteLength())); + + writer.writeVarInt(this.version); + writer.writeVarInt(this.flags); + writer.writeVarSlice(this.objectData); + + if(this.HasLabel()) { + writer.writeVarSlice(Buffer.from(this.label)); + } + + if(this.HasMIME()) { + writer.writeVarSlice(Buffer.from(this.mimeType)); + } + + if(this.HasSalt()) { + writer.writeVarSlice(this.salt); + } + + if(this.HasEPK()) { + writer.writeVarSlice(this.epk); + } + + if(this.HasIVK()) { + writer.writeVarSlice(this.ivk); + } + + if(this.HasSSK()) { + writer.writeVarSlice(this.ssk); + } + + return writer.buffer; + } + + + fromBuffer(buffer: Buffer):number { + const reader = new BufferReader(buffer); + this.version = reader.readVarInt(); + this.flags = reader.readVarInt(); + this.objectData = reader.readVarSlice(); + + if(this.HasLabel()) { + this.label = reader.readVarSlice().toString(); + } + + if(this.HasMIME()) { + this.mimeType = reader.readVarSlice().toString(); + } + + if(this.HasSalt()) { + this.salt = reader.readVarSlice(); + } + + if(this.HasEPK()) { + this.epk = reader.readVarSlice(); + } + + if(this.HasIVK()) { + this.ivk = reader.readVarSlice(); + } + + if(this.HasSSK()) { + this.ssk = reader.readVarSlice(); + } + return reader.offset; + + } + + + HasEncryptedData(): boolean { + return this.flags.and(CDataDescriptor.FLAG_ENCRYPTED_DATA).gt(new BN(0)); + } + + // // this will take our existing instance, encode it as a VDXF tagged data structure, and embed it as a new, tagged, encrypted CDataDescriptor + // bool WrapEncrypted(const libzcash:: SaplingPaymentAddress & saplingAddress, std:: vector < unsigned char > * pSsk=nullptr) + // { + // // package us as a nested, tagged object + // CVDXF_Data nestedObject = CVDXF_Data(CVDXF_Data:: DataDescriptorKey(), :: AsVector(* this)); + + // // encrypt the entire tagged object + // if (EncryptData(saplingAddress, :: AsVector(nestedObject), pSsk)) { + // label = ""; + // mimeType = ""; + // SetFlags(); + // return true; + // } + // return false; + // } + + HasSalt(): boolean { + return this.flags.and(CDataDescriptor.FLAG_SALT_PRESENT).gt(new BN(0)); + } + + HasEPK(): boolean { + return this.flags.and(CDataDescriptor.FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT).gt(new BN(0)); + } + + HasMIME(): boolean { + return this.flags.and(CDataDescriptor.FLAG_MIME_TYPE_PRESENT).gt(new BN(0)); + } + + HasIVK(): boolean { + return this.flags.and(CDataDescriptor.FLAG_INCOMING_VIEWING_KEY_PRESENT).gt(new BN(0)); + } + + HasSSK(): boolean { + return this.flags.and(CDataDescriptor.FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT).gt(new BN(0)); + } + + HasLabel(): boolean { + return this.flags.and(CDataDescriptor.FLAG_LABEL_PRESENT).gt(new BN(0)); + } + + CalcFlags(): BigNumber { + return this.flags.and(CDataDescriptor.FLAG_ENCRYPTED_DATA).add + (this.label ? CDataDescriptor.FLAG_LABEL_PRESENT : new BN(0)).add + (this.mimeType ? CDataDescriptor.FLAG_MIME_TYPE_PRESENT : new BN(0)).add + (this.salt ? CDataDescriptor.FLAG_SALT_PRESENT : new BN(0)).add + (this.epk ? CDataDescriptor.FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT : new BN(0)).add + (this.ivk ? CDataDescriptor.FLAG_INCOMING_VIEWING_KEY_PRESENT : new BN(0)).add + (this.ssk ? CDataDescriptor.FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT : new BN(0)); + } + + SetFlags() { + this.flags = this.CalcFlags(); + } + + // in the specific case that the data contained is a tagged hash vector + // there should be a better, extensible way to define, store, and return contained types, such as bidirectional VectorEncodeVDXFUni + // std:: vector < uint256 > DecodeHashVector() const ; + + // // encrypts to a specific z-address incoming viewing key + // bool EncryptData(const libzcash:: SaplingPaymentAddress & saplingAddress, const std:: vector & plainText, std:: vector < unsigned char > * pSsk=nullptr); + + // // decrypts objectData only if there is a valid key available to decrypt with already present in this object + // bool DecryptData(std:: vector < unsigned char > & plainText, std:: vector < unsigned char > * pSsk=nullptr) const ; + + // // decrypts objectData either with the provided viewing key, or if a key is available + // bool DecryptData(const libzcash:: SaplingIncomingViewingKey & Ivk, std:: vector < unsigned char > & plainText, bool ivkOnly = false, std:: vector < unsigned char > * pSsk=nullptr) const ; + + // // decrypts objectData either with the provided specific symmetric encryption key, or if a key is available on the link + // bool DecryptData(const std:: vector & decryptionKey, std:: vector < unsigned char > & plainText, bool sskOnly = false) const ; + + // bool GetSSK(std:: vector < unsigned char > & Ssk) const ; + + // bool GetSSK(const libzcash:: SaplingIncomingViewingKey & Ivk, std:: vector < unsigned char > & Ssk, bool ivkOnly = false) const ; + + // bool UnwrapEncryption(); + + // bool UnwrapEncryption(const libzcash:: SaplingIncomingViewingKey & Ivk, bool ivkOnly = false); + + // bool UnwrapEncryption(const std:: vector & decryptionKey, bool sskOnly = false); + + IsValid(): boolean { + return this.version.gte(CDataDescriptor.FIRST_VERSION) && this.version.lte(CDataDescriptor.LAST_VERSION) && (this.flags.and(new BN(~CDataDescriptor.FLAG_MASK)).eq(new BN(0))); + } + +}; + + +// VDXF data that describes an encrypted chunk of data +export class CVDXF_Data extends BufferDataVdxfObject { + constructor(data: string, key: string) { + super(data, key); + + } + + static DataByteKeyName(): string { + return "vrsc::data.type.byte"; + } + static DataByteKey(): VDXFKeyInterface { + return { + "vdxfid": "iBXUHbh4iacbeZnzDRxishvBSrYk2S2k7t", + "indexid": "xGMakQ89ZtqGGjg257csr6SiUWZksGmjWp", + "hash160result": "2e97a8bba443773812341e1d761530d3bba04f58", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.byte" + } + } + } + static DataInt16KeyName(): string { + return "vrsc::data.type.int16"; + } + static DataInt16Key(): VDXFKeyInterface { + return { + "vdxfid": "iDtTv3wf1Vk3M2Y46RjLPKtttx5hydwtY1", + "indexid": "xJiaNrNjroxhyCR5x7PVMiRRvc6ipg6N9g", + "hash160result": "ee334ebd432db0b24cc2702eda61c28ff44d3872", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int16" + } + } + } + static DataUint16KeyName(): string { + return "vrsc::data.type.uint16"; + } + static DataUint16Key(): VDXFKeyInterface { + return { + "vdxfid": "iHn7urT2yVfS7pQn6WGAmCVWh4HBLV24n3", + "indexid": "xNcENet7pot6jzHoxBvKjb23iiJCGpekDk", + "hash160result": "5cfc322d2a216145f7b82714115e7953269de59c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint16" + } + } + } + static DataInt32KeyName(): string { + return "vrsc::data.type.int32"; + } + static DataInt32Key(): VDXFKeyInterface { + return { + "vdxfid": "iHpLPprRDv3H5H3ZMaJ9nyHFzkG9xJWZDb", + "indexid": "xNeSrdHW5EFwhSvbDFxJmMoo2QHAtoEaEM", + "hash160result": "3e9ba478b23b13232f28d21051d907ce8fdd509d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int32" + } + } + } + static DataUint32KeyName(): string { + return "vrsc::data.type.uint32"; + } + static DataUint32Key(): VDXFKeyInterface { + return { + "vdxfid": "iKSj5zhd6cSsLudaGhtfmisRNgEM7SPFWY", + "indexid": "xQGqYo8hwvfXy5Wc8PYpk7PxQLFMwfP7Fp", + "hash160result": "f279818aeb4fe768956b350d1fc7216ca0e82aaf", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint32" + } + } + } + static DataInt64KeyName(): string { + return "vrsc::data.type.int64"; + } + static DataInt64Key(): VDXFKeyInterface { + return { + "vdxfid": "iKB3TGi9Dg5HZ4nQAgLQAgp3tuXBaRKHpC", + "indexid": "xQ19v59E4zHxBEfS2MzZ95LavZYCTTeuyg", + "hash160result": "ab3705f8a7fae59786ef897b014df85fcd9533ac", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int64" + } + } + + } + static DataUint64KeyName(): string { + return "vrsc::data.type.uint64"; + } + static DataUint64Key(): VDXFKeyInterface { + return { + "vdxfid": "iPamkQf38AeGQ8z4zSsZL7t9kXMeUkYLJL", + "indexid": "xUQtDD67yUrw2Js6r8XiJWQgnBNfNeeoUq", + "hash160result": "bb2ae9ed3e9f400def0724937fbf65f23ef690dc", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint64" + } + } + + } + static DataUint160KeyName(): string { + return "vrsc::data.type.uint160"; + } + static DataUint160Key(): VDXFKeyInterface { + return { + "vdxfid": "iAAwdbLyKYL39nJ1eQHaHtb75krg4mV1Lq", + "indexid": "xF146Pn4ArYhmxB3W5wjGH7e7Qsgx9bkpj", + "hash160result": "d97d2295d4c73f6f6f0697c8086bd822d6977549", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint160" + } + } + + } + static DataUint256KeyName(): string { + return "vrsc::data.type.uint256"; + } + static DataUint256Key(): VDXFKeyInterface { + return { + "vdxfid": "i8k7g7z6grtGYrNZmZr5TQ872aHssXuuua", + "indexid": "xDaE8vRBYB6wB2FbdFWERnee4EJtjbCtMM", + "hash160result": "939b27bea698d180237c40b2194025acc673cb39", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint256" + } + } + + } + static DataStringKeyName(): string { + return "vrsc::data.type.string"; + } + static DataStringKey(): VDXFKeyInterface { + return { + "vdxfid": "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c", + "indexid": "xPwgY6oPdusaAgNK3u5yHCQG5NsHEcBpi5", + "hash160result": "e5c061641228a399169211e666de18448b7b8bab", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.string" + } + } + + } + // this is a key for a typed vector, which will have the object type key following the vector key + static DataVectorKeyName(): string { + return "vrsc::data.type.vector"; + } + static DataVectorKey(): VDXFKeyInterface { + return { + "vdxfid": "iAEShwk1xjdGhaUSz3Maa2XR32o3vRuHq7", + "indexid": "xF4ZAkB6p3qwKkMUqj1jYR3x4gp4mGz657", + "hash160result": "503875b0dc301189a98927d3ece56c5f921c1f4a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.vector" + } + } + } + static DataByteVectorKeyName(): string { + return "vrsc::data.type.bytevector"; + } + static DataByteVectorKey(): VDXFKeyInterface { + return { + "vdxfid": "iKMhRLX1JHQihVZx2t2pAWW2uzmK6AzwW3", + "indexid": "xQBot8x69bdPKfSytZgy8u2ZwenKzVjR4X", + "hash160result": "cc3ae6466006629f5105f71325bb2a19107037ae", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.bytevector" + } + } + + } + static DataInt32VectorKeyName(): string { + return "vrsc::data.type.int32vector"; + } + static DataInt32VectorKey(): VDXFKeyInterface { + return { + "vdxfid": "iJZt2fcUv1iivbfC3tuPuefabcTppQEoVq", + "indexid": "xPPzVU3ZmKwPYmYDuaZYt3C7dGUqk939N7", + "hash160result": "c0847f3025c408059b5a8f6a9e414a8ed8288da5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int32vector" + } + } + } + static DataInt64VectorKeyName(): string { + return "vrsc::data.type.int64vector"; + } + static DataInt64VectorKey(): VDXFKeyInterface { + return { + "vdxfid": "i4qtYkFS9iNyu2AkqwoSn1xyCdfH9PUvak", + "indexid": "x9g11YgX12beXC3nhdTbkQVWEHgJ2jqfz1", + "hash160result": "c6219ea13884987453692cb14c72d5f6a47c020f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int64vector" + } + } + + } + static DataCurrencyMapKeyName(): string { + return "vrsc::data.type.object.currencymap"; + } + static DataCurrencyMapKey(): VDXFKeyInterface { + return { + "vdxfid": "iMrGhzkZq5fpWWSa1RambRySFPb7CuvKuX", + "indexid": "xSgPAoBegPtV8gKbs7EvZpVyH3c858ZUvL", + "hash160result": "25db70c2fcae2571f89201181bec04587e1f8fc9", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.currencymap" + } + } + + } + static DataRatingsKeyName(): string { + return "vrsc::data.type.object.ratings"; + } + static DataRatingsKey(): VDXFKeyInterface { + return { + "vdxfid": "iHJComZUXXGniLkDhjYprWYEN8qvQGDoam", + "indexid": "xN8KGZzZNqVTLWdFZRCypu4mPnrwHFKbCK", + "hash160result": "32cad57ff1dc5db4b5ba573ce01bc9c89b0d9e97", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.ratings" + } + } + } + static DataURLKeyName(): string { + return "vrsc::data.type.object.url"; + } + static DataURLKey(): VDXFKeyInterface { + return { + "vdxfid": "iJ7xdhJTJAvJubNnSJFXyA3jujzqGxjLuZ", + "indexid": "xNx56VjY9V8yXmFpHyugwYaGwQ1rCt6J9W", + "hash160result": "7748bfaf53dd2ff63ed5f73a41174c360f30a6a0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.url" + } + } + } + static DataTransferDestinationKeyName(): string { + return "vrsc::data.type.object.transferdestination"; + } + static DataTransferDestinationKey(): VDXFKeyInterface { + return { + "vdxfid": "i91L6zwZQrkbNVMB1AZ1Z671qybexRmeVK", + "indexid": "xDqSZoNeGAyFzfECrrDAXUdYsdcfs3Zuku", + "hash160result": "92f38773849383146037b16a48ea350c1c11ac3c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.transferdestination" + } + } + } + static UTXORefKeyName(): string { + return "vrsc::data.type.object.utxoref"; + } + static UTXORefKey(): VDXFKeyInterface { + return { + "vdxfid": "iNcKvh7mazaXptzHf85q6EtpFYFE7asKC1", + "indexid": "xTSSPVYrSJoCT4sKWojz4dRMHCGF3h9tM4", + "hash160result": "013e760f7451c289672993ea391ae643c21ce4d1", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.utxoref" + } + } + } + static CrossChainDataRefKeyName(): string { + return "vrsc::data.type.object.crosschaindataref"; + } + static CrossChainDataRefKey(): VDXFKeyInterface { + return { + "vdxfid": "iP3euVSzNcXUrLNHnQnR9G6q8jeYuGSxgw", + "indexid": "xTsmNHt5Dvk9UWFKe6Sa7edNAPfZmJVgLc", + "hash160result": "4d33e0aee0f648c7871b2661d1221b57c05aaed6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.crosschaindataref" + } + } + + } + static EncryptionDescriptorKeyName(): string { + return "vrsc::data.type.encryptiondescriptor"; + } + static EncryptionDescriptorKey(): VDXFKeyInterface { + return { + "vdxfid": "iHEEK8ipj58BeKZNWuaaR2tDR5RK2kmf9A", + "indexid": "xN4Lmw9uaPLrGVSQNbEjPRQkSjSKxsHUQu", + "hash160result": "8d021acc1b68335bd7d37b28ff773c138ea5dd96", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.encryptiondescriptor" + } + } + } + static SaltedDataKeyName(): string { + return "vrsc::data.type.salteddata"; + } + static SaltedDataKey(): VDXFKeyInterface { + return { + "vdxfid": "i92U1nLuLJkC44FZZ4Lq9zk4qW3HrWAWNo", + "indexid": "xDraUamzBcxrgE8bQjzz8PGbsA4JiFskTD", + "hash160result": "9e13510e01d0d03a7bc90d7a2ef32824f515e33c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.salteddata" + } + } + } + static DataDescriptorKeyName(): string { + return "vrsc::data.type.object.datadescriptor"; + } + static DataDescriptorKey(): VDXFKeyInterface { + return { + "vdxfid": "i4GC1YGEVD21afWudGoFJVdnfjJ5XWnCQv", + "indexid": "x96JULhKLXEgCqPwUxTQGtAKhPK6Qh1iaW", + "hash160result": "4d4f12424ded2033a526a4e2a8835fc5b2eba208", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.datadescriptor" + } + } + } + static SignatureDataKeyName(): string { + return "vrsc::data.signaturedata"; + } + static SignatureDataKey(): VDXFKeyInterface { + return { + "vdxfid": "i7PcVF9wwPtQ6p6jDtCVpohX65pTZuP2ah", + "indexid": "xCDix3b2ni74iyym5ZreoCE47jqUTBFRAb", + "hash160result": "b48b359e9a00042cec64f7f66ac717d388a4f22a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.signaturedata" + } + } + } + static VectorUint256KeyName(): string { + return "vrsc::data.mmrhashes"; + } + static VectorUint256Key(): VDXFKeyInterface { + return { + "vdxfid": "i9UgJ2WxGw95PKdoCXjpfnBShtP5gi9fxS", + "indexid": "xEJnkpx38FMk1VWq4DPyeAhyjYQ6X5Gsti", + "hash160result": "8c1afd59e904f6d2702699963abccbc6d326d841", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.mmrhashes" + } + } + } + static MMRLinksKeyName(): string { + return "vrsc::data.mmrlinks"; + } + static MMRLinksKey(): VDXFKeyInterface { + return { + "vdxfid": "iPQsnA1R8UjHNddZKZ3FxsuKQ5WzKqSC7w", + "indexid": "xUEzExSVynwwzoWbBEhQwGRrRjY1Bc2MYc", + "hash160result": "f535a4e9ac0f94eda01695d16489a4a102d6b1da", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.mmrlinks" + } + } + + } + static MMRDescriptorKeyName(): string { + return "vrsc::data.mmrdescriptor"; + } + static MMRDescriptorKey(): VDXFKeyInterface { + return { + "vdxfid": "i9dVDb4LgfMYrZD1JBNP2uaso4bNAkT4Jr", + "indexid": "xETbgPVRXyaDUj639s2Y1J7QpicP4DvZMt", + "hash160result": "97273a4c02d6be002f8d69c3979616732ba68243", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.mmrdescriptor" + } + } + } + static TypeDefinitionKeyName(): string { + return "vrsc::data.type.typedefinition"; + } + static TypeDefinitionKey(): VDXFKeyInterface { + return { + "vdxfid": "iL5MPPHWXQEY3p2Q1UsmGDvXsgPiqd1W1S", + "indexid": "xQuTrBibNiTCfyuRsAXvEcT4uLQjhxrpyL", + "hash160result": "ae8d805d9650c0512a6b6ec33e963386542f18b6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.typedefinition" + } + } + } + static MultiMapKeyName(): string { + return "vrsc::identity.multimapkey"; + } + static MultiMapKey(): VDXFKeyInterface { + return { + "vdxfid": "i3mbggp3NBR77C5JeFQJTpAxmgMidayLLE", + "indexid": "x8bi9VF8DVdmjMxLVw4TSChVoLNjUyapgs", + "hash160result": "6920bb81b420bc95e29a10ed677379b1e39e3a03", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.multimapkey" + } + } + } + static ContentMultiMapRemoveKeyName(): string { + return "vrsc::identity.multimapremove"; + } + static ContentMultiMapRemoveKey(): VDXFKeyInterface { + return { + "vdxfid": "i5Zkx5Z7tEfh42xtKfwbJ5LgEWE9rEgpFY", + "indexid": "xAPsQszCjYtMgCqvBMbkGTsDGAFAmrN33A", + "hash160result": "d393b986e4f82db7bec82d97b186882d739ded16", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.multimapremove" + } + } + } + + // for any ID, this key indexes content that applies to representing the profile of + // that ID. there may be many mime-type instances of a particular piece of profile media + static ProfileMediaKeyName(): string { + return "vrsc::identity.profile.media"; + } + static ProfileMediaKey(): VDXFKeyInterface { + return { + "vdxfid": "iEYsp2njSt1M4EVYi9uuAPBU2wpKmThkkr", + "indexid": "xKNzGqDpJCE1gQNaZqa48mi14bqLaG669g", + "hash160result": "e95b2ee1abb130a93900ddaef2d8e528010f7c79", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.profile.media" + } + } + + } + + static ZMemoMessageKeyName(): string { + return "vrsc::system.zmemo.message"; + } + static ZMemoMessageKey(): VDXFKeyInterface { + return { + "vdxfid": "iNHg1n828PUxktkYeNxC6sdVmuKTipn3L3", + "indexid": "xT7nUaZ6yhhdP4daW4cM5GA2oZLUaNVaBD", + "hash160result": "4a8f418203621f10d1a61701be8dbbbb38fa5cce", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::system.zmemo.message" + } + } + + } + + static ZMemoSignatureKeyName(): string { + return "vrsc::system.zmemo.signature"; + } + static ZMemoSignatureKey(): VDXFKeyInterface { + return { + "vdxfid": "i7mrLLjUfGYuHJwnsxFvd282hsdn4staJG", + "indexid": "xCbxo9AZWamZuUppjdv5bQeZjXeo1vbaCc", + "hash160result": "7b47c8cd90c4c3ddc542f37ca77473b7325a272f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::system.zmemo.signature" + } + } + } + + static CurrencyStartNotarizationKeyName(): string { + return "vrsc::system.currency.startnotarization"; + } + static CurrencyStartNotarizationKey(): VDXFKeyInterface { + return { + "vdxfid": "iRvxVcGLaCXcDiAfnQ5FfeBCo2AiBibAft", + "indexid": "xWm4xQhRRWkGqt3he5jQe2hjpgBj5C7Tj3", + "hash160result": "b537201ca6465976bea7bdb03119644a858052f6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::system.currency.startnotarization" + } + } + } + + GetHash(){}; +}; + +export class CVDXFDataDescriptor extends BufferDataVdxfObject { + dataDescriptor: CDataDescriptor; + + constructor(vdxfData: BufferDataVdxfObject) { + super(vdxfData.data, vdxfData.vdxfkey); + this.version = vdxfData.version; + if (this.data != null) { + + this.dataDescriptor = new CDataDescriptor(); + + this.dataDescriptor.fromBuffer(Buffer.from(this.data, 'hex')); + delete this.data; + + } + + } + dataByteLength(): number { + + let length = 0; + + length += this.dataDescriptor.byteLength(); + + return length; + } + + toDataBuffer(): Buffer { + + return this.dataDescriptor.toBuffer(); + } + + fromDataBuffer(buffer: Buffer, offset?: number): number { + const reader = new bufferutils.BufferReader(buffer, offset); + + this.data = reader.readVarSlice().toString('hex'); + + this.dataDescriptor = new CDataDescriptor(); + this.dataDescriptor.fromBuffer(Buffer.from(this.data, 'hex')); + delete this.data; + + return reader.offset; + } + + // CVDXFDataDescriptor(uint32_t Version = DEFAULT_VERSION) : + // dataDescriptor(Version), CVDXF_Data(CVDXF_Data:: DataDescriptorKey(), std:: vector < unsigned char > (), Version) + // { } + + // CVDXFDataDescriptor(const UniValue & uni); + + // CVDXFDataDescriptor(const CVDXF_Data & vdxfData) + // { + // version = vdxfData.version; + // key = vdxfData.key; + // CDataStream readData(vdxfData.data, SER_DISK, PROTOCOL_VERSION); + // readData >> dataDescriptor; + // } + + HasEncryptedData(): boolean { + return this.dataDescriptor.HasEncryptedData(); + } + + // WrapEncrypted(const libzcash:: SaplingPaymentAddress & saplingAddress) { + // return this.dataDescriptor.WrapEncrypted(saplingAddress); + // } + + HasLabel(): boolean { + return this.dataDescriptor.HasLabel(); + } + + HasSalt(): boolean { + return this.dataDescriptor.HasSalt(); + } + + HasEPK(): boolean { + return this.dataDescriptor.HasEPK(); + } + + HasIVK(): boolean { + return this.dataDescriptor.HasIVK(); + } + + HasSSK(): boolean { + return this.dataDescriptor.HasSSK(); + } + + CalcFlags(): BigNumber { + return this.dataDescriptor.CalcFlags(); + } + + SetFlags() { + return this.dataDescriptor.SetFlags(); + } + +// CVDXFDataDescriptor(const std:: vector & ObjectData, +// const std:: string & Label=std:: string(), +// const std:: string & MimeType=std:: string(), +// const std:: vector & Salt=std:: vector < unsigned char > (), +// const std:: vector & EPK=std:: vector < unsigned char > (), +// const std:: vector & IVK=std:: vector < unsigned char > (), +// const std:: vector & SSK=std:: vector < unsigned char > (), +// uint32_t Flags = 0, +// uint32_t Version = DEFAULT_VERSION) : +// dataDescriptor(ObjectData, Label, MimeType, Salt, EPK, IVK, SSK, Flags, Version), CVDXF_Data(CVDXF_Data:: DataDescriptorKey(), std:: vector < unsigned char > (), Version) +// { +// } + +// ADD_SERIALIZE_METHODS; + +// template < typename Stream, typename Operation > +// inline void SerializationOp(Stream & s, Operation ser_action) { +// READWRITE(* (CVDXF *)this); + +// if (ser_action.ForRead()) { +// if (IsValid()) { +// READWRITE(data); +// CDataStream readData(data, SER_DISK, PROTOCOL_VERSION); +// data.clear(); +// readData >> dataDescriptor; +// } +// } +// else { +// if (IsValid()) { +// CDataStream writeData(SER_DISK, PROTOCOL_VERSION); +// writeData << dataDescriptor; +// std:: vector < unsigned char > vch(writeData.begin(), writeData.end()); +// READWRITE(vch); +// } +// } +// } + + +}; + +export enum EHashTypes +{ + HASH_INVALID = 0, + HASH_BLAKE2BMMR = 1, + HASH_BLAKE2BMMR2 = 2, + HASH_KECCAK = 3, + HASH_SHA256D = 4, + HASH_SHA256 = 5, + HASH_LASTTYPE = 5 +}; + + +export class CMMRDescriptor +{ + static VERSION_INVALID = new BN(0); + static FIRST_VERSION = new BN(1); + static LAST_VERSION = new BN(1); + static DEFAULT_VERSION = new BN(1); + + version: BigNumber; + objectHashType: EHashTypes; + mmrHashType: EHashTypes; + mmrRoot: CDataDescriptor; + mmrHashes: CDataDescriptor; + dataDescriptors: CDataDescriptor[]; + + constructor(data?:{ version: BigNumber, + objectHashType: EHashTypes, + mmrHashType: EHashTypes, + mmrRoot: CDataDescriptor, + mmrHashes: CDataDescriptor, + dataDescriptors: CDataDescriptor[] }) { + + if (data) { + if (data.version) this.version = data.version; + if (data.objectHashType) this.objectHashType = data.objectHashType; + if (data.mmrHashType) this.mmrHashType = data.mmrHashType; + if (data.mmrRoot) this.mmrRoot = data.mmrRoot; + if (data.mmrHashes) this.mmrHashes = data.mmrHashes; + if (data.dataDescriptors) this.dataDescriptors = data.dataDescriptors; + } else { + this.version = CMMRDescriptor.DEFAULT_VERSION; + } + } + + byteLength(): number { + let length = 0; + + length += varint.encodingLength(this.version); + length += varint.encodingLength(new BN(this.objectHashType)); + length += varint.encodingLength(new BN(this.mmrHashType)); + length += this.mmrRoot.byteLength(); + length += this.mmrHashes.byteLength(); + length += varuint.encodingLength(this.dataDescriptors.length); + this.dataDescriptors.forEach((dataDescriptor) => { + length += dataDescriptor.byteLength(); + }); + + return length; + } + + toBuffer(): Buffer { + + const writer = new BufferWriter(Buffer.alloc(this.byteLength())); + + writer.writeVarInt(this.version); + writer.writeVarInt(new BN(this.objectHashType)); + writer.writeVarInt(new BN(this.mmrHashType)); + writer.writeSlice(this.mmrRoot.toBuffer()); + writer.writeSlice(this.mmrHashes.toBuffer()); + writer.writeCompactSize(this.dataDescriptors.length); + + this.dataDescriptors.forEach((dataDescriptor) => { + writer.writeSlice(dataDescriptor.toBuffer()); + }); + return writer.buffer; + } + + fromBuffer(buffer: Buffer, offset?: number): number { + const reader = new BufferReader(buffer, offset); + this.version = reader.readVarInt(); + this.objectHashType = reader.readVarInt().toNumber(); + this.mmrHashType = reader.readVarInt().toNumber(); + this.mmrRoot = new CDataDescriptor(); + this.mmrRoot.fromBuffer(reader.readVarSlice()); + this.mmrHashes = new CDataDescriptor(); + this.mmrHashes.fromBuffer(reader.readVarSlice()); + const dataDescriptorsLength = reader.readCompactSize(); + this.dataDescriptors = []; + for (let i = 0; i < dataDescriptorsLength; i++) { + const dataDescriptor = new CDataDescriptor(); + dataDescriptor.fromBuffer(reader.readVarSlice()); + this.dataDescriptors.push(dataDescriptor); + } + return reader.offset; + } + + // CMMRDescriptor Encrypt(const libzcash::SaplingPaymentAddress &saplingAddress, bool includeSSKs=false) const; + // bool WrapEncrypted(const libzcash::SaplingPaymentAddress &saplingAddress, bool includeSSKs=false); + + // CMMRDescriptor Decrypt() const; + // CMMRDescriptor Decrypt(const libzcash::SaplingIncomingViewingKey &ivk) const; + // uint256 DecryptMMRRoot(const libzcash::SaplingIncomingViewingKey &ivk) const; + // uint256 DecryptMMRRoot(const std::vector &Ssk) const; + // uint256 GetMMRRoot() const; + // std::vector DecryptMMRHashes(const libzcash::SaplingIncomingViewingKey &ivk) const; + // std::vector DecryptMMRHashes(const std::vector &Ssk) const; + // std::vector GetMMRHashes() const; + // std::vector DecryptDataDescriptors(const libzcash::SaplingIncomingViewingKey &ivk) const; + // std::vector GetDataDescriptors() const; + // CDataDescriptor DecryptDataDescriptor(int idx, const std::vector &ssk) const; + // CDataDescriptor DecryptDataDescriptor(int idx, const libzcash::SaplingIncomingViewingKey &ivk) const; + // CDataDescriptor GetDataDescriptor(int idx) const; + // CMMRDescriptor AddSymmetricKeys(const libzcash::SaplingIncomingViewingKey &ivk) const; + // CMMRDescriptor AddSymmetricKeys(const std::vector>> &ssks) const; + // std::vector>> GetSymmetricKeys(const libzcash::SaplingIncomingViewingKey &ivk) const; + + HasData(): boolean + { + return !!(this.mmrHashes.objectData && this.dataDescriptors); + } + + IsValid(): boolean + { + return this.version >= CMMRDescriptor.FIRST_VERSION && this.version <= CMMRDescriptor.LAST_VERSION; + } +}; From c67d764801aad8be6c3dec38748314ee18b4acdf Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Thu, 18 Apr 2024 16:58:26 +0100 Subject: [PATCH 085/120] Updates to Classes for Datadescriptor WIP2 --- .../attestation/personalInfo.test.ts | 26 +- src/pbaas/ContentMultiMapRemove.ts | 79 +++ src/pbaas/Rating.ts | 76 +++ src/vdxf/classes/CrossChainDataRef.ts | 312 +++++++++ src/vdxf/classes/DataDescriptor.ts | 616 +++++++++++++----- 5 files changed, 935 insertions(+), 174 deletions(-) create mode 100644 src/pbaas/ContentMultiMapRemove.ts create mode 100644 src/pbaas/Rating.ts create mode 100644 src/vdxf/classes/CrossChainDataRef.ts diff --git a/src/__tests__/attestation/personalInfo.test.ts b/src/__tests__/attestation/personalInfo.test.ts index 585f6f4..235fd8e 100644 --- a/src/__tests__/attestation/personalInfo.test.ts +++ b/src/__tests__/attestation/personalInfo.test.ts @@ -1,19 +1,31 @@ import * as identitykeys from "../../vdxf"; +import { BigNumber } from '../../utils/types/BigNumber'; +import { BN } from 'bn.js'; import {AttestationDataType } from "../../vdxf/classes/Attestation"; import { PersonalProfileDataStore, DataCategory } from "../../vdxf/classes/PersonalProfile"; - +import { CDataDescriptor } from "../../vdxf/classes/DataDescriptor"; describe('Create a personal info request', () => { test('attestation request with reply', async () => { const profileData = new PersonalProfileDataStore(); // requested data from user. - const personalDataCategory = new DataCategory([ - AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_FIRSTNAME.vdxfid, "Fred"), - AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_LASTNAME.vdxfid, "Stones"), - AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY.vdxfid, "USA"), - AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_DATEOFBIRTH.vdxfid, "01/01/1950"), - ], "personal", identitykeys.IDENTITYDATA_PERSONAL_DETAILS.vdxfid); + const personalDataCategory = new CDataDescriptor({ + "version": new BN(1), + "flags": new BN(2), + "objectdata": { + "i4GC1YGEVD21afWudGoFJVdnfjJ5XWnCQv": { + "version": 1, + "flags": 96, + "mimetype": "text/plain", + "objectdata": { + "message": "Chris" + }, + "label": "i4GqsotHGa4czCdtg2d8FVHKfJFzVyBPrM" + } + }, + "salt": Buffer.from("4f66603f256d3f757b6dc3ea44802d4041d2a1901e06005028fd60b85a5878a2", 'hex') + }); profileData.data.personal = personalDataCategory; diff --git a/src/pbaas/ContentMultiMapRemove.ts b/src/pbaas/ContentMultiMapRemove.ts new file mode 100644 index 0000000..f54748f --- /dev/null +++ b/src/pbaas/ContentMultiMapRemove.ts @@ -0,0 +1,79 @@ +import varint from '../utils/varint' +import varuint from '../utils/varuint' +import { fromBase58Check, toBase58Check } from "../utils/address"; +import bufferutils from '../utils/bufferutils' +import { BN } from 'bn.js'; +import { BigNumber } from '../utils/types/BigNumber'; +import { I_ADDR_VERSION } from '../constants/vdxf'; +import { SerializableEntity } from '../utils/types/SerializableEntity'; +const { BufferReader, BufferWriter } = bufferutils + +export class ContentMultiMapRemove implements SerializableEntity { + version: BigNumber; + action: BigNumber; + entryKey: string; + valueHash: Buffer; + + static VERSION_INVALID = new BN(0); + static VERSION_FIRST = new BN(1); + static VERSION_LAST = new BN(1); + static VERSION_CURRENT = new BN(1); + static ACTION_FIRST = new BN(1); + static ACTION_REMOVE_ONE_KEYVALUE = new BN(1); + static ACTION_REMOVE_ALL_KEYVALUE = new BN(2); + static ACTION_REMOVE_ALL_KEY = new BN(3); + static ACTION_CLEAR_MAP = new BN(4); + static ACTION_LAST = new BN(4); + + constructor (data: { version?: BigNumber, action?: BigNumber, entryKey?: string, valueHash?: Buffer}) { + this.version = data.version || new BN(1, 10); + this.action = data.action || new BN(0, 10); + this.entryKey = data.entryKey || ""; + this.valueHash = data.valueHash || Buffer.alloc(0); + } + + getByteLength() { + let byteLength = 0; + + byteLength += 4; // version uint32 + byteLength + 4; // action uint32 + if (this.action != ContentMultiMapRemove.ACTION_CLEAR_MAP){ + byteLength += 20 + if (this.action != ContentMultiMapRemove.ACTION_REMOVE_ALL_KEY){ + byteLength += 32 + } + } + return byteLength + } + + toBuffer () { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) + + bufferWriter.writeUInt32(this.version.toNumber()); + bufferWriter.writeUInt32(this.action.toNumber()); + + if (this.action != ContentMultiMapRemove.ACTION_CLEAR_MAP){ + bufferWriter.writeSlice(fromBase58Check(this.entryKey).hash); + if (this.action != ContentMultiMapRemove.ACTION_REMOVE_ALL_KEY){ + bufferWriter.writeSlice(this.valueHash); + } + } + + return bufferWriter.buffer + } + + fromBuffer (buffer: Buffer, offset: number = 0) { + const reader = new BufferReader(buffer, offset); + + this.version = new BN(reader.readUInt32()); + this.action = new BN(reader.readUInt32()); + + if (this.action != ContentMultiMapRemove.ACTION_CLEAR_MAP){ + this.entryKey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION) + if (this.action != ContentMultiMapRemove.ACTION_REMOVE_ALL_KEY){ + this.valueHash = reader.readSlice(32) + } + } + return reader.offset; + } +} \ No newline at end of file diff --git a/src/pbaas/Rating.ts b/src/pbaas/Rating.ts new file mode 100644 index 0000000..3c66ce4 --- /dev/null +++ b/src/pbaas/Rating.ts @@ -0,0 +1,76 @@ +import varint from '../utils/varint' +import varuint from '../utils/varuint' +import { fromBase58Check, toBase58Check } from "../utils/address"; +import bufferutils from '../utils/bufferutils' +import { BN } from 'bn.js'; +import { BigNumber } from '../utils/types/BigNumber'; +import { I_ADDR_VERSION } from '../constants/vdxf'; +import { SerializableEntity } from '../utils/types/SerializableEntity'; +const { BufferReader, BufferWriter } = bufferutils + +export class Rating implements SerializableEntity { + version: BigNumber; + trustLevel: BigNumber; + ratings: Map; + + constructor (data: { version?: BigNumber, trustLevel?: BigNumber, ratings?: Map} = {}) { + this.version = data.version || new BN(1, 10); + this.trustLevel = data.trustLevel || new BN(0, 10); + this.ratings = new Map(data.ratings || []); + } + + getByteLength() { + let byteLength = 0; + + byteLength += 4; // version uint32 + byteLength + 1; // trustLevel uint8 + byteLength += varuint.encodingLength(this.ratings.size); + + for (const [key, value] of this.ratings) { + byteLength += 20 + byteLength += varint.encodingLength(new BN(value.length)) + byteLength += value.length + + } + + return byteLength + } + + toBuffer () { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) + + bufferWriter.writeUInt32(this.version.toNumber()); + bufferWriter.writeUInt8(this.trustLevel.toNumber()); + + bufferWriter.writeCompactSize(this.ratings.size); + + for (const [key, value] of this.ratings) { + const { hash } = fromBase58Check(key); + + bufferWriter.writeSlice(hash); + bufferWriter.writeVarSlice(value); + } + + return bufferWriter.buffer + } + + fromBuffer (buffer: Buffer, offset: number = 0) { + const reader = new BufferReader(buffer, offset); + + this.version = new BN(reader.readUInt32()); + this.trustLevel = new BN(reader.readUInt8()); + + const count = reader.readCompactSize(); + + for (let i = 0; i < count; i++) { + const hash = reader.readSlice(20) + const value = reader.readVarSlice() + + const base58Key = toBase58Check(hash, I_ADDR_VERSION) + + this.ratings.set(base58Key, value) + } + + return reader.offset; + } +} \ No newline at end of file diff --git a/src/vdxf/classes/CrossChainDataRef.ts b/src/vdxf/classes/CrossChainDataRef.ts new file mode 100644 index 0000000..2c1ff65 --- /dev/null +++ b/src/vdxf/classes/CrossChainDataRef.ts @@ -0,0 +1,312 @@ +import varint from '../../utils/varint' +import varuint from '../../utils/varuint' +import { fromBase58Check, toBase58Check } from "../../utils/address"; +import bufferutils from '../../utils/bufferutils' +import { BN } from 'bn.js'; +import { BigNumber } from '../../utils/types/BigNumber'; +import { I_ADDR_VERSION } from '../../constants/vdxf'; +import { SerializableEntity } from '../../utils/types/SerializableEntity'; +import { read } from 'fs'; +const { BufferReader, BufferWriter } = bufferutils + +export class CUTXORef implements SerializableEntity { + hash: Buffer; + n: BigNumber; + + constructor(data?: { hash?: Buffer, n?: BigNumber }) { + this.hash = data.hash || Buffer.alloc(0); + this.n = data.n || new BN(0); + } + + getByteLength() { + let byteLength = 0; + + byteLength += 32; // hash uint256 + byteLength += 4; // n uint32 + + return byteLength + } + + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) + + bufferWriter.writeSlice(this.hash); + bufferWriter.writeUInt32(this.n.toNumber()); + + return bufferWriter.buffer + } + + fromBuffer(buffer: Buffer, offset: number = 0) { + const reader = new BufferReader(buffer, offset); + + this.hash = reader.readSlice(32); + this.n = new BN(reader.readUInt32()); + + return reader.offset; + } +} + + +export class PBaaSEvidenceRef implements SerializableEntity { + version: BigNumber; + flags: BigNumber; + output: CUTXORef; + objectNum: BigNumber; + subObject: BigNumber; + systemID: string; + + static FLAG_ISEVIDENCE = new BN(1) + static FLAG_HAS_SYSTEM = new BN(2) + + constructor(data?) { + + if (data) { + Object.assign(this, data) + } + } + + SetFlags() { + this.flags = this.flags.and(PBaaSEvidenceRef.FLAG_ISEVIDENCE); + if (this.systemID && this.systemID.length > 0) { + this.flags = this.flags.or(PBaaSEvidenceRef.FLAG_HAS_SYSTEM); + } + + } + + getByteLength() { + let byteLength = 0; + this.SetFlags(); + + byteLength += varint.encodingLength(this.version); + byteLength += varint.encodingLength(this.flags); + byteLength += this.output.getByteLength(); + byteLength += varint.encodingLength(this.objectNum); + byteLength += varint.encodingLength(this.subObject); + + if (this.flags.and(PBaaSEvidenceRef.FLAG_HAS_SYSTEM).gt(new BN(0))) { + byteLength += 20; + } + + return byteLength + } + + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) + + bufferWriter.writeVarInt(this.version); + bufferWriter.writeVarInt(this.flags); + bufferWriter.writeSlice(this.output.toBuffer()); + bufferWriter.writeVarInt(this.objectNum); + bufferWriter.writeVarInt(this.subObject); + + if (this.flags.and(PBaaSEvidenceRef.FLAG_HAS_SYSTEM).gt(new BN(0))) { + bufferWriter.writeSlice(fromBase58Check(this.systemID).hash); + } + + return bufferWriter.buffer + } + + fromBuffer(buffer: Buffer, offset: number = 0) { + const reader = new BufferReader(buffer, offset); + + this.version = reader.readVarInt(); + this.flags = reader.readVarInt(); + this.output = new CUTXORef(); + offset = this.output.fromBuffer(reader.buffer, reader.offset); + this.objectNum = reader.readVarInt(); + this.subObject = reader.readVarInt(); + + if (this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH).gt(new BN(0))) { + this.systemID = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + } + + return reader.offset; + } +} + +export class IdentityMultimapRef implements SerializableEntity { + version: BigNumber; + flags: BigNumber; + idID: string; + key: string; + heightStart: BigNumber; + heightEnd: BigNumber; + dataHash: Buffer; + systemID: string; + + static FLAG_NO_DELETION = new BN(1) + static FLAG_HAS_DATAHASH = new BN(2) + static FLAG_HAS_SYSTEM = new BN(4) + + constructor(data?) { + + if (data) { + Object.assign(this, data) + } + } + + SetFlags() { + this.flags = this.flags.and(IdentityMultimapRef.FLAG_NO_DELETION); + if (this.dataHash && this.dataHash.length > 0) { + this.flags = this.flags.or(IdentityMultimapRef.FLAG_HAS_DATAHASH); + } + if (this.systemID && this.systemID.length > 0) { + this.flags = this.flags.or(IdentityMultimapRef.FLAG_HAS_SYSTEM); + } + } + + getByteLength() { + let byteLength = 0; + this.SetFlags(); + + byteLength += varint.encodingLength(this.version); + byteLength += varint.encodingLength(this.flags); + byteLength += 20; // idID uint160 + byteLength += 20; // key uint160 + byteLength += 4; // heightStart uint32 + byteLength += 4; // heightEnd uint32 + byteLength += 32; // dataHash uint25 + + if (this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH).gt(new BN(0))) { + byteLength += 32; + } + + if (this.flags.and(IdentityMultimapRef.FLAG_HAS_SYSTEM).gt(new BN(0))) { + byteLength += 20 + } + return byteLength + } + + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) + + bufferWriter.writeVarInt(this.version); + bufferWriter.writeVarInt(this.flags); + bufferWriter.writeSlice(fromBase58Check(this.idID).hash); + bufferWriter.writeSlice(fromBase58Check(this.key).hash); + bufferWriter.writeVarInt(this.heightStart); + bufferWriter.writeVarInt(this.heightEnd); + + if (this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH).gt(new BN(0))) { + bufferWriter.writeSlice(this.dataHash); + } + if (this.flags.and(IdentityMultimapRef.FLAG_HAS_SYSTEM).gt(new BN(0))) { + bufferWriter.writeSlice(fromBase58Check(this.systemID).hash); + } + + return bufferWriter.buffer + } + + fromBuffer(buffer: Buffer, offset: number = 0) { + const reader = new BufferReader(buffer, offset); + + this.version = reader.readVarInt(); + this.flags = reader.readVarInt(); + this.idID = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + this.key = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + this.heightStart = reader.readVarInt(); + this.heightEnd = reader.readVarInt(); + + if (this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH).gt(new BN(0))) { + this.dataHash = reader.readSlice(32); + } + + if (this.flags.and(IdentityMultimapRef.FLAG_HAS_SYSTEM).gt(new BN(0))) { + this.systemID = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + } + return reader.offset; + } +} + +export class URLRef implements SerializableEntity { + version: BigNumber; + url: string; + constructor(data?: { version?: BigNumber, url?: string }) { + + if (data) { + this.version = data.version || new BN(1, 10); + this.url = data.url || ""; + } + } + + getByteLength() { + let byteLength = 0; + + byteLength += varint.encodingLength(this.version); + byteLength += varuint.encodingLength(Buffer.from(this.url, 'utf8').length); + byteLength += Buffer.from(this.url, 'utf8').length; + if (byteLength > 4096) + throw new Error("URLRef exceeds maximum length of 4096 bytes") + return byteLength + } + + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) + + bufferWriter.writeVarInt(this.version); + bufferWriter.writeVarSlice(Buffer.from(this.url, 'utf8')); + + return bufferWriter.buffer + } + + fromBuffer(buffer: Buffer, offset: number = 0) { + const reader = new BufferReader(buffer, offset); + + this.version = reader.readVarInt(); + this.url = reader.readVarSlice().toString('utf8'); + + return reader.offset; + } +} + +export class CrossChainDataRef implements SerializableEntity { + ref: PBaaSEvidenceRef | IdentityMultimapRef | URLRef; + + static TYPE_CROSSCHAIN_DATAREF = 0; + static TYPE_IDENTITY_DATAREF = 1; + static TYPE_URL_REF = 2; + + constructor(data: PBaaSEvidenceRef | IdentityMultimapRef | URLRef | any) { + this.ref = data || null; + } + + which(): number { + if (this.ref instanceof PBaaSEvidenceRef) { + return CrossChainDataRef.TYPE_CROSSCHAIN_DATAREF; + } else if (this.ref instanceof IdentityMultimapRef) { + return CrossChainDataRef.TYPE_IDENTITY_DATAREF; + } else if (this.ref instanceof URLRef) { + return CrossChainDataRef.TYPE_URL_REF; + } + } + + getByteLength() { + let byteLength = 1; //type uint8 + byteLength += this.ref.getByteLength(); + return byteLength + } + + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) + bufferWriter.writeUInt8(this.which()); + bufferWriter.writeSlice(this.ref.toBuffer()); + return bufferWriter.buffer + } + + fromBuffer(buffer: Buffer, offset: number = 0) { + const reader = new BufferReader(buffer, offset); + + const type = reader.readUInt8(); + + if (type == CrossChainDataRef.TYPE_CROSSCHAIN_DATAREF) { + this.ref = new PBaaSEvidenceRef(); + } else if (type == CrossChainDataRef.TYPE_IDENTITY_DATAREF) { + this.ref = new IdentityMultimapRef(); + } else if (type == CrossChainDataRef.TYPE_URL_REF) { + this.ref = new URLRef(); + } + + offset = this.ref.fromBuffer(buffer, reader.offset); + return reader.offset; + } +} \ No newline at end of file diff --git a/src/vdxf/classes/DataDescriptor.ts b/src/vdxf/classes/DataDescriptor.ts index f9d5b78..ffeae51 100644 --- a/src/vdxf/classes/DataDescriptor.ts +++ b/src/vdxf/classes/DataDescriptor.ts @@ -6,6 +6,13 @@ import varint from '../../utils/varint' import varuint from '../../utils/varuint' import bufferutils from '../../utils/bufferutils' const { BufferReader, BufferWriter } = bufferutils +import { isHexString } from '../../utils/string'; +import { fromBase58Check, toBase58Check } from '../../utils/address'; +import {CurrencyValueMap} from '../../pbaas/CurrencyValueMap'; +import { Rating } from '../../pbaas/Rating'; +import { TransferDestination } from '../../pbaas/TransferDestination'; +import { ContentMultiMapRemove } from '../../pbaas/ContentMultiMapRemove'; +import { CrossChainDataRef } from './CrossChainDataRef'; export class CDataDescriptor { @@ -30,7 +37,6 @@ export class CDataDescriptor { CDataDescriptor.FLAG_LABEL_PRESENT).add( CDataDescriptor.FLAG_MIME_TYPE_PRESENT)); - version: BigNumber; flags: BigNumber; objectData: Buffer; // either direct data or serialized UTXORef +offset, length, and/or other type of info for different links @@ -44,7 +50,7 @@ export class CDataDescriptor { constructor(data?: { version?: BigNumber, flags?: BigNumber, - objectData?: Buffer, + objectData?: Buffer | , label?: string, mimeType?: string, salt?: Buffer, @@ -87,38 +93,38 @@ export class CDataDescriptor { length += varuint.encodingLength(this.objectData.length); length += this.objectData.length; - if(this.HasLabel()) { - if(this.label.length > 64) { + if (this.HasLabel()) { + if (this.label.length > 64) { throw new Error("Label too long"); } length += varuint.encodingLength(this.label.length); length += this.label.length; } - if(this.HasMIME()) { - if(this.mimeType.length > 128) { + if (this.HasMIME()) { + if (this.mimeType.length > 128) { throw new Error("MIME type too long"); } length += varuint.encodingLength(this.mimeType.length); length += this.mimeType.length; } - if(this.HasSalt()) { + if (this.HasSalt()) { length += varuint.encodingLength(this.salt.length); length += this.salt.length; } - if(this.HasEPK()) { + if (this.HasEPK()) { length += varuint.encodingLength(this.epk.length); length += this.epk.length; } - if(this.HasIVK()) { + if (this.HasIVK()) { length += varuint.encodingLength(this.ivk.length); length += this.ivk.length; } - if(this.HasSSK()) { + if (this.HasSSK()) { length += varuint.encodingLength(this.ssk.length); length += this.ssk.length; } @@ -127,32 +133,32 @@ export class CDataDescriptor { toBuffer(): Buffer { const writer = new BufferWriter(Buffer.alloc(this.byteLength())); - + writer.writeVarInt(this.version); writer.writeVarInt(this.flags); writer.writeVarSlice(this.objectData); - if(this.HasLabel()) { + if (this.HasLabel()) { writer.writeVarSlice(Buffer.from(this.label)); } - if(this.HasMIME()) { + if (this.HasMIME()) { writer.writeVarSlice(Buffer.from(this.mimeType)); } - if(this.HasSalt()) { + if (this.HasSalt()) { writer.writeVarSlice(this.salt); } - if(this.HasEPK()) { + if (this.HasEPK()) { writer.writeVarSlice(this.epk); } - if(this.HasIVK()) { + if (this.HasIVK()) { writer.writeVarSlice(this.ivk); } - if(this.HasSSK()) { + if (this.HasSSK()) { writer.writeVarSlice(this.ssk); } @@ -160,33 +166,33 @@ export class CDataDescriptor { } - fromBuffer(buffer: Buffer):number { + fromBuffer(buffer: Buffer): number { const reader = new BufferReader(buffer); this.version = reader.readVarInt(); this.flags = reader.readVarInt(); this.objectData = reader.readVarSlice(); - if(this.HasLabel()) { + if (this.HasLabel()) { this.label = reader.readVarSlice().toString(); } - if(this.HasMIME()) { + if (this.HasMIME()) { this.mimeType = reader.readVarSlice().toString(); } - if(this.HasSalt()) { + if (this.HasSalt()) { this.salt = reader.readVarSlice(); } - if(this.HasEPK()) { + if (this.HasEPK()) { this.epk = reader.readVarSlice(); } - if(this.HasIVK()) { + if (this.HasIVK()) { this.ivk = reader.readVarSlice(); } - if(this.HasSSK()) { + if (this.HasSSK()) { this.ssk = reader.readVarSlice(); } return reader.offset; @@ -788,7 +794,7 @@ export class CVDXF_Data extends BufferDataVdxfObject { } } - GetHash(){}; + GetHash() { }; }; export class CVDXFDataDescriptor extends BufferDataVdxfObject { @@ -817,7 +823,7 @@ export class CVDXFDataDescriptor extends BufferDataVdxfObject { } toDataBuffer(): Buffer { - + return this.dataDescriptor.toBuffer(); } @@ -883,60 +889,58 @@ export class CVDXFDataDescriptor extends BufferDataVdxfObject { return this.dataDescriptor.SetFlags(); } -// CVDXFDataDescriptor(const std:: vector & ObjectData, -// const std:: string & Label=std:: string(), -// const std:: string & MimeType=std:: string(), -// const std:: vector & Salt=std:: vector < unsigned char > (), -// const std:: vector & EPK=std:: vector < unsigned char > (), -// const std:: vector & IVK=std:: vector < unsigned char > (), -// const std:: vector & SSK=std:: vector < unsigned char > (), -// uint32_t Flags = 0, -// uint32_t Version = DEFAULT_VERSION) : -// dataDescriptor(ObjectData, Label, MimeType, Salt, EPK, IVK, SSK, Flags, Version), CVDXF_Data(CVDXF_Data:: DataDescriptorKey(), std:: vector < unsigned char > (), Version) -// { -// } - -// ADD_SERIALIZE_METHODS; - -// template < typename Stream, typename Operation > -// inline void SerializationOp(Stream & s, Operation ser_action) { -// READWRITE(* (CVDXF *)this); - -// if (ser_action.ForRead()) { -// if (IsValid()) { -// READWRITE(data); -// CDataStream readData(data, SER_DISK, PROTOCOL_VERSION); -// data.clear(); -// readData >> dataDescriptor; -// } -// } -// else { -// if (IsValid()) { -// CDataStream writeData(SER_DISK, PROTOCOL_VERSION); -// writeData << dataDescriptor; -// std:: vector < unsigned char > vch(writeData.begin(), writeData.end()); -// READWRITE(vch); -// } -// } -// } - - + // CVDXFDataDescriptor(const std:: vector & ObjectData, + // const std:: string & Label=std:: string(), + // const std:: string & MimeType=std:: string(), + // const std:: vector & Salt=std:: vector < unsigned char > (), + // const std:: vector & EPK=std:: vector < unsigned char > (), + // const std:: vector & IVK=std:: vector < unsigned char > (), + // const std:: vector & SSK=std:: vector < unsigned char > (), + // uint32_t Flags = 0, + // uint32_t Version = DEFAULT_VERSION) : + // dataDescriptor(ObjectData, Label, MimeType, Salt, EPK, IVK, SSK, Flags, Version), CVDXF_Data(CVDXF_Data:: DataDescriptorKey(), std:: vector < unsigned char > (), Version) + // { + // } + + // ADD_SERIALIZE_METHODS; + + // template < typename Stream, typename Operation > + // inline void SerializationOp(Stream & s, Operation ser_action) { + // READWRITE(* (CVDXF *)this); + + // if (ser_action.ForRead()) { + // if (IsValid()) { + // READWRITE(data); + // CDataStream readData(data, SER_DISK, PROTOCOL_VERSION); + // data.clear(); + // readData >> dataDescriptor; + // } + // } + // else { + // if (IsValid()) { + // CDataStream writeData(SER_DISK, PROTOCOL_VERSION); + // writeData << dataDescriptor; + // std:: vector < unsigned char > vch(writeData.begin(), writeData.end()); + // READWRITE(vch); + // } + // } + // } + + }; -export enum EHashTypes -{ - HASH_INVALID = 0, - HASH_BLAKE2BMMR = 1, - HASH_BLAKE2BMMR2 = 2, - HASH_KECCAK = 3, - HASH_SHA256D = 4, - HASH_SHA256 = 5, - HASH_LASTTYPE = 5 +export enum EHashTypes { + HASH_INVALID = 0, + HASH_BLAKE2BMMR = 1, + HASH_BLAKE2BMMR2 = 2, + HASH_KECCAK = 3, + HASH_SHA256D = 4, + HASH_SHA256 = 5, + HASH_LASTTYPE = 5 }; -export class CMMRDescriptor -{ +export class CMMRDescriptor { static VERSION_INVALID = new BN(0); static FIRST_VERSION = new BN(1); static LAST_VERSION = new BN(1); @@ -944,109 +948,387 @@ export class CMMRDescriptor version: BigNumber; objectHashType: EHashTypes; - mmrHashType: EHashTypes; + mmrHashType: EHashTypes; mmrRoot: CDataDescriptor; mmrHashes: CDataDescriptor; dataDescriptors: CDataDescriptor[]; - constructor(data?:{ version: BigNumber, - objectHashType: EHashTypes, - mmrHashType: EHashTypes, + constructor(data?: { + version: BigNumber, + objectHashType: EHashTypes, + mmrHashType: EHashTypes, mmrRoot: CDataDescriptor, - mmrHashes: CDataDescriptor, - dataDescriptors: CDataDescriptor[] }) { - - if (data) { - if (data.version) this.version = data.version; - if (data.objectHashType) this.objectHashType = data.objectHashType; - if (data.mmrHashType) this.mmrHashType = data.mmrHashType; - if (data.mmrRoot) this.mmrRoot = data.mmrRoot; - if (data.mmrHashes) this.mmrHashes = data.mmrHashes; - if (data.dataDescriptors) this.dataDescriptors = data.dataDescriptors; - } else { - this.version = CMMRDescriptor.DEFAULT_VERSION; + mmrHashes: CDataDescriptor, + dataDescriptors: CDataDescriptor[] + }) { + + if (data) { + if (data.version) this.version = data.version; + if (data.objectHashType) this.objectHashType = data.objectHashType; + if (data.mmrHashType) this.mmrHashType = data.mmrHashType; + if (data.mmrRoot) this.mmrRoot = data.mmrRoot; + if (data.mmrHashes) this.mmrHashes = data.mmrHashes; + if (data.dataDescriptors) this.dataDescriptors = data.dataDescriptors; + } else { + this.version = CMMRDescriptor.DEFAULT_VERSION; + } + } + + byteLength(): number { + let length = 0; + + length += varint.encodingLength(this.version); + length += varint.encodingLength(new BN(this.objectHashType)); + length += varint.encodingLength(new BN(this.mmrHashType)); + length += this.mmrRoot.byteLength(); + length += this.mmrHashes.byteLength(); + length += varuint.encodingLength(this.dataDescriptors.length); + this.dataDescriptors.forEach((dataDescriptor) => { + length += dataDescriptor.byteLength(); + }); + + return length; + } + + toBuffer(): Buffer { + + const writer = new BufferWriter(Buffer.alloc(this.byteLength())); + + writer.writeVarInt(this.version); + writer.writeVarInt(new BN(this.objectHashType)); + writer.writeVarInt(new BN(this.mmrHashType)); + writer.writeSlice(this.mmrRoot.toBuffer()); + writer.writeSlice(this.mmrHashes.toBuffer()); + writer.writeCompactSize(this.dataDescriptors.length); + + this.dataDescriptors.forEach((dataDescriptor) => { + writer.writeSlice(dataDescriptor.toBuffer()); + }); + return writer.buffer; + } + + fromBuffer(buffer: Buffer, offset?: number): number { + const reader = new BufferReader(buffer, offset); + this.version = reader.readVarInt(); + this.objectHashType = reader.readVarInt().toNumber(); + this.mmrHashType = reader.readVarInt().toNumber(); + this.mmrRoot = new CDataDescriptor(); + this.mmrRoot.fromBuffer(reader.readVarSlice()); + this.mmrHashes = new CDataDescriptor(); + this.mmrHashes.fromBuffer(reader.readVarSlice()); + const dataDescriptorsLength = reader.readCompactSize(); + this.dataDescriptors = []; + for (let i = 0; i < dataDescriptorsLength; i++) { + const dataDescriptor = new CDataDescriptor(); + dataDescriptor.fromBuffer(reader.readVarSlice()); + this.dataDescriptors.push(dataDescriptor); + } + return reader.offset; + } + + // CMMRDescriptor Encrypt(const libzcash::SaplingPaymentAddress &saplingAddress, bool includeSSKs=false) const; + // bool WrapEncrypted(const libzcash::SaplingPaymentAddress &saplingAddress, bool includeSSKs=false); + + // CMMRDescriptor Decrypt() const; + // CMMRDescriptor Decrypt(const libzcash::SaplingIncomingViewingKey &ivk) const; + // uint256 DecryptMMRRoot(const libzcash::SaplingIncomingViewingKey &ivk) const; + // uint256 DecryptMMRRoot(const std::vector &Ssk) const; + // uint256 GetMMRRoot() const; + // std::vector DecryptMMRHashes(const libzcash::SaplingIncomingViewingKey &ivk) const; + // std::vector DecryptMMRHashes(const std::vector &Ssk) const; + // std::vector GetMMRHashes() const; + // std::vector DecryptDataDescriptors(const libzcash::SaplingIncomingViewingKey &ivk) const; + // std::vector GetDataDescriptors() const; + // CDataDescriptor DecryptDataDescriptor(int idx, const std::vector &ssk) const; + // CDataDescriptor DecryptDataDescriptor(int idx, const libzcash::SaplingIncomingViewingKey &ivk) const; + // CDataDescriptor GetDataDescriptor(int idx) const; + // CMMRDescriptor AddSymmetricKeys(const libzcash::SaplingIncomingViewingKey &ivk) const; + // CMMRDescriptor AddSymmetricKeys(const std::vector>> &ssks) const; + // std::vector>> GetSymmetricKeys(const libzcash::SaplingIncomingViewingKey &ivk) const; + + HasData(): boolean { + return !!(this.mmrHashes.objectData && this.dataDescriptors); + } + + IsValid(): boolean { + return this.version >= CMMRDescriptor.FIRST_VERSION && this.version <= CMMRDescriptor.LAST_VERSION; + } +}; + +const VectorEncodeVDXFUni = (obj): Buffer => { + let ss = Buffer.from(''); + + if (typeof (obj) != 'object') { + if (typeof (obj) != 'string') throw new Error('VectorEncodeVDXFUni: not JSON string as expected'); + if (isHexString(obj)) { + return Buffer.from(obj, "hex"); + } + return Buffer.from(obj, "utf-8"); + } + + if (obj.serializedHex) { + if (!isHexString(obj.serializedHex)) { + throw new Error("contentmap: If the \"serializedhex\" key is present, it's data must be only valid hex and complete"); + } + return Buffer.from(obj.serializedHex); + } + + if (obj.serializedBase64) { + try { + return Buffer.from(obj.serializedBase64, 'base64'); + } catch (e) { + throw new Error("contentmap: If the \"serializedBase64\" key is present, it's data must be only valid base64 and complete"); + } + } + + if (obj.message) { + return Buffer.from(obj, "utf-8"); + } + + // this should be an object with "vdxfkey" as the key and {object} as the json object to serialize + const oneValKeys = Object.keys(obj); + const oneValValues = Object.values(obj); + + // TODO: change if / else to a map lookup + + for (let k = 0; k < oneValKeys.length; k++) { + const objTypeKey = oneValKeys[k]; + if (objTypeKey == CVDXF_Data.DataByteKey().vdxfid) { + const oneByte = Buffer.from(oneValValues[k] as string, "hex"); + if (oneByte.length != 1) { + throw new Error("contentmap: byte data must be exactly one byte"); + } + ss = Buffer.concat([ss, oneByte]); + } + else if (objTypeKey == CVDXF_Data.DataInt16Key().vdxfid) { + const oneShort = Buffer.alloc(2); + oneShort.writeInt16LE(oneValValues[k] as number); + ss = Buffer.concat([ss, oneShort]); + } + else if (objTypeKey == CVDXF_Data.DataUint16Key().vdxfid) { + const oneUShort = Buffer.alloc(2); + oneUShort.writeUInt16LE(oneValValues[k] as number); + ss = Buffer.concat([ss, oneUShort]); + } + else if (objTypeKey == CVDXF_Data.DataInt32Key().vdxfid) { + const oneInt = Buffer.alloc(4); + oneInt.writeInt32LE(oneValValues[k] as number); + ss = Buffer.concat([ss, oneInt]); + + } + else if (objTypeKey == CVDXF_Data.DataUint32Key().vdxfid) { + const oneUInt = Buffer.alloc(4); + oneUInt.writeUInt32LE(oneValValues[k] as number); + ss = Buffer.concat([ss, oneUInt]); + } + else if (objTypeKey == CVDXF_Data.DataInt64Key().vdxfid) { + const oneInt64 = Buffer.alloc(8); + oneInt64.writeIntLE(oneValValues[k] as number, 0, 8); + ss = Buffer.concat([ss, oneInt64]); + } + else if (objTypeKey == CVDXF_Data.DataUint160Key().vdxfid) { + const oneKey = fromBase58Check(oneValValues[k] as string).hash; + ss = Buffer.concat([ss, oneKey]); + } + else if (objTypeKey == CVDXF_Data.DataUint256Key().vdxfid) { + const oneHash = Buffer.from(oneValValues[k] as string, "hex"); + if (oneHash.length != 32) { + throw new Error("contentmap: hash data must be exactly 32 bytes"); } + ss = Buffer.concat([ss, oneHash.reverse()]); } + else if (objTypeKey == CVDXF_Data.DataStringKey().vdxfid) { + + let length = 20; + length += 1; + length += varuint.encodingLength((oneValValues[k] as string).length) + Buffer.from(oneValValues[k] as string, "utf-8").length; + length += varuint.encodingLength((oneValValues[k] as string).length); + length += Buffer.from(oneValValues[k] as string, "utf-8").length; + + const writer = new BufferWriter(Buffer.alloc(length)); - byteLength(): number { - let length = 0; + writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeVarInt(new BN(1)); + writer.writeCompactSize((oneValValues[k] as string).length + Buffer.from(oneValValues[k] as string, "utf-8").length); + writer.writeCompactSize((oneValValues[k] as string).length); + writer.writeSlice(Buffer.from(oneValValues[k] as string, "utf-8")); - length += varint.encodingLength(this.version); - length += varint.encodingLength(new BN(this.objectHashType)); - length += varint.encodingLength(new BN(this.mmrHashType)); - length += this.mmrRoot.byteLength(); - length += this.mmrHashes.byteLength(); - length += varuint.encodingLength(this.dataDescriptors.length); - this.dataDescriptors.forEach((dataDescriptor) => { - length += dataDescriptor.byteLength(); - }); + ss = Buffer.concat([ss, writer.buffer]); - return length; + // ss << objTypeKey; + // ss << VARINT(1); + // std::string stringVal = uni_get_str(oneValValues[k]); + // ss << COMPACTSIZE((uint64_t)GetSerializeSize(ss, stringVal).vdxfid); + // ss << stringVal; } + else if (objTypeKey == CVDXF_Data.DataByteVectorKey().vdxfid) { - toBuffer(): Buffer { + let length = 20; + length += 1; + length += varuint.encodingLength(Buffer.from(oneValValues[k] as string, "hex").length) + Buffer.from(oneValValues[k] as string, "hex").length; + length += varuint.encodingLength(Buffer.from(oneValValues[k] as string, "hex").length); + length += Buffer.from(oneValValues[k] as string, "hex").length; - const writer = new BufferWriter(Buffer.alloc(this.byteLength())); - - writer.writeVarInt(this.version); - writer.writeVarInt(new BN(this.objectHashType)); - writer.writeVarInt(new BN(this.mmrHashType)); - writer.writeSlice(this.mmrRoot.toBuffer()); - writer.writeSlice(this.mmrHashes.toBuffer()); - writer.writeCompactSize(this.dataDescriptors.length); - - this.dataDescriptors.forEach((dataDescriptor) => { - writer.writeSlice(dataDescriptor.toBuffer()); - }); - return writer.buffer; - } - - fromBuffer(buffer: Buffer, offset?: number): number { - const reader = new BufferReader(buffer, offset); - this.version = reader.readVarInt(); - this.objectHashType = reader.readVarInt().toNumber(); - this.mmrHashType = reader.readVarInt().toNumber(); - this.mmrRoot = new CDataDescriptor(); - this.mmrRoot.fromBuffer(reader.readVarSlice()); - this.mmrHashes = new CDataDescriptor(); - this.mmrHashes.fromBuffer(reader.readVarSlice()); - const dataDescriptorsLength = reader.readCompactSize(); - this.dataDescriptors = []; - for (let i = 0; i < dataDescriptorsLength; i++) { - const dataDescriptor = new CDataDescriptor(); - dataDescriptor.fromBuffer(reader.readVarSlice()); - this.dataDescriptors.push(dataDescriptor); - } - return reader.offset; - } - - // CMMRDescriptor Encrypt(const libzcash::SaplingPaymentAddress &saplingAddress, bool includeSSKs=false) const; - // bool WrapEncrypted(const libzcash::SaplingPaymentAddress &saplingAddress, bool includeSSKs=false); - - // CMMRDescriptor Decrypt() const; - // CMMRDescriptor Decrypt(const libzcash::SaplingIncomingViewingKey &ivk) const; - // uint256 DecryptMMRRoot(const libzcash::SaplingIncomingViewingKey &ivk) const; - // uint256 DecryptMMRRoot(const std::vector &Ssk) const; - // uint256 GetMMRRoot() const; - // std::vector DecryptMMRHashes(const libzcash::SaplingIncomingViewingKey &ivk) const; - // std::vector DecryptMMRHashes(const std::vector &Ssk) const; - // std::vector GetMMRHashes() const; - // std::vector DecryptDataDescriptors(const libzcash::SaplingIncomingViewingKey &ivk) const; - // std::vector GetDataDescriptors() const; - // CDataDescriptor DecryptDataDescriptor(int idx, const std::vector &ssk) const; - // CDataDescriptor DecryptDataDescriptor(int idx, const libzcash::SaplingIncomingViewingKey &ivk) const; - // CDataDescriptor GetDataDescriptor(int idx) const; - // CMMRDescriptor AddSymmetricKeys(const libzcash::SaplingIncomingViewingKey &ivk) const; - // CMMRDescriptor AddSymmetricKeys(const std::vector>> &ssks) const; - // std::vector>> GetSymmetricKeys(const libzcash::SaplingIncomingViewingKey &ivk) const; - - HasData(): boolean - { - return !!(this.mmrHashes.objectData && this.dataDescriptors); - } - - IsValid(): boolean - { - return this.version >= CMMRDescriptor.FIRST_VERSION && this.version <= CMMRDescriptor.LAST_VERSION; + const writer = new BufferWriter(Buffer.alloc(length)); + + writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeVarInt(new BN(1)); + writer.writeCompactSize(Buffer.from(oneValValues[k] as string, "hex").length + Buffer.from(oneValValues[k] as string, "hex").length); + writer.writeCompactSize(Buffer.from(oneValValues[k] as string, "hex").length); + writer.writeSlice(Buffer.from(oneValValues[k] as string, "hex")); + + ss = Buffer.concat([ss, writer.buffer]); + + // ss << objTypeKey; + // ss << VARINT(1); + // std:: vector < unsigned char > byteVec = ParseHex(uni_get_str(oneValValues[k])); + // ss << COMPACTSIZE((uint64_t)GetSerializeSize(ss, byteVec)); + // ss << byteVec; } -}; + else if (objTypeKey == CVDXF_Data.DataCurrencyMapKey().vdxfid) { + + const destinations = Object.keys(oneValValues[k]); + const values = Object.values(oneValValues[k]); + + const oneCurMap = new CurrencyValueMap({value_map: new Map(destinations.map((key, index) => [key, new BN(values[index])])) , multivalue: true}); + + let length = 20; + length += 1; + length += varuint.encodingLength(oneCurMap.getByteLength()); + length += oneCurMap.getByteLength(); + + const writer = new BufferWriter(Buffer.alloc(length)); + + writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeVarInt(new BN(1)); + writer.writeCompactSize(oneCurMap.getByteLength()); + writer.writeSlice(oneCurMap.toBuffer()); + + // CCurrencyValueMap oneCurMap(oneValValues[k]); + // ss << objTypeKey; + // ss << VARINT(1); + // ss << COMPACTSIZE((uint64_t)GetSerializeSize(ss, oneCurMap)); + // ss << oneCurMap; + } + else if (objTypeKey == CVDXF_Data.DataRatingsKey().vdxfid) { + + const version = new BN((oneValValues[k] as {version: number}).version); + const trustLevel = new BN((oneValValues[k] as {trustLevel: number}).trustLevel); + + const destinations = Object.keys((oneValValues[k] as {rating: BigNumber}).rating); + const values = Object.values(oneValValues[k]); + + const oneRatingMap = new Rating({ratings: new Map(destinations.map((key, index) => [key, Buffer.from(values[index], 'hex')])), version, trustLevel}); + + let length = 20; + length += varint.encodingLength(oneRatingMap.version); + length += varuint.encodingLength(oneRatingMap.getByteLength()); + length += oneRatingMap.getByteLength(); + + const writer = new BufferWriter(Buffer.alloc(length)); + + writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeVarInt(oneRatingMap.version); + writer.writeCompactSize(oneRatingMap.getByteLength()); + writer.writeSlice(oneRatingMap.toBuffer()); + + // CRating oneRatingObj(oneValValues[k]); + // ss << objTypeKey; + // ss << VARINT(oneRatingObj.version); + // ss << COMPACTSIZE((uint64_t)GetSerializeSize(ss, oneRatingObj)); + // ss << oneRatingObj; + } + else if (objTypeKey == CVDXF_Data.DataTransferDestinationKey().vdxfid) { + + const transferDest = new TransferDestination(oneValValues[k]); + + let length = 20; + length += varint.encodingLength(transferDest.typeNoFlags()); + length += varuint.encodingLength(transferDest.getByteLength()); + length += transferDest.getByteLength(); + + const writer = new BufferWriter(Buffer.alloc(length)); + + writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeVarInt(transferDest.typeNoFlags()); + writer.writeCompactSize(transferDest.getByteLength()); + writer.writeSlice(transferDest.toBuffer()); + + + // CTransferDestination oneTransferDest(oneValValues[k]); + // ss << objTypeKey; + // ss << VARINT(oneTransferDest.TypeNoFlags()); + // ss << COMPACTSIZE((uint64_t)GetSerializeSize(ss, oneTransferDest)); + // ss << oneTransferDest; + } + else if (objTypeKey == CVDXF_Data.ContentMultiMapRemoveKey().vdxfid) { + + const transferDest = new ContentMultiMapRemove(oneValValues[k]); + + let length = 20; + length += varint.encodingLength(transferDest.version); + length += varuint.encodingLength(transferDest.getByteLength()); + length += transferDest.getByteLength(); + + const writer = new BufferWriter(Buffer.alloc(length)); + + writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeVarInt(transferDest.version); + writer.writeCompactSize(transferDest.getByteLength()); + writer.writeSlice(transferDest.toBuffer()); + + // CContentMultiMapRemove contentRemove(oneValValues[k]); + // ss << objTypeKey; + // ss << VARINT(contentRemove.version); + // ss << COMPACTSIZE((uint64_t)GetSerializeSize(ss, contentRemove)); + // ss << contentRemove; + } + else if (objTypeKey == CVDXF_Data.CrossChainDataRefKey().vdxfid) { + + const transferDest = new CrossChainDataRef(oneValValues[k]); + + let length = 20; + length += varint.encodingLength(transferDest.version); + length += varuint.encodingLength(transferDest.getByteLength()); + length += transferDest.getByteLength(); + + const writer = new BufferWriter(Buffer.alloc(length)); + + writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeVarInt(transferDest.version); + writer.writeCompactSize(transferDest.getByteLength()); + writer.writeSlice(transferDest.toBuffer()); + + CCrossChainDataRef dataRef(oneValValues[k]); + ss << objTypeKey; + ss << VARINT((int32_t)CVDXF_Data.DEFAULT_VERSION); + ss << COMPACTSIZE((uint64_t)GetSerializeSize(ss, dataRef)); + ss << dataRef; + } + else if (objTypeKey == CVDXF_Data.DataDescriptorKey().vdxfid) { + CDataDescriptor descr(oneValValues[k]); + ss << objTypeKey; + ss << VARINT(descr.version); + ss << COMPACTSIZE((uint64_t)GetSerializeSize(ss, descr)); + ss << descr; + } + else if (objTypeKey == CVDXF_Data.MMRDescriptorKey().vdxfid) { + CMMRDescriptor descr(oneValValues[k]); + ss << objTypeKey; + ss << VARINT(descr.version); + ss << COMPACTSIZE((uint64_t)GetSerializeSize(ss, descr)); + ss << descr; + } + else if (objTypeKey == CVDXF_Data.SignatureDataKey().vdxfid) { + CSignatureData sigData(oneValValues[k]); + ss << objTypeKey; + ss << VARINT(sigData.version); + ss << COMPACTSIZE((uint64_t)GetSerializeSize(ss, sigData)); + ss << sigData; + } + else { + throw new Error("contentmap invalid or unrecognized vdxfkey for object type: " + oneValValues[k]); + } + } + return ss; +} From bbf57aa903346f2519ead226bfdaac3cd8c9cdf8 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Tue, 23 Apr 2024 16:28:19 +0100 Subject: [PATCH 086/120] Updates to CVDXF_Data --- src/vdxf/classes/DataDescriptor.ts | 184 +++++++++++++++-------------- src/vdxf/classes/SignatureData.ts | 126 ++++++++++++++++++++ 2 files changed, 223 insertions(+), 87 deletions(-) create mode 100644 src/vdxf/classes/SignatureData.ts diff --git a/src/vdxf/classes/DataDescriptor.ts b/src/vdxf/classes/DataDescriptor.ts index ffeae51..c47b475 100644 --- a/src/vdxf/classes/DataDescriptor.ts +++ b/src/vdxf/classes/DataDescriptor.ts @@ -8,11 +8,13 @@ import bufferutils from '../../utils/bufferutils' const { BufferReader, BufferWriter } = bufferutils import { isHexString } from '../../utils/string'; import { fromBase58Check, toBase58Check } from '../../utils/address'; -import {CurrencyValueMap} from '../../pbaas/CurrencyValueMap'; +import { CurrencyValueMap } from '../../pbaas/CurrencyValueMap'; import { Rating } from '../../pbaas/Rating'; import { TransferDestination } from '../../pbaas/TransferDestination'; import { ContentMultiMapRemove } from '../../pbaas/ContentMultiMapRemove'; import { CrossChainDataRef } from './CrossChainDataRef'; +import { VDXF_OBJECT_DEFAULT_VERSION, HASH160_BYTE_LENGTH, I_ADDR_VERSION } from '../../constants/vdxf'; +import { SignatureData } from './SignatureData'; export class CDataDescriptor { @@ -954,12 +956,12 @@ export class CMMRDescriptor { dataDescriptors: CDataDescriptor[]; constructor(data?: { - version: BigNumber, - objectHashType: EHashTypes, - mmrHashType: EHashTypes, - mmrRoot: CDataDescriptor, - mmrHashes: CDataDescriptor, - dataDescriptors: CDataDescriptor[] + version?: BigNumber, + objectHashType?: EHashTypes, + mmrHashType?: EHashTypes, + mmrRoot?: CDataDescriptor, + mmrHashes?: CDataDescriptor, + dataDescriptors?: CDataDescriptor[] }) { if (data) { @@ -1141,57 +1143,46 @@ const VectorEncodeVDXFUni = (obj): Buffer => { let length = 20; length += 1; - length += varuint.encodingLength((oneValValues[k] as string).length) + Buffer.from(oneValValues[k] as string, "utf-8").length; - length += varuint.encodingLength((oneValValues[k] as string).length); + const encodedLength = varuint.encodingLength(Buffer.from(oneValValues[k] as string, "utf-8").length) + length += varuint.encodingLength(encodedLength + Buffer.from(oneValValues[k] as string, "utf-8").length); + length += encodedLength; length += Buffer.from(oneValValues[k] as string, "utf-8").length; - + const writer = new BufferWriter(Buffer.alloc(length)); writer.writeSlice(fromBase58Check(objTypeKey).hash); writer.writeVarInt(new BN(1)); - writer.writeCompactSize((oneValValues[k] as string).length + Buffer.from(oneValValues[k] as string, "utf-8").length); - writer.writeCompactSize((oneValValues[k] as string).length); - writer.writeSlice(Buffer.from(oneValValues[k] as string, "utf-8")); + writer.writeCompactSize(encodedLength + Buffer.from(oneValValues[k] as string, "utf-8").length); + writer.writeVarSlice(Buffer.from(oneValValues[k] as string, "utf-8")); ss = Buffer.concat([ss, writer.buffer]); - - // ss << objTypeKey; - // ss << VARINT(1); - // std::string stringVal = uni_get_str(oneValValues[k]); - // ss << COMPACTSIZE((uint64_t)GetSerializeSize(ss, stringVal).vdxfid); - // ss << stringVal; } else if (objTypeKey == CVDXF_Data.DataByteVectorKey().vdxfid) { let length = 20; length += 1; - length += varuint.encodingLength(Buffer.from(oneValValues[k] as string, "hex").length) + Buffer.from(oneValValues[k] as string, "hex").length; - length += varuint.encodingLength(Buffer.from(oneValValues[k] as string, "hex").length); + const encodedLength = varuint.encodingLength(Buffer.from(oneValValues[k] as string, "hex").length) + length += varuint.encodingLength(encodedLength + Buffer.from(oneValValues[k] as string, "hex").length); + length += encodedLength; length += Buffer.from(oneValValues[k] as string, "hex").length; - + const writer = new BufferWriter(Buffer.alloc(length)); writer.writeSlice(fromBase58Check(objTypeKey).hash); writer.writeVarInt(new BN(1)); - writer.writeCompactSize(Buffer.from(oneValValues[k] as string, "hex").length + Buffer.from(oneValValues[k] as string, "hex").length); - writer.writeCompactSize(Buffer.from(oneValValues[k] as string, "hex").length); - writer.writeSlice(Buffer.from(oneValValues[k] as string, "hex")); + writer.writeCompactSize(encodedLength + Buffer.from(oneValValues[k] as string, "hex").length); + writer.writeVarSlice(Buffer.from(oneValValues[k] as string, "hex")); ss = Buffer.concat([ss, writer.buffer]); - // ss << objTypeKey; - // ss << VARINT(1); - // std:: vector < unsigned char > byteVec = ParseHex(uni_get_str(oneValValues[k])); - // ss << COMPACTSIZE((uint64_t)GetSerializeSize(ss, byteVec)); - // ss << byteVec; } else if (objTypeKey == CVDXF_Data.DataCurrencyMapKey().vdxfid) { const destinations = Object.keys(oneValValues[k]); const values = Object.values(oneValValues[k]); - const oneCurMap = new CurrencyValueMap({value_map: new Map(destinations.map((key, index) => [key, new BN(values[index])])) , multivalue: true}); - + const oneCurMap = new CurrencyValueMap({ value_map: new Map(destinations.map((key, index) => [key, new BN(values[index])])), multivalue: true }); + let length = 20; length += 1; length += varuint.encodingLength(oneCurMap.getByteLength()); @@ -1204,26 +1195,23 @@ const VectorEncodeVDXFUni = (obj): Buffer => { writer.writeCompactSize(oneCurMap.getByteLength()); writer.writeSlice(oneCurMap.toBuffer()); - // CCurrencyValueMap oneCurMap(oneValValues[k]); - // ss << objTypeKey; - // ss << VARINT(1); - // ss << COMPACTSIZE((uint64_t)GetSerializeSize(ss, oneCurMap)); - // ss << oneCurMap; + ss = Buffer.concat([ss, writer.buffer]); + } else if (objTypeKey == CVDXF_Data.DataRatingsKey().vdxfid) { - const version = new BN((oneValValues[k] as {version: number}).version); - const trustLevel = new BN((oneValValues[k] as {trustLevel: number}).trustLevel); + const version = new BN((oneValValues[k] as { version: number }).version); + const trustLevel = new BN((oneValValues[k] as { trustLevel: number }).trustLevel); - const destinations = Object.keys((oneValValues[k] as {rating: BigNumber}).rating); + const destinations = Object.keys((oneValValues[k] as { rating: BigNumber }).rating); const values = Object.values(oneValValues[k]); - const oneRatingMap = new Rating({ratings: new Map(destinations.map((key, index) => [key, Buffer.from(values[index], 'hex')])), version, trustLevel}); - + const oneRatingMap = new Rating({ ratings: new Map(destinations.map((key, index) => [key, Buffer.from(values[index], 'hex')])), version, trustLevel }); + let length = 20; length += varint.encodingLength(oneRatingMap.version); length += varuint.encodingLength(oneRatingMap.getByteLength()); - length += oneRatingMap.getByteLength(); + length += oneRatingMap.getByteLength(); const writer = new BufferWriter(Buffer.alloc(length)); @@ -1232,20 +1220,17 @@ const VectorEncodeVDXFUni = (obj): Buffer => { writer.writeCompactSize(oneRatingMap.getByteLength()); writer.writeSlice(oneRatingMap.toBuffer()); - // CRating oneRatingObj(oneValValues[k]); - // ss << objTypeKey; - // ss << VARINT(oneRatingObj.version); - // ss << COMPACTSIZE((uint64_t)GetSerializeSize(ss, oneRatingObj)); - // ss << oneRatingObj; + ss = Buffer.concat([ss, writer.buffer]); + } else if (objTypeKey == CVDXF_Data.DataTransferDestinationKey().vdxfid) { const transferDest = new TransferDestination(oneValValues[k]); - + let length = 20; length += varint.encodingLength(transferDest.typeNoFlags()); length += varuint.encodingLength(transferDest.getByteLength()); - length += transferDest.getByteLength(); + length += transferDest.getByteLength(); const writer = new BufferWriter(Buffer.alloc(length)); @@ -1254,21 +1239,17 @@ const VectorEncodeVDXFUni = (obj): Buffer => { writer.writeCompactSize(transferDest.getByteLength()); writer.writeSlice(transferDest.toBuffer()); + ss = Buffer.concat([ss, writer.buffer]); - // CTransferDestination oneTransferDest(oneValValues[k]); - // ss << objTypeKey; - // ss << VARINT(oneTransferDest.TypeNoFlags()); - // ss << COMPACTSIZE((uint64_t)GetSerializeSize(ss, oneTransferDest)); - // ss << oneTransferDest; } else if (objTypeKey == CVDXF_Data.ContentMultiMapRemoveKey().vdxfid) { - + const transferDest = new ContentMultiMapRemove(oneValValues[k]); - + let length = 20; length += varint.encodingLength(transferDest.version); length += varuint.encodingLength(transferDest.getByteLength()); - length += transferDest.getByteLength(); + length += transferDest.getByteLength(); const writer = new BufferWriter(Buffer.alloc(length)); @@ -1277,54 +1258,83 @@ const VectorEncodeVDXFUni = (obj): Buffer => { writer.writeCompactSize(transferDest.getByteLength()); writer.writeSlice(transferDest.toBuffer()); - // CContentMultiMapRemove contentRemove(oneValValues[k]); - // ss << objTypeKey; - // ss << VARINT(contentRemove.version); - // ss << COMPACTSIZE((uint64_t)GetSerializeSize(ss, contentRemove)); - // ss << contentRemove; + ss = Buffer.concat([ss, writer.buffer]); + } else if (objTypeKey == CVDXF_Data.CrossChainDataRefKey().vdxfid) { const transferDest = new CrossChainDataRef(oneValValues[k]); - + let length = 20; - length += varint.encodingLength(transferDest.version); + length += varint.encodingLength(VDXF_OBJECT_DEFAULT_VERSION); length += varuint.encodingLength(transferDest.getByteLength()); - length += transferDest.getByteLength(); + length += transferDest.getByteLength(); const writer = new BufferWriter(Buffer.alloc(length)); writer.writeSlice(fromBase58Check(objTypeKey).hash); - writer.writeVarInt(transferDest.version); + writer.writeVarInt(VDXF_OBJECT_DEFAULT_VERSION); writer.writeCompactSize(transferDest.getByteLength()); writer.writeSlice(transferDest.toBuffer()); - CCrossChainDataRef dataRef(oneValValues[k]); - ss << objTypeKey; - ss << VARINT((int32_t)CVDXF_Data.DEFAULT_VERSION); - ss << COMPACTSIZE((uint64_t)GetSerializeSize(ss, dataRef)); - ss << dataRef; + ss = Buffer.concat([ss, writer.buffer]); + } else if (objTypeKey == CVDXF_Data.DataDescriptorKey().vdxfid) { - CDataDescriptor descr(oneValValues[k]); - ss << objTypeKey; - ss << VARINT(descr.version); - ss << COMPACTSIZE((uint64_t)GetSerializeSize(ss, descr)); - ss << descr; + + const descr = new CDataDescriptor(oneValValues[k]); + + let length = 20; + length += varint.encodingLength(descr.version); + length += varuint.encodingLength(descr.byteLength()); + length += descr.byteLength(); + + const writer = new BufferWriter(Buffer.alloc(length)); + + writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeVarInt(descr.version); + writer.writeCompactSize(descr.byteLength()); + writer.writeSlice(descr.toBuffer()); + + ss = Buffer.concat([ss, writer.buffer]); + } else if (objTypeKey == CVDXF_Data.MMRDescriptorKey().vdxfid) { - CMMRDescriptor descr(oneValValues[k]); - ss << objTypeKey; - ss << VARINT(descr.version); - ss << COMPACTSIZE((uint64_t)GetSerializeSize(ss, descr)); - ss << descr; + + const descr = new CMMRDescriptor(oneValValues[k]); + + let length = 20; + length += varint.encodingLength(descr.version); + length += varuint.encodingLength(descr.byteLength()); + length += descr.byteLength(); + + const writer = new BufferWriter(Buffer.alloc(length)); + + writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeVarInt(descr.version); + writer.writeCompactSize(descr.byteLength()); + writer.writeSlice(descr.toBuffer()); + + ss = Buffer.concat([ss, writer.buffer]); + } else if (objTypeKey == CVDXF_Data.SignatureDataKey().vdxfid) { - CSignatureData sigData(oneValValues[k]); - ss << objTypeKey; - ss << VARINT(sigData.version); - ss << COMPACTSIZE((uint64_t)GetSerializeSize(ss, sigData)); - ss << sigData; + + const sigData = new SignatureData(oneValValues[k]); + + let length = 20; + length += varint.encodingLength(sigData.version); + length += varuint.encodingLength(sigData.getByteLength()); + length += sigData.getByteLength(); + + const writer = new BufferWriter(Buffer.alloc(length)); + writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeVarInt(sigData.version); + writer.writeCompactSize(sigData.getByteLength()); + writer.writeSlice(sigData.toBuffer()); + + ss = Buffer.concat([ss, writer.buffer]); + } else { throw new Error("contentmap invalid or unrecognized vdxfkey for object type: " + oneValValues[k]); diff --git a/src/vdxf/classes/SignatureData.ts b/src/vdxf/classes/SignatureData.ts new file mode 100644 index 0000000..7d084b9 --- /dev/null +++ b/src/vdxf/classes/SignatureData.ts @@ -0,0 +1,126 @@ +import varint from '../../utils/varint' +import varuint from '../../utils/varuint' +import { fromBase58Check, toBase58Check } from "../../utils/address"; +import bufferutils from '../../utils/bufferutils' +import { BN } from 'bn.js'; +import { BigNumber } from '../../utils/types/BigNumber'; +import { I_ADDR_VERSION } from '../../constants/vdxf'; +import { SerializableEntity } from '../../utils/types/SerializableEntity'; +import { read } from 'fs'; +const { BufferReader, BufferWriter } = bufferutils + +export class SignatureData implements SerializableEntity { + version: BigNumber; + systemID: string; + hashType: BigNumber; + signatureHash: Buffer; + identityID: string; + sigType: BigNumber; + vdxfKeys: Array; + vdxfKeyNames: Array; + boundHashes: Array; + signatureAsVch: Buffer; + + static VERSION_INVALID = new BN(0); + static FIRST_VERSION = new BN(1); + static LAST_VERSION = new BN(1); + static DEFAULT_VERSION = new BN(1); + static TYPE_VERUSID_DEFAULT = new BN(1); + + constructor(data?) { + + if (data) { + Object.assign(this, data) + } + } + + getByteLength() { + let byteLength = 0; + + byteLength += varint.encodingLength(this.version); + byteLength += 20; // systemID uint160 + byteLength += varint.encodingLength(this.hashType); + byteLength += varuint.encodingLength(this.signatureHash.length); + byteLength += this.signatureHash.length; + byteLength += varint.encodingLength(this.sigType); + byteLength += 20; // identityID uint160 + byteLength += varuint.encodingLength(this.vdxfKeys.length); + byteLength += this.vdxfKeys.length * 20; + byteLength += varuint.encodingLength(this.vdxfKeyNames.length); + + for (const keyName of this.vdxfKeyNames) { + byteLength += varuint.encodingLength(Buffer.from(keyName, 'utf8').length); + byteLength += Buffer.from(keyName, 'utf8').length; + } + + byteLength += varuint.encodingLength(this.boundHashes.length); + byteLength += this.boundHashes.length * 32; + byteLength += varuint.encodingLength(this.signatureAsVch.length); + byteLength += this.signatureAsVch.length; + + return byteLength + } + + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) + + bufferWriter.writeVarInt(this.version); + bufferWriter.writeSlice(fromBase58Check(this.systemID).hash); + bufferWriter.writeVarInt(this.hashType); + bufferWriter.writeVarSlice(this.signatureHash); + bufferWriter.writeSlice(fromBase58Check(this.identityID).hash); + bufferWriter.writeVarInt(this.sigType); + bufferWriter.writeCompactSize(this.vdxfKeys.length); + + for (const key of this.vdxfKeys) { + bufferWriter.writeSlice(fromBase58Check(key).hash); + } + + bufferWriter.writeCompactSize(this.vdxfKeyNames.length); + for (const keyName of this.vdxfKeyNames) { + bufferWriter.writeVarSlice(Buffer.from(keyName, 'utf8')); + } + bufferWriter.writeCompactSize(this.boundHashes.length); + for (const boundHash of this.boundHashes) { + bufferWriter.writeSlice(boundHash); + } + bufferWriter.writeVarSlice(this.signatureAsVch); + + return bufferWriter.buffer + } + + fromBuffer(buffer: Buffer, offset: number = 0) { + const reader = new BufferReader(buffer, offset); + + this.version = reader.readVarInt(); + this.systemID = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + this.hashType = reader.readVarInt(); + this.signatureHash = reader.readVarSlice(); + this.sigType = reader.readVarInt(); + this.identityID = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + const vdxfKeysLength = reader.readCompactSize(); + this.vdxfKeys = []; + + for (let i = 0; i < vdxfKeysLength; i++) { + this.vdxfKeys.push(toBase58Check(reader.readSlice(20), I_ADDR_VERSION)); + } + + const vdxfKeyNamesLength = reader.readCompactSize(); + this.vdxfKeyNames = []; + + for (let i = 0; i < vdxfKeyNamesLength; i++) { + this.vdxfKeyNames.push(reader.readVarSlice().toString('utf8')); + } + + const boundHashesLength = reader.readCompactSize(); + this.boundHashes = []; + + for (let i = 0; i < boundHashesLength; i++) { + this.boundHashes.push(reader.readSlice(32)); + } + + this.signatureAsVch = reader.readVarSlice(); + + return reader.offset; + } +} \ No newline at end of file From f85d66ed7fd908e2753bf49b6ae0b764e899438c Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Wed, 24 Apr 2024 12:02:33 +0100 Subject: [PATCH 087/120] Add toJson Functions for Datadescriptor --- .../attestation/personalInfo.test.ts | 116 +++++-- src/vdxf/classes/DataDescriptor.ts | 315 +++++++----------- 2 files changed, 212 insertions(+), 219 deletions(-) diff --git a/src/__tests__/attestation/personalInfo.test.ts b/src/__tests__/attestation/personalInfo.test.ts index 235fd8e..6c55c20 100644 --- a/src/__tests__/attestation/personalInfo.test.ts +++ b/src/__tests__/attestation/personalInfo.test.ts @@ -3,55 +3,117 @@ import { BigNumber } from '../../utils/types/BigNumber'; import { BN } from 'bn.js'; import {AttestationDataType } from "../../vdxf/classes/Attestation"; import { PersonalProfileDataStore, DataCategory } from "../../vdxf/classes/PersonalProfile"; -import { CDataDescriptor } from "../../vdxf/classes/DataDescriptor"; -describe('Create a personal info request', () => { - test('attestation request with reply', async () => { +import { DataDescriptor } from "../../vdxf/classes/DataDescriptor"; +import { VectorEncodeVDXFUni, MMRDescriptor } from "../../vdxf/classes/DataDescriptor"; + +describe('Create a personal info request', () => { + test('serialize datadescriptor with nested datadescriptor', async () => { const profileData = new PersonalProfileDataStore(); - // requested data from user. - const personalDataCategory = new CDataDescriptor({ - "version": new BN(1), - "flags": new BN(2), + + const personalDataCategory = DataDescriptor.fromJson({ + version: 1, + "flags": 2, "objectdata": { "i4GC1YGEVD21afWudGoFJVdnfjJ5XWnCQv": { "version": 1, "flags": 96, "mimetype": "text/plain", "objectdata": { - "message": "Chris" + "message": "John" }, "label": "i4GqsotHGa4czCdtg2d8FVHKfJFzVyBPrM" } }, - "salt": Buffer.from("4f66603f256d3f757b6dc3ea44802d4041d2a1901e06005028fd60b85a5878a2", 'hex') + "salt": "4f66603f256d3f757b6dc3ea44802d4041d2a1901e06005028fd60b85a5878a2" }); - profileData.data.personal = personalDataCategory; + const testserali = personalDataCategory.toBuffer(); + //profileData.data.personal = personalDataCategory; + + // const contractDataCategory = profileData.data.contact; + + // contractDataCategory.data = [ + // AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_EMAIL.vdxfid, "abc@def.com"), + // AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_PHONENUMBER.vdxfid, "123-456-7890") + // ]; + + // const LocationDataCategory = profileData.data.locations; + + // LocationDataCategory.data = [ + // AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1.vdxfid, "123 Main St"), + // AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2.vdxfid, "Cobham"), + // AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_HOMEADDRESS_CITY.vdxfid, "Anytown"), + // AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_HOMEADDRESS_REGION.vdxfid, "AnyState"), + // AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE.vdxfid, "12345") + // ]; + + // const personalDataBuffer = profileData.toDataBuffer(); + + // const personalData2 = new PersonalProfileDataStore(); + // personalData2.fromDataBuffer(personalDataBuffer); - const contractDataCategory = profileData.data.contact; + // expect(personalData2.toBuffer().toString('hex')).toEqual(profileData.toBuffer().toString('hex')); + }); - contractDataCategory.data = [ - AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_EMAIL.vdxfid, "abc@def.com"), - AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_PHONENUMBER.vdxfid, "123-456-7890") - ]; + test('serialize mmrdescriptor', async () => { - const LocationDataCategory = profileData.data.locations; + const mmrdescriptor = { + "version": 1, + "objecthashtype": 5, + "mmrhashtype": 1, + "mmrroot": { + "version": 1, + "flags": 0, + "objectdata": "30395e0868b1953477e14bb5c16349622239a94115a4d1f02b72b6ecf8b1c79c" + }, + "mmrhashes": { + "version": 1, + "flags": 0, + "objectdata": "41d826d3c6cbbc3a96992670d2f604e959fd1a8c014102f1eac8f180bee7fb256b801b219e20612fbc9f5e99da111a8364d1197ff3e3fbef8259770f618dacee9489e8cd2cd5dd77d36ede6c42cebdabd85a5b5e8af60b" + }, + "datadescriptors": [ + { + "version": 1, + "flags": 2, + "objectdata": { + "i4GC1YGEVD21afWudGoFJVdnfjJ5XWnCQv": { + "version": 1, + "flags": 96, + "mimetype": "text/plain", + "objectdata": { + "message": "Chris" + }, + "label": "i4GqsotHGa4czCdtg2d8FVHKfJFzVyBPrM" + } + }, + "salt": "4f66603f256d3f757b6dc3ea44802d4041d2a1901e06005028fd60b85a5878a2" + }, + { + "version": 1, + "flags": 2, + "objectdata": { + "i4GC1YGEVD21afWudGoFJVdnfjJ5XWnCQv": { + "version": 1, + "flags": 96, + "mimetype": "text/plain", + "objectdata": { + "message": "Monkins" + }, + "label": "iHybTrNB1kXRrjsCtJXd6fvBKxepqMpS5Z" + } + }, + "salt": "62fae0c46b2ad1177749e25fd6d48ccb40213d3cc72e4b2b0dc533039cbe8314" + } + ] + } - LocationDataCategory.data = [ - AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1.vdxfid, "123 Main St"), - AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2.vdxfid, "Cobham"), - AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_HOMEADDRESS_CITY.vdxfid, "Anytown"), - AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_HOMEADDRESS_REGION.vdxfid, "AnyState"), - AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE.vdxfid, "12345") - ]; + const mmrdescriptorBuffer = MMRDescriptor.fromJson(mmrdescriptor); - const personalDataBuffer = profileData.toDataBuffer(); + const mmrbuffer = mmrdescriptorBuffer.toBuffer(); - const personalData2 = new PersonalProfileDataStore(); - personalData2.fromDataBuffer(personalDataBuffer); - expect(personalData2.toBuffer().toString('hex')).toEqual(profileData.toBuffer().toString('hex')); }); }); diff --git a/src/vdxf/classes/DataDescriptor.ts b/src/vdxf/classes/DataDescriptor.ts index c47b475..f10777a 100644 --- a/src/vdxf/classes/DataDescriptor.ts +++ b/src/vdxf/classes/DataDescriptor.ts @@ -16,7 +16,7 @@ import { CrossChainDataRef } from './CrossChainDataRef'; import { VDXF_OBJECT_DEFAULT_VERSION, HASH160_BYTE_LENGTH, I_ADDR_VERSION } from '../../constants/vdxf'; import { SignatureData } from './SignatureData'; -export class CDataDescriptor { +export class DataDescriptor { static VERSION_INVALID = new BN(0); static VERSION_FIRST = new BN(1); @@ -31,17 +31,17 @@ export class CDataDescriptor { static FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT = new BN(0x10); static FLAG_LABEL_PRESENT = new BN(0x20); static FLAG_MIME_TYPE_PRESENT = new BN(0x40); - static FLAG_MASK = (CDataDescriptor.FLAG_ENCRYPTED_DATA.add( - CDataDescriptor.FLAG_SALT_PRESENT).add( - CDataDescriptor.FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT).add( - CDataDescriptor.FLAG_INCOMING_VIEWING_KEY_PRESENT).add( - CDataDescriptor.FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT).add( - CDataDescriptor.FLAG_LABEL_PRESENT).add( - CDataDescriptor.FLAG_MIME_TYPE_PRESENT)); + static FLAG_MASK = (DataDescriptor.FLAG_ENCRYPTED_DATA.add( + DataDescriptor.FLAG_SALT_PRESENT).add( + DataDescriptor.FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT).add( + DataDescriptor.FLAG_INCOMING_VIEWING_KEY_PRESENT).add( + DataDescriptor.FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT).add( + DataDescriptor.FLAG_LABEL_PRESENT).add( + DataDescriptor.FLAG_MIME_TYPE_PRESENT)); version: BigNumber; flags: BigNumber; - objectData: Buffer; // either direct data or serialized UTXORef +offset, length, and/or other type of info for different links + objectdata: Buffer; // either direct data or serialized UTXORef +offset, length, and/or other type of info for different links label: string; // label associated with this data mimeType: string; // optional mime type salt: Buffer; // encryption public key, data only present if encrypted or data referenced by unencrypted link is encrypted @@ -52,7 +52,7 @@ export class CDataDescriptor { constructor(data?: { version?: BigNumber, flags?: BigNumber, - objectData?: Buffer | , + objectdata?: Buffer, label?: string, mimeType?: string, salt?: Buffer, @@ -61,15 +61,16 @@ export class CDataDescriptor { ssk?: Buffer }) { this.flags = new BN(0); - this.version = CDataDescriptor.DEFAULT_VERSION; + this.version = DataDescriptor.DEFAULT_VERSION; if (data != null) { if (data.flags != null) this.flags = data.flags if (data.version != null) this.version = data.version - if (data.objectData != null) this.objectData = data.objectData + if (data.objectdata != null) this.objectdata = data.objectdata if (data.label != null) this.label = data.label; if (data.mimeType != null) this.mimeType = data.mimeType; if (data.salt != null) this.salt = data.salt; + if (data.epk != null) this.epk = data.epk; if (data.ivk != null) this.ivk = data.ivk; if (data.ssk != null) this.ssk = data.ssk; @@ -86,14 +87,43 @@ export class CDataDescriptor { } } + static fromJson(data: any): DataDescriptor { + + const newDataDescriptor = new DataDescriptor(); + + if (data != null) { + if (data.flags != null) newDataDescriptor.flags = new BN(data.flags) + if (data.version != null) newDataDescriptor.version = new BN(data.version) + if (data.objectdata != null) newDataDescriptor.objectdata = VectorEncodeVDXFUni(data.objectdata) + if (data.label != null) newDataDescriptor.label = data.label; + if (data.mimetype != null) newDataDescriptor.mimeType = data.mimetype; + if (data.salt != null) newDataDescriptor.salt = Buffer.from(data.salt, 'hex'); + if (data.epk != null) newDataDescriptor.epk = Buffer.from(data.epk, 'hex'); + if (data.ivk != null) newDataDescriptor.ivk = Buffer.from(data.ivk, 'hex'); + if (data.ssk != null) newDataDescriptor.ssk = Buffer.from(data.ssk, 'hex'); + + if (newDataDescriptor.label && newDataDescriptor.label.length > 64) { + newDataDescriptor.label = newDataDescriptor.label.slice(0, 64); + } + if (newDataDescriptor.mimeType && newDataDescriptor.mimeType.length > 128) { + newDataDescriptor.mimeType = newDataDescriptor.mimeType.slice(0, 128); + } + }; + + newDataDescriptor.SetFlags(); + + return newDataDescriptor; + + } + byteLength(): number { let length = 0; length += varint.encodingLength(this.version); length += varint.encodingLength(this.flags); - length += varuint.encodingLength(this.objectData.length); - length += this.objectData.length; + length += varuint.encodingLength(this.objectdata.length); + length += this.objectdata.length; if (this.HasLabel()) { if (this.label.length > 64) { @@ -138,7 +168,7 @@ export class CDataDescriptor { writer.writeVarInt(this.version); writer.writeVarInt(this.flags); - writer.writeVarSlice(this.objectData); + writer.writeVarSlice(this.objectdata); if (this.HasLabel()) { writer.writeVarSlice(Buffer.from(this.label)); @@ -167,12 +197,11 @@ export class CDataDescriptor { return writer.buffer; } - fromBuffer(buffer: Buffer): number { const reader = new BufferReader(buffer); this.version = reader.readVarInt(); this.flags = reader.readVarInt(); - this.objectData = reader.readVarSlice(); + this.objectdata = reader.readVarSlice(); if (this.HasLabel()) { this.label = reader.readVarSlice().toString(); @@ -201,100 +230,57 @@ export class CDataDescriptor { } - HasEncryptedData(): boolean { - return this.flags.and(CDataDescriptor.FLAG_ENCRYPTED_DATA).gt(new BN(0)); + return this.flags.and(DataDescriptor.FLAG_ENCRYPTED_DATA).gt(new BN(0)); } - // // this will take our existing instance, encode it as a VDXF tagged data structure, and embed it as a new, tagged, encrypted CDataDescriptor - // bool WrapEncrypted(const libzcash:: SaplingPaymentAddress & saplingAddress, std:: vector < unsigned char > * pSsk=nullptr) - // { - // // package us as a nested, tagged object - // CVDXF_Data nestedObject = CVDXF_Data(CVDXF_Data:: DataDescriptorKey(), :: AsVector(* this)); - - // // encrypt the entire tagged object - // if (EncryptData(saplingAddress, :: AsVector(nestedObject), pSsk)) { - // label = ""; - // mimeType = ""; - // SetFlags(); - // return true; - // } - // return false; - // } - HasSalt(): boolean { - return this.flags.and(CDataDescriptor.FLAG_SALT_PRESENT).gt(new BN(0)); + return this.flags.and(DataDescriptor.FLAG_SALT_PRESENT).gt(new BN(0)); } HasEPK(): boolean { - return this.flags.and(CDataDescriptor.FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT).gt(new BN(0)); + return this.flags.and(DataDescriptor.FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT).gt(new BN(0)); } HasMIME(): boolean { - return this.flags.and(CDataDescriptor.FLAG_MIME_TYPE_PRESENT).gt(new BN(0)); + return this.flags.and(DataDescriptor.FLAG_MIME_TYPE_PRESENT).gt(new BN(0)); } HasIVK(): boolean { - return this.flags.and(CDataDescriptor.FLAG_INCOMING_VIEWING_KEY_PRESENT).gt(new BN(0)); + return this.flags.and(DataDescriptor.FLAG_INCOMING_VIEWING_KEY_PRESENT).gt(new BN(0)); } HasSSK(): boolean { - return this.flags.and(CDataDescriptor.FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT).gt(new BN(0)); + return this.flags.and(DataDescriptor.FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT).gt(new BN(0)); } HasLabel(): boolean { - return this.flags.and(CDataDescriptor.FLAG_LABEL_PRESENT).gt(new BN(0)); + return this.flags.and(DataDescriptor.FLAG_LABEL_PRESENT).gt(new BN(0)); } CalcFlags(): BigNumber { - return this.flags.and(CDataDescriptor.FLAG_ENCRYPTED_DATA).add - (this.label ? CDataDescriptor.FLAG_LABEL_PRESENT : new BN(0)).add - (this.mimeType ? CDataDescriptor.FLAG_MIME_TYPE_PRESENT : new BN(0)).add - (this.salt ? CDataDescriptor.FLAG_SALT_PRESENT : new BN(0)).add - (this.epk ? CDataDescriptor.FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT : new BN(0)).add - (this.ivk ? CDataDescriptor.FLAG_INCOMING_VIEWING_KEY_PRESENT : new BN(0)).add - (this.ssk ? CDataDescriptor.FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT : new BN(0)); + return this.flags.and(DataDescriptor.FLAG_ENCRYPTED_DATA).add + (this.label ? DataDescriptor.FLAG_LABEL_PRESENT : new BN(0)).add + (this.mimeType ? DataDescriptor.FLAG_MIME_TYPE_PRESENT : new BN(0)).add + (this.salt ? DataDescriptor.FLAG_SALT_PRESENT : new BN(0)).add + (this.epk ? DataDescriptor.FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT : new BN(0)).add + (this.ivk ? DataDescriptor.FLAG_INCOMING_VIEWING_KEY_PRESENT : new BN(0)).add + (this.ssk ? DataDescriptor.FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT : new BN(0)); } SetFlags() { this.flags = this.CalcFlags(); } - // in the specific case that the data contained is a tagged hash vector - // there should be a better, extensible way to define, store, and return contained types, such as bidirectional VectorEncodeVDXFUni - // std:: vector < uint256 > DecodeHashVector() const ; - - // // encrypts to a specific z-address incoming viewing key - // bool EncryptData(const libzcash:: SaplingPaymentAddress & saplingAddress, const std:: vector & plainText, std:: vector < unsigned char > * pSsk=nullptr); - - // // decrypts objectData only if there is a valid key available to decrypt with already present in this object - // bool DecryptData(std:: vector < unsigned char > & plainText, std:: vector < unsigned char > * pSsk=nullptr) const ; - - // // decrypts objectData either with the provided viewing key, or if a key is available - // bool DecryptData(const libzcash:: SaplingIncomingViewingKey & Ivk, std:: vector < unsigned char > & plainText, bool ivkOnly = false, std:: vector < unsigned char > * pSsk=nullptr) const ; - - // // decrypts objectData either with the provided specific symmetric encryption key, or if a key is available on the link - // bool DecryptData(const std:: vector & decryptionKey, std:: vector < unsigned char > & plainText, bool sskOnly = false) const ; - - // bool GetSSK(std:: vector < unsigned char > & Ssk) const ; - - // bool GetSSK(const libzcash:: SaplingIncomingViewingKey & Ivk, std:: vector < unsigned char > & Ssk, bool ivkOnly = false) const ; - - // bool UnwrapEncryption(); - - // bool UnwrapEncryption(const libzcash:: SaplingIncomingViewingKey & Ivk, bool ivkOnly = false); - - // bool UnwrapEncryption(const std:: vector & decryptionKey, bool sskOnly = false); - IsValid(): boolean { - return this.version.gte(CDataDescriptor.FIRST_VERSION) && this.version.lte(CDataDescriptor.LAST_VERSION) && (this.flags.and(new BN(~CDataDescriptor.FLAG_MASK)).eq(new BN(0))); + return this.version.gte(DataDescriptor.FIRST_VERSION) && this.version.lte(DataDescriptor.LAST_VERSION) && (this.flags.and(new BN(~DataDescriptor.FLAG_MASK)).eq(new BN(0))); } }; // VDXF data that describes an encrypted chunk of data -export class CVDXF_Data extends BufferDataVdxfObject { +export class VDXF_Data extends BufferDataVdxfObject { constructor(data: string, key: string) { super(data, key); @@ -800,14 +786,14 @@ export class CVDXF_Data extends BufferDataVdxfObject { }; export class CVDXFDataDescriptor extends BufferDataVdxfObject { - dataDescriptor: CDataDescriptor; + dataDescriptor: DataDescriptor; constructor(vdxfData: BufferDataVdxfObject) { super(vdxfData.data, vdxfData.vdxfkey); this.version = vdxfData.version; if (this.data != null) { - this.dataDescriptor = new CDataDescriptor(); + this.dataDescriptor = new DataDescriptor(); this.dataDescriptor.fromBuffer(Buffer.from(this.data, 'hex')); delete this.data; @@ -834,35 +820,17 @@ export class CVDXFDataDescriptor extends BufferDataVdxfObject { this.data = reader.readVarSlice().toString('hex'); - this.dataDescriptor = new CDataDescriptor(); + this.dataDescriptor = new DataDescriptor(); this.dataDescriptor.fromBuffer(Buffer.from(this.data, 'hex')); delete this.data; return reader.offset; } - // CVDXFDataDescriptor(uint32_t Version = DEFAULT_VERSION) : - // dataDescriptor(Version), CVDXF_Data(CVDXF_Data:: DataDescriptorKey(), std:: vector < unsigned char > (), Version) - // { } - - // CVDXFDataDescriptor(const UniValue & uni); - - // CVDXFDataDescriptor(const CVDXF_Data & vdxfData) - // { - // version = vdxfData.version; - // key = vdxfData.key; - // CDataStream readData(vdxfData.data, SER_DISK, PROTOCOL_VERSION); - // readData >> dataDescriptor; - // } - HasEncryptedData(): boolean { return this.dataDescriptor.HasEncryptedData(); } - // WrapEncrypted(const libzcash:: SaplingPaymentAddress & saplingAddress) { - // return this.dataDescriptor.WrapEncrypted(saplingAddress); - // } - HasLabel(): boolean { return this.dataDescriptor.HasLabel(); } @@ -891,44 +859,6 @@ export class CVDXFDataDescriptor extends BufferDataVdxfObject { return this.dataDescriptor.SetFlags(); } - // CVDXFDataDescriptor(const std:: vector & ObjectData, - // const std:: string & Label=std:: string(), - // const std:: string & MimeType=std:: string(), - // const std:: vector & Salt=std:: vector < unsigned char > (), - // const std:: vector & EPK=std:: vector < unsigned char > (), - // const std:: vector & IVK=std:: vector < unsigned char > (), - // const std:: vector & SSK=std:: vector < unsigned char > (), - // uint32_t Flags = 0, - // uint32_t Version = DEFAULT_VERSION) : - // dataDescriptor(ObjectData, Label, MimeType, Salt, EPK, IVK, SSK, Flags, Version), CVDXF_Data(CVDXF_Data:: DataDescriptorKey(), std:: vector < unsigned char > (), Version) - // { - // } - - // ADD_SERIALIZE_METHODS; - - // template < typename Stream, typename Operation > - // inline void SerializationOp(Stream & s, Operation ser_action) { - // READWRITE(* (CVDXF *)this); - - // if (ser_action.ForRead()) { - // if (IsValid()) { - // READWRITE(data); - // CDataStream readData(data, SER_DISK, PROTOCOL_VERSION); - // data.clear(); - // readData >> dataDescriptor; - // } - // } - // else { - // if (IsValid()) { - // CDataStream writeData(SER_DISK, PROTOCOL_VERSION); - // writeData << dataDescriptor; - // std:: vector < unsigned char > vch(writeData.begin(), writeData.end()); - // READWRITE(vch); - // } - // } - // } - - }; export enum EHashTypes { @@ -942,7 +872,7 @@ export enum EHashTypes { }; -export class CMMRDescriptor { +export class MMRDescriptor { static VERSION_INVALID = new BN(0); static FIRST_VERSION = new BN(1); static LAST_VERSION = new BN(1); @@ -951,17 +881,17 @@ export class CMMRDescriptor { version: BigNumber; objectHashType: EHashTypes; mmrHashType: EHashTypes; - mmrRoot: CDataDescriptor; - mmrHashes: CDataDescriptor; - dataDescriptors: CDataDescriptor[]; + mmrRoot: DataDescriptor; + mmrHashes: DataDescriptor; + dataDescriptors: DataDescriptor[]; constructor(data?: { version?: BigNumber, objectHashType?: EHashTypes, mmrHashType?: EHashTypes, - mmrRoot?: CDataDescriptor, - mmrHashes?: CDataDescriptor, - dataDescriptors?: CDataDescriptor[] + mmrRoot?: DataDescriptor, + mmrHashes?: DataDescriptor, + dataDescriptors?: DataDescriptor[] }) { if (data) { @@ -971,11 +901,34 @@ export class CMMRDescriptor { if (data.mmrRoot) this.mmrRoot = data.mmrRoot; if (data.mmrHashes) this.mmrHashes = data.mmrHashes; if (data.dataDescriptors) this.dataDescriptors = data.dataDescriptors; + } else { - this.version = CMMRDescriptor.DEFAULT_VERSION; + this.version = MMRDescriptor.DEFAULT_VERSION; } } + static fromJson(data: any): MMRDescriptor { + + const newMMRDescriptor = new MMRDescriptor(); + + if (data) { + if (data.version) newMMRDescriptor.version = new BN(data.version); + if (data.objecthashtype) newMMRDescriptor.objectHashType = data.objecthashtype; + if (data.mmrhashtype) newMMRDescriptor.mmrHashType = data.mmrhashtype; + if (data.mmrroot) newMMRDescriptor.mmrRoot = DataDescriptor.fromJson(data.mmrroot); + if (data.mmrhashes) newMMRDescriptor.mmrHashes = DataDescriptor.fromJson(data.mmrhashes); + if (data.datadescriptors) { + newMMRDescriptor.dataDescriptors = []; + + data.datadescriptors.forEach((data) => { + newMMRDescriptor.dataDescriptors.push(DataDescriptor.fromJson(data)); + }); + + }; + } + return newMMRDescriptor; + } + byteLength(): number { let length = 0; @@ -1014,50 +967,30 @@ export class CMMRDescriptor { this.version = reader.readVarInt(); this.objectHashType = reader.readVarInt().toNumber(); this.mmrHashType = reader.readVarInt().toNumber(); - this.mmrRoot = new CDataDescriptor(); + this.mmrRoot = new DataDescriptor(); this.mmrRoot.fromBuffer(reader.readVarSlice()); - this.mmrHashes = new CDataDescriptor(); + this.mmrHashes = new DataDescriptor(); this.mmrHashes.fromBuffer(reader.readVarSlice()); const dataDescriptorsLength = reader.readCompactSize(); this.dataDescriptors = []; for (let i = 0; i < dataDescriptorsLength; i++) { - const dataDescriptor = new CDataDescriptor(); + const dataDescriptor = new DataDescriptor(); dataDescriptor.fromBuffer(reader.readVarSlice()); this.dataDescriptors.push(dataDescriptor); } return reader.offset; } - // CMMRDescriptor Encrypt(const libzcash::SaplingPaymentAddress &saplingAddress, bool includeSSKs=false) const; - // bool WrapEncrypted(const libzcash::SaplingPaymentAddress &saplingAddress, bool includeSSKs=false); - - // CMMRDescriptor Decrypt() const; - // CMMRDescriptor Decrypt(const libzcash::SaplingIncomingViewingKey &ivk) const; - // uint256 DecryptMMRRoot(const libzcash::SaplingIncomingViewingKey &ivk) const; - // uint256 DecryptMMRRoot(const std::vector &Ssk) const; - // uint256 GetMMRRoot() const; - // std::vector DecryptMMRHashes(const libzcash::SaplingIncomingViewingKey &ivk) const; - // std::vector DecryptMMRHashes(const std::vector &Ssk) const; - // std::vector GetMMRHashes() const; - // std::vector DecryptDataDescriptors(const libzcash::SaplingIncomingViewingKey &ivk) const; - // std::vector GetDataDescriptors() const; - // CDataDescriptor DecryptDataDescriptor(int idx, const std::vector &ssk) const; - // CDataDescriptor DecryptDataDescriptor(int idx, const libzcash::SaplingIncomingViewingKey &ivk) const; - // CDataDescriptor GetDataDescriptor(int idx) const; - // CMMRDescriptor AddSymmetricKeys(const libzcash::SaplingIncomingViewingKey &ivk) const; - // CMMRDescriptor AddSymmetricKeys(const std::vector>> &ssks) const; - // std::vector>> GetSymmetricKeys(const libzcash::SaplingIncomingViewingKey &ivk) const; - HasData(): boolean { - return !!(this.mmrHashes.objectData && this.dataDescriptors); + return !!(this.mmrHashes.objectdata && this.dataDescriptors); } IsValid(): boolean { - return this.version >= CMMRDescriptor.FIRST_VERSION && this.version <= CMMRDescriptor.LAST_VERSION; + return this.version >= MMRDescriptor.FIRST_VERSION && this.version <= MMRDescriptor.LAST_VERSION; } }; -const VectorEncodeVDXFUni = (obj): Buffer => { +export const VectorEncodeVDXFUni = (obj): Buffer => { let ss = Buffer.from(''); if (typeof (obj) != 'object') { @@ -1084,62 +1017,60 @@ const VectorEncodeVDXFUni = (obj): Buffer => { } if (obj.message) { - return Buffer.from(obj, "utf-8"); + return Buffer.from(obj.message, "utf-8"); } // this should be an object with "vdxfkey" as the key and {object} as the json object to serialize const oneValKeys = Object.keys(obj); const oneValValues = Object.values(obj); - // TODO: change if / else to a map lookup - for (let k = 0; k < oneValKeys.length; k++) { const objTypeKey = oneValKeys[k]; - if (objTypeKey == CVDXF_Data.DataByteKey().vdxfid) { + if (objTypeKey == VDXF_Data.DataByteKey().vdxfid) { const oneByte = Buffer.from(oneValValues[k] as string, "hex"); if (oneByte.length != 1) { throw new Error("contentmap: byte data must be exactly one byte"); } ss = Buffer.concat([ss, oneByte]); } - else if (objTypeKey == CVDXF_Data.DataInt16Key().vdxfid) { + else if (objTypeKey == VDXF_Data.DataInt16Key().vdxfid) { const oneShort = Buffer.alloc(2); oneShort.writeInt16LE(oneValValues[k] as number); ss = Buffer.concat([ss, oneShort]); } - else if (objTypeKey == CVDXF_Data.DataUint16Key().vdxfid) { + else if (objTypeKey == VDXF_Data.DataUint16Key().vdxfid) { const oneUShort = Buffer.alloc(2); oneUShort.writeUInt16LE(oneValValues[k] as number); ss = Buffer.concat([ss, oneUShort]); } - else if (objTypeKey == CVDXF_Data.DataInt32Key().vdxfid) { + else if (objTypeKey == VDXF_Data.DataInt32Key().vdxfid) { const oneInt = Buffer.alloc(4); oneInt.writeInt32LE(oneValValues[k] as number); ss = Buffer.concat([ss, oneInt]); } - else if (objTypeKey == CVDXF_Data.DataUint32Key().vdxfid) { + else if (objTypeKey == VDXF_Data.DataUint32Key().vdxfid) { const oneUInt = Buffer.alloc(4); oneUInt.writeUInt32LE(oneValValues[k] as number); ss = Buffer.concat([ss, oneUInt]); } - else if (objTypeKey == CVDXF_Data.DataInt64Key().vdxfid) { + else if (objTypeKey == VDXF_Data.DataInt64Key().vdxfid) { const oneInt64 = Buffer.alloc(8); oneInt64.writeIntLE(oneValValues[k] as number, 0, 8); ss = Buffer.concat([ss, oneInt64]); } - else if (objTypeKey == CVDXF_Data.DataUint160Key().vdxfid) { + else if (objTypeKey == VDXF_Data.DataUint160Key().vdxfid) { const oneKey = fromBase58Check(oneValValues[k] as string).hash; ss = Buffer.concat([ss, oneKey]); } - else if (objTypeKey == CVDXF_Data.DataUint256Key().vdxfid) { + else if (objTypeKey == VDXF_Data.DataUint256Key().vdxfid) { const oneHash = Buffer.from(oneValValues[k] as string, "hex"); if (oneHash.length != 32) { throw new Error("contentmap: hash data must be exactly 32 bytes"); } ss = Buffer.concat([ss, oneHash.reverse()]); } - else if (objTypeKey == CVDXF_Data.DataStringKey().vdxfid) { + else if (objTypeKey == VDXF_Data.DataStringKey().vdxfid) { let length = 20; length += 1; @@ -1157,7 +1088,7 @@ const VectorEncodeVDXFUni = (obj): Buffer => { ss = Buffer.concat([ss, writer.buffer]); } - else if (objTypeKey == CVDXF_Data.DataByteVectorKey().vdxfid) { + else if (objTypeKey == VDXF_Data.DataByteVectorKey().vdxfid) { let length = 20; length += 1; @@ -1176,7 +1107,7 @@ const VectorEncodeVDXFUni = (obj): Buffer => { ss = Buffer.concat([ss, writer.buffer]); } - else if (objTypeKey == CVDXF_Data.DataCurrencyMapKey().vdxfid) { + else if (objTypeKey == VDXF_Data.DataCurrencyMapKey().vdxfid) { const destinations = Object.keys(oneValValues[k]); const values = Object.values(oneValValues[k]); @@ -1198,7 +1129,7 @@ const VectorEncodeVDXFUni = (obj): Buffer => { ss = Buffer.concat([ss, writer.buffer]); } - else if (objTypeKey == CVDXF_Data.DataRatingsKey().vdxfid) { + else if (objTypeKey == VDXF_Data.DataRatingsKey().vdxfid) { const version = new BN((oneValValues[k] as { version: number }).version); const trustLevel = new BN((oneValValues[k] as { trustLevel: number }).trustLevel); @@ -1223,7 +1154,7 @@ const VectorEncodeVDXFUni = (obj): Buffer => { ss = Buffer.concat([ss, writer.buffer]); } - else if (objTypeKey == CVDXF_Data.DataTransferDestinationKey().vdxfid) { + else if (objTypeKey == VDXF_Data.DataTransferDestinationKey().vdxfid) { const transferDest = new TransferDestination(oneValValues[k]); @@ -1242,7 +1173,7 @@ const VectorEncodeVDXFUni = (obj): Buffer => { ss = Buffer.concat([ss, writer.buffer]); } - else if (objTypeKey == CVDXF_Data.ContentMultiMapRemoveKey().vdxfid) { + else if (objTypeKey == VDXF_Data.ContentMultiMapRemoveKey().vdxfid) { const transferDest = new ContentMultiMapRemove(oneValValues[k]); @@ -1261,7 +1192,7 @@ const VectorEncodeVDXFUni = (obj): Buffer => { ss = Buffer.concat([ss, writer.buffer]); } - else if (objTypeKey == CVDXF_Data.CrossChainDataRefKey().vdxfid) { + else if (objTypeKey == VDXF_Data.CrossChainDataRefKey().vdxfid) { const transferDest = new CrossChainDataRef(oneValValues[k]); @@ -1280,9 +1211,9 @@ const VectorEncodeVDXFUni = (obj): Buffer => { ss = Buffer.concat([ss, writer.buffer]); } - else if (objTypeKey == CVDXF_Data.DataDescriptorKey().vdxfid) { + else if (objTypeKey == VDXF_Data.DataDescriptorKey().vdxfid) { - const descr = new CDataDescriptor(oneValValues[k]); + const descr = DataDescriptor.fromJson(oneValValues[k]); let length = 20; length += varint.encodingLength(descr.version); @@ -1299,9 +1230,9 @@ const VectorEncodeVDXFUni = (obj): Buffer => { ss = Buffer.concat([ss, writer.buffer]); } - else if (objTypeKey == CVDXF_Data.MMRDescriptorKey().vdxfid) { + else if (objTypeKey == VDXF_Data.MMRDescriptorKey().vdxfid) { - const descr = new CMMRDescriptor(oneValValues[k]); + const descr = MMRDescriptor.fromJson(oneValValues[k]); let length = 20; length += varint.encodingLength(descr.version); @@ -1318,7 +1249,7 @@ const VectorEncodeVDXFUni = (obj): Buffer => { ss = Buffer.concat([ss, writer.buffer]); } - else if (objTypeKey == CVDXF_Data.SignatureDataKey().vdxfid) { + else if (objTypeKey == VDXF_Data.SignatureDataKey().vdxfid) { const sigData = new SignatureData(oneValValues[k]); From e7ca2998bbd5cdbdd6b1d72e012bd7ea64db0f9d Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Wed, 24 Apr 2024 17:20:49 +0100 Subject: [PATCH 088/120] Add signaturedata fromJson function --- .../attestation/personalInfo.test.ts | 108 +++++++++++++++++- src/vdxf/classes/SignatureData.ts | 32 +++++- 2 files changed, 138 insertions(+), 2 deletions(-) diff --git a/src/__tests__/attestation/personalInfo.test.ts b/src/__tests__/attestation/personalInfo.test.ts index 6c55c20..2ad66e2 100644 --- a/src/__tests__/attestation/personalInfo.test.ts +++ b/src/__tests__/attestation/personalInfo.test.ts @@ -5,7 +5,7 @@ import {AttestationDataType } from "../../vdxf/classes/Attestation"; import { PersonalProfileDataStore, DataCategory } from "../../vdxf/classes/PersonalProfile"; import { DataDescriptor } from "../../vdxf/classes/DataDescriptor"; import { VectorEncodeVDXFUni, MMRDescriptor } from "../../vdxf/classes/DataDescriptor"; - +import { SignatureData } from "../../vdxf/classes/SignatureData"; describe('Create a personal info request', () => { test('serialize datadescriptor with nested datadescriptor', async () => { @@ -110,10 +110,116 @@ describe('Create a personal info request', () => { } const mmrdescriptorBuffer = MMRDescriptor.fromJson(mmrdescriptor); + const mmrbuffer = mmrdescriptorBuffer.toBuffer(); + }); + + test('serialize mmrdescriptor', async () => { + + const mmrdescriptor = { + "version": 1, + "objecthashtype": 5, + "mmrhashtype": 1, + "mmrroot": { + "version": 1, + "flags": 0, + "objectdata": "30395e0868b1953477e14bb5c16349622239a94115a4d1f02b72b6ecf8b1c79c" + }, + "mmrhashes": { + "version": 1, + "flags": 0, + "objectdata": "41d826d3c6cbbc3a96992670d2f604e959fd1a8c014102f1eac8f180bee7fb256b801b219e20612fbc9f5e99da111a8364d1197ff3e3fbef8259770f618dacee9489e8cd2cd5dd77d36ede6c42cebdabd85a5b5e8af60b" + }, + "datadescriptors": [ + { + "version": 1, + "flags": 2, + "objectdata": { + "i4GC1YGEVD21afWudGoFJVdnfjJ5XWnCQv": { + "version": 1, + "flags": 96, + "mimetype": "text/plain", + "objectdata": { + "message": "Chris" + }, + "label": "i4GqsotHGa4czCdtg2d8FVHKfJFzVyBPrM" + } + }, + "salt": "4f66603f256d3f757b6dc3ea44802d4041d2a1901e06005028fd60b85a5878a2" + }, + { + "version": 1, + "flags": 2, + "objectdata": { + "i4GC1YGEVD21afWudGoFJVdnfjJ5XWnCQv": { + "version": 1, + "flags": 96, + "mimetype": "text/plain", + "objectdata": { + "message": "Monkins" + }, + "label": "iHybTrNB1kXRrjsCtJXd6fvBKxepqMpS5Z" + } + }, + "salt": "62fae0c46b2ad1177749e25fd6d48ccb40213d3cc72e4b2b0dc533039cbe8314" + } + ] + } + + const mmrdescriptorBuffer = MMRDescriptor.fromJson(mmrdescriptor); + const mmrbuffer = mmrdescriptorBuffer.toBuffer(); + }); + test('serialize mmrdescriptor', async () => { + + const encryptedmmrdescriptor = { + "version": 1, + "objecthashtype": 5, + "mmrhashtype": 1, + "mmrroot": { + "version": 1, + "flags": 5, + "objectdata": "dec21b940a475989ac9220081ec3816a0026921594462841d2155a3d8462bdd8ada9f02cb7b795a01b842dce0a3c5bfe83e57fd46f34b19a67ee716a1e771264db1b7831cd2341a515", + "epk": "bdea4d6f2a88a954bed38de4ed6e7f6ff7d483fc799f1428be2ccfe6f27c87c9" + }, + "mmrhashes": { + "version": 1, + "flags": 5, + "objectdata": "8ad904b879fc67d7f0ceee8accd593549af8225d03772153465c666bb552eff607883d3d07f154a5515e167d9952feb7e3c121033e18ae855cdad782bc7ccbeb8e4737e9fdfcad31dc066695014e8aec572d4de728b8a1dedd740891ee848f85cc5eb16959761d89feafd78ac1e93494d08ea50311fa424c436bdb24b47ff369", + "epk": "7939e04d89b5713ad3a809ba4cedb4b320df8f380a8b5999e24ce4465fe43b18" + }, + "datadescriptors": [ + { + "version": 1, + "flags": 5, + "objectdata": "0e953a1bb2c81f2c101d9439736e9f614e1c289621dedfd4a0ff8455a36473c8023f4c8a35bdc546e8e48e17030cb7bc418ef248705f0873f3a1ce5674b800030294cace9b26d8d5cf06ac5a7a379be8c2a1d3e6643249312cfa83fbfe9f882a8f5cde0ddb4b940a53e5d4e69bacffa571b6e8eca218ee9d02b751c71426e8433aeabe6cf79e54495510626b5c43c690c47ca8770835", + "epk": "c7f2304a170a54dbb97951a93f7444cf689d487e46172f2f5e54923aefe8865e" + }, + { + "version": 1, + "flags": 5, + "objectdata": "05615e1c62f2a0b5311ec1d4e78d7709f3e29ac52e98a87c4222796ee532f457d0f68a4759464d0d7ea72c90177752d7ee179cfcb25d42ff4d19755650443c1f26490d80db903d28423fb38bd32f19f855f50e52b1e53529da16da8755cfc9857a4a4af1bc4327caa691633a79ef718bcf4547abf5d4cc1f26f5f6919711fc99f6de8e351726d828b534aa090bdcdc5987b117fe0c0b2e06", + "epk": "cf066d1ca66ea90a7a3de353e4a7db6fd4f88c7ae2eb47bcef9a78a0c8be6010" + } + ] + } + const mmrdescriptorBuffer = MMRDescriptor.fromJson(encryptedmmrdescriptor); const mmrbuffer = mmrdescriptorBuffer.toBuffer(); + }); + test('serialize signaturedata', async () => { + const signaturedata = { + "version": 1, + "systemid": "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq", + "hashtype": 1, + "signaturehash": "dfd3e3d82783360dfc675a09e6a226fd43119ef4e8d7cf553af96ea5883b51da", + "identityid": "iKjrTCwoPFRk44fAi2nYNbPG16ZUQjv1NB", + "signaturetype": 1, + "signature": "AgXOCgAAAUEfCiSukK9tg46cYOpHmxzKjNquWDyNc8H58+uLSOYmqlUcNUxWB8j3nzT1RHKeJGygdAwrUj5iZ/A9H3+qYV9H9g==" + } + + const mmrdescriptorBuffer = SignatureData.fromJson(signaturedata); + const mmrbuffer = mmrdescriptorBuffer.toBuffer(); }); }); diff --git a/src/vdxf/classes/SignatureData.ts b/src/vdxf/classes/SignatureData.ts index 7d084b9..249061a 100644 --- a/src/vdxf/classes/SignatureData.ts +++ b/src/vdxf/classes/SignatureData.ts @@ -6,7 +6,7 @@ import { BN } from 'bn.js'; import { BigNumber } from '../../utils/types/BigNumber'; import { I_ADDR_VERSION } from '../../constants/vdxf'; import { SerializableEntity } from '../../utils/types/SerializableEntity'; -import { read } from 'fs'; +import { EHashTypes } from './DataDescriptor'; const { BufferReader, BufferWriter } = bufferutils export class SignatureData implements SerializableEntity { @@ -34,6 +34,36 @@ export class SignatureData implements SerializableEntity { } } + static fromJson(data: any) { + + const signatureData = new SignatureData(); + + if (data) { + if (data.version) signatureData.version = new BN(data.version); + if (data.systemid) signatureData.systemID = data.systemid; + if (data.hashtype) signatureData.hashType = new BN(data.hashtype); + + if (signatureData.hashType == new BN(EHashTypes.HASH_SHA256)){ + signatureData.signatureHash = Buffer.from(data.signaturehash, 'hex').reverse(); + } else { + signatureData.signatureHash = Buffer.from(data.signaturehash, 'hex'); + } + + if (data.signaturehash) signatureData.signatureHash = Buffer.from(data.signaturehash, 'hex'); + if (data.identityid) signatureData.identityID = data.identityid; + if (data.sigtype) signatureData.sigType = new BN(data.sigtype); + signatureData.vdxfKeys = data.vdxfkeys || []; + signatureData.vdxfKeyNames = data.vdxfkeynames || []; + signatureData.boundHashes = data.boundhashes || []; + signatureData.signatureAsVch = Buffer.from(data.signatureasvch, 'base64'); + + + } + + + return new SignatureData(data) + } + getByteLength() { let byteLength = 0; From 84ab394dbbf55f924053b138719b581ddcb05a10 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Fri, 26 Apr 2024 18:52:39 +0100 Subject: [PATCH 089/120] Update Attestation to use VDXFData and Datadescriptors --- dist/pbaas/ContentMultiMapRemove.d.ts | 29 + dist/pbaas/ContentMultiMapRemove.js | 63 + dist/pbaas/Rating.d.ts | 16 + dist/pbaas/Rating.js | 55 + dist/vdxf/classes/Attestation.d.ts | 100 +- dist/vdxf/classes/Attestation.js | 478 +------ dist/vdxf/classes/Challenge.d.ts | 7 +- dist/vdxf/classes/Challenge.js | 9 +- dist/vdxf/classes/CrossChainDataRef.d.ts | 70 ++ dist/vdxf/classes/CrossChainDataRef.js | 235 ++++ dist/vdxf/classes/DataDescriptor.d.ts | 178 +++ dist/vdxf/classes/DataDescriptor.js | 1102 +++++++++++++++++ dist/vdxf/classes/Decision.js | 2 +- dist/vdxf/classes/IdentityData.d.ts | 17 +- dist/vdxf/classes/IdentityData.js | 449 +++---- dist/vdxf/classes/PersonalProfile.d.ts | 42 +- dist/vdxf/classes/PersonalProfile.js | 205 +-- dist/vdxf/classes/SignatureData.d.ts | 26 + dist/vdxf/classes/SignatureData.js | 121 ++ dist/vdxf/classes/index.d.ts | 3 +- dist/vdxf/classes/index.js | 6 +- dist/vdxf/keymap.d.ts | 6 +- dist/vdxf/keys.d.ts | 9 +- dist/vdxf/keys.js | 54 +- src/__tests__/attestation/attestation.test.ts | 190 +-- .../attestation/personalInfo.test.ts | 65 +- src/vdxf/classes/Attestation.ts | 622 +--------- src/vdxf/classes/Challenge.ts | 14 +- src/vdxf/classes/DataDescriptor.ts | 22 +- src/vdxf/classes/Decision.ts | 2 +- src/vdxf/classes/IdentityData.ts | 457 +++---- src/vdxf/classes/PersonalProfile.ts | 263 ++-- src/vdxf/classes/SignatureData.ts | 19 +- src/vdxf/classes/index.ts | 3 +- src/vdxf/keys.ts | 54 +- 35 files changed, 2905 insertions(+), 2088 deletions(-) create mode 100644 dist/pbaas/ContentMultiMapRemove.d.ts create mode 100644 dist/pbaas/ContentMultiMapRemove.js create mode 100644 dist/pbaas/Rating.d.ts create mode 100644 dist/pbaas/Rating.js create mode 100644 dist/vdxf/classes/CrossChainDataRef.d.ts create mode 100644 dist/vdxf/classes/CrossChainDataRef.js create mode 100644 dist/vdxf/classes/DataDescriptor.d.ts create mode 100644 dist/vdxf/classes/DataDescriptor.js create mode 100644 dist/vdxf/classes/SignatureData.d.ts create mode 100644 dist/vdxf/classes/SignatureData.js diff --git a/dist/pbaas/ContentMultiMapRemove.d.ts b/dist/pbaas/ContentMultiMapRemove.d.ts new file mode 100644 index 0000000..34df29c --- /dev/null +++ b/dist/pbaas/ContentMultiMapRemove.d.ts @@ -0,0 +1,29 @@ +/// +/// +import { BigNumber } from '../utils/types/BigNumber'; +import { SerializableEntity } from '../utils/types/SerializableEntity'; +export declare class ContentMultiMapRemove implements SerializableEntity { + version: BigNumber; + action: BigNumber; + entryKey: string; + valueHash: Buffer; + static VERSION_INVALID: import("bn.js"); + static VERSION_FIRST: import("bn.js"); + static VERSION_LAST: import("bn.js"); + static VERSION_CURRENT: import("bn.js"); + static ACTION_FIRST: import("bn.js"); + static ACTION_REMOVE_ONE_KEYVALUE: import("bn.js"); + static ACTION_REMOVE_ALL_KEYVALUE: import("bn.js"); + static ACTION_REMOVE_ALL_KEY: import("bn.js"); + static ACTION_CLEAR_MAP: import("bn.js"); + static ACTION_LAST: import("bn.js"); + constructor(data: { + version?: BigNumber; + action?: BigNumber; + entryKey?: string; + valueHash?: Buffer; + }); + getByteLength(): number; + toBuffer(): Buffer; + fromBuffer(buffer: Buffer, offset?: number): number; +} diff --git a/dist/pbaas/ContentMultiMapRemove.js b/dist/pbaas/ContentMultiMapRemove.js new file mode 100644 index 0000000..7fe5ba3 --- /dev/null +++ b/dist/pbaas/ContentMultiMapRemove.js @@ -0,0 +1,63 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ContentMultiMapRemove = void 0; +const address_1 = require("../utils/address"); +const bufferutils_1 = require("../utils/bufferutils"); +const bn_js_1 = require("bn.js"); +const vdxf_1 = require("../constants/vdxf"); +const { BufferReader, BufferWriter } = bufferutils_1.default; +class ContentMultiMapRemove { + constructor(data) { + this.version = data.version || new bn_js_1.BN(1, 10); + this.action = data.action || new bn_js_1.BN(0, 10); + this.entryKey = data.entryKey || ""; + this.valueHash = data.valueHash || Buffer.alloc(0); + } + getByteLength() { + let byteLength = 0; + byteLength += 4; // version uint32 + byteLength + 4; // action uint32 + if (this.action != ContentMultiMapRemove.ACTION_CLEAR_MAP) { + byteLength += 20; + if (this.action != ContentMultiMapRemove.ACTION_REMOVE_ALL_KEY) { + byteLength += 32; + } + } + return byteLength; + } + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())); + bufferWriter.writeUInt32(this.version.toNumber()); + bufferWriter.writeUInt32(this.action.toNumber()); + if (this.action != ContentMultiMapRemove.ACTION_CLEAR_MAP) { + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.entryKey).hash); + if (this.action != ContentMultiMapRemove.ACTION_REMOVE_ALL_KEY) { + bufferWriter.writeSlice(this.valueHash); + } + } + return bufferWriter.buffer; + } + fromBuffer(buffer, offset = 0) { + const reader = new BufferReader(buffer, offset); + this.version = new bn_js_1.BN(reader.readUInt32()); + this.action = new bn_js_1.BN(reader.readUInt32()); + if (this.action != ContentMultiMapRemove.ACTION_CLEAR_MAP) { + this.entryKey = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + if (this.action != ContentMultiMapRemove.ACTION_REMOVE_ALL_KEY) { + this.valueHash = reader.readSlice(32); + } + } + return reader.offset; + } +} +exports.ContentMultiMapRemove = ContentMultiMapRemove; +ContentMultiMapRemove.VERSION_INVALID = new bn_js_1.BN(0); +ContentMultiMapRemove.VERSION_FIRST = new bn_js_1.BN(1); +ContentMultiMapRemove.VERSION_LAST = new bn_js_1.BN(1); +ContentMultiMapRemove.VERSION_CURRENT = new bn_js_1.BN(1); +ContentMultiMapRemove.ACTION_FIRST = new bn_js_1.BN(1); +ContentMultiMapRemove.ACTION_REMOVE_ONE_KEYVALUE = new bn_js_1.BN(1); +ContentMultiMapRemove.ACTION_REMOVE_ALL_KEYVALUE = new bn_js_1.BN(2); +ContentMultiMapRemove.ACTION_REMOVE_ALL_KEY = new bn_js_1.BN(3); +ContentMultiMapRemove.ACTION_CLEAR_MAP = new bn_js_1.BN(4); +ContentMultiMapRemove.ACTION_LAST = new bn_js_1.BN(4); diff --git a/dist/pbaas/Rating.d.ts b/dist/pbaas/Rating.d.ts new file mode 100644 index 0000000..8a057f4 --- /dev/null +++ b/dist/pbaas/Rating.d.ts @@ -0,0 +1,16 @@ +/// +import { BigNumber } from '../utils/types/BigNumber'; +import { SerializableEntity } from '../utils/types/SerializableEntity'; +export declare class Rating implements SerializableEntity { + version: BigNumber; + trustLevel: BigNumber; + ratings: Map; + constructor(data?: { + version?: BigNumber; + trustLevel?: BigNumber; + ratings?: Map; + }); + getByteLength(): number; + toBuffer(): Buffer; + fromBuffer(buffer: Buffer, offset?: number): number; +} diff --git a/dist/pbaas/Rating.js b/dist/pbaas/Rating.js new file mode 100644 index 0000000..401cc68 --- /dev/null +++ b/dist/pbaas/Rating.js @@ -0,0 +1,55 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Rating = void 0; +const varint_1 = require("../utils/varint"); +const varuint_1 = require("../utils/varuint"); +const address_1 = require("../utils/address"); +const bufferutils_1 = require("../utils/bufferutils"); +const bn_js_1 = require("bn.js"); +const vdxf_1 = require("../constants/vdxf"); +const { BufferReader, BufferWriter } = bufferutils_1.default; +class Rating { + constructor(data = {}) { + this.version = data.version || new bn_js_1.BN(1, 10); + this.trustLevel = data.trustLevel || new bn_js_1.BN(0, 10); + this.ratings = new Map(data.ratings || []); + } + getByteLength() { + let byteLength = 0; + byteLength += 4; // version uint32 + byteLength + 1; // trustLevel uint8 + byteLength += varuint_1.default.encodingLength(this.ratings.size); + for (const [key, value] of this.ratings) { + byteLength += 20; + byteLength += varint_1.default.encodingLength(new bn_js_1.BN(value.length)); + byteLength += value.length; + } + return byteLength; + } + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())); + bufferWriter.writeUInt32(this.version.toNumber()); + bufferWriter.writeUInt8(this.trustLevel.toNumber()); + bufferWriter.writeCompactSize(this.ratings.size); + for (const [key, value] of this.ratings) { + const { hash } = (0, address_1.fromBase58Check)(key); + bufferWriter.writeSlice(hash); + bufferWriter.writeVarSlice(value); + } + return bufferWriter.buffer; + } + fromBuffer(buffer, offset = 0) { + const reader = new BufferReader(buffer, offset); + this.version = new bn_js_1.BN(reader.readUInt32()); + this.trustLevel = new bn_js_1.BN(reader.readUInt8()); + const count = reader.readCompactSize(); + for (let i = 0; i < count; i++) { + const hash = reader.readSlice(20); + const value = reader.readVarSlice(); + const base58Key = (0, address_1.toBase58Check)(hash, vdxf_1.I_ADDR_VERSION); + this.ratings.set(base58Key, value); + } + return reader.offset; + } +} +exports.Rating = Rating; diff --git a/dist/vdxf/classes/Attestation.d.ts b/dist/vdxf/classes/Attestation.d.ts index f60ae58..f1a83d6 100644 --- a/dist/vdxf/classes/Attestation.d.ts +++ b/dist/vdxf/classes/Attestation.d.ts @@ -1,90 +1,12 @@ -/// -import { VDXFObject, VerusIDSignature } from "../"; -import { CMerkleMountainRange, CMMRProof } from "./MMR"; -import { Hash160 } from "./Hash160"; -import { Utf8DataVdxfObject, HexDataVdxfObject, BufferDataVdxfObject, PNGImageVdxfObject } from '..'; -export declare class AttestationDataType { - dataItem: Utf8DataVdxfObject | HexDataVdxfObject | BufferDataVdxfObject | PNGImageVdxfObject | VDXFObject; - salt: Buffer; - constructor(data?: any, vdxfkey?: string, salt?: string); - static getDataItem(vdxfkey: any, data: any): any; - dataByteLength(): number; - toBuffer(): Buffer; - fromDataBuffer(buffer: Buffer, offset?: number, vdxfkey?: string): number; -} -export declare const friendlyNames: (vdfxkey: any) => string; -export declare class AttestationData { - components: Map; - constructor(components?: Map); - dataByteLength(): number; - toDataBuffer(): Buffer; - fromDataBuffer(buffer: Buffer, offset?: number): number; - size(): number; - setDataFromJson(data: Array, getSalt: Function): void; - getHash(key: any): Buffer; -} -export interface AttestationRequestInterfaceDataInterface { - accepted_attestors: Array; - attestation_keys: Array; - attestor_filters?: Array; -} -export declare class AttestationRequest extends VDXFObject { - data: AttestationRequestInterfaceDataInterface; - dataByteLength(): number; - toDataBuffer(): Buffer; - fromDataBuffer(buffer: Buffer, offset?: number): number; - static initializeData(data: string | AttestationRequestInterfaceDataInterface): any; - toJson(): { - vdxfkey: string; - data: { - accepted_attestors: string[]; - attestation_keys: string[]; - attestor_filters: string[]; - }; - }; -} -export declare class Attestation extends VDXFObject { - static TYPE_STRING: number; - static TYPE_BYTES: number; - static TYPE_BASE64: number; - static TYPE_URL: number; - data: AttestationData; - system_id: string; - signing_id: string; - signature?: VerusIDSignature; - mmr: CMerkleMountainRange; - constructor(data?: { - data?: AttestationData; - signature?: VerusIDSignature; - mmr?: CMerkleMountainRange; - system_id: string; - signing_id: string; - }, vdxfkey?: string); - dataByteLength(): number; - toDataBuffer(): Buffer; - fromDataBuffer(buffer: Buffer, offset?: number): number; - createMMR(): CMerkleMountainRange; - rootHash(): Buffer; - getProof(keys: Array): CPartialAttestationProof; - checkProof(): Promise; - getHash(key: any): Buffer; -} -export declare class CPartialAttestationProof extends VDXFObject { - private EType; - type: number; - proof: CMMRProof; - componentsArray: AttestationData; - system_id: string; - signing_id: string; - signature?: VerusIDSignature; - constructor(data?: { - proof?: CMMRProof; - componentsArray?: AttestationData; - system_id: string; - signing_id: string; - }, vdxfkey?: string); - dataByteLength(): number; - toDataBuffer(): Buffer; - fromDataBuffer(buffer: Buffer, offset?: number): number; - checkProof(item: number): Buffer; +import { VDXF_Data } from './DataDescriptor'; +export interface AttestationRequestInterface { + attestationId: string; + accepted_attestors: Array; + attestation_keys: Array; + attestor_filters?: Array; +} +export declare class Attestation extends VDXF_Data { + setAttestationViewRequestData(attestationId: string, accepted_attestors: Array, attestation_keys: Array, attestor_filters: Array): void; + getAttestationViewRequestData(): AttestationRequestInterface; + getAttestationProvisioningData(): any[]; } diff --git a/dist/vdxf/classes/Attestation.js b/dist/vdxf/classes/Attestation.js index 6eab70a..066c800 100644 --- a/dist/vdxf/classes/Attestation.js +++ b/dist/vdxf/classes/Attestation.js @@ -1,435 +1,77 @@ "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; Object.defineProperty(exports, "__esModule", { value: true }); -exports.CPartialAttestationProof = exports.Attestation = exports.AttestationRequest = exports.AttestationData = exports.friendlyNames = exports.AttestationDataType = void 0; -const varuint_1 = require("../../utils/varuint"); +exports.Attestation = void 0; const bufferutils_1 = require("../../utils/bufferutils"); -const createHash = require("create-hash"); const address_1 = require("../../utils/address"); const vdxf_1 = require("../../constants/vdxf"); +const DataDescriptor_1 = require("./DataDescriptor"); const __1 = require("../"); -const MMR_1 = require("./MMR"); -const keys_1 = require("../keys"); -const Hash160_1 = require("./Hash160"); -const __2 = require(".."); -const IdentityData_1 = require("./IdentityData"); +const varuint_1 = require("../../utils/varuint"); const { BufferReader, BufferWriter } = bufferutils_1.default; -class AttestationDataType { - constructor(data, vdxfkey, salt) { - this.salt = Buffer.alloc(0); - this.dataItem = AttestationDataType.getDataItem(vdxfkey, data); - if (salt) { - this.salt = Buffer.from(salt, "hex"); - } - } - static getDataItem(vdxfkey, data) { - var _a; - switch (vdxfkey && ((_a = IdentityData_1.IdentityVdxfidMap[vdxfkey]) === null || _a === void 0 ? void 0 : _a.type)) { - case 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */: - return new __2.Utf8DataVdxfObject(data, vdxfkey); - case 2 /* IdentityDataClassTypes.BUFFER_DATA_BYTES */: - return new __2.HexDataVdxfObject(data, vdxfkey); - case 3 /* IdentityDataClassTypes.BUFFER_DATA_BASE64 */: - return new __2.BufferDataVdxfObject(data, vdxfkey, "base64"); - case 4 /* IdentityDataClassTypes.URL */: - return new __2.BufferDataVdxfObject(data, vdxfkey, "utf8"); - case 5 /* IdentityDataClassTypes.PNG_IMAGE */: - return new __2.PNGImageVdxfObject(data, vdxfkey); - case 6 /* IdentityDataClassTypes.KEY_ONLY */: - return new __1.VDXFObject(vdxfkey); - case 7 /* IdentityDataClassTypes.BOOLEAN */: - return new __2.HexDataVdxfObject(data, vdxfkey); - case undefined: - default: - return new __2.HexDataVdxfObject(data, vdxfkey); - } - } - dataByteLength() { - let length = 0; - length += this.dataItem.byteLength(); - length += varuint_1.default.encodingLength(this.salt.length); - length += this.salt.length; - return length; - } - toBuffer() { - const buffer = Buffer.alloc(this.dataByteLength()); - const writer = new bufferutils_1.default.BufferWriter(buffer); - writer.writeSlice(this.dataItem.toBuffer()); - writer.writeVarSlice(this.salt); - return writer.buffer; - } - fromDataBuffer(buffer, offset = 0, vdxfkey) { - const reader = new bufferutils_1.default.BufferReader(buffer, offset); - reader.offset = this.dataItem.fromBuffer(reader.buffer, reader.offset, vdxfkey); - this.salt = reader.readVarSlice(); - return reader.offset; - } -} -exports.AttestationDataType = AttestationDataType; -const friendlyNames = (vdfxkey) => { - if (vdfxkey in IdentityData_1.IdentityVdxfidMap) { - return IdentityData_1.IdentityVdxfidMap[vdfxkey].name; - } - else { - throw new Error("Unknown VDXF key"); - } -}; -exports.friendlyNames = friendlyNames; -class AttestationData { - constructor(components = new Map()) { - this.components = components; - } - dataByteLength() { - let byteLength = 0; - byteLength += varuint_1.default.encodingLength(this.components.size); - for (const [key, item] of this.components) { - byteLength += varuint_1.default.encodingLength(key); - byteLength += item.dataByteLength(); - } - return byteLength; - } - toDataBuffer() { - const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); - bufferWriter.writeCompactSize(this.components.size); - for (const [key, item] of this.components) { - bufferWriter.writeCompactSize(key); - bufferWriter.writeSlice(item.toBuffer()); - } - return bufferWriter.buffer; - } - fromDataBuffer(buffer, offset) { - const reader = new bufferutils_1.default.BufferReader(buffer, offset); - const componentsLength = reader.readCompactSize(); - this.components = new Map(); - for (var i = 0; i < componentsLength; i++) { - const key = reader.readCompactSize(); - const vdxfid = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); - const attestationData = new AttestationDataType(null, vdxfid); - reader.offset = attestationData.fromDataBuffer(reader.buffer, reader.offset, vdxfid); - this.components.set(key, attestationData); - } - return reader.offset; - } - size() { - return this.components.size; - } - setDataFromJson(data, getSalt) { - if (!this.components) { - this.components = new Map(); - } - for (let i = 0; i < data.length; i++) { - const item = data[i]; - if (!(item.salt instanceof Buffer) || item.salt.length !== 32) { - if (typeof getSalt === "function") { - item.salt = getSalt(); - } - else { - throw new Error("Salt is required to be a 32 random byte Buffer"); - } - } - try { - (0, address_1.fromBase58Check)(item.dataItem.vdxfkey); - } - catch (e) { - throw new Error("Attestation Key is required to be base58 format"); - } - this.components.set(i, item); - } - } - getHash(key) { - let value; - value = this.components.get(key).toBuffer(); - return createHash("sha256").update(value).digest(); - } -} -exports.AttestationData = AttestationData; -class AttestationRequest extends __1.VDXFObject { - dataByteLength() { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; - let length = 0; - length += varuint_1.default.encodingLength((_b = (_a = this.data.accepted_attestors) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0); - length += (_d = (_c = this.data.accepted_attestors) === null || _c === void 0 ? void 0 : _c.reduce((sum, current) => sum + current.byteLength(), 0)) !== null && _d !== void 0 ? _d : 0; - length += varuint_1.default.encodingLength((_f = (_e = this.data.attestation_keys) === null || _e === void 0 ? void 0 : _e.length) !== null && _f !== void 0 ? _f : 0); - length += (_h = (_g = this.data.attestation_keys) === null || _g === void 0 ? void 0 : _g.reduce((sum, current) => sum + current.byteLength(), 0)) !== null && _h !== void 0 ? _h : 0; - length += varuint_1.default.encodingLength((_k = (_j = this.data.attestor_filters) === null || _j === void 0 ? void 0 : _j.length) !== null && _k !== void 0 ? _k : 0); - length += (_m = (_l = this.data.attestor_filters) === null || _l === void 0 ? void 0 : _l.reduce((sum, current) => sum + current.byteLength(), 0)) !== null && _m !== void 0 ? _m : 0; - return length; - } - toDataBuffer() { - const writer = new bufferutils_1.default.BufferWriter(Buffer.alloc(this.dataByteLength())); - writer.writeArray(this.data.accepted_attestors.map((x) => x.toBuffer())); - writer.writeArray(this.data.attestation_keys.map((x) => x.toBuffer())); - writer.writeArray(this.data.attestor_filters.map((x) => x.toBuffer())); - return writer.buffer; - } - fromDataBuffer(buffer, offset) { - const reader = new bufferutils_1.default.BufferReader(buffer, offset); - reader.readVarInt(); //skip data length - function readHash160Array(arr) { - const length = reader.readVarInt(); - for (let i = 0; i < length.toNumber(); i++) { - const member = new Hash160_1.Hash160(); - reader.offset = member.fromBuffer(reader.buffer, false, reader.offset); - arr.push(member); - } - if (length.toNumber() === 0) - arr = []; - } - readHash160Array(this.data.accepted_attestors); - readHash160Array(this.data.attestation_keys); - readHash160Array(this.data.attestor_filters); - return reader.offset; - } - static initializeData(data) { - var retData; - if (typeof data === 'object') { - retData = { - accepted_attestors: (data.accepted_attestors || []).map((x) => typeof x === 'string' ? Hash160_1.Hash160.fromAddress(x) : x), - attestation_keys: (data.attestation_keys || []).map((x) => typeof x === 'string' ? Hash160_1.Hash160.fromAddress(x) : x), - attestor_filters: (data.attestor_filters || []).map((x) => typeof x === 'string' ? Hash160_1.Hash160.fromAddress(x) : x) - }; - } - else { - retData = { - accepted_attestors: [], - attestation_keys: [], - attestor_filters: [] - }; - } - return retData; - } - toJson() { - const { accepted_attestors, attestation_keys, attestor_filters } = this.data; - return { - vdxfkey: this.vdxfkey, - data: { - accepted_attestors: (accepted_attestors === null || accepted_attestors === void 0 ? void 0 : accepted_attestors.map((x) => x.toAddress())) || [], - attestation_keys: (attestation_keys === null || attestation_keys === void 0 ? void 0 : attestation_keys.map((x) => x.toAddress())) || [], - attestor_filters: (attestor_filters === null || attestor_filters === void 0 ? void 0 : attestor_filters.map((x) => x.toAddress())) || [] - } +class Attestation extends DataDescriptor_1.VDXF_Data { + setAttestationViewRequestData(attestationId, accepted_attestors, attestation_keys, attestor_filters) { + this.vdxfkey = __1.ATTESTATION_VIEW_REQUEST.vdxfid; + let length = 20; // attestationId + length += varuint_1.default.encodingLength(accepted_attestors.length); + length += accepted_attestors.length * 20; // accepted_attestors + length += varuint_1.default.encodingLength(attestation_keys.length); + length += attestation_keys.length * 20; // attestation_keys + length += varuint_1.default.encodingLength(attestor_filters.length); + length += attestor_filters.length * 20; // attestor_filters + let writer = new BufferWriter(Buffer.alloc(length)); + writer.writeSlice((0, address_1.fromBase58Check)(attestationId).hash); + writer.writeCompactSize(accepted_attestors.length); + for (let i = 0; i < accepted_attestors.length; i++) { + writer.writeSlice((0, address_1.fromBase58Check)(accepted_attestors[i]).hash); + } + writer.writeCompactSize(attestation_keys.length); + for (let i = 0; i < attestation_keys.length; i++) { + writer.writeSlice((0, address_1.fromBase58Check)(attestation_keys[i]).hash); + } + writer.writeCompactSize(attestor_filters.length); + for (let i = 0; i < attestor_filters.length; i++) { + writer.writeSlice((0, address_1.fromBase58Check)(attestor_filters[i]).hash); + } + } + getAttestationViewRequestData() { + if (this.vdxfkey != __1.ATTESTATION_VIEW_REQUEST.vdxfid) { + throw new Error("Invalid attestation request type"); + } + let retVal = { + attestationId: "", + accepted_attestors: [], + attestation_keys: [], + attestor_filters: [] }; - } -} -exports.AttestationRequest = AttestationRequest; -class Attestation extends __1.VDXFObject { - constructor(data, vdxfkey = keys_1.ATTESTATION_OBJECT.vdxfid) { - super(vdxfkey); - if (data) { - this.data = data.data; - this.signature = data.signature; - this.mmr = data.mmr; - this.system_id = data.system_id; - this.signing_id = data.signing_id; - } - } - dataByteLength() { - let byteLength = 0; - byteLength += this.data.dataByteLength(); - const _system_id = Hash160_1.Hash160.fromAddress(this.system_id); - const _signing_id = Hash160_1.Hash160.fromAddress(this.signing_id); - const _signature = this.signature - ? this.signature - : new __1.VerusIDSignature({ signature: "" }); - byteLength += _system_id.byteLength(); - byteLength += _signing_id.byteLength(); - byteLength += _signature.byteLength(); - if (this.mmr) { - byteLength += this.mmr.getbyteLength(); - } - else { - byteLength += varuint_1.default.encodingLength(0); + const reader = new BufferReader(Buffer.from(this.data, 'hex'), 0); + retVal.attestationId = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + let attestorCount = reader.readCompactSize(); + for (let i = 0; i < attestorCount; i++) { + retVal.accepted_attestors.push((0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION)); } - return byteLength; - } - toDataBuffer() { - const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); - bufferWriter.writeSlice(this.data.toDataBuffer()); - const _system_id = Hash160_1.Hash160.fromAddress(this.system_id); - const _signing_id = Hash160_1.Hash160.fromAddress(this.signing_id); - const _signature = this.signature - ? this.signature - : new __1.VerusIDSignature({ signature: "" }); - bufferWriter.writeSlice(_system_id.toBuffer()); - bufferWriter.writeSlice(_signing_id.toBuffer()); - bufferWriter.writeSlice(_signature.toBuffer()); - if (this.mmr) { - bufferWriter.writeVarSlice(this.mmr.toBuffer()); + let attestationKeyCount = reader.readCompactSize(); + for (let i = 0; i < attestationKeyCount; i++) { + retVal.attestation_keys.push((0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION)); } - else { - bufferWriter.writeCompactSize(0); + let attestorFilterCount = reader.readCompactSize(); + for (let i = 0; i < attestorFilterCount; i++) { + retVal.attestor_filters.push((0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION)); } - return bufferWriter.buffer; + return retVal; } - fromDataBuffer(buffer, offset) { - const reader = new bufferutils_1.default.BufferReader(buffer, offset); - const attestationsByteLength = reader.readCompactSize(); //dummy read - if (!this.data) { - this.data = new AttestationData(); - } - reader.offset = this.data.fromDataBuffer(reader.buffer, reader.offset); - this.system_id = (0, address_1.toBase58Check)(reader.readSlice(vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION); - this.signing_id = (0, address_1.toBase58Check)(reader.readSlice(vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION); - const _sig = new __1.VerusIDSignature(); - reader.offset = _sig.fromBuffer(reader.buffer, reader.offset); - this.signature = _sig; - const leafLength = reader.readCompactSize(); - if (leafLength > 0) { - const referenceTreeLength = reader.readCompactSize(); - const nodes = {}; - for (var i = 0; i < referenceTreeLength; i++) { - const nodeIndex = reader.readCompactSize(); - const signature = reader.readVarSlice(); - nodes[nodeIndex] = signature; - } - if (Object.keys(nodes).length > 0) { - this.mmr = new MMR_1.CMerkleMountainRange().fromBuffer(reader.buffer); - } - } - return reader.offset; - } - createMMR() { - if (!this.mmr) { - this.mmr = new MMR_1.CMerkleMountainRange(); - } - else { - return this.mmr; + getAttestationProvisioningData() { + if (this.vdxfkey != __1.ATTESTATION_PROVISION_TYPE.vdxfid) { + throw new Error("Invalid attestation request type"); } - for (const [key, item] of this.data.components) { - this.mmr.add(new MMR_1.CMMRNode(this.getHash(key))); + const reader = new BufferReader(Buffer.from(this.data, 'hex'), 0); + let dataDescriptorItemsCount = reader.readCompactSize(); + let dataDescriptors = []; + for (let i = 0; i < dataDescriptorItemsCount; i++) { + let dataDescriptor = new DataDescriptor_1.DataDescriptor(); + reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); + dataDescriptors.push(dataDescriptor); } - return this.mmr; - } - rootHash() { - if (!this.mmr) { - this.createMMR(); - } - const view = new MMR_1.CMerkleMountainView(this.mmr); - return view.GetRoot(); - } - // returns an attestation with a sparse MMR containing the leaves specified - getProof(keys) { - const view = new MMR_1.CMerkleMountainView(this.mmr); - const attestationItems = new AttestationData(); - const localCMMR = new MMR_1.CMMRProof(); - keys.forEach((key, index) => { - view.GetProof(localCMMR, key); - attestationItems.components.set(key, this.data.components.get(key)); - }); - const attestationAndProof = new CPartialAttestationProof({ - proof: localCMMR, - componentsArray: attestationItems, - system_id: this.system_id, - signing_id: this.signing_id, - }); - return attestationAndProof; - } - checkProof() { - return __awaiter(this, void 0, void 0, function* () { - try { - for (const [key, item] of this.data.components) { - const hash = this.getHash(key); - const proof = null; //await this.mmr.getProof([key], null); - if (hash !== proof) { - throw new Error("Attestation not found in MMR"); - } - } - } - catch (e) { - throw new Error("Error checking MMR"); - } - }); - } - getHash(key) { - let returnBuffer; - returnBuffer = this.data.components.get(key).toBuffer(); - return createHash("sha256").update(returnBuffer).digest(); + return dataDescriptors; } } exports.Attestation = Attestation; -Attestation.TYPE_STRING = 1; -Attestation.TYPE_BYTES = 2; -Attestation.TYPE_BASE64 = 3; -Attestation.TYPE_URL = 4; -class CPartialAttestationProof extends __1.VDXFObject { - constructor(data, vdxfkey = keys_1.ATTESTATION_VIEW_RESPONSE.vdxfid) { - super(vdxfkey); - this.EType = { - TYPE_INVALID: 0, - TYPE_ATTESTATION: 1, - TYPE_LAST: 1 - }; - this.type = this.EType.TYPE_ATTESTATION; - if (data) { - this.proof = data.proof || new MMR_1.CMMRProof(); - this.componentsArray = data.componentsArray || new AttestationData(); - this.system_id = data.system_id; - this.signing_id = data.signing_id; - } - } - dataByteLength() { - let byteLength = 0; - byteLength += varuint_1.default.encodingLength(this.type); - byteLength += this.proof.dataByteLength(); - byteLength += this.componentsArray.dataByteLength(); - const _system_id = Hash160_1.Hash160.fromAddress(this.system_id); - const _signing_id = Hash160_1.Hash160.fromAddress(this.signing_id); - const _signature = this.signature - ? this.signature - : new __1.VerusIDSignature({ signature: "" }); - byteLength += _system_id.byteLength(); - byteLength += _signing_id.byteLength(); - byteLength += _signature.byteLength(); - return byteLength; - } - toDataBuffer() { - const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); - bufferWriter.writeCompactSize(this.type); - bufferWriter.writeSlice(this.proof.toBuffer()); - bufferWriter.writeSlice(this.componentsArray.toDataBuffer()); - const _system_id = Hash160_1.Hash160.fromAddress(this.system_id); - const _signing_id = Hash160_1.Hash160.fromAddress(this.signing_id); - const _signature = this.signature - ? this.signature - : new __1.VerusIDSignature({ signature: "" }); - bufferWriter.writeSlice(_system_id.toBuffer()); - bufferWriter.writeSlice(_signing_id.toBuffer()); - bufferWriter.writeSlice(_signature.toBuffer()); - return bufferWriter.buffer; - } - fromDataBuffer(buffer, offset) { - const reader = new bufferutils_1.default.BufferReader(buffer, offset); - const lengthOfBuffer = reader.readCompactSize(); //dummy read - this.type = reader.readCompactSize(); - this.proof = new MMR_1.CMMRProof(); - reader.offset = this.proof.fromDataBuffer(reader.buffer, reader.offset); - this.componentsArray = new AttestationData(); - reader.offset = this.componentsArray.fromDataBuffer(reader.buffer, reader.offset); - this.system_id = (0, address_1.toBase58Check)(reader.readSlice(vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION); - this.signing_id = (0, address_1.toBase58Check)(reader.readSlice(vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION); - const _sig = new __1.VerusIDSignature(); - reader.offset = _sig.fromBuffer(reader.buffer, reader.offset); - this.signature = _sig; - return reader.offset; - } - checkProof(item) { - const dataHash = this.componentsArray.getHash(item); - let currentIndex = 0; - const component = this.componentsArray.components.get(item); - for (let value of this.componentsArray.components.values()) { - if (component == value) { - return this.proof.proofSequence[currentIndex].safeCheck(dataHash); - } - currentIndex++; - } - return Buffer.allocUnsafe(32); - } -} -exports.CPartialAttestationProof = CPartialAttestationProof; diff --git a/dist/vdxf/classes/Challenge.d.ts b/dist/vdxf/classes/Challenge.d.ts index c59455c..a44ea06 100644 --- a/dist/vdxf/classes/Challenge.d.ts +++ b/dist/vdxf/classes/Challenge.d.ts @@ -2,7 +2,6 @@ import { Utf8DataVdxfObject, VDXFObject, Utf8OrBase58Object } from "../"; import { Context } from "./Context"; import { Attestation } from "./Attestation"; -import { AttestationRequestInterfaceDataInterface } from './Attestation'; export declare class RedirectUri extends VDXFObject { uri: string; constructor(uri?: string, vdxfkey?: string); @@ -78,9 +77,9 @@ export declare class Challenge extends VDXFObject implements ChallengeInterface }; } export declare class RequestedPermission extends VDXFObject { - data: string | AttestationRequestInterfaceDataInterface; + data: string; encoding?: BufferEncoding; - constructor(data?: string | AttestationRequestInterfaceDataInterface, vdxfkey?: string); - addPrototypes(data: string | AttestationRequestInterfaceDataInterface): void; + constructor(data: string, vdxfkey?: string); + addPrototypes(data: string): void; fromDataBuffer(buffer: Buffer, offset?: number): number; } diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index 9ecb78d..b182662 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -10,7 +10,6 @@ const Attestation_1 = require("./Attestation"); const address_1 = require("../../utils/address"); const vdxf_1 = require("../../constants/vdxf"); const index_1 = require("../index"); -const Attestation_2 = require("./Attestation"); class RedirectUri extends __1.VDXFObject { constructor(uri = "", vdxfkey = "") { super(vdxfkey); @@ -220,7 +219,7 @@ class Challenge extends __1.VDXFObject { this.attestations = []; const attestationsLength = reader.readCompactSize(); for (let i = 0; i < attestationsLength; i++) { - const _att = new Attestation_1.Attestation(); + const _att = new Attestation_1.Attestation("", ""); reader.offset = _att.fromBuffer(reader.buffer, reader.offset); this.attestations.push(_att); } @@ -261,7 +260,7 @@ class Challenge extends __1.VDXFObject { } exports.Challenge = Challenge; class RequestedPermission extends __1.VDXFObject { - constructor(data = "", vdxfkey = "") { + constructor(data, vdxfkey = "") { super(vdxfkey); if (vdxfkey) this.addPrototypes(data); @@ -269,10 +268,6 @@ class RequestedPermission extends __1.VDXFObject { addPrototypes(data) { var classType; switch (this.vdxfkey) { - case __1.ATTESTATION_READ_REQUEST.vdxfid: - classType = Attestation_2.AttestationRequest; - this.data = Attestation_2.AttestationRequest.initializeData(data); - break; case __1.IDENTITY_AGREEMENT.vdxfid: classType = index_1.BufferDataVdxfObject; this.data = data; diff --git a/dist/vdxf/classes/CrossChainDataRef.d.ts b/dist/vdxf/classes/CrossChainDataRef.d.ts new file mode 100644 index 0000000..e034818 --- /dev/null +++ b/dist/vdxf/classes/CrossChainDataRef.d.ts @@ -0,0 +1,70 @@ +/// +/// +import { BigNumber } from '../../utils/types/BigNumber'; +import { SerializableEntity } from '../../utils/types/SerializableEntity'; +export declare class CUTXORef implements SerializableEntity { + hash: Buffer; + n: BigNumber; + constructor(data?: { + hash?: Buffer; + n?: BigNumber; + }); + getByteLength(): number; + toBuffer(): Buffer; + fromBuffer(buffer: Buffer, offset?: number): number; +} +export declare class PBaaSEvidenceRef implements SerializableEntity { + version: BigNumber; + flags: BigNumber; + output: CUTXORef; + objectNum: BigNumber; + subObject: BigNumber; + systemID: string; + static FLAG_ISEVIDENCE: import("bn.js"); + static FLAG_HAS_SYSTEM: import("bn.js"); + constructor(data?: any); + SetFlags(): void; + getByteLength(): number; + toBuffer(): Buffer; + fromBuffer(buffer: Buffer, offset?: number): number; +} +export declare class IdentityMultimapRef implements SerializableEntity { + version: BigNumber; + flags: BigNumber; + idID: string; + key: string; + heightStart: BigNumber; + heightEnd: BigNumber; + dataHash: Buffer; + systemID: string; + static FLAG_NO_DELETION: import("bn.js"); + static FLAG_HAS_DATAHASH: import("bn.js"); + static FLAG_HAS_SYSTEM: import("bn.js"); + constructor(data?: any); + SetFlags(): void; + getByteLength(): number; + toBuffer(): Buffer; + fromBuffer(buffer: Buffer, offset?: number): number; +} +export declare class URLRef implements SerializableEntity { + version: BigNumber; + url: string; + constructor(data?: { + version?: BigNumber; + url?: string; + }); + getByteLength(): number; + toBuffer(): Buffer; + fromBuffer(buffer: Buffer, offset?: number): number; +} +export declare class CrossChainDataRef implements SerializableEntity { + ref: PBaaSEvidenceRef | IdentityMultimapRef | URLRef; + static TYPE_CROSSCHAIN_DATAREF: number; + static TYPE_IDENTITY_DATAREF: number; + static TYPE_URL_REF: number; + constructor(data: PBaaSEvidenceRef | IdentityMultimapRef | URLRef | any); + which(): number; + getByteLength(): number; + toBuffer(): Buffer; + fromBuffer(buffer: Buffer, offset?: number): number; +} diff --git a/dist/vdxf/classes/CrossChainDataRef.js b/dist/vdxf/classes/CrossChainDataRef.js new file mode 100644 index 0000000..53e15f4 --- /dev/null +++ b/dist/vdxf/classes/CrossChainDataRef.js @@ -0,0 +1,235 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CrossChainDataRef = exports.URLRef = exports.IdentityMultimapRef = exports.PBaaSEvidenceRef = exports.CUTXORef = void 0; +const varint_1 = require("../../utils/varint"); +const varuint_1 = require("../../utils/varuint"); +const address_1 = require("../../utils/address"); +const bufferutils_1 = require("../../utils/bufferutils"); +const bn_js_1 = require("bn.js"); +const vdxf_1 = require("../../constants/vdxf"); +const { BufferReader, BufferWriter } = bufferutils_1.default; +class CUTXORef { + constructor(data) { + this.hash = data.hash || Buffer.alloc(0); + this.n = data.n || new bn_js_1.BN(0); + } + getByteLength() { + let byteLength = 0; + byteLength += 32; // hash uint256 + byteLength += 4; // n uint32 + return byteLength; + } + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())); + bufferWriter.writeSlice(this.hash); + bufferWriter.writeUInt32(this.n.toNumber()); + return bufferWriter.buffer; + } + fromBuffer(buffer, offset = 0) { + const reader = new BufferReader(buffer, offset); + this.hash = reader.readSlice(32); + this.n = new bn_js_1.BN(reader.readUInt32()); + return reader.offset; + } +} +exports.CUTXORef = CUTXORef; +class PBaaSEvidenceRef { + constructor(data) { + if (data) { + Object.assign(this, data); + } + } + SetFlags() { + this.flags = this.flags.and(PBaaSEvidenceRef.FLAG_ISEVIDENCE); + if (this.systemID && this.systemID.length > 0) { + this.flags = this.flags.or(PBaaSEvidenceRef.FLAG_HAS_SYSTEM); + } + } + getByteLength() { + let byteLength = 0; + this.SetFlags(); + byteLength += varint_1.default.encodingLength(this.version); + byteLength += varint_1.default.encodingLength(this.flags); + byteLength += this.output.getByteLength(); + byteLength += varint_1.default.encodingLength(this.objectNum); + byteLength += varint_1.default.encodingLength(this.subObject); + if (this.flags.and(PBaaSEvidenceRef.FLAG_HAS_SYSTEM).gt(new bn_js_1.BN(0))) { + byteLength += 20; + } + return byteLength; + } + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())); + bufferWriter.writeVarInt(this.version); + bufferWriter.writeVarInt(this.flags); + bufferWriter.writeSlice(this.output.toBuffer()); + bufferWriter.writeVarInt(this.objectNum); + bufferWriter.writeVarInt(this.subObject); + if (this.flags.and(PBaaSEvidenceRef.FLAG_HAS_SYSTEM).gt(new bn_js_1.BN(0))) { + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.systemID).hash); + } + return bufferWriter.buffer; + } + fromBuffer(buffer, offset = 0) { + const reader = new BufferReader(buffer, offset); + this.version = reader.readVarInt(); + this.flags = reader.readVarInt(); + this.output = new CUTXORef(); + offset = this.output.fromBuffer(reader.buffer, reader.offset); + this.objectNum = reader.readVarInt(); + this.subObject = reader.readVarInt(); + if (this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH).gt(new bn_js_1.BN(0))) { + this.systemID = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + } + return reader.offset; + } +} +exports.PBaaSEvidenceRef = PBaaSEvidenceRef; +PBaaSEvidenceRef.FLAG_ISEVIDENCE = new bn_js_1.BN(1); +PBaaSEvidenceRef.FLAG_HAS_SYSTEM = new bn_js_1.BN(2); +class IdentityMultimapRef { + constructor(data) { + if (data) { + Object.assign(this, data); + } + } + SetFlags() { + this.flags = this.flags.and(IdentityMultimapRef.FLAG_NO_DELETION); + if (this.dataHash && this.dataHash.length > 0) { + this.flags = this.flags.or(IdentityMultimapRef.FLAG_HAS_DATAHASH); + } + if (this.systemID && this.systemID.length > 0) { + this.flags = this.flags.or(IdentityMultimapRef.FLAG_HAS_SYSTEM); + } + } + getByteLength() { + let byteLength = 0; + this.SetFlags(); + byteLength += varint_1.default.encodingLength(this.version); + byteLength += varint_1.default.encodingLength(this.flags); + byteLength += 20; // idID uint160 + byteLength += 20; // key uint160 + byteLength += 4; // heightStart uint32 + byteLength += 4; // heightEnd uint32 + byteLength += 32; // dataHash uint25 + if (this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH).gt(new bn_js_1.BN(0))) { + byteLength += 32; + } + if (this.flags.and(IdentityMultimapRef.FLAG_HAS_SYSTEM).gt(new bn_js_1.BN(0))) { + byteLength += 20; + } + return byteLength; + } + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())); + bufferWriter.writeVarInt(this.version); + bufferWriter.writeVarInt(this.flags); + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.idID).hash); + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.key).hash); + bufferWriter.writeVarInt(this.heightStart); + bufferWriter.writeVarInt(this.heightEnd); + if (this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH).gt(new bn_js_1.BN(0))) { + bufferWriter.writeSlice(this.dataHash); + } + if (this.flags.and(IdentityMultimapRef.FLAG_HAS_SYSTEM).gt(new bn_js_1.BN(0))) { + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.systemID).hash); + } + return bufferWriter.buffer; + } + fromBuffer(buffer, offset = 0) { + const reader = new BufferReader(buffer, offset); + this.version = reader.readVarInt(); + this.flags = reader.readVarInt(); + this.idID = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + this.key = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + this.heightStart = reader.readVarInt(); + this.heightEnd = reader.readVarInt(); + if (this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH).gt(new bn_js_1.BN(0))) { + this.dataHash = reader.readSlice(32); + } + if (this.flags.and(IdentityMultimapRef.FLAG_HAS_SYSTEM).gt(new bn_js_1.BN(0))) { + this.systemID = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + } + return reader.offset; + } +} +exports.IdentityMultimapRef = IdentityMultimapRef; +IdentityMultimapRef.FLAG_NO_DELETION = new bn_js_1.BN(1); +IdentityMultimapRef.FLAG_HAS_DATAHASH = new bn_js_1.BN(2); +IdentityMultimapRef.FLAG_HAS_SYSTEM = new bn_js_1.BN(4); +class URLRef { + constructor(data) { + if (data) { + this.version = data.version || new bn_js_1.BN(1, 10); + this.url = data.url || ""; + } + } + getByteLength() { + let byteLength = 0; + byteLength += varint_1.default.encodingLength(this.version); + byteLength += varuint_1.default.encodingLength(Buffer.from(this.url, 'utf8').length); + byteLength += Buffer.from(this.url, 'utf8').length; + if (byteLength > 4096) + throw new Error("URLRef exceeds maximum length of 4096 bytes"); + return byteLength; + } + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())); + bufferWriter.writeVarInt(this.version); + bufferWriter.writeVarSlice(Buffer.from(this.url, 'utf8')); + return bufferWriter.buffer; + } + fromBuffer(buffer, offset = 0) { + const reader = new BufferReader(buffer, offset); + this.version = reader.readVarInt(); + this.url = reader.readVarSlice().toString('utf8'); + return reader.offset; + } +} +exports.URLRef = URLRef; +class CrossChainDataRef { + constructor(data) { + this.ref = data || null; + } + which() { + if (this.ref instanceof PBaaSEvidenceRef) { + return CrossChainDataRef.TYPE_CROSSCHAIN_DATAREF; + } + else if (this.ref instanceof IdentityMultimapRef) { + return CrossChainDataRef.TYPE_IDENTITY_DATAREF; + } + else if (this.ref instanceof URLRef) { + return CrossChainDataRef.TYPE_URL_REF; + } + } + getByteLength() { + let byteLength = 1; //type uint8 + byteLength += this.ref.getByteLength(); + return byteLength; + } + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())); + bufferWriter.writeUInt8(this.which()); + bufferWriter.writeSlice(this.ref.toBuffer()); + return bufferWriter.buffer; + } + fromBuffer(buffer, offset = 0) { + const reader = new BufferReader(buffer, offset); + const type = reader.readUInt8(); + if (type == CrossChainDataRef.TYPE_CROSSCHAIN_DATAREF) { + this.ref = new PBaaSEvidenceRef(); + } + else if (type == CrossChainDataRef.TYPE_IDENTITY_DATAREF) { + this.ref = new IdentityMultimapRef(); + } + else if (type == CrossChainDataRef.TYPE_URL_REF) { + this.ref = new URLRef(); + } + offset = this.ref.fromBuffer(buffer, reader.offset); + return reader.offset; + } +} +exports.CrossChainDataRef = CrossChainDataRef; +CrossChainDataRef.TYPE_CROSSCHAIN_DATAREF = 0; +CrossChainDataRef.TYPE_IDENTITY_DATAREF = 1; +CrossChainDataRef.TYPE_URL_REF = 2; diff --git a/dist/vdxf/classes/DataDescriptor.d.ts b/dist/vdxf/classes/DataDescriptor.d.ts new file mode 100644 index 0000000..7d5b5dd --- /dev/null +++ b/dist/vdxf/classes/DataDescriptor.d.ts @@ -0,0 +1,178 @@ +/// +/// +import { BigNumber } from '../../utils/types/BigNumber'; +import { BufferDataVdxfObject } from '../index'; +import { VDXFKeyInterface } from "../keys"; +export declare class DataDescriptor { + static VERSION_INVALID: import("bn.js"); + static VERSION_FIRST: import("bn.js"); + static FIRST_VERSION: import("bn.js"); + static LAST_VERSION: import("bn.js"); + static DEFAULT_VERSION: import("bn.js"); + static FLAG_ENCRYPTED_DATA: import("bn.js"); + static FLAG_SALT_PRESENT: import("bn.js"); + static FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT: import("bn.js"); + static FLAG_INCOMING_VIEWING_KEY_PRESENT: import("bn.js"); + static FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT: import("bn.js"); + static FLAG_LABEL_PRESENT: import("bn.js"); + static FLAG_MIME_TYPE_PRESENT: import("bn.js"); + static FLAG_MASK: import("bn.js"); + version: BigNumber; + flags: BigNumber; + objectdata: Buffer; + label: string; + mimeType: string; + salt: Buffer; + epk: Buffer; + ivk: Buffer; + ssk: Buffer; + constructor(data?: { + version?: BigNumber; + flags?: BigNumber; + objectdata?: Buffer; + label?: string; + mimeType?: string; + salt?: Buffer; + epk?: Buffer; + ivk?: Buffer; + ssk?: Buffer; + }); + static fromJson(data: any): DataDescriptor; + DecodeHashVector(): Array; + byteLength(): number; + toBuffer(): Buffer; + fromBuffer(buffer: Buffer, offset?: number): number; + HasEncryptedData(): boolean; + HasSalt(): boolean; + HasEPK(): boolean; + HasMIME(): boolean; + HasIVK(): boolean; + HasSSK(): boolean; + HasLabel(): boolean; + CalcFlags(): BigNumber; + SetFlags(): void; + IsValid(): boolean; +} +export declare class VDXF_Data extends BufferDataVdxfObject { + constructor(data: string, key: string); + static DataByteKeyName(): string; + static DataByteKey(): VDXFKeyInterface; + static DataInt16KeyName(): string; + static DataInt16Key(): VDXFKeyInterface; + static DataUint16KeyName(): string; + static DataUint16Key(): VDXFKeyInterface; + static DataInt32KeyName(): string; + static DataInt32Key(): VDXFKeyInterface; + static DataUint32KeyName(): string; + static DataUint32Key(): VDXFKeyInterface; + static DataInt64KeyName(): string; + static DataInt64Key(): VDXFKeyInterface; + static DataUint64KeyName(): string; + static DataUint64Key(): VDXFKeyInterface; + static DataUint160KeyName(): string; + static DataUint160Key(): VDXFKeyInterface; + static DataUint256KeyName(): string; + static DataUint256Key(): VDXFKeyInterface; + static DataStringKeyName(): string; + static DataStringKey(): VDXFKeyInterface; + static DataVectorKeyName(): string; + static DataVectorKey(): VDXFKeyInterface; + static DataByteVectorKeyName(): string; + static DataByteVectorKey(): VDXFKeyInterface; + static DataInt32VectorKeyName(): string; + static DataInt32VectorKey(): VDXFKeyInterface; + static DataInt64VectorKeyName(): string; + static DataInt64VectorKey(): VDXFKeyInterface; + static DataCurrencyMapKeyName(): string; + static DataCurrencyMapKey(): VDXFKeyInterface; + static DataRatingsKeyName(): string; + static DataRatingsKey(): VDXFKeyInterface; + static DataURLKeyName(): string; + static DataURLKey(): VDXFKeyInterface; + static DataTransferDestinationKeyName(): string; + static DataTransferDestinationKey(): VDXFKeyInterface; + static UTXORefKeyName(): string; + static UTXORefKey(): VDXFKeyInterface; + static CrossChainDataRefKeyName(): string; + static CrossChainDataRefKey(): VDXFKeyInterface; + static EncryptionDescriptorKeyName(): string; + static EncryptionDescriptorKey(): VDXFKeyInterface; + static SaltedDataKeyName(): string; + static SaltedDataKey(): VDXFKeyInterface; + static DataDescriptorKeyName(): string; + static DataDescriptorKey(): VDXFKeyInterface; + static SignatureDataKeyName(): string; + static SignatureDataKey(): VDXFKeyInterface; + static VectorUint256KeyName(): string; + static VectorUint256Key(): VDXFKeyInterface; + static MMRLinksKeyName(): string; + static MMRLinksKey(): VDXFKeyInterface; + static MMRDescriptorKeyName(): string; + static MMRDescriptorKey(): VDXFKeyInterface; + static TypeDefinitionKeyName(): string; + static TypeDefinitionKey(): VDXFKeyInterface; + static MultiMapKeyName(): string; + static MultiMapKey(): VDXFKeyInterface; + static ContentMultiMapRemoveKeyName(): string; + static ContentMultiMapRemoveKey(): VDXFKeyInterface; + static ProfileMediaKeyName(): string; + static ProfileMediaKey(): VDXFKeyInterface; + static ZMemoMessageKeyName(): string; + static ZMemoMessageKey(): VDXFKeyInterface; + static ZMemoSignatureKeyName(): string; + static ZMemoSignatureKey(): VDXFKeyInterface; + static CurrencyStartNotarizationKeyName(): string; + static CurrencyStartNotarizationKey(): VDXFKeyInterface; + GetHash(): void; +} +export declare class CVDXFDataDescriptor extends BufferDataVdxfObject { + dataDescriptor: DataDescriptor; + constructor(vdxfData: BufferDataVdxfObject); + dataByteLength(): number; + toDataBuffer(): Buffer; + fromDataBuffer(buffer: Buffer, offset?: number): number; + HasEncryptedData(): boolean; + HasLabel(): boolean; + HasSalt(): boolean; + HasEPK(): boolean; + HasIVK(): boolean; + HasSSK(): boolean; + CalcFlags(): BigNumber; + SetFlags(): void; +} +export declare enum EHashTypes { + HASH_INVALID = 0, + HASH_BLAKE2BMMR = 1, + HASH_BLAKE2BMMR2 = 2, + HASH_KECCAK = 3, + HASH_SHA256D = 4, + HASH_SHA256 = 5, + HASH_LASTTYPE = 5 +} +export declare class MMRDescriptor { + static VERSION_INVALID: import("bn.js"); + static FIRST_VERSION: import("bn.js"); + static LAST_VERSION: import("bn.js"); + static DEFAULT_VERSION: import("bn.js"); + version: BigNumber; + objectHashType: EHashTypes; + mmrHashType: EHashTypes; + mmrRoot: DataDescriptor; + mmrHashes: DataDescriptor; + dataDescriptors: DataDescriptor[]; + constructor(data?: { + version?: BigNumber; + objectHashType?: EHashTypes; + mmrHashType?: EHashTypes; + mmrRoot?: DataDescriptor; + mmrHashes?: DataDescriptor; + dataDescriptors?: DataDescriptor[]; + }); + static fromJson(data: any): MMRDescriptor; + byteLength(): number; + toBuffer(): Buffer; + fromBuffer(buffer: Buffer, offset?: number): number; + HasData(): boolean; + IsValid(): boolean; +} +export declare const VectorEncodeVDXFUni: (obj: any) => Buffer; diff --git a/dist/vdxf/classes/DataDescriptor.js b/dist/vdxf/classes/DataDescriptor.js new file mode 100644 index 0000000..33b4afe --- /dev/null +++ b/dist/vdxf/classes/DataDescriptor.js @@ -0,0 +1,1102 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.VectorEncodeVDXFUni = exports.MMRDescriptor = exports.EHashTypes = exports.CVDXFDataDescriptor = exports.VDXF_Data = exports.DataDescriptor = void 0; +const bn_js_1 = require("bn.js"); +const index_1 = require("../index"); +const varint_1 = require("../../utils/varint"); +const varuint_1 = require("../../utils/varuint"); +const bufferutils_1 = require("../../utils/bufferutils"); +const { BufferReader, BufferWriter } = bufferutils_1.default; +const string_1 = require("../../utils/string"); +const address_1 = require("../../utils/address"); +const CurrencyValueMap_1 = require("../../pbaas/CurrencyValueMap"); +const Rating_1 = require("../../pbaas/Rating"); +const TransferDestination_1 = require("../../pbaas/TransferDestination"); +const ContentMultiMapRemove_1 = require("../../pbaas/ContentMultiMapRemove"); +const CrossChainDataRef_1 = require("./CrossChainDataRef"); +const vdxf_1 = require("../../constants/vdxf"); +const SignatureData_1 = require("./SignatureData"); +class DataDescriptor { + constructor(data) { + this.flags = new bn_js_1.BN(0); + this.version = DataDescriptor.DEFAULT_VERSION; + if (data != null) { + if (data.flags != null) + this.flags = data.flags; + if (data.version != null) + this.version = data.version; + if (data.objectdata != null) + this.objectdata = data.objectdata; + if (data.label != null) + this.label = data.label; + if (data.mimeType != null) + this.mimeType = data.mimeType; + if (data.salt != null) + this.salt = data.salt; + if (data.epk != null) + this.epk = data.epk; + if (data.ivk != null) + this.ivk = data.ivk; + if (data.ssk != null) + this.ssk = data.ssk; + if (this.label && this.label.length > 64) { + this.label = this.label.slice(0, 64); + } + if (this.mimeType && this.mimeType.length > 128) { + this.mimeType = this.mimeType.slice(0, 128); + } + this.SetFlags(); + } + } + static fromJson(data) { + const newDataDescriptor = new DataDescriptor(); + if (data != null) { + if (data.flags != null) + newDataDescriptor.flags = new bn_js_1.BN(data.flags); + if (data.version != null) + newDataDescriptor.version = new bn_js_1.BN(data.version); + if (data.objectdata != null) + newDataDescriptor.objectdata = (0, exports.VectorEncodeVDXFUni)(data.objectdata); + if (data.label != null) + newDataDescriptor.label = data.label; + if (data.mimetype != null) + newDataDescriptor.mimeType = data.mimetype; + if (data.salt != null) + newDataDescriptor.salt = Buffer.from(data.salt, 'hex'); + if (data.epk != null) + newDataDescriptor.epk = Buffer.from(data.epk, 'hex'); + if (data.ivk != null) + newDataDescriptor.ivk = Buffer.from(data.ivk, 'hex'); + if (data.ssk != null) + newDataDescriptor.ssk = Buffer.from(data.ssk, 'hex'); + if (newDataDescriptor.label && newDataDescriptor.label.length > 64) { + newDataDescriptor.label = newDataDescriptor.label.slice(0, 64); + } + if (newDataDescriptor.mimeType && newDataDescriptor.mimeType.length > 128) { + newDataDescriptor.mimeType = newDataDescriptor.mimeType.slice(0, 128); + } + } + ; + newDataDescriptor.SetFlags(); + return newDataDescriptor; + } + DecodeHashVector() { + const vdxfData = new VDXF_Data("", ""); + vdxfData.fromBuffer(this.objectdata); + const hashes = []; + if (vdxfData.vdxfkey == VDXF_Data.VectorUint256Key().vdxfid) { + const reader = new BufferReader(Buffer.from(vdxfData.data, 'hex')); + const count = reader.readVarInt(); + for (let i = 0; i < count.toNumber(); i++) { + hashes.push(reader.readSlice(32)); + } + } + return hashes; + } + byteLength() { + let length = 0; + length += varint_1.default.encodingLength(this.version); + length += varint_1.default.encodingLength(this.flags); + length += varuint_1.default.encodingLength(this.objectdata.length); + length += this.objectdata.length; + if (this.HasLabel()) { + if (this.label.length > 64) { + throw new Error("Label too long"); + } + length += varuint_1.default.encodingLength(this.label.length); + length += this.label.length; + } + if (this.HasMIME()) { + if (this.mimeType.length > 128) { + throw new Error("MIME type too long"); + } + length += varuint_1.default.encodingLength(this.mimeType.length); + length += this.mimeType.length; + } + if (this.HasSalt()) { + length += varuint_1.default.encodingLength(this.salt.length); + length += this.salt.length; + } + if (this.HasEPK()) { + length += varuint_1.default.encodingLength(this.epk.length); + length += this.epk.length; + } + if (this.HasIVK()) { + length += varuint_1.default.encodingLength(this.ivk.length); + length += this.ivk.length; + } + if (this.HasSSK()) { + length += varuint_1.default.encodingLength(this.ssk.length); + length += this.ssk.length; + } + return length; + } + toBuffer() { + const writer = new BufferWriter(Buffer.alloc(this.byteLength())); + writer.writeVarInt(this.version); + writer.writeVarInt(this.flags); + writer.writeVarSlice(this.objectdata); + if (this.HasLabel()) { + writer.writeVarSlice(Buffer.from(this.label)); + } + if (this.HasMIME()) { + writer.writeVarSlice(Buffer.from(this.mimeType)); + } + if (this.HasSalt()) { + writer.writeVarSlice(this.salt); + } + if (this.HasEPK()) { + writer.writeVarSlice(this.epk); + } + if (this.HasIVK()) { + writer.writeVarSlice(this.ivk); + } + if (this.HasSSK()) { + writer.writeVarSlice(this.ssk); + } + return writer.buffer; + } + fromBuffer(buffer, offset = 0) { + const reader = new BufferReader(buffer, offset); + this.version = reader.readVarInt(); + this.flags = reader.readVarInt(); + this.objectdata = reader.readVarSlice(); + if (this.HasLabel()) { + this.label = reader.readVarSlice().toString(); + } + if (this.HasMIME()) { + this.mimeType = reader.readVarSlice().toString(); + } + if (this.HasSalt()) { + this.salt = reader.readVarSlice(); + } + if (this.HasEPK()) { + this.epk = reader.readVarSlice(); + } + if (this.HasIVK()) { + this.ivk = reader.readVarSlice(); + } + if (this.HasSSK()) { + this.ssk = reader.readVarSlice(); + } + return reader.offset; + } + HasEncryptedData() { + return this.flags.and(DataDescriptor.FLAG_ENCRYPTED_DATA).gt(new bn_js_1.BN(0)); + } + HasSalt() { + return this.flags.and(DataDescriptor.FLAG_SALT_PRESENT).gt(new bn_js_1.BN(0)); + } + HasEPK() { + return this.flags.and(DataDescriptor.FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT).gt(new bn_js_1.BN(0)); + } + HasMIME() { + return this.flags.and(DataDescriptor.FLAG_MIME_TYPE_PRESENT).gt(new bn_js_1.BN(0)); + } + HasIVK() { + return this.flags.and(DataDescriptor.FLAG_INCOMING_VIEWING_KEY_PRESENT).gt(new bn_js_1.BN(0)); + } + HasSSK() { + return this.flags.and(DataDescriptor.FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT).gt(new bn_js_1.BN(0)); + } + HasLabel() { + return this.flags.and(DataDescriptor.FLAG_LABEL_PRESENT).gt(new bn_js_1.BN(0)); + } + CalcFlags() { + return this.flags.and(DataDescriptor.FLAG_ENCRYPTED_DATA).add(this.label ? DataDescriptor.FLAG_LABEL_PRESENT : new bn_js_1.BN(0)).add(this.mimeType ? DataDescriptor.FLAG_MIME_TYPE_PRESENT : new bn_js_1.BN(0)).add(this.salt ? DataDescriptor.FLAG_SALT_PRESENT : new bn_js_1.BN(0)).add(this.epk ? DataDescriptor.FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT : new bn_js_1.BN(0)).add(this.ivk ? DataDescriptor.FLAG_INCOMING_VIEWING_KEY_PRESENT : new bn_js_1.BN(0)).add(this.ssk ? DataDescriptor.FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT : new bn_js_1.BN(0)); + } + SetFlags() { + this.flags = this.CalcFlags(); + } + IsValid() { + return this.version.gte(DataDescriptor.FIRST_VERSION) && this.version.lte(DataDescriptor.LAST_VERSION) && (this.flags.and(new bn_js_1.BN(~DataDescriptor.FLAG_MASK)).eq(new bn_js_1.BN(0))); + } +} +exports.DataDescriptor = DataDescriptor; +DataDescriptor.VERSION_INVALID = new bn_js_1.BN(0); +DataDescriptor.VERSION_FIRST = new bn_js_1.BN(1); +DataDescriptor.FIRST_VERSION = new bn_js_1.BN(1); +DataDescriptor.LAST_VERSION = new bn_js_1.BN(1); +DataDescriptor.DEFAULT_VERSION = new bn_js_1.BN(1); +DataDescriptor.FLAG_ENCRYPTED_DATA = new bn_js_1.BN(1); +DataDescriptor.FLAG_SALT_PRESENT = new bn_js_1.BN(2); +DataDescriptor.FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT = new bn_js_1.BN(4); +DataDescriptor.FLAG_INCOMING_VIEWING_KEY_PRESENT = new bn_js_1.BN(8); +DataDescriptor.FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT = new bn_js_1.BN(0x10); +DataDescriptor.FLAG_LABEL_PRESENT = new bn_js_1.BN(0x20); +DataDescriptor.FLAG_MIME_TYPE_PRESENT = new bn_js_1.BN(0x40); +DataDescriptor.FLAG_MASK = (DataDescriptor.FLAG_ENCRYPTED_DATA.add(DataDescriptor.FLAG_SALT_PRESENT).add(DataDescriptor.FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT).add(DataDescriptor.FLAG_INCOMING_VIEWING_KEY_PRESENT).add(DataDescriptor.FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT).add(DataDescriptor.FLAG_LABEL_PRESENT).add(DataDescriptor.FLAG_MIME_TYPE_PRESENT)); +; +// VDXF data that describes an encrypted chunk of data +class VDXF_Data extends index_1.BufferDataVdxfObject { + constructor(data, key) { + super(data, key); + } + static DataByteKeyName() { + return "vrsc::data.type.byte"; + } + static DataByteKey() { + return { + "vdxfid": "iBXUHbh4iacbeZnzDRxishvBSrYk2S2k7t", + "indexid": "xGMakQ89ZtqGGjg257csr6SiUWZksGmjWp", + "hash160result": "2e97a8bba443773812341e1d761530d3bba04f58", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.byte" + } + }; + } + static DataInt16KeyName() { + return "vrsc::data.type.int16"; + } + static DataInt16Key() { + return { + "vdxfid": "iDtTv3wf1Vk3M2Y46RjLPKtttx5hydwtY1", + "indexid": "xJiaNrNjroxhyCR5x7PVMiRRvc6ipg6N9g", + "hash160result": "ee334ebd432db0b24cc2702eda61c28ff44d3872", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int16" + } + }; + } + static DataUint16KeyName() { + return "vrsc::data.type.uint16"; + } + static DataUint16Key() { + return { + "vdxfid": "iHn7urT2yVfS7pQn6WGAmCVWh4HBLV24n3", + "indexid": "xNcENet7pot6jzHoxBvKjb23iiJCGpekDk", + "hash160result": "5cfc322d2a216145f7b82714115e7953269de59c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint16" + } + }; + } + static DataInt32KeyName() { + return "vrsc::data.type.int32"; + } + static DataInt32Key() { + return { + "vdxfid": "iHpLPprRDv3H5H3ZMaJ9nyHFzkG9xJWZDb", + "indexid": "xNeSrdHW5EFwhSvbDFxJmMoo2QHAtoEaEM", + "hash160result": "3e9ba478b23b13232f28d21051d907ce8fdd509d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int32" + } + }; + } + static DataUint32KeyName() { + return "vrsc::data.type.uint32"; + } + static DataUint32Key() { + return { + "vdxfid": "iKSj5zhd6cSsLudaGhtfmisRNgEM7SPFWY", + "indexid": "xQGqYo8hwvfXy5Wc8PYpk7PxQLFMwfP7Fp", + "hash160result": "f279818aeb4fe768956b350d1fc7216ca0e82aaf", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint32" + } + }; + } + static DataInt64KeyName() { + return "vrsc::data.type.int64"; + } + static DataInt64Key() { + return { + "vdxfid": "iKB3TGi9Dg5HZ4nQAgLQAgp3tuXBaRKHpC", + "indexid": "xQ19v59E4zHxBEfS2MzZ95LavZYCTTeuyg", + "hash160result": "ab3705f8a7fae59786ef897b014df85fcd9533ac", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int64" + } + }; + } + static DataUint64KeyName() { + return "vrsc::data.type.uint64"; + } + static DataUint64Key() { + return { + "vdxfid": "iPamkQf38AeGQ8z4zSsZL7t9kXMeUkYLJL", + "indexid": "xUQtDD67yUrw2Js6r8XiJWQgnBNfNeeoUq", + "hash160result": "bb2ae9ed3e9f400def0724937fbf65f23ef690dc", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint64" + } + }; + } + static DataUint160KeyName() { + return "vrsc::data.type.uint160"; + } + static DataUint160Key() { + return { + "vdxfid": "iAAwdbLyKYL39nJ1eQHaHtb75krg4mV1Lq", + "indexid": "xF146Pn4ArYhmxB3W5wjGH7e7Qsgx9bkpj", + "hash160result": "d97d2295d4c73f6f6f0697c8086bd822d6977549", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint160" + } + }; + } + static DataUint256KeyName() { + return "vrsc::data.type.uint256"; + } + static DataUint256Key() { + return { + "vdxfid": "i8k7g7z6grtGYrNZmZr5TQ872aHssXuuua", + "indexid": "xDaE8vRBYB6wB2FbdFWERnee4EJtjbCtMM", + "hash160result": "939b27bea698d180237c40b2194025acc673cb39", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint256" + } + }; + } + static DataStringKeyName() { + return "vrsc::data.type.string"; + } + static DataStringKey() { + return { + "vdxfid": "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c", + "indexid": "xPwgY6oPdusaAgNK3u5yHCQG5NsHEcBpi5", + "hash160result": "e5c061641228a399169211e666de18448b7b8bab", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.string" + } + }; + } + // this is a key for a typed vector, which will have the object type key following the vector key + static DataVectorKeyName() { + return "vrsc::data.type.vector"; + } + static DataVectorKey() { + return { + "vdxfid": "iAEShwk1xjdGhaUSz3Maa2XR32o3vRuHq7", + "indexid": "xF4ZAkB6p3qwKkMUqj1jYR3x4gp4mGz657", + "hash160result": "503875b0dc301189a98927d3ece56c5f921c1f4a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.vector" + } + }; + } + static DataByteVectorKeyName() { + return "vrsc::data.type.bytevector"; + } + static DataByteVectorKey() { + return { + "vdxfid": "iKMhRLX1JHQihVZx2t2pAWW2uzmK6AzwW3", + "indexid": "xQBot8x69bdPKfSytZgy8u2ZwenKzVjR4X", + "hash160result": "cc3ae6466006629f5105f71325bb2a19107037ae", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.bytevector" + } + }; + } + static DataInt32VectorKeyName() { + return "vrsc::data.type.int32vector"; + } + static DataInt32VectorKey() { + return { + "vdxfid": "iJZt2fcUv1iivbfC3tuPuefabcTppQEoVq", + "indexid": "xPPzVU3ZmKwPYmYDuaZYt3C7dGUqk939N7", + "hash160result": "c0847f3025c408059b5a8f6a9e414a8ed8288da5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int32vector" + } + }; + } + static DataInt64VectorKeyName() { + return "vrsc::data.type.int64vector"; + } + static DataInt64VectorKey() { + return { + "vdxfid": "i4qtYkFS9iNyu2AkqwoSn1xyCdfH9PUvak", + "indexid": "x9g11YgX12beXC3nhdTbkQVWEHgJ2jqfz1", + "hash160result": "c6219ea13884987453692cb14c72d5f6a47c020f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int64vector" + } + }; + } + static DataCurrencyMapKeyName() { + return "vrsc::data.type.object.currencymap"; + } + static DataCurrencyMapKey() { + return { + "vdxfid": "iMrGhzkZq5fpWWSa1RambRySFPb7CuvKuX", + "indexid": "xSgPAoBegPtV8gKbs7EvZpVyH3c858ZUvL", + "hash160result": "25db70c2fcae2571f89201181bec04587e1f8fc9", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.currencymap" + } + }; + } + static DataRatingsKeyName() { + return "vrsc::data.type.object.ratings"; + } + static DataRatingsKey() { + return { + "vdxfid": "iHJComZUXXGniLkDhjYprWYEN8qvQGDoam", + "indexid": "xN8KGZzZNqVTLWdFZRCypu4mPnrwHFKbCK", + "hash160result": "32cad57ff1dc5db4b5ba573ce01bc9c89b0d9e97", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.ratings" + } + }; + } + static DataURLKeyName() { + return "vrsc::data.type.object.url"; + } + static DataURLKey() { + return { + "vdxfid": "iJ7xdhJTJAvJubNnSJFXyA3jujzqGxjLuZ", + "indexid": "xNx56VjY9V8yXmFpHyugwYaGwQ1rCt6J9W", + "hash160result": "7748bfaf53dd2ff63ed5f73a41174c360f30a6a0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.url" + } + }; + } + static DataTransferDestinationKeyName() { + return "vrsc::data.type.object.transferdestination"; + } + static DataTransferDestinationKey() { + return { + "vdxfid": "i91L6zwZQrkbNVMB1AZ1Z671qybexRmeVK", + "indexid": "xDqSZoNeGAyFzfECrrDAXUdYsdcfs3Zuku", + "hash160result": "92f38773849383146037b16a48ea350c1c11ac3c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.transferdestination" + } + }; + } + static UTXORefKeyName() { + return "vrsc::data.type.object.utxoref"; + } + static UTXORefKey() { + return { + "vdxfid": "iNcKvh7mazaXptzHf85q6EtpFYFE7asKC1", + "indexid": "xTSSPVYrSJoCT4sKWojz4dRMHCGF3h9tM4", + "hash160result": "013e760f7451c289672993ea391ae643c21ce4d1", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.utxoref" + } + }; + } + static CrossChainDataRefKeyName() { + return "vrsc::data.type.object.crosschaindataref"; + } + static CrossChainDataRefKey() { + return { + "vdxfid": "iP3euVSzNcXUrLNHnQnR9G6q8jeYuGSxgw", + "indexid": "xTsmNHt5Dvk9UWFKe6Sa7edNAPfZmJVgLc", + "hash160result": "4d33e0aee0f648c7871b2661d1221b57c05aaed6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.crosschaindataref" + } + }; + } + static EncryptionDescriptorKeyName() { + return "vrsc::data.type.encryptiondescriptor"; + } + static EncryptionDescriptorKey() { + return { + "vdxfid": "iHEEK8ipj58BeKZNWuaaR2tDR5RK2kmf9A", + "indexid": "xN4Lmw9uaPLrGVSQNbEjPRQkSjSKxsHUQu", + "hash160result": "8d021acc1b68335bd7d37b28ff773c138ea5dd96", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.encryptiondescriptor" + } + }; + } + static SaltedDataKeyName() { + return "vrsc::data.type.salteddata"; + } + static SaltedDataKey() { + return { + "vdxfid": "i92U1nLuLJkC44FZZ4Lq9zk4qW3HrWAWNo", + "indexid": "xDraUamzBcxrgE8bQjzz8PGbsA4JiFskTD", + "hash160result": "9e13510e01d0d03a7bc90d7a2ef32824f515e33c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.salteddata" + } + }; + } + static DataDescriptorKeyName() { + return "vrsc::data.type.object.datadescriptor"; + } + static DataDescriptorKey() { + return { + "vdxfid": "i4GC1YGEVD21afWudGoFJVdnfjJ5XWnCQv", + "indexid": "x96JULhKLXEgCqPwUxTQGtAKhPK6Qh1iaW", + "hash160result": "4d4f12424ded2033a526a4e2a8835fc5b2eba208", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.datadescriptor" + } + }; + } + static SignatureDataKeyName() { + return "vrsc::data.signaturedata"; + } + static SignatureDataKey() { + return { + "vdxfid": "i7PcVF9wwPtQ6p6jDtCVpohX65pTZuP2ah", + "indexid": "xCDix3b2ni74iyym5ZreoCE47jqUTBFRAb", + "hash160result": "b48b359e9a00042cec64f7f66ac717d388a4f22a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.signaturedata" + } + }; + } + static VectorUint256KeyName() { + return "vrsc::data.mmrhashes"; + } + static VectorUint256Key() { + return { + "vdxfid": "i9UgJ2WxGw95PKdoCXjpfnBShtP5gi9fxS", + "indexid": "xEJnkpx38FMk1VWq4DPyeAhyjYQ6X5Gsti", + "hash160result": "8c1afd59e904f6d2702699963abccbc6d326d841", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.mmrhashes" + } + }; + } + static MMRLinksKeyName() { + return "vrsc::data.mmrlinks"; + } + static MMRLinksKey() { + return { + "vdxfid": "iPQsnA1R8UjHNddZKZ3FxsuKQ5WzKqSC7w", + "indexid": "xUEzExSVynwwzoWbBEhQwGRrRjY1Bc2MYc", + "hash160result": "f535a4e9ac0f94eda01695d16489a4a102d6b1da", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.mmrlinks" + } + }; + } + static MMRDescriptorKeyName() { + return "vrsc::data.mmrdescriptor"; + } + static MMRDescriptorKey() { + return { + "vdxfid": "i9dVDb4LgfMYrZD1JBNP2uaso4bNAkT4Jr", + "indexid": "xETbgPVRXyaDUj639s2Y1J7QpicP4DvZMt", + "hash160result": "97273a4c02d6be002f8d69c3979616732ba68243", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.mmrdescriptor" + } + }; + } + static TypeDefinitionKeyName() { + return "vrsc::data.type.typedefinition"; + } + static TypeDefinitionKey() { + return { + "vdxfid": "iL5MPPHWXQEY3p2Q1UsmGDvXsgPiqd1W1S", + "indexid": "xQuTrBibNiTCfyuRsAXvEcT4uLQjhxrpyL", + "hash160result": "ae8d805d9650c0512a6b6ec33e963386542f18b6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.typedefinition" + } + }; + } + static MultiMapKeyName() { + return "vrsc::identity.multimapkey"; + } + static MultiMapKey() { + return { + "vdxfid": "i3mbggp3NBR77C5JeFQJTpAxmgMidayLLE", + "indexid": "x8bi9VF8DVdmjMxLVw4TSChVoLNjUyapgs", + "hash160result": "6920bb81b420bc95e29a10ed677379b1e39e3a03", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.multimapkey" + } + }; + } + static ContentMultiMapRemoveKeyName() { + return "vrsc::identity.multimapremove"; + } + static ContentMultiMapRemoveKey() { + return { + "vdxfid": "i5Zkx5Z7tEfh42xtKfwbJ5LgEWE9rEgpFY", + "indexid": "xAPsQszCjYtMgCqvBMbkGTsDGAFAmrN33A", + "hash160result": "d393b986e4f82db7bec82d97b186882d739ded16", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.multimapremove" + } + }; + } + // for any ID, this key indexes content that applies to representing the profile of + // that ID. there may be many mime-type instances of a particular piece of profile media + static ProfileMediaKeyName() { + return "vrsc::identity.profile.media"; + } + static ProfileMediaKey() { + return { + "vdxfid": "iEYsp2njSt1M4EVYi9uuAPBU2wpKmThkkr", + "indexid": "xKNzGqDpJCE1gQNaZqa48mi14bqLaG669g", + "hash160result": "e95b2ee1abb130a93900ddaef2d8e528010f7c79", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.profile.media" + } + }; + } + static ZMemoMessageKeyName() { + return "vrsc::system.zmemo.message"; + } + static ZMemoMessageKey() { + return { + "vdxfid": "iNHg1n828PUxktkYeNxC6sdVmuKTipn3L3", + "indexid": "xT7nUaZ6yhhdP4daW4cM5GA2oZLUaNVaBD", + "hash160result": "4a8f418203621f10d1a61701be8dbbbb38fa5cce", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::system.zmemo.message" + } + }; + } + static ZMemoSignatureKeyName() { + return "vrsc::system.zmemo.signature"; + } + static ZMemoSignatureKey() { + return { + "vdxfid": "i7mrLLjUfGYuHJwnsxFvd282hsdn4staJG", + "indexid": "xCbxo9AZWamZuUppjdv5bQeZjXeo1vbaCc", + "hash160result": "7b47c8cd90c4c3ddc542f37ca77473b7325a272f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::system.zmemo.signature" + } + }; + } + static CurrencyStartNotarizationKeyName() { + return "vrsc::system.currency.startnotarization"; + } + static CurrencyStartNotarizationKey() { + return { + "vdxfid": "iRvxVcGLaCXcDiAfnQ5FfeBCo2AiBibAft", + "indexid": "xWm4xQhRRWkGqt3he5jQe2hjpgBj5C7Tj3", + "hash160result": "b537201ca6465976bea7bdb03119644a858052f6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::system.currency.startnotarization" + } + }; + } + GetHash() { } + ; +} +exports.VDXF_Data = VDXF_Data; +; +class CVDXFDataDescriptor extends index_1.BufferDataVdxfObject { + constructor(vdxfData) { + super(vdxfData.data, vdxfData.vdxfkey); + this.version = vdxfData.version; + if (this.data != null) { + this.dataDescriptor = new DataDescriptor(); + this.dataDescriptor.fromBuffer(Buffer.from(this.data, 'hex')); + delete this.data; + } + } + dataByteLength() { + let length = 0; + length += this.dataDescriptor.byteLength(); + return length; + } + toDataBuffer() { + return this.dataDescriptor.toBuffer(); + } + fromDataBuffer(buffer, offset) { + const reader = new bufferutils_1.default.BufferReader(buffer, offset); + this.data = reader.readVarSlice().toString('hex'); + this.dataDescriptor = new DataDescriptor(); + this.dataDescriptor.fromBuffer(Buffer.from(this.data, 'hex')); + delete this.data; + return reader.offset; + } + HasEncryptedData() { + return this.dataDescriptor.HasEncryptedData(); + } + HasLabel() { + return this.dataDescriptor.HasLabel(); + } + HasSalt() { + return this.dataDescriptor.HasSalt(); + } + HasEPK() { + return this.dataDescriptor.HasEPK(); + } + HasIVK() { + return this.dataDescriptor.HasIVK(); + } + HasSSK() { + return this.dataDescriptor.HasSSK(); + } + CalcFlags() { + return this.dataDescriptor.CalcFlags(); + } + SetFlags() { + return this.dataDescriptor.SetFlags(); + } +} +exports.CVDXFDataDescriptor = CVDXFDataDescriptor; +; +var EHashTypes; +(function (EHashTypes) { + EHashTypes[EHashTypes["HASH_INVALID"] = 0] = "HASH_INVALID"; + EHashTypes[EHashTypes["HASH_BLAKE2BMMR"] = 1] = "HASH_BLAKE2BMMR"; + EHashTypes[EHashTypes["HASH_BLAKE2BMMR2"] = 2] = "HASH_BLAKE2BMMR2"; + EHashTypes[EHashTypes["HASH_KECCAK"] = 3] = "HASH_KECCAK"; + EHashTypes[EHashTypes["HASH_SHA256D"] = 4] = "HASH_SHA256D"; + EHashTypes[EHashTypes["HASH_SHA256"] = 5] = "HASH_SHA256"; + EHashTypes[EHashTypes["HASH_LASTTYPE"] = 5] = "HASH_LASTTYPE"; +})(EHashTypes = exports.EHashTypes || (exports.EHashTypes = {})); +; +class MMRDescriptor { + constructor(data) { + if (data) { + if (data.version) + this.version = data.version; + if (data.objectHashType) + this.objectHashType = data.objectHashType; + if (data.mmrHashType) + this.mmrHashType = data.mmrHashType; + if (data.mmrRoot) + this.mmrRoot = data.mmrRoot; + if (data.mmrHashes) + this.mmrHashes = data.mmrHashes; + if (data.dataDescriptors) + this.dataDescriptors = data.dataDescriptors; + } + else { + this.version = MMRDescriptor.DEFAULT_VERSION; + } + } + static fromJson(data) { + const newMMRDescriptor = new MMRDescriptor(); + if (data) { + if (data.version) + newMMRDescriptor.version = new bn_js_1.BN(data.version); + if (data.objecthashtype) + newMMRDescriptor.objectHashType = data.objecthashtype; + if (data.mmrhashtype) + newMMRDescriptor.mmrHashType = data.mmrhashtype; + if (data.mmrroot) + newMMRDescriptor.mmrRoot = DataDescriptor.fromJson(data.mmrroot); + if (data.mmrhashes) + newMMRDescriptor.mmrHashes = DataDescriptor.fromJson(data.mmrhashes); + if (data.datadescriptors) { + newMMRDescriptor.dataDescriptors = []; + data.datadescriptors.forEach((data) => { + newMMRDescriptor.dataDescriptors.push(DataDescriptor.fromJson(data)); + }); + } + ; + } + return newMMRDescriptor; + } + byteLength() { + let length = 0; + length += varint_1.default.encodingLength(this.version); + length += varint_1.default.encodingLength(new bn_js_1.BN(this.objectHashType)); + length += varint_1.default.encodingLength(new bn_js_1.BN(this.mmrHashType)); + length += this.mmrRoot.byteLength(); + length += this.mmrHashes.byteLength(); + length += varuint_1.default.encodingLength(this.dataDescriptors.length); + this.dataDescriptors.forEach((dataDescriptor) => { + length += dataDescriptor.byteLength(); + }); + return length; + } + toBuffer() { + const writer = new BufferWriter(Buffer.alloc(this.byteLength())); + writer.writeVarInt(this.version); + writer.writeVarInt(new bn_js_1.BN(this.objectHashType)); + writer.writeVarInt(new bn_js_1.BN(this.mmrHashType)); + writer.writeSlice(this.mmrRoot.toBuffer()); + writer.writeSlice(this.mmrHashes.toBuffer()); + writer.writeCompactSize(this.dataDescriptors.length); + this.dataDescriptors.forEach((dataDescriptor) => { + writer.writeSlice(dataDescriptor.toBuffer()); + }); + return writer.buffer; + } + fromBuffer(buffer, offset) { + const reader = new BufferReader(buffer, offset); + this.version = reader.readVarInt(); + this.objectHashType = reader.readVarInt().toNumber(); + this.mmrHashType = reader.readVarInt().toNumber(); + this.mmrRoot = new DataDescriptor(); + this.mmrRoot.fromBuffer(reader.readVarSlice()); + this.mmrHashes = new DataDescriptor(); + this.mmrHashes.fromBuffer(reader.readVarSlice()); + const dataDescriptorsLength = reader.readCompactSize(); + this.dataDescriptors = []; + for (let i = 0; i < dataDescriptorsLength; i++) { + const dataDescriptor = new DataDescriptor(); + dataDescriptor.fromBuffer(reader.readVarSlice()); + this.dataDescriptors.push(dataDescriptor); + } + return reader.offset; + } + HasData() { + return !!(this.mmrHashes.objectdata && this.dataDescriptors); + } + IsValid() { + return this.version >= MMRDescriptor.FIRST_VERSION && this.version <= MMRDescriptor.LAST_VERSION; + } +} +exports.MMRDescriptor = MMRDescriptor; +MMRDescriptor.VERSION_INVALID = new bn_js_1.BN(0); +MMRDescriptor.FIRST_VERSION = new bn_js_1.BN(1); +MMRDescriptor.LAST_VERSION = new bn_js_1.BN(1); +MMRDescriptor.DEFAULT_VERSION = new bn_js_1.BN(1); +; +const VectorEncodeVDXFUni = (obj) => { + let ss = Buffer.from(''); + if (typeof (obj) != 'object') { + if (typeof (obj) != 'string') + throw new Error('VectorEncodeVDXFUni: not JSON string as expected'); + if ((0, string_1.isHexString)(obj)) { + return Buffer.from(obj, "hex"); + } + return Buffer.from(obj, "utf-8"); + } + if (obj.serializedHex) { + if (!(0, string_1.isHexString)(obj.serializedHex)) { + throw new Error("contentmap: If the \"serializedhex\" key is present, it's data must be only valid hex and complete"); + } + return Buffer.from(obj.serializedHex); + } + if (obj.serializedBase64) { + try { + return Buffer.from(obj.serializedBase64, 'base64'); + } + catch (e) { + throw new Error("contentmap: If the \"serializedBase64\" key is present, it's data must be only valid base64 and complete"); + } + } + if (obj.message) { + return Buffer.from(obj.message, "utf-8"); + } + // this should be an object with "vdxfkey" as the key and {object} as the json object to serialize + const oneValKeys = Object.keys(obj); + const oneValValues = Object.values(obj); + for (let k = 0; k < oneValKeys.length; k++) { + const objTypeKey = oneValKeys[k]; + if (objTypeKey == VDXF_Data.DataByteKey().vdxfid) { + const oneByte = Buffer.from(oneValValues[k], "hex"); + if (oneByte.length != 1) { + throw new Error("contentmap: byte data must be exactly one byte"); + } + ss = Buffer.concat([ss, oneByte]); + } + else if (objTypeKey == VDXF_Data.DataInt16Key().vdxfid) { + const oneShort = Buffer.alloc(2); + oneShort.writeInt16LE(oneValValues[k]); + ss = Buffer.concat([ss, oneShort]); + } + else if (objTypeKey == VDXF_Data.DataUint16Key().vdxfid) { + const oneUShort = Buffer.alloc(2); + oneUShort.writeUInt16LE(oneValValues[k]); + ss = Buffer.concat([ss, oneUShort]); + } + else if (objTypeKey == VDXF_Data.DataInt32Key().vdxfid) { + const oneInt = Buffer.alloc(4); + oneInt.writeInt32LE(oneValValues[k]); + ss = Buffer.concat([ss, oneInt]); + } + else if (objTypeKey == VDXF_Data.DataUint32Key().vdxfid) { + const oneUInt = Buffer.alloc(4); + oneUInt.writeUInt32LE(oneValValues[k]); + ss = Buffer.concat([ss, oneUInt]); + } + else if (objTypeKey == VDXF_Data.DataInt64Key().vdxfid) { + const oneInt64 = Buffer.alloc(8); + oneInt64.writeIntLE(oneValValues[k], 0, 8); + ss = Buffer.concat([ss, oneInt64]); + } + else if (objTypeKey == VDXF_Data.DataUint160Key().vdxfid) { + const oneKey = (0, address_1.fromBase58Check)(oneValValues[k]).hash; + ss = Buffer.concat([ss, oneKey]); + } + else if (objTypeKey == VDXF_Data.DataUint256Key().vdxfid) { + const oneHash = Buffer.from(oneValValues[k], "hex"); + if (oneHash.length != 32) { + throw new Error("contentmap: hash data must be exactly 32 bytes"); + } + ss = Buffer.concat([ss, oneHash.reverse()]); + } + else if (objTypeKey == VDXF_Data.DataStringKey().vdxfid) { + let length = 20; + length += 1; + const encodedLength = varuint_1.default.encodingLength(Buffer.from(oneValValues[k], "utf-8").length); + length += varuint_1.default.encodingLength(encodedLength + Buffer.from(oneValValues[k], "utf-8").length); + length += encodedLength; + length += Buffer.from(oneValValues[k], "utf-8").length; + const writer = new BufferWriter(Buffer.alloc(length)); + writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); + writer.writeVarInt(new bn_js_1.BN(1)); + writer.writeCompactSize(encodedLength + Buffer.from(oneValValues[k], "utf-8").length); + writer.writeVarSlice(Buffer.from(oneValValues[k], "utf-8")); + ss = Buffer.concat([ss, writer.buffer]); + } + else if (objTypeKey == VDXF_Data.DataByteVectorKey().vdxfid) { + let length = 20; + length += 1; + const encodedLength = varuint_1.default.encodingLength(Buffer.from(oneValValues[k], "hex").length); + length += varuint_1.default.encodingLength(encodedLength + Buffer.from(oneValValues[k], "hex").length); + length += encodedLength; + length += Buffer.from(oneValValues[k], "hex").length; + const writer = new BufferWriter(Buffer.alloc(length)); + writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); + writer.writeVarInt(new bn_js_1.BN(1)); + writer.writeCompactSize(encodedLength + Buffer.from(oneValValues[k], "hex").length); + writer.writeVarSlice(Buffer.from(oneValValues[k], "hex")); + ss = Buffer.concat([ss, writer.buffer]); + } + else if (objTypeKey == VDXF_Data.DataCurrencyMapKey().vdxfid) { + const destinations = Object.keys(oneValValues[k]); + const values = Object.values(oneValValues[k]); + const oneCurMap = new CurrencyValueMap_1.CurrencyValueMap({ value_map: new Map(destinations.map((key, index) => [key, new bn_js_1.BN(values[index])])), multivalue: true }); + let length = 20; + length += 1; + length += varuint_1.default.encodingLength(oneCurMap.getByteLength()); + length += oneCurMap.getByteLength(); + const writer = new BufferWriter(Buffer.alloc(length)); + writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); + writer.writeVarInt(new bn_js_1.BN(1)); + writer.writeCompactSize(oneCurMap.getByteLength()); + writer.writeSlice(oneCurMap.toBuffer()); + ss = Buffer.concat([ss, writer.buffer]); + } + else if (objTypeKey == VDXF_Data.DataRatingsKey().vdxfid) { + const version = new bn_js_1.BN(oneValValues[k].version); + const trustLevel = new bn_js_1.BN(oneValValues[k].trustLevel); + const destinations = Object.keys(oneValValues[k].rating); + const values = Object.values(oneValValues[k]); + const oneRatingMap = new Rating_1.Rating({ ratings: new Map(destinations.map((key, index) => [key, Buffer.from(values[index], 'hex')])), version, trustLevel }); + let length = 20; + length += varint_1.default.encodingLength(oneRatingMap.version); + length += varuint_1.default.encodingLength(oneRatingMap.getByteLength()); + length += oneRatingMap.getByteLength(); + const writer = new BufferWriter(Buffer.alloc(length)); + writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); + writer.writeVarInt(oneRatingMap.version); + writer.writeCompactSize(oneRatingMap.getByteLength()); + writer.writeSlice(oneRatingMap.toBuffer()); + ss = Buffer.concat([ss, writer.buffer]); + } + else if (objTypeKey == VDXF_Data.DataTransferDestinationKey().vdxfid) { + const transferDest = new TransferDestination_1.TransferDestination(oneValValues[k]); + let length = 20; + length += varint_1.default.encodingLength(transferDest.typeNoFlags()); + length += varuint_1.default.encodingLength(transferDest.getByteLength()); + length += transferDest.getByteLength(); + const writer = new BufferWriter(Buffer.alloc(length)); + writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); + writer.writeVarInt(transferDest.typeNoFlags()); + writer.writeCompactSize(transferDest.getByteLength()); + writer.writeSlice(transferDest.toBuffer()); + ss = Buffer.concat([ss, writer.buffer]); + } + else if (objTypeKey == VDXF_Data.ContentMultiMapRemoveKey().vdxfid) { + const transferDest = new ContentMultiMapRemove_1.ContentMultiMapRemove(oneValValues[k]); + let length = 20; + length += varint_1.default.encodingLength(transferDest.version); + length += varuint_1.default.encodingLength(transferDest.getByteLength()); + length += transferDest.getByteLength(); + const writer = new BufferWriter(Buffer.alloc(length)); + writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); + writer.writeVarInt(transferDest.version); + writer.writeCompactSize(transferDest.getByteLength()); + writer.writeSlice(transferDest.toBuffer()); + ss = Buffer.concat([ss, writer.buffer]); + } + else if (objTypeKey == VDXF_Data.CrossChainDataRefKey().vdxfid) { + const transferDest = new CrossChainDataRef_1.CrossChainDataRef(oneValValues[k]); + let length = 20; + length += varint_1.default.encodingLength(vdxf_1.VDXF_OBJECT_DEFAULT_VERSION); + length += varuint_1.default.encodingLength(transferDest.getByteLength()); + length += transferDest.getByteLength(); + const writer = new BufferWriter(Buffer.alloc(length)); + writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); + writer.writeVarInt(vdxf_1.VDXF_OBJECT_DEFAULT_VERSION); + writer.writeCompactSize(transferDest.getByteLength()); + writer.writeSlice(transferDest.toBuffer()); + ss = Buffer.concat([ss, writer.buffer]); + } + else if (objTypeKey == VDXF_Data.DataDescriptorKey().vdxfid) { + const descr = DataDescriptor.fromJson(oneValValues[k]); + let length = 20; + length += varint_1.default.encodingLength(descr.version); + length += varuint_1.default.encodingLength(descr.byteLength()); + length += descr.byteLength(); + const writer = new BufferWriter(Buffer.alloc(length)); + writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); + writer.writeVarInt(descr.version); + writer.writeCompactSize(descr.byteLength()); + writer.writeSlice(descr.toBuffer()); + ss = Buffer.concat([ss, writer.buffer]); + } + else if (objTypeKey == VDXF_Data.MMRDescriptorKey().vdxfid) { + const descr = MMRDescriptor.fromJson(oneValValues[k]); + let length = 20; + length += varint_1.default.encodingLength(descr.version); + length += varuint_1.default.encodingLength(descr.byteLength()); + length += descr.byteLength(); + const writer = new BufferWriter(Buffer.alloc(length)); + writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); + writer.writeVarInt(descr.version); + writer.writeCompactSize(descr.byteLength()); + writer.writeSlice(descr.toBuffer()); + ss = Buffer.concat([ss, writer.buffer]); + } + else if (objTypeKey == VDXF_Data.SignatureDataKey().vdxfid) { + const sigData = new SignatureData_1.SignatureData(oneValValues[k]); + let length = 20; + length += varint_1.default.encodingLength(sigData.version); + length += varuint_1.default.encodingLength(sigData.getByteLength()); + length += sigData.getByteLength(); + const writer = new BufferWriter(Buffer.alloc(length)); + writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); + writer.writeVarInt(sigData.version); + writer.writeCompactSize(sigData.getByteLength()); + writer.writeSlice(sigData.toBuffer()); + ss = Buffer.concat([ss, writer.buffer]); + } + else { + throw new Error("contentmap invalid or unrecognized vdxfkey for object type: " + oneValValues[k]); + } + } + return ss; +}; +exports.VectorEncodeVDXFUni = VectorEncodeVDXFUni; diff --git a/dist/vdxf/classes/Decision.js b/dist/vdxf/classes/Decision.js index 083e028..5799a0f 100644 --- a/dist/vdxf/classes/Decision.js +++ b/dist/vdxf/classes/Decision.js @@ -85,7 +85,7 @@ class Decision extends __1.VDXFObject { this.attestations = []; const attestationsLength = reader.readCompactSize(); for (let i = 0; i < attestationsLength; i++) { - const _att = new Attestation_1.Attestation(); + const _att = new Attestation_1.Attestation("", ""); reader.offset = _att.fromBuffer(reader.buffer, reader.offset); this.attestations.push(_att); } diff --git a/dist/vdxf/classes/IdentityData.d.ts b/dist/vdxf/classes/IdentityData.d.ts index a495f91..00defaa 100644 --- a/dist/vdxf/classes/IdentityData.d.ts +++ b/dist/vdxf/classes/IdentityData.d.ts @@ -1,15 +1,12 @@ -export declare const enum IdentityDataClassTypes { - BUFFER_DATA_STRING = 1, - BUFFER_DATA_BYTES = 2, - BUFFER_DATA_BASE64 = 3, - URL = 4, - PNG_IMAGE = 5, - KEY_ONLY = 6, - BOOLEAN = 7 -} +import * as keylist from '../keys'; +export declare const friendlyName: (vdfxkey: any) => string; +export declare const getIdentityDataType: (vdfxkey: any) => string | keylist.VDXFKeyInterface; export declare const IdentityVdxfidMap: { [x: string]: { name: string; - type: IdentityDataClassTypes; + type: keylist.VDXFKeyInterface; + } | { + name: string; + type: string; }; }; diff --git a/dist/vdxf/classes/IdentityData.js b/dist/vdxf/classes/IdentityData.js index 400adb0..b4a38d0 100644 --- a/dist/vdxf/classes/IdentityData.js +++ b/dist/vdxf/classes/IdentityData.js @@ -1,219 +1,242 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.IdentityVdxfidMap = void 0; +exports.IdentityVdxfidMap = exports.getIdentityDataType = exports.friendlyName = void 0; const identitykeys = require("../identityDataKeys"); const keylist = require("../keys"); +const DataDescriptor_1 = require("./DataDescriptor"); +const friendlyName = (vdfxkey) => { + if (vdfxkey in exports.IdentityVdxfidMap) { + return exports.IdentityVdxfidMap[vdfxkey].name; + } + else { + throw new Error("Unknown VDXF key"); + } +}; +exports.friendlyName = friendlyName; +const getIdentityDataType = (vdfxkey) => { + if (vdfxkey in exports.IdentityVdxfidMap) { + return exports.IdentityVdxfidMap[vdfxkey].type; + } + else { + throw new Error("Unknown VDXF key"); + } +}; +exports.getIdentityDataType = getIdentityDataType; exports.IdentityVdxfidMap = { - [identitykeys.IDENTITYDATA_FIRSTNAME.vdxfid]: { name: "First Name", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_LASTNAME.vdxfid]: { name: "Last Name", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_NATIONALITY.vdxfid]: { name: "Nationality", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_ATTESTOR.vdxfid]: { name: "Attestor ID", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDENTITY.vdxfid]: { name: "Identity", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_ID.vdxfid]: { name: "ID", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_USERID.vdxfid]: { name: "User ID", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_CREATEDAT.vdxfid]: { name: "Created at", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_COMPLETEDAT.vdxfid]: { name: "Completed at", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PREVIOUSATTEMPTID.vdxfid]: { name: "Previous attempt ID", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_SHAREABLEURL.vdxfid]: { name: "Shareable URL", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_TEMPLATEID.vdxfid]: { name: "Template ID", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_TEMPLATEVERSION.vdxfid]: { name: "Template Version", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PHONENUMBER.vdxfid]: { name: "Phone Number", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_OVER18.vdxfid]: { name: "Over 18", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_OVER21.vdxfid]: { name: "Over 21", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_OVER25.vdxfid]: { name: "Over 25", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_IPADDRESS.vdxfid]: { name: "IP Address", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_EMAIL.vdxfid]: { name: "Email Address", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_HOMEADDRESS.vdxfid]: { name: "Home address", type: 6 /* IdentityDataClassTypes.KEY_ONLY */ }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1.vdxfid]: { name: "Street 1", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2.vdxfid]: { name: "Street 2", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_CITY.vdxfid]: { name: "City", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_REGION.vdxfid]: { name: "Region", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE.vdxfid]: { name: "Post Code", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY.vdxfid]: { name: "Country", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDNUMBER_VALUE.vdxfid]: { name: "ID Number", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDNUMBER_TYPE.vdxfid]: { name: "ID Type", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_STATUS.vdxfid]: { name: "Status", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_APPROVALS_ACCEPTEDTOS.vdxfid]: { name: "Accepted Terms and Conditions", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_APPROVALS_VERIFIEDSMS.vdxfid]: { name: "SMS Verified", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_APPROVALS_KYCCHECKED.vdxfid]: { name: "KYC Checked ok", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_APPROVALS_DOCUMENTSVERIFIED.vdxfid]: { name: "Documents Verified", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_APPROVALS_SELFIECHECKED.vdxfid]: { name: "Selfie Checked", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_APPROVALS_WATCHLIST_OK.vdxfid]: { name: "Watchlist ok", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Riskcheck ok", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE.vdxfid]: { name: "Driving Licence", type: 6 /* IdentityDataClassTypes.KEY_ONLY */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_FRONT.vdxfid]: { name: "Driving Licence Front", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_BACK.vdxfid]: { name: "Driving Licence Back", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_FRONT.vdxfid]: { name: "Driving Licence Front", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_BACK.vdxfid]: { name: "Driving Licence Back", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_FACE.vdxfid]: { name: "Driving Licence Face", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_IDNUMBER.vdxfid]: { name: "Driving Licence Number", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CATEGORY.vdxfid]: { name: "Driving Licence Catagory", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_EXPIRATIONDATE.vdxfid]: { name: "Driving Licence expiry date", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Driving Licence matches country", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION.vdxfid]: { name: "Driving Licence issuing region", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH.vdxfid]: { name: "Driving Licence Date of Birth", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ADDRESS.vdxfid]: { name: "Driving Licence Address", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_STREET1.vdxfid]: { name: "Driving Licence Street 1", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CITY.vdxfid]: { name: "Driving Licence City", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_REGION.vdxfid]: { name: "Driving Licence Region", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_POSTCODE.vdxfid]: { name: "Driving Licence ZIP/Post Code", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_COUNTRY.vdxfid]: { name: "Driving Licence Country", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_MATCHED.vdxfid]: { name: "Driving Licence Matched all", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_NAME_MATCHED.vdxfid]: { name: "Driving Licence name matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH_MATCHED.vdxfid]: { name: "Driving Licence Date of Birth Matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_SELFIECHECK_SUCCESS.vdxfid]: { name: "Selfie Check success", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_SELFIECHECK_IMAGE.vdxfid]: { name: "Selfie Check image", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_SELFIECHECK_VIDEO.vdxfid]: { name: "Selfie Check video", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_SELFIECHECK_DRIVINGLICENCE_MATCH.vdxfid]: { name: "Selfie Driving Licence match", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_KYC_SUCCESS.vdxfid]: { name: "KYC Success", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_KYC_ADDRESS_MATCHED.vdxfid]: { name: "KYC Address Matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_KYC_TYPE.vdxfid]: { name: "KYC Type", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_KYC_NAME_MATCHED.vdxfid]: { name: "KYC Name Matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_KYC_DATEOFBIRTH_MATCHED.vdxfid]: { name: "KYC Date of Birth Matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_KYC_IDNUMBER_MATCHED.vdxfid]: { name: "KYC ID Matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_KYC_PHONENUMBER_MATCHED.vdxfid]: { name: "KYC Phone number matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_KYC_AREACODE_MATCHED.vdxfid]: { name: "KYC Areacode Matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RISKCHECK_STATUS.vdxfid]: { name: "Risk Check Status", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RISKCHECK_USERINTERACTIONS.vdxfid]: { name: "Risck Check User Interactions", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RISKCHECK_FRAUDRINGOK.vdxfid]: { name: "Risk Check No Fraudring", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RISKCHECK_BOTNOTDETECTED.vdxfid]: { name: "Risk Check bot free", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_EMAIL_ISDELIVERABLE.vdxfid]: { name: "Email address is deliverable", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_EMAIL_BREACHCOUNT.vdxfid]: { name: "Email breach count", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_EMAIL_FIRSTBREACHEDAT.vdxfid]: { name: "Email first breach date", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_EMAIL_LASTBREACHEDAT.vdxfid]: { name: "Email last breach date", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_REGISTEREDAT.vdxfid]: { name: "Email domain registered at", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_FREEPROVIDER.vdxfid]: { name: "Email is free provider", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_CUSTOM.vdxfid]: { name: "Email Domain is custom", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_DISPOSABLE.vdxfid]: { name: "Email Domain Disposable", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS.vdxfid]: { name: "Email top level Domain Suspicious", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDCARD.vdxfid]: { name: "ID Card", type: 6 /* IdentityDataClassTypes.KEY_ONLY */ }, - [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_FRONT.vdxfid]: { name: "ID Card Front", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_BACK.vdxfid]: { name: "ID Card Back", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_IDCARD_CROPPED_FRONT.vdxfid]: { name: "ID Card Front", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_IDCARD_CROPPED_BACK.vdxfid]: { name: "ID Card Back", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_IDCARD_FACE.vdxfid]: { name: "ID Card Face", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_IDCARD_IDNUMBER.vdxfid]: { name: "ID Card ID Number", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDCARD_CATEGORY.vdxfid]: { name: "ID Card Category", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDCARD_EXPIRATIONDATE.vdxfid]: { name: "ID Card Expiry date", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "ID Card Issuing Country Matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDCARD_ISSUING_REGION.vdxfid]: { name: "ID Card Issuing Region", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTH.vdxfid]: { name: "ID Card Date of Birth", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS.vdxfid]: { name: "ID Card Address", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_STREET1.vdxfid]: { name: "ID Card Street 1", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_CITY.vdxfid]: { name: "ID Card City", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_REGION.vdxfid]: { name: "ID Card Region", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_POSTCODE.vdxfid]: { name: "ID Card Zip/Post Code", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_COUNTRY.vdxfid]: { name: "ID Card Country", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "ID Card Matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_IDCARD_NAME_MATCHED.vdxfid]: { name: "ID Card Name Matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "ID Card Date of Birth Matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_PASSPORT.vdxfid]: { name: "Passport", type: 6 /* IdentityDataClassTypes.KEY_ONLY */ }, - [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_FRONT.vdxfid]: { name: "Passport front", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_BACK.vdxfid]: { name: "Passport back", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_FRONT.vdxfid]: { name: "Passport front", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_BACK.vdxfid]: { name: "Passport back", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_PASSPORT_FACE.vdxfid]: { name: "Passport face", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_PASSPORT_IDNUMBER.vdxfid]: { name: "Passport ID Number", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PASSPORT_CATEGORY.vdxfid]: { name: "Passport Category", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PASSPORT_EXPIRATIONDATE.vdxfid]: { name: "Passport expiry date", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Passport issuing country matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_REGION.vdxfid]: { name: "Passport issuing region matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTH.vdxfid]: { name: "Passport date of birth", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS.vdxfid]: { name: "Passport address", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_STREET1.vdxfid]: { name: "Passport street 1", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_CITY.vdxfid]: { name: "Passport city", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_REGION.vdxfid]: { name: "Passport region", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_POSTCODE.vdxfid]: { name: "Passport zip/post code", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_COUNTRY.vdxfid]: { name: "Passport country", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PASSPORT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Passport matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_PASSPORT_NAME_MATCHED.vdxfid]: { name: "Passport Name Matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTHMATCHED.vdxfid]: { name: "Passport date of birth matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT.vdxfid]: { name: "Residence Permit", type: 6 /* IdentityDataClassTypes.KEY_ONLY */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_FRONT.vdxfid]: { name: "Residence Permit front", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_BACK.vdxfid]: { name: "Residence Permit back", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_FRONT.vdxfid]: { name: "Residence Permit front", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_BACK.vdxfid]: { name: "Residence Permit back", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_FACE.vdxfid]: { name: "Residence Permit face", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_IDNUMBER.vdxfid]: { name: "Residence Permit ID Number", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CATEGORY.vdxfid]: { name: "Residence Permit category", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_EXPIRATIONDATE.vdxfid]: { name: "Residence Permit expiry date", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Residence Permit issuing country matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_REGION.vdxfid]: { name: "Residence Permit issuing region matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTH.vdxfid]: { name: "Residence Permit date of birth", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS.vdxfid]: { name: "Residence Permit Address", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_STREET1.vdxfid]: { name: "Residence Permit Street 1", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_CITY.vdxfid]: { name: "Residence Permit City", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_REGION.vdxfid]: { name: "Residence Permit Region", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_POSTCODE.vdxfid]: { name: "Residence Permit Zip/Post code", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_COUNTRY.vdxfid]: { name: "Residence Permit Country", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Residence Permit Matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_NAME_MATCHED.vdxfid]: { name: "Residence Permit name matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTHMATCHED.vdxfid]: { name: "Residence Permit date of birth matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD.vdxfid]: { name: "Resident Card", type: 6 /* IdentityDataClassTypes.KEY_ONLY */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_FRONT.vdxfid]: { name: "Resident Card Front", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_BACK.vdxfid]: { name: "Resident Card Back", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_FRONT.vdxfid]: { name: "Resident Card Front", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_BACK.vdxfid]: { name: "Resident Card Back", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_FACE.vdxfid]: { name: "Resident Card Face", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_IDNUMBER.vdxfid]: { name: "Resident Card ID Number", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_CATEGORY.vdxfid]: { name: "Resident Card Category", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_EXPIRATIONDATE.vdxfid]: { name: "Resident Card Expiry Date", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Resident Card Issuing Country Matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_REGION.vdxfid]: { name: "Resident Card Issuing Region", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTH.vdxfid]: { name: "Resident Card date of birth", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS.vdxfid]: { name: "Resident Card address", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_STREET1.vdxfid]: { name: "Resident Card Street 1", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_CITY.vdxfid]: { name: "Resident Card City", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_REGION.vdxfid]: { name: "Resident Card Region", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_POSTCODE.vdxfid]: { name: "Resident Card Zip/Post Code", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_COUNTRY.vdxfid]: { name: "Resident Card Country", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Resident Card Matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_NAME_MATCHED.vdxfid]: { name: "Resident Card Name Matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "Resident Card date of birth Matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_VISA.vdxfid]: { name: "Visa", type: 6 /* IdentityDataClassTypes.KEY_ONLY */ }, - [identitykeys.IDENTITYDATA_VISA_ORIGINAL_FRONT.vdxfid]: { name: "Visa front", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_VISA_ORIGINAL_BACK.vdxfid]: { name: "Visa back", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_VISA_CROPPED_FRONT.vdxfid]: { name: "Visa front", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_VISA_CROPPED_BACK.vdxfid]: { name: "Visa back", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_VISA_FACE.vdxfid]: { name: "Visa face", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_VISA_IDNUMBER.vdxfid]: { name: "Visa ID Number", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_VISA_CATEGORY.vdxfid]: { name: "Visa Category", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_VISA_EXPIRATIONDATE.vdxfid]: { name: "Visa expiry date", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Visa issuing country matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_VISA_ISSUING_REGION.vdxfid]: { name: "Visa issuing region", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTH.vdxfid]: { name: "Visa date of birth", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS.vdxfid]: { name: "Visa address", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_STREET1.vdxfid]: { name: "Visa Street 1", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_CITY.vdxfid]: { name: "Visa City", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_REGION.vdxfid]: { name: "Visa Region", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_POSTCODE.vdxfid]: { name: "Visa Zip/Post Code", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_COUNTRY.vdxfid]: { name: "Visa Country", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_VISA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Visa document matched", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_VISA_NAME_MATCHED.vdxfid]: { name: "Visa name matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTHMATCHED.vdxfid]: { name: "Visa date of birth matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALFRONT.vdxfid]: { name: "Original Front", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALBACK.vdxfid]: { name: "Original Back", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDFRONT.vdxfid]: { name: "Cropped Front", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDBACK.vdxfid]: { name: "Cropped Back", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_FACE.vdxfid]: { name: "Face", type: 4 /* IdentityDataClassTypes.URL */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_IDNUMBER.vdxfid]: { name: "ID Number", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CATEGORY.vdxfid]: { name: "Category", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_EXPIRATIONDATE.vdxfid]: { name: "Expiry Date", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY.vdxfid]: { name: "Issuing Country", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUING_REGION.vdxfid]: { name: "Issuing Region", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ADDRESS.vdxfid]: { name: "Address", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_ADDRESS_STREET1.vdxfid]: { name: "Street 1", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_ADDRESS_STREET2.vdxfid]: { name: "Street 2", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_ADDRESS_CITY.vdxfid]: { name: "City", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_ADDRESS_REGION.vdxfid]: { name: "Region", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_ADDRESS_POSTCODE.vdxfid]: { name: "Zip/Postal Code", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_ADDRESS_COUNTRY.vdxfid]: { name: "Country", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Document Matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED.vdxfid]: { name: "Name Matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED.vdxfid]: { name: "Date of Birth Matched", type: 7 /* IdentityDataClassTypes.BOOLEAN */ }, - [identitykeys.BANK_ACCOUNT.vdxfid]: { name: "Bank Account", type: 6 /* IdentityDataClassTypes.KEY_ONLY */ }, - [identitykeys.IDENTITYDATA_DOCUMENTS_AND_IMAGES.vdxfid]: { name: "Official ID Documents", type: 6 /* IdentityDataClassTypes.KEY_ONLY */ }, - [keylist.ATTESTATION_TYPE.vdxfid]: { name: "Attestation Type", type: 1 /* IdentityDataClassTypes.BUFFER_DATA_STRING */ }, + [identitykeys.IDENTITYDATA_FIRSTNAME.vdxfid]: { name: "First Name", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_LASTNAME.vdxfid]: { name: "Last Name", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_NATIONALITY.vdxfid]: { name: "Nationality", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_ATTESTOR.vdxfid]: { name: "Attestor ID", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDENTITY.vdxfid]: { name: "Identity", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_ID.vdxfid]: { name: "ID", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_USERID.vdxfid]: { name: "User ID", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_CREATEDAT.vdxfid]: { name: "Created at", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_COMPLETEDAT.vdxfid]: { name: "Completed at", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PREVIOUSATTEMPTID.vdxfid]: { name: "Previous attempt ID", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_SHAREABLEURL.vdxfid]: { name: "Shareable URL", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_TEMPLATEID.vdxfid]: { name: "Template ID", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_TEMPLATEVERSION.vdxfid]: { name: "Template Version", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PHONENUMBER.vdxfid]: { name: "Phone Number", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_OVER18.vdxfid]: { name: "Over 18", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_OVER21.vdxfid]: { name: "Over 21", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_OVER25.vdxfid]: { name: "Over 25", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_IPADDRESS.vdxfid]: { name: "IP Address", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_EMAIL.vdxfid]: { name: "Email Address", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_HOMEADDRESS.vdxfid]: { name: "Home address", type: DataDescriptor_1.VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1.vdxfid]: { name: "Street 1", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2.vdxfid]: { name: "Street 2", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_CITY.vdxfid]: { name: "City", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_REGION.vdxfid]: { name: "Region", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE.vdxfid]: { name: "Post Code", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY.vdxfid]: { name: "Country", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDNUMBER_VALUE.vdxfid]: { name: "ID Number", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDNUMBER_TYPE.vdxfid]: { name: "ID Type", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_STATUS.vdxfid]: { name: "Status", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_APPROVALS_ACCEPTEDTOS.vdxfid]: { name: "Accepted Terms and Conditions", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_APPROVALS_VERIFIEDSMS.vdxfid]: { name: "SMS Verified", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_APPROVALS_KYCCHECKED.vdxfid]: { name: "KYC Checked ok", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_APPROVALS_DOCUMENTSVERIFIED.vdxfid]: { name: "Documents Verified", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_APPROVALS_SELFIECHECKED.vdxfid]: { name: "Selfie Checked", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_APPROVALS_WATCHLIST_OK.vdxfid]: { name: "Watchlist ok", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Riskcheck ok", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE.vdxfid]: { name: "Driving Licence", type: DataDescriptor_1.VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_FRONT.vdxfid]: { name: "Driving Licence Front", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_BACK.vdxfid]: { name: "Driving Licence Back", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_FRONT.vdxfid]: { name: "Driving Licence Front", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_BACK.vdxfid]: { name: "Driving Licence Back", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_FACE.vdxfid]: { name: "Driving Licence Face", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_IDNUMBER.vdxfid]: { name: "Driving Licence Number", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CATEGORY.vdxfid]: { name: "Driving Licence Catagory", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_EXPIRATIONDATE.vdxfid]: { name: "Driving Licence expiry date", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Driving Licence matches country", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION.vdxfid]: { name: "Driving Licence issuing region", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH.vdxfid]: { name: "Driving Licence Date of Birth", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ADDRESS.vdxfid]: { name: "Driving Licence Address", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_STREET1.vdxfid]: { name: "Driving Licence Street 1", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CITY.vdxfid]: { name: "Driving Licence City", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_REGION.vdxfid]: { name: "Driving Licence Region", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_POSTCODE.vdxfid]: { name: "Driving Licence ZIP/Post Code", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_COUNTRY.vdxfid]: { name: "Driving Licence Country", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_MATCHED.vdxfid]: { name: "Driving Licence Matched all", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_NAME_MATCHED.vdxfid]: { name: "Driving Licence name matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH_MATCHED.vdxfid]: { name: "Driving Licence Date of Birth Matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_SELFIECHECK_SUCCESS.vdxfid]: { name: "Selfie Check success", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_SELFIECHECK_IMAGE.vdxfid]: { name: "Selfie Check image", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_SELFIECHECK_VIDEO.vdxfid]: { name: "Selfie Check video", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_SELFIECHECK_DRIVINGLICENCE_MATCH.vdxfid]: { name: "Selfie Driving Licence match", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_KYC_SUCCESS.vdxfid]: { name: "KYC Success", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_KYC_ADDRESS_MATCHED.vdxfid]: { name: "KYC Address Matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_KYC_TYPE.vdxfid]: { name: "KYC Type", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_KYC_NAME_MATCHED.vdxfid]: { name: "KYC Name Matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_KYC_DATEOFBIRTH_MATCHED.vdxfid]: { name: "KYC Date of Birth Matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_KYC_IDNUMBER_MATCHED.vdxfid]: { name: "KYC ID Matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_KYC_PHONENUMBER_MATCHED.vdxfid]: { name: "KYC Phone number matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_KYC_AREACODE_MATCHED.vdxfid]: { name: "KYC Areacode Matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RISKCHECK_STATUS.vdxfid]: { name: "Risk Check Status", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RISKCHECK_USERINTERACTIONS.vdxfid]: { name: "Risck Check User Interactions", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RISKCHECK_FRAUDRINGOK.vdxfid]: { name: "Risk Check No Fraudring", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RISKCHECK_BOTNOTDETECTED.vdxfid]: { name: "Risk Check bot free", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_EMAIL_ISDELIVERABLE.vdxfid]: { name: "Email address is deliverable", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_EMAIL_BREACHCOUNT.vdxfid]: { name: "Email breach count", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_EMAIL_FIRSTBREACHEDAT.vdxfid]: { name: "Email first breach date", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_EMAIL_LASTBREACHEDAT.vdxfid]: { name: "Email last breach date", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_REGISTEREDAT.vdxfid]: { name: "Email domain registered at", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_FREEPROVIDER.vdxfid]: { name: "Email is free provider", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_CUSTOM.vdxfid]: { name: "Email Domain is custom", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_DISPOSABLE.vdxfid]: { name: "Email Domain Disposable", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS.vdxfid]: { name: "Email top level Domain Suspicious", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD.vdxfid]: { name: "ID Card", type: DataDescriptor_1.VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_FRONT.vdxfid]: { name: "ID Card Front", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_BACK.vdxfid]: { name: "ID Card Back", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_IDCARD_CROPPED_FRONT.vdxfid]: { name: "ID Card Front", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_IDCARD_CROPPED_BACK.vdxfid]: { name: "ID Card Back", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_IDCARD_FACE.vdxfid]: { name: "ID Card Face", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_IDCARD_IDNUMBER.vdxfid]: { name: "ID Card ID Number", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_CATEGORY.vdxfid]: { name: "ID Card Category", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_EXPIRATIONDATE.vdxfid]: { name: "ID Card Expiry date", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "ID Card Issuing Country Matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_ISSUING_REGION.vdxfid]: { name: "ID Card Issuing Region", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTH.vdxfid]: { name: "ID Card Date of Birth", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS.vdxfid]: { name: "ID Card Address", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_STREET1.vdxfid]: { name: "ID Card Street 1", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_CITY.vdxfid]: { name: "ID Card City", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_REGION.vdxfid]: { name: "ID Card Region", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_POSTCODE.vdxfid]: { name: "ID Card Zip/Post Code", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_COUNTRY.vdxfid]: { name: "ID Card Country", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "ID Card Matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_NAME_MATCHED.vdxfid]: { name: "ID Card Name Matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "ID Card Date of Birth Matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_PASSPORT.vdxfid]: { name: "Passport", type: DataDescriptor_1.VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_FRONT.vdxfid]: { name: "Passport front", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_BACK.vdxfid]: { name: "Passport back", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_FRONT.vdxfid]: { name: "Passport front", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_BACK.vdxfid]: { name: "Passport back", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_PASSPORT_FACE.vdxfid]: { name: "Passport face", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_PASSPORT_IDNUMBER.vdxfid]: { name: "Passport ID Number", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_CATEGORY.vdxfid]: { name: "Passport Category", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_EXPIRATIONDATE.vdxfid]: { name: "Passport expiry date", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Passport issuing country matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_REGION.vdxfid]: { name: "Passport issuing region matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTH.vdxfid]: { name: "Passport date of birth", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS.vdxfid]: { name: "Passport address", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_STREET1.vdxfid]: { name: "Passport street 1", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_CITY.vdxfid]: { name: "Passport city", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_REGION.vdxfid]: { name: "Passport region", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_POSTCODE.vdxfid]: { name: "Passport zip/post code", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_COUNTRY.vdxfid]: { name: "Passport country", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Passport matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_NAME_MATCHED.vdxfid]: { name: "Passport Name Matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTHMATCHED.vdxfid]: { name: "Passport date of birth matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT.vdxfid]: { name: "Residence Permit", type: DataDescriptor_1.VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_FRONT.vdxfid]: { name: "Residence Permit front", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_BACK.vdxfid]: { name: "Residence Permit back", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_FRONT.vdxfid]: { name: "Residence Permit front", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_BACK.vdxfid]: { name: "Residence Permit back", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_FACE.vdxfid]: { name: "Residence Permit face", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_IDNUMBER.vdxfid]: { name: "Residence Permit ID Number", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CATEGORY.vdxfid]: { name: "Residence Permit category", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_EXPIRATIONDATE.vdxfid]: { name: "Residence Permit expiry date", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Residence Permit issuing country matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_REGION.vdxfid]: { name: "Residence Permit issuing region matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTH.vdxfid]: { name: "Residence Permit date of birth", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS.vdxfid]: { name: "Residence Permit Address", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_STREET1.vdxfid]: { name: "Residence Permit Street 1", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_CITY.vdxfid]: { name: "Residence Permit City", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_REGION.vdxfid]: { name: "Residence Permit Region", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_POSTCODE.vdxfid]: { name: "Residence Permit Zip/Post code", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_COUNTRY.vdxfid]: { name: "Residence Permit Country", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Residence Permit Matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_NAME_MATCHED.vdxfid]: { name: "Residence Permit name matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTHMATCHED.vdxfid]: { name: "Residence Permit date of birth matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD.vdxfid]: { name: "Resident Card", type: DataDescriptor_1.VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_FRONT.vdxfid]: { name: "Resident Card Front", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_BACK.vdxfid]: { name: "Resident Card Back", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_FRONT.vdxfid]: { name: "Resident Card Front", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_BACK.vdxfid]: { name: "Resident Card Back", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_FACE.vdxfid]: { name: "Resident Card Face", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_IDNUMBER.vdxfid]: { name: "Resident Card ID Number", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_CATEGORY.vdxfid]: { name: "Resident Card Category", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_EXPIRATIONDATE.vdxfid]: { name: "Resident Card Expiry Date", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Resident Card Issuing Country Matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_REGION.vdxfid]: { name: "Resident Card Issuing Region", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTH.vdxfid]: { name: "Resident Card date of birth", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS.vdxfid]: { name: "Resident Card address", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_STREET1.vdxfid]: { name: "Resident Card Street 1", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_CITY.vdxfid]: { name: "Resident Card City", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_REGION.vdxfid]: { name: "Resident Card Region", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_POSTCODE.vdxfid]: { name: "Resident Card Zip/Post Code", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_COUNTRY.vdxfid]: { name: "Resident Card Country", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Resident Card Matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_NAME_MATCHED.vdxfid]: { name: "Resident Card Name Matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "Resident Card date of birth Matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_VISA.vdxfid]: { name: "Visa", type: DataDescriptor_1.VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITYDATA_VISA_ORIGINAL_FRONT.vdxfid]: { name: "Visa front", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_VISA_ORIGINAL_BACK.vdxfid]: { name: "Visa back", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_VISA_CROPPED_FRONT.vdxfid]: { name: "Visa front", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_VISA_CROPPED_BACK.vdxfid]: { name: "Visa back", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_VISA_FACE.vdxfid]: { name: "Visa face", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_VISA_IDNUMBER.vdxfid]: { name: "Visa ID Number", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_CATEGORY.vdxfid]: { name: "Visa Category", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_EXPIRATIONDATE.vdxfid]: { name: "Visa expiry date", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Visa issuing country matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_ISSUING_REGION.vdxfid]: { name: "Visa issuing region", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTH.vdxfid]: { name: "Visa date of birth", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS.vdxfid]: { name: "Visa address", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_STREET1.vdxfid]: { name: "Visa Street 1", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_CITY.vdxfid]: { name: "Visa City", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_REGION.vdxfid]: { name: "Visa Region", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_POSTCODE.vdxfid]: { name: "Visa Zip/Post Code", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_COUNTRY.vdxfid]: { name: "Visa Country", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Visa document matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_NAME_MATCHED.vdxfid]: { name: "Visa name matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTHMATCHED.vdxfid]: { name: "Visa date of birth matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALFRONT.vdxfid]: { name: "Original Front", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALBACK.vdxfid]: { name: "Original Back", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDFRONT.vdxfid]: { name: "Cropped Front", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDBACK.vdxfid]: { name: "Cropped Back", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_FACE.vdxfid]: { name: "Face", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_IDNUMBER.vdxfid]: { name: "ID Number", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CATEGORY.vdxfid]: { name: "Category", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_EXPIRATIONDATE.vdxfid]: { name: "Expiry Date", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY.vdxfid]: { name: "Issuing Country", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUING_REGION.vdxfid]: { name: "Issuing Region", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ADDRESS.vdxfid]: { name: "Address", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_ADDRESS_STREET1.vdxfid]: { name: "Street 1", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_ADDRESS_STREET2.vdxfid]: { name: "Street 2", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_ADDRESS_CITY.vdxfid]: { name: "City", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_ADDRESS_REGION.vdxfid]: { name: "Region", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_ADDRESS_POSTCODE.vdxfid]: { name: "Zip/Postal Code", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_ADDRESS_COUNTRY.vdxfid]: { name: "Country", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Document Matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED.vdxfid]: { name: "Name Matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED.vdxfid]: { name: "Date of Birth Matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, + [identitykeys.BANK_ACCOUNT.vdxfid]: { name: "Bank Account", type: DataDescriptor_1.VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITYDATA_DOCUMENTS_AND_IMAGES.vdxfid]: { name: "Official ID Documents", type: DataDescriptor_1.VDXF_Data.DataUint160Key() }, + [keylist.ATTESTATION_PROVISION_TYPE.vdxfid]: { name: "Attestation Type", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [keylist.ATTESTATION_PROVISION_URL.vdxfid]: { name: "Attestation URL", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, + [keylist.ATTESTATION_VIEW_RESPONSE.vdxfid]: { name: "Attestation View Response", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [keylist.ATTESTATION_VIEW_REQUEST.vdxfid]: { name: "Attestation View Response", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [keylist.PROFILE_DATA_VIEW_REQUEST.vdxfid]: { name: "Profile Data View Request", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, }; diff --git a/dist/vdxf/classes/PersonalProfile.d.ts b/dist/vdxf/classes/PersonalProfile.d.ts index 3d08582..ca0e590 100644 --- a/dist/vdxf/classes/PersonalProfile.d.ts +++ b/dist/vdxf/classes/PersonalProfile.d.ts @@ -1,42 +1,8 @@ -/// import { VDXFObject } from ".."; -export declare class DataCategory { - data: Array; +export declare class DataCategory extends VDXFObject { + data: Array; category: string; details: string; - vdxfid: string; - constructor(data: Array | Array<{ - vdxfid: string; - }>, category: string, vdxfid: string, details: string); + constructor(vdxfid?: string, data?: Array, category?: string, details?: string); } -declare class PersonalDataCategory extends DataCategory { - constructor(); -} -declare class ContactDataCategory extends DataCategory { - constructor(); -} -declare class LocationDataCategory extends DataCategory { - constructor(); -} -declare class BankingDataCategory extends DataCategory { - constructor(); -} -declare class DocumentsCategory extends DataCategory { - constructor(); -} -export declare const defaultPersonalProfileDataTemplate: (PersonalDataCategory | ContactDataCategory | LocationDataCategory | BankingDataCategory | DocumentsCategory)[]; -export declare class PersonalProfileDataStore extends VDXFObject { - data: { - [key: string]: DataCategory; - }; - constructor(data?: Array); - dataByteLength(): number; - toDataBuffer(): Buffer; - fromDataBuffer(buffer: Buffer, offset?: number): number; - toJson(): { - data: { - [key: string]: DataCategory; - }; - }; -} -export {}; +export declare const defaultPersonalProfileDataTemplate: DataCategory[]; diff --git a/dist/vdxf/classes/PersonalProfile.js b/dist/vdxf/classes/PersonalProfile.js index 5f309cb..f093296 100644 --- a/dist/vdxf/classes/PersonalProfile.js +++ b/dist/vdxf/classes/PersonalProfile.js @@ -1,164 +1,63 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.PersonalProfileDataStore = exports.defaultPersonalProfileDataTemplate = exports.DataCategory = void 0; -const varuint_1 = require("../../utils/varuint"); +exports.defaultPersonalProfileDataTemplate = exports.DataCategory = void 0; const bufferutils_1 = require("../../utils/bufferutils"); -const address_1 = require("../../utils/address"); -const vdxf_1 = require("../../constants/vdxf"); const __1 = require(".."); -const Attestation_1 = require("./Attestation"); const identitykeys = require("../identityDataKeys"); const { BufferReader, BufferWriter } = bufferutils_1.default; -class DataCategory { - constructor(data, category, vdxfid, details) { - if (data && data[0] instanceof __1.VDXFObject) { - this.data = data; - } - else if (data) { - this.data = data.map(key => { return Attestation_1.AttestationDataType.getDataItem(key.vdxfid, null); }); - } - this.category = category; - this.vdxfid = vdxfid; - this.details = details; +class DataCategory extends __1.VDXFObject { + constructor(vdxfid, data, category, details) { + super(vdxfid || ""); + this.data = data || []; + this.category = category || ""; + this.details = details || ""; } } exports.DataCategory = DataCategory; -class PersonalDataCategory extends DataCategory { - constructor() { - super([ - identitykeys.IDENTITYDATA_FIRSTNAME, - identitykeys.IDENTITYDATA_LASTNAME, - identitykeys.IDENTITYDATA_MIDDLENAME, - identitykeys.IDENTITYDATA_DATEOFBIRTH, - identitykeys.IDENTITYDATA_NATIONALITY - ], "Personal Details", identitykeys.IDENTITYDATA_PERSONAL_DETAILS.vdxfid, "Name, birthday, nationality"); - } -} -class ContactDataCategory extends DataCategory { - constructor() { - super([ - identitykeys.IDENTITYDATA_EMAIL, - identitykeys.IDENTITYDATA_PHONENUMBER - ], "Contact", identitykeys.IDENTITYDATA_CONTACT.vdxfid, "Email, phone number"); - } -} -class LocationDataCategory extends DataCategory { - constructor() { - super([ - identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1, - identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2, - identitykeys.IDENTITYDATA_HOMEADDRESS_CITY, - identitykeys.IDENTITYDATA_HOMEADDRESS_REGION, - identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE, - identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY, - ], "Locations", identitykeys.IDENTITYDATA_LOCATIONS.vdxfid, "Tax residency, home address"); - } -} -class BankingDataCategory extends DataCategory { - constructor() { - super([ - identitykeys.BANK_ACCOUNT, - identitykeys.BANK_ACCOUNT_CURRENCY, - identitykeys.BANK_ACCOUNT_COUNTRY, - identitykeys.BANK_ACCOUNT_STREET1, - identitykeys.BANK_ACCOUNT_STREET2, - identitykeys.BANK_ACCOUNT_CITY, - identitykeys.BANK_ACCOUNT_REGION, - identitykeys.BANK_ACCOUNT_POSTALCODE, - identitykeys.BANK_ACCOUNT_TAXNUMBER, - identitykeys.BANK_ACCOUNT_TAXCOUNTRY, - identitykeys.BANK_ACCOUNT_FIRSTNAME, - identitykeys.BANK_ACCOUNT_LASTNAME, - identitykeys.BANK_ACCOUNT_PHONENUMBER, - identitykeys.BANK_ACCOUNT_NUMBER, - identitykeys.BANK_ACCOUNT_TYPE - ], "Banking Information", identitykeys.IDENTITYDATA_BANKING_INFORMATION.vdxfid, "Bank accounts"); - } -} -class DocumentsCategory extends DataCategory { - constructor() { - super([ - identitykeys.IDENTITYDATA_PASSPORT, - identitykeys.IDENTITYDATA_DRIVINGLICENCE, - identitykeys.IDENTITYDATA_RESIDENCEPERMIT, - identitykeys.IDENTITYDATA_RESIDENTCARD, - identitykeys.IDENTITYDATA_VISA, - identitykeys.IDENTITYDATA_IDCARD, - identitykeys.IDENTITYDATA_SELFIECHECK_IMAGE, - ], "Documents", identitykeys.IDENTITYDATA_DOCUMENTS_AND_IMAGES.vdxfid, "Passport, ID, driving license"); - } -} exports.defaultPersonalProfileDataTemplate = [ - new PersonalDataCategory(), - new ContactDataCategory(), - new LocationDataCategory(), - new BankingDataCategory(), - new DocumentsCategory() + new DataCategory(identitykeys.IDENTITYDATA_PERSONAL_DETAILS.vdxfid, [ + identitykeys.IDENTITYDATA_FIRSTNAME.vdxfid, + identitykeys.IDENTITYDATA_LASTNAME.vdxfid, + identitykeys.IDENTITYDATA_MIDDLENAME.vdxfid, + identitykeys.IDENTITYDATA_DATEOFBIRTH.vdxfid, + identitykeys.IDENTITYDATA_NATIONALITY.vdxfid + ], "Personal Details", "Name, birthday, nationality"), + new DataCategory(identitykeys.IDENTITYDATA_CONTACT.vdxfid, [ + identitykeys.IDENTITYDATA_EMAIL.vdxfid, + identitykeys.IDENTITYDATA_PHONENUMBER.vdxfid + ], "Contact", "Email, phone number"), + new DataCategory(identitykeys.IDENTITYDATA_LOCATIONS.vdxfid, [ + identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1.vdxfid, + identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2.vdxfid, + identitykeys.IDENTITYDATA_HOMEADDRESS_CITY.vdxfid, + identitykeys.IDENTITYDATA_HOMEADDRESS_REGION.vdxfid, + identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE.vdxfid, + identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY.vdxfid, + ], "Locations", "Tax residency, home address"), + new DataCategory(identitykeys.IDENTITYDATA_BANKING_INFORMATION.vdxfid, [ + identitykeys.BANK_ACCOUNT.vdxfid, + identitykeys.BANK_ACCOUNT_CURRENCY.vdxfid, + identitykeys.BANK_ACCOUNT_COUNTRY.vdxfid, + identitykeys.BANK_ACCOUNT_STREET1.vdxfid, + identitykeys.BANK_ACCOUNT_STREET2.vdxfid, + identitykeys.BANK_ACCOUNT_CITY.vdxfid, + identitykeys.BANK_ACCOUNT_REGION.vdxfid, + identitykeys.BANK_ACCOUNT_POSTALCODE.vdxfid, + identitykeys.BANK_ACCOUNT_TAXNUMBER.vdxfid, + identitykeys.BANK_ACCOUNT_TAXCOUNTRY.vdxfid, + identitykeys.BANK_ACCOUNT_FIRSTNAME.vdxfid, + identitykeys.BANK_ACCOUNT_LASTNAME.vdxfid, + identitykeys.BANK_ACCOUNT_PHONENUMBER.vdxfid, + identitykeys.BANK_ACCOUNT_NUMBER.vdxfid, + identitykeys.BANK_ACCOUNT_TYPE.vdxfid + ], "Banking Information", "Bank accounts"), + new DataCategory(identitykeys.IDENTITYDATA_DOCUMENTS_AND_IMAGES.vdxfid, [ + identitykeys.IDENTITYDATA_PASSPORT.vdxfid, + identitykeys.IDENTITYDATA_DRIVINGLICENCE.vdxfid, + identitykeys.IDENTITYDATA_RESIDENCEPERMIT.vdxfid, + identitykeys.IDENTITYDATA_RESIDENTCARD.vdxfid, + identitykeys.IDENTITYDATA_VISA.vdxfid, + identitykeys.IDENTITYDATA_IDCARD.vdxfid, + identitykeys.IDENTITYDATA_SELFIECHECK_IMAGE.vdxfid, + ], "Documents", "Passport, ID, driving license"), ]; -class PersonalProfileDataStore extends __1.VDXFObject { - constructor(data) { - super(identitykeys.PERSONAL_INFO_OBJECT.vdxfid); - if (data) { - this.data = {}; - for (const item of data) { - this.data[item.category] = item; - } - } - else { - this.data = {}; - for (const item of exports.defaultPersonalProfileDataTemplate) { - this.data[item.category] = item; - } - } - } - dataByteLength() { - let byteLength = 0; - byteLength += varuint_1.default.encodingLength(Object.keys(this.data).length); - for (const [key, value] of Object.entries(this.data)) { - byteLength += vdxf_1.HASH160_BYTE_LENGTH; // category - byteLength += varuint_1.default.encodingLength(value.data.length); - for (const attestation of value.data) { - byteLength += attestation.toBuffer().length; - } - } - return byteLength; - } - toDataBuffer() { - const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); - bufferWriter.writeCompactSize(Object.keys(this.data).length); - for (const [key, value] of Object.entries(this.data)) { - bufferWriter.writeSlice((0, address_1.fromBase58Check)(value.vdxfid).hash); - bufferWriter.writeCompactSize(value.data.length); - for (const dataType of value.data) { - bufferWriter.writeSlice(dataType.toBuffer()); - } - } - return bufferWriter.buffer; - } - fromDataBuffer(buffer, offset) { - const reader = new BufferReader(buffer, offset); - const dataLength = reader.readCompactSize(); - if (!this.data) { - this.data = {}; - } - for (var i = 0; i < dataLength; i++) { - const vdxfkey = (0, address_1.toBase58Check)(reader.readSlice(vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION); - const dataLength = reader.readCompactSize(); - const data = []; - for (var j = 0; j < dataLength; j++) { - const attestation = Attestation_1.AttestationDataType.getDataItem((0, address_1.toBase58Check)(reader.buffer.slice(reader.offset, reader.offset + vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION), null); - reader.offset = attestation.fromBuffer(reader.buffer, reader.offset); - data.push(attestation); - } - const categoryType = Object.entries(this.data).find(([key, value]) => value.vdxfid === vdxfkey); - this.data[categoryType[1].category].data = data; - } - return reader.offset; - } - toJson() { - return { - data: this.data, - }; - } -} -exports.PersonalProfileDataStore = PersonalProfileDataStore; diff --git a/dist/vdxf/classes/SignatureData.d.ts b/dist/vdxf/classes/SignatureData.d.ts new file mode 100644 index 0000000..b264ebc --- /dev/null +++ b/dist/vdxf/classes/SignatureData.d.ts @@ -0,0 +1,26 @@ +/// +/// +import { BigNumber } from '../../utils/types/BigNumber'; +import { SerializableEntity } from '../../utils/types/SerializableEntity'; +export declare class SignatureData implements SerializableEntity { + version: BigNumber; + systemID: string; + hashType: BigNumber; + signatureHash: Buffer; + identityID: string; + sigType: BigNumber; + vdxfKeys: Array; + vdxfKeyNames: Array; + boundHashes: Array; + signatureAsVch: Buffer; + static VERSION_INVALID: import("bn.js"); + static FIRST_VERSION: import("bn.js"); + static LAST_VERSION: import("bn.js"); + static DEFAULT_VERSION: import("bn.js"); + static TYPE_VERUSID_DEFAULT: import("bn.js"); + constructor(data?: any); + static fromJson(data: any): SignatureData; + getByteLength(): number; + toBuffer(): Buffer; + fromBuffer(buffer: Buffer, offset?: number): number; +} diff --git a/dist/vdxf/classes/SignatureData.js b/dist/vdxf/classes/SignatureData.js new file mode 100644 index 0000000..ef78a38 --- /dev/null +++ b/dist/vdxf/classes/SignatureData.js @@ -0,0 +1,121 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SignatureData = void 0; +const varint_1 = require("../../utils/varint"); +const varuint_1 = require("../../utils/varuint"); +const address_1 = require("../../utils/address"); +const bufferutils_1 = require("../../utils/bufferutils"); +const bn_js_1 = require("bn.js"); +const vdxf_1 = require("../../constants/vdxf"); +const DataDescriptor_1 = require("./DataDescriptor"); +const { BufferReader, BufferWriter } = bufferutils_1.default; +class SignatureData { + constructor(data) { + if (data) { + Object.assign(this, data); + } + } + static fromJson(data) { + const signatureData = new SignatureData(); + if (data) { + if (data.version) + signatureData.version = new bn_js_1.BN(data.version); + if (data.systemid) + signatureData.systemID = data.systemid; + if (data.hashtype) + signatureData.hashType = new bn_js_1.BN(data.hashtype); + if (signatureData.hashType == new bn_js_1.BN(DataDescriptor_1.EHashTypes.HASH_SHA256)) { + signatureData.signatureHash = Buffer.from(data.signaturehash, 'hex').reverse(); + } + else { + signatureData.signatureHash = Buffer.from(data.signaturehash, 'hex'); + } + if (data.identityid) + signatureData.identityID = data.identityid; + if (data.signaturetype) + signatureData.sigType = new bn_js_1.BN(data.signaturetype); + signatureData.vdxfKeys = data.vdxfkeys || []; + signatureData.vdxfKeyNames = data.vdxfkeynames || []; + signatureData.boundHashes = data.boundhashes || []; + signatureData.signatureAsVch = Buffer.from(data.signature, 'base64'); + } + return signatureData; + } + getByteLength() { + let byteLength = 0; + byteLength += varint_1.default.encodingLength(this.version); + byteLength += 20; // systemID uint160 + byteLength += varint_1.default.encodingLength(this.hashType); + byteLength += varuint_1.default.encodingLength(this.signatureHash.length); + byteLength += this.signatureHash.length; + byteLength += varint_1.default.encodingLength(this.sigType); + byteLength += 20; // identityID uint160 + byteLength += varuint_1.default.encodingLength(this.vdxfKeys.length); + byteLength += this.vdxfKeys.length * 20; + byteLength += varuint_1.default.encodingLength(this.vdxfKeyNames.length); + for (const keyName of this.vdxfKeyNames) { + byteLength += varuint_1.default.encodingLength(Buffer.from(keyName, 'utf8').length); + byteLength += Buffer.from(keyName, 'utf8').length; + } + byteLength += varuint_1.default.encodingLength(this.boundHashes.length); + byteLength += this.boundHashes.length * 32; + byteLength += varuint_1.default.encodingLength(this.signatureAsVch.length); + byteLength += this.signatureAsVch.length; + return byteLength; + } + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())); + bufferWriter.writeVarInt(this.version); + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.systemID).hash); + bufferWriter.writeVarInt(this.hashType); + bufferWriter.writeVarSlice(this.signatureHash); + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.identityID).hash); + bufferWriter.writeVarInt(this.sigType); + bufferWriter.writeCompactSize(this.vdxfKeys.length); + for (const key of this.vdxfKeys) { + bufferWriter.writeSlice((0, address_1.fromBase58Check)(key).hash); + } + bufferWriter.writeCompactSize(this.vdxfKeyNames.length); + for (const keyName of this.vdxfKeyNames) { + bufferWriter.writeVarSlice(Buffer.from(keyName, 'utf8')); + } + bufferWriter.writeCompactSize(this.boundHashes.length); + for (const boundHash of this.boundHashes) { + bufferWriter.writeSlice(boundHash); + } + bufferWriter.writeVarSlice(this.signatureAsVch); + return bufferWriter.buffer; + } + fromBuffer(buffer, offset = 0) { + const reader = new BufferReader(buffer, offset); + this.version = reader.readVarInt(); + this.systemID = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + this.hashType = reader.readVarInt(); + this.signatureHash = reader.readVarSlice(); + this.sigType = reader.readVarInt(); + this.identityID = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + const vdxfKeysLength = reader.readCompactSize(); + this.vdxfKeys = []; + for (let i = 0; i < vdxfKeysLength; i++) { + this.vdxfKeys.push((0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION)); + } + const vdxfKeyNamesLength = reader.readCompactSize(); + this.vdxfKeyNames = []; + for (let i = 0; i < vdxfKeyNamesLength; i++) { + this.vdxfKeyNames.push(reader.readVarSlice().toString('utf8')); + } + const boundHashesLength = reader.readCompactSize(); + this.boundHashes = []; + for (let i = 0; i < boundHashesLength; i++) { + this.boundHashes.push(reader.readSlice(32)); + } + this.signatureAsVch = reader.readVarSlice(); + return reader.offset; + } +} +exports.SignatureData = SignatureData; +SignatureData.VERSION_INVALID = new bn_js_1.BN(0); +SignatureData.FIRST_VERSION = new bn_js_1.BN(1); +SignatureData.LAST_VERSION = new bn_js_1.BN(1); +SignatureData.DEFAULT_VERSION = new bn_js_1.BN(1); +SignatureData.TYPE_VERUSID_DEFAULT = new bn_js_1.BN(1); diff --git a/dist/vdxf/classes/index.d.ts b/dist/vdxf/classes/index.d.ts index 2dbc453..cd0344a 100644 --- a/dist/vdxf/classes/index.d.ts +++ b/dist/vdxf/classes/index.d.ts @@ -23,7 +23,6 @@ export { ProvisioningResultInterface as LoginConsentProvisioningResultInterface export { Hash160 } from './Hash160'; export { RedirectUri, Subject, ProvisioningInfo, RequestedPermission, Audience, AltAuthFactor, } from "./Challenge"; export { Attestation } from './Attestation'; -export { AttestationData, AttestationDataType } from './Attestation'; export { ProvisioningTxid } from './provisioning/ProvisioningResult'; export { Context } from './Context'; -export { defaultPersonalProfileDataTemplate, DataCategory, PersonalProfileDataStore } from './PersonalProfile'; +export { defaultPersonalProfileDataTemplate, DataCategory } from './PersonalProfile'; diff --git a/dist/vdxf/classes/index.js b/dist/vdxf/classes/index.js index f09679d..440bc48 100644 --- a/dist/vdxf/classes/index.js +++ b/dist/vdxf/classes/index.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.PersonalProfileDataStore = exports.DataCategory = exports.defaultPersonalProfileDataTemplate = exports.Context = exports.ProvisioningTxid = exports.AttestationDataType = exports.AttestationData = exports.Attestation = exports.AltAuthFactor = exports.Audience = exports.RequestedPermission = exports.ProvisioningInfo = exports.Subject = exports.RedirectUri = exports.Hash160 = exports.LoginConsentProvisioningResult = exports.LoginConsentProvisioningDecision = exports.LoginConsentProvisioningResponse = exports.LoginConsentProvisioningChallenge = exports.LoginConsentProvisioningRequest = exports.VerusPayInvoice = exports.VerusPayInvoiceDetails = exports.SignedSessionObjectData = exports.SignedSessionObject = exports.LoginConsentResponse = exports.LoginConsentRequest = exports.LoginConsentDecision = exports.LoginConsentChallenge = void 0; +exports.DataCategory = exports.defaultPersonalProfileDataTemplate = exports.Context = exports.ProvisioningTxid = exports.Attestation = exports.AltAuthFactor = exports.Audience = exports.RequestedPermission = exports.ProvisioningInfo = exports.Subject = exports.RedirectUri = exports.Hash160 = exports.LoginConsentProvisioningResult = exports.LoginConsentProvisioningDecision = exports.LoginConsentProvisioningResponse = exports.LoginConsentProvisioningChallenge = exports.LoginConsentProvisioningRequest = exports.VerusPayInvoice = exports.VerusPayInvoiceDetails = exports.SignedSessionObjectData = exports.SignedSessionObject = exports.LoginConsentResponse = exports.LoginConsentRequest = exports.LoginConsentDecision = exports.LoginConsentChallenge = void 0; var Challenge_1 = require("./Challenge"); Object.defineProperty(exports, "LoginConsentChallenge", { enumerable: true, get: function () { return Challenge_1.Challenge; } }); var Decision_1 = require("./Decision"); @@ -38,9 +38,6 @@ Object.defineProperty(exports, "Audience", { enumerable: true, get: function () Object.defineProperty(exports, "AltAuthFactor", { enumerable: true, get: function () { return Challenge_2.AltAuthFactor; } }); var Attestation_1 = require("./Attestation"); Object.defineProperty(exports, "Attestation", { enumerable: true, get: function () { return Attestation_1.Attestation; } }); -var Attestation_2 = require("./Attestation"); -Object.defineProperty(exports, "AttestationData", { enumerable: true, get: function () { return Attestation_2.AttestationData; } }); -Object.defineProperty(exports, "AttestationDataType", { enumerable: true, get: function () { return Attestation_2.AttestationDataType; } }); var ProvisioningResult_2 = require("./provisioning/ProvisioningResult"); Object.defineProperty(exports, "ProvisioningTxid", { enumerable: true, get: function () { return ProvisioningResult_2.ProvisioningTxid; } }); var Context_1 = require("./Context"); @@ -48,4 +45,3 @@ Object.defineProperty(exports, "Context", { enumerable: true, get: function () { var PersonalProfile_1 = require("./PersonalProfile"); Object.defineProperty(exports, "defaultPersonalProfileDataTemplate", { enumerable: true, get: function () { return PersonalProfile_1.defaultPersonalProfileDataTemplate; } }); Object.defineProperty(exports, "DataCategory", { enumerable: true, get: function () { return PersonalProfile_1.DataCategory; } }); -Object.defineProperty(exports, "PersonalProfileDataStore", { enumerable: true, get: function () { return PersonalProfile_1.PersonalProfileDataStore; } }); diff --git a/dist/vdxf/keymap.d.ts b/dist/vdxf/keymap.d.ts index bcc3e15..8ede227 100644 --- a/dist/vdxf/keymap.d.ts +++ b/dist/vdxf/keymap.d.ts @@ -1,5 +1,4 @@ import * as keylist from './keys'; -import * as AttestationData from './classes/IdentityData'; export declare const keymap: { [key: string]: keylist.VDXFKeyInterface; }; @@ -9,6 +8,9 @@ export declare const attestationDataKeys: { export declare const IdentityVdxfidMap: { [x: string]: { name: string; - type: AttestationData.IdentityDataClassTypes; + type: keylist.VDXFKeyInterface; + } | { + name: string; + type: string; }; }; diff --git a/dist/vdxf/keys.d.ts b/dist/vdxf/keys.d.ts index 68f6298..feca605 100644 --- a/dist/vdxf/keys.d.ts +++ b/dist/vdxf/keys.d.ts @@ -48,9 +48,10 @@ export declare const LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED: VDXFK export declare const SIGNED_SESSION_OBJECT_DATA: VDXFKeyInterface; export declare const SIGNED_SESSION_OBJECT: VDXFKeyInterface; export declare const CURRENCY_ADDRESS: VDXFKeyInterface; -export declare const ATTESTATION_RECIPIENT: VDXFKeyInterface; -export declare const ATTESTATION_OBJECT: VDXFKeyInterface; +export declare const ATTESTATION_PROVISION_URL: VDXFKeyInterface; +export declare const ATTESTATION_PROVISION_TYPE: VDXFKeyInterface; +export declare const ATTESTATION_VIEW_REQUEST: VDXFKeyInterface; export declare const ATTESTATION_VIEW_RESPONSE: VDXFKeyInterface; -export declare const ATTESTATION_TYPE: VDXFKeyInterface; -export declare const DATA_TYPE_STRING: VDXFKeyInterface; +export declare const ATTESTATION_ID: VDXFKeyInterface; export declare const PROFILE_DATA_VIEW_REQUEST: VDXFKeyInterface; +export declare const DATA_TYPE_STRING: VDXFKeyInterface; diff --git a/dist/vdxf/keys.js b/dist/vdxf/keys.js index 1f4dfc0..efa89df 100644 --- a/dist/vdxf/keys.js +++ b/dist/vdxf/keys.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.PROFILE_DATA_VIEW_REQUEST = exports.DATA_TYPE_STRING = exports.ATTESTATION_TYPE = exports.ATTESTATION_VIEW_RESPONSE = exports.ATTESTATION_OBJECT = exports.ATTESTATION_RECIPIENT = exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.IDENTITY_AUTH_SIG_VDXF_KEY = exports.VERUSPAY_INVOICE_VDXF_KEY = void 0; +exports.DATA_TYPE_STRING = exports.PROFILE_DATA_VIEW_REQUEST = exports.ATTESTATION_ID = exports.ATTESTATION_VIEW_RESPONSE = exports.ATTESTATION_VIEW_REQUEST = exports.ATTESTATION_PROVISION_TYPE = exports.ATTESTATION_PROVISION_URL = exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.IDENTITY_AUTH_SIG_VDXF_KEY = exports.VERUSPAY_INVOICE_VDXF_KEY = void 0; exports.VERUSPAY_INVOICE_VDXF_KEY = { hash160result: "628efc28c2e2d40050e1a9de7a93e7ddf2aa0076", qualifiedname: { @@ -306,20 +306,30 @@ exports.CURRENCY_ADDRESS = { "name": "vrsc::currency.address" } }; -exports.ATTESTATION_RECIPIENT = { - "vdxfid": "iF9W7VBoeB1qooRBhZnbx1edN45oT6N3T1", - "hash160result": "fd9b77f956447beae6e9eba1de71d855fa800880", +exports.ATTESTATION_PROVISION_URL = { + "vdxfid": "iD9J9aQ6vsRYvqZbBs9QpKmCcgUynee7mT", + "indexid": "xHyQcNqBnBeDZ1Sd3YoZniHjeLVzgLK5ka", + "hash160result": "e1059d2a03500749f86ed9c49137b86de6430e6a", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::attestation.recipient" + "name": "vrsc::attestation.provision.url" } }; -exports.ATTESTATION_OBJECT = { - "vdxfid": "iKzefmmS3nMXjLTsrQ1emigirJBTK7rBTP", - "hash160result": "5d57536b22b79ea267ae71852779db21258834b5", +exports.ATTESTATION_PROVISION_TYPE = { + "vdxfid": "i7VGPAp3q2h4U4njZ556b9eG3Jts2gmzHn", + "indexid": "xCKNqyF8gLuj6EfmQkjFZYAo4xuswrB6X9", + "hash160result": "5f922c9d09e0160b7c3bc5f31588dfc11b5b042c", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::attestation.object" + "name": "vrsc::attestation.provision.type" + } +}; +exports.ATTESTATION_VIEW_REQUEST = { + "vdxfid": "i5R9p3V1sxZ9p1NDV7nPkz1wvmQTUvuByY", + "hash160result": "872923256c56f6bda8256c5bb6a4c98d85f44c15", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestation.view.request" } }; exports.ATTESTATION_VIEW_RESPONSE = { @@ -330,12 +340,21 @@ exports.ATTESTATION_VIEW_RESPONSE = { "name": "vrsc::attestation.view.response" } }; -exports.ATTESTATION_TYPE = { - "vdxfid": "iAJUD5mgT6MHz8ymF49XUtBDRS7uvYqNWZ", - "hash160result": "e56544849c038b7cfadb0a1074ac51df9207e24a", +exports.ATTESTATION_ID = { + "vdxfid": "i87ZC3B5EFiKtLW9fCUkw9yoMVmh2i2bZ3", + "hash160result": "f540229f88da9e3a9f40f99ce5a22afe765ce132", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestation.id" + } +}; +exports.PROFILE_DATA_VIEW_REQUEST = { + "vdxfid": "iEocxePWah2zp5Hn4ujeoQpc4UVYeJeQ2g", + "indexid": "xKdjRSpbS1FfSFAovbPomoM968WZVsmW1E", + "hash160result": "b1778ef367dbf00e7b9ad15eea2ef17490e6457c", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::attestation.type" + "name": "vrsc::profile.data.view.request" } }; // DATA TYPES @@ -347,12 +366,3 @@ exports.DATA_TYPE_STRING = { "name": "vrsc::data.type.string" }, }; -exports.PROFILE_DATA_VIEW_REQUEST = { - "vdxfid": "iFYznrRxyHaoJZ91cFDSYGT4szETf4RLRV", - "indexid": "xLP7Fes3pboTvj23TvsbWeybueFUatbQQh", - "hash160result": "d3f2168aad438c6c6eab8f3384458cbebf027a84", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::profile.data.view" - } -}; diff --git a/src/__tests__/attestation/attestation.test.ts b/src/__tests__/attestation/attestation.test.ts index e79319a..4bae86e 100644 --- a/src/__tests__/attestation/attestation.test.ts +++ b/src/__tests__/attestation/attestation.test.ts @@ -1,12 +1,110 @@ -import { ATTESTATION_READ_REQUEST, IDENTITY_VIEW, IDENTITYDATA_FIRSTNAME, LOGIN_CONSENT_REDIRECT_VDXF_KEY, VerusIDSignature, IDENTITYDATA_LASTNAME, IDENTITYDATA_ATTESTOR, IDENTITYDATA_IDENTITY, ATTESTATION_TYPE } from "../../vdxf"; +import { + LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY, + PROFILE_DATA_VIEW_REQUEST, + LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY, + ATTESTATION_READ_REQUEST, + IDENTITY_VIEW, + IDENTITYDATA_FIRSTNAME, + LOGIN_CONSENT_REDIRECT_VDXF_KEY, + VerusIDSignature, + IDENTITYDATA_LASTNAME, + IDENTITYDATA_ATTESTOR, + IDENTITYDATA_IDENTITY, + IDENTITYDATA_PERSONAL_DETAILS, + IDENTITYDATA_CONTACT, + IDENTITYDATA_LOCATIONS, + IDENTITYDATA_BANKING_INFORMATION, + IDENTITYDATA_DOCUMENTS_AND_IMAGES +} from "../../vdxf"; + import { Attestation, LoginConsentRequest } from "../../vdxf/classes"; import { RedirectUri, RequestedPermission } from "../../vdxf/classes/Challenge"; import { Context } from "../../vdxf/classes/Context"; -import { CPartialAttestationProof } from "../../vdxf/classes/Attestation"; -import { AttestationData, AttestationDataType } from "../../vdxf/classes/Attestation"; -import * as idkeys from "../../vdxf/identityDataKeys"; +import { Subject } from "../../vdxf/classes/Challenge"; + + describe('Serializes and deserializes attestation request', () => { + + test("request profile information", async () => { + + const profileInfoRequest = new LoginConsentRequest({ + system_id: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + signing_id: "iB5PRXMHLYcNtM8dfLB6KwfJrHU2mKDYuU", + signature: { + signature: + "AYG2IQABQSAN1fp6A9NIVbxvKuOVLLU+0I+G3oQGbRtS6u4Eampfb217Cdf5FCMScQhV9kMxtjI9GWzpchmjuiTB2tctk6qT", + }, + challenge: { + challenge_id: "iMqzCkWdebC19xbjkLfVdDkkGP9Ni1oxoN", + requested_access: [ + new RequestedPermission("", IDENTITY_VIEW.vdxfid), + new RequestedPermission("", PROFILE_DATA_VIEW_REQUEST.vdxfid), + new RequestedPermission("", LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY.vdxfid), + ], + redirect_uris: [], + subject: [new Subject( + IDENTITYDATA_PERSONAL_DETAILS.vdxfid, + PROFILE_DATA_VIEW_REQUEST.vdxfid + ), + new Subject( + IDENTITYDATA_CONTACT.vdxfid, + PROFILE_DATA_VIEW_REQUEST.vdxfid + ), + new Subject( + IDENTITYDATA_LOCATIONS.vdxfid, + PROFILE_DATA_VIEW_REQUEST.vdxfid + ), + new Subject( + IDENTITYDATA_BANKING_INFORMATION.vdxfid, + PROFILE_DATA_VIEW_REQUEST.vdxfid + ), + new Subject( + IDENTITYDATA_DOCUMENTS_AND_IMAGES.vdxfid, + PROFILE_DATA_VIEW_REQUEST.vdxfid + ), + new Subject( + "https://example.com/sendpersonaldata", + LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY.vdxfid + ), + ], + provisioning_info: [], + created_at: Number((Date.now() / 1000).toFixed(0)), + } + + }); + }); + + test("send attestation to a user", async () => { + const req = new LoginConsentRequest({ + system_id: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + signing_id: "iB5PRXMHLYcNtM8dfLB6KwfJrHU2mKDYuU", + signature: { + signature: + "AYG2IQABQSAN1fp6A9NIVbxvKuOVLLU+0I+G3oQGbRtS6u4Eampfb217Cdf5FCMScQhV9kMxtjI9GWzpchmjuiTB2tctk6qT", + }, + challenge: { + challenge_id: "iKNufKJdLX3Xg8qFru9AuLBvivAEJ88PW4", + requested_access: [new RequestedPermission("", IDENTITY_VIEW.vdxfid)], + session_id: "iRQZGW36o3RcVR1xyVT1qWdAKdxp3wUyrh", + redirect_uris: [ + new RedirectUri( + "https://www.verus.io", + LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY.vdxfid + ), + ], + created_at: 1664382484, + salt: "i6NawEzHMocZnU4h8pPkGpHApvsrHjxwXE", + context: new Context({ + ["i4KyLCxWZXeSkw15dF95CUKytEK3HU7em9"]: "test", + }), + }, + }); + + + }); + + test('attestation request with reply', async () => { const req = new LoginConsentRequest({ system_id: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", @@ -24,8 +122,7 @@ describe('Serializes and deserializes attestation request', () => { IDENTITYDATA_FIRSTNAME.vdxfid, IDENTITYDATA_LASTNAME.vdxfid, IDENTITYDATA_ATTESTOR.vdxfid, - IDENTITYDATA_IDENTITY.vdxfid, - ATTESTATION_TYPE.vdxfid] + IDENTITYDATA_IDENTITY.vdxfid] }, ATTESTATION_READ_REQUEST.vdxfid)], session_id: "iRQZGW36o3RcVR1xyVT1qWdAKdxp3wUyrh", redirect_uris: [ @@ -42,76 +139,27 @@ describe('Serializes and deserializes attestation request', () => { }, }); - const componentsMap = new Map(); - - componentsMap.set(0, new AttestationDataType("Chris", IDENTITYDATA_FIRSTNAME.vdxfid, "8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210")); - componentsMap.set(1, new AttestationDataType("Monkins", IDENTITYDATA_LASTNAME.vdxfid, "7c3920940db4385cd305557a57a8df33346712096e76b58d7c4ace05e17b90a2")); - componentsMap.set(2, new AttestationDataType("chad@", IDENTITYDATA_IDENTITY.vdxfid, "ce662d61a20ae211728cdb1b924628c84edfe0fcbd59a86f56a125ad73689ac1")); - componentsMap.set(3, new AttestationDataType("valu attestation@", IDENTITYDATA_ATTESTOR.vdxfid, "9067dc6a9b38dd15f985770bb819eb62de39a5d1f0e12f9a4807f78968794af4")); - componentsMap.set(4, new AttestationDataType("KYC Attestation v1", ATTESTATION_TYPE.vdxfid, "338b6ad44179f46fc24f3ed01fd247c9664384a71ba5465aebceece8d7c45a0a")); - - const signaturesForAttestation = new VerusIDSignature({ - signature: "AYG2IQABQSAN1fp6A9NIVbxvKuOVLLU+0I+G3oQGbRtS6u4Eampfb217Cdf5FCMScQhV9kMxtjI9GWzpchmjuiTB2tctk6qT", - }) - - const attestationResponse = new Attestation({ - data: new AttestationData(componentsMap), - signature: signaturesForAttestation, - system_id: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - signing_id: "iB5PRXMHLYcNtM8dfLB6KwfJrHU2mKDYuU" - }, - ); - - const proofResponseRoot = attestationResponse.rootHash(); - const proofOfItemZero = attestationResponse.getProof([0]); - const proofOfAll = attestationResponse.getProof([0, 1, 2, 3, 4]); - const rootOfItemZero = proofOfItemZero.checkProof(0); - - for (let i = 0; i < 5; i++) { - - const rootOfItem = proofOfAll.checkProof(i); - expect(rootOfItem.toString('hex')).toStrictEqual("8a91a7f15b24e9e75fc5b02ae2131b0b08a540ebb9e9e1a859132f9879366eb5"); - } - - expect(proofResponseRoot.toString('hex')).toStrictEqual("8a91a7f15b24e9e75fc5b02ae2131b0b08a540ebb9e9e1a859132f9879366eb5"); - expect(rootOfItemZero.toString('hex')).toStrictEqual("8a91a7f15b24e9e75fc5b02ae2131b0b08a540ebb9e9e1a859132f9879366eb5"); - - // check attestation serializes and deserializes correctly - - const attestationFromBuffer = new Attestation(); - - const attestationResponseBuffer = attestationResponse.toBuffer(); - attestationFromBuffer.fromBuffer(attestationResponseBuffer); + // TODO + // const componentsMap = new Map(); - const proofResponseRootFromBuffer = attestationResponse.rootHash(); - expect(proofResponseRootFromBuffer.toString('hex')).toStrictEqual("8a91a7f15b24e9e75fc5b02ae2131b0b08a540ebb9e9e1a859132f9879366eb5"); + // componentsMap.set(0, new AttestationDataType("Chris", IDENTITYDATA_FIRSTNAME.vdxfid, "8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210")); + // componentsMap.set(1, new AttestationDataType("Monkins", IDENTITYDATA_LASTNAME.vdxfid, "7c3920940db4385cd305557a57a8df33346712096e76b58d7c4ace05e17b90a2")); + // componentsMap.set(2, new AttestationDataType("chad@", IDENTITYDATA_IDENTITY.vdxfid, "ce662d61a20ae211728cdb1b924628c84edfe0fcbd59a86f56a125ad73689ac1")); + // componentsMap.set(3, new AttestationDataType("valu attestation@", IDENTITYDATA_ATTESTOR.vdxfid, "9067dc6a9b38dd15f985770bb819eb62de39a5d1f0e12f9a4807f78968794af4")); - //check the partialproofs serialize and desserialize - const proofItemZeroBuffer = proofOfItemZero.toBuffer(); + // const signaturesForAttestation = new VerusIDSignature({ + // signature: "AYG2IQABQSAN1fp6A9NIVbxvKuOVLLU+0I+G3oQGbRtS6u4Eampfb217Cdf5FCMScQhV9kMxtjI9GWzpchmjuiTB2tctk6qT", + // }) - const proofItemZeroFromBuffer = new CPartialAttestationProof(); + // const attestationResponse = new Attestation({ + // data: new AttestationData(componentsMap), + // signature: signaturesForAttestation, + // system_id: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + // signing_id: "iB5PRXMHLYcNtM8dfLB6KwfJrHU2mKDYuU" + // }, + // ); - proofItemZeroFromBuffer.fromBuffer(proofItemZeroBuffer); - - const rootOfItemZerofromBuffer = proofOfItemZero.checkProof(0); - - expect(rootOfItemZerofromBuffer.toString('hex')).toStrictEqual("8a91a7f15b24e9e75fc5b02ae2131b0b08a540ebb9e9e1a859132f9879366eb5"); }); - test('no duplicate keys', async () => { - - const keys = Object.keys(idkeys); - - let keyset = {} - - for( const key of keys){ - if (keyset[idkeys[key].vdxfid]){ - console.log("duplicate key", idkeys[key].vdxfid) - } - keyset[idkeys[key].vdxfid] = true; - } - - - }); }); diff --git a/src/__tests__/attestation/personalInfo.test.ts b/src/__tests__/attestation/personalInfo.test.ts index 2ad66e2..23ae677 100644 --- a/src/__tests__/attestation/personalInfo.test.ts +++ b/src/__tests__/attestation/personalInfo.test.ts @@ -1,17 +1,10 @@ -import * as identitykeys from "../../vdxf"; -import { BigNumber } from '../../utils/types/BigNumber'; -import { BN } from 'bn.js'; -import {AttestationDataType } from "../../vdxf/classes/Attestation"; -import { PersonalProfileDataStore, DataCategory } from "../../vdxf/classes/PersonalProfile"; import { DataDescriptor } from "../../vdxf/classes/DataDescriptor"; -import { VectorEncodeVDXFUni, MMRDescriptor } from "../../vdxf/classes/DataDescriptor"; +import { MMRDescriptor } from "../../vdxf/classes/DataDescriptor"; import { SignatureData } from "../../vdxf/classes/SignatureData"; describe('Create a personal info request', () => { test('serialize datadescriptor with nested datadescriptor', async () => { - const profileData = new PersonalProfileDataStore(); - const personalDataCategory = DataDescriptor.fromJson({ version: 1, "flags": 2, @@ -29,32 +22,10 @@ describe('Create a personal info request', () => { "salt": "4f66603f256d3f757b6dc3ea44802d4041d2a1901e06005028fd60b85a5878a2" }); - const testserali = personalDataCategory.toBuffer(); - //profileData.data.personal = personalDataCategory; - - // const contractDataCategory = profileData.data.contact; - - // contractDataCategory.data = [ - // AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_EMAIL.vdxfid, "abc@def.com"), - // AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_PHONENUMBER.vdxfid, "123-456-7890") - // ]; - - // const LocationDataCategory = profileData.data.locations; + const testserali = personalDataCategory.toBuffer().toString('hex'); - // LocationDataCategory.data = [ - // AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1.vdxfid, "123 Main St"), - // AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2.vdxfid, "Cobham"), - // AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_HOMEADDRESS_CITY.vdxfid, "Anytown"), - // AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_HOMEADDRESS_REGION.vdxfid, "AnyState"), - // AttestationDataType.getDataItem(identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE.vdxfid, "12345") - // ]; + expect(testserali).toStrictEqual("01024b08a2ebb2c55f83a8e2a426a53320ed4d42124f4d01350160044a6f686e2269344771736f7448476134637a436474673264384656484b664a467a56794250724d0a746578742f706c61696e204f66603f256d3f757b6dc3ea44802d4041d2a1901e06005028fd60b85a5878a2"); - // const personalDataBuffer = profileData.toDataBuffer(); - - // const personalData2 = new PersonalProfileDataStore(); - // personalData2.fromDataBuffer(personalDataBuffer); - - // expect(personalData2.toBuffer().toString('hex')).toEqual(profileData.toBuffer().toString('hex')); }); test('serialize mmrdescriptor', async () => { @@ -110,7 +81,9 @@ describe('Create a personal info request', () => { } const mmrdescriptorBuffer = MMRDescriptor.fromJson(mmrdescriptor); - const mmrbuffer = mmrdescriptorBuffer.toBuffer(); + const mmrbuffer = mmrdescriptorBuffer.toBuffer().toString('hex'); + expect(mmrbuffer).toStrictEqual("01050101002030395e0868b1953477e14bb5c16349622239a94115a4d1f02b72b6ecf8b1c79c01005741d826d3c6cbbc3a96992670d2f604e959fd1a8c014102f1eac8f180bee7fb256b801b219e20612fbc9f5e99da111a8364d1197ff3e3fbef8259770f618dacee9489e8cd2cd5dd77d36ede6c42cebdabd85a5b5e8af60b0201024c08a2ebb2c55f83a8e2a426a53320ed4d42124f4d013601600543687269732269344771736f7448476134637a436474673264384656484b664a467a56794250724d0a746578742f706c61696e204f66603f256d3f757b6dc3ea44802d4041d2a1901e06005028fd60b85a5878a201024e08a2ebb2c55f83a8e2a426a53320ed4d42124f4d01380160074d6f6e6b696e73226948796254724e42316b5852726a7343744a5864366676424b786570714d7053355a0a746578742f706c61696e2062fae0c46b2ad1177749e25fd6d48ccb40213d3cc72e4b2b0dc533039cbe8314"); + }); test('serialize mmrdescriptor', async () => { @@ -166,7 +139,9 @@ describe('Create a personal info request', () => { } const mmrdescriptorBuffer = MMRDescriptor.fromJson(mmrdescriptor); - const mmrbuffer = mmrdescriptorBuffer.toBuffer(); + const mmrbuffer = mmrdescriptorBuffer.toBuffer().toString('hex'); + expect(mmrbuffer).toStrictEqual("01050101002030395e0868b1953477e14bb5c16349622239a94115a4d1f02b72b6ecf8b1c79c01005741d826d3c6cbbc3a96992670d2f604e959fd1a8c014102f1eac8f180bee7fb256b801b219e20612fbc9f5e99da111a8364d1197ff3e3fbef8259770f618dacee9489e8cd2cd5dd77d36ede6c42cebdabd85a5b5e8af60b0201024c08a2ebb2c55f83a8e2a426a53320ed4d42124f4d013601600543687269732269344771736f7448476134637a436474673264384656484b664a467a56794250724d0a746578742f706c61696e204f66603f256d3f757b6dc3ea44802d4041d2a1901e06005028fd60b85a5878a201024e08a2ebb2c55f83a8e2a426a53320ed4d42124f4d01380160074d6f6e6b696e73226948796254724e42316b5852726a7343744a5864366676424b786570714d7053355a0a746578742f706c61696e2062fae0c46b2ad1177749e25fd6d48ccb40213d3cc72e4b2b0dc533039cbe8314"); + }); test('serialize mmrdescriptor', async () => { @@ -203,7 +178,9 @@ describe('Create a personal info request', () => { } const mmrdescriptorBuffer = MMRDescriptor.fromJson(encryptedmmrdescriptor); - const mmrbuffer = mmrdescriptorBuffer.toBuffer(); + const mmrbuffer = mmrdescriptorBuffer.toBuffer().toString('hex'); + expect(mmrbuffer).toStrictEqual("010501010549dec21b940a475989ac9220081ec3816a0026921594462841d2155a3d8462bdd8ada9f02cb7b795a01b842dce0a3c5bfe83e57fd46f34b19a67ee716a1e771264db1b7831cd2341a51520bdea4d6f2a88a954bed38de4ed6e7f6ff7d483fc799f1428be2ccfe6f27c87c90105808ad904b879fc67d7f0ceee8accd593549af8225d03772153465c666bb552eff607883d3d07f154a5515e167d9952feb7e3c121033e18ae855cdad782bc7ccbeb8e4737e9fdfcad31dc066695014e8aec572d4de728b8a1dedd740891ee848f85cc5eb16959761d89feafd78ac1e93494d08ea50311fa424c436bdb24b47ff369207939e04d89b5713ad3a809ba4cedb4b320df8f380a8b5999e24ce4465fe43b18020105960e953a1bb2c81f2c101d9439736e9f614e1c289621dedfd4a0ff8455a36473c8023f4c8a35bdc546e8e48e17030cb7bc418ef248705f0873f3a1ce5674b800030294cace9b26d8d5cf06ac5a7a379be8c2a1d3e6643249312cfa83fbfe9f882a8f5cde0ddb4b940a53e5d4e69bacffa571b6e8eca218ee9d02b751c71426e8433aeabe6cf79e54495510626b5c43c690c47ca877083520c7f2304a170a54dbb97951a93f7444cf689d487e46172f2f5e54923aefe8865e01059805615e1c62f2a0b5311ec1d4e78d7709f3e29ac52e98a87c4222796ee532f457d0f68a4759464d0d7ea72c90177752d7ee179cfcb25d42ff4d19755650443c1f26490d80db903d28423fb38bd32f19f855f50e52b1e53529da16da8755cfc9857a4a4af1bc4327caa691633a79ef718bcf4547abf5d4cc1f26f5f6919711fc99f6de8e351726d828b534aa090bdcdc5987b117fe0c0b2e0620cf066d1ca66ea90a7a3de353e4a7db6fd4f88c7ae2eb47bcef9a78a0c8be6010"); + }); test('serialize signaturedata', async () => { @@ -219,7 +196,23 @@ describe('Create a personal info request', () => { } const mmrdescriptorBuffer = SignatureData.fromJson(signaturedata); - const mmrbuffer = mmrdescriptorBuffer.toBuffer(); + const mmrbuffer = mmrdescriptorBuffer.toBuffer().toString('hex'); + expect(mmrbuffer).toStrictEqual("01a6ef9ea235635e328124ff3429db9f9e91b64e2d0120dfd3e3d82783360dfc675a09e6a226fd43119ef4e8d7cf553af96ea5883b51dab26820ee0c9b1276aac834cf457026a575dfce8401000000490205ce0a000001411f0a24ae90af6d838e9c60ea479b1cca8cdaae583c8d73c1f9f3eb8b48e626aa551c354c5607c8f79f34f544729e246ca0740c2b523e6267f03d1f7faa615f47f6"); + + }); + + test('deserialize mmrhashes', async () => { + + const mmrhashes = DataDescriptor.fromJson({ + "version": 1, + "flags": 0, + "objectdata": "41d826d3c6cbbc3a96992670d2f604e959fd1a8c014102c78ee8fa7c01db81cbf60181fc9baa101aa8c07d40c324d771145699168d3b18867a587f139173cf8b961d581fe15bbf15f5d02813a615e54c050d2b6b1cd4ee" + }) + const hashes = mmrhashes.DecodeHashVector(); + expect(typeof hashes).toStrictEqual('object') + expect(hashes.length).toStrictEqual(2); + expect(hashes[0].toString('hex')).toStrictEqual("c78ee8fa7c01db81cbf60181fc9baa101aa8c07d40c324d771145699168d3b18"); + }); }); diff --git a/src/vdxf/classes/Attestation.ts b/src/vdxf/classes/Attestation.ts index b5adf76..f541816 100644 --- a/src/vdxf/classes/Attestation.ts +++ b/src/vdxf/classes/Attestation.ts @@ -1,604 +1,112 @@ -import varuint from '../../utils/varuint' import bufferutils from '../../utils/bufferutils' -import createHash = require("create-hash"); -import { fromBase58Check, toBase58Check } from '../../utils/address'; -import { I_ADDR_VERSION, HASH160_BYTE_LENGTH } from '../../constants/vdxf'; -import { VDXFObject, VerusIDSignature } from "../"; -import { CMerkleMountainRange, CMMRNode, CMerkleMountainView, CMMRProof } from "./MMR" -import { ATTESTATION_OBJECT, ATTESTATION_VIEW_RESPONSE } from '../keys'; -import { Hash160 } from "./Hash160"; -import { Utf8DataVdxfObject, HexDataVdxfObject, BufferDataVdxfObject, PNGImageVdxfObject } from '..'; -import { IdentityDataClassTypes, IdentityVdxfidMap } from './IdentityData'; +import { toBase58Check, fromBase58Check } from '../../utils/address'; +import { I_ADDR_VERSION } from '../../constants/vdxf'; +import { DataDescriptor, VDXF_Data } from './DataDescriptor'; +import { ATTESTATION_VIEW_REQUEST, ATTESTATION_PROVISION_TYPE } from '../'; +import varuint from '../../utils/varuint'; const { BufferReader, BufferWriter } = bufferutils; -export class AttestationDataType { +export interface AttestationRequestInterface { + attestationId: string, + accepted_attestors: Array, + attestation_keys: Array, + attestor_filters?: Array} - dataItem: Utf8DataVdxfObject | HexDataVdxfObject | BufferDataVdxfObject | PNGImageVdxfObject | VDXFObject; - salt: Buffer = Buffer.alloc(0); +export class Attestation extends VDXF_Data { - constructor(data?: any, vdxfkey?: string, salt?: string) { - - this.dataItem = AttestationDataType.getDataItem(vdxfkey, data); - - if (salt) { - this.salt = Buffer.from(salt, "hex"); - } - } - - static getDataItem(vdxfkey, data): any { - switch (vdxfkey && IdentityVdxfidMap[vdxfkey]?.type) { - case IdentityDataClassTypes.BUFFER_DATA_STRING: - return new Utf8DataVdxfObject(data, vdxfkey); - case IdentityDataClassTypes.BUFFER_DATA_BYTES: - return new HexDataVdxfObject(data, vdxfkey); - case IdentityDataClassTypes.BUFFER_DATA_BASE64: - return new BufferDataVdxfObject(data, vdxfkey, "base64"); - case IdentityDataClassTypes.URL: - return new BufferDataVdxfObject(data, vdxfkey, "utf8"); - case IdentityDataClassTypes.PNG_IMAGE: - return new PNGImageVdxfObject(data, vdxfkey); - case IdentityDataClassTypes.KEY_ONLY: - return new VDXFObject(vdxfkey); - case IdentityDataClassTypes.BOOLEAN: - return new HexDataVdxfObject(data, vdxfkey); - case undefined: - default: - return new HexDataVdxfObject(data, vdxfkey); - } - } - - dataByteLength(): number { - - let length = 0; - - length += this.dataItem.byteLength(); - length += varuint.encodingLength(this.salt.length); - length += this.salt.length; - - return length; - } - - toBuffer(): Buffer { - - const buffer = Buffer.alloc(this.dataByteLength()); - const writer = new bufferutils.BufferWriter(buffer); - writer.writeSlice(this.dataItem.toBuffer()); - writer.writeVarSlice(this.salt); - - return writer.buffer; - } - - fromDataBuffer(buffer: Buffer, offset = 0, vdxfkey?: string): number { - - const reader = new bufferutils.BufferReader(buffer, offset); - reader.offset = this.dataItem.fromBuffer(reader.buffer, reader.offset, vdxfkey); - this.salt = reader.readVarSlice(); - - return reader.offset; - } -} - -export const friendlyNames = (vdfxkey) => { - - if (vdfxkey in IdentityVdxfidMap) { - - return IdentityVdxfidMap[vdfxkey].name; - - } else { - throw new Error("Unknown VDXF key"); - } -} - -export class AttestationData { - - components: Map; - constructor(components: Map = new Map()) { - this.components = components; - } - - dataByteLength(): number { - let byteLength = 0; - byteLength += varuint.encodingLength(this.components.size) - - for (const [key, item] of this.components) { - byteLength += varuint.encodingLength(key); - byteLength += item.dataByteLength(); - } - - return byteLength; - } - - toDataBuffer(): Buffer { - const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); - - bufferWriter.writeCompactSize(this.components.size); - - for (const [key, item] of this.components) { - bufferWriter.writeCompactSize(key); - bufferWriter.writeSlice(item.toBuffer()); - } - - return bufferWriter.buffer; - } - - fromDataBuffer(buffer: Buffer, offset?: number): number { - - const reader = new bufferutils.BufferReader(buffer, offset); - const componentsLength = reader.readCompactSize(); - this.components = new Map(); - - for (var i = 0; i < componentsLength; i++) { - const key = reader.readCompactSize(); - const vdxfid = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); - const attestationData = new AttestationDataType(null, vdxfid); - reader.offset = attestationData.fromDataBuffer(reader.buffer, reader.offset, vdxfid); + setAttestationViewRequestData(attestationId: string, accepted_attestors: Array, attestation_keys: Array, attestor_filters: Array) { + + this.vdxfkey = ATTESTATION_VIEW_REQUEST.vdxfid; - this.components.set(key, attestationData); - } + let length = 20; // attestationId + length += varuint.encodingLength(accepted_attestors.length); + length += accepted_attestors.length * 20; // accepted_attestors + length += varuint.encodingLength(attestation_keys.length); + length += attestation_keys.length * 20; // attestation_keys + length += varuint.encodingLength(attestor_filters.length); + length += attestor_filters.length * 20; // attestor_filters - return reader.offset; - } + let writer = new BufferWriter(Buffer.alloc(length)); - size(): number { - return this.components.size; - } + writer.writeSlice(fromBase58Check(attestationId).hash); - setDataFromJson(data: Array, getSalt: Function) { + writer.writeCompactSize(accepted_attestors.length); - if (!this.components) { - this.components = new Map(); + for (let i = 0; i < accepted_attestors.length; i++) { + writer.writeSlice(fromBase58Check(accepted_attestors[i]).hash); } - for (let i = 0; i < data.length; i++) { - - const item = data[i]; - - if (!(item.salt instanceof Buffer) || item.salt.length !== 32) { - if (typeof getSalt === "function") { - item.salt = getSalt(); - } else { - throw new Error("Salt is required to be a 32 random byte Buffer"); - } - } - - try { - fromBase58Check(item.dataItem.vdxfkey) - } catch (e) { - throw new Error("Attestation Key is required to be base58 format"); - } + writer.writeCompactSize(attestation_keys.length); - this.components.set(i, item); + for (let i = 0; i < attestation_keys.length; i++) { + writer.writeSlice(fromBase58Check(attestation_keys[i]).hash); } - } - - getHash(key): Buffer { - - let value: Buffer; - - value = this.components.get(key).toBuffer(); - - return createHash("sha256").update(value).digest(); - } - -} - -export interface AttestationRequestInterfaceDataInterface { - accepted_attestors: Array, - attestation_keys: Array, - attestor_filters?: Array -} -export class AttestationRequest extends VDXFObject { - data: AttestationRequestInterfaceDataInterface; - - dataByteLength(): number { - - let length = 0; - length += varuint.encodingLength(this.data.accepted_attestors?.length ?? 0); - length += this.data.accepted_attestors?.reduce((sum, current: Hash160) => sum + current.byteLength(), 0) ?? 0; - length += varuint.encodingLength(this.data.attestation_keys?.length ?? 0); - length += this.data.attestation_keys?.reduce((sum, current: Hash160) => sum + current.byteLength(), 0) ?? 0; - length += varuint.encodingLength(this.data.attestor_filters?.length ?? 0); - length += this.data.attestor_filters?.reduce((sum, current: Hash160) => sum + current.byteLength(), 0) ?? 0; + writer.writeCompactSize(attestor_filters.length); - return length; + for (let i = 0; i < attestor_filters.length; i++) { + writer.writeSlice(fromBase58Check(attestor_filters[i]).hash); + } } - toDataBuffer(): Buffer { + getAttestationViewRequestData(): AttestationRequestInterface { - const writer = new bufferutils.BufferWriter(Buffer.alloc(this.dataByteLength())) - - writer.writeArray(this.data.accepted_attestors.map((x: Hash160) => x.toBuffer())); - writer.writeArray(this.data.attestation_keys.map((x: Hash160) => x.toBuffer())); - writer.writeArray(this.data.attestor_filters.map((x: Hash160) => x.toBuffer())); - - return writer.buffer; - } - - fromDataBuffer(buffer: Buffer, offset?: number): number { - - const reader = new bufferutils.BufferReader(buffer, offset); - reader.readVarInt(); //skip data length - - function readHash160Array(arr: (Hash160 | string)[]): void { - const length = reader.readVarInt(); - for (let i = 0; i < length.toNumber(); i++) { - const member = new Hash160(); - reader.offset = member.fromBuffer(reader.buffer, false, reader.offset); - arr.push(member); - } - if (length.toNumber() === 0) arr = []; + if (this.vdxfkey != ATTESTATION_VIEW_REQUEST.vdxfid) { + throw new Error("Invalid attestation request type"); } - readHash160Array(this.data.accepted_attestors); - readHash160Array(this.data.attestation_keys); - readHash160Array(this.data.attestor_filters); - return reader.offset; - } - - static initializeData(data: string | AttestationRequestInterfaceDataInterface) { - var retData; - if (typeof data === 'object') { - retData = { - accepted_attestors: (data.accepted_attestors || []).map((x) => typeof x === 'string' ? Hash160.fromAddress(x) : x), - attestation_keys: (data.attestation_keys || []).map((x) => typeof x === 'string' ? Hash160.fromAddress(x) : x), - attestor_filters: (data.attestor_filters || []).map((x) => typeof x === 'string' ? Hash160.fromAddress(x) : x) - } - } - else { - retData = { - accepted_attestors: [], - attestation_keys: [], - attestor_filters: [] - } - } - return retData; - } - - toJson() { - const { accepted_attestors, attestation_keys, attestor_filters } = this.data; - return { - vdxfkey: this.vdxfkey, - data: { - accepted_attestors: accepted_attestors?.map((x: Hash160) => x.toAddress()) || [], - attestation_keys: attestation_keys?.map((x: Hash160) => x.toAddress()) || [], - attestor_filters: attestor_filters?.map((x: Hash160) => x.toAddress()) || [] - } + let retVal: AttestationRequestInterface = { + attestationId: "", + accepted_attestors: [], + attestation_keys: [], + attestor_filters: [] }; - } - -} - -export class Attestation extends VDXFObject { - - static TYPE_STRING = 1; - static TYPE_BYTES = 2; - static TYPE_BASE64 = 3; - static TYPE_URL = 4; - - data: AttestationData; - system_id: string; - signing_id: string; - signature?: VerusIDSignature; - mmr: CMerkleMountainRange; - - constructor(data?: { - data?: AttestationData; - signature?: VerusIDSignature; - mmr?: CMerkleMountainRange; - system_id: string, - signing_id: string, - }, vdxfkey: string = ATTESTATION_OBJECT.vdxfid) { - super(vdxfkey); - - if (data) { - this.data = data.data; - this.signature = data.signature - this.mmr = data.mmr; - this.system_id = data.system_id; - this.signing_id = data.signing_id; - } - - } - - dataByteLength(): number { - - let byteLength = 0; - byteLength += this.data.dataByteLength(); + const reader = new BufferReader(Buffer.from(this.data, 'hex'), 0); - const _system_id = Hash160.fromAddress(this.system_id); - const _signing_id = Hash160.fromAddress(this.signing_id); - const _signature = this.signature - ? this.signature - : new VerusIDSignature( - { signature: "" }, - ); + retVal.attestationId = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); - byteLength += _system_id.byteLength(); - byteLength += _signing_id.byteLength(); - byteLength += _signature.byteLength(); + let attestorCount = reader.readCompactSize(); - if (this.mmr) { - byteLength += this.mmr.getbyteLength(); - - } else { - byteLength += varuint.encodingLength(0); + for (let i = 0; i < attestorCount; i++) { + retVal.accepted_attestors.push(toBase58Check(reader.readSlice(20), I_ADDR_VERSION)); } - return byteLength; - } - - toDataBuffer(): Buffer { - const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); - - bufferWriter.writeSlice(this.data.toDataBuffer()); - - const _system_id = Hash160.fromAddress(this.system_id); - const _signing_id = Hash160.fromAddress(this.signing_id); - const _signature = this.signature - ? this.signature - : new VerusIDSignature( - { signature: "" }, - ); - bufferWriter.writeSlice(_system_id.toBuffer()); - bufferWriter.writeSlice(_signing_id.toBuffer()); - bufferWriter.writeSlice(_signature.toBuffer()); + let attestationKeyCount = reader.readCompactSize(); - if (this.mmr) { - - bufferWriter.writeVarSlice(this.mmr.toBuffer()); - - } else { - bufferWriter.writeCompactSize(0); + for (let i = 0; i < attestationKeyCount; i++) { + retVal.attestation_keys.push(toBase58Check(reader.readSlice(20), I_ADDR_VERSION)); } - return bufferWriter.buffer - } - - fromDataBuffer(buffer: Buffer, offset?: number): number { - - const reader = new bufferutils.BufferReader(buffer, offset); - const attestationsByteLength = reader.readCompactSize(); //dummy read + let attestorFilterCount = reader.readCompactSize(); - if (!this.data) { - this.data = new AttestationData(); + for (let i = 0; i < attestorFilterCount; i++) { + retVal.attestor_filters.push(toBase58Check(reader.readSlice(20), I_ADDR_VERSION)); } - reader.offset = this.data.fromDataBuffer(reader.buffer, reader.offset); + return retVal; - this.system_id = toBase58Check( - reader.readSlice(HASH160_BYTE_LENGTH), - I_ADDR_VERSION - ); - - this.signing_id = toBase58Check( - reader.readSlice(HASH160_BYTE_LENGTH), - I_ADDR_VERSION - ); - - const _sig = new VerusIDSignature(); - reader.offset = _sig.fromBuffer(reader.buffer, reader.offset); - this.signature = _sig; - - const leafLength = reader.readCompactSize(); - - if (leafLength > 0) { - const referenceTreeLength = reader.readCompactSize(); - const nodes = {}; - - for (var i = 0; i < referenceTreeLength; i++) { - - const nodeIndex = reader.readCompactSize(); - const signature = reader.readVarSlice(); - nodes[nodeIndex] = signature; - } - - if (Object.keys(nodes).length > 0) { - this.mmr = new CMerkleMountainRange().fromBuffer(reader.buffer); - } - } - - return reader.offset; } - createMMR() { + getAttestationProvisioningData() { - if (!this.mmr) { - this.mmr = new CMerkleMountainRange(); - } else { - return this.mmr; + if (this.vdxfkey != ATTESTATION_PROVISION_TYPE.vdxfid) { + throw new Error("Invalid attestation request type"); } - for (const [key, item] of this.data.components) { + const reader = new BufferReader(Buffer.from(this.data, 'hex'), 0); - this.mmr.add(new CMMRNode(this.getHash(key))) + let dataDescriptorItemsCount = reader.readCompactSize(); - } + let dataDescriptors = []; - return this.mmr; - } - - rootHash() { - - if (!this.mmr) { - this.createMMR(); + for (let i = 0; i < dataDescriptorItemsCount; i++) { + let dataDescriptor = new DataDescriptor(); + reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); + dataDescriptors.push(dataDescriptor); } - const view = new CMerkleMountainView(this.mmr) - - return view.GetRoot(); - } - - // returns an attestation with a sparse MMR containing the leaves specified - getProof(keys: Array): CPartialAttestationProof { - - const view = new CMerkleMountainView(this.mmr); - const attestationItems = new AttestationData() - const localCMMR = new CMMRProof(); - - keys.forEach((key, index) => { - view.GetProof(localCMMR, key); - attestationItems.components.set(key, this.data.components.get(key)); - }); - - const attestationAndProof = new CPartialAttestationProof({ - proof: localCMMR, - componentsArray: attestationItems, - system_id: this.system_id, - signing_id: this.signing_id,}); - - return attestationAndProof; + return dataDescriptors; } - async checkProof() { - - try { - - for (const [key, item] of this.data.components) { - - const hash = this.getHash(key); - const proof = null//await this.mmr.getProof([key], null); - - if (hash !== proof) { - throw new Error("Attestation not found in MMR"); - } - } - } catch (e) { - throw new Error("Error checking MMR"); - } - } - - getHash(key): Buffer { - - let returnBuffer: Buffer; - - returnBuffer = this.data.components.get(key).toBuffer(); - - return createHash("sha256").update(returnBuffer).digest(); - } - -} - -export class CPartialAttestationProof extends VDXFObject { - - private EType = { - TYPE_INVALID: 0, - TYPE_ATTESTATION: 1, - TYPE_LAST: 1 - } - - type: number; // this may represent differnt types of attestations - proof: CMMRProof; // proof of the attestation in the MMR - componentsArray: AttestationData; - system_id: string; - signing_id: string; - signature?: VerusIDSignature; - - constructor(data?: { - proof?: CMMRProof; - componentsArray?: AttestationData; - system_id: string, - signing_id: string, - }, vdxfkey: string = ATTESTATION_VIEW_RESPONSE.vdxfid) { - super(vdxfkey); - this.type = this.EType.TYPE_ATTESTATION; - if (data) { - this.proof = data.proof || new CMMRProof(); - this.componentsArray = data.componentsArray || new AttestationData(); - this.system_id = data.system_id; - this.signing_id = data.signing_id; - } - } - - dataByteLength(): number { - - let byteLength = 0; - - byteLength += varuint.encodingLength(this.type); - byteLength += this.proof.dataByteLength(); - byteLength += this.componentsArray.dataByteLength(); - - const _system_id = Hash160.fromAddress(this.system_id); - const _signing_id = Hash160.fromAddress(this.signing_id); - const _signature = this.signature - ? this.signature - : new VerusIDSignature( - { signature: "" }, - ); - - byteLength += _system_id.byteLength(); - byteLength += _signing_id.byteLength(); - byteLength += _signature.byteLength(); - - return byteLength; - - } - - toDataBuffer(): Buffer { - const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); - - bufferWriter.writeCompactSize(this.type); - bufferWriter.writeSlice(this.proof.toBuffer()); - bufferWriter.writeSlice(this.componentsArray.toDataBuffer()); - - const _system_id = Hash160.fromAddress(this.system_id); - const _signing_id = Hash160.fromAddress(this.signing_id); - const _signature = this.signature - ? this.signature - : new VerusIDSignature( - { signature: "" }, - ); - - bufferWriter.writeSlice(_system_id.toBuffer()); - bufferWriter.writeSlice(_signing_id.toBuffer()); - bufferWriter.writeSlice(_signature.toBuffer()); - - return bufferWriter.buffer; - } - - fromDataBuffer(buffer: Buffer, offset?: number): number { - - const reader = new bufferutils.BufferReader(buffer, offset); - const lengthOfBuffer = reader.readCompactSize(); //dummy read - this.type = reader.readCompactSize(); - - this.proof = new CMMRProof(); - reader.offset = this.proof.fromDataBuffer(reader.buffer, reader.offset); - - this.componentsArray = new AttestationData(); - reader.offset =this.componentsArray.fromDataBuffer(reader.buffer, reader.offset); - - this.system_id = toBase58Check( - reader.readSlice(HASH160_BYTE_LENGTH), - I_ADDR_VERSION - ); - - this.signing_id = toBase58Check( - reader.readSlice(HASH160_BYTE_LENGTH), - I_ADDR_VERSION - ); - - const _sig = new VerusIDSignature(); - reader.offset = _sig.fromBuffer(reader.buffer, reader.offset); - this.signature = _sig; - - return reader.offset; - } - - checkProof(item: number): Buffer { - - const dataHash = this.componentsArray.getHash(item) - let currentIndex = 0; - const component = this.componentsArray.components.get(item); - - for (let value of this.componentsArray.components.values()) { - if (component == value) { - return this.proof.proofSequence[currentIndex].safeCheck(dataHash); - } - currentIndex++; - } - - return Buffer.allocUnsafe(32); - } -} +} \ No newline at end of file diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index 23b64a6..9929494 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -20,7 +20,7 @@ import { Attestation } from "./Attestation"; import { fromBase58Check, toBase58Check } from '../../utils/address'; import { HASH160_BYTE_LENGTH, I_ADDR_VERSION } from '../../constants/vdxf'; import { BufferDataVdxfObject } from '../index' -import { AttestationRequest, AttestationRequestInterfaceDataInterface } from './Attestation'; + export class RedirectUri extends VDXFObject { uri: string; @@ -374,7 +374,7 @@ export class Challenge extends VDXFObject implements ChallengeInterface { const attestationsLength = reader.readCompactSize(); for (let i = 0; i < attestationsLength; i++) { - const _att = new Attestation(); + const _att = new Attestation("",""); reader.offset = _att.fromBuffer(reader.buffer, reader.offset); this.attestations.push(_att); } @@ -423,20 +423,16 @@ export class Challenge extends VDXFObject implements ChallengeInterface { } export class RequestedPermission extends VDXFObject { - data: string | AttestationRequestInterfaceDataInterface; + data: string; encoding?: BufferEncoding; - constructor(data: string | AttestationRequestInterfaceDataInterface = "", vdxfkey: string = "") { + constructor(data: string, vdxfkey: string = "") { super(vdxfkey); if (vdxfkey) this.addPrototypes(data); } - addPrototypes(data: string | AttestationRequestInterfaceDataInterface): void { + addPrototypes(data: string): void { var classType; switch (this.vdxfkey) { - case ATTESTATION_READ_REQUEST.vdxfid: - classType = AttestationRequest; - this.data = AttestationRequest.initializeData(data) - break; case IDENTITY_AGREEMENT.vdxfid: classType = BufferDataVdxfObject; this.data = data; diff --git a/src/vdxf/classes/DataDescriptor.ts b/src/vdxf/classes/DataDescriptor.ts index f10777a..e044eca 100644 --- a/src/vdxf/classes/DataDescriptor.ts +++ b/src/vdxf/classes/DataDescriptor.ts @@ -116,6 +116,23 @@ export class DataDescriptor { } + DecodeHashVector(): Array { + + const vdxfData = new VDXF_Data("",""); + vdxfData.fromBuffer(this.objectdata); + const hashes = []; + + if (vdxfData.vdxfkey == VDXF_Data.VectorUint256Key().vdxfid) { + const reader = new BufferReader(Buffer.from(vdxfData.data, 'hex')); + const count = reader.readVarInt(); + for (let i = 0; i < count.toNumber(); i++) { + hashes.push(reader.readSlice(32)); + } + } + return hashes; + + } + byteLength(): number { let length = 0; @@ -197,8 +214,8 @@ export class DataDescriptor { return writer.buffer; } - fromBuffer(buffer: Buffer): number { - const reader = new BufferReader(buffer); + fromBuffer(buffer: Buffer, offset: number = 0): number { + const reader = new BufferReader(buffer, offset); this.version = reader.readVarInt(); this.flags = reader.readVarInt(); this.objectdata = reader.readVarSlice(); @@ -278,7 +295,6 @@ export class DataDescriptor { }; - // VDXF data that describes an encrypted chunk of data export class VDXF_Data extends BufferDataVdxfObject { constructor(data: string, key: string) { diff --git a/src/vdxf/classes/Decision.ts b/src/vdxf/classes/Decision.ts index 534aa25..adb2f89 100644 --- a/src/vdxf/classes/Decision.ts +++ b/src/vdxf/classes/Decision.ts @@ -155,7 +155,7 @@ export class Decision extends VDXFObject { const attestationsLength = reader.readCompactSize(); for (let i = 0; i < attestationsLength; i++) { - const _att = new Attestation(); + const _att = new Attestation("",""); reader.offset = _att.fromBuffer(reader.buffer, reader.offset); this.attestations.push(_att); } diff --git a/src/vdxf/classes/IdentityData.ts b/src/vdxf/classes/IdentityData.ts index ca3da98..94cf46c 100644 --- a/src/vdxf/classes/IdentityData.ts +++ b/src/vdxf/classes/IdentityData.ts @@ -1,229 +1,246 @@ import * as identitykeys from '../identityDataKeys'; import * as keylist from '../keys'; +import { VDXF_Data } from './DataDescriptor'; -export const enum IdentityDataClassTypes { - BUFFER_DATA_STRING = 1, - BUFFER_DATA_BYTES = 2, - BUFFER_DATA_BASE64 = 3, - URL = 4, - PNG_IMAGE = 5, - KEY_ONLY = 6, - BOOLEAN = 7, +export const friendlyName = (vdfxkey) => { + + if (vdfxkey in IdentityVdxfidMap) { + + return IdentityVdxfidMap[vdfxkey].name; + + } else { + throw new Error("Unknown VDXF key"); + } } +export const getIdentityDataType = (vdfxkey) => { + + if (vdfxkey in IdentityVdxfidMap) { + + return IdentityVdxfidMap[vdfxkey].type; + + } else { + throw new Error("Unknown VDXF key"); + } + } + export const IdentityVdxfidMap = { - [identitykeys.IDENTITYDATA_FIRSTNAME.vdxfid]: { name: "First Name", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_LASTNAME.vdxfid]: { name: "Last Name", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_NATIONALITY.vdxfid]: { name: "Nationality", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_ATTESTOR.vdxfid]: { name: "Attestor ID", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDENTITY.vdxfid]: { name: "Identity", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_ID.vdxfid]: { name: "ID", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_USERID.vdxfid]: { name: "User ID", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_CREATEDAT.vdxfid]: { name: "Created at", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_COMPLETEDAT.vdxfid]: { name: "Completed at", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PREVIOUSATTEMPTID.vdxfid]: { name: "Previous attempt ID", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_SHAREABLEURL.vdxfid]: { name: "Shareable URL", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_TEMPLATEID.vdxfid]: { name: "Template ID", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_TEMPLATEVERSION.vdxfid]: { name: "Template Version", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PHONENUMBER.vdxfid]: { name: "Phone Number", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_OVER18.vdxfid]: { name: "Over 18", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_OVER21.vdxfid]: { name: "Over 21", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_OVER25.vdxfid]: { name: "Over 25", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_IPADDRESS.vdxfid]: { name: "IP Address", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_EMAIL.vdxfid]: { name: "Email Address", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_HOMEADDRESS.vdxfid]: { name: "Home address", type: IdentityDataClassTypes.KEY_ONLY }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1.vdxfid]: { name: "Street 1", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2.vdxfid]: { name: "Street 2", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_CITY.vdxfid]: { name: "City", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_REGION.vdxfid]: { name: "Region", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE.vdxfid]: { name: "Post Code", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY.vdxfid]: { name: "Country", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDNUMBER_VALUE.vdxfid]: { name: "ID Number", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDNUMBER_TYPE.vdxfid]: { name: "ID Type", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_STATUS.vdxfid]: { name: "Status", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_APPROVALS_ACCEPTEDTOS.vdxfid]: { name: "Accepted Terms and Conditions", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_APPROVALS_VERIFIEDSMS.vdxfid]: { name: "SMS Verified", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_APPROVALS_KYCCHECKED.vdxfid]: { name: "KYC Checked ok", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_APPROVALS_DOCUMENTSVERIFIED.vdxfid]: { name: "Documents Verified", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_APPROVALS_SELFIECHECKED.vdxfid]: { name: "Selfie Checked", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_APPROVALS_WATCHLIST_OK.vdxfid]: { name: "Watchlist ok", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Riskcheck ok", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE.vdxfid]: { name: "Driving Licence", type: IdentityDataClassTypes.KEY_ONLY }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_FRONT.vdxfid]: { name: "Driving Licence Front", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_BACK.vdxfid]: { name: "Driving Licence Back", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_FRONT.vdxfid]: { name: "Driving Licence Front", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_BACK.vdxfid]: { name: "Driving Licence Back", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_FACE.vdxfid]: { name: "Driving Licence Face", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_IDNUMBER.vdxfid]: { name: "Driving Licence Number", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CATEGORY.vdxfid]: { name: "Driving Licence Catagory", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_EXPIRATIONDATE.vdxfid]: { name: "Driving Licence expiry date", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Driving Licence matches country", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION.vdxfid]: { name: "Driving Licence issuing region", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH.vdxfid]: { name: "Driving Licence Date of Birth", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ADDRESS.vdxfid]: { name: "Driving Licence Address", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_STREET1.vdxfid]: { name: "Driving Licence Street 1", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CITY.vdxfid]: { name: "Driving Licence City", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_REGION.vdxfid]: { name: "Driving Licence Region", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_POSTCODE.vdxfid]: { name: "Driving Licence ZIP/Post Code", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_COUNTRY.vdxfid]: { name: "Driving Licence Country", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_MATCHED.vdxfid]: { name: "Driving Licence Matched all", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_NAME_MATCHED.vdxfid]: { name: "Driving Licence name matched", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH_MATCHED.vdxfid]: { name: "Driving Licence Date of Birth Matched", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_SELFIECHECK_SUCCESS.vdxfid]: { name: "Selfie Check success", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_SELFIECHECK_IMAGE.vdxfid]: { name: "Selfie Check image", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_SELFIECHECK_VIDEO.vdxfid]: { name: "Selfie Check video", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_SELFIECHECK_DRIVINGLICENCE_MATCH.vdxfid]: { name: "Selfie Driving Licence match", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_KYC_SUCCESS.vdxfid]: { name: "KYC Success", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_KYC_ADDRESS_MATCHED.vdxfid]: { name: "KYC Address Matched", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_KYC_TYPE.vdxfid]: { name: "KYC Type", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_KYC_NAME_MATCHED.vdxfid]: { name: "KYC Name Matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_KYC_DATEOFBIRTH_MATCHED.vdxfid]: { name: "KYC Date of Birth Matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_KYC_IDNUMBER_MATCHED.vdxfid]: { name: "KYC ID Matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_KYC_PHONENUMBER_MATCHED.vdxfid]: { name: "KYC Phone number matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_KYC_AREACODE_MATCHED.vdxfid]: { name: "KYC Areacode Matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RISKCHECK_STATUS.vdxfid]: { name: "Risk Check Status", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RISKCHECK_USERINTERACTIONS.vdxfid]: { name: "Risck Check User Interactions", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RISKCHECK_FRAUDRINGOK.vdxfid]: { name: "Risk Check No Fraudring", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RISKCHECK_BOTNOTDETECTED.vdxfid]: { name: "Risk Check bot free", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_EMAIL_ISDELIVERABLE.vdxfid]: { name: "Email address is deliverable", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_EMAIL_BREACHCOUNT.vdxfid]: { name: "Email breach count", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_EMAIL_FIRSTBREACHEDAT.vdxfid]: { name: "Email first breach date", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_EMAIL_LASTBREACHEDAT.vdxfid]: { name: "Email last breach date", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_REGISTEREDAT.vdxfid]: { name: "Email domain registered at", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_FREEPROVIDER.vdxfid]: { name: "Email is free provider", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_CUSTOM.vdxfid]: { name: "Email Domain is custom", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_DISPOSABLE.vdxfid]: { name: "Email Domain Disposable", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS.vdxfid]: { name: "Email top level Domain Suspicious", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD.vdxfid]: { name: "ID Card", type: IdentityDataClassTypes.KEY_ONLY }, - [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_FRONT.vdxfid]: { name: "ID Card Front", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_BACK.vdxfid]: { name: "ID Card Back", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_IDCARD_CROPPED_FRONT.vdxfid]: { name: "ID Card Front", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_IDCARD_CROPPED_BACK.vdxfid]: { name: "ID Card Back", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_IDCARD_FACE.vdxfid]: { name: "ID Card Face", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_IDCARD_IDNUMBER.vdxfid]: { name: "ID Card ID Number", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_CATEGORY.vdxfid]: { name: "ID Card Category", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_EXPIRATIONDATE.vdxfid]: { name: "ID Card Expiry date", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "ID Card Issuing Country Matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_ISSUING_REGION.vdxfid]: { name: "ID Card Issuing Region", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTH.vdxfid]: { name: "ID Card Date of Birth", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS.vdxfid]: { name: "ID Card Address", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_STREET1.vdxfid]: { name: "ID Card Street 1", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_CITY.vdxfid]: { name: "ID Card City", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_REGION.vdxfid]: { name: "ID Card Region", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_POSTCODE.vdxfid]: { name: "ID Card Zip/Post Code", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_COUNTRY.vdxfid]: { name: "ID Card Country", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "ID Card Matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_IDCARD_NAME_MATCHED.vdxfid]: { name: "ID Card Name Matched", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "ID Card Date of Birth Matched", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_PASSPORT.vdxfid]: { name: "Passport", type: IdentityDataClassTypes.KEY_ONLY }, - [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_FRONT.vdxfid]: { name: "Passport front", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_BACK.vdxfid]: { name: "Passport back", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_FRONT.vdxfid]: { name: "Passport front", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_BACK.vdxfid]: { name: "Passport back", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_PASSPORT_FACE.vdxfid]: { name: "Passport face", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_PASSPORT_IDNUMBER.vdxfid]: { name: "Passport ID Number", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_CATEGORY.vdxfid]: { name: "Passport Category", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_EXPIRATIONDATE.vdxfid]: { name: "Passport expiry date", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Passport issuing country matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_REGION.vdxfid]: { name: "Passport issuing region matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTH.vdxfid]: { name: "Passport date of birth", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS.vdxfid]: { name: "Passport address", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_STREET1.vdxfid]: { name: "Passport street 1", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_CITY.vdxfid]: { name: "Passport city", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_REGION.vdxfid]: { name: "Passport region", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_POSTCODE.vdxfid]: { name: "Passport zip/post code", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_COUNTRY.vdxfid]: { name: "Passport country", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Passport matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_PASSPORT_NAME_MATCHED.vdxfid]: { name: "Passport Name Matched", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTHMATCHED.vdxfid]: { name: "Passport date of birth matched", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT.vdxfid]: { name: "Residence Permit", type: IdentityDataClassTypes.KEY_ONLY }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_FRONT.vdxfid]: { name: "Residence Permit front", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_BACK.vdxfid]: { name: "Residence Permit back", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_FRONT.vdxfid]: { name: "Residence Permit front", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_BACK.vdxfid]: { name: "Residence Permit back", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_FACE.vdxfid]: { name: "Residence Permit face", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_IDNUMBER.vdxfid]: { name: "Residence Permit ID Number", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CATEGORY.vdxfid]: { name: "Residence Permit category", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_EXPIRATIONDATE.vdxfid]: { name: "Residence Permit expiry date", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Residence Permit issuing country matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_REGION.vdxfid]: { name: "Residence Permit issuing region matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTH.vdxfid]: { name: "Residence Permit date of birth", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS.vdxfid]: { name: "Residence Permit Address", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_STREET1.vdxfid]: { name: "Residence Permit Street 1", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_CITY.vdxfid]: { name: "Residence Permit City", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_REGION.vdxfid]: { name: "Residence Permit Region", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_POSTCODE.vdxfid]: { name: "Residence Permit Zip/Post code", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_COUNTRY.vdxfid]: { name: "Residence Permit Country", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Residence Permit Matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_NAME_MATCHED.vdxfid]: { name: "Residence Permit name matched", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTHMATCHED.vdxfid]: { name: "Residence Permit date of birth matched", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_RESIDENTCARD.vdxfid]: { name: "Resident Card", type: IdentityDataClassTypes.KEY_ONLY }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_FRONT.vdxfid]: { name: "Resident Card Front", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_BACK.vdxfid]: { name: "Resident Card Back", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_FRONT.vdxfid]: { name: "Resident Card Front", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_BACK.vdxfid]: { name: "Resident Card Back", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_FACE.vdxfid]: { name: "Resident Card Face", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_IDNUMBER.vdxfid]: { name: "Resident Card ID Number", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_CATEGORY.vdxfid]: { name: "Resident Card Category", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_EXPIRATIONDATE.vdxfid]: { name: "Resident Card Expiry Date", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Resident Card Issuing Country Matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_REGION.vdxfid]: { name: "Resident Card Issuing Region", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTH.vdxfid]: { name: "Resident Card date of birth", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS.vdxfid]: { name: "Resident Card address", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_STREET1.vdxfid]: { name: "Resident Card Street 1", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_CITY.vdxfid]: { name: "Resident Card City", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_REGION.vdxfid]: { name: "Resident Card Region", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_POSTCODE.vdxfid]: { name: "Resident Card Zip/Post Code", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_COUNTRY.vdxfid]: { name: "Resident Card Country", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Resident Card Matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_NAME_MATCHED.vdxfid]: { name: "Resident Card Name Matched", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "Resident Card date of birth Matched", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_VISA.vdxfid]: { name: "Visa", type: IdentityDataClassTypes.KEY_ONLY }, - [identitykeys.IDENTITYDATA_VISA_ORIGINAL_FRONT.vdxfid]: { name: "Visa front", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_VISA_ORIGINAL_BACK.vdxfid]: { name: "Visa back", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_VISA_CROPPED_FRONT.vdxfid]: { name: "Visa front", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_VISA_CROPPED_BACK.vdxfid]: { name: "Visa back", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_VISA_FACE.vdxfid]: { name: "Visa face", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_VISA_IDNUMBER.vdxfid]: { name: "Visa ID Number", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_CATEGORY.vdxfid]: { name: "Visa Category", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_EXPIRATIONDATE.vdxfid]: { name: "Visa expiry date", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Visa issuing country matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_ISSUING_REGION.vdxfid]: { name: "Visa issuing region", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTH.vdxfid]: { name: "Visa date of birth", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS.vdxfid]: { name: "Visa address", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_STREET1.vdxfid]: { name: "Visa Street 1", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_CITY.vdxfid]: { name: "Visa City", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_REGION.vdxfid]: { name: "Visa Region", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_POSTCODE.vdxfid]: { name: "Visa Zip/Post Code", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_COUNTRY.vdxfid]: { name: "Visa Country", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Visa document matched", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_VISA_NAME_MATCHED.vdxfid]: { name: "Visa name matched", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTHMATCHED.vdxfid]: { name: "Visa date of birth matched", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALFRONT.vdxfid]: { name: "Original Front", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALBACK.vdxfid]: { name: "Original Back", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDFRONT.vdxfid]: { name: "Cropped Front", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDBACK.vdxfid]: { name: "Cropped Back", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_FACE.vdxfid]: { name: "Face", type: IdentityDataClassTypes.URL }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_IDNUMBER.vdxfid]: { name: "ID Number", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CATEGORY.vdxfid]: { name: "Category", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_EXPIRATIONDATE.vdxfid]: { name: "Expiry Date", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY.vdxfid]: { name: "Issuing Country", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUING_REGION.vdxfid]: { name: "Issuing Region", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ADDRESS.vdxfid]: { name: "Address", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_ADDRESS_STREET1.vdxfid]: { name: "Street 1", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_ADDRESS_STREET2.vdxfid]: { name: "Street 2", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_ADDRESS_CITY.vdxfid]: { name: "City", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_ADDRESS_REGION.vdxfid]: { name: "Region", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_ADDRESS_POSTCODE.vdxfid]: { name: "Zip/Postal Code", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_ADDRESS_COUNTRY.vdxfid]: { name: "Country", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Document Matched", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED.vdxfid]: { name: "Name Matched", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED.vdxfid]: { name: "Date of Birth Matched", type: IdentityDataClassTypes.BOOLEAN }, - [identitykeys.BANK_ACCOUNT.vdxfid]: { name: "Bank Account", type: IdentityDataClassTypes.KEY_ONLY }, - [identitykeys.IDENTITYDATA_DOCUMENTS_AND_IMAGES.vdxfid]: { name: "Official ID Documents", type: IdentityDataClassTypes.KEY_ONLY }, - [keylist.ATTESTATION_TYPE.vdxfid]: { name: "Attestation Type", type: IdentityDataClassTypes.BUFFER_DATA_STRING }, + [identitykeys.IDENTITYDATA_FIRSTNAME.vdxfid]: { name: "First Name", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_LASTNAME.vdxfid]: { name: "Last Name", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_NATIONALITY.vdxfid]: { name: "Nationality", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_ATTESTOR.vdxfid]: { name: "Attestor ID", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDENTITY.vdxfid]: { name: "Identity", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_ID.vdxfid]: { name: "ID", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_USERID.vdxfid]: { name: "User ID", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_CREATEDAT.vdxfid]: { name: "Created at", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_COMPLETEDAT.vdxfid]: { name: "Completed at", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PREVIOUSATTEMPTID.vdxfid]: { name: "Previous attempt ID", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_SHAREABLEURL.vdxfid]: { name: "Shareable URL", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_TEMPLATEID.vdxfid]: { name: "Template ID", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_TEMPLATEVERSION.vdxfid]: { name: "Template Version", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PHONENUMBER.vdxfid]: { name: "Phone Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_OVER18.vdxfid]: { name: "Over 18", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_OVER21.vdxfid]: { name: "Over 21", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_OVER25.vdxfid]: { name: "Over 25", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_IPADDRESS.vdxfid]: { name: "IP Address", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_EMAIL.vdxfid]: { name: "Email Address", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_HOMEADDRESS.vdxfid]: { name: "Home address", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1.vdxfid]: { name: "Street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2.vdxfid]: { name: "Street 2", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_CITY.vdxfid]: { name: "City", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_REGION.vdxfid]: { name: "Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE.vdxfid]: { name: "Post Code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY.vdxfid]: { name: "Country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDNUMBER_VALUE.vdxfid]: { name: "ID Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDNUMBER_TYPE.vdxfid]: { name: "ID Type", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_STATUS.vdxfid]: { name: "Status", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_APPROVALS_ACCEPTEDTOS.vdxfid]: { name: "Accepted Terms and Conditions", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_APPROVALS_VERIFIEDSMS.vdxfid]: { name: "SMS Verified", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_APPROVALS_KYCCHECKED.vdxfid]: { name: "KYC Checked ok", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_APPROVALS_DOCUMENTSVERIFIED.vdxfid]: { name: "Documents Verified", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_APPROVALS_SELFIECHECKED.vdxfid]: { name: "Selfie Checked", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_APPROVALS_WATCHLIST_OK.vdxfid]: { name: "Watchlist ok", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Riskcheck ok", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE.vdxfid]: { name: "Driving Licence", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_FRONT.vdxfid]: { name: "Driving Licence Front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_BACK.vdxfid]: { name: "Driving Licence Back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_FRONT.vdxfid]: { name: "Driving Licence Front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_BACK.vdxfid]: { name: "Driving Licence Back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_FACE.vdxfid]: { name: "Driving Licence Face", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_IDNUMBER.vdxfid]: { name: "Driving Licence Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CATEGORY.vdxfid]: { name: "Driving Licence Catagory", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_EXPIRATIONDATE.vdxfid]: { name: "Driving Licence expiry date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Driving Licence matches country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION.vdxfid]: { name: "Driving Licence issuing region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH.vdxfid]: { name: "Driving Licence Date of Birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ADDRESS.vdxfid]: { name: "Driving Licence Address", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_STREET1.vdxfid]: { name: "Driving Licence Street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CITY.vdxfid]: { name: "Driving Licence City", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_REGION.vdxfid]: { name: "Driving Licence Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_POSTCODE.vdxfid]: { name: "Driving Licence ZIP/Post Code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_COUNTRY.vdxfid]: { name: "Driving Licence Country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_MATCHED.vdxfid]: { name: "Driving Licence Matched all", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_NAME_MATCHED.vdxfid]: { name: "Driving Licence name matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH_MATCHED.vdxfid]: { name: "Driving Licence Date of Birth Matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_SELFIECHECK_SUCCESS.vdxfid]: { name: "Selfie Check success", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_SELFIECHECK_IMAGE.vdxfid]: { name: "Selfie Check image", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_SELFIECHECK_VIDEO.vdxfid]: { name: "Selfie Check video", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_SELFIECHECK_DRIVINGLICENCE_MATCH.vdxfid]: { name: "Selfie Driving Licence match", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_KYC_SUCCESS.vdxfid]: { name: "KYC Success", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_KYC_ADDRESS_MATCHED.vdxfid]: { name: "KYC Address Matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_KYC_TYPE.vdxfid]: { name: "KYC Type", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_KYC_NAME_MATCHED.vdxfid]: { name: "KYC Name Matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_KYC_DATEOFBIRTH_MATCHED.vdxfid]: { name: "KYC Date of Birth Matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_KYC_IDNUMBER_MATCHED.vdxfid]: { name: "KYC ID Matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_KYC_PHONENUMBER_MATCHED.vdxfid]: { name: "KYC Phone number matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_KYC_AREACODE_MATCHED.vdxfid]: { name: "KYC Areacode Matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RISKCHECK_STATUS.vdxfid]: { name: "Risk Check Status", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RISKCHECK_USERINTERACTIONS.vdxfid]: { name: "Risck Check User Interactions", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RISKCHECK_FRAUDRINGOK.vdxfid]: { name: "Risk Check No Fraudring", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RISKCHECK_BOTNOTDETECTED.vdxfid]: { name: "Risk Check bot free", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_EMAIL_ISDELIVERABLE.vdxfid]: { name: "Email address is deliverable", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_EMAIL_BREACHCOUNT.vdxfid]: { name: "Email breach count", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_EMAIL_FIRSTBREACHEDAT.vdxfid]: { name: "Email first breach date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_EMAIL_LASTBREACHEDAT.vdxfid]: { name: "Email last breach date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_REGISTEREDAT.vdxfid]: { name: "Email domain registered at", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_FREEPROVIDER.vdxfid]: { name: "Email is free provider", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_CUSTOM.vdxfid]: { name: "Email Domain is custom", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_DISPOSABLE.vdxfid]: { name: "Email Domain Disposable", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS.vdxfid]: { name: "Email top level Domain Suspicious", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD.vdxfid]: { name: "ID Card", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_FRONT.vdxfid]: { name: "ID Card Front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_BACK.vdxfid]: { name: "ID Card Back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_IDCARD_CROPPED_FRONT.vdxfid]: { name: "ID Card Front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_IDCARD_CROPPED_BACK.vdxfid]: { name: "ID Card Back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_IDCARD_FACE.vdxfid]: { name: "ID Card Face", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_IDCARD_IDNUMBER.vdxfid]: { name: "ID Card ID Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_CATEGORY.vdxfid]: { name: "ID Card Category", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_EXPIRATIONDATE.vdxfid]: { name: "ID Card Expiry date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "ID Card Issuing Country Matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_ISSUING_REGION.vdxfid]: { name: "ID Card Issuing Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTH.vdxfid]: { name: "ID Card Date of Birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS.vdxfid]: { name: "ID Card Address", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_STREET1.vdxfid]: { name: "ID Card Street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_CITY.vdxfid]: { name: "ID Card City", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_REGION.vdxfid]: { name: "ID Card Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_POSTCODE.vdxfid]: { name: "ID Card Zip/Post Code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_COUNTRY.vdxfid]: { name: "ID Card Country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "ID Card Matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_NAME_MATCHED.vdxfid]: { name: "ID Card Name Matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "ID Card Date of Birth Matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_PASSPORT.vdxfid]: { name: "Passport", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_FRONT.vdxfid]: { name: "Passport front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_BACK.vdxfid]: { name: "Passport back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_FRONT.vdxfid]: { name: "Passport front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_BACK.vdxfid]: { name: "Passport back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_PASSPORT_FACE.vdxfid]: { name: "Passport face", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_PASSPORT_IDNUMBER.vdxfid]: { name: "Passport ID Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_CATEGORY.vdxfid]: { name: "Passport Category", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_EXPIRATIONDATE.vdxfid]: { name: "Passport expiry date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Passport issuing country matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_REGION.vdxfid]: { name: "Passport issuing region matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTH.vdxfid]: { name: "Passport date of birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS.vdxfid]: { name: "Passport address", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_STREET1.vdxfid]: { name: "Passport street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_CITY.vdxfid]: { name: "Passport city", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_REGION.vdxfid]: { name: "Passport region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_POSTCODE.vdxfid]: { name: "Passport zip/post code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_COUNTRY.vdxfid]: { name: "Passport country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Passport matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_NAME_MATCHED.vdxfid]: { name: "Passport Name Matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTHMATCHED.vdxfid]: { name: "Passport date of birth matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT.vdxfid]: { name: "Residence Permit", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_FRONT.vdxfid]: { name: "Residence Permit front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_BACK.vdxfid]: { name: "Residence Permit back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_FRONT.vdxfid]: { name: "Residence Permit front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_BACK.vdxfid]: { name: "Residence Permit back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_FACE.vdxfid]: { name: "Residence Permit face", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_IDNUMBER.vdxfid]: { name: "Residence Permit ID Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CATEGORY.vdxfid]: { name: "Residence Permit category", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_EXPIRATIONDATE.vdxfid]: { name: "Residence Permit expiry date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Residence Permit issuing country matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_REGION.vdxfid]: { name: "Residence Permit issuing region matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTH.vdxfid]: { name: "Residence Permit date of birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS.vdxfid]: { name: "Residence Permit Address", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_STREET1.vdxfid]: { name: "Residence Permit Street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_CITY.vdxfid]: { name: "Residence Permit City", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_REGION.vdxfid]: { name: "Residence Permit Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_POSTCODE.vdxfid]: { name: "Residence Permit Zip/Post code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_COUNTRY.vdxfid]: { name: "Residence Permit Country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Residence Permit Matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_NAME_MATCHED.vdxfid]: { name: "Residence Permit name matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTHMATCHED.vdxfid]: { name: "Residence Permit date of birth matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD.vdxfid]: { name: "Resident Card", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_FRONT.vdxfid]: { name: "Resident Card Front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_BACK.vdxfid]: { name: "Resident Card Back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_FRONT.vdxfid]: { name: "Resident Card Front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_BACK.vdxfid]: { name: "Resident Card Back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_FACE.vdxfid]: { name: "Resident Card Face", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_IDNUMBER.vdxfid]: { name: "Resident Card ID Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_CATEGORY.vdxfid]: { name: "Resident Card Category", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_EXPIRATIONDATE.vdxfid]: { name: "Resident Card Expiry Date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Resident Card Issuing Country Matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_REGION.vdxfid]: { name: "Resident Card Issuing Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTH.vdxfid]: { name: "Resident Card date of birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS.vdxfid]: { name: "Resident Card address", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_STREET1.vdxfid]: { name: "Resident Card Street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_CITY.vdxfid]: { name: "Resident Card City", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_REGION.vdxfid]: { name: "Resident Card Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_POSTCODE.vdxfid]: { name: "Resident Card Zip/Post Code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_COUNTRY.vdxfid]: { name: "Resident Card Country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Resident Card Matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_NAME_MATCHED.vdxfid]: { name: "Resident Card Name Matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "Resident Card date of birth Matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_VISA.vdxfid]: { name: "Visa", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITYDATA_VISA_ORIGINAL_FRONT.vdxfid]: { name: "Visa front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_VISA_ORIGINAL_BACK.vdxfid]: { name: "Visa back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_VISA_CROPPED_FRONT.vdxfid]: { name: "Visa front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_VISA_CROPPED_BACK.vdxfid]: { name: "Visa back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_VISA_FACE.vdxfid]: { name: "Visa face", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_VISA_IDNUMBER.vdxfid]: { name: "Visa ID Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_CATEGORY.vdxfid]: { name: "Visa Category", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_EXPIRATIONDATE.vdxfid]: { name: "Visa expiry date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Visa issuing country matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_ISSUING_REGION.vdxfid]: { name: "Visa issuing region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTH.vdxfid]: { name: "Visa date of birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS.vdxfid]: { name: "Visa address", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_STREET1.vdxfid]: { name: "Visa Street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_CITY.vdxfid]: { name: "Visa City", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_REGION.vdxfid]: { name: "Visa Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_POSTCODE.vdxfid]: { name: "Visa Zip/Post Code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_COUNTRY.vdxfid]: { name: "Visa Country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Visa document matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_NAME_MATCHED.vdxfid]: { name: "Visa name matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTHMATCHED.vdxfid]: { name: "Visa date of birth matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALFRONT.vdxfid]: { name: "Original Front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALBACK.vdxfid]: { name: "Original Back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDFRONT.vdxfid]: { name: "Cropped Front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDBACK.vdxfid]: { name: "Cropped Back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_FACE.vdxfid]: { name: "Face", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_IDNUMBER.vdxfid]: { name: "ID Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CATEGORY.vdxfid]: { name: "Category", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_EXPIRATIONDATE.vdxfid]: { name: "Expiry Date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY.vdxfid]: { name: "Issuing Country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUING_REGION.vdxfid]: { name: "Issuing Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ADDRESS.vdxfid]: { name: "Address", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_ADDRESS_STREET1.vdxfid]: { name: "Street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_ADDRESS_STREET2.vdxfid]: { name: "Street 2", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_ADDRESS_CITY.vdxfid]: { name: "City", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_ADDRESS_REGION.vdxfid]: { name: "Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_ADDRESS_POSTCODE.vdxfid]: { name: "Zip/Postal Code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_ADDRESS_COUNTRY.vdxfid]: { name: "Country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Document Matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED.vdxfid]: { name: "Name Matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED.vdxfid]: { name: "Date of Birth Matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.BANK_ACCOUNT.vdxfid]: { name: "Bank Account", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITYDATA_DOCUMENTS_AND_IMAGES.vdxfid]: { name: "Official ID Documents", type: VDXF_Data.DataUint160Key() }, + [keylist.ATTESTATION_PROVISION_TYPE.vdxfid]: { name: "Attestation Type", type: VDXF_Data.DataStringKey() }, + [keylist.ATTESTATION_PROVISION_URL.vdxfid]: { name: "Attestation URL", type: VDXF_Data.DataURLKeyName() }, + [keylist.ATTESTATION_VIEW_RESPONSE.vdxfid]: { name: "Attestation View Response", type: VDXF_Data.DataStringKey()}, + [keylist.ATTESTATION_VIEW_REQUEST.vdxfid]: { name: "Attestation View Response", type: VDXF_Data.DataStringKey()}, + [keylist.PROFILE_DATA_VIEW_REQUEST.vdxfid]: { name: "Profile Data View Request", type: VDXF_Data.DataStringKey()}, }; diff --git a/src/vdxf/classes/PersonalProfile.ts b/src/vdxf/classes/PersonalProfile.ts index 4556156..92d0366 100644 --- a/src/vdxf/classes/PersonalProfile.ts +++ b/src/vdxf/classes/PersonalProfile.ts @@ -3,201 +3,86 @@ import bufferutils from '../../utils/bufferutils' import { fromBase58Check, toBase58Check } from '../../utils/address'; import { I_ADDR_VERSION, HASH160_BYTE_LENGTH } from '../../constants/vdxf'; import { VDXFObject } from ".."; -import { AttestationDataType } from './Attestation'; import * as identitykeys from '../identityDataKeys'; +import { IdentityVdxfidMap, getIdentityDataType } from './IdentityData'; +import { DataDescriptor } from './DataDescriptor'; const { BufferReader, BufferWriter } = bufferutils; -export class DataCategory { - data: Array; +export class DataCategory extends VDXFObject { + data: Array; category: string; details: string; - vdxfid: string; - constructor(data: Array | Array<{vdxfid: string}>, category: string, vdxfid: string, details: string) { - if (data && data[0] instanceof VDXFObject) { - this.data = data as Array; - } else if (data){ - this.data = (data as Array<{vdxfid: string}>).map(key => {return AttestationDataType.getDataItem(key.vdxfid, null)}); - } - this.category = category; - this.vdxfid = vdxfid; - this.details = details; - } -} - -class PersonalDataCategory extends DataCategory { - constructor() { - super([ - identitykeys.IDENTITYDATA_FIRSTNAME, - identitykeys.IDENTITYDATA_LASTNAME, - identitykeys.IDENTITYDATA_MIDDLENAME, - identitykeys.IDENTITYDATA_DATEOFBIRTH, - identitykeys.IDENTITYDATA_NATIONALITY - ], "Personal Details", - identitykeys.IDENTITYDATA_PERSONAL_DETAILS.vdxfid, - "Name, birthday, nationality"); - } -} - -class ContactDataCategory extends DataCategory { - constructor() { - super([ - identitykeys.IDENTITYDATA_EMAIL, - identitykeys.IDENTITYDATA_PHONENUMBER - ], "Contact", - identitykeys.IDENTITYDATA_CONTACT.vdxfid, - "Email, phone number"); - } -} - -class LocationDataCategory extends DataCategory { - constructor() { - super([ - identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1, - identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2, - identitykeys.IDENTITYDATA_HOMEADDRESS_CITY, - identitykeys.IDENTITYDATA_HOMEADDRESS_REGION, - identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE, - identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY, - ], "Locations", - identitykeys.IDENTITYDATA_LOCATIONS.vdxfid, - "Tax residency, home address"); - } -} - -class BankingDataCategory extends DataCategory { - constructor() { - super([ - identitykeys.BANK_ACCOUNT, - identitykeys.BANK_ACCOUNT_CURRENCY, - identitykeys.BANK_ACCOUNT_COUNTRY, - identitykeys.BANK_ACCOUNT_STREET1, - identitykeys.BANK_ACCOUNT_STREET2, - identitykeys.BANK_ACCOUNT_CITY, - identitykeys.BANK_ACCOUNT_REGION, - identitykeys.BANK_ACCOUNT_POSTALCODE, - identitykeys.BANK_ACCOUNT_TAXNUMBER, - identitykeys.BANK_ACCOUNT_TAXCOUNTRY, - identitykeys.BANK_ACCOUNT_FIRSTNAME, - identitykeys.BANK_ACCOUNT_LASTNAME, - identitykeys.BANK_ACCOUNT_PHONENUMBER, - identitykeys.BANK_ACCOUNT_NUMBER, - identitykeys.BANK_ACCOUNT_TYPE - ], "Banking Information", - identitykeys.IDENTITYDATA_BANKING_INFORMATION.vdxfid, - "Bank accounts"); - } -} - -class DocumentsCategory extends DataCategory { - constructor() { - super([ - identitykeys.IDENTITYDATA_PASSPORT, - identitykeys.IDENTITYDATA_DRIVINGLICENCE, - identitykeys.IDENTITYDATA_RESIDENCEPERMIT, - identitykeys.IDENTITYDATA_RESIDENTCARD, - identitykeys.IDENTITYDATA_VISA, - identitykeys.IDENTITYDATA_IDCARD, - identitykeys.IDENTITYDATA_SELFIECHECK_IMAGE, - ], "Documents", - identitykeys.IDENTITYDATA_DOCUMENTS_AND_IMAGES.vdxfid, - "Passport, ID, driving license"); + constructor(vdxfid?: string, data?: Array, category?: string, details?: string) { + super(vdxfid || ""); + this.data = data || []; + this.category = category || ""; + this.details = details || ""; } } export const defaultPersonalProfileDataTemplate = [ - new PersonalDataCategory(), - new ContactDataCategory(), - new LocationDataCategory(), - new BankingDataCategory(), - new DocumentsCategory() -] - -export class PersonalProfileDataStore extends VDXFObject { - data: { [key: string]: DataCategory }; - - constructor(data?: Array) { - super(identitykeys.PERSONAL_INFO_OBJECT.vdxfid); - if (data) { - this.data = {} - for (const item of data) { - this.data[item.category] = item; - } - } else { - this.data = {} - for (const item of defaultPersonalProfileDataTemplate) { - this.data[item.category] = item; - } - } - } - - dataByteLength(): number { - - let byteLength = 0; - byteLength += varuint.encodingLength(Object.keys(this.data).length); - - for (const [key, value] of Object.entries(this.data)) { - - byteLength += HASH160_BYTE_LENGTH; // category - byteLength += varuint.encodingLength(value.data.length); - - for (const attestation of value.data) { - byteLength += attestation.toBuffer().length; - } - } - return byteLength; - } - - toDataBuffer(): Buffer { - const bufferWriter = new BufferWriter(Buffer.alloc(this.dataByteLength())); - - bufferWriter.writeCompactSize(Object.keys(this.data).length); - - for (const [key, value] of Object.entries(this.data)) { - - bufferWriter.writeSlice(fromBase58Check(value.vdxfid).hash); - bufferWriter.writeCompactSize(value.data.length); - - for (const dataType of value.data) { - bufferWriter.writeSlice(dataType.toBuffer()); - } - } - return bufferWriter.buffer - } - - fromDataBuffer(buffer: Buffer, offset?: number): number { - - const reader = new BufferReader(buffer, offset); - - const dataLength = reader.readCompactSize(); - - if (!this.data) { - this.data = {}; - } - - for (var i = 0; i < dataLength; i++) { - - const vdxfkey = toBase58Check(reader.readSlice(HASH160_BYTE_LENGTH), I_ADDR_VERSION); - const dataLength = reader.readCompactSize(); - const data = []; - - for (var j = 0; j < dataLength; j++) { - - const attestation = AttestationDataType.getDataItem(toBase58Check(reader.buffer.slice(reader.offset, reader.offset + HASH160_BYTE_LENGTH), I_ADDR_VERSION), null); - reader.offset = attestation.fromBuffer(reader.buffer, reader.offset); - data.push(attestation); - } - - const categoryType = Object.entries(this.data).find(([key, value]) => value.vdxfid === vdxfkey ); - - this.data[categoryType[1].category].data = data; - } - - return reader.offset; - } - - toJson() { - return { - data: this.data, - }; - } -} + new DataCategory( + identitykeys.IDENTITYDATA_PERSONAL_DETAILS.vdxfid, + [ + identitykeys.IDENTITYDATA_FIRSTNAME.vdxfid, + identitykeys.IDENTITYDATA_LASTNAME.vdxfid, + identitykeys.IDENTITYDATA_MIDDLENAME.vdxfid, + identitykeys.IDENTITYDATA_DATEOFBIRTH.vdxfid, + identitykeys.IDENTITYDATA_NATIONALITY.vdxfid + ], + "Personal Details", + "Name, birthday, nationality" + ), + new DataCategory(identitykeys.IDENTITYDATA_CONTACT.vdxfid, + [ + identitykeys.IDENTITYDATA_EMAIL.vdxfid, + identitykeys.IDENTITYDATA_PHONENUMBER.vdxfid + ], + "Contact", + "Email, phone number" + ), + new DataCategory(identitykeys.IDENTITYDATA_LOCATIONS.vdxfid, + [ + identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1.vdxfid, + identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2.vdxfid, + identitykeys.IDENTITYDATA_HOMEADDRESS_CITY.vdxfid, + identitykeys.IDENTITYDATA_HOMEADDRESS_REGION.vdxfid, + identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE.vdxfid, + identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY.vdxfid, + ], + "Locations", + "Tax residency, home address"), + new DataCategory(identitykeys.IDENTITYDATA_BANKING_INFORMATION.vdxfid, + [ + identitykeys.BANK_ACCOUNT.vdxfid, + identitykeys.BANK_ACCOUNT_CURRENCY.vdxfid, + identitykeys.BANK_ACCOUNT_COUNTRY.vdxfid, + identitykeys.BANK_ACCOUNT_STREET1.vdxfid, + identitykeys.BANK_ACCOUNT_STREET2.vdxfid, + identitykeys.BANK_ACCOUNT_CITY.vdxfid, + identitykeys.BANK_ACCOUNT_REGION.vdxfid, + identitykeys.BANK_ACCOUNT_POSTALCODE.vdxfid, + identitykeys.BANK_ACCOUNT_TAXNUMBER.vdxfid, + identitykeys.BANK_ACCOUNT_TAXCOUNTRY.vdxfid, + identitykeys.BANK_ACCOUNT_FIRSTNAME.vdxfid, + identitykeys.BANK_ACCOUNT_LASTNAME.vdxfid, + identitykeys.BANK_ACCOUNT_PHONENUMBER.vdxfid, + identitykeys.BANK_ACCOUNT_NUMBER.vdxfid, + identitykeys.BANK_ACCOUNT_TYPE.vdxfid + ], + "Banking Information", + "Bank accounts"), + new DataCategory(identitykeys.IDENTITYDATA_DOCUMENTS_AND_IMAGES.vdxfid, + [ + identitykeys.IDENTITYDATA_PASSPORT.vdxfid, + identitykeys.IDENTITYDATA_DRIVINGLICENCE.vdxfid, + identitykeys.IDENTITYDATA_RESIDENCEPERMIT.vdxfid, + identitykeys.IDENTITYDATA_RESIDENTCARD.vdxfid, + identitykeys.IDENTITYDATA_VISA.vdxfid, + identitykeys.IDENTITYDATA_IDCARD.vdxfid, + identitykeys.IDENTITYDATA_SELFIECHECK_IMAGE.vdxfid, + ], + "Documents", + "Passport, ID, driving license"), + +] \ No newline at end of file diff --git a/src/vdxf/classes/SignatureData.ts b/src/vdxf/classes/SignatureData.ts index 249061a..fec1ed8 100644 --- a/src/vdxf/classes/SignatureData.ts +++ b/src/vdxf/classes/SignatureData.ts @@ -43,25 +43,22 @@ export class SignatureData implements SerializableEntity { if (data.systemid) signatureData.systemID = data.systemid; if (data.hashtype) signatureData.hashType = new BN(data.hashtype); - if (signatureData.hashType == new BN(EHashTypes.HASH_SHA256)){ + if (signatureData.hashType == new BN(EHashTypes.HASH_SHA256)) { signatureData.signatureHash = Buffer.from(data.signaturehash, 'hex').reverse(); } else { signatureData.signatureHash = Buffer.from(data.signaturehash, 'hex'); } - if (data.signaturehash) signatureData.signatureHash = Buffer.from(data.signaturehash, 'hex'); if (data.identityid) signatureData.identityID = data.identityid; - if (data.sigtype) signatureData.sigType = new BN(data.sigtype); + if (data.signaturetype) signatureData.sigType = new BN(data.signaturetype); signatureData.vdxfKeys = data.vdxfkeys || []; signatureData.vdxfKeyNames = data.vdxfkeynames || []; signatureData.boundHashes = data.boundhashes || []; - signatureData.signatureAsVch = Buffer.from(data.signatureasvch, 'base64'); - + signatureData.signatureAsVch = Buffer.from(data.signature, 'base64'); } - - return new SignatureData(data) + return signatureData; } getByteLength() { @@ -101,11 +98,11 @@ export class SignatureData implements SerializableEntity { bufferWriter.writeSlice(fromBase58Check(this.identityID).hash); bufferWriter.writeVarInt(this.sigType); bufferWriter.writeCompactSize(this.vdxfKeys.length); - + for (const key of this.vdxfKeys) { bufferWriter.writeSlice(fromBase58Check(key).hash); } - + bufferWriter.writeCompactSize(this.vdxfKeyNames.length); for (const keyName of this.vdxfKeyNames) { bufferWriter.writeVarSlice(Buffer.from(keyName, 'utf8')); @@ -148,9 +145,9 @@ export class SignatureData implements SerializableEntity { for (let i = 0; i < boundHashesLength; i++) { this.boundHashes.push(reader.readSlice(32)); } - + this.signatureAsVch = reader.readVarSlice(); - + return reader.offset; } } \ No newline at end of file diff --git a/src/vdxf/classes/index.ts b/src/vdxf/classes/index.ts index 025d48d..e790388 100644 --- a/src/vdxf/classes/index.ts +++ b/src/vdxf/classes/index.ts @@ -34,9 +34,8 @@ export { AltAuthFactor, } from "./Challenge"; export {Attestation} from './Attestation' -export {AttestationData, AttestationDataType} from './Attestation' export { ProvisioningTxid } from './provisioning/ProvisioningResult' export { Context } from './Context' -export { defaultPersonalProfileDataTemplate, DataCategory, PersonalProfileDataStore } from './PersonalProfile' \ No newline at end of file +export { defaultPersonalProfileDataTemplate, DataCategory } from './PersonalProfile' \ No newline at end of file diff --git a/src/vdxf/keys.ts b/src/vdxf/keys.ts index df4d206..be3ba1e 100644 --- a/src/vdxf/keys.ts +++ b/src/vdxf/keys.ts @@ -363,21 +363,32 @@ export const CURRENCY_ADDRESS: VDXFKeyInterface = { } } -export const ATTESTATION_RECIPIENT: VDXFKeyInterface = { - "vdxfid": "iF9W7VBoeB1qooRBhZnbx1edN45oT6N3T1", - "hash160result": "fd9b77f956447beae6e9eba1de71d855fa800880", +export const ATTESTATION_PROVISION_URL: VDXFKeyInterface = { + "vdxfid": "iD9J9aQ6vsRYvqZbBs9QpKmCcgUynee7mT", + "indexid": "xHyQcNqBnBeDZ1Sd3YoZniHjeLVzgLK5ka", + "hash160result": "e1059d2a03500749f86ed9c49137b86de6430e6a", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::attestation.recipient" + "name": "vrsc::attestation.provision.url" } }; -export const ATTESTATION_OBJECT: VDXFKeyInterface = { - "vdxfid": "iKzefmmS3nMXjLTsrQ1emigirJBTK7rBTP", - "hash160result": "5d57536b22b79ea267ae71852779db21258834b5", +export const ATTESTATION_PROVISION_TYPE: VDXFKeyInterface = { + "vdxfid": "i7VGPAp3q2h4U4njZ556b9eG3Jts2gmzHn", + "indexid": "xCKNqyF8gLuj6EfmQkjFZYAo4xuswrB6X9", + "hash160result": "5f922c9d09e0160b7c3bc5f31588dfc11b5b042c", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::attestation.object" + "name": "vrsc::attestation.provision.type" + } +}; + +export const ATTESTATION_VIEW_REQUEST: VDXFKeyInterface = { + "vdxfid": "i5R9p3V1sxZ9p1NDV7nPkz1wvmQTUvuByY", + "hash160result": "872923256c56f6bda8256c5bb6a4c98d85f44c15", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestation.view.request" } }; @@ -390,15 +401,25 @@ export const ATTESTATION_VIEW_RESPONSE: VDXFKeyInterface = { } }; -export const ATTESTATION_TYPE: VDXFKeyInterface = { - "vdxfid": "iAJUD5mgT6MHz8ymF49XUtBDRS7uvYqNWZ", - "hash160result": "e56544849c038b7cfadb0a1074ac51df9207e24a", +export const ATTESTATION_ID: VDXFKeyInterface = { + "vdxfid": "i87ZC3B5EFiKtLW9fCUkw9yoMVmh2i2bZ3", + "hash160result": "f540229f88da9e3a9f40f99ce5a22afe765ce132", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::attestation.type" + "name": "vrsc::attestation.id" } }; +export const PROFILE_DATA_VIEW_REQUEST: VDXFKeyInterface = { + "vdxfid": "iEocxePWah2zp5Hn4ujeoQpc4UVYeJeQ2g", + "indexid": "xKdjRSpbS1FfSFAovbPomoM968WZVsmW1E", + "hash160result": "b1778ef367dbf00e7b9ad15eea2ef17490e6457c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::profile.data.view.request" + } +} + // DATA TYPES export const DATA_TYPE_STRING: VDXFKeyInterface = { @@ -410,12 +431,3 @@ export const DATA_TYPE_STRING: VDXFKeyInterface = }, }; -export const PROFILE_DATA_VIEW_REQUEST: VDXFKeyInterface = { - "vdxfid": "iFYznrRxyHaoJZ91cFDSYGT4szETf4RLRV", - "indexid": "xLP7Fes3pboTvj23TvsbWeybueFUatbQQh", - "hash160result": "d3f2168aad438c6c6eab8f3384458cbebf027a84", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::profile.data.view" - } -} From a5672980469539b41a3040d289cd87b37650289e Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Fri, 26 Apr 2024 19:21:05 +0100 Subject: [PATCH 090/120] Add classes to exports --- dist/vdxf/classes/CrossChainDataRef.js | 4 ++-- dist/vdxf/classes/DataDescriptor.d.ts | 2 +- dist/vdxf/classes/DataDescriptor.js | 6 +++--- dist/vdxf/classes/MMR.d.ts | 5 +++-- dist/vdxf/classes/MMR.js | 6 ++++-- dist/vdxf/classes/index.d.ts | 4 ++++ dist/vdxf/classes/index.js | 25 ++++++++++++++++++++++++- src/vdxf/classes/CrossChainDataRef.ts | 4 ++-- src/vdxf/classes/DataDescriptor.ts | 2 +- src/vdxf/classes/MMR.ts | 4 ++-- src/vdxf/classes/index.ts | 6 +++++- 11 files changed, 51 insertions(+), 17 deletions(-) diff --git a/dist/vdxf/classes/CrossChainDataRef.js b/dist/vdxf/classes/CrossChainDataRef.js index 53e15f4..b2dfbd8 100644 --- a/dist/vdxf/classes/CrossChainDataRef.js +++ b/dist/vdxf/classes/CrossChainDataRef.js @@ -109,8 +109,8 @@ class IdentityMultimapRef { byteLength += varint_1.default.encodingLength(this.flags); byteLength += 20; // idID uint160 byteLength += 20; // key uint160 - byteLength += 4; // heightStart uint32 - byteLength += 4; // heightEnd uint32 + byteLength += varint_1.default.encodingLength(this.heightStart); // heightStart uint32 + byteLength += varint_1.default.encodingLength(this.heightEnd); // heightEnd uint32 byteLength += 32; // dataHash uint25 if (this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH).gt(new bn_js_1.BN(0))) { byteLength += 32; diff --git a/dist/vdxf/classes/DataDescriptor.d.ts b/dist/vdxf/classes/DataDescriptor.d.ts index 7d5b5dd..daa827c 100644 --- a/dist/vdxf/classes/DataDescriptor.d.ts +++ b/dist/vdxf/classes/DataDescriptor.d.ts @@ -125,7 +125,7 @@ export declare class VDXF_Data extends BufferDataVdxfObject { static CurrencyStartNotarizationKey(): VDXFKeyInterface; GetHash(): void; } -export declare class CVDXFDataDescriptor extends BufferDataVdxfObject { +export declare class VDXFDataDescriptor extends BufferDataVdxfObject { dataDescriptor: DataDescriptor; constructor(vdxfData: BufferDataVdxfObject); dataByteLength(): number; diff --git a/dist/vdxf/classes/DataDescriptor.js b/dist/vdxf/classes/DataDescriptor.js index 33b4afe..2accc5f 100644 --- a/dist/vdxf/classes/DataDescriptor.js +++ b/dist/vdxf/classes/DataDescriptor.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.VectorEncodeVDXFUni = exports.MMRDescriptor = exports.EHashTypes = exports.CVDXFDataDescriptor = exports.VDXF_Data = exports.DataDescriptor = void 0; +exports.VectorEncodeVDXFUni = exports.MMRDescriptor = exports.EHashTypes = exports.VDXFDataDescriptor = exports.VDXF_Data = exports.DataDescriptor = void 0; const bn_js_1 = require("bn.js"); const index_1 = require("../index"); const varint_1 = require("../../utils/varint"); @@ -716,7 +716,7 @@ class VDXF_Data extends index_1.BufferDataVdxfObject { } exports.VDXF_Data = VDXF_Data; ; -class CVDXFDataDescriptor extends index_1.BufferDataVdxfObject { +class VDXFDataDescriptor extends index_1.BufferDataVdxfObject { constructor(vdxfData) { super(vdxfData.data, vdxfData.vdxfkey); this.version = vdxfData.version; @@ -767,7 +767,7 @@ class CVDXFDataDescriptor extends index_1.BufferDataVdxfObject { return this.dataDescriptor.SetFlags(); } } -exports.CVDXFDataDescriptor = CVDXFDataDescriptor; +exports.VDXFDataDescriptor = VDXFDataDescriptor; ; var EHashTypes; (function (EHashTypes) { diff --git a/dist/vdxf/classes/MMR.d.ts b/dist/vdxf/classes/MMR.d.ts index ae3f0bf..8b106e9 100644 --- a/dist/vdxf/classes/MMR.d.ts +++ b/dist/vdxf/classes/MMR.d.ts @@ -1,5 +1,6 @@ /// -declare class CLayer { +import { BN } from 'bn.js'; +export declare class CLayer { private vSize; private nodes; constructor(); @@ -69,4 +70,4 @@ export declare class CMerkleMountainView { GetProof(retProof: CMMRProof, pos: number): boolean; GetProofBits(pos: number, mmvSize: number): void; } -export {}; +export declare const GetMMRProofIndex: (pos: number, mmvSize: number, extraHashes: number) => InstanceType; diff --git a/dist/vdxf/classes/MMR.js b/dist/vdxf/classes/MMR.js index 6d6e7ee..1f56f27 100644 --- a/dist/vdxf/classes/MMR.js +++ b/dist/vdxf/classes/MMR.js @@ -2,7 +2,7 @@ // Licence MIT // Adapted to Verus Blake2b MMR. Object.defineProperty(exports, "__esModule", { value: true }); -exports.CMerkleMountainView = exports.CMMRProof = exports.CMMRBranch = exports.CMerkleMountainRange = exports.CMMRNode = void 0; +exports.GetMMRProofIndex = exports.CMerkleMountainView = exports.CMMRProof = exports.CMMRBranch = exports.CMerkleMountainRange = exports.CMMRNode = exports.CLayer = void 0; var blake2b = require('blake2b'); const bn_js_1 = require("bn.js"); const varuint_1 = require("../../utils/varuint"); @@ -34,6 +34,7 @@ class CLayer { this.vSize = 0; } } +exports.CLayer = CLayer; ; //template class COverlayNodeLayer { @@ -210,7 +211,7 @@ class CMMRBranch { return blake2b(out.length, null, null, Buffer.from("VerusDefaultHash")).update(input).digest(out); } safeCheck(hash) { - let index = GetMMRProofIndex(this.nIndex, this.nSize, 0); + let index = (0, exports.GetMMRProofIndex)(this.nIndex, this.nSize, 0); let joined = Buffer.allocUnsafe(64); let hashInProgress = hash; for (let i = 0; i < this.branch.length; i++) { @@ -567,3 +568,4 @@ const GetMMRProofIndex = (pos, mmvSize, extraHashes) => { } return index; }; +exports.GetMMRProofIndex = GetMMRProofIndex; diff --git a/dist/vdxf/classes/index.d.ts b/dist/vdxf/classes/index.d.ts index cd0344a..e24fdec 100644 --- a/dist/vdxf/classes/index.d.ts +++ b/dist/vdxf/classes/index.d.ts @@ -26,3 +26,7 @@ export { Attestation } from './Attestation'; export { ProvisioningTxid } from './provisioning/ProvisioningResult'; export { Context } from './Context'; export { defaultPersonalProfileDataTemplate, DataCategory } from './PersonalProfile'; +export { CUTXORef, PBaaSEvidenceRef, IdentityMultimapRef, URLRef, CrossChainDataRef } from './CrossChainDataRef'; +export { DataDescriptor, VDXF_Data, VDXFDataDescriptor, EHashTypes, MMRDescriptor, VectorEncodeVDXFUni } from './DataDescriptor'; +export { CLayer, CMMRNode, CMerkleMountainRange, CMMRBranch, CMMRProof, CMerkleMountainView, GetMMRProofIndex } from './MMR'; +export { SignatureData } from './SignatureData'; diff --git a/dist/vdxf/classes/index.js b/dist/vdxf/classes/index.js index 440bc48..1b221c7 100644 --- a/dist/vdxf/classes/index.js +++ b/dist/vdxf/classes/index.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.DataCategory = exports.defaultPersonalProfileDataTemplate = exports.Context = exports.ProvisioningTxid = exports.Attestation = exports.AltAuthFactor = exports.Audience = exports.RequestedPermission = exports.ProvisioningInfo = exports.Subject = exports.RedirectUri = exports.Hash160 = exports.LoginConsentProvisioningResult = exports.LoginConsentProvisioningDecision = exports.LoginConsentProvisioningResponse = exports.LoginConsentProvisioningChallenge = exports.LoginConsentProvisioningRequest = exports.VerusPayInvoice = exports.VerusPayInvoiceDetails = exports.SignedSessionObjectData = exports.SignedSessionObject = exports.LoginConsentResponse = exports.LoginConsentRequest = exports.LoginConsentDecision = exports.LoginConsentChallenge = void 0; +exports.SignatureData = exports.GetMMRProofIndex = exports.CMerkleMountainView = exports.CMMRProof = exports.CMMRBranch = exports.CMerkleMountainRange = exports.CMMRNode = exports.CLayer = exports.VectorEncodeVDXFUni = exports.MMRDescriptor = exports.EHashTypes = exports.VDXFDataDescriptor = exports.VDXF_Data = exports.DataDescriptor = exports.CrossChainDataRef = exports.URLRef = exports.IdentityMultimapRef = exports.PBaaSEvidenceRef = exports.CUTXORef = exports.DataCategory = exports.defaultPersonalProfileDataTemplate = exports.Context = exports.ProvisioningTxid = exports.Attestation = exports.AltAuthFactor = exports.Audience = exports.RequestedPermission = exports.ProvisioningInfo = exports.Subject = exports.RedirectUri = exports.Hash160 = exports.LoginConsentProvisioningResult = exports.LoginConsentProvisioningDecision = exports.LoginConsentProvisioningResponse = exports.LoginConsentProvisioningChallenge = exports.LoginConsentProvisioningRequest = exports.VerusPayInvoice = exports.VerusPayInvoiceDetails = exports.SignedSessionObjectData = exports.SignedSessionObject = exports.LoginConsentResponse = exports.LoginConsentRequest = exports.LoginConsentDecision = exports.LoginConsentChallenge = void 0; var Challenge_1 = require("./Challenge"); Object.defineProperty(exports, "LoginConsentChallenge", { enumerable: true, get: function () { return Challenge_1.Challenge; } }); var Decision_1 = require("./Decision"); @@ -45,3 +45,26 @@ Object.defineProperty(exports, "Context", { enumerable: true, get: function () { var PersonalProfile_1 = require("./PersonalProfile"); Object.defineProperty(exports, "defaultPersonalProfileDataTemplate", { enumerable: true, get: function () { return PersonalProfile_1.defaultPersonalProfileDataTemplate; } }); Object.defineProperty(exports, "DataCategory", { enumerable: true, get: function () { return PersonalProfile_1.DataCategory; } }); +var CrossChainDataRef_1 = require("./CrossChainDataRef"); +Object.defineProperty(exports, "CUTXORef", { enumerable: true, get: function () { return CrossChainDataRef_1.CUTXORef; } }); +Object.defineProperty(exports, "PBaaSEvidenceRef", { enumerable: true, get: function () { return CrossChainDataRef_1.PBaaSEvidenceRef; } }); +Object.defineProperty(exports, "IdentityMultimapRef", { enumerable: true, get: function () { return CrossChainDataRef_1.IdentityMultimapRef; } }); +Object.defineProperty(exports, "URLRef", { enumerable: true, get: function () { return CrossChainDataRef_1.URLRef; } }); +Object.defineProperty(exports, "CrossChainDataRef", { enumerable: true, get: function () { return CrossChainDataRef_1.CrossChainDataRef; } }); +var DataDescriptor_1 = require("./DataDescriptor"); +Object.defineProperty(exports, "DataDescriptor", { enumerable: true, get: function () { return DataDescriptor_1.DataDescriptor; } }); +Object.defineProperty(exports, "VDXF_Data", { enumerable: true, get: function () { return DataDescriptor_1.VDXF_Data; } }); +Object.defineProperty(exports, "VDXFDataDescriptor", { enumerable: true, get: function () { return DataDescriptor_1.VDXFDataDescriptor; } }); +Object.defineProperty(exports, "EHashTypes", { enumerable: true, get: function () { return DataDescriptor_1.EHashTypes; } }); +Object.defineProperty(exports, "MMRDescriptor", { enumerable: true, get: function () { return DataDescriptor_1.MMRDescriptor; } }); +Object.defineProperty(exports, "VectorEncodeVDXFUni", { enumerable: true, get: function () { return DataDescriptor_1.VectorEncodeVDXFUni; } }); +var MMR_1 = require("./MMR"); +Object.defineProperty(exports, "CLayer", { enumerable: true, get: function () { return MMR_1.CLayer; } }); +Object.defineProperty(exports, "CMMRNode", { enumerable: true, get: function () { return MMR_1.CMMRNode; } }); +Object.defineProperty(exports, "CMerkleMountainRange", { enumerable: true, get: function () { return MMR_1.CMerkleMountainRange; } }); +Object.defineProperty(exports, "CMMRBranch", { enumerable: true, get: function () { return MMR_1.CMMRBranch; } }); +Object.defineProperty(exports, "CMMRProof", { enumerable: true, get: function () { return MMR_1.CMMRProof; } }); +Object.defineProperty(exports, "CMerkleMountainView", { enumerable: true, get: function () { return MMR_1.CMerkleMountainView; } }); +Object.defineProperty(exports, "GetMMRProofIndex", { enumerable: true, get: function () { return MMR_1.GetMMRProofIndex; } }); +var SignatureData_1 = require("./SignatureData"); +Object.defineProperty(exports, "SignatureData", { enumerable: true, get: function () { return SignatureData_1.SignatureData; } }); diff --git a/src/vdxf/classes/CrossChainDataRef.ts b/src/vdxf/classes/CrossChainDataRef.ts index 2c1ff65..3cffd55 100644 --- a/src/vdxf/classes/CrossChainDataRef.ts +++ b/src/vdxf/classes/CrossChainDataRef.ts @@ -163,8 +163,8 @@ export class IdentityMultimapRef implements SerializableEntity { byteLength += varint.encodingLength(this.flags); byteLength += 20; // idID uint160 byteLength += 20; // key uint160 - byteLength += 4; // heightStart uint32 - byteLength += 4; // heightEnd uint32 + byteLength += varint.encodingLength(this.heightStart); // heightStart uint32 + byteLength += varint.encodingLength(this.heightEnd); // heightEnd uint32 byteLength += 32; // dataHash uint25 if (this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH).gt(new BN(0))) { diff --git a/src/vdxf/classes/DataDescriptor.ts b/src/vdxf/classes/DataDescriptor.ts index e044eca..55f5899 100644 --- a/src/vdxf/classes/DataDescriptor.ts +++ b/src/vdxf/classes/DataDescriptor.ts @@ -801,7 +801,7 @@ export class VDXF_Data extends BufferDataVdxfObject { GetHash() { }; }; -export class CVDXFDataDescriptor extends BufferDataVdxfObject { +export class VDXFDataDescriptor extends BufferDataVdxfObject { dataDescriptor: DataDescriptor; constructor(vdxfData: BufferDataVdxfObject) { diff --git a/src/vdxf/classes/MMR.ts b/src/vdxf/classes/MMR.ts index c115e05..c92edae 100644 --- a/src/vdxf/classes/MMR.ts +++ b/src/vdxf/classes/MMR.ts @@ -11,7 +11,7 @@ import bufferutils from '../../utils/bufferutils' const { BufferReader, BufferWriter } = bufferutils; const BRANCH_MMRBLAKE_NODE = 2 -class CLayer +export class CLayer { private vSize: number; @@ -614,7 +614,7 @@ export class CMerkleMountainView { }; } -const GetMMRProofIndex = (pos: number, mmvSize: number, extraHashes: number): InstanceType => { +export const GetMMRProofIndex = (pos: number, mmvSize: number, extraHashes: number): InstanceType => { let index = new BN(0); let layerSizes = []; let merkleSizes = []; diff --git a/src/vdxf/classes/index.ts b/src/vdxf/classes/index.ts index e790388..471a880 100644 --- a/src/vdxf/classes/index.ts +++ b/src/vdxf/classes/index.ts @@ -38,4 +38,8 @@ export { ProvisioningTxid } from './provisioning/ProvisioningResult' export { Context } from './Context' -export { defaultPersonalProfileDataTemplate, DataCategory } from './PersonalProfile' \ No newline at end of file +export { defaultPersonalProfileDataTemplate, DataCategory } from './PersonalProfile' +export { CUTXORef, PBaaSEvidenceRef, IdentityMultimapRef, URLRef, CrossChainDataRef } from './CrossChainDataRef' +export { DataDescriptor, VDXF_Data, VDXFDataDescriptor, EHashTypes, MMRDescriptor, VectorEncodeVDXFUni } from './DataDescriptor' +export { CLayer, CMMRNode, CMerkleMountainRange, CMMRBranch, CMMRProof, CMerkleMountainView, GetMMRProofIndex} from './MMR' +export { SignatureData } from './SignatureData' \ No newline at end of file From 4f00f0fc100aa18e13f904e478b3ac334cc262b4 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Mon, 29 Apr 2024 09:05:10 +0100 Subject: [PATCH 091/120] Add Attestation keys for Name and Type --- dist/vdxf/keys.d.ts | 2 ++ dist/vdxf/keys.js | 19 ++++++++++++++++++- src/vdxf/keys.ts | 19 +++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/dist/vdxf/keys.d.ts b/dist/vdxf/keys.d.ts index feca605..547ad1c 100644 --- a/dist/vdxf/keys.d.ts +++ b/dist/vdxf/keys.d.ts @@ -53,5 +53,7 @@ export declare const ATTESTATION_PROVISION_TYPE: VDXFKeyInterface; export declare const ATTESTATION_VIEW_REQUEST: VDXFKeyInterface; export declare const ATTESTATION_VIEW_RESPONSE: VDXFKeyInterface; export declare const ATTESTATION_ID: VDXFKeyInterface; +export declare const ATTESTATION_NAME: VDXFKeyInterface; +export declare const ATTESTATION_TYPE: VDXFKeyInterface; export declare const PROFILE_DATA_VIEW_REQUEST: VDXFKeyInterface; export declare const DATA_TYPE_STRING: VDXFKeyInterface; diff --git a/dist/vdxf/keys.js b/dist/vdxf/keys.js index efa89df..e7630fd 100644 --- a/dist/vdxf/keys.js +++ b/dist/vdxf/keys.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.DATA_TYPE_STRING = exports.PROFILE_DATA_VIEW_REQUEST = exports.ATTESTATION_ID = exports.ATTESTATION_VIEW_RESPONSE = exports.ATTESTATION_VIEW_REQUEST = exports.ATTESTATION_PROVISION_TYPE = exports.ATTESTATION_PROVISION_URL = exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.IDENTITY_AUTH_SIG_VDXF_KEY = exports.VERUSPAY_INVOICE_VDXF_KEY = void 0; +exports.DATA_TYPE_STRING = exports.PROFILE_DATA_VIEW_REQUEST = exports.ATTESTATION_TYPE = exports.ATTESTATION_NAME = exports.ATTESTATION_ID = exports.ATTESTATION_VIEW_RESPONSE = exports.ATTESTATION_VIEW_REQUEST = exports.ATTESTATION_PROVISION_TYPE = exports.ATTESTATION_PROVISION_URL = exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.IDENTITY_AUTH_SIG_VDXF_KEY = exports.VERUSPAY_INVOICE_VDXF_KEY = void 0; exports.VERUSPAY_INVOICE_VDXF_KEY = { hash160result: "628efc28c2e2d40050e1a9de7a93e7ddf2aa0076", qualifiedname: { @@ -348,6 +348,23 @@ exports.ATTESTATION_ID = { "name": "vrsc::attestation.id" } }; +exports.ATTESTATION_NAME = { + "vdxfid": "iEEjVkvM9Niz4u2WCr6QQzx1zpVSvDFub1", + "hash160result": "8a00bdd77505b345ed85d7292459b61457a10d76", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestation.name" + } +}; +exports.ATTESTATION_TYPE = { + "vdxfid": "iAJUD5mgT6MHz8ymF49XUtBDRS7uvYqNWZ", + "indexid": "xF8aftCmJQZxcJro6jogTGhkT68vqfCDCm", + "hash160result": "e56544849c038b7cfadb0a1074ac51df9207e24a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestation.type" + } +}; exports.PROFILE_DATA_VIEW_REQUEST = { "vdxfid": "iEocxePWah2zp5Hn4ujeoQpc4UVYeJeQ2g", "indexid": "xKdjRSpbS1FfSFAovbPomoM968WZVsmW1E", diff --git a/src/vdxf/keys.ts b/src/vdxf/keys.ts index be3ba1e..3d9c9af 100644 --- a/src/vdxf/keys.ts +++ b/src/vdxf/keys.ts @@ -410,6 +410,25 @@ export const ATTESTATION_ID: VDXFKeyInterface = { } }; +export const ATTESTATION_NAME: VDXFKeyInterface = { + "vdxfid": "iEEjVkvM9Niz4u2WCr6QQzx1zpVSvDFub1", + "hash160result": "8a00bdd77505b345ed85d7292459b61457a10d76", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestation.name" + } +}; + +export const ATTESTATION_TYPE: VDXFKeyInterface = { + "vdxfid": "iAJUD5mgT6MHz8ymF49XUtBDRS7uvYqNWZ", + "indexid": "xF8aftCmJQZxcJro6jogTGhkT68vqfCDCm", + "hash160result": "e56544849c038b7cfadb0a1074ac51df9207e24a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestation.type" + } +}; + export const PROFILE_DATA_VIEW_REQUEST: VDXFKeyInterface = { "vdxfid": "iEocxePWah2zp5Hn4ujeoQpc4UVYeJeQ2g", "indexid": "xKdjRSpbS1FfSFAovbPomoM968WZVsmW1E", From 079132b217dab2b713d3283ca46a3978c537ea37 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Mon, 29 Apr 2024 13:36:55 +0100 Subject: [PATCH 092/120] Updates for debug --- dist/vdxf/classes/Challenge.js | 2 +- dist/vdxf/classes/DataDescriptor.d.ts | 4 ++-- dist/vdxf/classes/DataDescriptor.js | 23 ++++++++++++--------- dist/vdxf/classes/Decision.js | 2 +- dist/vdxf/classes/PersonalProfile.js | 4 ++-- dist/vdxf/classes/index.d.ts | 4 ---- dist/vdxf/classes/index.js | 29 +++++---------------------- dist/vdxf/index.d.ts | 3 --- dist/vdxf/index.js | 8 +------- src/vdxf/classes/Challenge.ts | 2 +- src/vdxf/classes/DataDescriptor.ts | 29 +++++++++++++++------------ src/vdxf/classes/Decision.ts | 2 +- src/vdxf/classes/PersonalProfile.ts | 4 ++-- src/vdxf/classes/index.ts | 8 ++++---- src/vdxf/index.ts | 6 ------ 15 files changed, 49 insertions(+), 81 deletions(-) diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index b182662..0a782dd 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -219,7 +219,7 @@ class Challenge extends __1.VDXFObject { this.attestations = []; const attestationsLength = reader.readCompactSize(); for (let i = 0; i < attestationsLength; i++) { - const _att = new Attestation_1.Attestation("", ""); + const _att = new Attestation_1.Attestation(); reader.offset = _att.fromBuffer(reader.buffer, reader.offset); this.attestations.push(_att); } diff --git a/dist/vdxf/classes/DataDescriptor.d.ts b/dist/vdxf/classes/DataDescriptor.d.ts index daa827c..a659b70 100644 --- a/dist/vdxf/classes/DataDescriptor.d.ts +++ b/dist/vdxf/classes/DataDescriptor.d.ts @@ -54,7 +54,6 @@ export declare class DataDescriptor { IsValid(): boolean; } export declare class VDXF_Data extends BufferDataVdxfObject { - constructor(data: string, key: string); static DataByteKeyName(): string; static DataByteKey(): VDXFKeyInterface; static DataInt16KeyName(): string; @@ -127,7 +126,8 @@ export declare class VDXF_Data extends BufferDataVdxfObject { } export declare class VDXFDataDescriptor extends BufferDataVdxfObject { dataDescriptor: DataDescriptor; - constructor(vdxfData: BufferDataVdxfObject); + constructor(dataDescriptor?: DataDescriptor, vdxfkey?: string, version?: BigNumber); + static fromDataVdfxObject(data: BufferDataVdxfObject): VDXFDataDescriptor; dataByteLength(): number; toDataBuffer(): Buffer; fromDataBuffer(buffer: Buffer, offset?: number): number; diff --git a/dist/vdxf/classes/DataDescriptor.js b/dist/vdxf/classes/DataDescriptor.js index 2accc5f..4f9426b 100644 --- a/dist/vdxf/classes/DataDescriptor.js +++ b/dist/vdxf/classes/DataDescriptor.js @@ -229,9 +229,6 @@ DataDescriptor.FLAG_MASK = (DataDescriptor.FLAG_ENCRYPTED_DATA.add(DataDescripto ; // VDXF data that describes an encrypted chunk of data class VDXF_Data extends index_1.BufferDataVdxfObject { - constructor(data, key) { - super(data, key); - } static DataByteKeyName() { return "vrsc::data.type.byte"; } @@ -717,15 +714,21 @@ class VDXF_Data extends index_1.BufferDataVdxfObject { exports.VDXF_Data = VDXF_Data; ; class VDXFDataDescriptor extends index_1.BufferDataVdxfObject { - constructor(vdxfData) { - super(vdxfData.data, vdxfData.vdxfkey); - this.version = vdxfData.version; - if (this.data != null) { - this.dataDescriptor = new DataDescriptor(); - this.dataDescriptor.fromBuffer(Buffer.from(this.data, 'hex')); - delete this.data; + constructor(dataDescriptor, vdxfkey = "", version = new bn_js_1.BN(1)) { + super("", vdxfkey); + this.version = version; + if (dataDescriptor) { + this.dataDescriptor = dataDescriptor; } } + static fromDataVdfxObject(data) { + const retval = new VDXFDataDescriptor(); + retval.version = data.version; + retval.data = data.data; + retval.fromBuffer(Buffer.from(retval.data, 'hex')); + delete retval.data; + return retval; + } dataByteLength() { let length = 0; length += this.dataDescriptor.byteLength(); diff --git a/dist/vdxf/classes/Decision.js b/dist/vdxf/classes/Decision.js index 5799a0f..083e028 100644 --- a/dist/vdxf/classes/Decision.js +++ b/dist/vdxf/classes/Decision.js @@ -85,7 +85,7 @@ class Decision extends __1.VDXFObject { this.attestations = []; const attestationsLength = reader.readCompactSize(); for (let i = 0; i < attestationsLength; i++) { - const _att = new Attestation_1.Attestation("", ""); + const _att = new Attestation_1.Attestation(); reader.offset = _att.fromBuffer(reader.buffer, reader.offset); this.attestations.push(_att); } diff --git a/dist/vdxf/classes/PersonalProfile.js b/dist/vdxf/classes/PersonalProfile.js index f093296..708e6a1 100644 --- a/dist/vdxf/classes/PersonalProfile.js +++ b/dist/vdxf/classes/PersonalProfile.js @@ -6,8 +6,8 @@ const __1 = require(".."); const identitykeys = require("../identityDataKeys"); const { BufferReader, BufferWriter } = bufferutils_1.default; class DataCategory extends __1.VDXFObject { - constructor(vdxfid, data, category, details) { - super(vdxfid || ""); + constructor(vdxfid = "", data, category, details) { + super(vdxfid); this.data = data || []; this.category = category || ""; this.details = details || ""; diff --git a/dist/vdxf/classes/index.d.ts b/dist/vdxf/classes/index.d.ts index e24fdec..cd0344a 100644 --- a/dist/vdxf/classes/index.d.ts +++ b/dist/vdxf/classes/index.d.ts @@ -26,7 +26,3 @@ export { Attestation } from './Attestation'; export { ProvisioningTxid } from './provisioning/ProvisioningResult'; export { Context } from './Context'; export { defaultPersonalProfileDataTemplate, DataCategory } from './PersonalProfile'; -export { CUTXORef, PBaaSEvidenceRef, IdentityMultimapRef, URLRef, CrossChainDataRef } from './CrossChainDataRef'; -export { DataDescriptor, VDXF_Data, VDXFDataDescriptor, EHashTypes, MMRDescriptor, VectorEncodeVDXFUni } from './DataDescriptor'; -export { CLayer, CMMRNode, CMerkleMountainRange, CMMRBranch, CMMRProof, CMerkleMountainView, GetMMRProofIndex } from './MMR'; -export { SignatureData } from './SignatureData'; diff --git a/dist/vdxf/classes/index.js b/dist/vdxf/classes/index.js index 1b221c7..a2dfb9d 100644 --- a/dist/vdxf/classes/index.js +++ b/dist/vdxf/classes/index.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.SignatureData = exports.GetMMRProofIndex = exports.CMerkleMountainView = exports.CMMRProof = exports.CMMRBranch = exports.CMerkleMountainRange = exports.CMMRNode = exports.CLayer = exports.VectorEncodeVDXFUni = exports.MMRDescriptor = exports.EHashTypes = exports.VDXFDataDescriptor = exports.VDXF_Data = exports.DataDescriptor = exports.CrossChainDataRef = exports.URLRef = exports.IdentityMultimapRef = exports.PBaaSEvidenceRef = exports.CUTXORef = exports.DataCategory = exports.defaultPersonalProfileDataTemplate = exports.Context = exports.ProvisioningTxid = exports.Attestation = exports.AltAuthFactor = exports.Audience = exports.RequestedPermission = exports.ProvisioningInfo = exports.Subject = exports.RedirectUri = exports.Hash160 = exports.LoginConsentProvisioningResult = exports.LoginConsentProvisioningDecision = exports.LoginConsentProvisioningResponse = exports.LoginConsentProvisioningChallenge = exports.LoginConsentProvisioningRequest = exports.VerusPayInvoice = exports.VerusPayInvoiceDetails = exports.SignedSessionObjectData = exports.SignedSessionObject = exports.LoginConsentResponse = exports.LoginConsentRequest = exports.LoginConsentDecision = exports.LoginConsentChallenge = void 0; +exports.DataCategory = exports.defaultPersonalProfileDataTemplate = exports.Context = exports.ProvisioningTxid = exports.Attestation = exports.AltAuthFactor = exports.Audience = exports.RequestedPermission = exports.ProvisioningInfo = exports.Subject = exports.RedirectUri = exports.Hash160 = exports.LoginConsentProvisioningResult = exports.LoginConsentProvisioningDecision = exports.LoginConsentProvisioningResponse = exports.LoginConsentProvisioningChallenge = exports.LoginConsentProvisioningRequest = exports.VerusPayInvoice = exports.VerusPayInvoiceDetails = exports.SignedSessionObjectData = exports.SignedSessionObject = exports.LoginConsentResponse = exports.LoginConsentRequest = exports.LoginConsentDecision = exports.LoginConsentChallenge = void 0; var Challenge_1 = require("./Challenge"); Object.defineProperty(exports, "LoginConsentChallenge", { enumerable: true, get: function () { return Challenge_1.Challenge; } }); var Decision_1 = require("./Decision"); @@ -45,26 +45,7 @@ Object.defineProperty(exports, "Context", { enumerable: true, get: function () { var PersonalProfile_1 = require("./PersonalProfile"); Object.defineProperty(exports, "defaultPersonalProfileDataTemplate", { enumerable: true, get: function () { return PersonalProfile_1.defaultPersonalProfileDataTemplate; } }); Object.defineProperty(exports, "DataCategory", { enumerable: true, get: function () { return PersonalProfile_1.DataCategory; } }); -var CrossChainDataRef_1 = require("./CrossChainDataRef"); -Object.defineProperty(exports, "CUTXORef", { enumerable: true, get: function () { return CrossChainDataRef_1.CUTXORef; } }); -Object.defineProperty(exports, "PBaaSEvidenceRef", { enumerable: true, get: function () { return CrossChainDataRef_1.PBaaSEvidenceRef; } }); -Object.defineProperty(exports, "IdentityMultimapRef", { enumerable: true, get: function () { return CrossChainDataRef_1.IdentityMultimapRef; } }); -Object.defineProperty(exports, "URLRef", { enumerable: true, get: function () { return CrossChainDataRef_1.URLRef; } }); -Object.defineProperty(exports, "CrossChainDataRef", { enumerable: true, get: function () { return CrossChainDataRef_1.CrossChainDataRef; } }); -var DataDescriptor_1 = require("./DataDescriptor"); -Object.defineProperty(exports, "DataDescriptor", { enumerable: true, get: function () { return DataDescriptor_1.DataDescriptor; } }); -Object.defineProperty(exports, "VDXF_Data", { enumerable: true, get: function () { return DataDescriptor_1.VDXF_Data; } }); -Object.defineProperty(exports, "VDXFDataDescriptor", { enumerable: true, get: function () { return DataDescriptor_1.VDXFDataDescriptor; } }); -Object.defineProperty(exports, "EHashTypes", { enumerable: true, get: function () { return DataDescriptor_1.EHashTypes; } }); -Object.defineProperty(exports, "MMRDescriptor", { enumerable: true, get: function () { return DataDescriptor_1.MMRDescriptor; } }); -Object.defineProperty(exports, "VectorEncodeVDXFUni", { enumerable: true, get: function () { return DataDescriptor_1.VectorEncodeVDXFUni; } }); -var MMR_1 = require("./MMR"); -Object.defineProperty(exports, "CLayer", { enumerable: true, get: function () { return MMR_1.CLayer; } }); -Object.defineProperty(exports, "CMMRNode", { enumerable: true, get: function () { return MMR_1.CMMRNode; } }); -Object.defineProperty(exports, "CMerkleMountainRange", { enumerable: true, get: function () { return MMR_1.CMerkleMountainRange; } }); -Object.defineProperty(exports, "CMMRBranch", { enumerable: true, get: function () { return MMR_1.CMMRBranch; } }); -Object.defineProperty(exports, "CMMRProof", { enumerable: true, get: function () { return MMR_1.CMMRProof; } }); -Object.defineProperty(exports, "CMerkleMountainView", { enumerable: true, get: function () { return MMR_1.CMerkleMountainView; } }); -Object.defineProperty(exports, "GetMMRProofIndex", { enumerable: true, get: function () { return MMR_1.GetMMRProofIndex; } }); -var SignatureData_1 = require("./SignatureData"); -Object.defineProperty(exports, "SignatureData", { enumerable: true, get: function () { return SignatureData_1.SignatureData; } }); +// export { CUTXORef, PBaaSEvidenceRef, IdentityMultimapRef, URLRef, CrossChainDataRef } from './CrossChainDataRef' +// export { DataDescriptor, VDXF_Data, VDXFDataDescriptor, EHashTypes, MMRDescriptor, VectorEncodeVDXFUni } from './DataDescriptor' +// export { CLayer, CMMRNode, CMerkleMountainRange, CMMRBranch, CMMRProof, CMerkleMountainView, GetMMRProofIndex} from './MMR' +// export { SignatureData } from './SignatureData' diff --git a/dist/vdxf/index.d.ts b/dist/vdxf/index.d.ts index 7e0be37..5d98854 100644 --- a/dist/vdxf/index.d.ts +++ b/dist/vdxf/index.d.ts @@ -87,6 +87,3 @@ export declare class VerusIDSignature extends VDXFObject { static fromJson(data: VerusIDSignatureJson): VerusIDSignature; toJson(): VerusIDSignatureJson; } -export declare class PNGImageVdxfObject extends BufferDataVdxfObject { - constructor(data?: string, vdxfkey?: string); -} diff --git a/dist/vdxf/index.js b/dist/vdxf/index.js index 01af924..77ac181 100644 --- a/dist/vdxf/index.js +++ b/dist/vdxf/index.js @@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.PNGImageVdxfObject = exports.VerusIDSignature = exports.Utf8OrBase58Object = exports.HexDataVdxfObject = exports.Utf8DataVdxfObject = exports.BufferDataVdxfObject = exports.VDXFObject = void 0; +exports.VerusIDSignature = exports.Utf8OrBase58Object = exports.HexDataVdxfObject = exports.Utf8DataVdxfObject = exports.BufferDataVdxfObject = exports.VDXFObject = void 0; const base64url_1 = require("base64url"); const createHash = require("create-hash"); const vdxf_1 = require("../constants/vdxf"); @@ -208,9 +208,3 @@ class VerusIDSignature extends VDXFObject { } } exports.VerusIDSignature = VerusIDSignature; -class PNGImageVdxfObject extends BufferDataVdxfObject { - constructor(data = "", vdxfkey = "") { - super(data, vdxfkey, "hex"); - } -} -exports.PNGImageVdxfObject = PNGImageVdxfObject; diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index 9929494..41958a2 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -374,7 +374,7 @@ export class Challenge extends VDXFObject implements ChallengeInterface { const attestationsLength = reader.readCompactSize(); for (let i = 0; i < attestationsLength; i++) { - const _att = new Attestation("",""); + const _att = new Attestation(); reader.offset = _att.fromBuffer(reader.buffer, reader.offset); this.attestations.push(_att); } diff --git a/src/vdxf/classes/DataDescriptor.ts b/src/vdxf/classes/DataDescriptor.ts index 55f5899..dc895b0 100644 --- a/src/vdxf/classes/DataDescriptor.ts +++ b/src/vdxf/classes/DataDescriptor.ts @@ -297,10 +297,6 @@ export class DataDescriptor { // VDXF data that describes an encrypted chunk of data export class VDXF_Data extends BufferDataVdxfObject { - constructor(data: string, key: string) { - super(data, key); - - } static DataByteKeyName(): string { return "vrsc::data.type.byte"; @@ -804,17 +800,24 @@ export class VDXF_Data extends BufferDataVdxfObject { export class VDXFDataDescriptor extends BufferDataVdxfObject { dataDescriptor: DataDescriptor; - constructor(vdxfData: BufferDataVdxfObject) { - super(vdxfData.data, vdxfData.vdxfkey); - this.version = vdxfData.version; - if (this.data != null) { - - this.dataDescriptor = new DataDescriptor(); + constructor( dataDescriptor?: DataDescriptor, + vdxfkey: string = "", + version: BigNumber = new BN(1)) { + super("", vdxfkey); + this.version = version; + if (dataDescriptor) { + this.dataDescriptor = dataDescriptor; + } + } - this.dataDescriptor.fromBuffer(Buffer.from(this.data, 'hex')); - delete this.data; + static fromDataVdfxObject(data: BufferDataVdxfObject): VDXFDataDescriptor { - } + const retval = new VDXFDataDescriptor(); + retval.version = data.version; + retval.data = data.data; + retval.fromBuffer(Buffer.from(retval.data, 'hex')); + delete retval.data; + return retval; } dataByteLength(): number { diff --git a/src/vdxf/classes/Decision.ts b/src/vdxf/classes/Decision.ts index adb2f89..534aa25 100644 --- a/src/vdxf/classes/Decision.ts +++ b/src/vdxf/classes/Decision.ts @@ -155,7 +155,7 @@ export class Decision extends VDXFObject { const attestationsLength = reader.readCompactSize(); for (let i = 0; i < attestationsLength; i++) { - const _att = new Attestation("",""); + const _att = new Attestation(); reader.offset = _att.fromBuffer(reader.buffer, reader.offset); this.attestations.push(_att); } diff --git a/src/vdxf/classes/PersonalProfile.ts b/src/vdxf/classes/PersonalProfile.ts index 92d0366..7690bf4 100644 --- a/src/vdxf/classes/PersonalProfile.ts +++ b/src/vdxf/classes/PersonalProfile.ts @@ -12,8 +12,8 @@ export class DataCategory extends VDXFObject { data: Array; category: string; details: string; - constructor(vdxfid?: string, data?: Array, category?: string, details?: string) { - super(vdxfid || ""); + constructor(vdxfid: string = "", data?: Array, category?: string, details?: string) { + super(vdxfid); this.data = data || []; this.category = category || ""; this.details = details || ""; diff --git a/src/vdxf/classes/index.ts b/src/vdxf/classes/index.ts index 471a880..404e680 100644 --- a/src/vdxf/classes/index.ts +++ b/src/vdxf/classes/index.ts @@ -39,7 +39,7 @@ export { } from './provisioning/ProvisioningResult' export { Context } from './Context' export { defaultPersonalProfileDataTemplate, DataCategory } from './PersonalProfile' -export { CUTXORef, PBaaSEvidenceRef, IdentityMultimapRef, URLRef, CrossChainDataRef } from './CrossChainDataRef' -export { DataDescriptor, VDXF_Data, VDXFDataDescriptor, EHashTypes, MMRDescriptor, VectorEncodeVDXFUni } from './DataDescriptor' -export { CLayer, CMMRNode, CMerkleMountainRange, CMMRBranch, CMMRProof, CMerkleMountainView, GetMMRProofIndex} from './MMR' -export { SignatureData } from './SignatureData' \ No newline at end of file +// export { CUTXORef, PBaaSEvidenceRef, IdentityMultimapRef, URLRef, CrossChainDataRef } from './CrossChainDataRef' +// export { DataDescriptor, VDXF_Data, VDXFDataDescriptor, EHashTypes, MMRDescriptor, VectorEncodeVDXFUni } from './DataDescriptor' +// export { CLayer, CMMRNode, CMerkleMountainRange, CMMRBranch, CMMRProof, CMerkleMountainView, GetMMRProofIndex} from './MMR' +// export { SignatureData } from './SignatureData' \ No newline at end of file diff --git a/src/vdxf/index.ts b/src/vdxf/index.ts index 76d224f..73ae453 100644 --- a/src/vdxf/index.ts +++ b/src/vdxf/index.ts @@ -284,9 +284,3 @@ export class VerusIDSignature extends VDXFObject { }; } } - -export class PNGImageVdxfObject extends BufferDataVdxfObject { - constructor(data: string = "", vdxfkey: string = "") { - super(data, vdxfkey, "hex"); - } -} \ No newline at end of file From 97b0b340572db893d95bae48d7c40c803afc4c0a Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Mon, 29 Apr 2024 14:29:13 +0100 Subject: [PATCH 093/120] Remove circular dependancy --- dist/vdxf/classes/Attestation.d.ts | 4 +- dist/vdxf/classes/Attestation.js | 3 +- dist/vdxf/classes/DataDescriptor.d.ts | 72 --- dist/vdxf/classes/DataDescriptor.js | 493 +--------------- dist/vdxf/classes/IdentityData.js | 434 +++++++------- dist/vdxf/classes/index.d.ts | 2 + dist/vdxf/classes/index.js | 15 +- dist/vdxf/index.d.ts | 1 + dist/vdxf/index.js | 1 + dist/vdxf/vdxfDataKeys.d.ts | 69 +++ dist/vdxf/vdxfDataKeys.js | 551 ++++++++++++++++++ src/__tests__/attestation/attestation.test.ts | 10 +- src/__tests__/vdxf/loginconsent.test.ts | 3 +- src/vdxf/classes/Attestation.ts | 5 +- src/vdxf/classes/DataDescriptor.ts | 507 +--------------- src/vdxf/classes/IdentityData.ts | 2 +- src/vdxf/classes/index.ts | 6 +- src/vdxf/index.ts | 2 +- src/vdxf/vdxfDataKeys.ts | 497 ++++++++++++++++ 19 files changed, 1368 insertions(+), 1309 deletions(-) create mode 100644 dist/vdxf/vdxfDataKeys.d.ts create mode 100644 dist/vdxf/vdxfDataKeys.js create mode 100644 src/vdxf/vdxfDataKeys.ts diff --git a/dist/vdxf/classes/Attestation.d.ts b/dist/vdxf/classes/Attestation.d.ts index f1a83d6..adc9b81 100644 --- a/dist/vdxf/classes/Attestation.d.ts +++ b/dist/vdxf/classes/Attestation.d.ts @@ -1,11 +1,11 @@ -import { VDXF_Data } from './DataDescriptor'; +import { BufferDataVdxfObject } from '../index'; export interface AttestationRequestInterface { attestationId: string; accepted_attestors: Array; attestation_keys: Array; attestor_filters?: Array; } -export declare class Attestation extends VDXF_Data { +export declare class Attestation extends BufferDataVdxfObject { setAttestationViewRequestData(attestationId: string, accepted_attestors: Array, attestation_keys: Array, attestor_filters: Array): void; getAttestationViewRequestData(): AttestationRequestInterface; getAttestationProvisioningData(): any[]; diff --git a/dist/vdxf/classes/Attestation.js b/dist/vdxf/classes/Attestation.js index 066c800..6abacc2 100644 --- a/dist/vdxf/classes/Attestation.js +++ b/dist/vdxf/classes/Attestation.js @@ -7,8 +7,9 @@ const vdxf_1 = require("../../constants/vdxf"); const DataDescriptor_1 = require("./DataDescriptor"); const __1 = require("../"); const varuint_1 = require("../../utils/varuint"); +const index_1 = require("../index"); const { BufferReader, BufferWriter } = bufferutils_1.default; -class Attestation extends DataDescriptor_1.VDXF_Data { +class Attestation extends index_1.BufferDataVdxfObject { setAttestationViewRequestData(attestationId, accepted_attestors, attestation_keys, attestor_filters) { this.vdxfkey = __1.ATTESTATION_VIEW_REQUEST.vdxfid; let length = 20; // attestationId diff --git a/dist/vdxf/classes/DataDescriptor.d.ts b/dist/vdxf/classes/DataDescriptor.d.ts index a659b70..85749cb 100644 --- a/dist/vdxf/classes/DataDescriptor.d.ts +++ b/dist/vdxf/classes/DataDescriptor.d.ts @@ -2,7 +2,6 @@ /// import { BigNumber } from '../../utils/types/BigNumber'; import { BufferDataVdxfObject } from '../index'; -import { VDXFKeyInterface } from "../keys"; export declare class DataDescriptor { static VERSION_INVALID: import("bn.js"); static VERSION_FIRST: import("bn.js"); @@ -53,77 +52,6 @@ export declare class DataDescriptor { SetFlags(): void; IsValid(): boolean; } -export declare class VDXF_Data extends BufferDataVdxfObject { - static DataByteKeyName(): string; - static DataByteKey(): VDXFKeyInterface; - static DataInt16KeyName(): string; - static DataInt16Key(): VDXFKeyInterface; - static DataUint16KeyName(): string; - static DataUint16Key(): VDXFKeyInterface; - static DataInt32KeyName(): string; - static DataInt32Key(): VDXFKeyInterface; - static DataUint32KeyName(): string; - static DataUint32Key(): VDXFKeyInterface; - static DataInt64KeyName(): string; - static DataInt64Key(): VDXFKeyInterface; - static DataUint64KeyName(): string; - static DataUint64Key(): VDXFKeyInterface; - static DataUint160KeyName(): string; - static DataUint160Key(): VDXFKeyInterface; - static DataUint256KeyName(): string; - static DataUint256Key(): VDXFKeyInterface; - static DataStringKeyName(): string; - static DataStringKey(): VDXFKeyInterface; - static DataVectorKeyName(): string; - static DataVectorKey(): VDXFKeyInterface; - static DataByteVectorKeyName(): string; - static DataByteVectorKey(): VDXFKeyInterface; - static DataInt32VectorKeyName(): string; - static DataInt32VectorKey(): VDXFKeyInterface; - static DataInt64VectorKeyName(): string; - static DataInt64VectorKey(): VDXFKeyInterface; - static DataCurrencyMapKeyName(): string; - static DataCurrencyMapKey(): VDXFKeyInterface; - static DataRatingsKeyName(): string; - static DataRatingsKey(): VDXFKeyInterface; - static DataURLKeyName(): string; - static DataURLKey(): VDXFKeyInterface; - static DataTransferDestinationKeyName(): string; - static DataTransferDestinationKey(): VDXFKeyInterface; - static UTXORefKeyName(): string; - static UTXORefKey(): VDXFKeyInterface; - static CrossChainDataRefKeyName(): string; - static CrossChainDataRefKey(): VDXFKeyInterface; - static EncryptionDescriptorKeyName(): string; - static EncryptionDescriptorKey(): VDXFKeyInterface; - static SaltedDataKeyName(): string; - static SaltedDataKey(): VDXFKeyInterface; - static DataDescriptorKeyName(): string; - static DataDescriptorKey(): VDXFKeyInterface; - static SignatureDataKeyName(): string; - static SignatureDataKey(): VDXFKeyInterface; - static VectorUint256KeyName(): string; - static VectorUint256Key(): VDXFKeyInterface; - static MMRLinksKeyName(): string; - static MMRLinksKey(): VDXFKeyInterface; - static MMRDescriptorKeyName(): string; - static MMRDescriptorKey(): VDXFKeyInterface; - static TypeDefinitionKeyName(): string; - static TypeDefinitionKey(): VDXFKeyInterface; - static MultiMapKeyName(): string; - static MultiMapKey(): VDXFKeyInterface; - static ContentMultiMapRemoveKeyName(): string; - static ContentMultiMapRemoveKey(): VDXFKeyInterface; - static ProfileMediaKeyName(): string; - static ProfileMediaKey(): VDXFKeyInterface; - static ZMemoMessageKeyName(): string; - static ZMemoMessageKey(): VDXFKeyInterface; - static ZMemoSignatureKeyName(): string; - static ZMemoSignatureKey(): VDXFKeyInterface; - static CurrencyStartNotarizationKeyName(): string; - static CurrencyStartNotarizationKey(): VDXFKeyInterface; - GetHash(): void; -} export declare class VDXFDataDescriptor extends BufferDataVdxfObject { dataDescriptor: DataDescriptor; constructor(dataDescriptor?: DataDescriptor, vdxfkey?: string, version?: BigNumber); diff --git a/dist/vdxf/classes/DataDescriptor.js b/dist/vdxf/classes/DataDescriptor.js index 4f9426b..e2f2c03 100644 --- a/dist/vdxf/classes/DataDescriptor.js +++ b/dist/vdxf/classes/DataDescriptor.js @@ -1,8 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.VectorEncodeVDXFUni = exports.MMRDescriptor = exports.EHashTypes = exports.VDXFDataDescriptor = exports.VDXF_Data = exports.DataDescriptor = void 0; +exports.VectorEncodeVDXFUni = exports.MMRDescriptor = exports.EHashTypes = exports.VDXFDataDescriptor = exports.DataDescriptor = void 0; const bn_js_1 = require("bn.js"); -const index_1 = require("../index"); const varint_1 = require("../../utils/varint"); const varuint_1 = require("../../utils/varuint"); const bufferutils_1 = require("../../utils/bufferutils"); @@ -16,6 +15,8 @@ const ContentMultiMapRemove_1 = require("../../pbaas/ContentMultiMapRemove"); const CrossChainDataRef_1 = require("./CrossChainDataRef"); const vdxf_1 = require("../../constants/vdxf"); const SignatureData_1 = require("./SignatureData"); +const index_1 = require("../index"); +const VDXF_Data = require("../vdxfDataKeys"); class DataDescriptor { constructor(data) { this.flags = new bn_js_1.BN(0); @@ -81,7 +82,7 @@ class DataDescriptor { return newDataDescriptor; } DecodeHashVector() { - const vdxfData = new VDXF_Data("", ""); + const vdxfData = new index_1.BufferDataVdxfObject(); vdxfData.fromBuffer(this.objectdata); const hashes = []; if (vdxfData.vdxfkey == VDXF_Data.VectorUint256Key().vdxfid) { @@ -227,492 +228,6 @@ DataDescriptor.FLAG_LABEL_PRESENT = new bn_js_1.BN(0x20); DataDescriptor.FLAG_MIME_TYPE_PRESENT = new bn_js_1.BN(0x40); DataDescriptor.FLAG_MASK = (DataDescriptor.FLAG_ENCRYPTED_DATA.add(DataDescriptor.FLAG_SALT_PRESENT).add(DataDescriptor.FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT).add(DataDescriptor.FLAG_INCOMING_VIEWING_KEY_PRESENT).add(DataDescriptor.FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT).add(DataDescriptor.FLAG_LABEL_PRESENT).add(DataDescriptor.FLAG_MIME_TYPE_PRESENT)); ; -// VDXF data that describes an encrypted chunk of data -class VDXF_Data extends index_1.BufferDataVdxfObject { - static DataByteKeyName() { - return "vrsc::data.type.byte"; - } - static DataByteKey() { - return { - "vdxfid": "iBXUHbh4iacbeZnzDRxishvBSrYk2S2k7t", - "indexid": "xGMakQ89ZtqGGjg257csr6SiUWZksGmjWp", - "hash160result": "2e97a8bba443773812341e1d761530d3bba04f58", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.byte" - } - }; - } - static DataInt16KeyName() { - return "vrsc::data.type.int16"; - } - static DataInt16Key() { - return { - "vdxfid": "iDtTv3wf1Vk3M2Y46RjLPKtttx5hydwtY1", - "indexid": "xJiaNrNjroxhyCR5x7PVMiRRvc6ipg6N9g", - "hash160result": "ee334ebd432db0b24cc2702eda61c28ff44d3872", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int16" - } - }; - } - static DataUint16KeyName() { - return "vrsc::data.type.uint16"; - } - static DataUint16Key() { - return { - "vdxfid": "iHn7urT2yVfS7pQn6WGAmCVWh4HBLV24n3", - "indexid": "xNcENet7pot6jzHoxBvKjb23iiJCGpekDk", - "hash160result": "5cfc322d2a216145f7b82714115e7953269de59c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint16" - } - }; - } - static DataInt32KeyName() { - return "vrsc::data.type.int32"; - } - static DataInt32Key() { - return { - "vdxfid": "iHpLPprRDv3H5H3ZMaJ9nyHFzkG9xJWZDb", - "indexid": "xNeSrdHW5EFwhSvbDFxJmMoo2QHAtoEaEM", - "hash160result": "3e9ba478b23b13232f28d21051d907ce8fdd509d", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int32" - } - }; - } - static DataUint32KeyName() { - return "vrsc::data.type.uint32"; - } - static DataUint32Key() { - return { - "vdxfid": "iKSj5zhd6cSsLudaGhtfmisRNgEM7SPFWY", - "indexid": "xQGqYo8hwvfXy5Wc8PYpk7PxQLFMwfP7Fp", - "hash160result": "f279818aeb4fe768956b350d1fc7216ca0e82aaf", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint32" - } - }; - } - static DataInt64KeyName() { - return "vrsc::data.type.int64"; - } - static DataInt64Key() { - return { - "vdxfid": "iKB3TGi9Dg5HZ4nQAgLQAgp3tuXBaRKHpC", - "indexid": "xQ19v59E4zHxBEfS2MzZ95LavZYCTTeuyg", - "hash160result": "ab3705f8a7fae59786ef897b014df85fcd9533ac", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int64" - } - }; - } - static DataUint64KeyName() { - return "vrsc::data.type.uint64"; - } - static DataUint64Key() { - return { - "vdxfid": "iPamkQf38AeGQ8z4zSsZL7t9kXMeUkYLJL", - "indexid": "xUQtDD67yUrw2Js6r8XiJWQgnBNfNeeoUq", - "hash160result": "bb2ae9ed3e9f400def0724937fbf65f23ef690dc", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint64" - } - }; - } - static DataUint160KeyName() { - return "vrsc::data.type.uint160"; - } - static DataUint160Key() { - return { - "vdxfid": "iAAwdbLyKYL39nJ1eQHaHtb75krg4mV1Lq", - "indexid": "xF146Pn4ArYhmxB3W5wjGH7e7Qsgx9bkpj", - "hash160result": "d97d2295d4c73f6f6f0697c8086bd822d6977549", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint160" - } - }; - } - static DataUint256KeyName() { - return "vrsc::data.type.uint256"; - } - static DataUint256Key() { - return { - "vdxfid": "i8k7g7z6grtGYrNZmZr5TQ872aHssXuuua", - "indexid": "xDaE8vRBYB6wB2FbdFWERnee4EJtjbCtMM", - "hash160result": "939b27bea698d180237c40b2194025acc673cb39", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint256" - } - }; - } - static DataStringKeyName() { - return "vrsc::data.type.string"; - } - static DataStringKey() { - return { - "vdxfid": "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c", - "indexid": "xPwgY6oPdusaAgNK3u5yHCQG5NsHEcBpi5", - "hash160result": "e5c061641228a399169211e666de18448b7b8bab", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.string" - } - }; - } - // this is a key for a typed vector, which will have the object type key following the vector key - static DataVectorKeyName() { - return "vrsc::data.type.vector"; - } - static DataVectorKey() { - return { - "vdxfid": "iAEShwk1xjdGhaUSz3Maa2XR32o3vRuHq7", - "indexid": "xF4ZAkB6p3qwKkMUqj1jYR3x4gp4mGz657", - "hash160result": "503875b0dc301189a98927d3ece56c5f921c1f4a", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.vector" - } - }; - } - static DataByteVectorKeyName() { - return "vrsc::data.type.bytevector"; - } - static DataByteVectorKey() { - return { - "vdxfid": "iKMhRLX1JHQihVZx2t2pAWW2uzmK6AzwW3", - "indexid": "xQBot8x69bdPKfSytZgy8u2ZwenKzVjR4X", - "hash160result": "cc3ae6466006629f5105f71325bb2a19107037ae", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.bytevector" - } - }; - } - static DataInt32VectorKeyName() { - return "vrsc::data.type.int32vector"; - } - static DataInt32VectorKey() { - return { - "vdxfid": "iJZt2fcUv1iivbfC3tuPuefabcTppQEoVq", - "indexid": "xPPzVU3ZmKwPYmYDuaZYt3C7dGUqk939N7", - "hash160result": "c0847f3025c408059b5a8f6a9e414a8ed8288da5", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int32vector" - } - }; - } - static DataInt64VectorKeyName() { - return "vrsc::data.type.int64vector"; - } - static DataInt64VectorKey() { - return { - "vdxfid": "i4qtYkFS9iNyu2AkqwoSn1xyCdfH9PUvak", - "indexid": "x9g11YgX12beXC3nhdTbkQVWEHgJ2jqfz1", - "hash160result": "c6219ea13884987453692cb14c72d5f6a47c020f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int64vector" - } - }; - } - static DataCurrencyMapKeyName() { - return "vrsc::data.type.object.currencymap"; - } - static DataCurrencyMapKey() { - return { - "vdxfid": "iMrGhzkZq5fpWWSa1RambRySFPb7CuvKuX", - "indexid": "xSgPAoBegPtV8gKbs7EvZpVyH3c858ZUvL", - "hash160result": "25db70c2fcae2571f89201181bec04587e1f8fc9", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.currencymap" - } - }; - } - static DataRatingsKeyName() { - return "vrsc::data.type.object.ratings"; - } - static DataRatingsKey() { - return { - "vdxfid": "iHJComZUXXGniLkDhjYprWYEN8qvQGDoam", - "indexid": "xN8KGZzZNqVTLWdFZRCypu4mPnrwHFKbCK", - "hash160result": "32cad57ff1dc5db4b5ba573ce01bc9c89b0d9e97", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.ratings" - } - }; - } - static DataURLKeyName() { - return "vrsc::data.type.object.url"; - } - static DataURLKey() { - return { - "vdxfid": "iJ7xdhJTJAvJubNnSJFXyA3jujzqGxjLuZ", - "indexid": "xNx56VjY9V8yXmFpHyugwYaGwQ1rCt6J9W", - "hash160result": "7748bfaf53dd2ff63ed5f73a41174c360f30a6a0", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.url" - } - }; - } - static DataTransferDestinationKeyName() { - return "vrsc::data.type.object.transferdestination"; - } - static DataTransferDestinationKey() { - return { - "vdxfid": "i91L6zwZQrkbNVMB1AZ1Z671qybexRmeVK", - "indexid": "xDqSZoNeGAyFzfECrrDAXUdYsdcfs3Zuku", - "hash160result": "92f38773849383146037b16a48ea350c1c11ac3c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.transferdestination" - } - }; - } - static UTXORefKeyName() { - return "vrsc::data.type.object.utxoref"; - } - static UTXORefKey() { - return { - "vdxfid": "iNcKvh7mazaXptzHf85q6EtpFYFE7asKC1", - "indexid": "xTSSPVYrSJoCT4sKWojz4dRMHCGF3h9tM4", - "hash160result": "013e760f7451c289672993ea391ae643c21ce4d1", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.utxoref" - } - }; - } - static CrossChainDataRefKeyName() { - return "vrsc::data.type.object.crosschaindataref"; - } - static CrossChainDataRefKey() { - return { - "vdxfid": "iP3euVSzNcXUrLNHnQnR9G6q8jeYuGSxgw", - "indexid": "xTsmNHt5Dvk9UWFKe6Sa7edNAPfZmJVgLc", - "hash160result": "4d33e0aee0f648c7871b2661d1221b57c05aaed6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.crosschaindataref" - } - }; - } - static EncryptionDescriptorKeyName() { - return "vrsc::data.type.encryptiondescriptor"; - } - static EncryptionDescriptorKey() { - return { - "vdxfid": "iHEEK8ipj58BeKZNWuaaR2tDR5RK2kmf9A", - "indexid": "xN4Lmw9uaPLrGVSQNbEjPRQkSjSKxsHUQu", - "hash160result": "8d021acc1b68335bd7d37b28ff773c138ea5dd96", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.encryptiondescriptor" - } - }; - } - static SaltedDataKeyName() { - return "vrsc::data.type.salteddata"; - } - static SaltedDataKey() { - return { - "vdxfid": "i92U1nLuLJkC44FZZ4Lq9zk4qW3HrWAWNo", - "indexid": "xDraUamzBcxrgE8bQjzz8PGbsA4JiFskTD", - "hash160result": "9e13510e01d0d03a7bc90d7a2ef32824f515e33c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.salteddata" - } - }; - } - static DataDescriptorKeyName() { - return "vrsc::data.type.object.datadescriptor"; - } - static DataDescriptorKey() { - return { - "vdxfid": "i4GC1YGEVD21afWudGoFJVdnfjJ5XWnCQv", - "indexid": "x96JULhKLXEgCqPwUxTQGtAKhPK6Qh1iaW", - "hash160result": "4d4f12424ded2033a526a4e2a8835fc5b2eba208", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.datadescriptor" - } - }; - } - static SignatureDataKeyName() { - return "vrsc::data.signaturedata"; - } - static SignatureDataKey() { - return { - "vdxfid": "i7PcVF9wwPtQ6p6jDtCVpohX65pTZuP2ah", - "indexid": "xCDix3b2ni74iyym5ZreoCE47jqUTBFRAb", - "hash160result": "b48b359e9a00042cec64f7f66ac717d388a4f22a", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.signaturedata" - } - }; - } - static VectorUint256KeyName() { - return "vrsc::data.mmrhashes"; - } - static VectorUint256Key() { - return { - "vdxfid": "i9UgJ2WxGw95PKdoCXjpfnBShtP5gi9fxS", - "indexid": "xEJnkpx38FMk1VWq4DPyeAhyjYQ6X5Gsti", - "hash160result": "8c1afd59e904f6d2702699963abccbc6d326d841", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.mmrhashes" - } - }; - } - static MMRLinksKeyName() { - return "vrsc::data.mmrlinks"; - } - static MMRLinksKey() { - return { - "vdxfid": "iPQsnA1R8UjHNddZKZ3FxsuKQ5WzKqSC7w", - "indexid": "xUEzExSVynwwzoWbBEhQwGRrRjY1Bc2MYc", - "hash160result": "f535a4e9ac0f94eda01695d16489a4a102d6b1da", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.mmrlinks" - } - }; - } - static MMRDescriptorKeyName() { - return "vrsc::data.mmrdescriptor"; - } - static MMRDescriptorKey() { - return { - "vdxfid": "i9dVDb4LgfMYrZD1JBNP2uaso4bNAkT4Jr", - "indexid": "xETbgPVRXyaDUj639s2Y1J7QpicP4DvZMt", - "hash160result": "97273a4c02d6be002f8d69c3979616732ba68243", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.mmrdescriptor" - } - }; - } - static TypeDefinitionKeyName() { - return "vrsc::data.type.typedefinition"; - } - static TypeDefinitionKey() { - return { - "vdxfid": "iL5MPPHWXQEY3p2Q1UsmGDvXsgPiqd1W1S", - "indexid": "xQuTrBibNiTCfyuRsAXvEcT4uLQjhxrpyL", - "hash160result": "ae8d805d9650c0512a6b6ec33e963386542f18b6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.typedefinition" - } - }; - } - static MultiMapKeyName() { - return "vrsc::identity.multimapkey"; - } - static MultiMapKey() { - return { - "vdxfid": "i3mbggp3NBR77C5JeFQJTpAxmgMidayLLE", - "indexid": "x8bi9VF8DVdmjMxLVw4TSChVoLNjUyapgs", - "hash160result": "6920bb81b420bc95e29a10ed677379b1e39e3a03", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.multimapkey" - } - }; - } - static ContentMultiMapRemoveKeyName() { - return "vrsc::identity.multimapremove"; - } - static ContentMultiMapRemoveKey() { - return { - "vdxfid": "i5Zkx5Z7tEfh42xtKfwbJ5LgEWE9rEgpFY", - "indexid": "xAPsQszCjYtMgCqvBMbkGTsDGAFAmrN33A", - "hash160result": "d393b986e4f82db7bec82d97b186882d739ded16", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.multimapremove" - } - }; - } - // for any ID, this key indexes content that applies to representing the profile of - // that ID. there may be many mime-type instances of a particular piece of profile media - static ProfileMediaKeyName() { - return "vrsc::identity.profile.media"; - } - static ProfileMediaKey() { - return { - "vdxfid": "iEYsp2njSt1M4EVYi9uuAPBU2wpKmThkkr", - "indexid": "xKNzGqDpJCE1gQNaZqa48mi14bqLaG669g", - "hash160result": "e95b2ee1abb130a93900ddaef2d8e528010f7c79", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.profile.media" - } - }; - } - static ZMemoMessageKeyName() { - return "vrsc::system.zmemo.message"; - } - static ZMemoMessageKey() { - return { - "vdxfid": "iNHg1n828PUxktkYeNxC6sdVmuKTipn3L3", - "indexid": "xT7nUaZ6yhhdP4daW4cM5GA2oZLUaNVaBD", - "hash160result": "4a8f418203621f10d1a61701be8dbbbb38fa5cce", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::system.zmemo.message" - } - }; - } - static ZMemoSignatureKeyName() { - return "vrsc::system.zmemo.signature"; - } - static ZMemoSignatureKey() { - return { - "vdxfid": "i7mrLLjUfGYuHJwnsxFvd282hsdn4staJG", - "indexid": "xCbxo9AZWamZuUppjdv5bQeZjXeo1vbaCc", - "hash160result": "7b47c8cd90c4c3ddc542f37ca77473b7325a272f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::system.zmemo.signature" - } - }; - } - static CurrencyStartNotarizationKeyName() { - return "vrsc::system.currency.startnotarization"; - } - static CurrencyStartNotarizationKey() { - return { - "vdxfid": "iRvxVcGLaCXcDiAfnQ5FfeBCo2AiBibAft", - "indexid": "xWm4xQhRRWkGqt3he5jQe2hjpgBj5C7Tj3", - "hash160result": "b537201ca6465976bea7bdb03119644a858052f6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::system.currency.startnotarization" - } - }; - } - GetHash() { } - ; -} -exports.VDXF_Data = VDXF_Data; -; class VDXFDataDescriptor extends index_1.BufferDataVdxfObject { constructor(dataDescriptor, vdxfkey = "", version = new bn_js_1.BN(1)) { super("", vdxfkey); diff --git a/dist/vdxf/classes/IdentityData.js b/dist/vdxf/classes/IdentityData.js index b4a38d0..2c712df 100644 --- a/dist/vdxf/classes/IdentityData.js +++ b/dist/vdxf/classes/IdentityData.js @@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.IdentityVdxfidMap = exports.getIdentityDataType = exports.friendlyName = void 0; const identitykeys = require("../identityDataKeys"); const keylist = require("../keys"); -const DataDescriptor_1 = require("./DataDescriptor"); +const VDXF_Data = require("../vdxfDataKeys"); const friendlyName = (vdfxkey) => { if (vdfxkey in exports.IdentityVdxfidMap) { return exports.IdentityVdxfidMap[vdfxkey].name; @@ -23,220 +23,220 @@ const getIdentityDataType = (vdfxkey) => { }; exports.getIdentityDataType = getIdentityDataType; exports.IdentityVdxfidMap = { - [identitykeys.IDENTITYDATA_FIRSTNAME.vdxfid]: { name: "First Name", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_LASTNAME.vdxfid]: { name: "Last Name", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_NATIONALITY.vdxfid]: { name: "Nationality", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_ATTESTOR.vdxfid]: { name: "Attestor ID", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDENTITY.vdxfid]: { name: "Identity", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_ID.vdxfid]: { name: "ID", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_USERID.vdxfid]: { name: "User ID", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_CREATEDAT.vdxfid]: { name: "Created at", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_COMPLETEDAT.vdxfid]: { name: "Completed at", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PREVIOUSATTEMPTID.vdxfid]: { name: "Previous attempt ID", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_SHAREABLEURL.vdxfid]: { name: "Shareable URL", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_TEMPLATEID.vdxfid]: { name: "Template ID", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_TEMPLATEVERSION.vdxfid]: { name: "Template Version", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PHONENUMBER.vdxfid]: { name: "Phone Number", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_OVER18.vdxfid]: { name: "Over 18", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_OVER21.vdxfid]: { name: "Over 21", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_OVER25.vdxfid]: { name: "Over 25", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_IPADDRESS.vdxfid]: { name: "IP Address", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_EMAIL.vdxfid]: { name: "Email Address", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_HOMEADDRESS.vdxfid]: { name: "Home address", type: DataDescriptor_1.VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1.vdxfid]: { name: "Street 1", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2.vdxfid]: { name: "Street 2", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_CITY.vdxfid]: { name: "City", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_REGION.vdxfid]: { name: "Region", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE.vdxfid]: { name: "Post Code", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY.vdxfid]: { name: "Country", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDNUMBER_VALUE.vdxfid]: { name: "ID Number", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDNUMBER_TYPE.vdxfid]: { name: "ID Type", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_STATUS.vdxfid]: { name: "Status", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_APPROVALS_ACCEPTEDTOS.vdxfid]: { name: "Accepted Terms and Conditions", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_APPROVALS_VERIFIEDSMS.vdxfid]: { name: "SMS Verified", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_APPROVALS_KYCCHECKED.vdxfid]: { name: "KYC Checked ok", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_APPROVALS_DOCUMENTSVERIFIED.vdxfid]: { name: "Documents Verified", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_APPROVALS_SELFIECHECKED.vdxfid]: { name: "Selfie Checked", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_APPROVALS_WATCHLIST_OK.vdxfid]: { name: "Watchlist ok", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Riskcheck ok", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE.vdxfid]: { name: "Driving Licence", type: DataDescriptor_1.VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_FRONT.vdxfid]: { name: "Driving Licence Front", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_BACK.vdxfid]: { name: "Driving Licence Back", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_FRONT.vdxfid]: { name: "Driving Licence Front", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_BACK.vdxfid]: { name: "Driving Licence Back", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_FACE.vdxfid]: { name: "Driving Licence Face", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_IDNUMBER.vdxfid]: { name: "Driving Licence Number", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CATEGORY.vdxfid]: { name: "Driving Licence Catagory", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_EXPIRATIONDATE.vdxfid]: { name: "Driving Licence expiry date", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Driving Licence matches country", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION.vdxfid]: { name: "Driving Licence issuing region", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH.vdxfid]: { name: "Driving Licence Date of Birth", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ADDRESS.vdxfid]: { name: "Driving Licence Address", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_STREET1.vdxfid]: { name: "Driving Licence Street 1", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CITY.vdxfid]: { name: "Driving Licence City", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_REGION.vdxfid]: { name: "Driving Licence Region", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_POSTCODE.vdxfid]: { name: "Driving Licence ZIP/Post Code", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_COUNTRY.vdxfid]: { name: "Driving Licence Country", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_MATCHED.vdxfid]: { name: "Driving Licence Matched all", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_NAME_MATCHED.vdxfid]: { name: "Driving Licence name matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH_MATCHED.vdxfid]: { name: "Driving Licence Date of Birth Matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_SELFIECHECK_SUCCESS.vdxfid]: { name: "Selfie Check success", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_SELFIECHECK_IMAGE.vdxfid]: { name: "Selfie Check image", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_SELFIECHECK_VIDEO.vdxfid]: { name: "Selfie Check video", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_SELFIECHECK_DRIVINGLICENCE_MATCH.vdxfid]: { name: "Selfie Driving Licence match", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_KYC_SUCCESS.vdxfid]: { name: "KYC Success", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_KYC_ADDRESS_MATCHED.vdxfid]: { name: "KYC Address Matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_KYC_TYPE.vdxfid]: { name: "KYC Type", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_KYC_NAME_MATCHED.vdxfid]: { name: "KYC Name Matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_KYC_DATEOFBIRTH_MATCHED.vdxfid]: { name: "KYC Date of Birth Matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_KYC_IDNUMBER_MATCHED.vdxfid]: { name: "KYC ID Matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_KYC_PHONENUMBER_MATCHED.vdxfid]: { name: "KYC Phone number matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_KYC_AREACODE_MATCHED.vdxfid]: { name: "KYC Areacode Matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RISKCHECK_STATUS.vdxfid]: { name: "Risk Check Status", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RISKCHECK_USERINTERACTIONS.vdxfid]: { name: "Risck Check User Interactions", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RISKCHECK_FRAUDRINGOK.vdxfid]: { name: "Risk Check No Fraudring", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RISKCHECK_BOTNOTDETECTED.vdxfid]: { name: "Risk Check bot free", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_EMAIL_ISDELIVERABLE.vdxfid]: { name: "Email address is deliverable", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_EMAIL_BREACHCOUNT.vdxfid]: { name: "Email breach count", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_EMAIL_FIRSTBREACHEDAT.vdxfid]: { name: "Email first breach date", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_EMAIL_LASTBREACHEDAT.vdxfid]: { name: "Email last breach date", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_REGISTEREDAT.vdxfid]: { name: "Email domain registered at", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_FREEPROVIDER.vdxfid]: { name: "Email is free provider", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_CUSTOM.vdxfid]: { name: "Email Domain is custom", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_DISPOSABLE.vdxfid]: { name: "Email Domain Disposable", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS.vdxfid]: { name: "Email top level Domain Suspicious", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD.vdxfid]: { name: "ID Card", type: DataDescriptor_1.VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_FRONT.vdxfid]: { name: "ID Card Front", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_BACK.vdxfid]: { name: "ID Card Back", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_IDCARD_CROPPED_FRONT.vdxfid]: { name: "ID Card Front", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_IDCARD_CROPPED_BACK.vdxfid]: { name: "ID Card Back", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_IDCARD_FACE.vdxfid]: { name: "ID Card Face", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_IDCARD_IDNUMBER.vdxfid]: { name: "ID Card ID Number", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_CATEGORY.vdxfid]: { name: "ID Card Category", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_EXPIRATIONDATE.vdxfid]: { name: "ID Card Expiry date", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "ID Card Issuing Country Matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_ISSUING_REGION.vdxfid]: { name: "ID Card Issuing Region", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTH.vdxfid]: { name: "ID Card Date of Birth", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS.vdxfid]: { name: "ID Card Address", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_STREET1.vdxfid]: { name: "ID Card Street 1", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_CITY.vdxfid]: { name: "ID Card City", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_REGION.vdxfid]: { name: "ID Card Region", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_POSTCODE.vdxfid]: { name: "ID Card Zip/Post Code", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_COUNTRY.vdxfid]: { name: "ID Card Country", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "ID Card Matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_NAME_MATCHED.vdxfid]: { name: "ID Card Name Matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "ID Card Date of Birth Matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_PASSPORT.vdxfid]: { name: "Passport", type: DataDescriptor_1.VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_FRONT.vdxfid]: { name: "Passport front", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_BACK.vdxfid]: { name: "Passport back", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_FRONT.vdxfid]: { name: "Passport front", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_BACK.vdxfid]: { name: "Passport back", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_PASSPORT_FACE.vdxfid]: { name: "Passport face", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_PASSPORT_IDNUMBER.vdxfid]: { name: "Passport ID Number", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_CATEGORY.vdxfid]: { name: "Passport Category", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_EXPIRATIONDATE.vdxfid]: { name: "Passport expiry date", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Passport issuing country matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_REGION.vdxfid]: { name: "Passport issuing region matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTH.vdxfid]: { name: "Passport date of birth", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS.vdxfid]: { name: "Passport address", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_STREET1.vdxfid]: { name: "Passport street 1", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_CITY.vdxfid]: { name: "Passport city", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_REGION.vdxfid]: { name: "Passport region", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_POSTCODE.vdxfid]: { name: "Passport zip/post code", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_COUNTRY.vdxfid]: { name: "Passport country", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Passport matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_NAME_MATCHED.vdxfid]: { name: "Passport Name Matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTHMATCHED.vdxfid]: { name: "Passport date of birth matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT.vdxfid]: { name: "Residence Permit", type: DataDescriptor_1.VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_FRONT.vdxfid]: { name: "Residence Permit front", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_BACK.vdxfid]: { name: "Residence Permit back", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_FRONT.vdxfid]: { name: "Residence Permit front", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_BACK.vdxfid]: { name: "Residence Permit back", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_FACE.vdxfid]: { name: "Residence Permit face", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_IDNUMBER.vdxfid]: { name: "Residence Permit ID Number", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CATEGORY.vdxfid]: { name: "Residence Permit category", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_EXPIRATIONDATE.vdxfid]: { name: "Residence Permit expiry date", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Residence Permit issuing country matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_REGION.vdxfid]: { name: "Residence Permit issuing region matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTH.vdxfid]: { name: "Residence Permit date of birth", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS.vdxfid]: { name: "Residence Permit Address", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_STREET1.vdxfid]: { name: "Residence Permit Street 1", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_CITY.vdxfid]: { name: "Residence Permit City", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_REGION.vdxfid]: { name: "Residence Permit Region", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_POSTCODE.vdxfid]: { name: "Residence Permit Zip/Post code", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_COUNTRY.vdxfid]: { name: "Residence Permit Country", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Residence Permit Matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_NAME_MATCHED.vdxfid]: { name: "Residence Permit name matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTHMATCHED.vdxfid]: { name: "Residence Permit date of birth matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD.vdxfid]: { name: "Resident Card", type: DataDescriptor_1.VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_FRONT.vdxfid]: { name: "Resident Card Front", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_BACK.vdxfid]: { name: "Resident Card Back", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_FRONT.vdxfid]: { name: "Resident Card Front", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_BACK.vdxfid]: { name: "Resident Card Back", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_FACE.vdxfid]: { name: "Resident Card Face", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_IDNUMBER.vdxfid]: { name: "Resident Card ID Number", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_CATEGORY.vdxfid]: { name: "Resident Card Category", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_EXPIRATIONDATE.vdxfid]: { name: "Resident Card Expiry Date", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Resident Card Issuing Country Matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_REGION.vdxfid]: { name: "Resident Card Issuing Region", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTH.vdxfid]: { name: "Resident Card date of birth", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS.vdxfid]: { name: "Resident Card address", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_STREET1.vdxfid]: { name: "Resident Card Street 1", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_CITY.vdxfid]: { name: "Resident Card City", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_REGION.vdxfid]: { name: "Resident Card Region", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_POSTCODE.vdxfid]: { name: "Resident Card Zip/Post Code", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_COUNTRY.vdxfid]: { name: "Resident Card Country", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Resident Card Matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_NAME_MATCHED.vdxfid]: { name: "Resident Card Name Matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "Resident Card date of birth Matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_VISA.vdxfid]: { name: "Visa", type: DataDescriptor_1.VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITYDATA_VISA_ORIGINAL_FRONT.vdxfid]: { name: "Visa front", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_VISA_ORIGINAL_BACK.vdxfid]: { name: "Visa back", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_VISA_CROPPED_FRONT.vdxfid]: { name: "Visa front", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_VISA_CROPPED_BACK.vdxfid]: { name: "Visa back", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_VISA_FACE.vdxfid]: { name: "Visa face", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_VISA_IDNUMBER.vdxfid]: { name: "Visa ID Number", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_CATEGORY.vdxfid]: { name: "Visa Category", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_EXPIRATIONDATE.vdxfid]: { name: "Visa expiry date", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Visa issuing country matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_ISSUING_REGION.vdxfid]: { name: "Visa issuing region", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTH.vdxfid]: { name: "Visa date of birth", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS.vdxfid]: { name: "Visa address", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_STREET1.vdxfid]: { name: "Visa Street 1", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_CITY.vdxfid]: { name: "Visa City", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_REGION.vdxfid]: { name: "Visa Region", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_POSTCODE.vdxfid]: { name: "Visa Zip/Post Code", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_COUNTRY.vdxfid]: { name: "Visa Country", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Visa document matched", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_NAME_MATCHED.vdxfid]: { name: "Visa name matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTHMATCHED.vdxfid]: { name: "Visa date of birth matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALFRONT.vdxfid]: { name: "Original Front", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALBACK.vdxfid]: { name: "Original Back", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDFRONT.vdxfid]: { name: "Cropped Front", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDBACK.vdxfid]: { name: "Cropped Back", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_FACE.vdxfid]: { name: "Face", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_IDNUMBER.vdxfid]: { name: "ID Number", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CATEGORY.vdxfid]: { name: "Category", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_EXPIRATIONDATE.vdxfid]: { name: "Expiry Date", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY.vdxfid]: { name: "Issuing Country", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUING_REGION.vdxfid]: { name: "Issuing Region", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ADDRESS.vdxfid]: { name: "Address", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_ADDRESS_STREET1.vdxfid]: { name: "Street 1", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_ADDRESS_STREET2.vdxfid]: { name: "Street 2", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_ADDRESS_CITY.vdxfid]: { name: "City", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_ADDRESS_REGION.vdxfid]: { name: "Region", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_ADDRESS_POSTCODE.vdxfid]: { name: "Zip/Postal Code", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_ADDRESS_COUNTRY.vdxfid]: { name: "Country", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Document Matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED.vdxfid]: { name: "Name Matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED.vdxfid]: { name: "Date of Birth Matched", type: DataDescriptor_1.VDXF_Data.DataByteKeyName() }, - [identitykeys.BANK_ACCOUNT.vdxfid]: { name: "Bank Account", type: DataDescriptor_1.VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITYDATA_DOCUMENTS_AND_IMAGES.vdxfid]: { name: "Official ID Documents", type: DataDescriptor_1.VDXF_Data.DataUint160Key() }, - [keylist.ATTESTATION_PROVISION_TYPE.vdxfid]: { name: "Attestation Type", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [keylist.ATTESTATION_PROVISION_URL.vdxfid]: { name: "Attestation URL", type: DataDescriptor_1.VDXF_Data.DataURLKeyName() }, - [keylist.ATTESTATION_VIEW_RESPONSE.vdxfid]: { name: "Attestation View Response", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [keylist.ATTESTATION_VIEW_REQUEST.vdxfid]: { name: "Attestation View Response", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, - [keylist.PROFILE_DATA_VIEW_REQUEST.vdxfid]: { name: "Profile Data View Request", type: DataDescriptor_1.VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_FIRSTNAME.vdxfid]: { name: "First Name", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_LASTNAME.vdxfid]: { name: "Last Name", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_NATIONALITY.vdxfid]: { name: "Nationality", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_ATTESTOR.vdxfid]: { name: "Attestor ID", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDENTITY.vdxfid]: { name: "Identity", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_ID.vdxfid]: { name: "ID", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_USERID.vdxfid]: { name: "User ID", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_CREATEDAT.vdxfid]: { name: "Created at", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_COMPLETEDAT.vdxfid]: { name: "Completed at", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PREVIOUSATTEMPTID.vdxfid]: { name: "Previous attempt ID", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_SHAREABLEURL.vdxfid]: { name: "Shareable URL", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_TEMPLATEID.vdxfid]: { name: "Template ID", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_TEMPLATEVERSION.vdxfid]: { name: "Template Version", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PHONENUMBER.vdxfid]: { name: "Phone Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_OVER18.vdxfid]: { name: "Over 18", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_OVER21.vdxfid]: { name: "Over 21", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_OVER25.vdxfid]: { name: "Over 25", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_IPADDRESS.vdxfid]: { name: "IP Address", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_EMAIL.vdxfid]: { name: "Email Address", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_HOMEADDRESS.vdxfid]: { name: "Home address", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1.vdxfid]: { name: "Street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2.vdxfid]: { name: "Street 2", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_CITY.vdxfid]: { name: "City", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_REGION.vdxfid]: { name: "Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE.vdxfid]: { name: "Post Code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY.vdxfid]: { name: "Country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDNUMBER_VALUE.vdxfid]: { name: "ID Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDNUMBER_TYPE.vdxfid]: { name: "ID Type", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_STATUS.vdxfid]: { name: "Status", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_APPROVALS_ACCEPTEDTOS.vdxfid]: { name: "Accepted Terms and Conditions", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_APPROVALS_VERIFIEDSMS.vdxfid]: { name: "SMS Verified", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_APPROVALS_KYCCHECKED.vdxfid]: { name: "KYC Checked ok", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_APPROVALS_DOCUMENTSVERIFIED.vdxfid]: { name: "Documents Verified", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_APPROVALS_SELFIECHECKED.vdxfid]: { name: "Selfie Checked", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_APPROVALS_WATCHLIST_OK.vdxfid]: { name: "Watchlist ok", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Riskcheck ok", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE.vdxfid]: { name: "Driving Licence", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_FRONT.vdxfid]: { name: "Driving Licence Front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_BACK.vdxfid]: { name: "Driving Licence Back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_FRONT.vdxfid]: { name: "Driving Licence Front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_BACK.vdxfid]: { name: "Driving Licence Back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_FACE.vdxfid]: { name: "Driving Licence Face", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_IDNUMBER.vdxfid]: { name: "Driving Licence Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CATEGORY.vdxfid]: { name: "Driving Licence Catagory", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_EXPIRATIONDATE.vdxfid]: { name: "Driving Licence expiry date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Driving Licence matches country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION.vdxfid]: { name: "Driving Licence issuing region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH.vdxfid]: { name: "Driving Licence Date of Birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ADDRESS.vdxfid]: { name: "Driving Licence Address", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_STREET1.vdxfid]: { name: "Driving Licence Street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CITY.vdxfid]: { name: "Driving Licence City", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_REGION.vdxfid]: { name: "Driving Licence Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_POSTCODE.vdxfid]: { name: "Driving Licence ZIP/Post Code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_COUNTRY.vdxfid]: { name: "Driving Licence Country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_MATCHED.vdxfid]: { name: "Driving Licence Matched all", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_NAME_MATCHED.vdxfid]: { name: "Driving Licence name matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH_MATCHED.vdxfid]: { name: "Driving Licence Date of Birth Matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_SELFIECHECK_SUCCESS.vdxfid]: { name: "Selfie Check success", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_SELFIECHECK_IMAGE.vdxfid]: { name: "Selfie Check image", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_SELFIECHECK_VIDEO.vdxfid]: { name: "Selfie Check video", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_SELFIECHECK_DRIVINGLICENCE_MATCH.vdxfid]: { name: "Selfie Driving Licence match", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_KYC_SUCCESS.vdxfid]: { name: "KYC Success", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_KYC_ADDRESS_MATCHED.vdxfid]: { name: "KYC Address Matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_KYC_TYPE.vdxfid]: { name: "KYC Type", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_KYC_NAME_MATCHED.vdxfid]: { name: "KYC Name Matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_KYC_DATEOFBIRTH_MATCHED.vdxfid]: { name: "KYC Date of Birth Matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_KYC_IDNUMBER_MATCHED.vdxfid]: { name: "KYC ID Matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_KYC_PHONENUMBER_MATCHED.vdxfid]: { name: "KYC Phone number matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_KYC_AREACODE_MATCHED.vdxfid]: { name: "KYC Areacode Matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RISKCHECK_STATUS.vdxfid]: { name: "Risk Check Status", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RISKCHECK_USERINTERACTIONS.vdxfid]: { name: "Risck Check User Interactions", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RISKCHECK_FRAUDRINGOK.vdxfid]: { name: "Risk Check No Fraudring", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RISKCHECK_BOTNOTDETECTED.vdxfid]: { name: "Risk Check bot free", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_EMAIL_ISDELIVERABLE.vdxfid]: { name: "Email address is deliverable", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_EMAIL_BREACHCOUNT.vdxfid]: { name: "Email breach count", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_EMAIL_FIRSTBREACHEDAT.vdxfid]: { name: "Email first breach date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_EMAIL_LASTBREACHEDAT.vdxfid]: { name: "Email last breach date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_REGISTEREDAT.vdxfid]: { name: "Email domain registered at", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_FREEPROVIDER.vdxfid]: { name: "Email is free provider", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_CUSTOM.vdxfid]: { name: "Email Domain is custom", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_DISPOSABLE.vdxfid]: { name: "Email Domain Disposable", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS.vdxfid]: { name: "Email top level Domain Suspicious", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD.vdxfid]: { name: "ID Card", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_FRONT.vdxfid]: { name: "ID Card Front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_BACK.vdxfid]: { name: "ID Card Back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_IDCARD_CROPPED_FRONT.vdxfid]: { name: "ID Card Front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_IDCARD_CROPPED_BACK.vdxfid]: { name: "ID Card Back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_IDCARD_FACE.vdxfid]: { name: "ID Card Face", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_IDCARD_IDNUMBER.vdxfid]: { name: "ID Card ID Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_CATEGORY.vdxfid]: { name: "ID Card Category", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_EXPIRATIONDATE.vdxfid]: { name: "ID Card Expiry date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "ID Card Issuing Country Matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_ISSUING_REGION.vdxfid]: { name: "ID Card Issuing Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTH.vdxfid]: { name: "ID Card Date of Birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS.vdxfid]: { name: "ID Card Address", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_STREET1.vdxfid]: { name: "ID Card Street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_CITY.vdxfid]: { name: "ID Card City", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_REGION.vdxfid]: { name: "ID Card Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_POSTCODE.vdxfid]: { name: "ID Card Zip/Post Code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_COUNTRY.vdxfid]: { name: "ID Card Country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "ID Card Matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_IDCARD_NAME_MATCHED.vdxfid]: { name: "ID Card Name Matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "ID Card Date of Birth Matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_PASSPORT.vdxfid]: { name: "Passport", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_FRONT.vdxfid]: { name: "Passport front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_BACK.vdxfid]: { name: "Passport back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_FRONT.vdxfid]: { name: "Passport front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_BACK.vdxfid]: { name: "Passport back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_PASSPORT_FACE.vdxfid]: { name: "Passport face", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_PASSPORT_IDNUMBER.vdxfid]: { name: "Passport ID Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_CATEGORY.vdxfid]: { name: "Passport Category", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_EXPIRATIONDATE.vdxfid]: { name: "Passport expiry date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Passport issuing country matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_REGION.vdxfid]: { name: "Passport issuing region matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTH.vdxfid]: { name: "Passport date of birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS.vdxfid]: { name: "Passport address", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_STREET1.vdxfid]: { name: "Passport street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_CITY.vdxfid]: { name: "Passport city", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_REGION.vdxfid]: { name: "Passport region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_POSTCODE.vdxfid]: { name: "Passport zip/post code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_COUNTRY.vdxfid]: { name: "Passport country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Passport matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_PASSPORT_NAME_MATCHED.vdxfid]: { name: "Passport Name Matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTHMATCHED.vdxfid]: { name: "Passport date of birth matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT.vdxfid]: { name: "Residence Permit", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_FRONT.vdxfid]: { name: "Residence Permit front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_BACK.vdxfid]: { name: "Residence Permit back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_FRONT.vdxfid]: { name: "Residence Permit front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_BACK.vdxfid]: { name: "Residence Permit back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_FACE.vdxfid]: { name: "Residence Permit face", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_IDNUMBER.vdxfid]: { name: "Residence Permit ID Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CATEGORY.vdxfid]: { name: "Residence Permit category", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_EXPIRATIONDATE.vdxfid]: { name: "Residence Permit expiry date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Residence Permit issuing country matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_REGION.vdxfid]: { name: "Residence Permit issuing region matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTH.vdxfid]: { name: "Residence Permit date of birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS.vdxfid]: { name: "Residence Permit Address", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_STREET1.vdxfid]: { name: "Residence Permit Street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_CITY.vdxfid]: { name: "Residence Permit City", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_REGION.vdxfid]: { name: "Residence Permit Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_POSTCODE.vdxfid]: { name: "Residence Permit Zip/Post code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_COUNTRY.vdxfid]: { name: "Residence Permit Country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Residence Permit Matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_NAME_MATCHED.vdxfid]: { name: "Residence Permit name matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTHMATCHED.vdxfid]: { name: "Residence Permit date of birth matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD.vdxfid]: { name: "Resident Card", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_FRONT.vdxfid]: { name: "Resident Card Front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_BACK.vdxfid]: { name: "Resident Card Back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_FRONT.vdxfid]: { name: "Resident Card Front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_BACK.vdxfid]: { name: "Resident Card Back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_FACE.vdxfid]: { name: "Resident Card Face", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_IDNUMBER.vdxfid]: { name: "Resident Card ID Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_CATEGORY.vdxfid]: { name: "Resident Card Category", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_EXPIRATIONDATE.vdxfid]: { name: "Resident Card Expiry Date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Resident Card Issuing Country Matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_REGION.vdxfid]: { name: "Resident Card Issuing Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTH.vdxfid]: { name: "Resident Card date of birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS.vdxfid]: { name: "Resident Card address", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_STREET1.vdxfid]: { name: "Resident Card Street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_CITY.vdxfid]: { name: "Resident Card City", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_REGION.vdxfid]: { name: "Resident Card Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_POSTCODE.vdxfid]: { name: "Resident Card Zip/Post Code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_COUNTRY.vdxfid]: { name: "Resident Card Country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Resident Card Matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_NAME_MATCHED.vdxfid]: { name: "Resident Card Name Matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "Resident Card date of birth Matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_VISA.vdxfid]: { name: "Visa", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITYDATA_VISA_ORIGINAL_FRONT.vdxfid]: { name: "Visa front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_VISA_ORIGINAL_BACK.vdxfid]: { name: "Visa back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_VISA_CROPPED_FRONT.vdxfid]: { name: "Visa front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_VISA_CROPPED_BACK.vdxfid]: { name: "Visa back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_VISA_FACE.vdxfid]: { name: "Visa face", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_VISA_IDNUMBER.vdxfid]: { name: "Visa ID Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_CATEGORY.vdxfid]: { name: "Visa Category", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_EXPIRATIONDATE.vdxfid]: { name: "Visa expiry date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Visa issuing country matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_ISSUING_REGION.vdxfid]: { name: "Visa issuing region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTH.vdxfid]: { name: "Visa date of birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS.vdxfid]: { name: "Visa address", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_STREET1.vdxfid]: { name: "Visa Street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_CITY.vdxfid]: { name: "Visa City", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_REGION.vdxfid]: { name: "Visa Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_POSTCODE.vdxfid]: { name: "Visa Zip/Post Code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_ADDRESS_COUNTRY.vdxfid]: { name: "Visa Country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Visa document matched", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_VISA_NAME_MATCHED.vdxfid]: { name: "Visa name matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTHMATCHED.vdxfid]: { name: "Visa date of birth matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALFRONT.vdxfid]: { name: "Original Front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALBACK.vdxfid]: { name: "Original Back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDFRONT.vdxfid]: { name: "Cropped Front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDBACK.vdxfid]: { name: "Cropped Back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_FACE.vdxfid]: { name: "Face", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_IDNUMBER.vdxfid]: { name: "ID Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CATEGORY.vdxfid]: { name: "Category", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_EXPIRATIONDATE.vdxfid]: { name: "Expiry Date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY.vdxfid]: { name: "Issuing Country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUING_REGION.vdxfid]: { name: "Issuing Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ADDRESS.vdxfid]: { name: "Address", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_ADDRESS_STREET1.vdxfid]: { name: "Street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_ADDRESS_STREET2.vdxfid]: { name: "Street 2", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_ADDRESS_CITY.vdxfid]: { name: "City", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_ADDRESS_REGION.vdxfid]: { name: "Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_ADDRESS_POSTCODE.vdxfid]: { name: "Zip/Postal Code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_ADDRESS_COUNTRY.vdxfid]: { name: "Country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Document Matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED.vdxfid]: { name: "Name Matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED.vdxfid]: { name: "Date of Birth Matched", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.BANK_ACCOUNT.vdxfid]: { name: "Bank Account", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITYDATA_DOCUMENTS_AND_IMAGES.vdxfid]: { name: "Official ID Documents", type: VDXF_Data.DataUint160Key() }, + [keylist.ATTESTATION_PROVISION_TYPE.vdxfid]: { name: "Attestation Type", type: VDXF_Data.DataStringKey() }, + [keylist.ATTESTATION_PROVISION_URL.vdxfid]: { name: "Attestation URL", type: VDXF_Data.DataURLKeyName() }, + [keylist.ATTESTATION_VIEW_RESPONSE.vdxfid]: { name: "Attestation View Response", type: VDXF_Data.DataStringKey() }, + [keylist.ATTESTATION_VIEW_REQUEST.vdxfid]: { name: "Attestation View Response", type: VDXF_Data.DataStringKey() }, + [keylist.PROFILE_DATA_VIEW_REQUEST.vdxfid]: { name: "Profile Data View Request", type: VDXF_Data.DataStringKey() }, }; diff --git a/dist/vdxf/classes/index.d.ts b/dist/vdxf/classes/index.d.ts index cd0344a..97d3fae 100644 --- a/dist/vdxf/classes/index.d.ts +++ b/dist/vdxf/classes/index.d.ts @@ -26,3 +26,5 @@ export { Attestation } from './Attestation'; export { ProvisioningTxid } from './provisioning/ProvisioningResult'; export { Context } from './Context'; export { defaultPersonalProfileDataTemplate, DataCategory } from './PersonalProfile'; +export { CMMRNode, CMerkleMountainRange, CMMRBranch, CMMRProof, CMerkleMountainView, GetMMRProofIndex } from './MMR'; +export { SignatureData } from './SignatureData'; diff --git a/dist/vdxf/classes/index.js b/dist/vdxf/classes/index.js index a2dfb9d..dfbb7c7 100644 --- a/dist/vdxf/classes/index.js +++ b/dist/vdxf/classes/index.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.DataCategory = exports.defaultPersonalProfileDataTemplate = exports.Context = exports.ProvisioningTxid = exports.Attestation = exports.AltAuthFactor = exports.Audience = exports.RequestedPermission = exports.ProvisioningInfo = exports.Subject = exports.RedirectUri = exports.Hash160 = exports.LoginConsentProvisioningResult = exports.LoginConsentProvisioningDecision = exports.LoginConsentProvisioningResponse = exports.LoginConsentProvisioningChallenge = exports.LoginConsentProvisioningRequest = exports.VerusPayInvoice = exports.VerusPayInvoiceDetails = exports.SignedSessionObjectData = exports.SignedSessionObject = exports.LoginConsentResponse = exports.LoginConsentRequest = exports.LoginConsentDecision = exports.LoginConsentChallenge = void 0; +exports.SignatureData = exports.GetMMRProofIndex = exports.CMerkleMountainView = exports.CMMRProof = exports.CMMRBranch = exports.CMerkleMountainRange = exports.CMMRNode = exports.DataCategory = exports.defaultPersonalProfileDataTemplate = exports.Context = exports.ProvisioningTxid = exports.Attestation = exports.AltAuthFactor = exports.Audience = exports.RequestedPermission = exports.ProvisioningInfo = exports.Subject = exports.RedirectUri = exports.Hash160 = exports.LoginConsentProvisioningResult = exports.LoginConsentProvisioningDecision = exports.LoginConsentProvisioningResponse = exports.LoginConsentProvisioningChallenge = exports.LoginConsentProvisioningRequest = exports.VerusPayInvoice = exports.VerusPayInvoiceDetails = exports.SignedSessionObjectData = exports.SignedSessionObject = exports.LoginConsentResponse = exports.LoginConsentRequest = exports.LoginConsentDecision = exports.LoginConsentChallenge = void 0; var Challenge_1 = require("./Challenge"); Object.defineProperty(exports, "LoginConsentChallenge", { enumerable: true, get: function () { return Challenge_1.Challenge; } }); var Decision_1 = require("./Decision"); @@ -45,7 +45,12 @@ Object.defineProperty(exports, "Context", { enumerable: true, get: function () { var PersonalProfile_1 = require("./PersonalProfile"); Object.defineProperty(exports, "defaultPersonalProfileDataTemplate", { enumerable: true, get: function () { return PersonalProfile_1.defaultPersonalProfileDataTemplate; } }); Object.defineProperty(exports, "DataCategory", { enumerable: true, get: function () { return PersonalProfile_1.DataCategory; } }); -// export { CUTXORef, PBaaSEvidenceRef, IdentityMultimapRef, URLRef, CrossChainDataRef } from './CrossChainDataRef' -// export { DataDescriptor, VDXF_Data, VDXFDataDescriptor, EHashTypes, MMRDescriptor, VectorEncodeVDXFUni } from './DataDescriptor' -// export { CLayer, CMMRNode, CMerkleMountainRange, CMMRBranch, CMMRProof, CMerkleMountainView, GetMMRProofIndex} from './MMR' -// export { SignatureData } from './SignatureData' +var MMR_1 = require("./MMR"); +Object.defineProperty(exports, "CMMRNode", { enumerable: true, get: function () { return MMR_1.CMMRNode; } }); +Object.defineProperty(exports, "CMerkleMountainRange", { enumerable: true, get: function () { return MMR_1.CMerkleMountainRange; } }); +Object.defineProperty(exports, "CMMRBranch", { enumerable: true, get: function () { return MMR_1.CMMRBranch; } }); +Object.defineProperty(exports, "CMMRProof", { enumerable: true, get: function () { return MMR_1.CMMRProof; } }); +Object.defineProperty(exports, "CMerkleMountainView", { enumerable: true, get: function () { return MMR_1.CMerkleMountainView; } }); +Object.defineProperty(exports, "GetMMRProofIndex", { enumerable: true, get: function () { return MMR_1.GetMMRProofIndex; } }); +var SignatureData_1 = require("./SignatureData"); +Object.defineProperty(exports, "SignatureData", { enumerable: true, get: function () { return SignatureData_1.SignatureData; } }); diff --git a/dist/vdxf/index.d.ts b/dist/vdxf/index.d.ts index 5d98854..269d049 100644 --- a/dist/vdxf/index.d.ts +++ b/dist/vdxf/index.d.ts @@ -6,6 +6,7 @@ export * from './keys'; export * from './scopes'; export * from './keymap'; export * from './identityDataKeys'; +export * from './vdxfDataKeys'; export interface VDXFObjectInterface { vdxfkey: string; toString: () => string; diff --git a/dist/vdxf/index.js b/dist/vdxf/index.js index 77ac181..023604c 100644 --- a/dist/vdxf/index.js +++ b/dist/vdxf/index.js @@ -29,6 +29,7 @@ __exportStar(require("./keys"), exports); __exportStar(require("./scopes"), exports); __exportStar(require("./keymap"), exports); __exportStar(require("./identityDataKeys"), exports); +__exportStar(require("./vdxfDataKeys"), exports); class VDXFObject { constructor(key = "", serializekey = true) { this.serializekey = true; diff --git a/dist/vdxf/vdxfDataKeys.d.ts b/dist/vdxf/vdxfDataKeys.d.ts new file mode 100644 index 0000000..a1e2e66 --- /dev/null +++ b/dist/vdxf/vdxfDataKeys.d.ts @@ -0,0 +1,69 @@ +import { VDXFKeyInterface } from "./keys"; +export declare function DataByteKeyName(): string; +export declare function DataByteKey(): VDXFKeyInterface; +export declare function DataInt16KeyName(): string; +export declare function DataInt16Key(): VDXFKeyInterface; +export declare function DataUint16KeyName(): string; +export declare function DataUint16Key(): VDXFKeyInterface; +export declare function DataInt32KeyName(): string; +export declare function DataInt32Key(): VDXFKeyInterface; +export declare function DataUint32KeyName(): string; +export declare function DataUint32Key(): VDXFKeyInterface; +export declare function DataInt64KeyName(): string; +export declare function DataInt64Key(): VDXFKeyInterface; +export declare function DataUint64KeyName(): string; +export declare function DataUint64Key(): VDXFKeyInterface; +export declare function DataUint160KeyName(): string; +export declare function DataUint160Key(): VDXFKeyInterface; +export declare function DataUint256KeyName(): string; +export declare function DataUint256Key(): VDXFKeyInterface; +export declare function DataStringKeyName(): string; +export declare function DataStringKey(): VDXFKeyInterface; +export declare function DataVectorKeyName(): string; +export declare function DataVectorKey(): VDXFKeyInterface; +export declare function DataByteVectorKeyName(): string; +export declare function DataByteVectorKey(): VDXFKeyInterface; +export declare function DataInt32VectorKeyName(): string; +export declare function DataInt32VectorKey(): VDXFKeyInterface; +export declare function DataInt64VectorKeyName(): string; +export declare function DataInt64VectorKey(): VDXFKeyInterface; +export declare function DataCurrencyMapKeyName(): string; +export declare function DataCurrencyMapKey(): VDXFKeyInterface; +export declare function DataRatingsKeyName(): string; +export declare function DataRatingsKey(): VDXFKeyInterface; +export declare function DataURLKeyName(): string; +export declare function DataURLKey(): VDXFKeyInterface; +export declare function DataTransferDestinationKeyName(): string; +export declare function DataTransferDestinationKey(): VDXFKeyInterface; +export declare function UTXORefKeyName(): string; +export declare function UTXORefKey(): VDXFKeyInterface; +export declare function CrossChainDataRefKeyName(): string; +export declare function CrossChainDataRefKey(): VDXFKeyInterface; +export declare function EncryptionDescriptorKeyName(): string; +export declare function EncryptionDescriptorKey(): VDXFKeyInterface; +export declare function SaltedDataKeyName(): string; +export declare function SaltedDataKey(): VDXFKeyInterface; +export declare function DataDescriptorKeyName(): string; +export declare function DataDescriptorKey(): VDXFKeyInterface; +export declare function SignatureDataKeyName(): string; +export declare function SignatureDataKey(): VDXFKeyInterface; +export declare function VectorUint256KeyName(): string; +export declare function VectorUint256Key(): VDXFKeyInterface; +export declare function MMRLinksKeyName(): string; +export declare function MMRLinksKey(): VDXFKeyInterface; +export declare function MMRDescriptorKeyName(): string; +export declare function MMRDescriptorKey(): VDXFKeyInterface; +export declare function TypeDefinitionKeyName(): string; +export declare function TypeDefinitionKey(): VDXFKeyInterface; +export declare function MultiMapKeyName(): string; +export declare function MultiMapKey(): VDXFKeyInterface; +export declare function ContentMultiMapRemoveKeyName(): string; +export declare function ContentMultiMapRemoveKey(): VDXFKeyInterface; +export declare function ProfileMediaKeyName(): string; +export declare function ProfileMediaKey(): VDXFKeyInterface; +export declare function ZMemoMessageKeyName(): string; +export declare function ZMemoMessageKey(): VDXFKeyInterface; +export declare function ZMemoSignatureKeyName(): string; +export declare function ZMemoSignatureKey(): VDXFKeyInterface; +export declare function CurrencyStartNotarizationKeyName(): string; +export declare function CurrencyStartNotarizationKey(): VDXFKeyInterface; diff --git a/dist/vdxf/vdxfDataKeys.js b/dist/vdxf/vdxfDataKeys.js new file mode 100644 index 0000000..a072f19 --- /dev/null +++ b/dist/vdxf/vdxfDataKeys.js @@ -0,0 +1,551 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.VectorUint256Key = exports.VectorUint256KeyName = exports.SignatureDataKey = exports.SignatureDataKeyName = exports.DataDescriptorKey = exports.DataDescriptorKeyName = exports.SaltedDataKey = exports.SaltedDataKeyName = exports.EncryptionDescriptorKey = exports.EncryptionDescriptorKeyName = exports.CrossChainDataRefKey = exports.CrossChainDataRefKeyName = exports.UTXORefKey = exports.UTXORefKeyName = exports.DataTransferDestinationKey = exports.DataTransferDestinationKeyName = exports.DataURLKey = exports.DataURLKeyName = exports.DataRatingsKey = exports.DataRatingsKeyName = exports.DataCurrencyMapKey = exports.DataCurrencyMapKeyName = exports.DataInt64VectorKey = exports.DataInt64VectorKeyName = exports.DataInt32VectorKey = exports.DataInt32VectorKeyName = exports.DataByteVectorKey = exports.DataByteVectorKeyName = exports.DataVectorKey = exports.DataVectorKeyName = exports.DataStringKey = exports.DataStringKeyName = exports.DataUint256Key = exports.DataUint256KeyName = exports.DataUint160Key = exports.DataUint160KeyName = exports.DataUint64Key = exports.DataUint64KeyName = exports.DataInt64Key = exports.DataInt64KeyName = exports.DataUint32Key = exports.DataUint32KeyName = exports.DataInt32Key = exports.DataInt32KeyName = exports.DataUint16Key = exports.DataUint16KeyName = exports.DataInt16Key = exports.DataInt16KeyName = exports.DataByteKey = exports.DataByteKeyName = void 0; +exports.CurrencyStartNotarizationKey = exports.CurrencyStartNotarizationKeyName = exports.ZMemoSignatureKey = exports.ZMemoSignatureKeyName = exports.ZMemoMessageKey = exports.ZMemoMessageKeyName = exports.ProfileMediaKey = exports.ProfileMediaKeyName = exports.ContentMultiMapRemoveKey = exports.ContentMultiMapRemoveKeyName = exports.MultiMapKey = exports.MultiMapKeyName = exports.TypeDefinitionKey = exports.TypeDefinitionKeyName = exports.MMRDescriptorKey = exports.MMRDescriptorKeyName = exports.MMRLinksKey = exports.MMRLinksKeyName = void 0; +function DataByteKeyName() { + return "vrsc::data.type.byte"; +} +exports.DataByteKeyName = DataByteKeyName; +function DataByteKey() { + return { + "vdxfid": "iBXUHbh4iacbeZnzDRxishvBSrYk2S2k7t", + "indexid": "xGMakQ89ZtqGGjg257csr6SiUWZksGmjWp", + "hash160result": "2e97a8bba443773812341e1d761530d3bba04f58", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.byte" + } + }; +} +exports.DataByteKey = DataByteKey; +function DataInt16KeyName() { + return "vrsc::data.type.int16"; +} +exports.DataInt16KeyName = DataInt16KeyName; +function DataInt16Key() { + return { + "vdxfid": "iDtTv3wf1Vk3M2Y46RjLPKtttx5hydwtY1", + "indexid": "xJiaNrNjroxhyCR5x7PVMiRRvc6ipg6N9g", + "hash160result": "ee334ebd432db0b24cc2702eda61c28ff44d3872", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int16" + } + }; +} +exports.DataInt16Key = DataInt16Key; +function DataUint16KeyName() { + return "vrsc::data.type.uint16"; +} +exports.DataUint16KeyName = DataUint16KeyName; +function DataUint16Key() { + return { + "vdxfid": "iHn7urT2yVfS7pQn6WGAmCVWh4HBLV24n3", + "indexid": "xNcENet7pot6jzHoxBvKjb23iiJCGpekDk", + "hash160result": "5cfc322d2a216145f7b82714115e7953269de59c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint16" + } + }; +} +exports.DataUint16Key = DataUint16Key; +function DataInt32KeyName() { + return "vrsc::data.type.int32"; +} +exports.DataInt32KeyName = DataInt32KeyName; +function DataInt32Key() { + return { + "vdxfid": "iHpLPprRDv3H5H3ZMaJ9nyHFzkG9xJWZDb", + "indexid": "xNeSrdHW5EFwhSvbDFxJmMoo2QHAtoEaEM", + "hash160result": "3e9ba478b23b13232f28d21051d907ce8fdd509d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int32" + } + }; +} +exports.DataInt32Key = DataInt32Key; +function DataUint32KeyName() { + return "vrsc::data.type.uint32"; +} +exports.DataUint32KeyName = DataUint32KeyName; +function DataUint32Key() { + return { + "vdxfid": "iKSj5zhd6cSsLudaGhtfmisRNgEM7SPFWY", + "indexid": "xQGqYo8hwvfXy5Wc8PYpk7PxQLFMwfP7Fp", + "hash160result": "f279818aeb4fe768956b350d1fc7216ca0e82aaf", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint32" + } + }; +} +exports.DataUint32Key = DataUint32Key; +function DataInt64KeyName() { + return "vrsc::data.type.int64"; +} +exports.DataInt64KeyName = DataInt64KeyName; +function DataInt64Key() { + return { + "vdxfid": "iKB3TGi9Dg5HZ4nQAgLQAgp3tuXBaRKHpC", + "indexid": "xQ19v59E4zHxBEfS2MzZ95LavZYCTTeuyg", + "hash160result": "ab3705f8a7fae59786ef897b014df85fcd9533ac", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int64" + } + }; +} +exports.DataInt64Key = DataInt64Key; +function DataUint64KeyName() { + return "vrsc::data.type.uint64"; +} +exports.DataUint64KeyName = DataUint64KeyName; +function DataUint64Key() { + return { + "vdxfid": "iPamkQf38AeGQ8z4zSsZL7t9kXMeUkYLJL", + "indexid": "xUQtDD67yUrw2Js6r8XiJWQgnBNfNeeoUq", + "hash160result": "bb2ae9ed3e9f400def0724937fbf65f23ef690dc", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint64" + } + }; +} +exports.DataUint64Key = DataUint64Key; +function DataUint160KeyName() { + return "vrsc::data.type.uint160"; +} +exports.DataUint160KeyName = DataUint160KeyName; +function DataUint160Key() { + return { + "vdxfid": "iAAwdbLyKYL39nJ1eQHaHtb75krg4mV1Lq", + "indexid": "xF146Pn4ArYhmxB3W5wjGH7e7Qsgx9bkpj", + "hash160result": "d97d2295d4c73f6f6f0697c8086bd822d6977549", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint160" + } + }; +} +exports.DataUint160Key = DataUint160Key; +function DataUint256KeyName() { + return "vrsc::data.type.uint256"; +} +exports.DataUint256KeyName = DataUint256KeyName; +function DataUint256Key() { + return { + "vdxfid": "i8k7g7z6grtGYrNZmZr5TQ872aHssXuuua", + "indexid": "xDaE8vRBYB6wB2FbdFWERnee4EJtjbCtMM", + "hash160result": "939b27bea698d180237c40b2194025acc673cb39", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint256" + } + }; +} +exports.DataUint256Key = DataUint256Key; +function DataStringKeyName() { + return "vrsc::data.type.string"; +} +exports.DataStringKeyName = DataStringKeyName; +function DataStringKey() { + return { + "vdxfid": "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c", + "indexid": "xPwgY6oPdusaAgNK3u5yHCQG5NsHEcBpi5", + "hash160result": "e5c061641228a399169211e666de18448b7b8bab", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.string" + } + }; +} +exports.DataStringKey = DataStringKey; +// this is a key for a typed vector, which will have the object type key following the vector key +function DataVectorKeyName() { + return "vrsc::data.type.vector"; +} +exports.DataVectorKeyName = DataVectorKeyName; +function DataVectorKey() { + return { + "vdxfid": "iAEShwk1xjdGhaUSz3Maa2XR32o3vRuHq7", + "indexid": "xF4ZAkB6p3qwKkMUqj1jYR3x4gp4mGz657", + "hash160result": "503875b0dc301189a98927d3ece56c5f921c1f4a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.vector" + } + }; +} +exports.DataVectorKey = DataVectorKey; +function DataByteVectorKeyName() { + return "vrsc::data.type.bytevector"; +} +exports.DataByteVectorKeyName = DataByteVectorKeyName; +function DataByteVectorKey() { + return { + "vdxfid": "iKMhRLX1JHQihVZx2t2pAWW2uzmK6AzwW3", + "indexid": "xQBot8x69bdPKfSytZgy8u2ZwenKzVjR4X", + "hash160result": "cc3ae6466006629f5105f71325bb2a19107037ae", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.bytevector" + } + }; +} +exports.DataByteVectorKey = DataByteVectorKey; +function DataInt32VectorKeyName() { + return "vrsc::data.type.int32vector"; +} +exports.DataInt32VectorKeyName = DataInt32VectorKeyName; +function DataInt32VectorKey() { + return { + "vdxfid": "iJZt2fcUv1iivbfC3tuPuefabcTppQEoVq", + "indexid": "xPPzVU3ZmKwPYmYDuaZYt3C7dGUqk939N7", + "hash160result": "c0847f3025c408059b5a8f6a9e414a8ed8288da5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int32vector" + } + }; +} +exports.DataInt32VectorKey = DataInt32VectorKey; +function DataInt64VectorKeyName() { + return "vrsc::data.type.int64vector"; +} +exports.DataInt64VectorKeyName = DataInt64VectorKeyName; +function DataInt64VectorKey() { + return { + "vdxfid": "i4qtYkFS9iNyu2AkqwoSn1xyCdfH9PUvak", + "indexid": "x9g11YgX12beXC3nhdTbkQVWEHgJ2jqfz1", + "hash160result": "c6219ea13884987453692cb14c72d5f6a47c020f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int64vector" + } + }; +} +exports.DataInt64VectorKey = DataInt64VectorKey; +function DataCurrencyMapKeyName() { + return "vrsc::data.type.object.currencymap"; +} +exports.DataCurrencyMapKeyName = DataCurrencyMapKeyName; +function DataCurrencyMapKey() { + return { + "vdxfid": "iMrGhzkZq5fpWWSa1RambRySFPb7CuvKuX", + "indexid": "xSgPAoBegPtV8gKbs7EvZpVyH3c858ZUvL", + "hash160result": "25db70c2fcae2571f89201181bec04587e1f8fc9", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.currencymap" + } + }; +} +exports.DataCurrencyMapKey = DataCurrencyMapKey; +function DataRatingsKeyName() { + return "vrsc::data.type.object.ratings"; +} +exports.DataRatingsKeyName = DataRatingsKeyName; +function DataRatingsKey() { + return { + "vdxfid": "iHJComZUXXGniLkDhjYprWYEN8qvQGDoam", + "indexid": "xN8KGZzZNqVTLWdFZRCypu4mPnrwHFKbCK", + "hash160result": "32cad57ff1dc5db4b5ba573ce01bc9c89b0d9e97", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.ratings" + } + }; +} +exports.DataRatingsKey = DataRatingsKey; +function DataURLKeyName() { + return "vrsc::data.type.object.url"; +} +exports.DataURLKeyName = DataURLKeyName; +function DataURLKey() { + return { + "vdxfid": "iJ7xdhJTJAvJubNnSJFXyA3jujzqGxjLuZ", + "indexid": "xNx56VjY9V8yXmFpHyugwYaGwQ1rCt6J9W", + "hash160result": "7748bfaf53dd2ff63ed5f73a41174c360f30a6a0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.url" + } + }; +} +exports.DataURLKey = DataURLKey; +function DataTransferDestinationKeyName() { + return "vrsc::data.type.object.transferdestination"; +} +exports.DataTransferDestinationKeyName = DataTransferDestinationKeyName; +function DataTransferDestinationKey() { + return { + "vdxfid": "i91L6zwZQrkbNVMB1AZ1Z671qybexRmeVK", + "indexid": "xDqSZoNeGAyFzfECrrDAXUdYsdcfs3Zuku", + "hash160result": "92f38773849383146037b16a48ea350c1c11ac3c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.transferdestination" + } + }; +} +exports.DataTransferDestinationKey = DataTransferDestinationKey; +function UTXORefKeyName() { + return "vrsc::data.type.object.utxoref"; +} +exports.UTXORefKeyName = UTXORefKeyName; +function UTXORefKey() { + return { + "vdxfid": "iNcKvh7mazaXptzHf85q6EtpFYFE7asKC1", + "indexid": "xTSSPVYrSJoCT4sKWojz4dRMHCGF3h9tM4", + "hash160result": "013e760f7451c289672993ea391ae643c21ce4d1", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.utxoref" + } + }; +} +exports.UTXORefKey = UTXORefKey; +function CrossChainDataRefKeyName() { + return "vrsc::data.type.object.crosschaindataref"; +} +exports.CrossChainDataRefKeyName = CrossChainDataRefKeyName; +function CrossChainDataRefKey() { + return { + "vdxfid": "iP3euVSzNcXUrLNHnQnR9G6q8jeYuGSxgw", + "indexid": "xTsmNHt5Dvk9UWFKe6Sa7edNAPfZmJVgLc", + "hash160result": "4d33e0aee0f648c7871b2661d1221b57c05aaed6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.crosschaindataref" + } + }; +} +exports.CrossChainDataRefKey = CrossChainDataRefKey; +function EncryptionDescriptorKeyName() { + return "vrsc::data.type.encryptiondescriptor"; +} +exports.EncryptionDescriptorKeyName = EncryptionDescriptorKeyName; +function EncryptionDescriptorKey() { + return { + "vdxfid": "iHEEK8ipj58BeKZNWuaaR2tDR5RK2kmf9A", + "indexid": "xN4Lmw9uaPLrGVSQNbEjPRQkSjSKxsHUQu", + "hash160result": "8d021acc1b68335bd7d37b28ff773c138ea5dd96", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.encryptiondescriptor" + } + }; +} +exports.EncryptionDescriptorKey = EncryptionDescriptorKey; +function SaltedDataKeyName() { + return "vrsc::data.type.salteddata"; +} +exports.SaltedDataKeyName = SaltedDataKeyName; +function SaltedDataKey() { + return { + "vdxfid": "i92U1nLuLJkC44FZZ4Lq9zk4qW3HrWAWNo", + "indexid": "xDraUamzBcxrgE8bQjzz8PGbsA4JiFskTD", + "hash160result": "9e13510e01d0d03a7bc90d7a2ef32824f515e33c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.salteddata" + } + }; +} +exports.SaltedDataKey = SaltedDataKey; +function DataDescriptorKeyName() { + return "vrsc::data.type.object.datadescriptor"; +} +exports.DataDescriptorKeyName = DataDescriptorKeyName; +function DataDescriptorKey() { + return { + "vdxfid": "i4GC1YGEVD21afWudGoFJVdnfjJ5XWnCQv", + "indexid": "x96JULhKLXEgCqPwUxTQGtAKhPK6Qh1iaW", + "hash160result": "4d4f12424ded2033a526a4e2a8835fc5b2eba208", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.datadescriptor" + } + }; +} +exports.DataDescriptorKey = DataDescriptorKey; +function SignatureDataKeyName() { + return "vrsc::data.signaturedata"; +} +exports.SignatureDataKeyName = SignatureDataKeyName; +function SignatureDataKey() { + return { + "vdxfid": "i7PcVF9wwPtQ6p6jDtCVpohX65pTZuP2ah", + "indexid": "xCDix3b2ni74iyym5ZreoCE47jqUTBFRAb", + "hash160result": "b48b359e9a00042cec64f7f66ac717d388a4f22a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.signaturedata" + } + }; +} +exports.SignatureDataKey = SignatureDataKey; +function VectorUint256KeyName() { + return "vrsc::data.mmrhashes"; +} +exports.VectorUint256KeyName = VectorUint256KeyName; +function VectorUint256Key() { + return { + "vdxfid": "i9UgJ2WxGw95PKdoCXjpfnBShtP5gi9fxS", + "indexid": "xEJnkpx38FMk1VWq4DPyeAhyjYQ6X5Gsti", + "hash160result": "8c1afd59e904f6d2702699963abccbc6d326d841", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.mmrhashes" + } + }; +} +exports.VectorUint256Key = VectorUint256Key; +function MMRLinksKeyName() { + return "vrsc::data.mmrlinks"; +} +exports.MMRLinksKeyName = MMRLinksKeyName; +function MMRLinksKey() { + return { + "vdxfid": "iPQsnA1R8UjHNddZKZ3FxsuKQ5WzKqSC7w", + "indexid": "xUEzExSVynwwzoWbBEhQwGRrRjY1Bc2MYc", + "hash160result": "f535a4e9ac0f94eda01695d16489a4a102d6b1da", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.mmrlinks" + } + }; +} +exports.MMRLinksKey = MMRLinksKey; +function MMRDescriptorKeyName() { + return "vrsc::data.mmrdescriptor"; +} +exports.MMRDescriptorKeyName = MMRDescriptorKeyName; +function MMRDescriptorKey() { + return { + "vdxfid": "i9dVDb4LgfMYrZD1JBNP2uaso4bNAkT4Jr", + "indexid": "xETbgPVRXyaDUj639s2Y1J7QpicP4DvZMt", + "hash160result": "97273a4c02d6be002f8d69c3979616732ba68243", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.mmrdescriptor" + } + }; +} +exports.MMRDescriptorKey = MMRDescriptorKey; +function TypeDefinitionKeyName() { + return "vrsc::data.type.typedefinition"; +} +exports.TypeDefinitionKeyName = TypeDefinitionKeyName; +function TypeDefinitionKey() { + return { + "vdxfid": "iL5MPPHWXQEY3p2Q1UsmGDvXsgPiqd1W1S", + "indexid": "xQuTrBibNiTCfyuRsAXvEcT4uLQjhxrpyL", + "hash160result": "ae8d805d9650c0512a6b6ec33e963386542f18b6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.typedefinition" + } + }; +} +exports.TypeDefinitionKey = TypeDefinitionKey; +function MultiMapKeyName() { + return "vrsc::identity.multimapkey"; +} +exports.MultiMapKeyName = MultiMapKeyName; +function MultiMapKey() { + return { + "vdxfid": "i3mbggp3NBR77C5JeFQJTpAxmgMidayLLE", + "indexid": "x8bi9VF8DVdmjMxLVw4TSChVoLNjUyapgs", + "hash160result": "6920bb81b420bc95e29a10ed677379b1e39e3a03", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.multimapkey" + } + }; +} +exports.MultiMapKey = MultiMapKey; +function ContentMultiMapRemoveKeyName() { + return "vrsc::identity.multimapremove"; +} +exports.ContentMultiMapRemoveKeyName = ContentMultiMapRemoveKeyName; +function ContentMultiMapRemoveKey() { + return { + "vdxfid": "i5Zkx5Z7tEfh42xtKfwbJ5LgEWE9rEgpFY", + "indexid": "xAPsQszCjYtMgCqvBMbkGTsDGAFAmrN33A", + "hash160result": "d393b986e4f82db7bec82d97b186882d739ded16", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.multimapremove" + } + }; +} +exports.ContentMultiMapRemoveKey = ContentMultiMapRemoveKey; +// for any ID, this key indexes content that applies to representing the profile of +// that ID. there may be many mime-type instances of a particular piece of profile media +function ProfileMediaKeyName() { + return "vrsc::identity.profile.media"; +} +exports.ProfileMediaKeyName = ProfileMediaKeyName; +function ProfileMediaKey() { + return { + "vdxfid": "iEYsp2njSt1M4EVYi9uuAPBU2wpKmThkkr", + "indexid": "xKNzGqDpJCE1gQNaZqa48mi14bqLaG669g", + "hash160result": "e95b2ee1abb130a93900ddaef2d8e528010f7c79", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.profile.media" + } + }; +} +exports.ProfileMediaKey = ProfileMediaKey; +function ZMemoMessageKeyName() { + return "vrsc::system.zmemo.message"; +} +exports.ZMemoMessageKeyName = ZMemoMessageKeyName; +function ZMemoMessageKey() { + return { + "vdxfid": "iNHg1n828PUxktkYeNxC6sdVmuKTipn3L3", + "indexid": "xT7nUaZ6yhhdP4daW4cM5GA2oZLUaNVaBD", + "hash160result": "4a8f418203621f10d1a61701be8dbbbb38fa5cce", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::system.zmemo.message" + } + }; +} +exports.ZMemoMessageKey = ZMemoMessageKey; +function ZMemoSignatureKeyName() { + return "vrsc::system.zmemo.signature"; +} +exports.ZMemoSignatureKeyName = ZMemoSignatureKeyName; +function ZMemoSignatureKey() { + return { + "vdxfid": "i7mrLLjUfGYuHJwnsxFvd282hsdn4staJG", + "indexid": "xCbxo9AZWamZuUppjdv5bQeZjXeo1vbaCc", + "hash160result": "7b47c8cd90c4c3ddc542f37ca77473b7325a272f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::system.zmemo.signature" + } + }; +} +exports.ZMemoSignatureKey = ZMemoSignatureKey; +function CurrencyStartNotarizationKeyName() { + return "vrsc::system.currency.startnotarization"; +} +exports.CurrencyStartNotarizationKeyName = CurrencyStartNotarizationKeyName; +function CurrencyStartNotarizationKey() { + return { + "vdxfid": "iRvxVcGLaCXcDiAfnQ5FfeBCo2AiBibAft", + "indexid": "xWm4xQhRRWkGqt3he5jQe2hjpgBj5C7Tj3", + "hash160result": "b537201ca6465976bea7bdb03119644a858052f6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::system.currency.startnotarization" + } + }; +} +exports.CurrencyStartNotarizationKey = CurrencyStartNotarizationKey; diff --git a/src/__tests__/attestation/attestation.test.ts b/src/__tests__/attestation/attestation.test.ts index 4bae86e..5daf6e6 100644 --- a/src/__tests__/attestation/attestation.test.ts +++ b/src/__tests__/attestation/attestation.test.ts @@ -115,15 +115,7 @@ describe('Serializes and deserializes attestation request', () => { }, challenge: { challenge_id: "iKNufKJdLX3Xg8qFru9AuLBvivAEJ88PW4", - requested_access: [new RequestedPermission("", IDENTITY_VIEW.vdxfid), - new RequestedPermission({ - accepted_attestors: ["iC9x9VZ2XMop7spFzeXqSKX8WqmrG9cu41"], - attestation_keys: [ - IDENTITYDATA_FIRSTNAME.vdxfid, - IDENTITYDATA_LASTNAME.vdxfid, - IDENTITYDATA_ATTESTOR.vdxfid, - IDENTITYDATA_IDENTITY.vdxfid] - }, ATTESTATION_READ_REQUEST.vdxfid)], + requested_access: [new RequestedPermission("", IDENTITY_VIEW.vdxfid)], session_id: "iRQZGW36o3RcVR1xyVT1qWdAKdxp3wUyrh", redirect_uris: [ new RedirectUri( diff --git a/src/__tests__/vdxf/loginconsent.test.ts b/src/__tests__/vdxf/loginconsent.test.ts index ca676bd..6911201 100644 --- a/src/__tests__/vdxf/loginconsent.test.ts +++ b/src/__tests__/vdxf/loginconsent.test.ts @@ -230,8 +230,7 @@ describe('Serializes and deserializes signature objects properly', () => { }, challenge: { challenge_id: "iKNufKJdLX3Xg8qFru9AuLBvivAEJ88PW4", - requested_access: [new RequestedPermission("", IDENTITY_VIEW.vdxfid), - new RequestedPermission({accepted_attestors:["iC9x9VZ2XMop7spFzeXqSKX8WqmrG9cu41"], attestation_keys:["iSSxdyTcCp8VALGBGKy8R7ATYSRuK15NkL","i3jWsqLVnYyJu78E7mw6pbD3TazwZJpuk4","i9MRw6YUhXtP6DT8eufGnB5oRQ34TjDsdb","iJvFSXk2EDeEu9BkJQSwAVeiochF6AYpfF"]}, ATTESTATION_READ_REQUEST.vdxfid)], + requested_access: [new RequestedPermission("", IDENTITY_VIEW.vdxfid)], session_id: "iRQZGW36o3RcVR1xyVT1qWdAKdxp3wUyrh", redirect_uris: [ new RedirectUri( diff --git a/src/vdxf/classes/Attestation.ts b/src/vdxf/classes/Attestation.ts index f541816..db0327f 100644 --- a/src/vdxf/classes/Attestation.ts +++ b/src/vdxf/classes/Attestation.ts @@ -1,9 +1,10 @@ import bufferutils from '../../utils/bufferutils' import { toBase58Check, fromBase58Check } from '../../utils/address'; import { I_ADDR_VERSION } from '../../constants/vdxf'; -import { DataDescriptor, VDXF_Data } from './DataDescriptor'; +import { DataDescriptor } from './DataDescriptor'; import { ATTESTATION_VIEW_REQUEST, ATTESTATION_PROVISION_TYPE } from '../'; import varuint from '../../utils/varuint'; +import { BufferDataVdxfObject } from '../index'; const { BufferReader, BufferWriter } = bufferutils; export interface AttestationRequestInterface { @@ -12,7 +13,7 @@ export interface AttestationRequestInterface { attestation_keys: Array, attestor_filters?: Array} -export class Attestation extends VDXF_Data { +export class Attestation extends BufferDataVdxfObject { setAttestationViewRequestData(attestationId: string, accepted_attestors: Array, attestation_keys: Array, attestor_filters: Array) { diff --git a/src/vdxf/classes/DataDescriptor.ts b/src/vdxf/classes/DataDescriptor.ts index dc895b0..6f8203a 100644 --- a/src/vdxf/classes/DataDescriptor.ts +++ b/src/vdxf/classes/DataDescriptor.ts @@ -1,7 +1,5 @@ import { BigNumber } from '../../utils/types/BigNumber'; import { BN } from 'bn.js'; -import { BufferDataVdxfObject } from '../index'; -import { VDXFKeyInterface } from "../keys" import varint from '../../utils/varint' import varuint from '../../utils/varuint' import bufferutils from '../../utils/bufferutils' @@ -15,6 +13,8 @@ import { ContentMultiMapRemove } from '../../pbaas/ContentMultiMapRemove'; import { CrossChainDataRef } from './CrossChainDataRef'; import { VDXF_OBJECT_DEFAULT_VERSION, HASH160_BYTE_LENGTH, I_ADDR_VERSION } from '../../constants/vdxf'; import { SignatureData } from './SignatureData'; +import { BufferDataVdxfObject } from '../index'; +import * as VDXF_Data from '../vdxfDataKeys'; export class DataDescriptor { @@ -118,7 +118,7 @@ export class DataDescriptor { DecodeHashVector(): Array { - const vdxfData = new VDXF_Data("",""); + const vdxfData = new BufferDataVdxfObject(); vdxfData.fromBuffer(this.objectdata); const hashes = []; @@ -295,507 +295,6 @@ export class DataDescriptor { }; -// VDXF data that describes an encrypted chunk of data -export class VDXF_Data extends BufferDataVdxfObject { - - static DataByteKeyName(): string { - return "vrsc::data.type.byte"; - } - static DataByteKey(): VDXFKeyInterface { - return { - "vdxfid": "iBXUHbh4iacbeZnzDRxishvBSrYk2S2k7t", - "indexid": "xGMakQ89ZtqGGjg257csr6SiUWZksGmjWp", - "hash160result": "2e97a8bba443773812341e1d761530d3bba04f58", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.byte" - } - } - } - static DataInt16KeyName(): string { - return "vrsc::data.type.int16"; - } - static DataInt16Key(): VDXFKeyInterface { - return { - "vdxfid": "iDtTv3wf1Vk3M2Y46RjLPKtttx5hydwtY1", - "indexid": "xJiaNrNjroxhyCR5x7PVMiRRvc6ipg6N9g", - "hash160result": "ee334ebd432db0b24cc2702eda61c28ff44d3872", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int16" - } - } - } - static DataUint16KeyName(): string { - return "vrsc::data.type.uint16"; - } - static DataUint16Key(): VDXFKeyInterface { - return { - "vdxfid": "iHn7urT2yVfS7pQn6WGAmCVWh4HBLV24n3", - "indexid": "xNcENet7pot6jzHoxBvKjb23iiJCGpekDk", - "hash160result": "5cfc322d2a216145f7b82714115e7953269de59c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint16" - } - } - } - static DataInt32KeyName(): string { - return "vrsc::data.type.int32"; - } - static DataInt32Key(): VDXFKeyInterface { - return { - "vdxfid": "iHpLPprRDv3H5H3ZMaJ9nyHFzkG9xJWZDb", - "indexid": "xNeSrdHW5EFwhSvbDFxJmMoo2QHAtoEaEM", - "hash160result": "3e9ba478b23b13232f28d21051d907ce8fdd509d", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int32" - } - } - } - static DataUint32KeyName(): string { - return "vrsc::data.type.uint32"; - } - static DataUint32Key(): VDXFKeyInterface { - return { - "vdxfid": "iKSj5zhd6cSsLudaGhtfmisRNgEM7SPFWY", - "indexid": "xQGqYo8hwvfXy5Wc8PYpk7PxQLFMwfP7Fp", - "hash160result": "f279818aeb4fe768956b350d1fc7216ca0e82aaf", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint32" - } - } - } - static DataInt64KeyName(): string { - return "vrsc::data.type.int64"; - } - static DataInt64Key(): VDXFKeyInterface { - return { - "vdxfid": "iKB3TGi9Dg5HZ4nQAgLQAgp3tuXBaRKHpC", - "indexid": "xQ19v59E4zHxBEfS2MzZ95LavZYCTTeuyg", - "hash160result": "ab3705f8a7fae59786ef897b014df85fcd9533ac", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int64" - } - } - - } - static DataUint64KeyName(): string { - return "vrsc::data.type.uint64"; - } - static DataUint64Key(): VDXFKeyInterface { - return { - "vdxfid": "iPamkQf38AeGQ8z4zSsZL7t9kXMeUkYLJL", - "indexid": "xUQtDD67yUrw2Js6r8XiJWQgnBNfNeeoUq", - "hash160result": "bb2ae9ed3e9f400def0724937fbf65f23ef690dc", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint64" - } - } - - } - static DataUint160KeyName(): string { - return "vrsc::data.type.uint160"; - } - static DataUint160Key(): VDXFKeyInterface { - return { - "vdxfid": "iAAwdbLyKYL39nJ1eQHaHtb75krg4mV1Lq", - "indexid": "xF146Pn4ArYhmxB3W5wjGH7e7Qsgx9bkpj", - "hash160result": "d97d2295d4c73f6f6f0697c8086bd822d6977549", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint160" - } - } - - } - static DataUint256KeyName(): string { - return "vrsc::data.type.uint256"; - } - static DataUint256Key(): VDXFKeyInterface { - return { - "vdxfid": "i8k7g7z6grtGYrNZmZr5TQ872aHssXuuua", - "indexid": "xDaE8vRBYB6wB2FbdFWERnee4EJtjbCtMM", - "hash160result": "939b27bea698d180237c40b2194025acc673cb39", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint256" - } - } - - } - static DataStringKeyName(): string { - return "vrsc::data.type.string"; - } - static DataStringKey(): VDXFKeyInterface { - return { - "vdxfid": "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c", - "indexid": "xPwgY6oPdusaAgNK3u5yHCQG5NsHEcBpi5", - "hash160result": "e5c061641228a399169211e666de18448b7b8bab", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.string" - } - } - - } - // this is a key for a typed vector, which will have the object type key following the vector key - static DataVectorKeyName(): string { - return "vrsc::data.type.vector"; - } - static DataVectorKey(): VDXFKeyInterface { - return { - "vdxfid": "iAEShwk1xjdGhaUSz3Maa2XR32o3vRuHq7", - "indexid": "xF4ZAkB6p3qwKkMUqj1jYR3x4gp4mGz657", - "hash160result": "503875b0dc301189a98927d3ece56c5f921c1f4a", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.vector" - } - } - } - static DataByteVectorKeyName(): string { - return "vrsc::data.type.bytevector"; - } - static DataByteVectorKey(): VDXFKeyInterface { - return { - "vdxfid": "iKMhRLX1JHQihVZx2t2pAWW2uzmK6AzwW3", - "indexid": "xQBot8x69bdPKfSytZgy8u2ZwenKzVjR4X", - "hash160result": "cc3ae6466006629f5105f71325bb2a19107037ae", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.bytevector" - } - } - - } - static DataInt32VectorKeyName(): string { - return "vrsc::data.type.int32vector"; - } - static DataInt32VectorKey(): VDXFKeyInterface { - return { - "vdxfid": "iJZt2fcUv1iivbfC3tuPuefabcTppQEoVq", - "indexid": "xPPzVU3ZmKwPYmYDuaZYt3C7dGUqk939N7", - "hash160result": "c0847f3025c408059b5a8f6a9e414a8ed8288da5", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int32vector" - } - } - } - static DataInt64VectorKeyName(): string { - return "vrsc::data.type.int64vector"; - } - static DataInt64VectorKey(): VDXFKeyInterface { - return { - "vdxfid": "i4qtYkFS9iNyu2AkqwoSn1xyCdfH9PUvak", - "indexid": "x9g11YgX12beXC3nhdTbkQVWEHgJ2jqfz1", - "hash160result": "c6219ea13884987453692cb14c72d5f6a47c020f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int64vector" - } - } - - } - static DataCurrencyMapKeyName(): string { - return "vrsc::data.type.object.currencymap"; - } - static DataCurrencyMapKey(): VDXFKeyInterface { - return { - "vdxfid": "iMrGhzkZq5fpWWSa1RambRySFPb7CuvKuX", - "indexid": "xSgPAoBegPtV8gKbs7EvZpVyH3c858ZUvL", - "hash160result": "25db70c2fcae2571f89201181bec04587e1f8fc9", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.currencymap" - } - } - - } - static DataRatingsKeyName(): string { - return "vrsc::data.type.object.ratings"; - } - static DataRatingsKey(): VDXFKeyInterface { - return { - "vdxfid": "iHJComZUXXGniLkDhjYprWYEN8qvQGDoam", - "indexid": "xN8KGZzZNqVTLWdFZRCypu4mPnrwHFKbCK", - "hash160result": "32cad57ff1dc5db4b5ba573ce01bc9c89b0d9e97", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.ratings" - } - } - } - static DataURLKeyName(): string { - return "vrsc::data.type.object.url"; - } - static DataURLKey(): VDXFKeyInterface { - return { - "vdxfid": "iJ7xdhJTJAvJubNnSJFXyA3jujzqGxjLuZ", - "indexid": "xNx56VjY9V8yXmFpHyugwYaGwQ1rCt6J9W", - "hash160result": "7748bfaf53dd2ff63ed5f73a41174c360f30a6a0", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.url" - } - } - } - static DataTransferDestinationKeyName(): string { - return "vrsc::data.type.object.transferdestination"; - } - static DataTransferDestinationKey(): VDXFKeyInterface { - return { - "vdxfid": "i91L6zwZQrkbNVMB1AZ1Z671qybexRmeVK", - "indexid": "xDqSZoNeGAyFzfECrrDAXUdYsdcfs3Zuku", - "hash160result": "92f38773849383146037b16a48ea350c1c11ac3c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.transferdestination" - } - } - } - static UTXORefKeyName(): string { - return "vrsc::data.type.object.utxoref"; - } - static UTXORefKey(): VDXFKeyInterface { - return { - "vdxfid": "iNcKvh7mazaXptzHf85q6EtpFYFE7asKC1", - "indexid": "xTSSPVYrSJoCT4sKWojz4dRMHCGF3h9tM4", - "hash160result": "013e760f7451c289672993ea391ae643c21ce4d1", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.utxoref" - } - } - } - static CrossChainDataRefKeyName(): string { - return "vrsc::data.type.object.crosschaindataref"; - } - static CrossChainDataRefKey(): VDXFKeyInterface { - return { - "vdxfid": "iP3euVSzNcXUrLNHnQnR9G6q8jeYuGSxgw", - "indexid": "xTsmNHt5Dvk9UWFKe6Sa7edNAPfZmJVgLc", - "hash160result": "4d33e0aee0f648c7871b2661d1221b57c05aaed6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.crosschaindataref" - } - } - - } - static EncryptionDescriptorKeyName(): string { - return "vrsc::data.type.encryptiondescriptor"; - } - static EncryptionDescriptorKey(): VDXFKeyInterface { - return { - "vdxfid": "iHEEK8ipj58BeKZNWuaaR2tDR5RK2kmf9A", - "indexid": "xN4Lmw9uaPLrGVSQNbEjPRQkSjSKxsHUQu", - "hash160result": "8d021acc1b68335bd7d37b28ff773c138ea5dd96", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.encryptiondescriptor" - } - } - } - static SaltedDataKeyName(): string { - return "vrsc::data.type.salteddata"; - } - static SaltedDataKey(): VDXFKeyInterface { - return { - "vdxfid": "i92U1nLuLJkC44FZZ4Lq9zk4qW3HrWAWNo", - "indexid": "xDraUamzBcxrgE8bQjzz8PGbsA4JiFskTD", - "hash160result": "9e13510e01d0d03a7bc90d7a2ef32824f515e33c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.salteddata" - } - } - } - static DataDescriptorKeyName(): string { - return "vrsc::data.type.object.datadescriptor"; - } - static DataDescriptorKey(): VDXFKeyInterface { - return { - "vdxfid": "i4GC1YGEVD21afWudGoFJVdnfjJ5XWnCQv", - "indexid": "x96JULhKLXEgCqPwUxTQGtAKhPK6Qh1iaW", - "hash160result": "4d4f12424ded2033a526a4e2a8835fc5b2eba208", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.datadescriptor" - } - } - } - static SignatureDataKeyName(): string { - return "vrsc::data.signaturedata"; - } - static SignatureDataKey(): VDXFKeyInterface { - return { - "vdxfid": "i7PcVF9wwPtQ6p6jDtCVpohX65pTZuP2ah", - "indexid": "xCDix3b2ni74iyym5ZreoCE47jqUTBFRAb", - "hash160result": "b48b359e9a00042cec64f7f66ac717d388a4f22a", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.signaturedata" - } - } - } - static VectorUint256KeyName(): string { - return "vrsc::data.mmrhashes"; - } - static VectorUint256Key(): VDXFKeyInterface { - return { - "vdxfid": "i9UgJ2WxGw95PKdoCXjpfnBShtP5gi9fxS", - "indexid": "xEJnkpx38FMk1VWq4DPyeAhyjYQ6X5Gsti", - "hash160result": "8c1afd59e904f6d2702699963abccbc6d326d841", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.mmrhashes" - } - } - } - static MMRLinksKeyName(): string { - return "vrsc::data.mmrlinks"; - } - static MMRLinksKey(): VDXFKeyInterface { - return { - "vdxfid": "iPQsnA1R8UjHNddZKZ3FxsuKQ5WzKqSC7w", - "indexid": "xUEzExSVynwwzoWbBEhQwGRrRjY1Bc2MYc", - "hash160result": "f535a4e9ac0f94eda01695d16489a4a102d6b1da", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.mmrlinks" - } - } - - } - static MMRDescriptorKeyName(): string { - return "vrsc::data.mmrdescriptor"; - } - static MMRDescriptorKey(): VDXFKeyInterface { - return { - "vdxfid": "i9dVDb4LgfMYrZD1JBNP2uaso4bNAkT4Jr", - "indexid": "xETbgPVRXyaDUj639s2Y1J7QpicP4DvZMt", - "hash160result": "97273a4c02d6be002f8d69c3979616732ba68243", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.mmrdescriptor" - } - } - } - static TypeDefinitionKeyName(): string { - return "vrsc::data.type.typedefinition"; - } - static TypeDefinitionKey(): VDXFKeyInterface { - return { - "vdxfid": "iL5MPPHWXQEY3p2Q1UsmGDvXsgPiqd1W1S", - "indexid": "xQuTrBibNiTCfyuRsAXvEcT4uLQjhxrpyL", - "hash160result": "ae8d805d9650c0512a6b6ec33e963386542f18b6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.typedefinition" - } - } - } - static MultiMapKeyName(): string { - return "vrsc::identity.multimapkey"; - } - static MultiMapKey(): VDXFKeyInterface { - return { - "vdxfid": "i3mbggp3NBR77C5JeFQJTpAxmgMidayLLE", - "indexid": "x8bi9VF8DVdmjMxLVw4TSChVoLNjUyapgs", - "hash160result": "6920bb81b420bc95e29a10ed677379b1e39e3a03", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.multimapkey" - } - } - } - static ContentMultiMapRemoveKeyName(): string { - return "vrsc::identity.multimapremove"; - } - static ContentMultiMapRemoveKey(): VDXFKeyInterface { - return { - "vdxfid": "i5Zkx5Z7tEfh42xtKfwbJ5LgEWE9rEgpFY", - "indexid": "xAPsQszCjYtMgCqvBMbkGTsDGAFAmrN33A", - "hash160result": "d393b986e4f82db7bec82d97b186882d739ded16", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.multimapremove" - } - } - } - - // for any ID, this key indexes content that applies to representing the profile of - // that ID. there may be many mime-type instances of a particular piece of profile media - static ProfileMediaKeyName(): string { - return "vrsc::identity.profile.media"; - } - static ProfileMediaKey(): VDXFKeyInterface { - return { - "vdxfid": "iEYsp2njSt1M4EVYi9uuAPBU2wpKmThkkr", - "indexid": "xKNzGqDpJCE1gQNaZqa48mi14bqLaG669g", - "hash160result": "e95b2ee1abb130a93900ddaef2d8e528010f7c79", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.profile.media" - } - } - - } - - static ZMemoMessageKeyName(): string { - return "vrsc::system.zmemo.message"; - } - static ZMemoMessageKey(): VDXFKeyInterface { - return { - "vdxfid": "iNHg1n828PUxktkYeNxC6sdVmuKTipn3L3", - "indexid": "xT7nUaZ6yhhdP4daW4cM5GA2oZLUaNVaBD", - "hash160result": "4a8f418203621f10d1a61701be8dbbbb38fa5cce", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::system.zmemo.message" - } - } - - } - - static ZMemoSignatureKeyName(): string { - return "vrsc::system.zmemo.signature"; - } - static ZMemoSignatureKey(): VDXFKeyInterface { - return { - "vdxfid": "i7mrLLjUfGYuHJwnsxFvd282hsdn4staJG", - "indexid": "xCbxo9AZWamZuUppjdv5bQeZjXeo1vbaCc", - "hash160result": "7b47c8cd90c4c3ddc542f37ca77473b7325a272f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::system.zmemo.signature" - } - } - } - - static CurrencyStartNotarizationKeyName(): string { - return "vrsc::system.currency.startnotarization"; - } - static CurrencyStartNotarizationKey(): VDXFKeyInterface { - return { - "vdxfid": "iRvxVcGLaCXcDiAfnQ5FfeBCo2AiBibAft", - "indexid": "xWm4xQhRRWkGqt3he5jQe2hjpgBj5C7Tj3", - "hash160result": "b537201ca6465976bea7bdb03119644a858052f6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::system.currency.startnotarization" - } - } - } - - GetHash() { }; -}; export class VDXFDataDescriptor extends BufferDataVdxfObject { dataDescriptor: DataDescriptor; diff --git a/src/vdxf/classes/IdentityData.ts b/src/vdxf/classes/IdentityData.ts index 94cf46c..524c1e6 100644 --- a/src/vdxf/classes/IdentityData.ts +++ b/src/vdxf/classes/IdentityData.ts @@ -1,7 +1,7 @@ import * as identitykeys from '../identityDataKeys'; import * as keylist from '../keys'; -import { VDXF_Data } from './DataDescriptor'; +import * as VDXF_Data from '../vdxfDataKeys'; export const friendlyName = (vdfxkey) => { diff --git a/src/vdxf/classes/index.ts b/src/vdxf/classes/index.ts index 404e680..c45f212 100644 --- a/src/vdxf/classes/index.ts +++ b/src/vdxf/classes/index.ts @@ -39,7 +39,5 @@ export { } from './provisioning/ProvisioningResult' export { Context } from './Context' export { defaultPersonalProfileDataTemplate, DataCategory } from './PersonalProfile' -// export { CUTXORef, PBaaSEvidenceRef, IdentityMultimapRef, URLRef, CrossChainDataRef } from './CrossChainDataRef' -// export { DataDescriptor, VDXF_Data, VDXFDataDescriptor, EHashTypes, MMRDescriptor, VectorEncodeVDXFUni } from './DataDescriptor' -// export { CLayer, CMMRNode, CMerkleMountainRange, CMMRBranch, CMMRProof, CMerkleMountainView, GetMMRProofIndex} from './MMR' -// export { SignatureData } from './SignatureData' \ No newline at end of file +export { CMMRNode, CMerkleMountainRange, CMMRBranch, CMMRProof, CMerkleMountainView, GetMMRProofIndex} from './MMR' +export { SignatureData } from './SignatureData' \ No newline at end of file diff --git a/src/vdxf/index.ts b/src/vdxf/index.ts index 73ae453..4ce25ef 100644 --- a/src/vdxf/index.ts +++ b/src/vdxf/index.ts @@ -13,7 +13,7 @@ export * from './keys' export * from './scopes' export * from './keymap' export * from './identityDataKeys' - +export * from './vdxfDataKeys' export interface VDXFObjectInterface { vdxfkey: string; toString: () => string; diff --git a/src/vdxf/vdxfDataKeys.ts b/src/vdxf/vdxfDataKeys.ts new file mode 100644 index 0000000..facbc6f --- /dev/null +++ b/src/vdxf/vdxfDataKeys.ts @@ -0,0 +1,497 @@ +import { VDXFKeyInterface } from "./keys" + +export function DataByteKeyName(): string { + return "vrsc::data.type.byte"; + } +export function DataByteKey(): VDXFKeyInterface { + return { + "vdxfid": "iBXUHbh4iacbeZnzDRxishvBSrYk2S2k7t", + "indexid": "xGMakQ89ZtqGGjg257csr6SiUWZksGmjWp", + "hash160result": "2e97a8bba443773812341e1d761530d3bba04f58", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.byte" + } + } + } +export function DataInt16KeyName(): string { + return "vrsc::data.type.int16"; + } +export function DataInt16Key(): VDXFKeyInterface { + return { + "vdxfid": "iDtTv3wf1Vk3M2Y46RjLPKtttx5hydwtY1", + "indexid": "xJiaNrNjroxhyCR5x7PVMiRRvc6ipg6N9g", + "hash160result": "ee334ebd432db0b24cc2702eda61c28ff44d3872", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int16" + } + } + } +export function DataUint16KeyName(): string { + return "vrsc::data.type.uint16"; + } +export function DataUint16Key(): VDXFKeyInterface { + return { + "vdxfid": "iHn7urT2yVfS7pQn6WGAmCVWh4HBLV24n3", + "indexid": "xNcENet7pot6jzHoxBvKjb23iiJCGpekDk", + "hash160result": "5cfc322d2a216145f7b82714115e7953269de59c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint16" + } + } + } +export function DataInt32KeyName(): string { + return "vrsc::data.type.int32"; + } +export function DataInt32Key(): VDXFKeyInterface { + return { + "vdxfid": "iHpLPprRDv3H5H3ZMaJ9nyHFzkG9xJWZDb", + "indexid": "xNeSrdHW5EFwhSvbDFxJmMoo2QHAtoEaEM", + "hash160result": "3e9ba478b23b13232f28d21051d907ce8fdd509d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int32" + } + } + } +export function DataUint32KeyName(): string { + return "vrsc::data.type.uint32"; + } +export function DataUint32Key(): VDXFKeyInterface { + return { + "vdxfid": "iKSj5zhd6cSsLudaGhtfmisRNgEM7SPFWY", + "indexid": "xQGqYo8hwvfXy5Wc8PYpk7PxQLFMwfP7Fp", + "hash160result": "f279818aeb4fe768956b350d1fc7216ca0e82aaf", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint32" + } + } + } +export function DataInt64KeyName(): string { + return "vrsc::data.type.int64"; + } +export function DataInt64Key(): VDXFKeyInterface { + return { + "vdxfid": "iKB3TGi9Dg5HZ4nQAgLQAgp3tuXBaRKHpC", + "indexid": "xQ19v59E4zHxBEfS2MzZ95LavZYCTTeuyg", + "hash160result": "ab3705f8a7fae59786ef897b014df85fcd9533ac", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int64" + } + } + + } +export function DataUint64KeyName(): string { + return "vrsc::data.type.uint64"; + } +export function DataUint64Key(): VDXFKeyInterface { + return { + "vdxfid": "iPamkQf38AeGQ8z4zSsZL7t9kXMeUkYLJL", + "indexid": "xUQtDD67yUrw2Js6r8XiJWQgnBNfNeeoUq", + "hash160result": "bb2ae9ed3e9f400def0724937fbf65f23ef690dc", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint64" + } + } + + } +export function DataUint160KeyName(): string { + return "vrsc::data.type.uint160"; + } +export function DataUint160Key(): VDXFKeyInterface { + return { + "vdxfid": "iAAwdbLyKYL39nJ1eQHaHtb75krg4mV1Lq", + "indexid": "xF146Pn4ArYhmxB3W5wjGH7e7Qsgx9bkpj", + "hash160result": "d97d2295d4c73f6f6f0697c8086bd822d6977549", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint160" + } + } + + } +export function DataUint256KeyName(): string { + return "vrsc::data.type.uint256"; + } +export function DataUint256Key(): VDXFKeyInterface { + return { + "vdxfid": "i8k7g7z6grtGYrNZmZr5TQ872aHssXuuua", + "indexid": "xDaE8vRBYB6wB2FbdFWERnee4EJtjbCtMM", + "hash160result": "939b27bea698d180237c40b2194025acc673cb39", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint256" + } + } + + } +export function DataStringKeyName(): string { + return "vrsc::data.type.string"; + } +export function DataStringKey(): VDXFKeyInterface { + return { + "vdxfid": "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c", + "indexid": "xPwgY6oPdusaAgNK3u5yHCQG5NsHEcBpi5", + "hash160result": "e5c061641228a399169211e666de18448b7b8bab", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.string" + } + } + + } + // this is a key for a typed vector, which will have the object type key following the vector key +export function DataVectorKeyName(): string { + return "vrsc::data.type.vector"; + } +export function DataVectorKey(): VDXFKeyInterface { + return { + "vdxfid": "iAEShwk1xjdGhaUSz3Maa2XR32o3vRuHq7", + "indexid": "xF4ZAkB6p3qwKkMUqj1jYR3x4gp4mGz657", + "hash160result": "503875b0dc301189a98927d3ece56c5f921c1f4a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.vector" + } + } + } +export function DataByteVectorKeyName(): string { + return "vrsc::data.type.bytevector"; + } +export function DataByteVectorKey(): VDXFKeyInterface { + return { + "vdxfid": "iKMhRLX1JHQihVZx2t2pAWW2uzmK6AzwW3", + "indexid": "xQBot8x69bdPKfSytZgy8u2ZwenKzVjR4X", + "hash160result": "cc3ae6466006629f5105f71325bb2a19107037ae", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.bytevector" + } + } + + } +export function DataInt32VectorKeyName(): string { + return "vrsc::data.type.int32vector"; + } +export function DataInt32VectorKey(): VDXFKeyInterface { + return { + "vdxfid": "iJZt2fcUv1iivbfC3tuPuefabcTppQEoVq", + "indexid": "xPPzVU3ZmKwPYmYDuaZYt3C7dGUqk939N7", + "hash160result": "c0847f3025c408059b5a8f6a9e414a8ed8288da5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int32vector" + } + } + } +export function DataInt64VectorKeyName(): string { + return "vrsc::data.type.int64vector"; + } +export function DataInt64VectorKey(): VDXFKeyInterface { + return { + "vdxfid": "i4qtYkFS9iNyu2AkqwoSn1xyCdfH9PUvak", + "indexid": "x9g11YgX12beXC3nhdTbkQVWEHgJ2jqfz1", + "hash160result": "c6219ea13884987453692cb14c72d5f6a47c020f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int64vector" + } + } + + } +export function DataCurrencyMapKeyName(): string { + return "vrsc::data.type.object.currencymap"; + } +export function DataCurrencyMapKey(): VDXFKeyInterface { + return { + "vdxfid": "iMrGhzkZq5fpWWSa1RambRySFPb7CuvKuX", + "indexid": "xSgPAoBegPtV8gKbs7EvZpVyH3c858ZUvL", + "hash160result": "25db70c2fcae2571f89201181bec04587e1f8fc9", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.currencymap" + } + } + + } +export function DataRatingsKeyName(): string { + return "vrsc::data.type.object.ratings"; + } +export function DataRatingsKey(): VDXFKeyInterface { + return { + "vdxfid": "iHJComZUXXGniLkDhjYprWYEN8qvQGDoam", + "indexid": "xN8KGZzZNqVTLWdFZRCypu4mPnrwHFKbCK", + "hash160result": "32cad57ff1dc5db4b5ba573ce01bc9c89b0d9e97", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.ratings" + } + } + } +export function DataURLKeyName(): string { + return "vrsc::data.type.object.url"; + } +export function DataURLKey(): VDXFKeyInterface { + return { + "vdxfid": "iJ7xdhJTJAvJubNnSJFXyA3jujzqGxjLuZ", + "indexid": "xNx56VjY9V8yXmFpHyugwYaGwQ1rCt6J9W", + "hash160result": "7748bfaf53dd2ff63ed5f73a41174c360f30a6a0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.url" + } + } + } +export function DataTransferDestinationKeyName(): string { + return "vrsc::data.type.object.transferdestination"; + } +export function DataTransferDestinationKey(): VDXFKeyInterface { + return { + "vdxfid": "i91L6zwZQrkbNVMB1AZ1Z671qybexRmeVK", + "indexid": "xDqSZoNeGAyFzfECrrDAXUdYsdcfs3Zuku", + "hash160result": "92f38773849383146037b16a48ea350c1c11ac3c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.transferdestination" + } + } + } +export function UTXORefKeyName(): string { + return "vrsc::data.type.object.utxoref"; + } +export function UTXORefKey(): VDXFKeyInterface { + return { + "vdxfid": "iNcKvh7mazaXptzHf85q6EtpFYFE7asKC1", + "indexid": "xTSSPVYrSJoCT4sKWojz4dRMHCGF3h9tM4", + "hash160result": "013e760f7451c289672993ea391ae643c21ce4d1", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.utxoref" + } + } + } +export function CrossChainDataRefKeyName(): string { + return "vrsc::data.type.object.crosschaindataref"; + } +export function CrossChainDataRefKey(): VDXFKeyInterface { + return { + "vdxfid": "iP3euVSzNcXUrLNHnQnR9G6q8jeYuGSxgw", + "indexid": "xTsmNHt5Dvk9UWFKe6Sa7edNAPfZmJVgLc", + "hash160result": "4d33e0aee0f648c7871b2661d1221b57c05aaed6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.crosschaindataref" + } + } + + } +export function EncryptionDescriptorKeyName(): string { + return "vrsc::data.type.encryptiondescriptor"; + } +export function EncryptionDescriptorKey(): VDXFKeyInterface { + return { + "vdxfid": "iHEEK8ipj58BeKZNWuaaR2tDR5RK2kmf9A", + "indexid": "xN4Lmw9uaPLrGVSQNbEjPRQkSjSKxsHUQu", + "hash160result": "8d021acc1b68335bd7d37b28ff773c138ea5dd96", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.encryptiondescriptor" + } + } + } +export function SaltedDataKeyName(): string { + return "vrsc::data.type.salteddata"; + } +export function SaltedDataKey(): VDXFKeyInterface { + return { + "vdxfid": "i92U1nLuLJkC44FZZ4Lq9zk4qW3HrWAWNo", + "indexid": "xDraUamzBcxrgE8bQjzz8PGbsA4JiFskTD", + "hash160result": "9e13510e01d0d03a7bc90d7a2ef32824f515e33c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.salteddata" + } + } + } +export function DataDescriptorKeyName(): string { + return "vrsc::data.type.object.datadescriptor"; + } +export function DataDescriptorKey(): VDXFKeyInterface { + return { + "vdxfid": "i4GC1YGEVD21afWudGoFJVdnfjJ5XWnCQv", + "indexid": "x96JULhKLXEgCqPwUxTQGtAKhPK6Qh1iaW", + "hash160result": "4d4f12424ded2033a526a4e2a8835fc5b2eba208", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.datadescriptor" + } + } + } +export function SignatureDataKeyName(): string { + return "vrsc::data.signaturedata"; + } +export function SignatureDataKey(): VDXFKeyInterface { + return { + "vdxfid": "i7PcVF9wwPtQ6p6jDtCVpohX65pTZuP2ah", + "indexid": "xCDix3b2ni74iyym5ZreoCE47jqUTBFRAb", + "hash160result": "b48b359e9a00042cec64f7f66ac717d388a4f22a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.signaturedata" + } + } + } +export function VectorUint256KeyName(): string { + return "vrsc::data.mmrhashes"; + } +export function VectorUint256Key(): VDXFKeyInterface { + return { + "vdxfid": "i9UgJ2WxGw95PKdoCXjpfnBShtP5gi9fxS", + "indexid": "xEJnkpx38FMk1VWq4DPyeAhyjYQ6X5Gsti", + "hash160result": "8c1afd59e904f6d2702699963abccbc6d326d841", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.mmrhashes" + } + } + } +export function MMRLinksKeyName(): string { + return "vrsc::data.mmrlinks"; + } +export function MMRLinksKey(): VDXFKeyInterface { + return { + "vdxfid": "iPQsnA1R8UjHNddZKZ3FxsuKQ5WzKqSC7w", + "indexid": "xUEzExSVynwwzoWbBEhQwGRrRjY1Bc2MYc", + "hash160result": "f535a4e9ac0f94eda01695d16489a4a102d6b1da", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.mmrlinks" + } + } + + } +export function MMRDescriptorKeyName(): string { + return "vrsc::data.mmrdescriptor"; + } +export function MMRDescriptorKey(): VDXFKeyInterface { + return { + "vdxfid": "i9dVDb4LgfMYrZD1JBNP2uaso4bNAkT4Jr", + "indexid": "xETbgPVRXyaDUj639s2Y1J7QpicP4DvZMt", + "hash160result": "97273a4c02d6be002f8d69c3979616732ba68243", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.mmrdescriptor" + } + } + } +export function TypeDefinitionKeyName(): string { + return "vrsc::data.type.typedefinition"; + } +export function TypeDefinitionKey(): VDXFKeyInterface { + return { + "vdxfid": "iL5MPPHWXQEY3p2Q1UsmGDvXsgPiqd1W1S", + "indexid": "xQuTrBibNiTCfyuRsAXvEcT4uLQjhxrpyL", + "hash160result": "ae8d805d9650c0512a6b6ec33e963386542f18b6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.typedefinition" + } + } + } +export function MultiMapKeyName(): string { + return "vrsc::identity.multimapkey"; + } +export function MultiMapKey(): VDXFKeyInterface { + return { + "vdxfid": "i3mbggp3NBR77C5JeFQJTpAxmgMidayLLE", + "indexid": "x8bi9VF8DVdmjMxLVw4TSChVoLNjUyapgs", + "hash160result": "6920bb81b420bc95e29a10ed677379b1e39e3a03", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.multimapkey" + } + } + } +export function ContentMultiMapRemoveKeyName(): string { + return "vrsc::identity.multimapremove"; + } +export function ContentMultiMapRemoveKey(): VDXFKeyInterface { + return { + "vdxfid": "i5Zkx5Z7tEfh42xtKfwbJ5LgEWE9rEgpFY", + "indexid": "xAPsQszCjYtMgCqvBMbkGTsDGAFAmrN33A", + "hash160result": "d393b986e4f82db7bec82d97b186882d739ded16", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.multimapremove" + } + } + } + + // for any ID, this key indexes content that applies to representing the profile of + // that ID. there may be many mime-type instances of a particular piece of profile media +export function ProfileMediaKeyName(): string { + return "vrsc::identity.profile.media"; + } +export function ProfileMediaKey(): VDXFKeyInterface { + return { + "vdxfid": "iEYsp2njSt1M4EVYi9uuAPBU2wpKmThkkr", + "indexid": "xKNzGqDpJCE1gQNaZqa48mi14bqLaG669g", + "hash160result": "e95b2ee1abb130a93900ddaef2d8e528010f7c79", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.profile.media" + } + } + + } + +export function ZMemoMessageKeyName(): string { + return "vrsc::system.zmemo.message"; + } +export function ZMemoMessageKey(): VDXFKeyInterface { + return { + "vdxfid": "iNHg1n828PUxktkYeNxC6sdVmuKTipn3L3", + "indexid": "xT7nUaZ6yhhdP4daW4cM5GA2oZLUaNVaBD", + "hash160result": "4a8f418203621f10d1a61701be8dbbbb38fa5cce", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::system.zmemo.message" + } + } + + } + +export function ZMemoSignatureKeyName(): string { + return "vrsc::system.zmemo.signature"; + } +export function ZMemoSignatureKey(): VDXFKeyInterface { + return { + "vdxfid": "i7mrLLjUfGYuHJwnsxFvd282hsdn4staJG", + "indexid": "xCbxo9AZWamZuUppjdv5bQeZjXeo1vbaCc", + "hash160result": "7b47c8cd90c4c3ddc542f37ca77473b7325a272f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::system.zmemo.signature" + } + } + } + +export function CurrencyStartNotarizationKeyName(): string { + return "vrsc::system.currency.startnotarization"; + } +export function CurrencyStartNotarizationKey(): VDXFKeyInterface { + return { + "vdxfid": "iRvxVcGLaCXcDiAfnQ5FfeBCo2AiBibAft", + "indexid": "xWm4xQhRRWkGqt3he5jQe2hjpgBj5C7Tj3", + "hash160result": "b537201ca6465976bea7bdb03119644a858052f6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::system.currency.startnotarization" + } + } + } \ No newline at end of file From 4c1de51a17369fa0100785414d866f578d5e698e Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Tue, 30 Apr 2024 19:00:08 +0100 Subject: [PATCH 094/120] Updates for offsets --- dist/vdxf/classes/DataDescriptor.js | 8 ++++---- dist/vdxf/classes/PersonalProfile.js | 2 -- dist/vdxf/classes/index.d.ts | 2 -- dist/vdxf/classes/index.js | 11 +---------- src/vdxf/classes/CrossChainDataRef.ts | 2 +- src/vdxf/classes/DataDescriptor.ts | 8 ++++---- src/vdxf/classes/PersonalProfile.ts | 8 +------- src/vdxf/classes/index.ts | 4 +--- 8 files changed, 12 insertions(+), 33 deletions(-) diff --git a/dist/vdxf/classes/DataDescriptor.js b/dist/vdxf/classes/DataDescriptor.js index e2f2c03..f95ccad 100644 --- a/dist/vdxf/classes/DataDescriptor.js +++ b/dist/vdxf/classes/DataDescriptor.js @@ -256,7 +256,7 @@ class VDXFDataDescriptor extends index_1.BufferDataVdxfObject { const reader = new bufferutils_1.default.BufferReader(buffer, offset); this.data = reader.readVarSlice().toString('hex'); this.dataDescriptor = new DataDescriptor(); - this.dataDescriptor.fromBuffer(Buffer.from(this.data, 'hex')); + this.dataDescriptor.fromBuffer(Buffer.from(this.data, 'hex'), reader.offset); delete this.data; return reader.offset; } @@ -373,14 +373,14 @@ class MMRDescriptor { this.objectHashType = reader.readVarInt().toNumber(); this.mmrHashType = reader.readVarInt().toNumber(); this.mmrRoot = new DataDescriptor(); - this.mmrRoot.fromBuffer(reader.readVarSlice()); + reader.offset = this.mmrRoot.fromBuffer(reader.readVarSlice(), reader.offset); this.mmrHashes = new DataDescriptor(); - this.mmrHashes.fromBuffer(reader.readVarSlice()); + reader.offset = this.mmrHashes.fromBuffer(reader.readVarSlice(), reader.offset); const dataDescriptorsLength = reader.readCompactSize(); this.dataDescriptors = []; for (let i = 0; i < dataDescriptorsLength; i++) { const dataDescriptor = new DataDescriptor(); - dataDescriptor.fromBuffer(reader.readVarSlice()); + reader.offset = dataDescriptor.fromBuffer(reader.readVarSlice(), reader.offset); this.dataDescriptors.push(dataDescriptor); } return reader.offset; diff --git a/dist/vdxf/classes/PersonalProfile.js b/dist/vdxf/classes/PersonalProfile.js index 708e6a1..6cf991f 100644 --- a/dist/vdxf/classes/PersonalProfile.js +++ b/dist/vdxf/classes/PersonalProfile.js @@ -1,10 +1,8 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.defaultPersonalProfileDataTemplate = exports.DataCategory = void 0; -const bufferutils_1 = require("../../utils/bufferutils"); const __1 = require(".."); const identitykeys = require("../identityDataKeys"); -const { BufferReader, BufferWriter } = bufferutils_1.default; class DataCategory extends __1.VDXFObject { constructor(vdxfid = "", data, category, details) { super(vdxfid); diff --git a/dist/vdxf/classes/index.d.ts b/dist/vdxf/classes/index.d.ts index 97d3fae..cd0344a 100644 --- a/dist/vdxf/classes/index.d.ts +++ b/dist/vdxf/classes/index.d.ts @@ -26,5 +26,3 @@ export { Attestation } from './Attestation'; export { ProvisioningTxid } from './provisioning/ProvisioningResult'; export { Context } from './Context'; export { defaultPersonalProfileDataTemplate, DataCategory } from './PersonalProfile'; -export { CMMRNode, CMerkleMountainRange, CMMRBranch, CMMRProof, CMerkleMountainView, GetMMRProofIndex } from './MMR'; -export { SignatureData } from './SignatureData'; diff --git a/dist/vdxf/classes/index.js b/dist/vdxf/classes/index.js index dfbb7c7..440bc48 100644 --- a/dist/vdxf/classes/index.js +++ b/dist/vdxf/classes/index.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.SignatureData = exports.GetMMRProofIndex = exports.CMerkleMountainView = exports.CMMRProof = exports.CMMRBranch = exports.CMerkleMountainRange = exports.CMMRNode = exports.DataCategory = exports.defaultPersonalProfileDataTemplate = exports.Context = exports.ProvisioningTxid = exports.Attestation = exports.AltAuthFactor = exports.Audience = exports.RequestedPermission = exports.ProvisioningInfo = exports.Subject = exports.RedirectUri = exports.Hash160 = exports.LoginConsentProvisioningResult = exports.LoginConsentProvisioningDecision = exports.LoginConsentProvisioningResponse = exports.LoginConsentProvisioningChallenge = exports.LoginConsentProvisioningRequest = exports.VerusPayInvoice = exports.VerusPayInvoiceDetails = exports.SignedSessionObjectData = exports.SignedSessionObject = exports.LoginConsentResponse = exports.LoginConsentRequest = exports.LoginConsentDecision = exports.LoginConsentChallenge = void 0; +exports.DataCategory = exports.defaultPersonalProfileDataTemplate = exports.Context = exports.ProvisioningTxid = exports.Attestation = exports.AltAuthFactor = exports.Audience = exports.RequestedPermission = exports.ProvisioningInfo = exports.Subject = exports.RedirectUri = exports.Hash160 = exports.LoginConsentProvisioningResult = exports.LoginConsentProvisioningDecision = exports.LoginConsentProvisioningResponse = exports.LoginConsentProvisioningChallenge = exports.LoginConsentProvisioningRequest = exports.VerusPayInvoice = exports.VerusPayInvoiceDetails = exports.SignedSessionObjectData = exports.SignedSessionObject = exports.LoginConsentResponse = exports.LoginConsentRequest = exports.LoginConsentDecision = exports.LoginConsentChallenge = void 0; var Challenge_1 = require("./Challenge"); Object.defineProperty(exports, "LoginConsentChallenge", { enumerable: true, get: function () { return Challenge_1.Challenge; } }); var Decision_1 = require("./Decision"); @@ -45,12 +45,3 @@ Object.defineProperty(exports, "Context", { enumerable: true, get: function () { var PersonalProfile_1 = require("./PersonalProfile"); Object.defineProperty(exports, "defaultPersonalProfileDataTemplate", { enumerable: true, get: function () { return PersonalProfile_1.defaultPersonalProfileDataTemplate; } }); Object.defineProperty(exports, "DataCategory", { enumerable: true, get: function () { return PersonalProfile_1.DataCategory; } }); -var MMR_1 = require("./MMR"); -Object.defineProperty(exports, "CMMRNode", { enumerable: true, get: function () { return MMR_1.CMMRNode; } }); -Object.defineProperty(exports, "CMerkleMountainRange", { enumerable: true, get: function () { return MMR_1.CMerkleMountainRange; } }); -Object.defineProperty(exports, "CMMRBranch", { enumerable: true, get: function () { return MMR_1.CMMRBranch; } }); -Object.defineProperty(exports, "CMMRProof", { enumerable: true, get: function () { return MMR_1.CMMRProof; } }); -Object.defineProperty(exports, "CMerkleMountainView", { enumerable: true, get: function () { return MMR_1.CMerkleMountainView; } }); -Object.defineProperty(exports, "GetMMRProofIndex", { enumerable: true, get: function () { return MMR_1.GetMMRProofIndex; } }); -var SignatureData_1 = require("./SignatureData"); -Object.defineProperty(exports, "SignatureData", { enumerable: true, get: function () { return SignatureData_1.SignatureData; } }); diff --git a/src/vdxf/classes/CrossChainDataRef.ts b/src/vdxf/classes/CrossChainDataRef.ts index 3cffd55..7e76bbb 100644 --- a/src/vdxf/classes/CrossChainDataRef.ts +++ b/src/vdxf/classes/CrossChainDataRef.ts @@ -6,7 +6,7 @@ import { BN } from 'bn.js'; import { BigNumber } from '../../utils/types/BigNumber'; import { I_ADDR_VERSION } from '../../constants/vdxf'; import { SerializableEntity } from '../../utils/types/SerializableEntity'; -import { read } from 'fs'; + const { BufferReader, BufferWriter } = bufferutils export class CUTXORef implements SerializableEntity { diff --git a/src/vdxf/classes/DataDescriptor.ts b/src/vdxf/classes/DataDescriptor.ts index 6f8203a..743fd9b 100644 --- a/src/vdxf/classes/DataDescriptor.ts +++ b/src/vdxf/classes/DataDescriptor.ts @@ -339,7 +339,7 @@ export class VDXFDataDescriptor extends BufferDataVdxfObject { this.data = reader.readVarSlice().toString('hex'); this.dataDescriptor = new DataDescriptor(); - this.dataDescriptor.fromBuffer(Buffer.from(this.data, 'hex')); + this.dataDescriptor.fromBuffer(Buffer.from(this.data, 'hex'), reader.offset); delete this.data; return reader.offset; @@ -486,14 +486,14 @@ export class MMRDescriptor { this.objectHashType = reader.readVarInt().toNumber(); this.mmrHashType = reader.readVarInt().toNumber(); this.mmrRoot = new DataDescriptor(); - this.mmrRoot.fromBuffer(reader.readVarSlice()); + reader.offset = this.mmrRoot.fromBuffer(reader.readVarSlice(), reader.offset); this.mmrHashes = new DataDescriptor(); - this.mmrHashes.fromBuffer(reader.readVarSlice()); + reader.offset = this.mmrHashes.fromBuffer(reader.readVarSlice(), reader.offset); const dataDescriptorsLength = reader.readCompactSize(); this.dataDescriptors = []; for (let i = 0; i < dataDescriptorsLength; i++) { const dataDescriptor = new DataDescriptor(); - dataDescriptor.fromBuffer(reader.readVarSlice()); + reader.offset = dataDescriptor.fromBuffer(reader.readVarSlice(), reader.offset); this.dataDescriptors.push(dataDescriptor); } return reader.offset; diff --git a/src/vdxf/classes/PersonalProfile.ts b/src/vdxf/classes/PersonalProfile.ts index 7690bf4..0d7607b 100644 --- a/src/vdxf/classes/PersonalProfile.ts +++ b/src/vdxf/classes/PersonalProfile.ts @@ -1,12 +1,6 @@ -import varuint from '../../utils/varuint' -import bufferutils from '../../utils/bufferutils' -import { fromBase58Check, toBase58Check } from '../../utils/address'; -import { I_ADDR_VERSION, HASH160_BYTE_LENGTH } from '../../constants/vdxf'; import { VDXFObject } from ".."; import * as identitykeys from '../identityDataKeys'; -import { IdentityVdxfidMap, getIdentityDataType } from './IdentityData'; -import { DataDescriptor } from './DataDescriptor'; -const { BufferReader, BufferWriter } = bufferutils; + export class DataCategory extends VDXFObject { data: Array; diff --git a/src/vdxf/classes/index.ts b/src/vdxf/classes/index.ts index c45f212..e790388 100644 --- a/src/vdxf/classes/index.ts +++ b/src/vdxf/classes/index.ts @@ -38,6 +38,4 @@ export { ProvisioningTxid } from './provisioning/ProvisioningResult' export { Context } from './Context' -export { defaultPersonalProfileDataTemplate, DataCategory } from './PersonalProfile' -export { CMMRNode, CMerkleMountainRange, CMMRBranch, CMMRProof, CMerkleMountainView, GetMMRProofIndex} from './MMR' -export { SignatureData } from './SignatureData' \ No newline at end of file +export { defaultPersonalProfileDataTemplate, DataCategory } from './PersonalProfile' \ No newline at end of file From 65ada69cca90f8d04992fdb17a5fd881acb8e715 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Tue, 30 Apr 2024 20:54:17 +0100 Subject: [PATCH 095/120] Fix deserialization of MMRDescriptor --- dist/vdxf/classes/DataDescriptor.js | 6 +++--- src/vdxf/classes/DataDescriptor.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/vdxf/classes/DataDescriptor.js b/dist/vdxf/classes/DataDescriptor.js index f95ccad..572a29b 100644 --- a/dist/vdxf/classes/DataDescriptor.js +++ b/dist/vdxf/classes/DataDescriptor.js @@ -373,14 +373,14 @@ class MMRDescriptor { this.objectHashType = reader.readVarInt().toNumber(); this.mmrHashType = reader.readVarInt().toNumber(); this.mmrRoot = new DataDescriptor(); - reader.offset = this.mmrRoot.fromBuffer(reader.readVarSlice(), reader.offset); + reader.offset = this.mmrRoot.fromBuffer(reader.buffer, reader.offset); this.mmrHashes = new DataDescriptor(); - reader.offset = this.mmrHashes.fromBuffer(reader.readVarSlice(), reader.offset); + reader.offset = this.mmrHashes.fromBuffer(reader.buffer, reader.offset); const dataDescriptorsLength = reader.readCompactSize(); this.dataDescriptors = []; for (let i = 0; i < dataDescriptorsLength; i++) { const dataDescriptor = new DataDescriptor(); - reader.offset = dataDescriptor.fromBuffer(reader.readVarSlice(), reader.offset); + reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); this.dataDescriptors.push(dataDescriptor); } return reader.offset; diff --git a/src/vdxf/classes/DataDescriptor.ts b/src/vdxf/classes/DataDescriptor.ts index 743fd9b..4dc8aa9 100644 --- a/src/vdxf/classes/DataDescriptor.ts +++ b/src/vdxf/classes/DataDescriptor.ts @@ -486,14 +486,14 @@ export class MMRDescriptor { this.objectHashType = reader.readVarInt().toNumber(); this.mmrHashType = reader.readVarInt().toNumber(); this.mmrRoot = new DataDescriptor(); - reader.offset = this.mmrRoot.fromBuffer(reader.readVarSlice(), reader.offset); + reader.offset = this.mmrRoot.fromBuffer(reader.buffer, reader.offset); this.mmrHashes = new DataDescriptor(); - reader.offset = this.mmrHashes.fromBuffer(reader.readVarSlice(), reader.offset); + reader.offset = this.mmrHashes.fromBuffer(reader.buffer, reader.offset); const dataDescriptorsLength = reader.readCompactSize(); this.dataDescriptors = []; for (let i = 0; i < dataDescriptorsLength; i++) { const dataDescriptor = new DataDescriptor(); - reader.offset = dataDescriptor.fromBuffer(reader.readVarSlice(), reader.offset); + reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); this.dataDescriptors.push(dataDescriptor); } return reader.offset; From d8f323dadbf3c5e27b9fa019fe884a2a6bd47e29 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Thu, 2 May 2024 16:02:15 +0100 Subject: [PATCH 096/120] Add Attestation object key --- dist/vdxf/classes/DataDescriptor.js | 2 +- dist/vdxf/keys.d.ts | 1 + dist/vdxf/keys.js | 11 ++++++++++- src/vdxf/classes/DataDescriptor.ts | 16 ++++++++-------- src/vdxf/keys.ts | 11 +++++++++++ 5 files changed, 31 insertions(+), 10 deletions(-) diff --git a/dist/vdxf/classes/DataDescriptor.js b/dist/vdxf/classes/DataDescriptor.js index 572a29b..29061d6 100644 --- a/dist/vdxf/classes/DataDescriptor.js +++ b/dist/vdxf/classes/DataDescriptor.js @@ -599,7 +599,7 @@ const VectorEncodeVDXFUni = (obj) => { ss = Buffer.concat([ss, writer.buffer]); } else if (objTypeKey == VDXF_Data.SignatureDataKey().vdxfid) { - const sigData = new SignatureData_1.SignatureData(oneValValues[k]); + const sigData = SignatureData_1.SignatureData.fromJson(oneValValues[k]); let length = 20; length += varint_1.default.encodingLength(sigData.version); length += varuint_1.default.encodingLength(sigData.getByteLength()); diff --git a/dist/vdxf/keys.d.ts b/dist/vdxf/keys.d.ts index 547ad1c..292b7b9 100644 --- a/dist/vdxf/keys.d.ts +++ b/dist/vdxf/keys.d.ts @@ -50,6 +50,7 @@ export declare const SIGNED_SESSION_OBJECT: VDXFKeyInterface; export declare const CURRENCY_ADDRESS: VDXFKeyInterface; export declare const ATTESTATION_PROVISION_URL: VDXFKeyInterface; export declare const ATTESTATION_PROVISION_TYPE: VDXFKeyInterface; +export declare const ATTESTATION_PROVISION_OBJECT: VDXFKeyInterface; export declare const ATTESTATION_VIEW_REQUEST: VDXFKeyInterface; export declare const ATTESTATION_VIEW_RESPONSE: VDXFKeyInterface; export declare const ATTESTATION_ID: VDXFKeyInterface; diff --git a/dist/vdxf/keys.js b/dist/vdxf/keys.js index e7630fd..b8ac39b 100644 --- a/dist/vdxf/keys.js +++ b/dist/vdxf/keys.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.DATA_TYPE_STRING = exports.PROFILE_DATA_VIEW_REQUEST = exports.ATTESTATION_TYPE = exports.ATTESTATION_NAME = exports.ATTESTATION_ID = exports.ATTESTATION_VIEW_RESPONSE = exports.ATTESTATION_VIEW_REQUEST = exports.ATTESTATION_PROVISION_TYPE = exports.ATTESTATION_PROVISION_URL = exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.IDENTITY_AUTH_SIG_VDXF_KEY = exports.VERUSPAY_INVOICE_VDXF_KEY = void 0; +exports.DATA_TYPE_STRING = exports.PROFILE_DATA_VIEW_REQUEST = exports.ATTESTATION_TYPE = exports.ATTESTATION_NAME = exports.ATTESTATION_ID = exports.ATTESTATION_VIEW_RESPONSE = exports.ATTESTATION_VIEW_REQUEST = exports.ATTESTATION_PROVISION_OBJECT = exports.ATTESTATION_PROVISION_TYPE = exports.ATTESTATION_PROVISION_URL = exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.IDENTITY_AUTH_SIG_VDXF_KEY = exports.VERUSPAY_INVOICE_VDXF_KEY = void 0; exports.VERUSPAY_INVOICE_VDXF_KEY = { hash160result: "628efc28c2e2d40050e1a9de7a93e7ddf2aa0076", qualifiedname: { @@ -324,6 +324,15 @@ exports.ATTESTATION_PROVISION_TYPE = { "name": "vrsc::attestation.provision.type" } }; +exports.ATTESTATION_PROVISION_OBJECT = { + "vdxfid": "iA4mSmR35HNwXogTtdGasrmxHzX9zFfDqM", + "indexid": "xEtsuZr7vbbc9yZVkJvjrFJVKeYArDTHtu", + "hash160result": "568af36801cfae2e1290ecef7a60c7ae0c984a48", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestation.provision.object" + } +}; exports.ATTESTATION_VIEW_REQUEST = { "vdxfid": "i5R9p3V1sxZ9p1NDV7nPkz1wvmQTUvuByY", "hash160result": "872923256c56f6bda8256c5bb6a4c98d85f44c15", diff --git a/src/vdxf/classes/DataDescriptor.ts b/src/vdxf/classes/DataDescriptor.ts index 4dc8aa9..690dbc0 100644 --- a/src/vdxf/classes/DataDescriptor.ts +++ b/src/vdxf/classes/DataDescriptor.ts @@ -40,14 +40,14 @@ export class DataDescriptor { DataDescriptor.FLAG_MIME_TYPE_PRESENT)); version: BigNumber; - flags: BigNumber; + flags: BigNumber; // Flags indicating what items are present in the object objectdata: Buffer; // either direct data or serialized UTXORef +offset, length, and/or other type of info for different links - label: string; // label associated with this data - mimeType: string; // optional mime type - salt: Buffer; // encryption public key, data only present if encrypted or data referenced by unencrypted link is encrypted - epk: Buffer; // encryption public key, data only present if encrypted or data referenced by unencrypted link is encrypted - ivk: Buffer; // incoming viewing key, optional and contains data only if full viewing key is published at this encryption level - ssk: Buffer; // specific symmetric key, optional and only to decrypt this linked sub-object + label: string; // label associated with this data + mimeType: string; // optional mime type + salt: Buffer; // encryption public key, data only present if encrypted or data referenced by unencrypted link is encrypted + epk: Buffer; // encryption public key, data only present if encrypted or data referenced by unencrypted link is encrypted + ivk: Buffer; // incoming viewing key, optional and contains data only if full viewing key is published at this encryption level + ssk: Buffer; // specific symmetric key, optional and only to decrypt this linked sub-object constructor(data?: { version?: BigNumber, @@ -769,7 +769,7 @@ export const VectorEncodeVDXFUni = (obj): Buffer => { } else if (objTypeKey == VDXF_Data.SignatureDataKey().vdxfid) { - const sigData = new SignatureData(oneValValues[k]); + const sigData = SignatureData.fromJson(oneValValues[k]); let length = 20; length += varint.encodingLength(sigData.version); diff --git a/src/vdxf/keys.ts b/src/vdxf/keys.ts index 3d9c9af..14e92c2 100644 --- a/src/vdxf/keys.ts +++ b/src/vdxf/keys.ts @@ -383,6 +383,17 @@ export const ATTESTATION_PROVISION_TYPE: VDXFKeyInterface = { } }; +export const ATTESTATION_PROVISION_OBJECT: VDXFKeyInterface = { + "vdxfid": "iA4mSmR35HNwXogTtdGasrmxHzX9zFfDqM", + "indexid": "xEtsuZr7vbbc9yZVkJvjrFJVKeYArDTHtu", + "hash160result": "568af36801cfae2e1290ecef7a60c7ae0c984a48", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestation.provision.object" + } +} + + export const ATTESTATION_VIEW_REQUEST: VDXFKeyInterface = { "vdxfid": "i5R9p3V1sxZ9p1NDV7nPkz1wvmQTUvuByY", "hash160result": "872923256c56f6bda8256c5bb6a4c98d85f44c15", From 19352f628fd0f9a24ab64fc2097d362838e68d3b Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Fri, 3 May 2024 12:57:22 +0100 Subject: [PATCH 097/120] Add VDXFDataToUniValue --- dist/pbaas/CurrencyValueMap.d.ts | 2 + dist/pbaas/CurrencyValueMap.js | 15 ++ dist/pbaas/Rating.d.ts | 16 ++ dist/pbaas/Rating.js | 20 +++ dist/pbaas/TransferDestination.d.ts | 2 + dist/pbaas/TransferDestination.js | 36 +++++ dist/vdxf/classes/DataDescriptor.d.ts | 30 ++++ dist/vdxf/classes/DataDescriptor.js | 183 +++++++++++++++++++++- dist/vdxf/classes/SignatureData.d.ts | 6 + dist/vdxf/classes/SignatureData.js | 29 ++++ src/pbaas/CurrencyValueMap.ts | 23 +++ src/pbaas/Rating.ts | 27 ++++ src/pbaas/TransferDestination.ts | 46 ++++++ src/vdxf/classes/DataDescriptor.ts | 214 +++++++++++++++++++++++++- src/vdxf/classes/SignatureData.ts | 37 +++++ 15 files changed, 683 insertions(+), 3 deletions(-) diff --git a/dist/pbaas/CurrencyValueMap.d.ts b/dist/pbaas/CurrencyValueMap.d.ts index b38ab9c..30ae1e9 100644 --- a/dist/pbaas/CurrencyValueMap.d.ts +++ b/dist/pbaas/CurrencyValueMap.d.ts @@ -13,4 +13,6 @@ export declare class CurrencyValueMap implements SerializableEntity { getByteLength(): number; toBuffer(): Buffer; fromBuffer(buffer: Buffer, offset?: number): number; + IsValid(): boolean; + toJson(): any; } diff --git a/dist/pbaas/CurrencyValueMap.js b/dist/pbaas/CurrencyValueMap.js index 350e1ca..108feb3 100644 --- a/dist/pbaas/CurrencyValueMap.js +++ b/dist/pbaas/CurrencyValueMap.js @@ -59,5 +59,20 @@ class CurrencyValueMap { } return reader.offset; } + IsValid() { + for (let [key, value] of this.value_map) { + if (!key) { + return false; + } + } + return true; + } + toJson() { + const value_map = {}; + for (let [key, value] of this.value_map) { + value_map[key] = value.toString(); + } + return value_map; + } } exports.CurrencyValueMap = CurrencyValueMap; diff --git a/dist/pbaas/Rating.d.ts b/dist/pbaas/Rating.d.ts index 8a057f4..2cf382d 100644 --- a/dist/pbaas/Rating.d.ts +++ b/dist/pbaas/Rating.d.ts @@ -1,7 +1,17 @@ +/// /// import { BigNumber } from '../utils/types/BigNumber'; import { SerializableEntity } from '../utils/types/SerializableEntity'; export declare class Rating implements SerializableEntity { + static VERSION_INVALID: import("bn.js"); + static VERSION_FIRST: import("bn.js"); + static VERSION_LAST: import("bn.js"); + static VERSION_CURRENT: import("bn.js"); + static TRUST_UNKNOWN: import("bn.js"); + static TRUST_BLOCKED: import("bn.js"); + static TRUST_APPROVED: import("bn.js"); + static TRUST_FIRST: import("bn.js"); + static TRUST_LAST: import("bn.js"); version: BigNumber; trustLevel: BigNumber; ratings: Map; @@ -13,4 +23,10 @@ export declare class Rating implements SerializableEntity { getByteLength(): number; toBuffer(): Buffer; fromBuffer(buffer: Buffer, offset?: number): number; + IsValid(): boolean; + toJson(): { + version: string; + trustlevel: string; + ratings: Map; + }; } diff --git a/dist/pbaas/Rating.js b/dist/pbaas/Rating.js index 401cc68..c48459e 100644 --- a/dist/pbaas/Rating.js +++ b/dist/pbaas/Rating.js @@ -51,5 +51,25 @@ class Rating { } return reader.offset; } + IsValid() { + return this.version.gte(Rating.VERSION_FIRST) && this.version.lte(Rating.VERSION_LAST) && + this.trustLevel.gte(Rating.TRUST_FIRST) && this.trustLevel.lte(Rating.TRUST_LAST); + } + toJson() { + return { + version: this.version.toString(), + trustlevel: this.trustLevel.toString(), + ratings: this.ratings + }; + } } exports.Rating = Rating; +Rating.VERSION_INVALID = new bn_js_1.BN(0, 10); +Rating.VERSION_FIRST = new bn_js_1.BN(1, 10); +Rating.VERSION_LAST = new bn_js_1.BN(1, 10); +Rating.VERSION_CURRENT = new bn_js_1.BN(1, 10); +Rating.TRUST_UNKNOWN = new bn_js_1.BN(0, 10); // unknown and can be included in exploration +Rating.TRUST_BLOCKED = new bn_js_1.BN(1, 10); // suspected or known to be untrustworthy and should not be interacted with +Rating.TRUST_APPROVED = new bn_js_1.BN(2, 10); // explicitly believed to be trustworthy enough to interact with +Rating.TRUST_FIRST = new bn_js_1.BN(0, 10); +Rating.TRUST_LAST = new bn_js_1.BN(2, 10); diff --git a/dist/pbaas/TransferDestination.d.ts b/dist/pbaas/TransferDestination.d.ts index 7088e03..e8010c2 100644 --- a/dist/pbaas/TransferDestination.d.ts +++ b/dist/pbaas/TransferDestination.d.ts @@ -53,4 +53,6 @@ export declare class TransferDestination implements SerializableEntity { fromBuffer(buffer: Buffer, offset?: number): number; static fromJson(data: TransferDestinationJson): TransferDestination; toJson(): TransferDestinationJson; + IsValid(): boolean; + GetAuxDest(destNum: any): TransferDestination; } diff --git a/dist/pbaas/TransferDestination.js b/dist/pbaas/TransferDestination.js index d08095c..296b409 100644 --- a/dist/pbaas/TransferDestination.js +++ b/dist/pbaas/TransferDestination.js @@ -163,5 +163,41 @@ class TransferDestination { aux_dests: this.aux_dests.map(x => x.toJson()) }; } + IsValid() { + // verify aux dests + let valid = (((this.type.and(exports.FLAG_DEST_AUX).gt(new bn_js_1.BN(0))) && this.aux_dests.length > 0) || (!(this.type.and(exports.FLAG_DEST_AUX).gt(new bn_js_1.BN(0))) && !(this.aux_dests.length > 0))); + if (valid && this.aux_dests) { + for (let i = 0; i < this.aux_dests.length; i++) { + if (!this.GetAuxDest(i).IsValid()) { + valid = false; + break; + } + } + } + return !!(valid && + !this.typeNoFlags().eq(exports.DEST_INVALID) && + this.typeNoFlags().lte(exports.LAST_VALID_TYPE_NO_FLAGS) && + ((!(this.type.and(exports.FLAG_DEST_GATEWAY)) && !this.gateway_id) || this.gateway_id)); + } + GetAuxDest(destNum) { + const retVal = this.aux_dests[destNum]; + if (destNum >= 0 && destNum < this.aux_dests.length) { + if (retVal.type.and(exports.FLAG_DEST_AUX).gt(new bn_js_1.BN(0)) || retVal.aux_dests.length > 0) { + retVal.type = exports.DEST_INVALID; + } + // no gateways or flags, only simple destinations work + switch (retVal.type) { + case exports.DEST_ID: + case exports.DEST_PK: + case exports.DEST_PKH: + case exports.DEST_ETH: + case exports.DEST_SH: + break; + default: + retVal.type = exports.DEST_INVALID; + } + } + return retVal; + } } exports.TransferDestination = TransferDestination; diff --git a/dist/vdxf/classes/DataDescriptor.d.ts b/dist/vdxf/classes/DataDescriptor.d.ts index 85749cb..6df18a0 100644 --- a/dist/vdxf/classes/DataDescriptor.d.ts +++ b/dist/vdxf/classes/DataDescriptor.d.ts @@ -51,6 +51,11 @@ export declare class DataDescriptor { CalcFlags(): BigNumber; SetFlags(): void; IsValid(): boolean; + toJson(): { + version: string; + flags: string; + objectdata: string; + }; } export declare class VDXFDataDescriptor extends BufferDataVdxfObject { dataDescriptor: DataDescriptor; @@ -102,5 +107,30 @@ export declare class MMRDescriptor { fromBuffer(buffer: Buffer, offset?: number): number; HasData(): boolean; IsValid(): boolean; + toJson(): { + version: string; + objecthashtype: EHashTypes; + mmrhashtype: EHashTypes; + mmrroot: { + version: string; + flags: string; + objectdata: string; + }; + mmrhashes: { + version: string; + flags: string; + objectdata: string; + }; + datadescriptors: { + version: string; + flags: string; + objectdata: string; + }[]; + }; } export declare const VectorEncodeVDXFUni: (obj: any) => Buffer; +export declare const VDXFDataToUniValue: (buffer: Buffer, offset?: number, pSuccess?: boolean) => { + objectUni: any; + offset: number; +}; +export declare const VDXFDataToUniValueArray: (buffer: Buffer, offset?: number) => Object; diff --git a/dist/vdxf/classes/DataDescriptor.js b/dist/vdxf/classes/DataDescriptor.js index 29061d6..e09f086 100644 --- a/dist/vdxf/classes/DataDescriptor.js +++ b/dist/vdxf/classes/DataDescriptor.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.VectorEncodeVDXFUni = exports.MMRDescriptor = exports.EHashTypes = exports.VDXFDataDescriptor = exports.DataDescriptor = void 0; +exports.VDXFDataToUniValueArray = exports.VDXFDataToUniValue = exports.VectorEncodeVDXFUni = exports.MMRDescriptor = exports.EHashTypes = exports.VDXFDataDescriptor = exports.DataDescriptor = void 0; const bn_js_1 = require("bn.js"); const varint_1 = require("../../utils/varint"); const varuint_1 = require("../../utils/varuint"); @@ -210,7 +210,27 @@ class DataDescriptor { this.flags = this.CalcFlags(); } IsValid() { - return this.version.gte(DataDescriptor.FIRST_VERSION) && this.version.lte(DataDescriptor.LAST_VERSION) && (this.flags.and(new bn_js_1.BN(~DataDescriptor.FLAG_MASK)).eq(new bn_js_1.BN(0))); + return !!(this.version.gte(DataDescriptor.FIRST_VERSION) && this.version.lte(DataDescriptor.LAST_VERSION) && (this.flags.and(new bn_js_1.BN(~DataDescriptor.FLAG_MASK)).eq(new bn_js_1.BN(0)))); + } + toJson() { + const retval = { + version: this.version.toString(), + flags: this.flags.toString(), + objectdata: this.objectdata.toString('hex') + }; + if (this.label) + retval['label'] = this.label; + if (this.mimeType) + retval['mimetype'] = this.mimeType; + if (this.salt) + retval['salt'] = this.salt.toString('hex'); + if (this.epk) + retval['epk'] = this.epk.toString('hex'); + if (this.ivk) + retval['ivk'] = this.ivk.toString('hex'); + if (this.ssk) + retval['ssk'] = this.ssk.toString('hex'); + return retval; } } exports.DataDescriptor = DataDescriptor; @@ -391,6 +411,17 @@ class MMRDescriptor { IsValid() { return this.version >= MMRDescriptor.FIRST_VERSION && this.version <= MMRDescriptor.LAST_VERSION; } + toJson() { + const retval = { + version: this.version.toString(), + objecthashtype: this.objectHashType, + mmrhashtype: this.mmrHashType, + mmrroot: this.mmrRoot.toJson(), + mmrhashes: this.mmrHashes.toJson(), + datadescriptors: this.dataDescriptors.map((dataDescriptor) => dataDescriptor.toJson()) + }; + return retval; + } } exports.MMRDescriptor = MMRDescriptor; MMRDescriptor.VERSION_INVALID = new bn_js_1.BN(0); @@ -618,3 +649,151 @@ const VectorEncodeVDXFUni = (obj) => { return ss; }; exports.VectorEncodeVDXFUni = VectorEncodeVDXFUni; +const VDXFDataToUniValue = (buffer, offset = 0, pSuccess = null) => { + const reader = new BufferReader(buffer, offset); + let objectUni; + try { + let checkVal; + let version = new bn_js_1.BN(0); + let objSize = 0; + checkVal = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + if (checkVal == VDXF_Data.DataCurrencyMapKey().vdxfid) { + const oneCurrencyMap = new CurrencyValueMap_1.CurrencyValueMap(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = oneCurrencyMap.fromBuffer(reader.buffer, reader.offset); + if (oneCurrencyMap.IsValid()) { + objectUni = { [checkVal]: oneCurrencyMap.toJson() }; + } + } + else if (checkVal == VDXF_Data.DataRatingsKey().vdxfid) { + const oneRatingObj = new Rating_1.Rating(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = oneRatingObj.fromBuffer(reader.buffer, reader.offset); + if (oneRatingObj.IsValid()) { + objectUni = { [checkVal]: oneRatingObj.toJson() }; + } + } + else if (checkVal == VDXF_Data.DataTransferDestinationKey().vdxfid) { + const oneTransferDest = new TransferDestination_1.TransferDestination(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = oneTransferDest.fromBuffer(reader.buffer, reader.offset); + if (oneTransferDest.IsValid()) { + objectUni = { [checkVal]: oneTransferDest.toJson() }; + } + } + else if (checkVal == VDXF_Data.ContentMultiMapRemoveKey().vdxfid) { + throw new Error("ContentMultiMapRemoveKey not implemented"); + // TODO: Implement ContentMultiMapRemoveKey + // CContentMultiMapRemove oneContentRemove; + // ss >> VARINT(version); + // ss >> COMPACTSIZE(objSize); + // ss >> oneContentRemove; + // if (oneContentRemove.IsValid()) + // { + // objectUni = UniValue(UniValue::VOBJ); + // objectUni.pushKV(EncodeDestination(CIdentityID(checkVal)), oneContentRemove.ToUniValue()); + // } + } + else if (checkVal == VDXF_Data.DataStringKey().vdxfid) { + let stringVal; + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + stringVal = reader.readVarSlice().toString('utf-8'); + objectUni = { [checkVal]: stringVal }; + } + else if (checkVal == VDXF_Data.DataByteVectorKey().vdxfid) { + let vecVal; + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + vecVal = reader.readVarSlice(); + objectUni = { [checkVal]: vecVal.toString('hex') }; + } + else if (checkVal == VDXF_Data.CrossChainDataRefKey().vdxfid) { + throw new Error("CrossChainDataRefKey not implemented"); + // TODO: Implement CrossChainDataRefKey + // CCrossChainDataRef dataRef; + // ss >> VARINT(version); + // ss >> COMPACTSIZE(objSize); + // ss >> dataRef; + // if (dataRef.IsValid()) + // { + // objectUni = UniValue(UniValue::VOBJ); + // objectUni.pushKV(EncodeDestination(CIdentityID(checkVal)), dataRef.ToUniValue()); + // } + } + else if (checkVal == VDXF_Data.DataDescriptorKey().vdxfid) { + const dataDescriptor = new DataDescriptor(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); + if (dataDescriptor.IsValid()) { + objectUni = { [checkVal]: dataDescriptor.toJson() }; + } + } + else if (checkVal == VDXF_Data.MMRDescriptorKey().vdxfid) { + const mmrDescriptor = new MMRDescriptor(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = mmrDescriptor.fromBuffer(reader.buffer, reader.offset); + if (mmrDescriptor.IsValid()) { + objectUni = { [checkVal]: mmrDescriptor.toJson() }; + } + } + else if (checkVal == VDXF_Data.SignatureDataKey().vdxfid) { + const sigData = new SignatureData_1.SignatureData(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = sigData.fromBuffer(reader.buffer, reader.offset); + if (sigData.IsValid()) { + objectUni = { [checkVal]: sigData.toJson() }; + } + } + // if we have an object that we recognized, encode it + if (!objectUni.isNull()) { + if (pSuccess != null) { + pSuccess = true; + } + } + else { + if (pSuccess != null) { + pSuccess = false; + } + } + } + catch (e) { + if (pSuccess != null) { + pSuccess = false; + } + } + return { objectUni, offset: reader.offset }; +}; +exports.VDXFDataToUniValue = VDXFDataToUniValue; +const VDXFDataToUniValueArray = (buffer, offset = 0) => { + let entryArr = []; + const reader = new BufferReader(buffer, offset); + let bytesLeft = buffer.length; + while (bytesLeft > 20) // size of uint160 + { + let objOut = false; + const { objectUni, offset } = (0, exports.VDXFDataToUniValue)(reader.buffer, reader.offset, objOut); + reader.offset = offset; + bytesLeft = buffer.length - reader.offset; + if (objOut) { + entryArr.push(objectUni); + } + else { + // add the remaining data as a hex string + entryArr.push(reader.readSlice(bytesLeft + 20)); + bytesLeft = 0; + break; + } + } + if (bytesLeft && bytesLeft <= 20) { + entryArr.push(reader.readSlice(bytesLeft)); + } + return entryArr.length == 0 ? null : (entryArr.length == 1 ? entryArr[0] : entryArr); +}; +exports.VDXFDataToUniValueArray = VDXFDataToUniValueArray; diff --git a/dist/vdxf/classes/SignatureData.d.ts b/dist/vdxf/classes/SignatureData.d.ts index b264ebc..dcc2861 100644 --- a/dist/vdxf/classes/SignatureData.d.ts +++ b/dist/vdxf/classes/SignatureData.d.ts @@ -23,4 +23,10 @@ export declare class SignatureData implements SerializableEntity { getByteLength(): number; toBuffer(): Buffer; fromBuffer(buffer: Buffer, offset?: number): number; + IsValid(): boolean; + toJson(): { + version: string; + systemid: string; + hashtype: string; + }; } diff --git a/dist/vdxf/classes/SignatureData.js b/dist/vdxf/classes/SignatureData.js index ef78a38..3fc6e85 100644 --- a/dist/vdxf/classes/SignatureData.js +++ b/dist/vdxf/classes/SignatureData.js @@ -112,6 +112,35 @@ class SignatureData { this.signatureAsVch = reader.readVarSlice(); return reader.offset; } + IsValid() { + return !!(this.version.gte(SignatureData.FIRST_VERSION) && + this.version.lte(SignatureData.LAST_VERSION) && + this.systemID); + } + toJson() { + const returnObj = { version: this.version.toString(), + systemid: this.systemID, + hashtype: this.hashType.toString() }; + if (this.hashType == new bn_js_1.BN(DataDescriptor_1.EHashTypes.HASH_SHA256)) { + returnObj['signaturehash'] = this.signatureHash.reverse().toString('hex'); + } + else { + returnObj['signaturehash'] = this.signatureHash.toString('hex'); + } + returnObj['identityid'] = this.identityID; + returnObj['signaturetype'] = this.sigType.toString(); + returnObj['signature'] = this.signatureAsVch.toString('base64'); + if (this.vdxfKeys) { + returnObj['vdxfkeys'] = this.vdxfKeys; + } + if (this.vdxfKeyNames) { + returnObj['vdxfkeynames'] = this.vdxfKeyNames; + } + if (this.boundHashes) { + returnObj['boundhashes'] = this.boundHashes; + } + return returnObj; + } } exports.SignatureData = SignatureData; SignatureData.VERSION_INVALID = new bn_js_1.BN(0); diff --git a/src/pbaas/CurrencyValueMap.ts b/src/pbaas/CurrencyValueMap.ts index 2e50331..b79823d 100644 --- a/src/pbaas/CurrencyValueMap.ts +++ b/src/pbaas/CurrencyValueMap.ts @@ -76,4 +76,27 @@ export class CurrencyValueMap implements SerializableEntity { return reader.offset; } + + IsValid():boolean + { + for (let [key, value] of this.value_map) + { + if (!key) + { + return false; + } + } + return true; + } + + toJson() { + const value_map: any = {}; + + for (let [key, value] of this.value_map) { + value_map[key] = value.toString() + } + + return value_map; + + } } \ No newline at end of file diff --git a/src/pbaas/Rating.ts b/src/pbaas/Rating.ts index 3c66ce4..84767b7 100644 --- a/src/pbaas/Rating.ts +++ b/src/pbaas/Rating.ts @@ -8,7 +8,20 @@ import { I_ADDR_VERSION } from '../constants/vdxf'; import { SerializableEntity } from '../utils/types/SerializableEntity'; const { BufferReader, BufferWriter } = bufferutils + export class Rating implements SerializableEntity { + + static VERSION_INVALID = new BN(0, 10) + static VERSION_FIRST = new BN(1, 10) + static VERSION_LAST = new BN(1, 10) + static VERSION_CURRENT = new BN(1, 10) + + static TRUST_UNKNOWN = new BN(0, 10) // unknown and can be included in exploration + static TRUST_BLOCKED = new BN(1, 10) // suspected or known to be untrustworthy and should not be interacted with + static TRUST_APPROVED = new BN(2, 10) // explicitly believed to be trustworthy enough to interact with + static TRUST_FIRST = new BN(0, 10) + static TRUST_LAST = new BN(2, 10) + version: BigNumber; trustLevel: BigNumber; ratings: Map; @@ -73,4 +86,18 @@ export class Rating implements SerializableEntity { return reader.offset; } + + IsValid() { + return this.version.gte(Rating.VERSION_FIRST) && this.version.lte(Rating.VERSION_LAST) && + this.trustLevel.gte(Rating.TRUST_FIRST) && this.trustLevel.lte(Rating.TRUST_LAST); + } + toJson() { + return { + version: this.version.toString(), + trustlevel: this.trustLevel.toString(), + ratings: this.ratings + } + } + + //TODO: implment ratings values } \ No newline at end of file diff --git a/src/pbaas/TransferDestination.ts b/src/pbaas/TransferDestination.ts index b6dcbec..0d6a651 100644 --- a/src/pbaas/TransferDestination.ts +++ b/src/pbaas/TransferDestination.ts @@ -199,4 +199,50 @@ export class TransferDestination implements SerializableEntity { aux_dests: this.aux_dests.map(x => x.toJson()) } } + + IsValid(): boolean + { + // verify aux dests + let valid = (((this.type.and(FLAG_DEST_AUX).gt(new BN(0))) && this.aux_dests.length > 0) || (!(this.type.and(FLAG_DEST_AUX).gt(new BN(0))) && !(this.aux_dests.length > 0))); + if (valid && this.aux_dests) + { + for (let i = 0; i < this.aux_dests.length; i++) + { + if (!this.GetAuxDest(i).IsValid()) + { + valid = false; + break; + } + } + } + return !!(valid && + !this.typeNoFlags().eq(DEST_INVALID) && + this.typeNoFlags().lte(LAST_VALID_TYPE_NO_FLAGS) && + ((!(this.type.and(FLAG_DEST_GATEWAY)) && !this.gateway_id) || this.gateway_id)); + } + + GetAuxDest(destNum) + { + const retVal = this.aux_dests[destNum]; + if (destNum >= 0 && destNum < this.aux_dests.length) + { + if (retVal.type.and(FLAG_DEST_AUX).gt(new BN(0)) || retVal.aux_dests.length > 0) + { + retVal.type = DEST_INVALID; + } + // no gateways or flags, only simple destinations work + switch (retVal.type) + { + case DEST_ID: + case DEST_PK: + case DEST_PKH: + case DEST_ETH: + case DEST_SH: + break; + default: + retVal.type = DEST_INVALID; + } + } + return retVal; +} } diff --git a/src/vdxf/classes/DataDescriptor.ts b/src/vdxf/classes/DataDescriptor.ts index 690dbc0..250d479 100644 --- a/src/vdxf/classes/DataDescriptor.ts +++ b/src/vdxf/classes/DataDescriptor.ts @@ -290,7 +290,25 @@ export class DataDescriptor { } IsValid(): boolean { - return this.version.gte(DataDescriptor.FIRST_VERSION) && this.version.lte(DataDescriptor.LAST_VERSION) && (this.flags.and(new BN(~DataDescriptor.FLAG_MASK)).eq(new BN(0))); + return !!(this.version.gte(DataDescriptor.FIRST_VERSION) && this.version.lte(DataDescriptor.LAST_VERSION) && (this.flags.and(new BN(~DataDescriptor.FLAG_MASK)).eq(new BN(0)))); + } + + toJson() { + + const retval = { + version: this.version.toString(), + flags: this.flags.toString(), + objectdata: this.objectdata.toString('hex') + }; + + if (this.label) retval['label'] = this.label; + if (this.mimeType) retval['mimetype'] = this.mimeType; + if (this.salt) retval['salt'] = this.salt.toString('hex'); + if (this.epk) retval['epk'] = this.epk.toString('hex'); + if (this.ivk) retval['ivk'] = this.ivk.toString('hex'); + if (this.ssk) retval['ssk'] = this.ssk.toString('hex'); + + return retval; } }; @@ -506,6 +524,20 @@ export class MMRDescriptor { IsValid(): boolean { return this.version >= MMRDescriptor.FIRST_VERSION && this.version <= MMRDescriptor.LAST_VERSION; } + + toJson() { + + const retval = { + version: this.version.toString(), + objecthashtype: this.objectHashType, + mmrhashtype: this.mmrHashType, + mmrroot: this.mmrRoot.toJson(), + mmrhashes: this.mmrHashes.toJson(), + datadescriptors: this.dataDescriptors.map((dataDescriptor) => dataDescriptor.toJson()) + }; + + return retval; + } }; export const VectorEncodeVDXFUni = (obj): Buffer => { @@ -791,3 +823,183 @@ export const VectorEncodeVDXFUni = (obj): Buffer => { } return ss; } + + +export const VDXFDataToUniValue = (buffer: Buffer, offset: number = 0, pSuccess: boolean = null) => { + const reader = new BufferReader(buffer, offset); + let objectUni: any; + try + { + let checkVal: string; + let version = new BN(0); + let objSize = 0; + checkVal = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + + if (checkVal == VDXF_Data.DataCurrencyMapKey().vdxfid) + { + const oneCurrencyMap = new CurrencyValueMap(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = oneCurrencyMap.fromBuffer(reader.buffer, reader.offset); + if (oneCurrencyMap.IsValid()) + { + objectUni = {[checkVal]: oneCurrencyMap.toJson()}; + } + } + else if (checkVal == VDXF_Data.DataRatingsKey().vdxfid) + { + const oneRatingObj = new Rating(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = oneRatingObj.fromBuffer(reader.buffer, reader.offset); + if (oneRatingObj.IsValid()) + { + objectUni = {[checkVal]: oneRatingObj.toJson()}; + } + } + else if (checkVal == VDXF_Data.DataTransferDestinationKey().vdxfid) + { + const oneTransferDest = new TransferDestination(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = oneTransferDest.fromBuffer(reader.buffer, reader.offset); + if (oneTransferDest.IsValid()) + { + objectUni = {[checkVal]: oneTransferDest.toJson()}; + } + } + else if (checkVal == VDXF_Data.ContentMultiMapRemoveKey().vdxfid) + { + throw new Error("ContentMultiMapRemoveKey not implemented"); + // TODO: Implement ContentMultiMapRemoveKey + + // CContentMultiMapRemove oneContentRemove; + // ss >> VARINT(version); + // ss >> COMPACTSIZE(objSize); + // ss >> oneContentRemove; + // if (oneContentRemove.IsValid()) + // { + // objectUni = UniValue(UniValue::VOBJ); + // objectUni.pushKV(EncodeDestination(CIdentityID(checkVal)), oneContentRemove.ToUniValue()); + // } + } + else if (checkVal == VDXF_Data.DataStringKey().vdxfid) + { + let stringVal:string; + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + stringVal = reader.readVarSlice().toString('utf-8'); + objectUni = {[checkVal]: stringVal}; + } + else if (checkVal == VDXF_Data.DataByteVectorKey().vdxfid) + { + let vecVal: Buffer; + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + vecVal = reader.readVarSlice(); + objectUni = {[checkVal]: vecVal.toString('hex')}; + } + else if (checkVal == VDXF_Data.CrossChainDataRefKey().vdxfid) + { + throw new Error("CrossChainDataRefKey not implemented"); + // TODO: Implement CrossChainDataRefKey + // CCrossChainDataRef dataRef; + // ss >> VARINT(version); + // ss >> COMPACTSIZE(objSize); + // ss >> dataRef; + // if (dataRef.IsValid()) + // { + // objectUni = UniValue(UniValue::VOBJ); + // objectUni.pushKV(EncodeDestination(CIdentityID(checkVal)), dataRef.ToUniValue()); + // } + } + else if (checkVal == VDXF_Data.DataDescriptorKey().vdxfid) + { + const dataDescriptor = new DataDescriptor(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); + if (dataDescriptor.IsValid()) + { + objectUni = {[checkVal]: dataDescriptor.toJson()}; + } + } + else if (checkVal == VDXF_Data.MMRDescriptorKey().vdxfid) + { + const mmrDescriptor = new MMRDescriptor(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = mmrDescriptor.fromBuffer(reader.buffer, reader.offset); + if (mmrDescriptor.IsValid()) + { + objectUni = {[checkVal]: mmrDescriptor.toJson()}; + } + } + else if (checkVal == VDXF_Data.SignatureDataKey().vdxfid) + { + const sigData = new SignatureData(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = sigData.fromBuffer(reader.buffer, reader.offset); + if (sigData.IsValid()) + { + objectUni = {[checkVal]: sigData.toJson()}; + } + } + + // if we have an object that we recognized, encode it + if (!objectUni.isNull()) + { + if (pSuccess != null) + { + pSuccess = true; + } + } + else + { + if (pSuccess != null) + { + pSuccess = false; + } + } + } + catch (e) + { + if (pSuccess != null) + { + pSuccess = false; + } + } + return { objectUni, offset: reader.offset }; +} + +export const VDXFDataToUniValueArray = (buffer: Buffer, offset: number = 0): Object => { + let entryArr = []; + const reader = new BufferReader(buffer, offset); + let bytesLeft = buffer.length; + + while (bytesLeft > 20) // size of uint160 + { + let objOut = false; + const { objectUni, offset} = VDXFDataToUniValue(reader.buffer, reader.offset, objOut); + reader.offset = offset; + bytesLeft = buffer.length - reader.offset; + if (objOut) + { + entryArr.push(objectUni); + } + else + { + // add the remaining data as a hex string + entryArr.push(reader.readSlice(bytesLeft + 20)); + bytesLeft = 0; + break; + } + } + if (bytesLeft && bytesLeft <= 20) + { + entryArr.push(reader.readSlice(bytesLeft)); + } + return entryArr.length == 0 ? null : (entryArr.length == 1 ? entryArr[0] : entryArr); + +} \ No newline at end of file diff --git a/src/vdxf/classes/SignatureData.ts b/src/vdxf/classes/SignatureData.ts index fec1ed8..f4b0172 100644 --- a/src/vdxf/classes/SignatureData.ts +++ b/src/vdxf/classes/SignatureData.ts @@ -150,4 +150,41 @@ export class SignatureData implements SerializableEntity { return reader.offset; } + + IsValid() { + return !!(this.version.gte(SignatureData.FIRST_VERSION) && + this.version.lte(SignatureData.LAST_VERSION) && + this.systemID); + } + + toJson() { + + const returnObj = { version: this.version.toString(), + systemid: this.systemID, + hashtype: this.hashType.toString()} + + if (this.hashType == new BN(EHashTypes.HASH_SHA256)) { + returnObj['signaturehash'] = this.signatureHash.reverse().toString('hex'); + } else { + returnObj['signaturehash'] = this.signatureHash.toString('hex'); + } + + returnObj['identityid'] = this.identityID; + returnObj['signaturetype'] = this.sigType.toString(); + returnObj['signature'] = this.signatureAsVch.toString('base64'); + + if (this.vdxfKeys) { + returnObj['vdxfkeys'] = this.vdxfKeys; + } + + if (this.vdxfKeyNames) { + returnObj['vdxfkeynames'] = this.vdxfKeyNames; + } + + if (this.boundHashes) { + returnObj['boundhashes'] = this.boundHashes; + } + + return returnObj + } } \ No newline at end of file From 2e43bbf6a26a4e30b2dcd5edd9c2f4dcce331d06 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Fri, 3 May 2024 17:31:45 +0100 Subject: [PATCH 098/120] Fix signature serializing --- dist/vdxf/classes/DataDescriptor.d.ts | 3 ++- dist/vdxf/classes/DataDescriptor.js | 14 +++++++------- dist/vdxf/classes/SignatureData.js | 4 ++-- src/vdxf/classes/DataDescriptor.ts | 16 ++++++++-------- src/vdxf/classes/SignatureData.ts | 4 ++-- 5 files changed, 21 insertions(+), 20 deletions(-) diff --git a/dist/vdxf/classes/DataDescriptor.d.ts b/dist/vdxf/classes/DataDescriptor.d.ts index 6df18a0..e141542 100644 --- a/dist/vdxf/classes/DataDescriptor.d.ts +++ b/dist/vdxf/classes/DataDescriptor.d.ts @@ -129,8 +129,9 @@ export declare class MMRDescriptor { }; } export declare const VectorEncodeVDXFUni: (obj: any) => Buffer; -export declare const VDXFDataToUniValue: (buffer: Buffer, offset?: number, pSuccess?: boolean) => { +export declare const VDXFDataToUniValue: (buffer: Buffer, offset?: number, pSuccess?: any) => { objectUni: any; offset: number; + pSuccess: any; }; export declare const VDXFDataToUniValueArray: (buffer: Buffer, offset?: number) => Object; diff --git a/dist/vdxf/classes/DataDescriptor.js b/dist/vdxf/classes/DataDescriptor.js index e09f086..8d37855 100644 --- a/dist/vdxf/classes/DataDescriptor.js +++ b/dist/vdxf/classes/DataDescriptor.js @@ -752,23 +752,23 @@ const VDXFDataToUniValue = (buffer, offset = 0, pSuccess = null) => { } } // if we have an object that we recognized, encode it - if (!objectUni.isNull()) { + if (objectUni) { if (pSuccess != null) { - pSuccess = true; + pSuccess.value = true; } } else { if (pSuccess != null) { - pSuccess = false; + pSuccess.value = false; } } } catch (e) { if (pSuccess != null) { - pSuccess = false; + pSuccess.value = false; } } - return { objectUni, offset: reader.offset }; + return { objectUni, offset: reader.offset, pSuccess }; }; exports.VDXFDataToUniValue = VDXFDataToUniValue; const VDXFDataToUniValueArray = (buffer, offset = 0) => { @@ -777,11 +777,11 @@ const VDXFDataToUniValueArray = (buffer, offset = 0) => { let bytesLeft = buffer.length; while (bytesLeft > 20) // size of uint160 { - let objOut = false; + let objOut = { value: false }; const { objectUni, offset } = (0, exports.VDXFDataToUniValue)(reader.buffer, reader.offset, objOut); reader.offset = offset; bytesLeft = buffer.length - reader.offset; - if (objOut) { + if (objOut.value) { entryArr.push(objectUni); } else { diff --git a/dist/vdxf/classes/SignatureData.js b/dist/vdxf/classes/SignatureData.js index 3fc6e85..8b52a8c 100644 --- a/dist/vdxf/classes/SignatureData.js +++ b/dist/vdxf/classes/SignatureData.js @@ -48,8 +48,8 @@ class SignatureData { byteLength += varint_1.default.encodingLength(this.hashType); byteLength += varuint_1.default.encodingLength(this.signatureHash.length); byteLength += this.signatureHash.length; - byteLength += varint_1.default.encodingLength(this.sigType); byteLength += 20; // identityID uint160 + byteLength += varint_1.default.encodingLength(this.sigType); byteLength += varuint_1.default.encodingLength(this.vdxfKeys.length); byteLength += this.vdxfKeys.length * 20; byteLength += varuint_1.default.encodingLength(this.vdxfKeyNames.length); @@ -92,8 +92,8 @@ class SignatureData { this.systemID = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); this.hashType = reader.readVarInt(); this.signatureHash = reader.readVarSlice(); - this.sigType = reader.readVarInt(); this.identityID = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + this.sigType = reader.readVarInt(); const vdxfKeysLength = reader.readCompactSize(); this.vdxfKeys = []; for (let i = 0; i < vdxfKeysLength; i++) { diff --git a/src/vdxf/classes/DataDescriptor.ts b/src/vdxf/classes/DataDescriptor.ts index 250d479..bd89e64 100644 --- a/src/vdxf/classes/DataDescriptor.ts +++ b/src/vdxf/classes/DataDescriptor.ts @@ -825,7 +825,7 @@ export const VectorEncodeVDXFUni = (obj): Buffer => { } -export const VDXFDataToUniValue = (buffer: Buffer, offset: number = 0, pSuccess: boolean = null) => { +export const VDXFDataToUniValue = (buffer: Buffer, offset: number = 0, pSuccess = null) => { const reader = new BufferReader(buffer, offset); let objectUni: any; try @@ -948,18 +948,18 @@ export const VDXFDataToUniValue = (buffer: Buffer, offset: number = 0, pSuccess: } // if we have an object that we recognized, encode it - if (!objectUni.isNull()) + if (objectUni) { if (pSuccess != null) { - pSuccess = true; + pSuccess.value = true; } } else { if (pSuccess != null) { - pSuccess = false; + pSuccess.value = false; } } } @@ -967,10 +967,10 @@ export const VDXFDataToUniValue = (buffer: Buffer, offset: number = 0, pSuccess: { if (pSuccess != null) { - pSuccess = false; + pSuccess.value = false; } } - return { objectUni, offset: reader.offset }; + return { objectUni, offset: reader.offset, pSuccess }; } export const VDXFDataToUniValueArray = (buffer: Buffer, offset: number = 0): Object => { @@ -980,11 +980,11 @@ export const VDXFDataToUniValueArray = (buffer: Buffer, offset: number = 0): Obj while (bytesLeft > 20) // size of uint160 { - let objOut = false; + let objOut = { value: false}; const { objectUni, offset} = VDXFDataToUniValue(reader.buffer, reader.offset, objOut); reader.offset = offset; bytesLeft = buffer.length - reader.offset; - if (objOut) + if (objOut.value) { entryArr.push(objectUni); } diff --git a/src/vdxf/classes/SignatureData.ts b/src/vdxf/classes/SignatureData.ts index f4b0172..7b2f3c4 100644 --- a/src/vdxf/classes/SignatureData.ts +++ b/src/vdxf/classes/SignatureData.ts @@ -69,8 +69,8 @@ export class SignatureData implements SerializableEntity { byteLength += varint.encodingLength(this.hashType); byteLength += varuint.encodingLength(this.signatureHash.length); byteLength += this.signatureHash.length; - byteLength += varint.encodingLength(this.sigType); byteLength += 20; // identityID uint160 + byteLength += varint.encodingLength(this.sigType); byteLength += varuint.encodingLength(this.vdxfKeys.length); byteLength += this.vdxfKeys.length * 20; byteLength += varuint.encodingLength(this.vdxfKeyNames.length); @@ -123,8 +123,8 @@ export class SignatureData implements SerializableEntity { this.systemID = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); this.hashType = reader.readVarInt(); this.signatureHash = reader.readVarSlice(); - this.sigType = reader.readVarInt(); this.identityID = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + this.sigType = reader.readVarInt(); const vdxfKeysLength = reader.readCompactSize(); this.vdxfKeys = []; From f34f2c7336ee4df2ff7628282dade7a1491d5e27 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Fri, 10 May 2024 15:56:48 +0100 Subject: [PATCH 099/120] Add helper function, and fix toJson for datadescriptors --- dist/vdxf/classes/DataDescriptor.d.ts | 6 +--- dist/vdxf/classes/DataDescriptor.js | 26 +++++++++++----- dist/vdxf/classes/SignatureData.d.ts | 6 ++++ dist/vdxf/classes/SignatureData.js | 38 +++++++++++++++++++++- src/vdxf/classes/DataDescriptor.ts | 30 +++++++++++++----- src/vdxf/classes/SignatureData.ts | 45 ++++++++++++++++++++++++++- 6 files changed, 130 insertions(+), 21 deletions(-) diff --git a/dist/vdxf/classes/DataDescriptor.d.ts b/dist/vdxf/classes/DataDescriptor.d.ts index e141542..bcfa6da 100644 --- a/dist/vdxf/classes/DataDescriptor.d.ts +++ b/dist/vdxf/classes/DataDescriptor.d.ts @@ -54,7 +54,6 @@ export declare class DataDescriptor { toJson(): { version: string; flags: string; - objectdata: string; }; } export declare class VDXFDataDescriptor extends BufferDataVdxfObject { @@ -114,17 +113,14 @@ export declare class MMRDescriptor { mmrroot: { version: string; flags: string; - objectdata: string; }; mmrhashes: { version: string; flags: string; - objectdata: string; }; datadescriptors: { version: string; flags: string; - objectdata: string; }[]; }; } @@ -134,4 +130,4 @@ export declare const VDXFDataToUniValue: (buffer: Buffer, offset?: number, pSucc offset: number; pSuccess: any; }; -export declare const VDXFDataToUniValueArray: (buffer: Buffer, offset?: number) => Object; +export declare const VDXFDataToUniValueArray: (buffer: Buffer, offset?: number) => any; diff --git a/dist/vdxf/classes/DataDescriptor.js b/dist/vdxf/classes/DataDescriptor.js index 8d37855..468fa46 100644 --- a/dist/vdxf/classes/DataDescriptor.js +++ b/dist/vdxf/classes/DataDescriptor.js @@ -210,18 +210,29 @@ class DataDescriptor { this.flags = this.CalcFlags(); } IsValid() { - return !!(this.version.gte(DataDescriptor.FIRST_VERSION) && this.version.lte(DataDescriptor.LAST_VERSION) && (this.flags.and(new bn_js_1.BN(~DataDescriptor.FLAG_MASK)).eq(new bn_js_1.BN(0)))); + return !!(this.version.gte(DataDescriptor.FIRST_VERSION) && this.version.lte(DataDescriptor.LAST_VERSION) && this.flags.and(DataDescriptor.FLAG_MASK.notn(DataDescriptor.FLAG_MASK.bitLength()))); } toJson() { const retval = { version: this.version.toString(), - flags: this.flags.toString(), - objectdata: this.objectdata.toString('hex') + flags: this.flags.toString() }; + let isText = false; + if (this.mimeType) { + retval['mimetype'] = this.mimeType; + if (this.mimeType.startsWith("text/")) + isText = true; + } + let processedObject = (0, exports.VDXFDataToUniValueArray)(this.objectdata); + if (isText && typeof processedObject === 'string' || processedObject instanceof String) { + let objectDataUni = { message: Buffer.from(processedObject, 'hex').toString('utf-8') }; + retval['objectdata'] = objectDataUni; + } + else { + retval['objectdata'] = processedObject; + } if (this.label) retval['label'] = this.label; - if (this.mimeType) - retval['mimetype'] = this.mimeType; if (this.salt) retval['salt'] = this.salt.toString('hex'); if (this.epk) @@ -786,13 +797,14 @@ const VDXFDataToUniValueArray = (buffer, offset = 0) => { } else { // add the remaining data as a hex string - entryArr.push(reader.readSlice(bytesLeft + 20)); + reader.offset = reader.offset - 20; + entryArr.push(reader.readSlice(bytesLeft + 20).toString('hex')); bytesLeft = 0; break; } } if (bytesLeft && bytesLeft <= 20) { - entryArr.push(reader.readSlice(bytesLeft)); + entryArr.push(reader.readSlice(bytesLeft).toString('hex')); } return entryArr.length == 0 ? null : (entryArr.length == 1 ? entryArr[0] : entryArr); }; diff --git a/dist/vdxf/classes/SignatureData.d.ts b/dist/vdxf/classes/SignatureData.d.ts index dcc2861..5809707 100644 --- a/dist/vdxf/classes/SignatureData.d.ts +++ b/dist/vdxf/classes/SignatureData.d.ts @@ -20,6 +20,7 @@ export declare class SignatureData implements SerializableEntity { static TYPE_VERUSID_DEFAULT: import("bn.js"); constructor(data?: any); static fromJson(data: any): SignatureData; + static getSignatureHashType(buffer: any): number; getByteLength(): number; toBuffer(): Buffer; fromBuffer(buffer: Buffer, offset?: number): number; @@ -29,4 +30,9 @@ export declare class SignatureData implements SerializableEntity { systemid: string; hashtype: string; }; + getIdentityHash(sigObject: { + version: number; + hashtype: number; + height: number; + }): any; } diff --git a/dist/vdxf/classes/SignatureData.js b/dist/vdxf/classes/SignatureData.js index 8b52a8c..7e923f8 100644 --- a/dist/vdxf/classes/SignatureData.js +++ b/dist/vdxf/classes/SignatureData.js @@ -9,6 +9,8 @@ const bn_js_1 = require("bn.js"); const vdxf_1 = require("../../constants/vdxf"); const DataDescriptor_1 = require("./DataDescriptor"); const { BufferReader, BufferWriter } = bufferutils_1.default; +const createHash = require("create-hash"); +const vdxf_2 = require("../../constants/vdxf"); class SignatureData { constructor(data) { if (data) { @@ -24,7 +26,8 @@ class SignatureData { signatureData.systemID = data.systemid; if (data.hashtype) signatureData.hashType = new bn_js_1.BN(data.hashtype); - if (signatureData.hashType == new bn_js_1.BN(DataDescriptor_1.EHashTypes.HASH_SHA256)) { + let hashType = this.getSignatureHashType(Buffer.from(data.signaturehash, 'hex')); + if (hashType == DataDescriptor_1.EHashTypes.HASH_SHA256) { signatureData.signatureHash = Buffer.from(data.signaturehash, 'hex').reverse(); } else { @@ -41,6 +44,14 @@ class SignatureData { } return signatureData; } + static getSignatureHashType(buffer) { + var bufferReader = new bufferutils_1.default.BufferReader(buffer, 0); + let version = bufferReader.readUInt8(); + if (version === 2) + return bufferReader.readUInt8(); + else + return DataDescriptor_1.EHashTypes.HASH_SHA256; + } getByteLength() { let byteLength = 0; byteLength += varint_1.default.encodingLength(this.version); @@ -141,6 +152,31 @@ class SignatureData { } return returnObj; } + getIdentityHash(sigObject) { + var heightBuffer = Buffer.allocUnsafe(4); + heightBuffer.writeUInt32LE(sigObject.height); + if (sigObject.hashtype != Number(DataDescriptor_1.EHashTypes.HASH_SHA256)) { + throw new Error("Invalid signature type for identity hash"); + } + if (sigObject.version == 1) { + return createHash("sha256") + .update(vdxf_2.VERUS_DATA_SIGNATURE_PREFIX) + .update((0, address_1.fromBase58Check)(this.systemID).hash) + .update(heightBuffer) + .update((0, address_1.fromBase58Check)(this.identityID).hash) + .update(this.signatureHash) + .digest(); + } + else { + return createHash("sha256") + .update((0, address_1.fromBase58Check)(this.systemID).hash) + .update(heightBuffer) + .update((0, address_1.fromBase58Check)(this.identityID).hash) + .update(vdxf_2.VERUS_DATA_SIGNATURE_PREFIX) + .update(this.signatureHash) + .digest(); + } + } } exports.SignatureData = SignatureData; SignatureData.VERSION_INVALID = new bn_js_1.BN(0); diff --git a/src/vdxf/classes/DataDescriptor.ts b/src/vdxf/classes/DataDescriptor.ts index bd89e64..0ae58d6 100644 --- a/src/vdxf/classes/DataDescriptor.ts +++ b/src/vdxf/classes/DataDescriptor.ts @@ -290,19 +290,34 @@ export class DataDescriptor { } IsValid(): boolean { - return !!(this.version.gte(DataDescriptor.FIRST_VERSION) && this.version.lte(DataDescriptor.LAST_VERSION) && (this.flags.and(new BN(~DataDescriptor.FLAG_MASK)).eq(new BN(0)))); + return !!(this.version.gte(DataDescriptor.FIRST_VERSION) && this.version.lte(DataDescriptor.LAST_VERSION) && this.flags.and(DataDescriptor.FLAG_MASK.notn(DataDescriptor.FLAG_MASK.bitLength()))); } toJson() { const retval = { version: this.version.toString(), - flags: this.flags.toString(), - objectdata: this.objectdata.toString('hex') + flags: this.flags.toString() }; + let isText = false; + if (this.mimeType) { + retval['mimetype'] = this.mimeType; + if(this.mimeType.startsWith("text/")) isText = true; + } + + let processedObject = VDXFDataToUniValueArray(this.objectdata) + + if (isText && typeof processedObject === 'string' || processedObject instanceof String) { + + let objectDataUni = {message: Buffer.from(processedObject, 'hex').toString('utf-8')}; + retval['objectdata'] = objectDataUni; + + } else { + retval['objectdata'] = processedObject; + } + if (this.label) retval['label'] = this.label; - if (this.mimeType) retval['mimetype'] = this.mimeType; if (this.salt) retval['salt'] = this.salt.toString('hex'); if (this.epk) retval['epk'] = this.epk.toString('hex'); if (this.ivk) retval['ivk'] = this.ivk.toString('hex'); @@ -973,7 +988,7 @@ export const VDXFDataToUniValue = (buffer: Buffer, offset: number = 0, pSuccess return { objectUni, offset: reader.offset, pSuccess }; } -export const VDXFDataToUniValueArray = (buffer: Buffer, offset: number = 0): Object => { +export const VDXFDataToUniValueArray = (buffer: Buffer, offset: number = 0) => { let entryArr = []; const reader = new BufferReader(buffer, offset); let bytesLeft = buffer.length; @@ -991,14 +1006,15 @@ export const VDXFDataToUniValueArray = (buffer: Buffer, offset: number = 0): Obj else { // add the remaining data as a hex string - entryArr.push(reader.readSlice(bytesLeft + 20)); + reader.offset = reader.offset - 20; + entryArr.push(reader.readSlice(bytesLeft + 20).toString('hex')); bytesLeft = 0; break; } } if (bytesLeft && bytesLeft <= 20) { - entryArr.push(reader.readSlice(bytesLeft)); + entryArr.push(reader.readSlice(bytesLeft).toString('hex')); } return entryArr.length == 0 ? null : (entryArr.length == 1 ? entryArr[0] : entryArr); diff --git a/src/vdxf/classes/SignatureData.ts b/src/vdxf/classes/SignatureData.ts index 7b2f3c4..211065f 100644 --- a/src/vdxf/classes/SignatureData.ts +++ b/src/vdxf/classes/SignatureData.ts @@ -8,6 +8,8 @@ import { I_ADDR_VERSION } from '../../constants/vdxf'; import { SerializableEntity } from '../../utils/types/SerializableEntity'; import { EHashTypes } from './DataDescriptor'; const { BufferReader, BufferWriter } = bufferutils +const createHash = require("create-hash"); +import { VERUS_DATA_SIGNATURE_PREFIX } from "../../constants/vdxf"; export class SignatureData implements SerializableEntity { version: BigNumber; @@ -43,7 +45,9 @@ export class SignatureData implements SerializableEntity { if (data.systemid) signatureData.systemID = data.systemid; if (data.hashtype) signatureData.hashType = new BN(data.hashtype); - if (signatureData.hashType == new BN(EHashTypes.HASH_SHA256)) { + let hashType = this.getSignatureHashType(Buffer.from(data.signaturehash, 'hex')); + + if (hashType == EHashTypes.HASH_SHA256) { signatureData.signatureHash = Buffer.from(data.signaturehash, 'hex').reverse(); } else { signatureData.signatureHash = Buffer.from(data.signaturehash, 'hex'); @@ -61,6 +65,16 @@ export class SignatureData implements SerializableEntity { return signatureData; } + static getSignatureHashType(buffer) { + + var bufferReader = new bufferutils.BufferReader(buffer, 0); + let version = bufferReader.readUInt8(); + if (version === 2) + return bufferReader.readUInt8(); + else + return EHashTypes.HASH_SHA256; + } + getByteLength() { let byteLength = 0; @@ -187,4 +201,33 @@ export class SignatureData implements SerializableEntity { return returnObj } + + getIdentityHash(sigObject:{version: number, hashtype: number, height: number}) { + var heightBuffer = Buffer.allocUnsafe(4) + heightBuffer.writeUInt32LE(sigObject.height); + + if (sigObject.hashtype != Number(EHashTypes.HASH_SHA256)) { + throw new Error("Invalid signature type for identity hash"); + } + + if (sigObject.version == 1) { + return createHash("sha256") + .update(VERUS_DATA_SIGNATURE_PREFIX) + .update(fromBase58Check(this.systemID).hash) + .update(heightBuffer) + .update(fromBase58Check(this.identityID).hash) + .update(this.signatureHash) + .digest(); + } else { + return createHash("sha256") + .update(fromBase58Check(this.systemID).hash) + .update(heightBuffer) + .update(fromBase58Check(this.identityID).hash) + .update(VERUS_DATA_SIGNATURE_PREFIX) + .update(this.signatureHash) + .digest(); + } + + + } } \ No newline at end of file From bf7cd12871a97f57b186c4168555a6d92603695e Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Fri, 17 May 2024 14:39:22 +0100 Subject: [PATCH 100/120] change Request to just data type --- dist/vdxf/classes/Challenge.d.ts | 7 +---- dist/vdxf/classes/Challenge.js | 43 +--------------------------- dist/vdxf/classes/SignatureData.js | 2 +- src/vdxf/classes/Challenge.ts | 46 +----------------------------- src/vdxf/classes/SignatureData.ts | 2 +- 5 files changed, 5 insertions(+), 95 deletions(-) diff --git a/dist/vdxf/classes/Challenge.d.ts b/dist/vdxf/classes/Challenge.d.ts index a44ea06..cff30a8 100644 --- a/dist/vdxf/classes/Challenge.d.ts +++ b/dist/vdxf/classes/Challenge.d.ts @@ -76,10 +76,5 @@ export declare class Challenge extends VDXFObject implements ChallengeInterface skip: boolean; }; } -export declare class RequestedPermission extends VDXFObject { - data: string; - encoding?: BufferEncoding; - constructor(data: string, vdxfkey?: string); - addPrototypes(data: string): void; - fromDataBuffer(buffer: Buffer, offset?: number): number; +export declare class RequestedPermission extends Utf8DataVdxfObject { } diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index 0a782dd..11b311f 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -9,7 +9,6 @@ const Hash160_1 = require("./Hash160"); const Attestation_1 = require("./Attestation"); const address_1 = require("../../utils/address"); const vdxf_1 = require("../../constants/vdxf"); -const index_1 = require("../index"); class RedirectUri extends __1.VDXFObject { constructor(uri = "", vdxfkey = "") { super(vdxfkey); @@ -259,46 +258,6 @@ class Challenge extends __1.VDXFObject { } } exports.Challenge = Challenge; -class RequestedPermission extends __1.VDXFObject { - constructor(data, vdxfkey = "") { - super(vdxfkey); - if (vdxfkey) - this.addPrototypes(data); - } - addPrototypes(data) { - var classType; - switch (this.vdxfkey) { - case __1.IDENTITY_AGREEMENT.vdxfid: - classType = index_1.BufferDataVdxfObject; - this.data = data; - this.encoding = "utf-8"; - break; - case __1.IDENTITY_VIEW.vdxfid: - classType = index_1.BufferDataVdxfObject; - this.data = data; - this.encoding = "utf-8"; - break; - case __1.PROFILE_DATA_VIEW_REQUEST.vdxfid: - classType = index_1.BufferDataVdxfObject; - this.data = data; - this.encoding = "utf-8"; - break; - case __1.LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY.vdxfid: - classType = index_1.BufferDataVdxfObject; - this.data = data; - this.encoding = "utf-8"; - break; - default: - throw new Error("Invalid vdxfkey"); - } - const prototypes = ['dataByteLength', 'toDataBuffer', 'fromDataBuffer', 'toJson']; - prototypes.forEach(name => { - Object.defineProperty(this, name, Object.getOwnPropertyDescriptor(classType.prototype, name)); - }); - } - fromDataBuffer(buffer, offset) { - this.addPrototypes(""); - return this.fromDataBuffer(buffer, offset); - } +class RequestedPermission extends __1.Utf8DataVdxfObject { } exports.RequestedPermission = RequestedPermission; diff --git a/dist/vdxf/classes/SignatureData.js b/dist/vdxf/classes/SignatureData.js index 7e923f8..43681c6 100644 --- a/dist/vdxf/classes/SignatureData.js +++ b/dist/vdxf/classes/SignatureData.js @@ -26,7 +26,7 @@ class SignatureData { signatureData.systemID = data.systemid; if (data.hashtype) signatureData.hashType = new bn_js_1.BN(data.hashtype); - let hashType = this.getSignatureHashType(Buffer.from(data.signaturehash, 'hex')); + let hashType = SignatureData.getSignatureHashType(Buffer.from(data.signaturehash, 'hex')); if (hashType == DataDescriptor_1.EHashTypes.HASH_SHA256) { signatureData.signatureHash = Buffer.from(data.signaturehash, 'hex').reverse(); } diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index 41958a2..b9edc9b 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -422,48 +422,4 @@ export class Challenge extends VDXFObject implements ChallengeInterface { } } -export class RequestedPermission extends VDXFObject { - data: string; - encoding?: BufferEncoding; - constructor(data: string, vdxfkey: string = "") { - super(vdxfkey); - if (vdxfkey) this.addPrototypes(data); - } - - addPrototypes(data: string): void { - var classType; - switch (this.vdxfkey) { - case IDENTITY_AGREEMENT.vdxfid: - classType = BufferDataVdxfObject; - this.data = data; - this.encoding = "utf-8"; - break; - case IDENTITY_VIEW.vdxfid: - classType = BufferDataVdxfObject; - this.data = data; - this.encoding = "utf-8"; - break; - case PROFILE_DATA_VIEW_REQUEST.vdxfid: - classType = BufferDataVdxfObject; - this.data = data; - this.encoding = "utf-8"; - break; - case LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY.vdxfid: - classType = BufferDataVdxfObject; - this.data = data; - this.encoding = "utf-8"; - break; - default: - throw new Error("Invalid vdxfkey") - } - const prototypes = ['dataByteLength', 'toDataBuffer', 'fromDataBuffer', 'toJson']; - prototypes.forEach(name => { - Object.defineProperty(this, name, Object.getOwnPropertyDescriptor(classType.prototype, name)); - }); - } - - fromDataBuffer(buffer: Buffer, offset?: number): number { - this.addPrototypes(""); - return this.fromDataBuffer(buffer, offset) - } -} \ No newline at end of file +export class RequestedPermission extends Utf8DataVdxfObject {} \ No newline at end of file diff --git a/src/vdxf/classes/SignatureData.ts b/src/vdxf/classes/SignatureData.ts index 211065f..acad2a2 100644 --- a/src/vdxf/classes/SignatureData.ts +++ b/src/vdxf/classes/SignatureData.ts @@ -45,7 +45,7 @@ export class SignatureData implements SerializableEntity { if (data.systemid) signatureData.systemID = data.systemid; if (data.hashtype) signatureData.hashType = new BN(data.hashtype); - let hashType = this.getSignatureHashType(Buffer.from(data.signaturehash, 'hex')); + let hashType = SignatureData.getSignatureHashType(Buffer.from(data.signaturehash, 'hex')); if (hashType == EHashTypes.HASH_SHA256) { signatureData.signatureHash = Buffer.from(data.signaturehash, 'hex').reverse(); From 236b46880ad4bcd1233571033adb995d99c1f0ce Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Mon, 20 May 2024 16:10:32 +0100 Subject: [PATCH 101/120] Extra keys to catagorize attestations viewed --- dist/vdxf/keys.d.ts | 4 ++++ dist/vdxf/keys.js | 39 ++++++++++++++++++++++++++++++++++++++- src/vdxf/keys.ts | 40 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+), 1 deletion(-) diff --git a/dist/vdxf/keys.d.ts b/dist/vdxf/keys.d.ts index 292b7b9..f0ecc44 100644 --- a/dist/vdxf/keys.d.ts +++ b/dist/vdxf/keys.d.ts @@ -56,5 +56,9 @@ export declare const ATTESTATION_VIEW_RESPONSE: VDXFKeyInterface; export declare const ATTESTATION_ID: VDXFKeyInterface; export declare const ATTESTATION_NAME: VDXFKeyInterface; export declare const ATTESTATION_TYPE: VDXFKeyInterface; +export declare const ATTESTATION_VIEW_REQUEST_KEY: VDXFKeyInterface; +export declare const ATTESTATION_VIEW_REQUEST_NAME: VDXFKeyInterface; +export declare const ATTESTATION_VIEW_REQUEST_ATTESTOR: VDXFKeyInterface; +export declare const ATTESTATION_VIEW_REQUEST_ID: VDXFKeyInterface; export declare const PROFILE_DATA_VIEW_REQUEST: VDXFKeyInterface; export declare const DATA_TYPE_STRING: VDXFKeyInterface; diff --git a/dist/vdxf/keys.js b/dist/vdxf/keys.js index b8ac39b..f8801e4 100644 --- a/dist/vdxf/keys.js +++ b/dist/vdxf/keys.js @@ -1,6 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.DATA_TYPE_STRING = exports.PROFILE_DATA_VIEW_REQUEST = exports.ATTESTATION_TYPE = exports.ATTESTATION_NAME = exports.ATTESTATION_ID = exports.ATTESTATION_VIEW_RESPONSE = exports.ATTESTATION_VIEW_REQUEST = exports.ATTESTATION_PROVISION_OBJECT = exports.ATTESTATION_PROVISION_TYPE = exports.ATTESTATION_PROVISION_URL = exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.IDENTITY_AUTH_SIG_VDXF_KEY = exports.VERUSPAY_INVOICE_VDXF_KEY = void 0; +exports.ATTESTATION_VIEW_REQUEST_ID = exports.ATTESTATION_VIEW_REQUEST_ATTESTOR = exports.ATTESTATION_VIEW_REQUEST_NAME = exports.ATTESTATION_VIEW_REQUEST_KEY = exports.ATTESTATION_TYPE = exports.ATTESTATION_NAME = exports.ATTESTATION_ID = exports.ATTESTATION_VIEW_RESPONSE = exports.ATTESTATION_VIEW_REQUEST = exports.ATTESTATION_PROVISION_OBJECT = exports.ATTESTATION_PROVISION_TYPE = exports.ATTESTATION_PROVISION_URL = exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.IDENTITY_AUTH_SIG_VDXF_KEY = exports.VERUSPAY_INVOICE_VDXF_KEY = void 0; +exports.DATA_TYPE_STRING = exports.PROFILE_DATA_VIEW_REQUEST = void 0; exports.VERUSPAY_INVOICE_VDXF_KEY = { hash160result: "628efc28c2e2d40050e1a9de7a93e7ddf2aa0076", qualifiedname: { @@ -374,6 +375,42 @@ exports.ATTESTATION_TYPE = { "name": "vrsc::attestation.type" } }; +exports.ATTESTATION_VIEW_REQUEST_KEY = { + "vdxfid": "i8iRyLrnapw29BTaHYtu7C3wWPtbjKvEJp", + "indexid": "xDYYS9HsS99gmMLc9EZ45aaUY3ucaC7FDD", + "hash160result": "fa51ed48a3b250818d2fb1efcdf6275fd2e47939", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestation.view.request.key" + } +}; +exports.ATTESTATION_VIEW_REQUEST_NAME = { + "vdxfid": "i6psJBVkM3yivumyxuhmAwmMYixiFRD9LT", + "indexid": "xBeykyvqCNCPZ5f1pbMv9LHtaNyjDs5X2m", + "hash160result": "8bb63c962ccec2eced99eb15f958b2d03247c124", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestation.view.request.name" + } +}; +exports.ATTESTATION_VIEW_REQUEST_ATTESTOR = { + "vdxfid": "iHuiKHNSLJd6xeUCN8etjnTcGgzhDp9Zug", + "indexid": "xNjpn5oXBcqmapMEDpK3iAz9JM1i7g8cDX", + "hash160result": "1bdced61a4c500114659b9f15759eea89c3e559e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestation.view.request.attestor" + } +}; +exports.ATTESTATION_VIEW_REQUEST_ID = { + "vdxfid": "iSoJNm8wz9Jtv69YvReNyRSzBr8KJSXTym", + "indexid": "xXdQqZa2qTXZYG2an7JXwoyXDW9L9NjTYS", + "hash160result": "70cbf4f61e3d585bcaac692fa9443a9890e5d7ff", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestation.view.request.id" + } +}; exports.PROFILE_DATA_VIEW_REQUEST = { "vdxfid": "iEocxePWah2zp5Hn4ujeoQpc4UVYeJeQ2g", "indexid": "xKdjRSpbS1FfSFAovbPomoM968WZVsmW1E", diff --git a/src/vdxf/keys.ts b/src/vdxf/keys.ts index 14e92c2..481154f 100644 --- a/src/vdxf/keys.ts +++ b/src/vdxf/keys.ts @@ -440,6 +440,46 @@ export const ATTESTATION_TYPE: VDXFKeyInterface = { } }; +export const ATTESTATION_VIEW_REQUEST_KEY: VDXFKeyInterface = { + "vdxfid": "i8iRyLrnapw29BTaHYtu7C3wWPtbjKvEJp", + "indexid": "xDYYS9HsS99gmMLc9EZ45aaUY3ucaC7FDD", + "hash160result": "fa51ed48a3b250818d2fb1efcdf6275fd2e47939", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestation.view.request.key" + } +}; + +export const ATTESTATION_VIEW_REQUEST_NAME: VDXFKeyInterface = { + "vdxfid": "i6psJBVkM3yivumyxuhmAwmMYixiFRD9LT", + "indexid": "xBeykyvqCNCPZ5f1pbMv9LHtaNyjDs5X2m", + "hash160result": "8bb63c962ccec2eced99eb15f958b2d03247c124", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestation.view.request.name" + } +}; + +export const ATTESTATION_VIEW_REQUEST_ATTESTOR: VDXFKeyInterface = { + "vdxfid": "iHuiKHNSLJd6xeUCN8etjnTcGgzhDp9Zug", + "indexid": "xNjpn5oXBcqmapMEDpK3iAz9JM1i7g8cDX", + "hash160result": "1bdced61a4c500114659b9f15759eea89c3e559e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestation.view.request.attestor" + } +}; + +export const ATTESTATION_VIEW_REQUEST_ID: VDXFKeyInterface = { + "vdxfid": "iSoJNm8wz9Jtv69YvReNyRSzBr8KJSXTym", + "indexid": "xXdQqZa2qTXZYG2an7JXwoyXDW9L9NjTYS", + "hash160result": "70cbf4f61e3d585bcaac692fa9443a9890e5d7ff", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::attestation.view.request.id" + } +}; + export const PROFILE_DATA_VIEW_REQUEST: VDXFKeyInterface = { "vdxfid": "iEocxePWah2zp5Hn4ujeoQpc4UVYeJeQ2g", "indexid": "xKdjRSpbS1FfSFAovbPomoM968WZVsmW1E", From 2018f3d2ac1f446b5c1578bf784fdc1f68301504 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Mon, 20 May 2024 19:09:07 +0100 Subject: [PATCH 102/120] update --- package.json | 3 +-- yarn.lock | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 51fa5f0..ecad87e 100644 --- a/package.json +++ b/package.json @@ -25,8 +25,7 @@ "blake2b": "https://github.com/VerusCoin/blake2b", "bn.js": "5.2.1", "bs58check": "https://github.com/bitcoinjs/bs58check", - "create-hash": "1.2.0", - "bech32": "2.0.0" + "create-hash": "1.2.0" }, "devDependencies": { "@types/bn.js": "5.1.1", diff --git a/yarn.lock b/yarn.lock index a0e5515..71c4f6f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1017,7 +1017,7 @@ base64url@3.0.1: resolved "https://registry.yarnpkg.com/base64url/-/base64url-3.0.1.tgz#6399d572e2bc3f90a9a8b22d5dbb0a32d33f788d" integrity sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A== -bech32@^2.0.0: +bech32@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/bech32/-/bech32-2.0.0.tgz#078d3686535075c8c79709f054b1b226a133b355" integrity sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg== From 194f1be0055fa2cbbf09a06cebdb6903e9180b79 Mon Sep 17 00:00:00 2001 From: Chris <34682781+monkins1010@users.noreply.github.com> Date: Mon, 20 May 2024 19:15:31 +0100 Subject: [PATCH 103/120] update test --- src/__tests__/attestation/personalInfo.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/__tests__/attestation/personalInfo.test.ts b/src/__tests__/attestation/personalInfo.test.ts index 23ae677..170b336 100644 --- a/src/__tests__/attestation/personalInfo.test.ts +++ b/src/__tests__/attestation/personalInfo.test.ts @@ -197,7 +197,7 @@ describe('Create a personal info request', () => { const mmrdescriptorBuffer = SignatureData.fromJson(signaturedata); const mmrbuffer = mmrdescriptorBuffer.toBuffer().toString('hex'); - expect(mmrbuffer).toStrictEqual("01a6ef9ea235635e328124ff3429db9f9e91b64e2d0120dfd3e3d82783360dfc675a09e6a226fd43119ef4e8d7cf553af96ea5883b51dab26820ee0c9b1276aac834cf457026a575dfce8401000000490205ce0a000001411f0a24ae90af6d838e9c60ea479b1cca8cdaae583c8d73c1f9f3eb8b48e626aa551c354c5607c8f79f34f544729e246ca0740c2b523e6267f03d1f7faa615f47f6"); + expect(mmrbuffer).toStrictEqual("01a6ef9ea235635e328124ff3429db9f9e91b64e2d0120da513b88a56ef93a55cfd7e8f49e1143fd26a2e6095a67fc0d368327d8e3d3dfb26820ee0c9b1276aac834cf457026a575dfce8401000000490205ce0a000001411f0a24ae90af6d838e9c60ea479b1cca8cdaae583c8d73c1f9f3eb8b48e626aa551c354c5607c8f79f34f544729e246ca0740c2b523e6267f03d1f7faa615f47f6"); }); From a2432b3e8358aa656147c516644285e37b7d4890 Mon Sep 17 00:00:00 2001 From: Monkins1010 Date: Tue, 20 Aug 2024 19:49:13 +0100 Subject: [PATCH 104/120] Add SignData --- dist/api/ApiPrimitive.d.ts | 3 +- .../api/classes/SignData/SignDataRequest.d.ts | 31 + dist/api/classes/SignData/SignDataRequest.js | 25 + .../classes/SignData/SignDataResponse.d.ts | 23 + dist/api/classes/SignData/SignDataResponse.js | 7 + dist/api/classes/index.d.ts | 8 +- dist/api/classes/index.js | 6 +- dist/constants/cmds.d.ts | 1 + dist/constants/cmds.js | 3 +- dist/utils/IdentityData.d.ts | 12 + dist/utils/IdentityData.js | 169 + dist/utils/types/DataDescriptor.d.ts | 11 + dist/utils/types/DataDescriptor.js | 2 + dist/utils/types/MmrDescriptor.d.ts | 9 + dist/utils/types/MmrDescriptor.js | 2 + dist/utils/types/SignData.d.ts | 8 + dist/utils/types/SignData.js | 2 + dist/utils/types/Signature.d.ts | 9 + dist/utils/types/Signature.js | 2 + dist/vdxf/classes/Challenge.d.ts | 1 + dist/vdxf/classes/Challenge.js | 7 +- dist/vdxf/classes/PersonalProfile.d.ts | 1 - dist/vdxf/classes/PersonalProfile.js | 50 +- dist/vdxf/classes/SaltedData.d.ts | 17 + dist/vdxf/classes/SaltedData.js | 81 + dist/vdxf/classes/index.d.ts | 2 +- dist/vdxf/classes/index.js | 3 +- dist/vdxf/identityDataKeys.d.ts | 418 ++- dist/vdxf/identityDataKeys.js | 2719 ++++++---------- dist/vdxf/index.d.ts | 11 + dist/vdxf/index.js | 26 +- dist/vdxf/keymap.js | 2 +- dist/vdxf/keys.d.ts | 1 + dist/vdxf/keys.js | 11 +- src/__tests__/attestation/attestation.test.ts | 10 +- src/__tests__/vdxf/loginconsent.test.ts | 4 +- src/__tests__/vdxf/parser.test.ts | 2 +- src/api/ApiPrimitive.ts | 4 +- src/api/classes/SignData/SignDataRequest.ts | 55 + src/api/classes/SignData/SignDataResponse.ts | 24 + src/api/classes/index.ts | 6 + src/constants/cmds.ts | 1 + src/utils/IdentityData.ts | 173 ++ src/utils/types/DataDescriptor.ts | 12 + src/utils/types/MmrDescriptor.ts | 10 + src/utils/types/SignData.ts | 8 + src/utils/types/Signature.ts | 9 + src/vdxf/classes/Challenge.ts | 10 +- src/vdxf/classes/DataDescriptor.ts | 1 - src/vdxf/classes/IdentityData.ts | 246 -- src/vdxf/classes/PersonalProfile.ts | 71 +- src/vdxf/classes/SaltedData.ts | 102 + src/vdxf/classes/index.ts | 2 +- src/vdxf/identityDataKeys.ts | 2767 ++++++----------- src/vdxf/index.ts | 36 + src/vdxf/keymap.ts | 2 +- src/vdxf/keys.ts | 10 + 57 files changed, 2966 insertions(+), 4282 deletions(-) create mode 100644 dist/api/classes/SignData/SignDataRequest.d.ts create mode 100644 dist/api/classes/SignData/SignDataRequest.js create mode 100644 dist/api/classes/SignData/SignDataResponse.d.ts create mode 100644 dist/api/classes/SignData/SignDataResponse.js create mode 100644 dist/utils/IdentityData.d.ts create mode 100644 dist/utils/IdentityData.js create mode 100644 dist/utils/types/DataDescriptor.d.ts create mode 100644 dist/utils/types/DataDescriptor.js create mode 100644 dist/utils/types/MmrDescriptor.d.ts create mode 100644 dist/utils/types/MmrDescriptor.js create mode 100644 dist/utils/types/SignData.d.ts create mode 100644 dist/utils/types/SignData.js create mode 100644 dist/utils/types/Signature.d.ts create mode 100644 dist/utils/types/Signature.js create mode 100644 dist/vdxf/classes/SaltedData.d.ts create mode 100644 dist/vdxf/classes/SaltedData.js create mode 100644 src/api/classes/SignData/SignDataRequest.ts create mode 100644 src/api/classes/SignData/SignDataResponse.ts create mode 100644 src/utils/IdentityData.ts create mode 100644 src/utils/types/DataDescriptor.ts create mode 100644 src/utils/types/MmrDescriptor.ts create mode 100644 src/utils/types/SignData.ts create mode 100644 src/utils/types/Signature.ts delete mode 100644 src/vdxf/classes/IdentityData.ts create mode 100644 src/vdxf/classes/SaltedData.ts diff --git a/dist/api/ApiPrimitive.d.ts b/dist/api/ApiPrimitive.d.ts index 803d340..ca78fa7 100644 --- a/dist/api/ApiPrimitive.d.ts +++ b/dist/api/ApiPrimitive.d.ts @@ -3,7 +3,8 @@ import { IdentityDefinition } from "../identity/IdentityDefinition"; import { OfferForMaking } from "../offers/OfferForMaking"; import { ListedOffer } from "../offers/OfferList"; import { RawTransaction } from "../transaction/RawTransaction"; -export declare type ApiPrimitive = string | number | boolean | null | OfferForMaking | ApiPrimitiveJson | ListedOffer | Array | IdentityDefinition | BlockInfo | RawTransaction; +import { signDataArgs } from "./classes/SignData/SignDataRequest"; +export declare type ApiPrimitive = string | number | boolean | null | OfferForMaking | ApiPrimitiveJson | ListedOffer | Array | IdentityDefinition | BlockInfo | RawTransaction | signDataArgs; export declare type ApiPrimitiveJson = { [key: string]: ApiPrimitive | undefined; }; diff --git a/dist/api/classes/SignData/SignDataRequest.d.ts b/dist/api/classes/SignData/SignDataRequest.d.ts new file mode 100644 index 0000000..8c83ef3 --- /dev/null +++ b/dist/api/classes/SignData/SignDataRequest.d.ts @@ -0,0 +1,31 @@ +import { ApiRequest } from "../../ApiRequest"; +import { ApiPrimitiveJson, RequestParams } from "../../ApiPrimitive"; +import { DataDescriptor } from "../../../utils/types/DataDescriptor"; +import { SignData } from "../../../utils/types/SignData"; +export declare type signDataArgs = { + address?: string; + filename?: string; + message?: string; + messagehex?: string; + messsagebase64?: string; + datahash?: string; + vdxfdata?: string; + mmrdata?: Array; + mmrsalt?: Array; + mmrhashtype?: string; + priormmr?: Array; + vdxfkeys?: Array; + vdxfkeynames?: Array; + boundhahses?: Array; + hashtype?: string; + signature?: string; + encrypttoaddress?: string; + createmmr?: boolean; +}; +export declare class SignDataRequest extends ApiRequest { + data: signDataArgs; + constructor(chain: string, signableItems: signDataArgs); + getParams(): RequestParams; + static fromJson(object: ApiPrimitiveJson): SignDataRequest; + toJson(): ApiPrimitiveJson; +} diff --git a/dist/api/classes/SignData/SignDataRequest.js b/dist/api/classes/SignData/SignDataRequest.js new file mode 100644 index 0000000..cee3cd8 --- /dev/null +++ b/dist/api/classes/SignData/SignDataRequest.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SignDataRequest = void 0; +const ApiRequest_1 = require("../../ApiRequest"); +const cmds_1 = require("../../../constants/cmds"); +class SignDataRequest extends ApiRequest_1.ApiRequest { + constructor(chain, signableItems) { + super(chain, cmds_1.SIGN_DATA); + this.data = signableItems; + } + getParams() { + const params = [this.data]; + return params.filter((x) => x != null); + } + static fromJson(object) { + return new SignDataRequest(object.chain, object.data); + } + toJson() { + return { + chain: this.chain, + data: this.data, + }; + } +} +exports.SignDataRequest = SignDataRequest; diff --git a/dist/api/classes/SignData/SignDataResponse.d.ts b/dist/api/classes/SignData/SignDataResponse.d.ts new file mode 100644 index 0000000..866d41d --- /dev/null +++ b/dist/api/classes/SignData/SignDataResponse.d.ts @@ -0,0 +1,23 @@ +import { ApiResponse } from "../../ApiResponse"; +import { Signature } from "../../../utils/types/Signature"; +import { mmrDescriptorParameters } from "../../../utils/types/MmrDescriptor"; +import { DataDescriptor } from "../../../utils/types/DataDescriptor"; +export declare class SignDataResponse extends ApiResponse { + result: { + mmrdescriptor_encrypted: mmrDescriptorParameters; + mmrdescriptor: mmrDescriptorParameters; + signature: string; + signaturedata_encrypted: DataDescriptor; + signaturedata_ssk: string; + signaturedata: Signature; + system: string; + systemid: string; + hashtype: string; + mmrhashtype: string; + hash: string; + identity: string; + canonicalname: string; + address: string; + signatureheight: number; + }; +} diff --git a/dist/api/classes/SignData/SignDataResponse.js b/dist/api/classes/SignData/SignDataResponse.js new file mode 100644 index 0000000..fe83e95 --- /dev/null +++ b/dist/api/classes/SignData/SignDataResponse.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SignDataResponse = void 0; +const ApiResponse_1 = require("../../ApiResponse"); +class SignDataResponse extends ApiResponse_1.ApiResponse { +} +exports.SignDataResponse = SignDataResponse; diff --git a/dist/api/classes/index.d.ts b/dist/api/classes/index.d.ts index 2711669..1068129 100644 --- a/dist/api/classes/index.d.ts +++ b/dist/api/classes/index.d.ts @@ -24,6 +24,8 @@ import { SendRawTransactionRequest } from './SendRawTransaction/SendRawTransacti import { SendRawTransactionResponse } from './SendRawTransaction/SendRawTransactionResponse'; import { SignMessageRequest } from './SignMessage/SignMessageRequest'; import { SignMessageResponse } from './SignMessage/SignMessageResponse'; +import { SignDataRequest } from './SignData/SignDataRequest'; +import { SignDataResponse } from './SignData/SignDataResponse'; import { VerifyMessageRequest } from './VerifyMessage/VerifyMessageRequest'; import { VerifyMessageResponse } from './VerifyMessage/VerifyMessageResponse'; import { GetAddressMempoolResponse } from './GetAddressMempool/GetAddressMempoolResponse'; @@ -38,6 +40,6 @@ import { ListCurrenciesRequest } from './ListCurrencies/ListCurrenciesRequest'; import { ListCurrenciesResponse } from './ListCurrencies/ListCurrenciesResponse'; import { EstimateConversionRequest } from './EstimateConversion/EstimateConversionRequest'; import { EstimateConversionResponse } from './EstimateConversion/EstimateConversionResponse'; -export { GetAddressBalanceRequest, GetAddressBalanceResponse, GetAddressDeltasRequest, GetAddressDeltasResponse, GetAddressMempoolRequest, GetAddressMempoolResponse, GetAddressUtxosRequest, GetAddressUtxosResponse, GetBlockRequest, GetBlockResponse, GetVdxfIdRequest, GetVdxfIdResponse, GetIdentityRequest, GetIdentityResponse, GetCurrencyRequest, GetCurrencyResponse, GetOffersRequest, GetOffersResponse, GetRawTransactionRequest, GetRawTransactionResponse, MakeOfferRequest, MakeOfferResponse, SendRawTransactionRequest, SendRawTransactionResponse, GetInfoRequest, GetInfoResponse, VerifyMessageRequest, VerifyMessageResponse, SignMessageRequest, SignMessageResponse, SendCurrencyRequest, SendCurrencyResponse, FundRawTransactionRequest, FundRawTransactionResponse, GetCurrencyConvertersRequest, GetCurrencyConvertersResponse, ListCurrenciesRequest, ListCurrenciesResponse, EstimateConversionRequest, EstimateConversionResponse }; -export declare type RpcRequest = typeof MakeOfferRequest | typeof GetOffersRequest | typeof GetAddressBalanceRequest | typeof GetAddressDeltasRequest | typeof GetAddressMempoolRequest | typeof GetAddressUtxosRequest | typeof GetBlockRequest | typeof GetVdxfIdRequest | typeof GetInfoRequest | typeof GetIdentityRequest | typeof GetCurrencyRequest | typeof SendRawTransactionRequest | typeof GetRawTransactionRequest | typeof VerifyMessageRequest | typeof SignMessageRequest | typeof SendCurrencyRequest | typeof FundRawTransactionRequest | typeof GetCurrencyConvertersRequest | typeof ListCurrenciesRequest | typeof EstimateConversionRequest; -export declare type RpcResponse = typeof MakeOfferResponse | typeof GetOffersResponse | typeof GetAddressBalanceResponse | typeof GetAddressDeltasResponse | typeof GetAddressMempoolResponse | typeof GetAddressUtxosResponse | typeof GetBlockResponse | typeof GetVdxfIdResponse | typeof GetInfoResponse | typeof GetIdentityResponse | typeof GetCurrencyResponse | typeof SendRawTransactionResponse | typeof GetRawTransactionResponse | typeof VerifyMessageResponse | typeof SignMessageResponse | typeof SendCurrencyResponse | typeof FundRawTransactionResponse | typeof GetCurrencyConvertersResponse | typeof ListCurrenciesResponse | typeof EstimateConversionResponse; +export { GetAddressBalanceRequest, GetAddressBalanceResponse, GetAddressDeltasRequest, GetAddressDeltasResponse, GetAddressMempoolRequest, GetAddressMempoolResponse, GetAddressUtxosRequest, GetAddressUtxosResponse, GetBlockRequest, GetBlockResponse, GetVdxfIdRequest, GetVdxfIdResponse, GetIdentityRequest, GetIdentityResponse, GetCurrencyRequest, GetCurrencyResponse, GetOffersRequest, GetOffersResponse, GetRawTransactionRequest, GetRawTransactionResponse, MakeOfferRequest, MakeOfferResponse, SendRawTransactionRequest, SendRawTransactionResponse, GetInfoRequest, GetInfoResponse, VerifyMessageRequest, VerifyMessageResponse, SignMessageRequest, SignMessageResponse, SignDataRequest, SignDataResponse, SendCurrencyRequest, SendCurrencyResponse, FundRawTransactionRequest, FundRawTransactionResponse, GetCurrencyConvertersRequest, GetCurrencyConvertersResponse, ListCurrenciesRequest, ListCurrenciesResponse, EstimateConversionRequest, EstimateConversionResponse }; +export declare type RpcRequest = typeof MakeOfferRequest | typeof GetOffersRequest | typeof GetAddressBalanceRequest | typeof GetAddressDeltasRequest | typeof GetAddressMempoolRequest | typeof GetAddressUtxosRequest | typeof GetBlockRequest | typeof GetVdxfIdRequest | typeof GetInfoRequest | typeof GetIdentityRequest | typeof GetCurrencyRequest | typeof SendRawTransactionRequest | typeof GetRawTransactionRequest | typeof VerifyMessageRequest | typeof SignMessageRequest | typeof SignDataRequest | typeof SendCurrencyRequest | typeof FundRawTransactionRequest | typeof GetCurrencyConvertersRequest | typeof ListCurrenciesRequest | typeof EstimateConversionRequest; +export declare type RpcResponse = typeof MakeOfferResponse | typeof GetOffersResponse | typeof GetAddressBalanceResponse | typeof GetAddressDeltasResponse | typeof GetAddressMempoolResponse | typeof GetAddressUtxosResponse | typeof GetBlockResponse | typeof GetVdxfIdResponse | typeof GetInfoResponse | typeof GetIdentityResponse | typeof GetCurrencyResponse | typeof SendRawTransactionResponse | typeof GetRawTransactionResponse | typeof VerifyMessageResponse | typeof SignMessageResponse | typeof SignDataResponse | typeof SendCurrencyResponse | typeof FundRawTransactionResponse | typeof GetCurrencyConvertersResponse | typeof ListCurrenciesResponse | typeof EstimateConversionResponse; diff --git a/dist/api/classes/index.js b/dist/api/classes/index.js index 5870c65..57663ac 100644 --- a/dist/api/classes/index.js +++ b/dist/api/classes/index.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.EstimateConversionResponse = exports.EstimateConversionRequest = exports.ListCurrenciesResponse = exports.ListCurrenciesRequest = exports.GetCurrencyConvertersResponse = exports.GetCurrencyConvertersRequest = exports.FundRawTransactionResponse = exports.FundRawTransactionRequest = exports.SendCurrencyResponse = exports.SendCurrencyRequest = exports.SignMessageResponse = exports.SignMessageRequest = exports.VerifyMessageResponse = exports.VerifyMessageRequest = exports.GetInfoResponse = exports.GetInfoRequest = exports.SendRawTransactionResponse = exports.SendRawTransactionRequest = exports.MakeOfferResponse = exports.MakeOfferRequest = exports.GetRawTransactionResponse = exports.GetRawTransactionRequest = exports.GetOffersResponse = exports.GetOffersRequest = exports.GetCurrencyResponse = exports.GetCurrencyRequest = exports.GetIdentityResponse = exports.GetIdentityRequest = exports.GetVdxfIdResponse = exports.GetVdxfIdRequest = exports.GetBlockResponse = exports.GetBlockRequest = exports.GetAddressUtxosResponse = exports.GetAddressUtxosRequest = exports.GetAddressMempoolResponse = exports.GetAddressMempoolRequest = exports.GetAddressDeltasResponse = exports.GetAddressDeltasRequest = exports.GetAddressBalanceResponse = exports.GetAddressBalanceRequest = void 0; +exports.EstimateConversionResponse = exports.EstimateConversionRequest = exports.ListCurrenciesResponse = exports.ListCurrenciesRequest = exports.GetCurrencyConvertersResponse = exports.GetCurrencyConvertersRequest = exports.FundRawTransactionResponse = exports.FundRawTransactionRequest = exports.SendCurrencyResponse = exports.SendCurrencyRequest = exports.SignDataResponse = exports.SignDataRequest = exports.SignMessageResponse = exports.SignMessageRequest = exports.VerifyMessageResponse = exports.VerifyMessageRequest = exports.GetInfoResponse = exports.GetInfoRequest = exports.SendRawTransactionResponse = exports.SendRawTransactionRequest = exports.MakeOfferResponse = exports.MakeOfferRequest = exports.GetRawTransactionResponse = exports.GetRawTransactionRequest = exports.GetOffersResponse = exports.GetOffersRequest = exports.GetCurrencyResponse = exports.GetCurrencyRequest = exports.GetIdentityResponse = exports.GetIdentityRequest = exports.GetVdxfIdResponse = exports.GetVdxfIdRequest = exports.GetBlockResponse = exports.GetBlockRequest = exports.GetAddressUtxosResponse = exports.GetAddressUtxosRequest = exports.GetAddressMempoolResponse = exports.GetAddressMempoolRequest = exports.GetAddressDeltasResponse = exports.GetAddressDeltasRequest = exports.GetAddressBalanceResponse = exports.GetAddressBalanceRequest = void 0; const GetAddressBalanceRequest_1 = require("./GetAddressBalance/GetAddressBalanceRequest"); Object.defineProperty(exports, "GetAddressBalanceRequest", { enumerable: true, get: function () { return GetAddressBalanceRequest_1.GetAddressBalanceRequest; } }); const GetAddressBalanceResponse_1 = require("./GetAddressBalance/GetAddressBalanceResponse"); @@ -53,6 +53,10 @@ const SignMessageRequest_1 = require("./SignMessage/SignMessageRequest"); Object.defineProperty(exports, "SignMessageRequest", { enumerable: true, get: function () { return SignMessageRequest_1.SignMessageRequest; } }); const SignMessageResponse_1 = require("./SignMessage/SignMessageResponse"); Object.defineProperty(exports, "SignMessageResponse", { enumerable: true, get: function () { return SignMessageResponse_1.SignMessageResponse; } }); +const SignDataRequest_1 = require("./SignData/SignDataRequest"); +Object.defineProperty(exports, "SignDataRequest", { enumerable: true, get: function () { return SignDataRequest_1.SignDataRequest; } }); +const SignDataResponse_1 = require("./SignData/SignDataResponse"); +Object.defineProperty(exports, "SignDataResponse", { enumerable: true, get: function () { return SignDataResponse_1.SignDataResponse; } }); const VerifyMessageRequest_1 = require("./VerifyMessage/VerifyMessageRequest"); Object.defineProperty(exports, "VerifyMessageRequest", { enumerable: true, get: function () { return VerifyMessageRequest_1.VerifyMessageRequest; } }); const VerifyMessageResponse_1 = require("./VerifyMessage/VerifyMessageResponse"); diff --git a/dist/constants/cmds.d.ts b/dist/constants/cmds.d.ts index 9611748..eed45ce 100644 --- a/dist/constants/cmds.d.ts +++ b/dist/constants/cmds.d.ts @@ -12,6 +12,7 @@ export declare const GET_ADDRESS_MEMPOOL = "getaddressmempool"; export declare const SEND_RAW_TRANSACTION = "sendrawtransaction"; export declare const GET_ADDRESS_UTXOS = "getaddressutxos"; export declare const SIGN_MESSAGE = "signmessage"; +export declare const SIGN_DATA = "signdata"; export declare const VERIFY_MESSAGE = "verifymessage"; export declare const FUND_RAW_TRANSACTION = "fundrawtransaction"; export declare const SEND_CURRENCY = "sendcurrency"; diff --git a/dist/constants/cmds.js b/dist/constants/cmds.js index a3d18c8..052e20b 100644 --- a/dist/constants/cmds.js +++ b/dist/constants/cmds.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.ESTIMATE_CONVERSION = exports.LIST_CURRENCIES = exports.GET_CURRENCY_CONVERTERS = exports.SEND_CURRENCY = exports.FUND_RAW_TRANSACTION = exports.VERIFY_MESSAGE = exports.SIGN_MESSAGE = exports.GET_ADDRESS_UTXOS = exports.SEND_RAW_TRANSACTION = exports.GET_ADDRESS_MEMPOOL = exports.GET_ADDRESS_DELTAS = exports.GET_RAW_TRANSACTION = exports.GET_VDXF_ID = exports.GET_BLOCK = exports.GET_INFO = exports.GET_ADDRESS_BALANCE = exports.GET_CURRENCY = exports.GET_IDENTITY = exports.GET_OFFERS = exports.MAKE_OFFER = void 0; +exports.ESTIMATE_CONVERSION = exports.LIST_CURRENCIES = exports.GET_CURRENCY_CONVERTERS = exports.SEND_CURRENCY = exports.FUND_RAW_TRANSACTION = exports.VERIFY_MESSAGE = exports.SIGN_DATA = exports.SIGN_MESSAGE = exports.GET_ADDRESS_UTXOS = exports.SEND_RAW_TRANSACTION = exports.GET_ADDRESS_MEMPOOL = exports.GET_ADDRESS_DELTAS = exports.GET_RAW_TRANSACTION = exports.GET_VDXF_ID = exports.GET_BLOCK = exports.GET_INFO = exports.GET_ADDRESS_BALANCE = exports.GET_CURRENCY = exports.GET_IDENTITY = exports.GET_OFFERS = exports.MAKE_OFFER = void 0; exports.MAKE_OFFER = 'makeoffer'; exports.GET_OFFERS = 'getoffers'; exports.GET_IDENTITY = 'getidentity'; @@ -15,6 +15,7 @@ exports.GET_ADDRESS_MEMPOOL = 'getaddressmempool'; exports.SEND_RAW_TRANSACTION = 'sendrawtransaction'; exports.GET_ADDRESS_UTXOS = 'getaddressutxos'; exports.SIGN_MESSAGE = 'signmessage'; +exports.SIGN_DATA = 'signdata'; exports.VERIFY_MESSAGE = 'verifymessage'; exports.FUND_RAW_TRANSACTION = 'fundrawtransaction'; exports.SEND_CURRENCY = 'sendcurrency'; diff --git a/dist/utils/IdentityData.d.ts b/dist/utils/IdentityData.d.ts new file mode 100644 index 0000000..5b80453 --- /dev/null +++ b/dist/utils/IdentityData.d.ts @@ -0,0 +1,12 @@ +import * as keylist from '../vdxf/keys'; +export declare const friendlyName: (vdxfkey: any) => string; +export declare const getIdentityDataType: (vdxfkey: any) => string | keylist.VDXFKeyInterface; +export declare const IdentityVdxfidMap: { + [x: string]: { + name: string; + type: keylist.VDXFKeyInterface; + } | { + name: string; + type: string; + }; +}; diff --git a/dist/utils/IdentityData.js b/dist/utils/IdentityData.js new file mode 100644 index 0000000..08e984d --- /dev/null +++ b/dist/utils/IdentityData.js @@ -0,0 +1,169 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.IdentityVdxfidMap = exports.getIdentityDataType = exports.friendlyName = void 0; +const identitykeys = require("../vdxf/identityDataKeys"); +const keylist = require("../vdxf/keys"); +const VDXF_Data = require("../vdxf/vdxfDataKeys"); +const friendlyName = (vdxfkey) => { + if (vdxfkey in exports.IdentityVdxfidMap) { + return exports.IdentityVdxfidMap[vdxfkey].name; + } + else { + throw new Error("Unknown VDXF key"); + } +}; +exports.friendlyName = friendlyName; +const getIdentityDataType = (vdxfkey) => { + if (vdxfkey in exports.IdentityVdxfidMap) { + return exports.IdentityVdxfidMap[vdxfkey].type; + } + else { + throw new Error("Unknown VDXF key"); + } +}; +exports.getIdentityDataType = getIdentityDataType; +exports.IdentityVdxfidMap = { + [identitykeys.IDENTITY_FIRSTNAME.vdxfid]: { name: "First Name", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_LASTNAME.vdxfid]: { name: "Last Name", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_NATIONALITY.vdxfid]: { name: "Nationality", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_ATTESTOR.vdxfid]: { name: "Attestor ID", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_ATTESTATION_RECIPIENT.vdxfid]: { name: "Attestation Recipient", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_PHONENUMBER.vdxfid]: { name: "Phone Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_OVER18.vdxfid]: { name: "Over 18", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITY_OVER21.vdxfid]: { name: "Over 21", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITY_OVER25.vdxfid]: { name: "Over 25", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITY_EMAIL.vdxfid]: { name: "Email Address", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_HOMEADDRESS.vdxfid]: { name: "Home address", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITY_HOMEADDRESS_STREET1.vdxfid]: { name: "Street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_HOMEADDRESS_STREET2.vdxfid]: { name: "Street 2", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_HOMEADDRESS_CITY.vdxfid]: { name: "City", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_HOMEADDRESS_REGION.vdxfid]: { name: "Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_HOMEADDRESS_POSTCODE.vdxfid]: { name: "Post Code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_HOMEADDRESS_COUNTRY.vdxfid]: { name: "Country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_IDNUMBER_VALUE.vdxfid]: { name: "ID Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_IDNUMBER_TYPE.vdxfid]: { name: "ID Type", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_VERIFICATION_STATUS.vdxfid]: { name: "Verification Status", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_ACCEPTEDTOS.vdxfid]: { name: "Accepted Terms and Conditions", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_VERIFIEDSMS.vdxfid]: { name: "SMS Verified", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_KYCCHECKED.vdxfid]: { name: "KYC Checked ok", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_DOCUMENTSVERIFIED.vdxfid]: { name: "Documents Verified", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_SELFIECHECKED.vdxfid]: { name: "Selfie Checked", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_WATCHLISTOK.vdxfid]: { name: "Watchlist ok", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Riskcheck ok", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITY_DRIVINGLICENCE.vdxfid]: { name: "Driving Licence", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ORIGINALFRONT.vdxfid]: { name: "Driving Licence Front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ORIGINALBACK.vdxfid]: { name: "Driving Licence Back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_CROPPEDFRONT.vdxfid]: { name: "Driving Licence Front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_CROPPEDBACK.vdxfid]: { name: "Driving Licence Back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_FACE.vdxfid]: { name: "Driving Licence Face", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_IDNUMBER.vdxfid]: { name: "Driving Licence Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_CATEGORY.vdxfid]: { name: "Driving Licence Catagory", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_EXPIRATIONDATE.vdxfid]: { name: "Driving Licence expiry date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ISSUINGCOUNTRY.vdxfid]: { name: "Driving Licence issuing country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ISSUINGREGION.vdxfid]: { name: "Driving Licence issuing region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_DATEOFBIRTH.vdxfid]: { name: "Driving Licence Date of Birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_STREET1.vdxfid]: { name: "Driving Licence Street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_CITY.vdxfid]: { name: "Driving Licence City", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_REGION.vdxfid]: { name: "Driving Licence Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_POSTCODE.vdxfid]: { name: "Driving Licence ZIP/Post Code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_COUNTRY.vdxfid]: { name: "Driving Licence Country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_SELFIECHECK_IMAGE.vdxfid]: { name: "Selfie Check image", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_SELFIECHECK_VIDEO.vdxfid]: { name: "Selfie Check video", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Risk Check Ok", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_EMAIL_ISDELIVERABLE.vdxfid]: { name: "Email address is deliverable", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITY_EMAIL_BREACHCOUNT.vdxfid]: { name: "Email breach count", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_EMAIL_FIRSTBREACHEDAT.vdxfid]: { name: "Email first breach date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_EMAIL_LASTBREACHEDAT.vdxfid]: { name: "Email last breach date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_EMAIL_DOMAIN_REGISTEREDAT.vdxfid]: { name: "Email domain registered at", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_EMAIL_DOMAIN_FREEPROVIDER.vdxfid]: { name: "Email is free provider", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_EMAIL_DOMAIN_CUSTOM.vdxfid]: { name: "Email Domain is custom", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_EMAIL_DOMAIN_DISPOSABLE.vdxfid]: { name: "Email Domain Disposable", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS.vdxfid]: { name: "Email top level Domain Suspicious", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_IDCARD.vdxfid]: { name: "ID Card", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITY_IDCARD_ORIGINALFRONT.vdxfid]: { name: "ID Card Front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_IDCARD_ORIGINALBACK.vdxfid]: { name: "ID Card Back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_IDCARD_CROPPEDFRONT.vdxfid]: { name: "ID Card Front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_IDCARD_CROPPEDBACK.vdxfid]: { name: "ID Card Back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_IDCARD_FACE.vdxfid]: { name: "ID Card Face", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_IDCARD_IDNUMBER.vdxfid]: { name: "ID Card ID Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_IDCARD_CATEGORY.vdxfid]: { name: "ID Card Category", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_IDCARD_EXPIRATIONDATE.vdxfid]: { name: "ID Card Expiry date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_IDCARD_ISSUINGREGION.vdxfid]: { name: "ID Card Issuing Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_IDCARD_DATEOFBIRTH.vdxfid]: { name: "ID Card Date of Birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_IDCARD_ADDRESS_STREET1.vdxfid]: { name: "ID Card Street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_IDCARD_ADDRESS_CITY.vdxfid]: { name: "ID Card City", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_IDCARD_ADDRESS_REGION.vdxfid]: { name: "ID Card Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_IDCARD_ADDRESS_POSTCODE.vdxfid]: { name: "ID Card Zip/Post Code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_IDCARD_ADDRESS_COUNTRY.vdxfid]: { name: "ID Card Country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_PASSPORT.vdxfid]: { name: "Passport", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITY_PASSPORT_ORIGINALFRONT.vdxfid]: { name: "Passport front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_PASSPORT_ORIGINALBACK.vdxfid]: { name: "Passport back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_PASSPORT_CROPPEDFRONT.vdxfid]: { name: "Passport front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_PASSPORT_CROPPEDBACK.vdxfid]: { name: "Passport back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_PASSPORT_FACE.vdxfid]: { name: "Passport face", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_PASSPORT_IDNUMBER.vdxfid]: { name: "Passport ID Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_PASSPORT_CATEGORY.vdxfid]: { name: "Passport Category", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_PASSPORT_EXPIRATIONDATE.vdxfid]: { name: "Passport expiry date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_PASSPORT_DATEOFBIRTH.vdxfid]: { name: "Passport date of birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_STREET1.vdxfid]: { name: "Passport street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_CITY.vdxfid]: { name: "Passport city", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_REGION.vdxfid]: { name: "Passport region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_POSTCODE.vdxfid]: { name: "Passport zip/post code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_COUNTRY.vdxfid]: { name: "Passport country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT.vdxfid]: { name: "Residence Permit", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ORIGINALFRONT.vdxfid]: { name: "Residence Permit front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ORIGINALBACK.vdxfid]: { name: "Residence Permit back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_CROPPEDFRONT.vdxfid]: { name: "Residence Permit front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_CROPPEDBACK.vdxfid]: { name: "Residence Permit back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_FACE.vdxfid]: { name: "Residence Permit face", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_IDNUMBER.vdxfid]: { name: "Residence Permit ID Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_CATEGORY.vdxfid]: { name: "Residence Permit category", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_EXPIRATIONDATE.vdxfid]: { name: "Residence Permit expiry date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ISSUINGREGION.vdxfid]: { name: "Residence Permit issuing region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_DATEOFBIRTH.vdxfid]: { name: "Residence Permit date of birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS.vdxfid]: { name: "Residence Permit Address", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_STREET1.vdxfid]: { name: "Residence Permit Street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_CITY.vdxfid]: { name: "Residence Permit City", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_REGION.vdxfid]: { name: "Residence Permit Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_POSTCODE.vdxfid]: { name: "Residence Permit Zip/Post code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_COUNTRY.vdxfid]: { name: "Residence Permit Country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENTCARD.vdxfid]: { name: "Resident Card", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITY_RESIDENTCARD_ORIGINALFRONT.vdxfid]: { name: "Resident Card Front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_RESIDENTCARD_ORIGINALBACK.vdxfid]: { name: "Resident Card Back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_RESIDENTCARD_CROPPEDFRONT.vdxfid]: { name: "Resident Card Front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_RESIDENTCARD_CROPPEDBACK.vdxfid]: { name: "Resident Card Back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_RESIDENTCARD_FACE.vdxfid]: { name: "Resident Card Face", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_RESIDENTCARD_IDNUMBER.vdxfid]: { name: "Resident Card ID Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENTCARD_CATEGORY.vdxfid]: { name: "Resident Card Category", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENTCARD_EXPIRATIONDATE.vdxfid]: { name: "Resident Card Expiry Date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENTCARD_ISSUINGREGION.vdxfid]: { name: "Resident Card Issuing Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENTCARD_DATEOFBIRTH.vdxfid]: { name: "Resident Card date of birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_STREET1.vdxfid]: { name: "Resident Card Street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_CITY.vdxfid]: { name: "Resident Card City", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_REGION.vdxfid]: { name: "Resident Card Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_POSTCODE.vdxfid]: { name: "Resident Card Zip/Post Code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_COUNTRY.vdxfid]: { name: "Resident Card Country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_VISA.vdxfid]: { name: "Visa", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITY_VISA_ORIGINALFRONT.vdxfid]: { name: "Visa front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_VISA_ORIGINALBACK.vdxfid]: { name: "Visa back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_VISA_CROPPEDFRONT.vdxfid]: { name: "Visa front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_VISA_CROPPEDBACK.vdxfid]: { name: "Visa back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_VISA_FACE.vdxfid]: { name: "Visa face", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_VISA_IDNUMBER.vdxfid]: { name: "Visa ID Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_VISA_CATEGORY.vdxfid]: { name: "Visa Category", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_VISA_EXPIRATIONDATE.vdxfid]: { name: "Visa expiry date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_VISA_ISSUINGREGION.vdxfid]: { name: "Visa issuing region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_VISA_DATEOFBIRTH.vdxfid]: { name: "Visa date of birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_VISA_ADDRESS_STREET1.vdxfid]: { name: "Visa Street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_VISA_ADDRESS_CITY.vdxfid]: { name: "Visa City", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_VISA_ADDRESS_REGION.vdxfid]: { name: "Visa Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_VISA_ADDRESS_POSTCODE.vdxfid]: { name: "Visa Zip/Post Code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_VISA_ADDRESS_COUNTRY.vdxfid]: { name: "Visa Country", type: VDXF_Data.DataStringKey() }, + [keylist.ATTESTATION_PROVISION_TYPE.vdxfid]: { name: "Attestation Type", type: VDXF_Data.DataStringKey() }, + [keylist.ATTESTATION_PROVISION_URL.vdxfid]: { name: "Attestation URL", type: VDXF_Data.DataURLKeyName() }, + [keylist.ATTESTATION_VIEW_RESPONSE.vdxfid]: { name: "Attestation View Response", type: VDXF_Data.DataStringKey() }, + [keylist.ATTESTATION_VIEW_REQUEST.vdxfid]: { name: "Attestation View Response", type: VDXF_Data.DataStringKey() }, + [keylist.PROFILE_DATA_VIEW_REQUEST.vdxfid]: { name: "Profile Data View Request", type: VDXF_Data.DataStringKey() }, + [keylist.IDENTITY_SIGNDATA_REQUEST.vdxfid]: { name: "Identity Sign Data Request", type: VDXF_Data.DataStringKey() }, +}; diff --git a/dist/utils/types/DataDescriptor.d.ts b/dist/utils/types/DataDescriptor.d.ts new file mode 100644 index 0000000..bf8cf61 --- /dev/null +++ b/dist/utils/types/DataDescriptor.d.ts @@ -0,0 +1,11 @@ +export declare type DataDescriptor = { + version?: number; + flags?: number; + objectdata?: string; + label?: string; + mimeType?: string; + salt?: string; + epk?: string; + ivk?: string; + ssk?: string; +}; diff --git a/dist/utils/types/DataDescriptor.js b/dist/utils/types/DataDescriptor.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/dist/utils/types/DataDescriptor.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/utils/types/MmrDescriptor.d.ts b/dist/utils/types/MmrDescriptor.d.ts new file mode 100644 index 0000000..d203e65 --- /dev/null +++ b/dist/utils/types/MmrDescriptor.d.ts @@ -0,0 +1,9 @@ +import { DataDescriptor } from './DataDescriptor'; +export declare type mmrDescriptorParameters = { + version?: number; + objecthashtype?: number; + mmrhashtype?: number; + mmrroot?: DataDescriptor; + mmrhashes?: DataDescriptor; + datadescriptors?: DataDescriptor[]; +}; diff --git a/dist/utils/types/MmrDescriptor.js b/dist/utils/types/MmrDescriptor.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/dist/utils/types/MmrDescriptor.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/utils/types/SignData.d.ts b/dist/utils/types/SignData.d.ts new file mode 100644 index 0000000..baad806 --- /dev/null +++ b/dist/utils/types/SignData.d.ts @@ -0,0 +1,8 @@ +export declare type SignData = { + filename?: string; + message?: string; + messagehex?: string; + messsagebase64?: string; + datahash?: string; + vdxfdata?: string; +}; diff --git a/dist/utils/types/SignData.js b/dist/utils/types/SignData.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/dist/utils/types/SignData.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/utils/types/Signature.d.ts b/dist/utils/types/Signature.d.ts new file mode 100644 index 0000000..064895a --- /dev/null +++ b/dist/utils/types/Signature.d.ts @@ -0,0 +1,9 @@ +export declare type Signature = { + version: number; + systemid: string; + hashtype: number; + signaturehash: string; + identityid: string; + signaturetype: number; + signature: string; +}; diff --git a/dist/utils/types/Signature.js b/dist/utils/types/Signature.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/dist/utils/types/Signature.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/vdxf/classes/Challenge.d.ts b/dist/vdxf/classes/Challenge.d.ts index cff30a8..7b295b0 100644 --- a/dist/vdxf/classes/Challenge.d.ts +++ b/dist/vdxf/classes/Challenge.d.ts @@ -77,4 +77,5 @@ export declare class Challenge extends VDXFObject implements ChallengeInterface }; } export declare class RequestedPermission extends Utf8DataVdxfObject { + constructor(vdxfkey?: string, data?: string); } diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index 11b311f..b3f94ff 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -63,7 +63,7 @@ class Challenge extends __1.VDXFObject { constructor(challenge = { challenge_id: "", created_at: 0 }, vdxfkey = __1.LOGIN_CONSENT_CHALLENGE_VDXF_KEY.vdxfid) { super(vdxfkey); this.challenge_id = challenge.challenge_id; - this.requested_access = challenge.requested_access ? challenge.requested_access.map((x) => new RequestedPermission(x.data, x.vdxfkey)) : challenge.requested_access; + this.requested_access = challenge.requested_access ? challenge.requested_access.map((x) => new RequestedPermission(x.vdxfkey, x.data)) : challenge.requested_access; this.requested_access_audience = challenge.requested_access_audience; this.subject = challenge.subject ? challenge.subject.map((x) => new Subject(x.data, x.vdxfkey)) @@ -187,7 +187,7 @@ class Challenge extends __1.VDXFObject { const requestedAccessLength = reader.readCompactSize(); for (let i = 0; i < requestedAccessLength; i++) { const _vdxfkey = (0, address_1.toBase58Check)(reader.buffer.slice(reader.offset, reader.offset + vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION); - const _perm = new RequestedPermission("", _vdxfkey); + const _perm = new RequestedPermission(_vdxfkey); reader.offset = _perm.fromBuffer(reader.buffer, reader.offset); this.requested_access.push(_perm); } @@ -259,5 +259,8 @@ class Challenge extends __1.VDXFObject { } exports.Challenge = Challenge; class RequestedPermission extends __1.Utf8DataVdxfObject { + constructor(vdxfkey = "", data = "") { + super(data, vdxfkey); + } } exports.RequestedPermission = RequestedPermission; diff --git a/dist/vdxf/classes/PersonalProfile.d.ts b/dist/vdxf/classes/PersonalProfile.d.ts index ca0e590..6b99a84 100644 --- a/dist/vdxf/classes/PersonalProfile.d.ts +++ b/dist/vdxf/classes/PersonalProfile.d.ts @@ -5,4 +5,3 @@ export declare class DataCategory extends VDXFObject { details: string; constructor(vdxfid?: string, data?: Array, category?: string, details?: string); } -export declare const defaultPersonalProfileDataTemplate: DataCategory[]; diff --git a/dist/vdxf/classes/PersonalProfile.js b/dist/vdxf/classes/PersonalProfile.js index 6cf991f..1deec6a 100644 --- a/dist/vdxf/classes/PersonalProfile.js +++ b/dist/vdxf/classes/PersonalProfile.js @@ -1,8 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.defaultPersonalProfileDataTemplate = exports.DataCategory = void 0; +exports.DataCategory = void 0; const __1 = require(".."); -const identitykeys = require("../identityDataKeys"); class DataCategory extends __1.VDXFObject { constructor(vdxfid = "", data, category, details) { super(vdxfid); @@ -12,50 +11,3 @@ class DataCategory extends __1.VDXFObject { } } exports.DataCategory = DataCategory; -exports.defaultPersonalProfileDataTemplate = [ - new DataCategory(identitykeys.IDENTITYDATA_PERSONAL_DETAILS.vdxfid, [ - identitykeys.IDENTITYDATA_FIRSTNAME.vdxfid, - identitykeys.IDENTITYDATA_LASTNAME.vdxfid, - identitykeys.IDENTITYDATA_MIDDLENAME.vdxfid, - identitykeys.IDENTITYDATA_DATEOFBIRTH.vdxfid, - identitykeys.IDENTITYDATA_NATIONALITY.vdxfid - ], "Personal Details", "Name, birthday, nationality"), - new DataCategory(identitykeys.IDENTITYDATA_CONTACT.vdxfid, [ - identitykeys.IDENTITYDATA_EMAIL.vdxfid, - identitykeys.IDENTITYDATA_PHONENUMBER.vdxfid - ], "Contact", "Email, phone number"), - new DataCategory(identitykeys.IDENTITYDATA_LOCATIONS.vdxfid, [ - identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1.vdxfid, - identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2.vdxfid, - identitykeys.IDENTITYDATA_HOMEADDRESS_CITY.vdxfid, - identitykeys.IDENTITYDATA_HOMEADDRESS_REGION.vdxfid, - identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE.vdxfid, - identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY.vdxfid, - ], "Locations", "Tax residency, home address"), - new DataCategory(identitykeys.IDENTITYDATA_BANKING_INFORMATION.vdxfid, [ - identitykeys.BANK_ACCOUNT.vdxfid, - identitykeys.BANK_ACCOUNT_CURRENCY.vdxfid, - identitykeys.BANK_ACCOUNT_COUNTRY.vdxfid, - identitykeys.BANK_ACCOUNT_STREET1.vdxfid, - identitykeys.BANK_ACCOUNT_STREET2.vdxfid, - identitykeys.BANK_ACCOUNT_CITY.vdxfid, - identitykeys.BANK_ACCOUNT_REGION.vdxfid, - identitykeys.BANK_ACCOUNT_POSTALCODE.vdxfid, - identitykeys.BANK_ACCOUNT_TAXNUMBER.vdxfid, - identitykeys.BANK_ACCOUNT_TAXCOUNTRY.vdxfid, - identitykeys.BANK_ACCOUNT_FIRSTNAME.vdxfid, - identitykeys.BANK_ACCOUNT_LASTNAME.vdxfid, - identitykeys.BANK_ACCOUNT_PHONENUMBER.vdxfid, - identitykeys.BANK_ACCOUNT_NUMBER.vdxfid, - identitykeys.BANK_ACCOUNT_TYPE.vdxfid - ], "Banking Information", "Bank accounts"), - new DataCategory(identitykeys.IDENTITYDATA_DOCUMENTS_AND_IMAGES.vdxfid, [ - identitykeys.IDENTITYDATA_PASSPORT.vdxfid, - identitykeys.IDENTITYDATA_DRIVINGLICENCE.vdxfid, - identitykeys.IDENTITYDATA_RESIDENCEPERMIT.vdxfid, - identitykeys.IDENTITYDATA_RESIDENTCARD.vdxfid, - identitykeys.IDENTITYDATA_VISA.vdxfid, - identitykeys.IDENTITYDATA_IDCARD.vdxfid, - identitykeys.IDENTITYDATA_SELFIECHECK_IMAGE.vdxfid, - ], "Documents", "Passport, ID, driving license"), -]; diff --git a/dist/vdxf/classes/SaltedData.d.ts b/dist/vdxf/classes/SaltedData.d.ts new file mode 100644 index 0000000..01bd8c5 --- /dev/null +++ b/dist/vdxf/classes/SaltedData.d.ts @@ -0,0 +1,17 @@ +/// +/// +import { VDXFData } from '../../'; +export declare class SaltedData extends VDXFData { + salt: Buffer; + static VERSION_INVALID: import("bn.js"); + static FIRST_VERSION: import("bn.js"); + static LAST_VERSION: import("bn.js"); + static DEFAULT_VERSION: import("bn.js"); + constructor(data?: Buffer, salt?: Buffer); + static fromJson(data: any): SaltedData; + getByteLength(): number; + toBuffer(): Buffer; + fromBuffer(buffer: Buffer, offset?: number): number; + toJson(): any; + getHash(hw: (data: Buffer) => Buffer): Buffer; +} diff --git a/dist/vdxf/classes/SaltedData.js b/dist/vdxf/classes/SaltedData.js new file mode 100644 index 0000000..bba1dbd --- /dev/null +++ b/dist/vdxf/classes/SaltedData.js @@ -0,0 +1,81 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SaltedData = void 0; +const varint_1 = require("../../utils/varint"); +const varuint_1 = require("../../utils/varuint"); +const address_1 = require("../../utils/address"); +const bufferutils_1 = require("../../utils/bufferutils"); +const bn_js_1 = require("bn.js"); +const vdxf_1 = require("../../constants/vdxf"); +const __1 = require("../../"); +const { BufferReader, BufferWriter } = bufferutils_1.default; +const createHash = require("create-hash"); +const vdxfDataKeys_1 = require("../vdxfDataKeys"); +class SaltedData extends __1.VDXFData { + constructor(data, salt = Buffer.alloc(0)) { + super(data); + if (salt.length != 0) { + this.salt = salt; + } + this.vdxfkey = (0, vdxfDataKeys_1.SaltedDataKey)().vdxfid; + } + static fromJson(data) { + const saltedData = new SaltedData(); + if (data) { + if (data.version) { + saltedData.version = new bn_js_1.BN(data.version); + } + else { + saltedData.version = SaltedData.DEFAULT_VERSION; + } + if (data.salt) + saltedData.salt = Buffer.from(data.salt, 'hex'); + if (data.data) + saltedData.data = Buffer.from(data.data, 'hex'); + if (data.key) + saltedData.vdxfkey = data.key; + } + return saltedData; + } + getByteLength() { + let byteLength = 0; + byteLength += 20; //key + byteLength += varint_1.default.encodingLength(this.version); + byteLength += varuint_1.default.encodingLength(this.data.length + this.salt.length); + byteLength += this.data.length + this.salt.length; + return byteLength; + } + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())); + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.vdxfkey).hash); + bufferWriter.writeVarInt(this.version); + bufferWriter.writeVarSlice(Buffer.concat([this.data, this.salt])); + return bufferWriter.buffer; + } + fromBuffer(buffer, offset = 0) { + const reader = new BufferReader(buffer, offset); + this.vdxfkey = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + this.version = reader.readVarInt(); + this.data = reader.readVarSlice(); + this.salt = this.data.slice(this.data.length - 32); + this.data = this.data.slice(0, this.data.length - 32); + return reader.offset; + } + toJson() { + return { + version: this.version.toString(), + key: this.vdxfkey, + data: this.data.toString('hex'), + salt: this.salt.toString('hex') + }; + } + getHash(hw) { + const hash = hw(Buffer.concat([this.data, this.salt])); + return hash; + } +} +exports.SaltedData = SaltedData; +SaltedData.VERSION_INVALID = new bn_js_1.BN(0); +SaltedData.FIRST_VERSION = new bn_js_1.BN(1); +SaltedData.LAST_VERSION = new bn_js_1.BN(1); +SaltedData.DEFAULT_VERSION = new bn_js_1.BN(1); diff --git a/dist/vdxf/classes/index.d.ts b/dist/vdxf/classes/index.d.ts index cd0344a..f523463 100644 --- a/dist/vdxf/classes/index.d.ts +++ b/dist/vdxf/classes/index.d.ts @@ -25,4 +25,4 @@ export { RedirectUri, Subject, ProvisioningInfo, RequestedPermission, Audience, export { Attestation } from './Attestation'; export { ProvisioningTxid } from './provisioning/ProvisioningResult'; export { Context } from './Context'; -export { defaultPersonalProfileDataTemplate, DataCategory } from './PersonalProfile'; +export { DataCategory } from './PersonalProfile'; diff --git a/dist/vdxf/classes/index.js b/dist/vdxf/classes/index.js index 440bc48..39790ba 100644 --- a/dist/vdxf/classes/index.js +++ b/dist/vdxf/classes/index.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.DataCategory = exports.defaultPersonalProfileDataTemplate = exports.Context = exports.ProvisioningTxid = exports.Attestation = exports.AltAuthFactor = exports.Audience = exports.RequestedPermission = exports.ProvisioningInfo = exports.Subject = exports.RedirectUri = exports.Hash160 = exports.LoginConsentProvisioningResult = exports.LoginConsentProvisioningDecision = exports.LoginConsentProvisioningResponse = exports.LoginConsentProvisioningChallenge = exports.LoginConsentProvisioningRequest = exports.VerusPayInvoice = exports.VerusPayInvoiceDetails = exports.SignedSessionObjectData = exports.SignedSessionObject = exports.LoginConsentResponse = exports.LoginConsentRequest = exports.LoginConsentDecision = exports.LoginConsentChallenge = void 0; +exports.DataCategory = exports.Context = exports.ProvisioningTxid = exports.Attestation = exports.AltAuthFactor = exports.Audience = exports.RequestedPermission = exports.ProvisioningInfo = exports.Subject = exports.RedirectUri = exports.Hash160 = exports.LoginConsentProvisioningResult = exports.LoginConsentProvisioningDecision = exports.LoginConsentProvisioningResponse = exports.LoginConsentProvisioningChallenge = exports.LoginConsentProvisioningRequest = exports.VerusPayInvoice = exports.VerusPayInvoiceDetails = exports.SignedSessionObjectData = exports.SignedSessionObject = exports.LoginConsentResponse = exports.LoginConsentRequest = exports.LoginConsentDecision = exports.LoginConsentChallenge = void 0; var Challenge_1 = require("./Challenge"); Object.defineProperty(exports, "LoginConsentChallenge", { enumerable: true, get: function () { return Challenge_1.Challenge; } }); var Decision_1 = require("./Decision"); @@ -43,5 +43,4 @@ Object.defineProperty(exports, "ProvisioningTxid", { enumerable: true, get: func var Context_1 = require("./Context"); Object.defineProperty(exports, "Context", { enumerable: true, get: function () { return Context_1.Context; } }); var PersonalProfile_1 = require("./PersonalProfile"); -Object.defineProperty(exports, "defaultPersonalProfileDataTemplate", { enumerable: true, get: function () { return PersonalProfile_1.defaultPersonalProfileDataTemplate; } }); Object.defineProperty(exports, "DataCategory", { enumerable: true, get: function () { return PersonalProfile_1.DataCategory; } }); diff --git a/dist/vdxf/identityDataKeys.d.ts b/dist/vdxf/identityDataKeys.d.ts index cb93137..7c9f451 100644 --- a/dist/vdxf/identityDataKeys.d.ts +++ b/dist/vdxf/identityDataKeys.d.ts @@ -1,236 +1,184 @@ import { VDXFKeyInterface } from "./keys"; -export declare const IDENTITYDATA_ATTESTOR: VDXFKeyInterface; -export declare const IDENTITYDATA_IDENTITY: VDXFKeyInterface; -export declare const IDENTITYDATA_ID: VDXFKeyInterface; -export declare const IDENTITYDATA_USERID: VDXFKeyInterface; -export declare const IDENTITYDATA_CREATEDAT: VDXFKeyInterface; -export declare const IDENTITYDATA_COMPLETEDAT: VDXFKeyInterface; -export declare const IDENTITYDATA_PREVIOUSATTEMPTID: VDXFKeyInterface; -export declare const IDENTITYDATA_SHAREABLEURL: VDXFKeyInterface; -export declare const IDENTITYDATA_TEMPLATEID: VDXFKeyInterface; -export declare const IDENTITYDATA_TEMPLATEVERSION: VDXFKeyInterface; -export declare const IDENTITYDATA_PHONENUMBER: VDXFKeyInterface; -export declare const IDENTITYDATA_DATEOFBIRTH: VDXFKeyInterface; -export declare const IDENTITYDATA_OVER18: VDXFKeyInterface; -export declare const IDENTITYDATA_OVER21: VDXFKeyInterface; -export declare const IDENTITYDATA_OVER25: VDXFKeyInterface; -export declare const IDENTITYDATA_IPADDRESS: VDXFKeyInterface; -export declare const IDENTITYDATA_EMAIL: VDXFKeyInterface; -export declare const IDENTITYDATA_FIRSTNAME: VDXFKeyInterface; -export declare const IDENTITYDATA_MIDDLENAME: VDXFKeyInterface; -export declare const IDENTITYDATA_LASTNAME: VDXFKeyInterface; -export declare const IDENTITYDATA_HOMEADDRESS: VDXFKeyInterface; -export declare const IDENTITYDATA_HOMEADDRESS_STREET1: VDXFKeyInterface; -export declare const IDENTITYDATA_HOMEADDRESS_STREET2: VDXFKeyInterface; -export declare const IDENTITYDATA_HOMEADDRESS_CITY: VDXFKeyInterface; -export declare const IDENTITYDATA_HOMEADDRESS_REGION: VDXFKeyInterface; -export declare const IDENTITYDATA_HOMEADDRESS_POSTCODE: VDXFKeyInterface; -export declare const IDENTITYDATA_HOMEADDRESS_COUNTRY: VDXFKeyInterface; -export declare const IDENTITYDATA_IDNUMBER_VALUE: VDXFKeyInterface; -export declare const IDENTITYDATA_IDNUMBER_TYPE: VDXFKeyInterface; -export declare const IDENTITYDATA_STATUS: VDXFKeyInterface; -export declare const IDENTITYDATA_APPROVALS_ACCEPTEDTOS: VDXFKeyInterface; -export declare const IDENTITYDATA_APPROVALS_VERIFIEDSMS: VDXFKeyInterface; -export declare const IDENTITYDATA_APPROVALS_KYCCHECKED: VDXFKeyInterface; -export declare const IDENTITYDATA_APPROVALS_DOCUMENTSVERIFIED: VDXFKeyInterface; -export declare const IDENTITYDATA_APPROVALS_SELFIECHECKED: VDXFKeyInterface; -export declare const IDENTITYDATA_APPROVALS_WATCHLIST_OK: VDXFKeyInterface; -export declare const IDENTITYDATA_APPROVALS_RISKCHECKOK: VDXFKeyInterface; -export declare const IDENTITYDATA_DRIVINGLICENCE: VDXFKeyInterface; -export declare const IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_FRONT: VDXFKeyInterface; -export declare const IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_BACK: VDXFKeyInterface; -export declare const IDENTITYDATA_DRIVINGLICENCE_CROPPED_FRONT: VDXFKeyInterface; -export declare const IDENTITYDATA_DRIVINGLICENCE_CROPPED_BACK: VDXFKeyInterface; -export declare const IDENTITYDATA_DRIVINGLICENCE_FACE: VDXFKeyInterface; -export declare const IDENTITYDATA_DRIVINGLICENCE_IDNUMBER: VDXFKeyInterface; -export declare const IDENTITYDATA_DRIVINGLICENCE_CATEGORY: VDXFKeyInterface; -export declare const IDENTITYDATA_DRIVINGLICENCE_EXPIRATIONDATE: VDXFKeyInterface; -export declare const IDENTITYDATA_DRIVINGLICENCE_ISSUING_COUNTRY_MATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION: VDXFKeyInterface; -export declare const IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH: VDXFKeyInterface; -export declare const IDENTITYDATA_DRIVINGLICENCE_ADDRESS: VDXFKeyInterface; -export declare const IDENTITYDATA_DRIVINGLICENCE_STREET1: VDXFKeyInterface; -export declare const IDENTITYDATA_DRIVINGLICENCE_CITY: VDXFKeyInterface; -export declare const IDENTITYDATA_DRIVINGLICENCE_REGION: VDXFKeyInterface; -export declare const IDENTITYDATA_DRIVINGLICENCE_POSTCODE: VDXFKeyInterface; -export declare const IDENTITYDATA_DRIVINGLICENCE_COUNTRY: VDXFKeyInterface; -export declare const IDENTITYDATA_DRIVINGLICENCE_MATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_DRIVINGLICENCE_NAME_MATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH_MATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_SELFIECHECK_SUCCESS: VDXFKeyInterface; -export declare const IDENTITYDATA_SELFIECHECK_IMAGE: VDXFKeyInterface; -export declare const IDENTITYDATA_SELFIECHECK_VIDEO: VDXFKeyInterface; -export declare const IDENTITYDATA_SELFIECHECK_DRIVINGLICENCE_MATCH: VDXFKeyInterface; -export declare const IDENTITYDATA_KYC_SUCCESS: VDXFKeyInterface; -export declare const IDENTITYDATA_KYC_ADDRESS_MATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_KYC_TYPE: VDXFKeyInterface; -export declare const IDENTITYDATA_KYC_NAME_MATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_KYC_DATEOFBIRTH_MATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_KYC_IDNUMBER_MATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_KYC_PHONENUMBER_MATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_KYC_AREACODE_MATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_RISKCHECK_STATUS: VDXFKeyInterface; -export declare const IDENTITYDATA_RISKCHECK_USERINTERACTIONS: VDXFKeyInterface; -export declare const IDENTITYDATA_RISKCHECK_FRAUDRINGOK: VDXFKeyInterface; -export declare const IDENTITYDATA_RISKCHECK_BOTNOTDETECTED: VDXFKeyInterface; -export declare const IDENTITYDATA_EMAIL_ISDELIVERABLE: VDXFKeyInterface; -export declare const IDENTITYDATA_EMAIL_BREACHCOUNT: VDXFKeyInterface; -export declare const IDENTITYDATA_EMAIL_FIRSTBREACHEDAT: VDXFKeyInterface; -export declare const IDENTITYDATA_EMAIL_LASTBREACHEDAT: VDXFKeyInterface; -export declare const IDENTITYDATA_EMAIL_DOMAIN_REGISTEREDAT: VDXFKeyInterface; -export declare const IDENTITYDATA_EMAIL_DOMAIN_FREEPROVIDER: VDXFKeyInterface; -export declare const IDENTITYDATA_EMAIL_DOMAIN_CUSTOM: VDXFKeyInterface; -export declare const IDENTITYDATA_EMAIL_DOMAIN_DISPOSABLE: VDXFKeyInterface; -export declare const IDENTITYDATA_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS: VDXFKeyInterface; -export declare const IDENTITYDATA_IDCARD: VDXFKeyInterface; -export declare const IDENTITYDATA_IDCARD_ORIGINAL_FRONT: VDXFKeyInterface; -export declare const IDENTITYDATA_IDCARD_ORIGINAL_BACK: VDXFKeyInterface; -export declare const IDENTITYDATA_IDCARD_CROPPED_FRONT: VDXFKeyInterface; -export declare const IDENTITYDATA_IDCARD_CROPPED_BACK: VDXFKeyInterface; -export declare const IDENTITYDATA_IDCARD_FACE: VDXFKeyInterface; -export declare const IDENTITYDATA_IDCARD_IDNUMBER: VDXFKeyInterface; -export declare const IDENTITYDATA_IDCARD_CATEGORY: VDXFKeyInterface; -export declare const IDENTITYDATA_IDCARD_EXPIRATIONDATE: VDXFKeyInterface; -export declare const IDENTITYDATA_IDCARD_ISSUING_COUNTRY_MATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_IDCARD_ISSUING_REGION: VDXFKeyInterface; -export declare const IDENTITYDATA_IDCARD_DATEOFBIRTH: VDXFKeyInterface; -export declare const IDENTITYDATA_IDCARD_ADDRESS: VDXFKeyInterface; -export declare const IDENTITYDATA_IDCARD_ADDRESS_STREET1: VDXFKeyInterface; -export declare const IDENTITYDATA_IDCARD_ADDRESS_CITY: VDXFKeyInterface; -export declare const IDENTITYDATA_IDCARD_ADDRESS_REGION: VDXFKeyInterface; -export declare const IDENTITYDATA_IDCARD_ADDRESS_POSTCODE: VDXFKeyInterface; -export declare const IDENTITYDATA_IDCARD_ADDRESS_COUNTRY: VDXFKeyInterface; -export declare const IDENTITYDATA_IDCARD_DOCUMENTVERIFICATION_MATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_IDCARD_NAME_MATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_IDCARD_DATEOFBIRTHMATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_PASSPORT: VDXFKeyInterface; -export declare const IDENTITYDATA_PASSPORT_ORIGINAL_FRONT: VDXFKeyInterface; -export declare const IDENTITYDATA_PASSPORT_ORIGINAL_BACK: VDXFKeyInterface; -export declare const IDENTITYDATA_PASSPORT_CROPPED_FRONT: VDXFKeyInterface; -export declare const IDENTITYDATA_PASSPORT_CROPPED_BACK: VDXFKeyInterface; -export declare const IDENTITYDATA_PASSPORT_FACE: VDXFKeyInterface; -export declare const IDENTITYDATA_PASSPORT_IDNUMBER: VDXFKeyInterface; -export declare const IDENTITYDATA_PASSPORT_CATEGORY: VDXFKeyInterface; -export declare const IDENTITYDATA_PASSPORT_EXPIRATIONDATE: VDXFKeyInterface; -export declare const IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_PASSPORT_ISSUING_REGION: VDXFKeyInterface; -export declare const IDENTITYDATA_PASSPORT_DATEOFBIRTH: VDXFKeyInterface; -export declare const IDENTITYDATA_PASSPORT_ADDRESS: VDXFKeyInterface; -export declare const IDENTITYDATA_PASSPORT_ADDRESS_STREET1: VDXFKeyInterface; -export declare const IDENTITYDATA_PASSPORT_ADDRESS_CITY: VDXFKeyInterface; -export declare const IDENTITYDATA_PASSPORT_ADDRESS_REGION: VDXFKeyInterface; -export declare const IDENTITYDATA_PASSPORT_ADDRESS_POSTCODE: VDXFKeyInterface; -export declare const IDENTITYDATA_PASSPORT_ADDRESS_COUNTRY: VDXFKeyInterface; -export declare const IDENTITYDATA_PASSPORT_DOCUMENTVERIFICATION_MATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_PASSPORT_NAME_MATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_PASSPORT_DATEOFBIRTHMATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENCEPERMIT: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_FRONT: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_BACK: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENCEPERMIT_CROPPED_FRONT: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENCEPERMIT_CROPPED_BACK: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENCEPERMIT_FACE: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENCEPERMIT_IDNUMBER: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENCEPERMIT_CATEGORY: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENCEPERMIT_EXPIRATIONDATE: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENCEPERMIT_ISSUING_REGION: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTH: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENCEPERMIT_ADDRESS: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_STREET1: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_CITY: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_REGION: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_POSTCODE: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_COUNTRY: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENCEPERMIT_DOCUMENTVERIFICATION_MATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENCEPERMIT_NAME_MATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTHMATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENTCARD: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENTCARD_ORIGINAL_FRONT: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENTCARD_ORIGINAL_BACK: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENTCARD_CROPPED_FRONT: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENTCARD_CROPPED_BACK: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENTCARD_FACE: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENTCARD_IDNUMBER: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENTCARD_CATEGORY: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENTCARD_EXPIRATIONDATE: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENTCARD_ISSUING_REGION: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENTCARD_DATEOFBIRTH: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENTCARD_ADDRESS: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENTCARD_ADDRESS_STREET1: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENTCARD_ADDRESS_CITY: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENTCARD_ADDRESS_REGION: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENTCARD_ADDRESS_POSTCODE: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENTCARD_ADDRESS_COUNTRY: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENTCARD_DOCUMENTVERIFICATION_MATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENTCARD_NAME_MATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_RESIDENTCARD_DATEOFBIRTHMATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_VISA: VDXFKeyInterface; -export declare const IDENTITYDATA_VISA_ORIGINAL_FRONT: VDXFKeyInterface; -export declare const IDENTITYDATA_VISA_ORIGINAL_BACK: VDXFKeyInterface; -export declare const IDENTITYDATA_VISA_CROPPED_FRONT: VDXFKeyInterface; -export declare const IDENTITYDATA_VISA_CROPPED_BACK: VDXFKeyInterface; -export declare const IDENTITYDATA_VISA_FACE: VDXFKeyInterface; -export declare const IDENTITYDATA_VISA_IDNUMBER: VDXFKeyInterface; -export declare const IDENTITYDATA_VISA_CATEGORY: VDXFKeyInterface; -export declare const IDENTITYDATA_VISA_EXPIRATIONDATE: VDXFKeyInterface; -export declare const IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_VISA_ISSUING_REGION: VDXFKeyInterface; -export declare const IDENTITYDATA_VISA_DATEOFBIRTH: VDXFKeyInterface; -export declare const IDENTITYDATA_VISA_ADDRESS: VDXFKeyInterface; -export declare const IDENTITYDATA_VISA_ADDRESS_STREET1: VDXFKeyInterface; -export declare const IDENTITYDATA_VISA_ADDRESS_CITY: VDXFKeyInterface; -export declare const IDENTITYDATA_VISA_ADDRESS_REGION: VDXFKeyInterface; -export declare const IDENTITYDATA_VISA_ADDRESS_POSTCODE: VDXFKeyInterface; -export declare const IDENTITYDATA_VISA_ADDRESS_COUNTRY: VDXFKeyInterface; -export declare const IDENTITYDATA_VISA_DOCUMENTVERIFICATION_MATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_VISA_NAME_MATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_VISA_DATEOFBIRTHMATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALFRONT: VDXFKeyInterface; -export declare const IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALBACK: VDXFKeyInterface; -export declare const IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDFRONT: VDXFKeyInterface; -export declare const IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDBACK: VDXFKeyInterface; -export declare const IDENTITYDATA_DOCUMENTVERIFICATION_FACE: VDXFKeyInterface; -export declare const IDENTITYDATA_DOCUMENTVERIFICATION_IDNUMBER: VDXFKeyInterface; -export declare const IDENTITYDATA_DOCUMENTVERIFICATION_CATEGORY: VDXFKeyInterface; -export declare const IDENTITYDATA_DOCUMENTVERIFICATION_EXPIRATIONDATE: VDXFKeyInterface; -export declare const IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY: VDXFKeyInterface; -export declare const IDENTITYDATA_DOCUMENTVERIFICATION_ISSUING_REGION: VDXFKeyInterface; -export declare const IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTH: VDXFKeyInterface; -export declare const IDENTITYDATA_DOCUMENTVERIFICATION_ADDRESS: VDXFKeyInterface; -export declare const IDENTITYDATA_ADDRESS_STREET1: VDXFKeyInterface; -export declare const IDENTITYDATA_ADDRESS_STREET2: VDXFKeyInterface; -export declare const IDENTITYDATA_ADDRESS_CITY: VDXFKeyInterface; -export declare const IDENTITYDATA_ADDRESS_REGION: VDXFKeyInterface; -export declare const IDENTITYDATA_ADDRESS_POSTCODE: VDXFKeyInterface; -export declare const IDENTITYDATA_ADDRESS_COUNTRY: VDXFKeyInterface; -export declare const IDENTITYDATA_NATIONALITY: VDXFKeyInterface; -export declare const IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED: VDXFKeyInterface; -export declare const IDENTITYDATA_NAME: VDXFKeyInterface; -export declare const IDENTITYDATA_PERSONAL_DETAILS: VDXFKeyInterface; -export declare const IDENTITYDATA_CONTACT: VDXFKeyInterface; -export declare const IDENTITYDATA_LOCATIONS: VDXFKeyInterface; -export declare const IDENTITYDATA_BANKING_INFORMATION: VDXFKeyInterface; -export declare const IDENTITYDATA_DOCUMENTS_AND_IMAGES: VDXFKeyInterface; -export declare const PERSONAL_INFO_OBJECT: VDXFKeyInterface; -export declare const FIAT_CURRENCEY: VDXFKeyInterface; -export declare const BANK_ACCOUNT: VDXFKeyInterface; -export declare const BANK_ACCOUNT_CURRENCY: VDXFKeyInterface; -export declare const BANK_ACCOUNT_COUNTRY: VDXFKeyInterface; -export declare const BANK_ACCOUNT_STREET1: VDXFKeyInterface; -export declare const BANK_ACCOUNT_STREET2: VDXFKeyInterface; -export declare const BANK_ACCOUNT_CITY: VDXFKeyInterface; -export declare const BANK_ACCOUNT_REGION: VDXFKeyInterface; -export declare const BANK_ACCOUNT_POSTALCODE: VDXFKeyInterface; -export declare const BANK_ACCOUNT_TAXNUMBER: VDXFKeyInterface; -export declare const BANK_ACCOUNT_TAXCOUNTRY: VDXFKeyInterface; -export declare const BANK_ACCOUNT_FIRSTNAME: VDXFKeyInterface; -export declare const BANK_ACCOUNT_LASTNAME: VDXFKeyInterface; -export declare const BANK_ACCOUNT_PHONENUMBER: VDXFKeyInterface; -export declare const ACCOUNT_NUMBER: VDXFKeyInterface; -export declare const ACCOUNT_TYPE: VDXFKeyInterface; -export declare const BANK_ACCOUNT_NUMBER: VDXFKeyInterface; -export declare const BANK_ACCOUNT_TYPE: VDXFKeyInterface; +export declare const IDENTITY_ACCOUNT_ID: VDXFKeyInterface; +export declare const IDENTITY_ACCOUNT_USERID: VDXFKeyInterface; +export declare const IDENTITY_ACCOUNT_CREATEDAT: VDXFKeyInterface; +export declare const IDENTITY_ACCOUNT_COMPLETEDAT: VDXFKeyInterface; +export declare const IDENTITY_ACCOUNT_PREVIOUSATTEMPTID: VDXFKeyInterface; +export declare const IDENTITY_ACCOUNT_SHAREABLEURL: VDXFKeyInterface; +export declare const IDENTITY_ACCOUNT_TEMPLATEID: VDXFKeyInterface; +export declare const IDENTITY_ACCOUNT_TEMPLATEVERSION: VDXFKeyInterface; +export declare const IDENTITY_ACCOUNT_STATUS: VDXFKeyInterface; +export declare const IDENTITY_PHONENUMBER: VDXFKeyInterface; +export declare const IDENTITY_DATEOFBIRTH: VDXFKeyInterface; +export declare const IDENTITY_OVER18: VDXFKeyInterface; +export declare const IDENTITY_OVER21: VDXFKeyInterface; +export declare const IDENTITY_OVER25: VDXFKeyInterface; +export declare const IDENTITY_ACCOUNT_REQUESTING_IPADDRESS: VDXFKeyInterface; +export declare const IDENTITY_EMAIL: VDXFKeyInterface; +export declare const IDENTITY_NATIONALITY: VDXFKeyInterface; +export declare const IDENTITY_FIRSTNAME: VDXFKeyInterface; +export declare const IDENTITY_MIDDLENAME: VDXFKeyInterface; +export declare const IDENTITY_LASTNAME: VDXFKeyInterface; +export declare const IDENTITY_GENDER: VDXFKeyInterface; +export declare const IDENTITY_HEIGHT: VDXFKeyInterface; +export declare const IDENTITY_EYECOLOR: VDXFKeyInterface; +export declare const IDENTITY_ETHNICITY: VDXFKeyInterface; +export declare const IDENTITY_WEIGHT: VDXFKeyInterface; +export declare const IDENTITY_HOMEADDRESS: VDXFKeyInterface; +export declare const IDENTITY_HOMEADDRESS_STREET1: VDXFKeyInterface; +export declare const IDENTITY_HOMEADDRESS_STREET2: VDXFKeyInterface; +export declare const IDENTITY_HOMEADDRESS_CITY: VDXFKeyInterface; +export declare const IDENTITY_HOMEADDRESS_REGION: VDXFKeyInterface; +export declare const IDENTITY_HOMEADDRESS_POSTCODE: VDXFKeyInterface; +export declare const IDENTITY_HOMEADDRESS_COUNTRY: VDXFKeyInterface; +export declare const IDENTITY_IDNUMBER_VALUE: VDXFKeyInterface; +export declare const IDENTITY_IDNUMBER_TYPE: VDXFKeyInterface; +export declare const IDENTITY_VERIFICATION_STATUS: VDXFKeyInterface; +export declare const IDENTITY_VERIFICATION_APPROVALS: VDXFKeyInterface; +export declare const IDENTITY_VERIFICATION_APPROVALS_ACCEPTEDTOS: VDXFKeyInterface; +export declare const IDENTITY_VERIFICATION_APPROVALS_VERIFIEDSMS: VDXFKeyInterface; +export declare const IDENTITY_VERIFICATION_APPROVALS_KYCCHECKED: VDXFKeyInterface; +export declare const IDENTITY_VERIFICATION_APPROVALS_DOCUMENTSVERIFIED: VDXFKeyInterface; +export declare const IDENTITY_VERIFICATION_APPROVALS_SELFIECHECKED: VDXFKeyInterface; +export declare const IDENTITY_VERIFICATION_APPROVALS_WATCHLISTOK: VDXFKeyInterface; +export declare const IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK: VDXFKeyInterface; +export declare const IDENTITY_VERIFICATION_APPROVALS_STATUS: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_ORIGINALFRONT: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_ORIGINALBACK: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_CROPPEDFRONT: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_CROPPEDBACK: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_FACE: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_IDNUMBER: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_CATEGORY: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_EXPIRATIONDATE: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_ISSUINGCOUNTRY: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_ISSUINGREGION: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_DATEOFBIRTH: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_ADDRESS_STREET1: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_ADDRESS_CITY: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_ADDRESS_REGION: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_ADDRESS_POSTCODE: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_ADDRESS_COUNTRY: VDXFKeyInterface; +export declare const IDENTITY_SELFIECHECK_IMAGE: VDXFKeyInterface; +export declare const IDENTITY_SELFIECHECK_VIDEO: VDXFKeyInterface; +export declare const IDENTITY_EMAIL_ISDELIVERABLE: VDXFKeyInterface; +export declare const IDENTITY_EMAIL_BREACHCOUNT: VDXFKeyInterface; +export declare const IDENTITY_EMAIL_FIRSTBREACHEDAT: VDXFKeyInterface; +export declare const IDENTITY_EMAIL_LASTBREACHEDAT: VDXFKeyInterface; +export declare const IDENTITY_EMAIL_DOMAIN_REGISTEREDAT: VDXFKeyInterface; +export declare const IDENTITY_EMAIL_DOMAIN_FREEPROVIDER: VDXFKeyInterface; +export declare const IDENTITY_EMAIL_DOMAIN_CUSTOM: VDXFKeyInterface; +export declare const IDENTITY_EMAIL_DOMAIN_DISPOSABLE: VDXFKeyInterface; +export declare const IDENTITY_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_ORIGINALFRONT: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_ORIGINALBACK: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_CROPPEDFRONT: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_CROPPEDBACK: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_FACE: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_IDNUMBER: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_CATEGORY: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_EXPIRATIONDATE: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_ISSUINGCOUNTRY: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_ISSUINGREGION: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_DATEOFBIRTH: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_ADDRESS_STREET1: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_ADDRESS_CITY: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_ADDRESS_REGION: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_ADDRESS_POSTCODE: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_ADDRESS_COUNTRY: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_ORIGINALFRONT: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_ORIGINALBACK: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_CROPPEDFRONT: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_CROPPEDBACK: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_FACE: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_IDNUMBER: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_CATEGORY: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_EXPIRATIONDATE: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_ISSUINGCOUNTRY: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_ISSUINGREGION: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_DATEOFBIRTH: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_ADDRESS: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_ADDRESS_STREET1: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_ADDRESS_CITY: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_ADDRESS_REGION: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_ADDRESS_POSTCODE: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_ADDRESS_COUNTRY: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_ORIGINALFRONT: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_ORIGINALBACK: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_CROPPEDFRONT: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_CROPPEDBACK: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_FACE: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_IDNUMBER: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_CATEGORY: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_EXPIRATIONDATE: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_ISSUINGCOUNTRY: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_ISSUINGREGION: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_DATEOFBIRTH: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_ADDRESS_STREET1: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_ADDRESS_CITY: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_ADDRESS_REGION: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_ADDRESS_POSTCODE: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_ADDRESS_COUNTRY: VDXFKeyInterface; +export declare const IDENTITY_IDCARD: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_ORIGINALFRONT: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_ORIGINALBACK: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_CROPPEDFRONT: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_CROPPEDBACK: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_FACE: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_IDNUMBER: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_CATEGORY: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_EXPIRATIONDATE: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_ISSUINGCOUNTRY: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_ISSUINGREGION: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_DATEOFBIRTH: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_ADDRESS_STREET1: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_ADDRESS_CITY: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_ADDRESS_REGION: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_ADDRESS_POSTCODE: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_ADDRESS_COUNTRY: VDXFKeyInterface; +export declare const IDENTITY_VISA: VDXFKeyInterface; +export declare const IDENTITY_VISA_ORIGINALFRONT: VDXFKeyInterface; +export declare const IDENTITY_VISA_ORIGINALBACK: VDXFKeyInterface; +export declare const IDENTITY_VISA_CROPPEDFRONT: VDXFKeyInterface; +export declare const IDENTITY_VISA_CROPPEDBACK: VDXFKeyInterface; +export declare const IDENTITY_VISA_FACE: VDXFKeyInterface; +export declare const IDENTITY_VISA_IDNUMBER: VDXFKeyInterface; +export declare const IDENTITY_VISA_CATEGORY: VDXFKeyInterface; +export declare const IDENTITY_VISA_EXPIRATIONDATE: VDXFKeyInterface; +export declare const IDENTITY_VISA_ISSUINGCOUNTRY: VDXFKeyInterface; +export declare const IDENTITY_VISA_ISSUINGREGION: VDXFKeyInterface; +export declare const IDENTITY_VISA_DATEOFBIRTH: VDXFKeyInterface; +export declare const IDENTITY_VISA_ADDRESS_STREET1: VDXFKeyInterface; +export declare const IDENTITY_VISA_ADDRESS_CITY: VDXFKeyInterface; +export declare const IDENTITY_VISA_ADDRESS_REGION: VDXFKeyInterface; +export declare const IDENTITY_VISA_ADDRESS_POSTCODE: VDXFKeyInterface; +export declare const IDENTITY_VISA_ADDRESS_COUNTRY: VDXFKeyInterface; +export declare const IDENTITY_PERSONALDETAILS: VDXFKeyInterface; +export declare const IDENTITY_CONTACTDETAILS: VDXFKeyInterface; +export declare const IDENTITY_LOCATION: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS: VDXFKeyInterface; +export declare const IDENTITY_DOCUMENTS: VDXFKeyInterface; +export declare const IDENTITY_BANKACCOUNT: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_CURRENCY: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_COUNTRY: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_STREET1: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_STREET2: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_CITY: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_REGION: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_POSTALCODE: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_TAXNUMBER: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_TAXCOUNTRY: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_FIRSTNAME: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_LASTNAME: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_PHONENUMBER: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_NUMBER: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_TYPE: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_SORTCODE: VDXFKeyInterface; +export declare const IDENTITY_DOCUMENTS_PASSPORT: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCECARD: VDXFKeyInterface; +export declare const IDENTITY_ATTESTOR: VDXFKeyInterface; +export declare const IDENTITY_ATTESTATION_RECIPIENT: VDXFKeyInterface; diff --git a/dist/vdxf/identityDataKeys.js b/dist/vdxf/identityDataKeys.js index 592c8b2..5039ee4 100644 --- a/dist/vdxf/identityDataKeys.js +++ b/dist/vdxf/identityDataKeys.js @@ -1,2534 +1,1653 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.IDENTITYDATA_DRIVINGLICENCE_ADDRESS = exports.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH = exports.IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION = exports.IDENTITYDATA_DRIVINGLICENCE_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_DRIVINGLICENCE_EXPIRATIONDATE = exports.IDENTITYDATA_DRIVINGLICENCE_CATEGORY = exports.IDENTITYDATA_DRIVINGLICENCE_IDNUMBER = exports.IDENTITYDATA_DRIVINGLICENCE_FACE = exports.IDENTITYDATA_DRIVINGLICENCE_CROPPED_BACK = exports.IDENTITYDATA_DRIVINGLICENCE_CROPPED_FRONT = exports.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_BACK = exports.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_FRONT = exports.IDENTITYDATA_DRIVINGLICENCE = exports.IDENTITYDATA_APPROVALS_RISKCHECKOK = exports.IDENTITYDATA_APPROVALS_WATCHLIST_OK = exports.IDENTITYDATA_APPROVALS_SELFIECHECKED = exports.IDENTITYDATA_APPROVALS_DOCUMENTSVERIFIED = exports.IDENTITYDATA_APPROVALS_KYCCHECKED = exports.IDENTITYDATA_APPROVALS_VERIFIEDSMS = exports.IDENTITYDATA_APPROVALS_ACCEPTEDTOS = exports.IDENTITYDATA_STATUS = exports.IDENTITYDATA_IDNUMBER_TYPE = exports.IDENTITYDATA_IDNUMBER_VALUE = exports.IDENTITYDATA_HOMEADDRESS_COUNTRY = exports.IDENTITYDATA_HOMEADDRESS_POSTCODE = exports.IDENTITYDATA_HOMEADDRESS_REGION = exports.IDENTITYDATA_HOMEADDRESS_CITY = exports.IDENTITYDATA_HOMEADDRESS_STREET2 = exports.IDENTITYDATA_HOMEADDRESS_STREET1 = exports.IDENTITYDATA_HOMEADDRESS = exports.IDENTITYDATA_LASTNAME = exports.IDENTITYDATA_MIDDLENAME = exports.IDENTITYDATA_FIRSTNAME = exports.IDENTITYDATA_EMAIL = exports.IDENTITYDATA_IPADDRESS = exports.IDENTITYDATA_OVER25 = exports.IDENTITYDATA_OVER21 = exports.IDENTITYDATA_OVER18 = exports.IDENTITYDATA_DATEOFBIRTH = exports.IDENTITYDATA_PHONENUMBER = exports.IDENTITYDATA_TEMPLATEVERSION = exports.IDENTITYDATA_TEMPLATEID = exports.IDENTITYDATA_SHAREABLEURL = exports.IDENTITYDATA_PREVIOUSATTEMPTID = exports.IDENTITYDATA_COMPLETEDAT = exports.IDENTITYDATA_CREATEDAT = exports.IDENTITYDATA_USERID = exports.IDENTITYDATA_ID = exports.IDENTITYDATA_IDENTITY = exports.IDENTITYDATA_ATTESTOR = void 0; -exports.IDENTITYDATA_IDCARD_ADDRESS_POSTCODE = exports.IDENTITYDATA_IDCARD_ADDRESS_REGION = exports.IDENTITYDATA_IDCARD_ADDRESS_CITY = exports.IDENTITYDATA_IDCARD_ADDRESS_STREET1 = exports.IDENTITYDATA_IDCARD_ADDRESS = exports.IDENTITYDATA_IDCARD_DATEOFBIRTH = exports.IDENTITYDATA_IDCARD_ISSUING_REGION = exports.IDENTITYDATA_IDCARD_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_IDCARD_EXPIRATIONDATE = exports.IDENTITYDATA_IDCARD_CATEGORY = exports.IDENTITYDATA_IDCARD_IDNUMBER = exports.IDENTITYDATA_IDCARD_FACE = exports.IDENTITYDATA_IDCARD_CROPPED_BACK = exports.IDENTITYDATA_IDCARD_CROPPED_FRONT = exports.IDENTITYDATA_IDCARD_ORIGINAL_BACK = exports.IDENTITYDATA_IDCARD_ORIGINAL_FRONT = exports.IDENTITYDATA_IDCARD = exports.IDENTITYDATA_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS = exports.IDENTITYDATA_EMAIL_DOMAIN_DISPOSABLE = exports.IDENTITYDATA_EMAIL_DOMAIN_CUSTOM = exports.IDENTITYDATA_EMAIL_DOMAIN_FREEPROVIDER = exports.IDENTITYDATA_EMAIL_DOMAIN_REGISTEREDAT = exports.IDENTITYDATA_EMAIL_LASTBREACHEDAT = exports.IDENTITYDATA_EMAIL_FIRSTBREACHEDAT = exports.IDENTITYDATA_EMAIL_BREACHCOUNT = exports.IDENTITYDATA_EMAIL_ISDELIVERABLE = exports.IDENTITYDATA_RISKCHECK_BOTNOTDETECTED = exports.IDENTITYDATA_RISKCHECK_FRAUDRINGOK = exports.IDENTITYDATA_RISKCHECK_USERINTERACTIONS = exports.IDENTITYDATA_RISKCHECK_STATUS = exports.IDENTITYDATA_KYC_AREACODE_MATCHED = exports.IDENTITYDATA_KYC_PHONENUMBER_MATCHED = exports.IDENTITYDATA_KYC_IDNUMBER_MATCHED = exports.IDENTITYDATA_KYC_DATEOFBIRTH_MATCHED = exports.IDENTITYDATA_KYC_NAME_MATCHED = exports.IDENTITYDATA_KYC_TYPE = exports.IDENTITYDATA_KYC_ADDRESS_MATCHED = exports.IDENTITYDATA_KYC_SUCCESS = exports.IDENTITYDATA_SELFIECHECK_DRIVINGLICENCE_MATCH = exports.IDENTITYDATA_SELFIECHECK_VIDEO = exports.IDENTITYDATA_SELFIECHECK_IMAGE = exports.IDENTITYDATA_SELFIECHECK_SUCCESS = exports.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH_MATCHED = exports.IDENTITYDATA_DRIVINGLICENCE_NAME_MATCHED = exports.IDENTITYDATA_DRIVINGLICENCE_MATCHED = exports.IDENTITYDATA_DRIVINGLICENCE_COUNTRY = exports.IDENTITYDATA_DRIVINGLICENCE_POSTCODE = exports.IDENTITYDATA_DRIVINGLICENCE_REGION = exports.IDENTITYDATA_DRIVINGLICENCE_CITY = exports.IDENTITYDATA_DRIVINGLICENCE_STREET1 = void 0; -exports.IDENTITYDATA_RESIDENTCARD_CROPPED_FRONT = exports.IDENTITYDATA_RESIDENTCARD_ORIGINAL_BACK = exports.IDENTITYDATA_RESIDENTCARD_ORIGINAL_FRONT = exports.IDENTITYDATA_RESIDENTCARD = exports.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_RESIDENCEPERMIT_NAME_MATCHED = exports.IDENTITYDATA_RESIDENCEPERMIT_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_COUNTRY = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_POSTCODE = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_REGION = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_CITY = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_STREET1 = exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS = exports.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTH = exports.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_REGION = exports.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_RESIDENCEPERMIT_EXPIRATIONDATE = exports.IDENTITYDATA_RESIDENCEPERMIT_CATEGORY = exports.IDENTITYDATA_RESIDENCEPERMIT_IDNUMBER = exports.IDENTITYDATA_RESIDENCEPERMIT_FACE = exports.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_BACK = exports.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_FRONT = exports.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_BACK = exports.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_FRONT = exports.IDENTITYDATA_RESIDENCEPERMIT = exports.IDENTITYDATA_PASSPORT_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_PASSPORT_NAME_MATCHED = exports.IDENTITYDATA_PASSPORT_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_PASSPORT_ADDRESS_COUNTRY = exports.IDENTITYDATA_PASSPORT_ADDRESS_POSTCODE = exports.IDENTITYDATA_PASSPORT_ADDRESS_REGION = exports.IDENTITYDATA_PASSPORT_ADDRESS_CITY = exports.IDENTITYDATA_PASSPORT_ADDRESS_STREET1 = exports.IDENTITYDATA_PASSPORT_ADDRESS = exports.IDENTITYDATA_PASSPORT_DATEOFBIRTH = exports.IDENTITYDATA_PASSPORT_ISSUING_REGION = exports.IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_PASSPORT_EXPIRATIONDATE = exports.IDENTITYDATA_PASSPORT_CATEGORY = exports.IDENTITYDATA_PASSPORT_IDNUMBER = exports.IDENTITYDATA_PASSPORT_FACE = exports.IDENTITYDATA_PASSPORT_CROPPED_BACK = exports.IDENTITYDATA_PASSPORT_CROPPED_FRONT = exports.IDENTITYDATA_PASSPORT_ORIGINAL_BACK = exports.IDENTITYDATA_PASSPORT_ORIGINAL_FRONT = exports.IDENTITYDATA_PASSPORT = exports.IDENTITYDATA_IDCARD_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_IDCARD_NAME_MATCHED = exports.IDENTITYDATA_IDCARD_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_IDCARD_ADDRESS_COUNTRY = void 0; -exports.IDENTITYDATA_DOCUMENTVERIFICATION_ADDRESS = exports.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTH = exports.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUING_REGION = exports.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY = exports.IDENTITYDATA_DOCUMENTVERIFICATION_EXPIRATIONDATE = exports.IDENTITYDATA_DOCUMENTVERIFICATION_CATEGORY = exports.IDENTITYDATA_DOCUMENTVERIFICATION_IDNUMBER = exports.IDENTITYDATA_DOCUMENTVERIFICATION_FACE = exports.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDBACK = exports.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDFRONT = exports.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALBACK = exports.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALFRONT = exports.IDENTITYDATA_VISA_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_VISA_NAME_MATCHED = exports.IDENTITYDATA_VISA_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_VISA_ADDRESS_COUNTRY = exports.IDENTITYDATA_VISA_ADDRESS_POSTCODE = exports.IDENTITYDATA_VISA_ADDRESS_REGION = exports.IDENTITYDATA_VISA_ADDRESS_CITY = exports.IDENTITYDATA_VISA_ADDRESS_STREET1 = exports.IDENTITYDATA_VISA_ADDRESS = exports.IDENTITYDATA_VISA_DATEOFBIRTH = exports.IDENTITYDATA_VISA_ISSUING_REGION = exports.IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_VISA_EXPIRATIONDATE = exports.IDENTITYDATA_VISA_CATEGORY = exports.IDENTITYDATA_VISA_IDNUMBER = exports.IDENTITYDATA_VISA_FACE = exports.IDENTITYDATA_VISA_CROPPED_BACK = exports.IDENTITYDATA_VISA_CROPPED_FRONT = exports.IDENTITYDATA_VISA_ORIGINAL_BACK = exports.IDENTITYDATA_VISA_ORIGINAL_FRONT = exports.IDENTITYDATA_VISA = exports.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_RESIDENTCARD_NAME_MATCHED = exports.IDENTITYDATA_RESIDENTCARD_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_COUNTRY = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_POSTCODE = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_REGION = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_CITY = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_STREET1 = exports.IDENTITYDATA_RESIDENTCARD_ADDRESS = exports.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTH = exports.IDENTITYDATA_RESIDENTCARD_ISSUING_REGION = exports.IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED = exports.IDENTITYDATA_RESIDENTCARD_EXPIRATIONDATE = exports.IDENTITYDATA_RESIDENTCARD_CATEGORY = exports.IDENTITYDATA_RESIDENTCARD_IDNUMBER = exports.IDENTITYDATA_RESIDENTCARD_FACE = exports.IDENTITYDATA_RESIDENTCARD_CROPPED_BACK = void 0; -exports.BANK_ACCOUNT_TYPE = exports.BANK_ACCOUNT_NUMBER = exports.ACCOUNT_TYPE = exports.ACCOUNT_NUMBER = exports.BANK_ACCOUNT_PHONENUMBER = exports.BANK_ACCOUNT_LASTNAME = exports.BANK_ACCOUNT_FIRSTNAME = exports.BANK_ACCOUNT_TAXCOUNTRY = exports.BANK_ACCOUNT_TAXNUMBER = exports.BANK_ACCOUNT_POSTALCODE = exports.BANK_ACCOUNT_REGION = exports.BANK_ACCOUNT_CITY = exports.BANK_ACCOUNT_STREET2 = exports.BANK_ACCOUNT_STREET1 = exports.BANK_ACCOUNT_COUNTRY = exports.BANK_ACCOUNT_CURRENCY = exports.BANK_ACCOUNT = exports.FIAT_CURRENCEY = exports.PERSONAL_INFO_OBJECT = exports.IDENTITYDATA_DOCUMENTS_AND_IMAGES = exports.IDENTITYDATA_BANKING_INFORMATION = exports.IDENTITYDATA_LOCATIONS = exports.IDENTITYDATA_CONTACT = exports.IDENTITYDATA_PERSONAL_DETAILS = exports.IDENTITYDATA_NAME = exports.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED = exports.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED = exports.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED = exports.IDENTITYDATA_NATIONALITY = exports.IDENTITYDATA_ADDRESS_COUNTRY = exports.IDENTITYDATA_ADDRESS_POSTCODE = exports.IDENTITYDATA_ADDRESS_REGION = exports.IDENTITYDATA_ADDRESS_CITY = exports.IDENTITYDATA_ADDRESS_STREET2 = exports.IDENTITYDATA_ADDRESS_STREET1 = void 0; -exports.IDENTITYDATA_ATTESTOR = { - "vdxfid": "iNe8VaRBRFDhb6xjZ7WHNWgfM73428GN8B", - "hash160result": "5e01d5d356d517df57ea0f391c86e11a84663bd2", +exports.IDENTITY_DRIVINGLICENCE_FACE = exports.IDENTITY_DRIVINGLICENCE_CROPPEDBACK = exports.IDENTITY_DRIVINGLICENCE_CROPPEDFRONT = exports.IDENTITY_DRIVINGLICENCE_ORIGINALBACK = exports.IDENTITY_DRIVINGLICENCE_ORIGINALFRONT = exports.IDENTITY_DRIVINGLICENCE = exports.IDENTITY_VERIFICATION_APPROVALS_STATUS = exports.IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK = exports.IDENTITY_VERIFICATION_APPROVALS_WATCHLISTOK = exports.IDENTITY_VERIFICATION_APPROVALS_SELFIECHECKED = exports.IDENTITY_VERIFICATION_APPROVALS_DOCUMENTSVERIFIED = exports.IDENTITY_VERIFICATION_APPROVALS_KYCCHECKED = exports.IDENTITY_VERIFICATION_APPROVALS_VERIFIEDSMS = exports.IDENTITY_VERIFICATION_APPROVALS_ACCEPTEDTOS = exports.IDENTITY_VERIFICATION_APPROVALS = exports.IDENTITY_VERIFICATION_STATUS = exports.IDENTITY_IDNUMBER_TYPE = exports.IDENTITY_IDNUMBER_VALUE = exports.IDENTITY_HOMEADDRESS_COUNTRY = exports.IDENTITY_HOMEADDRESS_POSTCODE = exports.IDENTITY_HOMEADDRESS_REGION = exports.IDENTITY_HOMEADDRESS_CITY = exports.IDENTITY_HOMEADDRESS_STREET2 = exports.IDENTITY_HOMEADDRESS_STREET1 = exports.IDENTITY_HOMEADDRESS = exports.IDENTITY_WEIGHT = exports.IDENTITY_ETHNICITY = exports.IDENTITY_EYECOLOR = exports.IDENTITY_HEIGHT = exports.IDENTITY_GENDER = exports.IDENTITY_LASTNAME = exports.IDENTITY_MIDDLENAME = exports.IDENTITY_FIRSTNAME = exports.IDENTITY_NATIONALITY = exports.IDENTITY_EMAIL = exports.IDENTITY_ACCOUNT_REQUESTING_IPADDRESS = exports.IDENTITY_OVER25 = exports.IDENTITY_OVER21 = exports.IDENTITY_OVER18 = exports.IDENTITY_DATEOFBIRTH = exports.IDENTITY_PHONENUMBER = exports.IDENTITY_ACCOUNT_STATUS = exports.IDENTITY_ACCOUNT_TEMPLATEVERSION = exports.IDENTITY_ACCOUNT_TEMPLATEID = exports.IDENTITY_ACCOUNT_SHAREABLEURL = exports.IDENTITY_ACCOUNT_PREVIOUSATTEMPTID = exports.IDENTITY_ACCOUNT_COMPLETEDAT = exports.IDENTITY_ACCOUNT_CREATEDAT = exports.IDENTITY_ACCOUNT_USERID = exports.IDENTITY_ACCOUNT_ID = void 0; +exports.IDENTITY_RESIDENCEPERMIT_ISSUINGREGION = exports.IDENTITY_RESIDENCEPERMIT_ISSUINGCOUNTRY = exports.IDENTITY_RESIDENCEPERMIT_EXPIRATIONDATE = exports.IDENTITY_RESIDENCEPERMIT_CATEGORY = exports.IDENTITY_RESIDENCEPERMIT_IDNUMBER = exports.IDENTITY_RESIDENCEPERMIT_FACE = exports.IDENTITY_RESIDENCEPERMIT_CROPPEDBACK = exports.IDENTITY_RESIDENCEPERMIT_CROPPEDFRONT = exports.IDENTITY_RESIDENCEPERMIT_ORIGINALBACK = exports.IDENTITY_RESIDENCEPERMIT_ORIGINALFRONT = exports.IDENTITY_RESIDENCEPERMIT = exports.IDENTITY_PASSPORT_ADDRESS_COUNTRY = exports.IDENTITY_PASSPORT_ADDRESS_POSTCODE = exports.IDENTITY_PASSPORT_ADDRESS_REGION = exports.IDENTITY_PASSPORT_ADDRESS_CITY = exports.IDENTITY_PASSPORT_ADDRESS_STREET1 = exports.IDENTITY_PASSPORT_DATEOFBIRTH = exports.IDENTITY_PASSPORT_ISSUINGREGION = exports.IDENTITY_PASSPORT_ISSUINGCOUNTRY = exports.IDENTITY_PASSPORT_EXPIRATIONDATE = exports.IDENTITY_PASSPORT_CATEGORY = exports.IDENTITY_PASSPORT_IDNUMBER = exports.IDENTITY_PASSPORT_FACE = exports.IDENTITY_PASSPORT_CROPPEDBACK = exports.IDENTITY_PASSPORT_CROPPEDFRONT = exports.IDENTITY_PASSPORT_ORIGINALBACK = exports.IDENTITY_PASSPORT_ORIGINALFRONT = exports.IDENTITY_PASSPORT = exports.IDENTITY_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS = exports.IDENTITY_EMAIL_DOMAIN_DISPOSABLE = exports.IDENTITY_EMAIL_DOMAIN_CUSTOM = exports.IDENTITY_EMAIL_DOMAIN_FREEPROVIDER = exports.IDENTITY_EMAIL_DOMAIN_REGISTEREDAT = exports.IDENTITY_EMAIL_LASTBREACHEDAT = exports.IDENTITY_EMAIL_FIRSTBREACHEDAT = exports.IDENTITY_EMAIL_BREACHCOUNT = exports.IDENTITY_EMAIL_ISDELIVERABLE = exports.IDENTITY_SELFIECHECK_VIDEO = exports.IDENTITY_SELFIECHECK_IMAGE = exports.IDENTITY_DRIVINGLICENCE_ADDRESS_COUNTRY = exports.IDENTITY_DRIVINGLICENCE_ADDRESS_POSTCODE = exports.IDENTITY_DRIVINGLICENCE_ADDRESS_REGION = exports.IDENTITY_DRIVINGLICENCE_ADDRESS_CITY = exports.IDENTITY_DRIVINGLICENCE_ADDRESS_STREET1 = exports.IDENTITY_DRIVINGLICENCE_DATEOFBIRTH = exports.IDENTITY_DRIVINGLICENCE_ISSUINGREGION = exports.IDENTITY_DRIVINGLICENCE_ISSUINGCOUNTRY = exports.IDENTITY_DRIVINGLICENCE_EXPIRATIONDATE = exports.IDENTITY_DRIVINGLICENCE_CATEGORY = exports.IDENTITY_DRIVINGLICENCE_IDNUMBER = void 0; +exports.IDENTITY_VISA_EXPIRATIONDATE = exports.IDENTITY_VISA_CATEGORY = exports.IDENTITY_VISA_IDNUMBER = exports.IDENTITY_VISA_FACE = exports.IDENTITY_VISA_CROPPEDBACK = exports.IDENTITY_VISA_CROPPEDFRONT = exports.IDENTITY_VISA_ORIGINALBACK = exports.IDENTITY_VISA_ORIGINALFRONT = exports.IDENTITY_VISA = exports.IDENTITY_IDCARD_ADDRESS_COUNTRY = exports.IDENTITY_IDCARD_ADDRESS_POSTCODE = exports.IDENTITY_IDCARD_ADDRESS_REGION = exports.IDENTITY_IDCARD_ADDRESS_CITY = exports.IDENTITY_IDCARD_ADDRESS_STREET1 = exports.IDENTITY_IDCARD_DATEOFBIRTH = exports.IDENTITY_IDCARD_ISSUINGREGION = exports.IDENTITY_IDCARD_ISSUINGCOUNTRY = exports.IDENTITY_IDCARD_EXPIRATIONDATE = exports.IDENTITY_IDCARD_CATEGORY = exports.IDENTITY_IDCARD_IDNUMBER = exports.IDENTITY_IDCARD_FACE = exports.IDENTITY_IDCARD_CROPPEDBACK = exports.IDENTITY_IDCARD_CROPPEDFRONT = exports.IDENTITY_IDCARD_ORIGINALBACK = exports.IDENTITY_IDCARD_ORIGINALFRONT = exports.IDENTITY_IDCARD = exports.IDENTITY_RESIDENTCARD_ADDRESS_COUNTRY = exports.IDENTITY_RESIDENTCARD_ADDRESS_POSTCODE = exports.IDENTITY_RESIDENTCARD_ADDRESS_REGION = exports.IDENTITY_RESIDENTCARD_ADDRESS_CITY = exports.IDENTITY_RESIDENTCARD_ADDRESS_STREET1 = exports.IDENTITY_RESIDENTCARD_DATEOFBIRTH = exports.IDENTITY_RESIDENTCARD_ISSUINGREGION = exports.IDENTITY_RESIDENTCARD_ISSUINGCOUNTRY = exports.IDENTITY_RESIDENTCARD_EXPIRATIONDATE = exports.IDENTITY_RESIDENTCARD_CATEGORY = exports.IDENTITY_RESIDENTCARD_IDNUMBER = exports.IDENTITY_RESIDENTCARD_FACE = exports.IDENTITY_RESIDENTCARD_CROPPEDBACK = exports.IDENTITY_RESIDENTCARD_CROPPEDFRONT = exports.IDENTITY_RESIDENTCARD_ORIGINALBACK = exports.IDENTITY_RESIDENTCARD_ORIGINALFRONT = exports.IDENTITY_RESIDENTCARD = exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_COUNTRY = exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_POSTCODE = exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_REGION = exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_CITY = exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_STREET1 = exports.IDENTITY_RESIDENCEPERMIT_ADDRESS = exports.IDENTITY_RESIDENCEPERMIT_DATEOFBIRTH = void 0; +exports.IDENTITY_ATTESTATION_RECIPIENT = exports.IDENTITY_ATTESTOR = exports.IDENTITY_RESIDENCECARD = exports.IDENTITY_DOCUMENTS_PASSPORT = exports.IDENTITY_BANKINGDETAILS_SORTCODE = exports.IDENTITY_BANKINGDETAILS_TYPE = exports.IDENTITY_BANKINGDETAILS_NUMBER = exports.IDENTITY_BANKINGDETAILS_PHONENUMBER = exports.IDENTITY_BANKINGDETAILS_LASTNAME = exports.IDENTITY_BANKINGDETAILS_FIRSTNAME = exports.IDENTITY_BANKINGDETAILS_TAXCOUNTRY = exports.IDENTITY_BANKINGDETAILS_TAXNUMBER = exports.IDENTITY_BANKINGDETAILS_POSTALCODE = exports.IDENTITY_BANKINGDETAILS_REGION = exports.IDENTITY_BANKINGDETAILS_CITY = exports.IDENTITY_BANKINGDETAILS_STREET2 = exports.IDENTITY_BANKINGDETAILS_STREET1 = exports.IDENTITY_BANKINGDETAILS_COUNTRY = exports.IDENTITY_BANKINGDETAILS_CURRENCY = exports.IDENTITY_BANKACCOUNT = exports.IDENTITY_DOCUMENTS = exports.IDENTITY_BANKINGDETAILS = exports.IDENTITY_LOCATION = exports.IDENTITY_CONTACTDETAILS = exports.IDENTITY_PERSONALDETAILS = exports.IDENTITY_VISA_ADDRESS_COUNTRY = exports.IDENTITY_VISA_ADDRESS_POSTCODE = exports.IDENTITY_VISA_ADDRESS_REGION = exports.IDENTITY_VISA_ADDRESS_CITY = exports.IDENTITY_VISA_ADDRESS_STREET1 = exports.IDENTITY_VISA_DATEOFBIRTH = exports.IDENTITY_VISA_ISSUINGREGION = exports.IDENTITY_VISA_ISSUINGCOUNTRY = void 0; +exports.IDENTITY_ACCOUNT_ID = { + "vdxfid": "i5Xgd7Aqds922eE8FDBUsKHSgiig39AnfS", + "indexid": "xAMo5ubvVBMgep7A6tqdqhoyiNjgq3j1ci", + "hash160result": "4c5e79bf46593fe959cb1918422eaa8fc82b8916", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.attestor" + "name": "vrsc::identity.account.id" } }; -exports.IDENTITYDATA_IDENTITY = { - "vdxfid": "iFa41TpKfvbjaEnP78BNpSA9KYNgED58ms", - "hash160result": "63730181dc037834a7b2b9e7fed49863ca1cad84", +exports.IDENTITY_ACCOUNT_USERID = { + "vdxfid": "iNKVUvr5GzdCHgybMauK11DdZZUyWE3pe3", + "indexid": "xT9bwjHA8JqrurrdDGZTyPkAbDVzR53C2o", + "hash160result": "93b62bfd8c861ac7a5aa3d3d9f618ccd8c04b5ce", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.identity" + "name": "vrsc::identity.account.userid" } }; -exports.IDENTITYDATA_ID = { - "vdxfid": "i3uDEe15gH8AN88WjGGwF7gv6jVwJa1Wt5", - "indexid": "x8jKhSSAXbLpzJ1Yaww6DWDT8PWxAzngtM", - "hash160result": "17bc967bf757bc093ba3fc1dd9298abb7235ab04", +exports.IDENTITY_ACCOUNT_CREATEDAT = { + "vdxfid": "i42uTbJmVBcPacY3Ak1g95LBg5rBBntQby", + "indexid": "x8s1vPjrLVq4CnR52Rfq7TrihjsBzxAEic", + "hash160result": "c40b12b14582c976e67a2e5992b0fdf67fb21f06", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.id" + "name": "vrsc::identity.account.createdat" } }; -exports.IDENTITYDATA_USERID = { - "vdxfid": "iMxzsbP4iptfkxQD4CaYwYNqSRSqw1eqJp", - "indexid": "xSo7LPp9a97LP8HEutEhuvuNU5Trrjc77z", - "hash160result": "b6e3f22d3a87fbdffe53d16e1eab779b16d1d4ca", +exports.IDENTITY_ACCOUNT_COMPLETEDAT = { + "vdxfid": "iRJTZj7osY5EYA7pd7K3UcJVAApkvodDjZ", + "indexid": "xW8a2XYtirHuAKzrUnyCSzq2BpqmpCnnHQ", + "hash160result": "c568b6e1f734f5dc9b754e5932ebdb63f2606bef", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.userid" + "name": "vrsc::identity.account.completedat" } }; -exports.IDENTITYDATA_CREATEDAT = { - "vdxfid": "iNxvB8LET1HNQ2aWqS8RoVj8fcPr1UdcSA", - "indexid": "xTo2dvmKJKW32CTYh7namtFfhGQrrbP3Rv", - "hash160result": "dabed2d7a3d4cacbc482ce046dd1be8b6605c9d5", +exports.IDENTITY_ACCOUNT_PREVIOUSATTEMPTID = { + "vdxfid": "iGU6RCWyjU1sscCPLN77XhTESJ21JCTNxF", + "indexid": "xMJCszx4anEYVn5RC3mGW5ymTx32EBfaqs", + "hash160result": "50c2b12bb483802d14beae3c6b7454c6ecc0848e", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.createdat" + "name": "vrsc::identity.account.previousattemptid" } }; -exports.IDENTITYDATA_COMPLETEDAT = { - "vdxfid": "iFtW78dkwZtb4Q9EhBEm4xYMYFxYEvP39D", - "indexid": "xLicZw4qnt7Fga2GYrtv3M4tZuyZ5zz9CJ", - "hash160result": "12903d8d58b28acf0dfefd6598b2ed6394622a88", +exports.IDENTITY_ACCOUNT_SHAREABLEURL = { + "vdxfid": "i92YkV3FVGZfp5Ep3j1sfQUgqUS37M9v82", + "indexid": "xDrfDHULLanLSF7quQg2do1Ds8T3yGCRw3", + "hash160result": "52e9f990e5e89cc1088acd29a2fda0ef140ae73c", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.completedat" + "name": "vrsc::identity.account.shareableurl" } }; -exports.IDENTITYDATA_PREVIOUSATTEMPTID = { - "vdxfid": "iNVKxjLQJmxyFsPZGufmkb9rh8FoBrcS37", - "indexid": "xTKSRXmVA6Bdt3Gb8bKviygPinGp7XuZqr", - "hash160result": "f2154430bfab9e858dbd05f48e379f77dd3a91d0", +exports.IDENTITY_ACCOUNT_TEMPLATEID = { + "vdxfid": "iL5diuVsHAG5DLVeyc8XYdEXR6fFro5G7s", + "indexid": "xQukBhvx8UUjqWNgqHngX1m4SkgGhnybh1", + "hash160result": "37ef653fe6685fca132d77834384702f6cd225b6", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.previousattemptid" + "name": "vrsc::identity.account.templateid" } }; -exports.IDENTITYDATA_SHAREABLEURL = { - "vdxfid": "i9nYbM8arP15YrJYqSLbxgi7iJgYbzPwXR", - "indexid": "xEcf49ZfhhDkB2Bah7zkw5EejxhZYZ83om", - "hash160result": "8a81df9444dcd55bf80dfff5e07b4a1fd0353945", +exports.IDENTITY_ACCOUNT_TEMPLATEVERSION = { + "vdxfid": "i7eBZNzKrgFov6c2Sx2QecyEmPq2Mc4BGe", + "indexid": "xCUJ2BRQhzUUYGV4JdgZd1Vmo3r39BsUym", + "hash160result": "e6e490ce8bfde333ab0374880ea0efbb9c12b42d", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.shareableurl" + "name": "vrsc::identity.account.templateversion" } }; -exports.IDENTITYDATA_TEMPLATEID = { - "vdxfid": "i5j8xXGKYLBAENLD5CBosWtmB2LnWrxobF", - "indexid": "xAZFRKhQPePprYDEvsqxquRJCgMoTQzGzL", - "hash160result": "aefdfe818fd9323496ad29101b9b40e3d0bab318", +exports.IDENTITY_ACCOUNT_STATUS = { + "vdxfid": "iJf3EbihEtdEpJjbQ6PgUaL3GxDgZRzSWk", + "indexid": "xPV9hQ9n6CquSUcdFn3qSxraJcEhVfWa72", + "hash160result": "d6fc5578c2fbed3251f3aa250c73b58386ec86a6", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.templateid" + "name": "vrsc::identity.account.status" } }; -exports.IDENTITYDATA_TEMPLATEVERSION = { - "vdxfid": "iQTADnLBxVAxxxAidEUgK8DVeuaaY7w78n", - "indexid": "xVHGgamGooPdb83kUv8qHWk2gZbbW3CZYi", - "hash160result": "1b1a410a4258fe91ee0e40904538d649c58418e6", +exports.IDENTITY_PHONENUMBER = { + "vdxfid": "iAQY8o4HwupzcJAw9aBtFwgrvWZGQStkge", + "indexid": "xFEebbVNoE3fEU3y1Fr3ELDPxAaHE7V2kN", + "hash160result": "32bc2c7919f626c39679630ee4d6d6d07bcd074c", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.templateversion" + "name": "vrsc::identity.phonenumber" } }; -exports.IDENTITYDATA_PHONENUMBER = { - "vdxfid": "i9ZQ5degEh3wQg5vNm8Tod88bcJBrLs5p3", - "indexid": "xEPWYS5m61Gc2qxxESncn1efdGKChdypms", - "hash160result": "c58e0231ddcd85747709016800cc6e796cb2bc42", +exports.IDENTITY_DATEOFBIRTH = { + "vdxfid": "iSZsa7C4esogN3W6fBngUHR6GvSmt7We4j", + "indexid": "xXPz2ud9WC2LzDP8WsSqSfwdJaTnqpHdND", + "hash160result": "ab74371e952a27f615b079d3c084b38b98c84dfd", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.phonenumber" + "name": "vrsc::identity.dateofbirth" } }; -exports.IDENTITYDATA_DATEOFBIRTH = { - "vdxfid": "iPzSt64gwsqmxcz3Ht7zhMngLC6no6S74K", - "indexid": "xUpZLtVmoC4Sans59Zn9fkKDMr7oe7NpkD", - "hash160result": "057c9866c848002e1fac1c419a300369f2310be1", +exports.IDENTITY_OVER18 = { + "vdxfid": "iHPD8vB7jhtbuqPkUqzheqcZdfAfHUFVzM", + "indexid": "xNDKbicCb27GY1GnLXerdE96fKBg9tLUDT", + "hash160result": "28139ce1eae370e76f749066f778466597689098", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.dateofbirth" + "name": "vrsc::identity.over18" } }; -exports.IDENTITYDATA_OVER18 = { - "vdxfid": "iF8QUrVj4LCSKdF5KFG6axidrUg8RiV65A", - "indexid": "xKxWwevoueR6wo87AvvFZMFAt8h9EHjvu5", - "hash160result": "70a65a9b459169a05b34f101ff0631cf0763d37f", +exports.IDENTITY_OVER21 = { + "vdxfid": "iAXYYrZaipc4DAmAKXUFYZxavsf6uBJqaj", + "indexid": "xFMf1ezfa8piqLeCBD8QWxV7xXg7mxMc1Z", + "hash160result": "7a1fee70ace1c048c0a93c120a8a4c5f890f5b4d", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.over18" + "name": "vrsc::identity.over21" } }; -exports.IDENTITYDATA_OVER21 = { - "vdxfid": "i6E3RQUUX3jt8CkizuLX6ihZHTegCmmbj4", - "indexid": "xB49tCuZNMxYkNdkrazg57E6K7fh65oniA", - "hash160result": "6238fac23c82ebadd8f79306558cb8ddc62b2b1e", +exports.IDENTITY_OVER25 = { + "vdxfid": "iDuForPTZFeFBAgDX1HyrP3d6of7wzrRaS", + "indexid": "xJjNGepYQZruoLZFNgx8pmaA8Tg8qSfnzM", + "hash160result": "2a1e6fa6913ea3659dcaf1c5bc20a96e399d5e72", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.over21" + "name": "vrsc::identity.over25" } }; -exports.IDENTITYDATA_OVER25 = { - "vdxfid": "iHqnuVSGJAjF4SXqurNB2h3sY7q5raxhDr", - "indexid": "xNfuNHsM9UwugcQsmY2L15aQZmr6n3MA8x", - "hash160result": "88c15026283fb46b5a6b3de4f4b5a33a7f69979d", +exports.IDENTITY_ACCOUNT_REQUESTING_IPADDRESS = { + "vdxfid": "i4uE1EvnDbq9WGhF5UbBr6fbxNLsgk1eZ3", + "indexid": "x9jLU3Ms4v3p8SaGwAFLpVC8z2MtYJTVwp", + "hash160result": "05a3aa58192812972a2c4e4184af7bb5fbf9a30f", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.over25" + "name": "vrsc::identity.account.requesting.ipaddress" } }; -exports.IDENTITYDATA_IPADDRESS = { - "vdxfid": "i6HsaWESEEpa1RGPeuksdCQWZ8Svvq7w4e", - "indexid": "xB7z3JfX5Z3Edb9RWbR2baw3anTwtiKSmr", - "hash160result": "4fceb989885b50eb19d713f76fe53b62449ee41e", +exports.IDENTITY_EMAIL = { + "vdxfid": "iJ4pq4DCymfbu8SAuXyNhasLeSHFNKPr23", + "indexid": "xNtwHreHq5tGXJKCmDdXfyPsg6JGHUY6X1", + "hash160result": "15a8095b6298bbff5147060d9a6363a9df6c0ea0", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.ipaddress" + "name": "vrsc::identity.email" } }; -exports.IDENTITYDATA_EMAIL = { - "vdxfid": "i8nmFBXnQNFK6HmNM1XHr6xLECPEry44Xr", - "indexid": "xDcshyxsFgTyiTeQChBSpVUsFrQFg1ph6J", - "hash160result": "31b2f16b20e9fdc1e11f37d07ba97f5463a54b3a", +exports.IDENTITY_NATIONALITY = { + "vdxfid": "iEUYNTkw6kFhZWto7vyTpQqtdRL7eoKZY2", + "indexid": "xKJeqGC1x4UNBgmpycdcnoNRf5M8btexbt", + "hash160result": "db935713b90281d6aefe5e7b33e5b660962aaa78", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.email" + "name": "vrsc::identity.nationality" } }; -exports.IDENTITYDATA_FIRSTNAME = { - "vdxfid": "i4GqsotHGa4czCdtg2d8FVHKfJFzVyBPrM", - "indexid": "x96xLcKN7tHHcNWvXiHHDsorgxH1REYzrR", - "hash160result": "31e7d78d45dd436cd977ac0f9ed03094bd87c208", +exports.IDENTITY_FIRSTNAME = { + "vdxfid": "iLB8SG7ErJtTYcG1f4w9RLuMJPpAsjFkiL", + "indexid": "xR1Eu4YKhd78An93WkbJPjRtL3qBprmMno", + "hash160result": "0bab76359b70b37c858399c2a3776939c5de2fb7", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.firstname" + "name": "vrsc::identity.firstname" } }; -exports.IDENTITYDATA_MIDDLENAME = { - "vdxfid": "iB8d3HBPEr3tsxsNoCGxDwfr9teVwugeyK", - "indexid": "xFxjW5cU6AGZW8kQesw7CLCPBYfWtK6d9G", - "hash160result": "2044d9008acd28b1795ff04788289d24135efd53", +exports.IDENTITY_MIDDLENAME = { + "vdxfid": "iHG6ALRUPyRcgJMsPqBmvUCZxe4PrMfgej", + "indexid": "xN6Cd8rZFHeHJUEuFWqvtrj6zJ5QjX94j5", + "hash160result": "b98bd82034ec86ae5538313c9f5501c086ac3797", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.middlename" + "name": "vrsc::identity.middlename" } }; -exports.IDENTITYDATA_LASTNAME = { - "vdxfid": "iHybTrNB1kXRrjsCtJXd6fvBKxepqMpS5Z", - "indexid": "xNohveoFs4k6UukEjzBn54SiMcfqhV66Vg", - "hash160result": "3c3fb99f2b33f5c20c890f36fa8cc1ff3d30119f", +exports.IDENTITY_LASTNAME = { + "vdxfid": "iKRmfy4xgjWQyPdXYie6dJezRXF4aKdbHB", + "indexid": "xQFt8mW3Y3j5bZWZQQJFbhBXTBG5S4vdaZ", + "hash160result": "6b597e0c05d1430566b7b17a59da683fb4a6fcae", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.lastname" + "name": "vrsc::identity.lastname" } }; -exports.IDENTITYDATA_HOMEADDRESS = { - "vdxfid": "i6AtrvvqMkzVPQqtEmzn1EbjkzF3CbaM9L", - "indexid": "xB11KjMvD5DA1aiv6Tevyd8GneG45Q5BLp", - "hash160result": "f83d7549817e9eda543bf587689c06e814c7921d", +exports.IDENTITY_GENDER = { + "vdxfid": "iShgSBdiYDQnVwgNcDnSbNYHGU6CTwBDb1", + "indexid": "xXXntz4oPXdT87ZQTuSbZm4pJ87DGEgHpG", + "hash160result": "3baee594e927d47b641c7cf3927ab3229dd0c7fe", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.homeaddress" + "name": "vrsc::identity.gender" } }; -exports.IDENTITYDATA_HOMEADDRESS_STREET1 = { - "vdxfid": "iL29rGaWXcww4fwe8Us1kg7Y16XUDgaWFC", - "indexid": "xQrGK51bNwAbgqpfzAXAj4e52kYV4o2k7S", - "hash160result": "b898ec5f2c3633b099b4f8332b987d938c4e7db5", +exports.IDENTITY_HEIGHT = { + "vdxfid": "iLmLmsFMTUm4dd2iMuMe4xaMC8VSZN9soP", + "indexid": "xRbTEfgSJnyjFnukDb1o3M6tDnWTSUiii7", + "hash160result": "e80652253fa52b95cd9ea5ff43d51642ea4fa8bd", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.homeaddress" - }, - "bounddata": { - "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + "name": "vrsc::identity.height" } }; -exports.IDENTITYDATA_HOMEADDRESS_STREET2 = { - "vdxfid": "iPfVvVxRkpE8WXKAeCYGTxsdpLa1Eh1KzD", - "indexid": "xUVcPJPWc8So8hCCVtCRSMQAqzb25YSnPA", - "hash160result": "8c2235594883052b88799461f306c084b0d475dd", +exports.IDENTITY_EYECOLOR = { + "vdxfid": "iRo2XT8tcMtLTpuPJ6V5WxbnVWa2CrcdsJ", + "indexid": "xWd8zFZyTg715znR9n9EVM8KXAb328xGbZ", + "hash160result": "c60fdfcc04173f273aa92a3b1844964b368ad2f4", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.homeaddress" - }, - "bounddata": { - "vdxfkey": "i3h8D5kGtn6DCVCwPFvbypbFCqfzAhXiD2" + "name": "vrsc::identity.eyecolor" } }; -exports.IDENTITYDATA_HOMEADDRESS_CITY = { - "vdxfid": "iFRUFNWPsrDNNLfCWhAqFoUamhwryjx27c", - "indexid": "xLFaiAwUjAS2zWYENNpzEC17oMxspXLHnY", - "hash160result": "ea4cad23a3b421b827747769be86b29d699a0d83", +exports.IDENTITY_ETHNICITY = { + "vdxfid": "i9jHPJokwnLoCQ83P6jqezCcEZUD1g34B9", + "indexid": "xEZPr7Eqo6ZTpa15EnPzdNj9GDVDsfToki", + "hash160result": "0476d568a9cf949bc8b6d84dc73e38cf85449b44", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.homeaddress" - }, - "bounddata": { - "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + "name": "vrsc::identity.ethnicity" } }; -exports.IDENTITYDATA_HOMEADDRESS_REGION = { - "vdxfid": "iRmhi8Z6STjtt4nE1MWJCgYGrKBGT1dWaB", - "indexid": "xWbpAvzBHmxZWEfFs3ATB54osyCHLkZ74h", - "hash160result": "b94c5f0aba29341980e1711c4e6f4ac6cf6a92f4", +exports.IDENTITY_WEIGHT = { + "vdxfid": "iMzGK44r6SNkzi3N3AmcZBtuysPvgYiRiT", + "indexid": "xSpNmrVvwkbRcsvPtrRmXaRT1XQwXFe2Ut", + "hash160result": "8abe0e94cb1ff345f1351720acc8eefed91e12cb", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.homeaddress" - }, - "bounddata": { - "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" + "name": "vrsc::identity.weight" } }; -exports.IDENTITYDATA_HOMEADDRESS_POSTCODE = { - "vdxfid": "i8XMZQ3NGhEvtRA9e68tShsRgABHdrJYkV", - "indexid": "xDMU2CUT81TbWb3BVmo3R6PxhpCJZUQwNj", - "hash160result": "a94d72335f27128bf57a31ac38c6e0e374a26137", +exports.IDENTITY_HOMEADDRESS = { + "vdxfid": "i9A1fD5sVwFFXzEmCJWSRDqN94PXp9oNaS", + "indexid": "xDz881WxMFTvAA7o3zAbPcMuAiQYiT4Vnc", + "hash160result": "072a3abed3a353e001288074d9426285e569503e", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.homeaddress" - }, - "bounddata": { - "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" + "name": "vrsc::identity.homeaddress" } }; -exports.IDENTITYDATA_HOMEADDRESS_COUNTRY = { - "vdxfid": "iAaJZj9yTRxT1WrYu42YWCeTAuCkeWJnip", - "indexid": "xFQR2Xb4JkB7dgjakjghUbAzCZDmbcGPTX", - "hash160result": "15f33d581893957024d128d7fa060ec86fa2e04d", +exports.IDENTITY_HOMEADDRESS_STREET1 = { + "vdxfid": "i5BJAwQbrP4Bht8gUpoqSrovuBwfRc6jiv", + "indexid": "xA1QdjqghhGrL41iLWTzRFLTvqxgNsVzXY", + "hash160result": "ff22b196e64c9388daab76a57bcaea50491cae12", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.homeaddress" - }, - "bounddata": { - "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" + "name": "vrsc::identity.homeaddress.street1" } }; -exports.IDENTITYDATA_IDNUMBER_VALUE = { - "vdxfid": "i79FRsacpZYQ9yVFYUK5x6eeUeS1EGNprE", - "indexid": "xByMtg1hfsm4n9NHQ9yEvVBBWJT24wRXnq", - "hash160result": "e9b3c40de3185cb462bf8c76f75ba10da53d3b28", +exports.IDENTITY_HOMEADDRESS_STREET2 = { + "vdxfid": "iMx71C14hrBoWD3yyhYChmhJEw4Kqw1zj4", + "indexid": "xSnDTzS9ZAQU8Nw1qPCMgADqGb5Lgqb4zw", + "hash160result": "efdda473a6a9e98cd91b02d36bfeb5dec784a9ca", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idnumber.value" + "name": "vrsc::identity.homeaddress.street2" } }; -exports.IDENTITYDATA_IDNUMBER_TYPE = { - "vdxfid": "iHmUB12ZvCagSnp8RYifzEiVzu6q4EXSx6", - "indexid": "xNbadoTemWoM4xhAHENpxdF32Z7r2EHU4B", - "hash160result": "db12844ffbf6244f5506938229916f986f1cc69c", +exports.IDENTITY_HOMEADDRESS_CITY = { + "vdxfid": "i75ZpW5T6wgQEMVxyvqHT9ZaV4fjsQ7kws", + "indexid": "xBugHJWXxFu4rXNzqcVSRY67WigkoCUEUQ", + "hash160result": "fcae40d5d327f13dc0e0c1e80f3db212a4ed8827", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idnumber.type" + "name": "vrsc::identity.homeaddress.city" } }; -exports.IDENTITYDATA_STATUS = { - "vdxfid": "iGDz9GLxDULfhzPJs2hU7MuHoyEzHUr1oA", - "indexid": "xM46c4n34nZLLAGLiiMd5kRpqdG17kNgXH", - "hash160result": "424d072b54b489c27a36a8a10ce7d0b738b1d98b", +exports.IDENTITY_HOMEADDRESS_REGION = { + "vdxfid": "iRkYck3JowdFWmrM6VUAS8Wtpmxds2fLXS", + "indexid": "xWaf5YUPfFqv8wjNxB8KQX3RrRyenbioh5", + "hash160result": "fa06b90a547658a3efc3cd1797d6b3cd30695af4", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.status" + "name": "vrsc::identity.homeaddress.region" } }; -exports.IDENTITYDATA_APPROVALS_ACCEPTEDTOS = { - "vdxfid": "iAaWyLM18QHXa4WFSoYXNrbWP4DG3fGUqu", - "indexid": "xFQdS8n5yiWCCEPHJVCgMF83QiEGuAX7Lu", - "hash160result": "7c0f3d2f6ec35b7702f6e3b394a06877cafdea4d", +exports.IDENTITY_HOMEADDRESS_POSTCODE = { + "vdxfid": "iAL2FRG8PVi18fN8MatjXhV1YkuZr7PM4T", + "indexid": "xFA8iDhDEovfkqFADGYtW61YaQvahtrhJA", + "hash160result": "b4f4c3a08fdcf32209482fa3d8c7b01201312d4b", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.approvals.acceptedtos" + "name": "vrsc::identity.homeaddress.postcode" } }; -exports.IDENTITYDATA_APPROVALS_VERIFIEDSMS = { - "vdxfid": "iCjR6fQST9YLLn72B96aHgSjF54v6UXqSf", - "indexid": "xHZXZTqXJTkzxwz42pkjG4yGGj5vvcnSQq", - "hash160result": "26bf160fb405c0fad15a9b5c2f602dbd61158a65", +exports.IDENTITY_HOMEADDRESS_COUNTRY = { + "vdxfid": "iABYGvas6uUDk9ejCkfCVLvE9PPJXgyCKX", + "indexid": "xF1ejj1wxDgtNKXm4SKMTjSmB3QKL8LhQG", + "hash160result": "bafb2cb6d5cc86478622feb8a00097d71d839249", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.approvals.verifiedsms" + "name": "vrsc::identity.homeaddress.country" } }; -exports.IDENTITYDATA_APPROVALS_KYCCHECKED = { - "vdxfid": "iH9AxMi9qB1RFkZ3HQW11c2xcntwQ21j3M", - "indexid": "xMyHRA9EgVE5svS596A9yzZVeSuxBAkxdv", - "hash160result": "22d9177c4b16c2316d85f84a1594903f7bc3e895", +exports.IDENTITY_IDNUMBER_VALUE = { + "vdxfid": "iQrnvbCNWMaG6PjTmeXzrcuAXKsMzmNJWA", + "indexid": "xVguPPdTMfnviZcVdLC9q1RhYytNuZ3ToS", + "hash160result": "72cf52b2f6b4f68173c933fb046e892870b990ea", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.approvals.kycchecked" + "name": "vrsc::identity.idnumber.value" } }; -exports.IDENTITYDATA_APPROVALS_DOCUMENTSVERIFIED = { - "vdxfid": "iAC86tdUvqwcSwUowKZGG4WPxTzNSwuHCo", - "indexid": "xF2EZh4ZnAAH57Mqo1DRET2vz81PNz5i7r", - "hash160result": "c183cce3b8a5360b52a6237a15c43f96e1bfae49", +exports.IDENTITY_IDNUMBER_TYPE = { + "vdxfid": "iSSZX5yUdQh7zLf1gUewH5rVfbXtSq2c4s", + "indexid": "xXGfytQZUiuncWY3YAK6FUP2hFYuQ4yYwW", + "hash160result": "2807f356d687b4c6208ce0379b31043c7fcdebfb", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.approvals.documentsverified" + "name": "vrsc::identity.idnumber.type" } }; -exports.IDENTITYDATA_APPROVALS_SELFIECHECKED = { - "vdxfid": "iFYWGcgSm4jGnDTfNnuk9TzcQmkWAdxpwe", - "indexid": "xLNcjR7XcNwwQPLhEUZu7rX9SRmX1dHrha", - "hash160result": "28e13d3434ffeb8045e813da5df34b06cc336284", +exports.IDENTITY_VERIFICATION_STATUS = { + "vdxfid": "i8MhqW3ejupmV1M5UyhyhG13dkS8A7g7zg", + "indexid": "xDBpJJUjbE3S7BE7LfN8feXafQT92YQZPm", + "hash160result": "47f2864de74ffe01ccb7eeabf0f2d848e3668e35", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.approvals.selfiechecked" + "name": "vrsc::identity.verification.status" } }; -exports.IDENTITYDATA_APPROVALS_WATCHLIST_OK = { - "vdxfid": "iFtRaMKJGyaqgpiH4ZXeGZMMR47C1u34Jt", - "indexid": "xLiY39kP8HoWJzbJvFBoEwstSi8CsZK8Jz", - "hash160result": "d29c35a645ac1c92fa0506482c37370c609a2688", +exports.IDENTITY_VERIFICATION_APPROVALS = { + "vdxfid": "iBMkZtqC9yqVrFL4GfYtXckFpYAhRkE2mj", + "indexid": "xGBs2hGH1J4AURD68MD3W1GnrCBiJ3nRgG", + "hash160result": "a98801de1ba5ff5e571dbdde50519483140f7956", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.approvals.watchlist.ok" + "name": "vrsc::identity.verification.approvals" } }; -exports.IDENTITYDATA_APPROVALS_RISKCHECKOK = { - "vdxfid": "i4pkwqbNCZj3ZrukRooKDAidLJ2SJt57Tf", - "indexid": "x9esQe2T3swiC2nnHVTUBZFAMx3TBR2Ew1", - "hash160result": "4650258cd77d7928a47ee880075592d8a7b9cb0e", +exports.IDENTITY_VERIFICATION_APPROVALS_ACCEPTEDTOS = { + "vdxfid": "iH32QkXBKyWEJD6kh9HJ4KMfeiWfPWoHEh", + "indexid": "xMs8sYxGBHitvNynYpwT2htCgNXgHt6VAW", + "hash160result": "bbe4c09ae069561d3c14b04e3b7b96c98622bf94", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.approvals.riskcheckok" + "name": "vrsc::identity.verification.approvals.acceptedtos" } }; -exports.IDENTITYDATA_DRIVINGLICENCE = { - "vdxfid": "iQe74mwXJTFv1Bg8MRg7zqBMFUsD6jhTxz", - "indexid": "xVUDXaNc9mUadMZAD7LGyDhtH8tDzeHFrT", - "hash160result": "72eaff870cdd9c650afcfed1e379330fd7752ae8", +exports.IDENTITY_VERIFICATION_APPROVALS_VERIFIEDSMS = { + "vdxfid": "iPgyMDFQ9QMNrqc3ckEBEubDNwLnvubUdW", + "indexid": "xUX5p1gUzia3V1V5URtLDJ7kQbMosPsVj8", + "hash160result": "72853b66aa158531e1f15b9ff075199a1224bddd", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" + "name": "vrsc::identity.verification.approvals.verifiedsms" } }; -exports.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_FRONT = { - "vdxfid": "iSBvWubN2yGHsdj6dGL3vMDjZMU6XSWxyG", - "indexid": "xX22yi2StHUxVoc8UwzCtjkGb1V7R95hsy", - "hash160result": "2720c73719ffc070c103fa30689283fc331727f9", +exports.IDENTITY_VERIFICATION_APPROVALS_KYCCHECKED = { + "vdxfid": "iRnbiA4dAPbeuB6KQN2donBHP9mKUHHFZf", + "indexid": "xWciAxVi1hpKXLyMG3gnnAhpQonLQapWPv", + "hash160result": "c6114ffec250b746bde117903b930d9a34d3bdf4", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iBrpt78Mdrqcc1RHwPWKYBALbNTC4cwdJQ" + "name": "vrsc::identity.verification.approvals.kycchecked" } }; -exports.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_BACK = { - "vdxfid": "iH81F6cj2Kjf2JzRxXAnc9oMQdGQqdQMzD", - "indexid": "xMx7hu3osdxKeUsTpCpwaYKtSHHRowL8Sr", - "hash160result": "e146bb291bd348f94e84910e13c00310b13db095", +exports.IDENTITY_VERIFICATION_APPROVALS_DOCUMENTSVERIFIED = { + "vdxfid": "iBjML9DHV67MBQyMEHVTSoJPhU8DNeWRTE", + "indexid": "xGZTnweNLQL1oarP5y9cRBpvj89EGt5VSm", + "hash160result": "0a93883010769ff783be5ced074ecfa50dd08e5a", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iNRCZp7JBDHbpKQ2Vhc6TK97hUSRPG4jaX" + "name": "vrsc::identity.verification.approvals.documentsverified" } }; -exports.IDENTITYDATA_DRIVINGLICENCE_CROPPED_FRONT = { - "vdxfid": "i87ecHwJRUhAA2WaW9FtVotnEWx3BAt7Y8", - "indexid": "xCwm56NPGnupnCPcMpv3UCRKGAy43NWsQw", - "hash160result": "78d9f3f3ccdbf650adb03eb0482273cf51e2e532", +exports.IDENTITY_VERIFICATION_APPROVALS_SELFIECHECKED = { + "vdxfid": "iKgeFKoy6WMx9MoEjig5vHoXbyxVFBPWDN", + "indexid": "xQWki8F3wpacmXgGbQLEtgL4ddyWC8UZLv", + "hash160result": "6a044306ef77ce9896ffcd26ee40174651b1ccb1", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iK822dFQwW2Y5tdpSpxQtHQemf47HoFxqs" + "name": "vrsc::identity.verification.approvals.selfiechecked" } }; -exports.IDENTITYDATA_DRIVINGLICENCE_CROPPED_BACK = { - "vdxfid": "iAPcY54xD3v1WC7zQatbbQnqJe4A6KUaex", - "indexid": "xFDizsW34N8g8N12GGYkZoKNLJ5AzeGTf7", - "hash160result": "b45cb25e26d152c9221f9719d696c18d8c0fdb4b", +exports.IDENTITY_VERIFICATION_APPROVALS_WATCHLISTOK = { + "vdxfid": "iFDB1qKYSrWMRaMCWX6hNGE8HVXB1cNtJu", + "indexid": "xL3HUdkdJAj23kEENCkrLekfK9YBymnLrX", + "hash160result": "e691a2d2af30df6ee21f0eb805a98e11d539ba80", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iCvxKVHbnbwHGZDTaGofeyyJLjsGBSZr7A" + "name": "vrsc::identity.verification.approvals.watchlistok" } }; -exports.IDENTITYDATA_DRIVINGLICENCE_FACE = { - "vdxfid": "i9fwBhdsQduiAWhG99wxXwnCRmRXJrbcG4", - "indexid": "xEW3eW4xFx8NngaHzqc7WLJjTRSYDHiUc7", - "hash160result": "834ec04a48c045a0814985a32f02d3125728f943", +exports.IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK = { + "vdxfid": "i9dva492S7vQphjLiK2UaS7JikZKs5TQsB", + "indexid": "xEU32ra7HS95SscNZzgdYpdqkQaLjnzcyC", + "hash160result": "6ffdbee07124450d29698724573bd6ab07d09743", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iPrxPJC6NbzWnkNyLSvwa8AVrwJWBUV9mM" + "name": "vrsc::identity.verification.approvals.riskcheckok" } }; -exports.IDENTITYDATA_DRIVINGLICENCE_IDNUMBER = { - "vdxfid": "i5JGvSuGVEb9xgNb9ezTTJ8zucrp75Ac98", - "indexid": "xA8PPFLMLYoparFd1LecRgfXwGsq32EUV4", - "hash160result": "26fae70b9b3ea6cb14ca10c9620dc04899faff13", +exports.IDENTITY_VERIFICATION_APPROVALS_STATUS = { + "vdxfid": "iKhGUcTH4ZQ7uiy933m8f1GbwSLcwJW8ev", + "indexid": "xQXNwQtMuscnXtrAtjRHdPo8y6MdomjAXM", + "hash160result": "00612f17d9cedc346fcd139c0c5b56e666efeab1", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iJdUp47SVEzGEHCvoRyix2xufRsAeWSyxa" + "name": "vrsc::identity.verification.approvals.status" } }; -exports.IDENTITYDATA_DRIVINGLICENCE_CATEGORY = { - "vdxfid": "i5xXPRL3h45Zf2jErvDwD18DeDzGFRaACg", - "indexid": "xAndrDm8YNJEHCcGibt6BPekft1H9NjSHE", - "hash160result": "5d77333ae97ba2324126925bc54e06513adc3b1b", +exports.IDENTITY_DRIVINGLICENCE = { + "vdxfid": "iMYQw33ryywcNyQDjFjiVvFm2kAwG85poV", + "indexid": "xSNXPqUwqJAH19HFawPsUJnJ4QBxCATPNx", + "hash160result": "e2857ddcc4f3301c354a00d1376558a75e802ec6", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "i9MqRfXPAiYwv9q4iSjTtXquNCCZ1GgECn" + "name": "vrsc::identity.drivinglicence" } }; -exports.IDENTITYDATA_DRIVINGLICENCE_EXPIRATIONDATE = { - "vdxfid": "iPUSmAtyyTsYNiDppDK8c4rkUjXyiDTm5D", - "indexid": "xUJZDyL4pn6Czt6rftyHaTPHWPYzXZS1No", - "hash160result": "6e6e96148a0314aaeecdfaed9a474150e09d5edb", +exports.IDENTITY_DRIVINGLICENCE_ORIGINALFRONT = { + "vdxfid": "i3fq6ET2dL8CxC3BJzdYTpUsjEsQaKP7bX", + "indexid": "x8VwZ2t7UeLsaMvDAgHhSD1QkttRPYndPW", + "hash160result": "26bab54e1f760b1abb888229a38a5179cc502302", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iNgDKviLAeeV65eBztuduckUMDE2erB7jj" + "name": "vrsc::identity.drivinglicence.originalfront" } }; -exports.IDENTITYDATA_DRIVINGLICENCE_ISSUING_COUNTRY_MATCHED = { - "vdxfid": "iGvEHvVEiQJzUQXacJsPAt5oE5ufWpA5rB", - "indexid": "xMkLkivKZiXf6aQcTzXY9GcLFjvgMyaUmx", - "hash160result": "e4fb439a302b423d65dbccee97fdbd6757247693", +exports.IDENTITY_DRIVINGLICENCE_ORIGINALBACK = { + "vdxfid": "i7LTNZvJmm5LjAwMWuryb52yKt7txaV5FW", + "indexid": "xCAZqNMPd5J1MLpPNbX8ZTZWMY8unxdAfs", + "hash160result": "c7b3e9a70908fafc8de3e81f6ac2e0c131c9592a", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iFgXmTd9Wi2sqZyPqaoejdHG2sMaJWLrEX" + "name": "vrsc::identity.drivinglicence.originalback" } }; -exports.IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION = { - "vdxfid": "iJL72hPk4rFyEmBfdsHJGBUyKMJRrqcR9t", - "indexid": "xPADVVppvAUdrw4hVYwTEa1WM1KSjZsjUc", - "hash160result": "76a99a38988e107e418f24f32d1080f93930f2a2", +exports.IDENTITY_DRIVINGLICENCE_CROPPEDFRONT = { + "vdxfid": "i8KsL3JJgbJyuqEyEbu5KZkDBFvHscLoM6", + "indexid": "xD9ynqjPXuXeY1816HZEHxGkCuwJoHBx54", + "hash160result": "7b28226a4f3eaae379cddbc84d037cfe587e3535", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL" + "name": "vrsc::identity.drivinglicence.croppedfront" } }; -exports.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH = { - "vdxfid": "iC88nTf9EzCKt2CnkudSRcu7yxNiA16c9G", - "indexid": "xGxFFG6E6JQzWC5pcbHbQ1Rf1cPj1kEyFH", - "hash160result": "f55e5a3f98219f06eb0b4b31a935ff1721e8dd5e", +exports.IDENTITY_DRIVINGLICENCE_CROPPEDBACK = { + "vdxfid": "iRwumhx12vtT8CkspBLmKQY8WZywurxVXo", + "indexid": "xWn2EWP5tF77kNdufrzvHo4fYDzxhjXyZz", + "hash160result": "0b6edf21bfe119173b3fffab6118d79a39a580f6", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iQhjETQvSkadciDPy69QZNy3hSczWQ4iu4" + "name": "vrsc::identity.drivinglicence.croppedback" } }; -exports.IDENTITYDATA_DRIVINGLICENCE_ADDRESS = { - "vdxfid": "iK8RX6S9uzcnUoVPeLigNt4Cu156zEpodu", - "indexid": "xPxXytsEmJqT6yNRW2NqMGajvf67xnbJFY", - "hash160result": "7fcee36de098accefe0f473da0b06914c9c1b4ab", +exports.IDENTITY_DRIVINGLICENCE_FACE = { + "vdxfid": "i5i7U4EAbgPzhCRebtbmoZt6pTyqGqP8jj", + "indexid": "xAYDvrfFSzcfKNJgTaFvmxQdr7zr6oGgFh", + "hash160result": "1f47647bf3e71f0c1c2638c99e6a42e6bf118218", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iGebr2v1TgkWvsyLjs1dQ5SqffqKL8rNm3" + "name": "vrsc::identity.drivinglicence.face" } }; -exports.IDENTITYDATA_DRIVINGLICENCE_STREET1 = { - "vdxfid": "iGNX6JaTu92GhPNBpbQkZ9Koro2W35GLjm", - "indexid": "xMCdZ71YkTEwKZFDgH4uXXrLtT3WwU1hvB", - "hash160result": "3e225a69f52b9bab5fee67ed7ed5d6c7d6da768d", +exports.IDENTITY_DRIVINGLICENCE_IDNUMBER = { + "vdxfid": "iBCA8b4zS5ygVgTFqxabke7BBFs92dhcXQ", + "indexid": "xG2GbPW5HQCM7rLHheEkj2diCut9vgFhM2", + "hash160result": "fcf0571278bd1afce6d93f0a99f41437bb91a854", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + "name": "vrsc::identity.drivinglicence.idnumber" } }; -exports.IDENTITYDATA_DRIVINGLICENCE_CITY = { - "vdxfid": "i7eLwQmDNfc64xc4Qm7AnSsaa1BwCdhTSK", - "indexid": "xCUTQDCJDypkh8V6GSmKkqQ7bfCx41No4i", - "hash160result": "d69209a7ac10320134b836872b7cd7ad10e7bb2d", +exports.IDENTITY_DRIVINGLICENCE_CATEGORY = { + "vdxfid": "i5Cm95DZa6FPP66bA6aFfoYL2jaojetHMp", + "indexid": "xA2sbseeRQU41Fyd1nEQeC4s4Pbpf63xB4", + "hash160result": "3b91fccdf59d99b21e442441b89abb31bf09f512", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + "name": "vrsc::identity.drivinglicence.category" } }; -exports.IDENTITYDATA_DRIVINGLICENCE_REGION = { - "vdxfid": "iKtdJHgdvUJ4vxSxr86cNcaj8Zq4KCZJJh", - "indexid": "xQijm67imnWjZ8KzhokmM17GADr5GSTj4A", - "hash160result": "f88b44fa9b07a70cd77a9831e89e80505fe410b4", +exports.IDENTITY_DRIVINGLICENCE_EXPIRATIONDATE = { + "vdxfid": "iJvGpPoP1uUkUqn9bAchLyfaGWyy8JGQoX", + "indexid": "xPkPHCETsDhR71fBSrGrKNC7JAzz17RsLk", + "hash160result": "96aee63b3c6094a4d9edbc04b63a8e45688068a9", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" + "name": "vrsc::identity.drivinglicence.expirationdate" } }; -exports.IDENTITYDATA_DRIVINGLICENCE_POSTCODE = { - "vdxfid": "i3oy6rsBBWtJ11ZNHvyFPHERK9BGQtQod1", - "indexid": "x8e5ZfJG2q6xdBSQ9cdQMfkxLoCHEubx1i", - "hash160result": "9d7bfbe011ca5889ed8e47a1b2a0320c9654ad03", +exports.IDENTITY_DRIVINGLICENCE_ISSUINGCOUNTRY = { + "vdxfid": "iBsNEqysX64cQAjiRHHL1msd7LxroGM6Mb", + "indexid": "xGhUheQxNQHH2LckGxwUzAQA8zysfnKDSU", + "hash160result": "f2f24dd2383538493d21ff0aca77c7cd1fe6125c", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" + "name": "vrsc::identity.drivinglicence.issuingcountry" } }; -exports.IDENTITYDATA_DRIVINGLICENCE_COUNTRY = { - "vdxfid": "iMZemCqP6BFZzxTA9AG34ghv4HaiFiS6E6", - "indexid": "xSPmE1GTwVUEd8LBzqvC35ET5wbj7m7HY8", - "hash160result": "546fdf34874119f799b1f8b0014a6cd467766ac6", +exports.IDENTITY_DRIVINGLICENCE_ISSUINGREGION = { + "vdxfid": "i6gZSDYpK9inexaeFQDSk9GuAmew1ymMFo", + "indexid": "xBWfu1yuATwTH8Tg75sbiXoSCRfwsxQzeR", + "hash160result": "67f4fd5c49250912aecf1eb8ab17f29d590a2f23", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" + "name": "vrsc::identity.drivinglicence.issuingregion" } }; -exports.IDENTITYDATA_DRIVINGLICENCE_MATCHED = { - "vdxfid": "i5bAVLDcVEzbs6Awo2REXhHTjx34u9bEGC", - "indexid": "xARGx8ehLZDGVG3yei5PW5ozmc45h9ZyZa", - "hash160result": "d85c4cc4be13249bec299fde232bbcf323ae3117", +exports.IDENTITY_DRIVINGLICENCE_DATEOFBIRTH = { + "vdxfid": "iChWUsL1NQwDqcwXbFGxHiCegfquGPyadv", + "indexid": "xHXcwfm6Dj9tTnpZSvw7G6jBiKrvBUhwaw", + "hash160result": "3c7bd13bcdb54368e7590a9f2da5b201b7be2d65", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk" + "name": "vrsc::identity.drivinglicence.dateofbirth" } }; -exports.IDENTITYDATA_DRIVINGLICENCE_NAME_MATCHED = { - "vdxfid": "i97PqFTkPLKX4R22g27qk7TFdYbLk55fVf", - "indexid": "xDwWJ3tqEeYBgau4XhmziVynfCcMdnsQJP", - "hash160result": "f64f980f5bcde38d71bf6dfdde151c4ecaacd13d", +exports.IDENTITY_DRIVINGLICENCE_ADDRESS_STREET1 = { + "vdxfid": "i9xaEvSQ537wuYgcVPRgG3zop9bVzeDTBw", + "indexid": "xEnghisUvMLcXiZeM55qESXLqocWsv6zmJ", + "hash160result": "48dd1caf84c1a49209ca44064846dc4ad0be1e47", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iKCFQYZudPChh6jypSpcgENoQb5WeX5wHv" + "name": "vrsc::identity.drivinglicence.address.street1" } }; -exports.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH_MATCHED = { - "vdxfid": "iCkJW6AjbtNLTjf4boPPHXpiujRZa9KSeP", - "indexid": "xHaQxtbpTCb15uY6TV3YFvMFwPSaWD2Xv2", - "hash160result": "3261fc33de15f3cedc3a4a4f8c3638144cfeb465", +exports.IDENTITY_DRIVINGLICENCE_ADDRESS_CITY = { + "vdxfid": "i6XMEh3jrxzdyoVYoNWhRSncR9oWSnmikd", + "indexid": "xBMThVUpiHDJbyNaf4ArPqK9SopXGndEyv", + "hash160result": "c1f3612774870d1f12320bff317e7790211d7121", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iMUfUShqVwWrGSx6HvZcDJwHywiLW5Zusb" + "name": "vrsc::identity.drivinglicence.address.city" } }; -exports.IDENTITYDATA_SELFIECHECK_SUCCESS = { - "vdxfid": "i6cbKQVGd1upW3uCQAhvUf7PzFgcoFyH3S", - "indexid": "xBShnCvMUL8V8DnEFrN5T3dw1uhdgNupLp", - "hash160result": "c0b5f21d131d3a18be6c3a1b5442197cb4f26e22", +exports.IDENTITY_DRIVINGLICENCE_ADDRESS_REGION = { + "vdxfid": "i7sPBSqerD23RAqfN167aYePjfC8LL34UA", + "indexid": "xChVeFGjhXEi3LihDgkGYwAvmKD9CsNunu", + "hash160result": "991d24c053cb59a816e161fe3af2f40a7f2e3330", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.selfiecheck.success" + "name": "vrsc::identity.drivinglicence.address.region" } }; -exports.IDENTITYDATA_SELFIECHECK_IMAGE = { - "vdxfid": "i9oYuguYwqLhXN1y4afj6vYjaWmzuWtuZU", - "indexid": "xEdfNVLdo9ZN9XtzvGKt5K5GcAo1jKrFH7", - "hash160result": "dacb095d88ab704ac181d701a7fcdf20e0e36945", +exports.IDENTITY_DRIVINGLICENCE_ADDRESS_POSTCODE = { + "vdxfid": "i9eHAmpeA3tmpsVeG5EkHuVfALFrmpzLqM", + "indexid": "xEUPdaFj1N7ST3Ng7ktuGJ2CBzGsZbja5V", + "hash160result": "f5905bbdf2eb60b24ccf6851716cc0efe801a943", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.selfiecheck.image" + "name": "vrsc::identity.drivinglicence.address.postcode" } }; -exports.IDENTITYDATA_SELFIECHECK_VIDEO = { - "vdxfid": "iGQGK7d1Wdfq9ERxmNXD5fjH7v5SUHxZ9K", - "indexid": "xMENmv46MwtVmQJzd4BN44Fp9a6TKf2CyG", - "hash160result": "5a4b0ee7c8e2f91d641d3e18b35343ee8a59cb8d", +exports.IDENTITY_DRIVINGLICENCE_ADDRESS_COUNTRY = { + "vdxfid": "i3xAMYBKLVdK89kuheXhTjuJTAxozmypj3", + "indexid": "x8nGpLcQBoqykKdwZLBrS8RqUpypqVUEV5", + "hash160result": "459844e00df4387514f31f182a88f7e13b0d3a05", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.selfiecheck.video" + "name": "vrsc::identity.drivinglicence.address.country" } }; -exports.IDENTITYDATA_SELFIECHECK_DRIVINGLICENCE_MATCH = { - "vdxfid": "iLGaXTpb8baibivmJL2yVvX259ir3tewjx", - "indexid": "xR6gzGFfyuoPDtooA1h8UK3Z6ojrxc8Jyf", - "hash160result": "19b7f38204fa54f56f62b7b67275ff4c84ba37b8", +exports.IDENTITY_SELFIECHECK_IMAGE = { + "vdxfid": "iC22PxGqY7Mx3YT9kNrW1d11JNyGL56N8e", + "indexid": "xGr8rkhvPRacfiLBc4Wez1XYL2zHDDbJgD", + "hash160result": "c52d0023cce8c847a5097b6898f867651914b65d", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.selfiecheck.drivinglicence.match" + "name": "vrsc::identity.selfiecheck.image" } }; -exports.IDENTITYDATA_KYC_SUCCESS = { - "vdxfid": "iJbbE37yKagBMCvoYPMnkKd3P6eTTGv1Qd", - "indexid": "xPRhgqZ4AttqyNoqQ51wii9aQkfUKWhnpJ", - "hash160result": "1a1bebe6bade7b23cb555a5d1c65f5d2d8f6dfa5", +exports.IDENTITY_SELFIECHECK_VIDEO = { + "vdxfid": "iLfnRYzcdQXR6am8rZk7xNtTUbLZo5NLG6", + "indexid": "xRVttMRhUik5ikeAiFQGvmQzWFMajwrVzX", + "hash160result": "ac0674f6d656d434e0b5b310daaaed554c3a9bbc", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.kyc.success" + "name": "vrsc::identity.selfiecheck.video" } }; -exports.IDENTITYDATA_KYC_ADDRESS_MATCHED = { - "vdxfid": "iP8T2Li3giM7MCJRMw65tajQ2ydx4kW7m6", - "indexid": "xTxZV998Y2ZmyNBTDckEryFw4dexvb7HLT", - "hash160result": "0f7b56de7b92854cffb85f278ca8f7b70a8496d7", +exports.IDENTITY_EMAIL_ISDELIVERABLE = { + "vdxfid": "iN5Tdse8NSwuW6A4ZavHbHoDyD8aVjn1Ky", + "indexid": "xSua6g5DDmAa8G36RGaSZgKkzs9bSnFbCX", + "hash160result": "8194ee01a0bc66dca2af9ba7c3bba4a24da70dcc", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.kyc.address.matched" + "name": "vrsc::identity.email.isdeliverable" } }; -exports.IDENTITYDATA_KYC_TYPE = { - "vdxfid": "iN4C7XtyceBJrNcqAs3dZ3T2DA4vycpUYM", - "indexid": "xStJaLL4TxPyUYVs2YhnXRyZEp5wrpthtP", - "hash160result": "79da13c496750b37d4804e85094e5d0b8f47d0cb", +exports.IDENTITY_EMAIL_BREACHCOUNT = { + "vdxfid": "iDy1YKGhzVjAiMiuAvFDqxQbmLRhLEjwPo", + "indexid": "xJo817hnqowqLXbw2buNpLw8nzSiAygHhx", + "hash160result": "8144d2d8cafd733bb03847166be8493d275e1473", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.kyc.type" + "name": "vrsc::identity.email.breachcount" } }; -exports.IDENTITYDATA_KYC_NAME_MATCHED = { - "vdxfid": "i69dDR9m6JB8bYvT1PbfsVEKiWPZYNgD1E", - "indexid": "xAyjgDaqwcPoDioUs5FpqskrkAQaRi64Pv", - "hash160result": "bf852464c1379ab65e5bb2646bbbb19ee84c551d", +exports.IDENTITY_EMAIL_FIRSTBREACHEDAT = { + "vdxfid": "i3eSGR4wrLk5djHsnT18dDHrJBFSBBxVST", + "indexid": "x8UYjDW2hexkFuAue8fHbbpPKqGT4mjAzH", + "hash160result": "df796054181f57d3b61d655d604d42d6c6d8df01", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.kyc.name.matched" + "name": "vrsc::identity.email.firstbreachedat" } }; -exports.IDENTITYDATA_KYC_DATEOFBIRTH_MATCHED = { - "vdxfid": "iHfdYydzo83X6Y6y66N4n8UvcFTLQSmj9Y", - "indexid": "xNVk1n55eSGBihyzwn2DkX1TduUMHqN49h", - "hash160result": "f26bc9aa3851d21c679d521f60722045c571ab9b", +exports.IDENTITY_EMAIL_LASTBREACHEDAT = { + "vdxfid": "iCuZWBzmxCoFcRFjXYFgC6g4jT7kzxvhew", + "indexid": "xHjfxzRroX1vEb8mPDuqAVCbm78ms8Hkhd", + "hash160result": "d1b421db4c835cfa67b491342c31f89283427567", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.kyc.dateofbirth.matched" + "name": "vrsc::identity.email.lastbreachedat" } }; -exports.IDENTITYDATA_KYC_IDNUMBER_MATCHED = { - "vdxfid": "iJQ5KQrVCkHAKRfmBRa6TuMxW8ZfHKuiMS", - "indexid": "xPEBnDHa44VpwbYo37EFSHtVXnag7ePNwv", - "hash160result": "94abb5b38f44545c981134f44db4d6395c6cb2a3", +exports.IDENTITY_EMAIL_DOMAIN_REGISTEREDAT = { + "vdxfid": "iGxV4SBRZMk5qWrQEKgUS4RoqzpDmyBEpC", + "indexid": "xMnbXEcWQfxkTgjS61LdQSxLseqEcTADNA", + "hash160result": "e195ef220f8e71bfa7bef160291ecaa0164de393", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.kyc.idnumber.matched" + "name": "vrsc::identity.email.domain.registeredat" } }; -exports.IDENTITYDATA_KYC_PHONENUMBER_MATCHED = { - "vdxfid": "iBFp1jupLByoSLJaZWz2gg3v2GipUFoADv", - "indexid": "xG5vUYLuBWCU4WBcRCeBf4aT3vjqNDUWJY", - "hash160result": "7c59b8b820c001d0b361ca67a99c45677c705955", +exports.IDENTITY_EMAIL_DOMAIN_FREEPROVIDER = { + "vdxfid": "iLUfvKcg92CYo3BvCuRf5o844d44kGLhJL", + "indexid": "xRJnP83kzLRDRD4x4b5p4Beb6H55fetTy7", + "hash160result": "0b0f213c88a1b0df6cd01721955b1d0c103981ba", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.kyc.phonenumber.matched" + "name": "vrsc::identity.email.domain.freeprovider" } }; -exports.IDENTITYDATA_KYC_AREACODE_MATCHED = { - "vdxfid": "i7GX7K3sGs227Vf4NEJe3QKxruuUyqFFzp", - "indexid": "xC6da7Ux8BEgjfY6Duxo1nrVtZvVsySF4F", - "hash160result": "4ae70956a849099e8fd2bf0a9b5daa8fd43d9b29", +exports.IDENTITY_EMAIL_DOMAIN_CUSTOM = { + "vdxfid": "i4FSBFpQ6Ccjiy2g61GrxhBppv1jDDh6on", + "indexid": "x95Ye4FUwWqQM8uhwgw1w5iMra2k7F1Lfz", + "hash160result": "bea1175185aeaf256aa7f04795b2c8d0c8547e08", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.kyc.areacode.matched" + "name": "vrsc::identity.email.domain.custom" } }; -exports.IDENTITYDATA_RISKCHECK_STATUS = { - "vdxfid": "i3b3wvsNm5JaMUoV21Y7maVx85BJ2B8xTF", - "indexid": "x8RAQjJTcPXEyegWshCGjy2V9jCJtGhaAq", - "hash160result": "1de1fb500f5c4594a322e249949bc289d9f73b01", +exports.IDENTITY_EMAIL_DOMAIN_DISPOSABLE = { + "vdxfid": "i52PJxRyjKAEkmQFd2oGYgZV3pcsQUcD1T", + "indexid": "x9rVmks4adNuNwHHUiTRX5625UdtJPBQ1w", + "hash160result": "3adf98cb5cc90a074a52a651c50f67f5f0a7fe10", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.riskcheck.status" + "name": "vrsc::identity.email.domain.disposable" } }; -exports.IDENTITYDATA_RISKCHECK_USERINTERACTIONS = { - "vdxfid": "iEGi5rmUzAmnfutUCPp2dS34rSEk1DrevE", - "indexid": "xK6pYfCZqUzTJ5mW45UBbpZbt6FkuN8K7e", - "hash160result": "b0fef6f09eb8a36672e8b15313574b298f486d76", +exports.IDENTITY_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS = { + "vdxfid": "iCtAZWinafiyf4tmvPxFkKNn5KxayXTPSV", + "indexid": "xHiH2K9sRyweHEmon5cQihuK6yybre797b", + "hash160result": "85477eb8148562614c396ca64fc7563637b13167", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.riskcheck.userinteractions" + "name": "vrsc::identity.email.domain.toplevel.suspicious" } }; -exports.IDENTITYDATA_RISKCHECK_FRAUDRINGOK = { - "vdxfid": "i8MQDH1wrdWCf5rTRznhC5ijRy188i1kYU", - "indexid": "xDBWg5T2hwisHFjVHgSrAUFGTd291gaveW", - "hash160result": "7754803c155ad687f4376285828dcda68db07f35", +exports.IDENTITY_PASSPORT = { + "vdxfid": "iKgbqmZ4Ks9SPNQGj5PZ5TgXomYG4CtaXv", + "indexid": "xQWiJZz9BBN71YHJam3i3rD4qRZH1sbLHD", + "hash160result": "775f52820102c994e30a29b1828b064421afcab1", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.riskcheck.fraudringok" + "name": "vrsc::identity.passport" } }; -exports.IDENTITYDATA_RISKCHECK_BOTNOTDETECTED = { - "vdxfid": "iSLcYw9ZcKnYJJTYvJYfk3jo3rjFHHPV7h", - "indexid": "xXAj1jaeTe1CvULamzCpiSGL5WkG8ZjCka", - "hash160result": "48835abfcd59557f6325f32773bbaf667bd6cbfa", +exports.IDENTITY_PASSPORT_ORIGINALFRONT = { + "vdxfid": "iCwT1mHdci9wooC6Q8mtx8QssXzwiL4hxp", + "indexid": "xHmZUZiiU2NcRy58FpS3vWwQuC1xdM48mW", + "hash160result": "25023e23a25ba4daa7ac0a9c96180f5e90acd067", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.riskcheck.botnotdetected" + "name": "vrsc::identity.passport.originalfront" } }; -exports.IDENTITYDATA_EMAIL_ISDELIVERABLE = { - "vdxfid": "i8P6w5ypyh7byWTYAdTY3vHezomSBSznWB", - "indexid": "xDDDPtQuq1LGbgLa2K7h2JpC2TnT48N3FF", - "hash160result": "6b6d001cedc2852156e286c8d63ce4bf0119d235", +exports.IDENTITY_PASSPORT_ORIGINALBACK = { + "vdxfid": "iDXKJaroNRKr9GZfLFvH7LttJQaXqGoSrc", + "indexid": "xJMRmPHtDjYWmSShBwaS5jRRL4bYmTdC9J", + "hash160result": "21734b0f37ec51dd77bdab8c10065cf67b61386e", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.email.isdeliverable" + "name": "vrsc::identity.passport.originalback" } }; -exports.IDENTITYDATA_EMAIL_BREACHCOUNT = { - "vdxfid": "iBhchzsBh8zKXhCAquQ5mWPdFAM6mkGvix", - "indexid": "xGXjAoJGYTCz9s5Chb4EjtvAGpN7gnJjc6", - "hash160result": "ea91d5cb1ff8532c4e9c847228859e4014d13a5a", +exports.IDENTITY_PASSPORT_CROPPEDFRONT = { + "vdxfid": "i4cr6CxCYDHUDjc6UoMsDVAZoNep6Meuyi", + "indexid": "x9SxZ1PHPXW8quV8LV22Bsh6q2fpxtJ6Zd", + "hash160result": "274c241806d31576a57a074cc2f6b4c624078b0c", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.email.breachcount" + "name": "vrsc::identity.passport.croppedfront" } }; -exports.IDENTITYDATA_EMAIL_FIRSTBREACHEDAT = { - "vdxfid": "iKwvVd8mHF7phMqPJVQ32bHpYT7hFG14D8", - "indexid": "xQn2xRZr8ZLVKXiRAB4BzypMa78i5iPxyd", - "hash160result": "597919a7c88a513db2c9223f6948ca4f767eb0b4", +exports.IDENTITY_PASSPORT_CROPPEDBACK = { + "vdxfid": "i6wA2ttX7vcxBXmrdmGEa44NZEFBZWoRYa", + "indexid": "xBmGVhKbyEqcohetVSvPYSauatGCUYDMs2", + "hash160result": "f56f1db46ddebc99f3c8954fc8bf1d26a9bef125", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.email.firstbreachedat" + "name": "vrsc::identity.passport.croppedback" } }; -exports.IDENTITYDATA_EMAIL_LASTBREACHEDAT = { - "vdxfid": "iNUujoAd6CCR9X4kBQZaV6o9mt3MDqsfHs", - "indexid": "xTK2CbbhwWR5mgwn36DjTVKgoY4N7JGP5y", - "hash160result": "ebbc28818ea68e09defb0b67c0a5882e75027dd0", +exports.IDENTITY_PASSPORT_FACE = { + "vdxfid": "iLCbvnyU4V3XeMz18CXAG5MCtjb2FjpcZX", + "indexid": "xR2iPbQYuoGCGXs2ytBKETsjvPc35DNZDm", + "hash160result": "26f7dc9d524f84a21c8a9e3f2dc5149f3a3c77b7", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.email.lastbreachedat" + "name": "vrsc::identity.passport.face" } }; -exports.IDENTITYDATA_EMAIL_DOMAIN_REGISTEREDAT = { - "vdxfid": "i8jTA9VrLRrAmTNwCnQJg93ivmVN5GWcVX", - "indexid": "xDZZcwvwBk4qPdFy4U4TeXaFxRWNxA1Bqd", - "hash160result": "d8d1e9bd02ff4c40c805099613567531d04cab39", +exports.IDENTITY_PASSPORT_IDNUMBER = { + "vdxfid": "iDYih1jmCA1oexyxZ1PQFL5ewyciqoQ2rw", + "indexid": "xJNq9pAr3UEUH8rzQh3ZDicByddjgKM4vN", + "hash160result": "c8a25af227fc07e260119b370da0eae2a9517c6e", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.email.domain.registeredat" + "name": "vrsc::identity.passport.idnumber" } }; -exports.IDENTITYDATA_EMAIL_DOMAIN_FREEPROVIDER = { - "vdxfid": "i8XPHcH1caNn6kQVxFERZG33ATxHfawrSB", - "indexid": "xDMVkQi6TtbSivHXovtaXeZaC7yJSskirY", - "hash160result": "a2c3c98d38df08384ed3d863895fd6c1ad136337", +exports.IDENTITY_PASSPORT_CATEGORY = { + "vdxfid": "iMtpUJYWZmnnSJyJcshHRdWJZMhZVZZifT", + "indexid": "xSivw6ybR61T4UrLUZMSQ22qb1iaQux7BU", + "hash160result": "84a9f125285d7e93a1e676ed48e3fbe459780aca", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.email.domain.freeprovider" + "name": "vrsc::identity.passport.category" } }; -exports.IDENTITYDATA_EMAIL_DOMAIN_CUSTOM = { - "vdxfid": "iE7HSAqMXwxtM6XxUDRLMBUUcWniEh9hRk", - "indexid": "xJwPtyGSPGBYyGQzKu5VKa11eAojBypGax", - "hash160result": "48b3f1d4988af1dd73b8ccf1e5b547a891f6a474", +exports.IDENTITY_PASSPORT_EXPIRATIONDATE = { + "vdxfid": "i98TaZ3wTh3qRw2ufeunVY2MD5eKwoamGE", + "indexid": "xDxa3MV2K1GW46uwXLZwTvYtEjfLspcYEK", + "hash160result": "07727b480c654d59cb611ed01715e254eb37053e", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.email.domain.custom" + "name": "vrsc::identity.passport.expirationdate" } }; -exports.IDENTITYDATA_EMAIL_DOMAIN_DISPOSABLE = { - "vdxfid": "iBteZWnaYtBLRxQyNutN7eatZZ4ZpCAoin", - "indexid": "xGim2KDfQCQ148J1EbYX637RbD5aehG6fm", - "hash160result": "8bb328cc7630490b07742507e6cdb77290f0505c", +exports.IDENTITY_PASSPORT_ISSUINGCOUNTRY = { + "vdxfid": "iRHGM2GEYeRUuHKSG1wENVA16bdyVRxchn", + "indexid": "xW7NophKPxe9XTCU7hbPLsgY8FezLKmJHi", + "hash160result": "4798dee337b16fc22d26748fb0803738f99831ef", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.email.domain.disposable" + "name": "vrsc::identity.passport.issuingcountry" } }; -exports.IDENTITYDATA_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS = { - "vdxfid": "iHbaMpJAjVPgroTQYm6xwTqmVUnv4qh5mw", - "indexid": "xNRgpcjFaocMUyLSQSm7urNJX8ovwS8zbS", - "hash160result": "c95978851fbb34305351b4c465d7bdf59b1de79a", +exports.IDENTITY_PASSPORT_ISSUINGREGION = { + "vdxfid": "i6Ay9VdcZjGrJur5SNyhBDZWzxGmo7qUmW", + "indexid": "xB15cJ4hR3VWw5j7J4dr9c642cHnbq2nm9", + "hash160result": "f3d9b605096f4c816de7d72c597fee07e75a961d", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.email.domain.toplevel.suspicious" + "name": "vrsc::identity.passport.issuingregion" } }; -exports.IDENTITYDATA_IDCARD = { - "vdxfid": "iJLpqieejHL8YncTbnhAW7cUTaMsfHdSGL", - "indexid": "xPAwJX5jabYoAxVVTUMKUW91VENtUTZwau", - "hash160result": "49b9d595086e85ce8fd4159995bbe350181715a3", +exports.IDENTITY_PASSPORT_DATEOFBIRTH = { + "vdxfid": "iAjG8DwYfKxt9affJy6CUBDDFK5jaeHRLJ", + "indexid": "xFZNb2NdWeBYmkYhAekMSZjkGy6kWqAqyd", + "hash160result": "73eb23619d178f495a24b41aaf6aac107357924f", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" + "name": "vrsc::identity.passport.dateofbirth" } }; -exports.IDENTITYDATA_IDCARD_ORIGINAL_FRONT = { - "vdxfid": "iB7XpaW684q2BYjnqveLSKhSG9zwudnS6o", - "indexid": "xFweHNwAyP3goicphcJVQiDyHp1xo2uuYa", - "hash160result": "29f714a5b08b68b9046525c6c005a00a4d98c853", +exports.IDENTITY_PASSPORT_ADDRESS_STREET1 = { + "vdxfid": "i7HPJNB16V5pws8xSq4a8pHF29Mcg6sUyy", + "indexid": "xC7VmAc5woJVa31zJWij7Con3oNdXuBysY", + "hash160result": "c28625c4dfc12d3cdd85f8c7272e87a57523c529", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iBrpt78Mdrqcc1RHwPWKYBALbNTC4cwdJQ" + "name": "vrsc::identity.passport.address.street1" } }; -exports.IDENTITYDATA_IDCARD_ORIGINAL_BACK = { - "vdxfid": "iH9K2ZhRcyJWbByyUyWsXh544SVhUSrVFt", - "indexid": "xMyRVN8WUHXBDMs1LfB2W5bb66WiNi4FtU", - "hash160result": "24585446879161aed3198273e81ea9a69080ef95", +exports.IDENTITY_PASSPORT_ADDRESS_CITY = { + "vdxfid": "iFSLsk21VvWSWLg9a4XFTB3kEN8bLnTB7c", + "indexid": "xLGTLYT6MEj78WZBRkBQRZaHG29cBfjnYu", + "hash160result": "c06884e75232e86de75c6ccbd5605a3352dd3783", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iNRCZp7JBDHbpKQ2Vhc6TK97hUSRPG4jaX" + "name": "vrsc::identity.passport.address.city" } }; -exports.IDENTITYDATA_IDCARD_CROPPED_FRONT = { - "vdxfid": "iR8r1t4mYfk8xqZmaNDra6TQrUsZjbGiKS", - "indexid": "xVxxUgVrPyxob1SoS3t1YUywt8tahdr3L4", - "hash160result": "2bc1abbdc2c25032842bc2354e857939cef599ed", +exports.IDENTITY_PASSPORT_ADDRESS_REGION = { + "vdxfid": "iFNoUQhExFEYTgrqgy7x22Q6URM7ek9L3J", + "indexid": "xLCuwD8KoZTD5rjsYen6zQvdW5N8Z4oGqf", + "hash160result": "7b7baa6d0d788f434536aa472c57d9de40678c82", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iK822dFQwW2Y5tdpSpxQtHQemf47HoFxqs" + "name": "vrsc::identity.passport.address.region" } }; -exports.IDENTITYDATA_IDCARD_CROPPED_BACK = { - "vdxfid": "iSM5GLZ1FvzGDNX62vgUgRQC43iaeKxoHK", - "indexid": "xXBBj8z67FCvqYQ7tcLdeovj5hjbbVdh5q", - "hash160result": "56fb7c2a25fc9646e588273ad379ad202e23e2fa", +exports.IDENTITY_PASSPORT_ADDRESS_POSTCODE = { + "vdxfid": "iS4SakGdB4ek1Q1QAitXUwFEk1RVyi3rLY", + "indexid": "xWtZ3Yhi2NsQdZtS2QYgTKmmmfSWrxdFKY", + "hash160result": "4457551bc48db37393f5ec3ec3d0cf6766dcbcf7", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iCvxKVHbnbwHGZDTaGofeyyJLjsGBSZr7A" + "name": "vrsc::identity.passport.address.postcode" } }; -exports.IDENTITYDATA_IDCARD_FACE = { - "vdxfid": "i51M1ZmuPqEZDcC5KJbz6F9XYVacoyBE2X", - "indexid": "x9qTUNCzF9TDqn57AzG94dg4a9bdgabnve", - "hash160result": "77d6aa5baa62d04f8cb7d8fe899bcdebfb51cc10", +exports.IDENTITY_PASSPORT_ADDRESS_COUNTRY = { + "vdxfid": "iB9w9GgcJdGTt3ZuM2pm5qpDBA3UaJdcvj", + "indexid": "xFz3c57h9wV8WDSwCiUv4ELkCp4VNyPHLr", + "hash160result": "dd93bcbecc805e5b1606efafa1ecab6b33e53c54", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iPrxPJC6NbzWnkNyLSvwa8AVrwJWBUV9mM" + "name": "vrsc::identity.passport.address.country" } }; -exports.IDENTITYDATA_IDCARD_IDNUMBER = { - "vdxfid": "i5bnW5iRQbCtg21NLNybykc6ArhxUwSnVh", - "indexid": "xARtxt9WFuRZJBtQC4dkx98dCWiyQpWVav", - "hash160result": "d525af458c62617e95f5fa1b70b6e36e08be4f17", +exports.IDENTITY_RESIDENCEPERMIT = { + "vdxfid": "i8WZetqKFn98rHRZGvAvPuzPyrJeyUMjfb", + "indexid": "xDLg7hGQ76MoUTJb8bq5NJWw1WKftQg9VL", + "hash160result": "712ef00d9937eb4ade0fd3e627c2df1d99503b37", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iJdUp47SVEzGEHCvoRyix2xufRsAeWSyxa" + "name": "vrsc::identity.residencepermit" } }; -exports.IDENTITYDATA_IDCARD_CATEGORY = { - "vdxfid": "iESZ7w2LiZbcxEEWaD4BgVr4VKYkMn1dqk", - "indexid": "xKGfajTRZspHaQ7YRtiLetNbWyZmEdZbq1", - "hash160result": "36204ef98b988fa4ddad9a94d09bae40c7f54978", +exports.IDENTITY_RESIDENCEPERMIT_ORIGINALFRONT = { + "vdxfid": "iC5NrmPgKckxBjKv7v9HjUMytm4jRtEBgZ", + "indexid": "xGuVKZpmAvycouCwyboShrtWvR5kNYzWoH", + "hash160result": "639ed2ef9da2f5e75fe63e1ccf83d1b54e68585e", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "i9MqRfXPAiYwv9q4iSjTtXquNCCZ1GgECn" + "name": "vrsc::identity.residencepermit.originalfront" } }; -exports.IDENTITYDATA_IDCARD_EXPIRATIONDATE = { - "vdxfid": "i8BCBwaioR3PSSgjRcWGx9RfFUCbVXNYxe", - "indexid": "xD1Jek1oejG44cZmHJARvXxCH8DcSWVK4B", - "hash160result": "e2187beb59c4815c0b4926bfa14e5d48657e9133", +exports.IDENTITY_RESIDENCEPERMIT_ORIGINALBACK = { + "vdxfid": "iLTPvrZi8HNALuVmYeAWnSnLdZ5GsAAUcx", + "indexid": "xRHWPeznybapy5NoQKpfkqJsfD6HmQW5eW", + "hash160result": "94d200a22dbdfa7ba47d1970c21eacb65f7543ba", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iNgDKviLAeeV65eBztuduckUMDE2erB7jj" + "name": "vrsc::identity.residencepermit.originalback" } }; -exports.IDENTITYDATA_IDCARD_ISSUING_COUNTRY_MATCHED = { - "vdxfid": "i6ubxHFxwzxQU1zmBvLW1oYj6iozy3znSU", - "indexid": "xBjiR5h3oKB56Bso3bzezC5G8Nq1rhjRiV", - "hash160result": "96eb5b9e8921784e76c96e272b20f009d68ca625", +exports.IDENTITY_RESIDENCEPERMIT_CROPPEDFRONT = { + "vdxfid": "i6T3rairykWA5vVEtQqptjp5RBRhTCmsBS", + "indexid": "xBHAKP9wq4ipi6NGk6Vys8LcSqSiKAMKZU", + "hash160result": "14136815f288a4b6426c7f4ab6b28221dcf0a020", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iFgXmTd9Wi2sqZyPqaoejdHG2sMaJWLrEX" + "name": "vrsc::identity.residencepermit.croppedfront" } }; -exports.IDENTITYDATA_IDCARD_ISSUING_REGION = { - "vdxfid": "i4AFd1rzyfsmgTLgyn472E3gc2VBaw4uFK", - "indexid": "x8zN5pJ5pz6SJdDiqTiFzcaDdgWCSVW9s9", - "hash160result": "5d8fc30a870e94f5274d09d6c16e5d8795708307", +exports.IDENTITY_RESIDENCEPERMIT_CROPPEDBACK = { + "vdxfid": "iHssgpjB2gsusjjLH36N3KqUQqz7JPXumA", + "indexid": "xNhz9dAFt16aVucN8ikX1iN1SW18D7SNDP", + "hash160result": "ce3cae77f2010009817f1e01de52ce8a493cfc9d", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL" + "name": "vrsc::identity.residencepermit.croppedback" } }; -exports.IDENTITYDATA_IDCARD_DATEOFBIRTH = { - "vdxfid": "i48Nsi8VjHvSdW9MCB59vVF8AeoCSALbW6", - "indexid": "x8xVLWZaac97Fg2P3rjJtsmfCJpDMvuw4c", - "hash160result": "99acfcbf72a37bcfa3ccf9f3d8a60f60a3a92807", +exports.IDENTITY_RESIDENCEPERMIT_FACE = { + "vdxfid": "iNVvVYKcKuredXKvctn5uQxp3kNXoJrwNb", + "indexid": "xTL2xLkhBE5KFhCxUaSEsoVM5QPYfELeHf", + "hash160result": "4dd17db50d569a63cc892d78850ac9de1d0eaed0", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iQhjETQvSkadciDPy69QZNy3hSczWQ4iu4" + "name": "vrsc::identity.residencepermit.face" } }; -exports.IDENTITYDATA_IDCARD_ADDRESS = { - "vdxfid": "iHQjj4N8axeE24n8RctE8cQtSUdSoTFBMv", - "indexid": "xNErBroDSGrteEfAHJYP6zwRU8eTdJWVVZ", - "hash160result": "744a4f4b004c403c1d671053d717a36ecf5bda98", +exports.IDENTITY_RESIDENCEPERMIT_IDNUMBER = { + "vdxfid": "iMxygBvDFftAnmUCjVLh21etV5v4wt9zdk", + "indexid": "xSo68zMJ6z6qQwMEbAzqzQBRWjw5u6Tm63", + "hash160result": "ab544471e583d6a11245bb971e3ee1ef5ed1d3ca", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iGebr2v1TgkWvsyLjs1dQ5SqffqKL8rNm3" + "name": "vrsc::identity.residencepermit.idnumber" } }; -exports.IDENTITYDATA_IDCARD_ADDRESS_STREET1 = { - "vdxfid": "iKTakiCWF81oLmpY9nQD9pgQttsKyYBEYz", - "indexid": "xQHhDWdb6SETxwha1U4N8DCwvYtLoHXM2c", - "hash160result": "c284feffa60f1978b8f8551cbd6724ca795e54af", +exports.IDENTITY_RESIDENCEPERMIT_CATEGORY = { + "vdxfid": "iGbMb21an69VE6iTH2iRtRFKCEUZPJHTwU", + "indexid": "xMRU3pSfdQN9rGbV8iNaromrDtVaCufAXu", + "hash160result": "ae9031bab1ee600e10aa16ec1d4c13def953e48f", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + "name": "vrsc::identity.residencepermit.category" } }; -exports.IDENTITYDATA_IDCARD_ADDRESS_CITY = { - "vdxfid": "iEwv5MTy2Dg5atRBc8bSTjMLDHsMLQzVDU", - "indexid": "xKn2Y9u3sXtkD4JDTpFbS7ssEwtNDGiHDg", - "hash160result": "bee2235466779e3ea61b5531b3aa396a0984d77d", +exports.IDENTITY_RESIDENCEPERMIT_EXPIRATIONDATE = { + "vdxfid": "iJ48ALemxyMV6DYzeuRMe8Fn78iMZdjSXZ", + "indexid": "xNtEd95rpHa9iPS2Wb5WcWnK8njNXD9HEH", + "hash160result": "d3083b08621d6ff5dc3f7f9cace34f944d7aec9f", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + "name": "vrsc::identity.residencepermit.expirationdate" } }; -exports.IDENTITYDATA_IDCARD_ADDRESS_REGION = { - "vdxfid": "i97JbWvVd6qSRXh8eqjZKG95dj2NeigvWF", - "indexid": "xDwR4KMaUR473haAWXPiHefcfP3PYf7uVw", - "hash160result": "4a74b6e17bea7b240dc8acd7f7e4a82fb34dcd3d", +exports.IDENTITY_RESIDENCEPERMIT_ISSUINGCOUNTRY = { + "vdxfid": "i7UhTp4gruQwtkC1bi4RxE4wUAsro6n9Ym", + "indexid": "xCJovcVmiDdcWv53TPiavcbUVptsgMKzdL", + "hash160result": "75e37dc8957c8c6765c60962804d446b2de0e82b", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" + "name": "vrsc::identity.residencepermit.issuingcountry" } }; -exports.IDENTITYDATA_IDCARD_ADDRESS_POSTCODE = { - "vdxfid": "iLhtE8EXXJ6ATCZ7xJzbvyJKRTYXUX4A7i", - "indexid": "xRXzgvfcNcJq5NS9ozekuMprT7ZYKa7cdy", - "hash160result": "556f2f620f185c90906aac53e60810665be700bd", +exports.IDENTITY_RESIDENCEPERMIT_ISSUINGREGION = { + "vdxfid": "iERBNWk2tyaGJ2w8P1kM88Mdj5WA9qFzbv", + "indexid": "xKFHqKB7kHnvvCpAEhQW6WtAkjXAymjqXM", + "hash160result": "788165581de37b5473c2f127d387f3d7a8630778", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" + "name": "vrsc::identity.residencepermit.issuingregion" } }; -exports.IDENTITYDATA_IDCARD_ADDRESS_COUNTRY = { - "vdxfid": "iNxc7w91fgHgvRoNsifWYxHMFSJcrCuGss", - "indexid": "xTniaja6WzWMYbgQjQKfXLotH6Kdg4E8gT", - "hash160result": "0cab0e442caf58e660f32d2d36f8e64b12f3b9d5", +exports.IDENTITY_RESIDENCEPERMIT_DATEOFBIRTH = { + "vdxfid": "iM62dN7LSHWDuetPi6qAewG6bzYwFrcqBN", + "indexid": "xRv96AYRHbitXpmRZnVKdKnddeZxAivvFE", + "hash160result": "e2533190e4822ab51c5b2029039fbb0d431131c1", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" + "name": "vrsc::identity.residencepermit.dateofbirth" } }; -exports.IDENTITYDATA_IDCARD_DOCUMENTVERIFICATION_MATCHED = { - "vdxfid": "iMHhAMLCDnisJVbZpTzwdAjwQQobVtkP3e", - "indexid": "xS7od9mH56wXvfUbg9f6bZGUS4pcQztAYY", - "hash160result": "361025b8f50593f08f332b0cd227ade34dcf65c3", +exports.IDENTITY_RESIDENCEPERMIT_ADDRESS = { + "vdxfid": "iCA8P2rVs5DjtzQpXEnPJcG4KBs79C9EpL", + "indexid": "xGzEqqHaiPSQXAHrNvSYGznbLqt83gLGV5", + "hash160result": "2c7264a72e1d7937da951620039e48a0c8663e5f", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk" + "name": "vrsc::identity.residencepermit.address" } }; -exports.IDENTITYDATA_IDCARD_NAME_MATCHED = { - "vdxfid": "i3duYwSwdrLztnP43wuwiTfH9G5adxpZJm", - "indexid": "x8U21jt2VAZfWxG5uda6grBpAv6bc21iUD", - "hash160result": "11c10b7a91af6a813b1cc0f2945a63bf0435c601", +exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_STREET1 = { + "vdxfid": "iMuY2CbmQpCFzodGBtqxogmTb5dYfNbCJa", + "indexid": "xSjeV12rG8QvcyWJ3aW7n5HzcjeZaxtGwr", + "hash160result": "444cbb0dc6f471ecb2261dc7d6731cd97e272dca", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iKCFQYZudPChh6jypSpcgENoQb5WeX5wHv" + "name": "vrsc::identity.residencepermit.address.street1" } }; -exports.IDENTITYDATA_IDCARD_DATEOFBIRTHMATCHED = { - "vdxfid": "iPFTbFBXsM4df4BkNoMfFoHynxzKKkUqJv", - "indexid": "xU5a43ccifHJHE4nEV1pEBpWpd1LCCSSq8", - "hash160result": "ba6a81f6ea53e339ff4d8e2aa5c1d660aee6e9d8", +exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_CITY = { + "vdxfid": "iRckJ1VkfYazfVHWJuA9iXTth83ZYp8znz", + "indexid": "xWSrkovqWrofHfAYAapJguzRin4aPEqHJK", + "hash160result": "73e22f5d24515103052ab165736a0198a7d4e0f2", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iMUfUShqVwWrGSx6HvZcDJwHywiLW5Zusb" + "name": "vrsc::identity.residencepermit.address.city" } }; -exports.IDENTITYDATA_PASSPORT = { - "vdxfid": "i8oiYgB9L9WJWGJgpcrm68mvoq4KoTASNL", - "indexid": "xDdq1UcEBTiy8SBigJWv4XJTqV5LiS8drz", - "hash160result": "a7e8f210eb00dcc94038864f8c59b8403ccf793a", +exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_REGION = { + "vdxfid": "iBpH337NTJSLjSxbBWuu2wBLu12k4JVGk4", + "indexid": "xGePVqYTJcf1Mcqd3Ca41Khsvf3kyxtNXH", + "hash160result": "2f7b3040cf60259ee4bf6dfc93a4de42ab4e7d5b", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" + "name": "vrsc::identity.residencepermit.address.region" } }; -exports.IDENTITYDATA_PASSPORT_ORIGINAL_FRONT = { - "vdxfid": "iQhPuQoj5PDXpF5XsA26PhnvbvBVHUCgtM", - "indexid": "xVXWNDEovhSCSQxZiqgFN6KTdaCWDq4RVw", - "hash160result": "942c2ac1a23d27ab82ea20072a31a3aba9c3c9e8", +exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_POSTCODE = { + "vdxfid": "iGKi47jtg6CumKYSUBj57drgLNGzhJY3Gj", + "indexid": "xM9pWvAyXQRaPVRUKsPE62PDN2J1Zp4d6b", + "hash160result": "db85ea63848a6ad2c3a0e82bb29e215c00c2ee8c", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iBrpt78Mdrqcc1RHwPWKYBALbNTC4cwdJQ" + "name": "vrsc::identity.residencepermit.address.postcode" } }; -exports.IDENTITYDATA_PASSPORT_ORIGINAL_BACK = { - "vdxfid": "iHZRBTVpGXBpq1D3JQvB37HwwC81UVaEBt", - "indexid": "xNPXeFvu7qQVTB65A6aL1VpUxr92J21Y2e", - "hash160result": "0b0574e283da6e3dd272ca2f7088634d309f7e9a", +exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_COUNTRY = { + "vdxfid": "i8KD9CUn7Su4YT44WhbD8HYA1K425cFCqM", + "indexid": "xD9Kbzurxm7jAcw6NPFN6g4h2y531jRanx", + "hash160result": "75970ae74cd40419dc78ecef7be22c5ee09d1535", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iNRCZp7JBDHbpKQ2Vhc6TK97hUSRPG4jaX" + "name": "vrsc::identity.residencepermit.address.country" } }; -exports.IDENTITYDATA_PASSPORT_CROPPED_FRONT = { - "vdxfid": "iGsEp6i4xXh4gNizJgWEoiCwZxzPsuPvnJ", - "indexid": "xMhMGu99oqujJYc2ANAPn6jUbd1Qimj8Dp", - "hash160result": "c26f63c41583bbf9fb1fb6eb714c87c71054e592", +exports.IDENTITY_RESIDENTCARD = { + "vdxfid": "iKkJFFtbxRMJutjoruW47Mc1sCfdGYQrC9", + "indexid": "xQaQi4KgojZyY4cqibAD5k8Ytrge9jwt3u", + "hash160result": "2b737a5733b91d305dcf07d9e75797740da97db2", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iK822dFQwW2Y5tdpSpxQtHQemf47HoFxqs" + "name": "vrsc::identity.residentcard" } }; -exports.IDENTITYDATA_PASSPORT_CROPPED_BACK = { - "vdxfid": "iHfLky17R6QTL1tkhN4YzjigfaNKFMXJwg", - "indexid": "xNVTDmSCGQd7xBmnZ3ihy8FDhEPLApagju", - "hash160result": "b49b18cb2d18cabafd16b138f6de43b1136d9d9b", +exports.IDENTITY_RESIDENTCARD_ORIGINALFRONT = { + "vdxfid": "iNMJhZ3wie5U2SRF7WSFTpjJo6B6RSTR4t", + "indexid": "xTBRAMV2ZxJ8ecJGyC6QSDFqpkC7KTFMbW", + "hash160result": "e440d2d8bab46633691a12e7bed0ea785bd90ccf", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iCvxKVHbnbwHGZDTaGofeyyJLjsGBSZr7A" + "name": "vrsc::identity.residentcard.originalfront" } }; -exports.IDENTITYDATA_PASSPORT_FACE = { - "vdxfid": "iGvZEAbQPV74x8zimmH857Eyug1YYG6da8", - "indexid": "xMkfgy2VEoKjaJskdSwH3VmWwL2ZPGWyYL", - "hash160result": "c1b64e1b1d902fce4bca08951958ae30c3f28593", +exports.IDENTITY_RESIDENTCARD_ORIGINALBACK = { + "vdxfid": "i4pAk8J5ec2wn55VattFRr7PyN4J2L13HJ", + "indexid": "x9eHCvjAVvFcQExXSaYQQEdw125Jz84d8u", + "hash160result": "9fa70ca8b49eab8c3e704f78f0e0ae1bc52caf0e", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iPrxPJC6NbzWnkNyLSvwa8AVrwJWBUV9mM" + "name": "vrsc::identity.residentcard.originalback" } }; -exports.IDENTITYDATA_PASSPORT_IDNUMBER = { - "vdxfid": "iRYCG1nfoPiuZFKqbsugCgi317aY2ErtkM", - "indexid": "xWNJipDkehwaBRCsTZZqB5Ea2mbYowicUR", - "hash160result": "abd6da27bddaf9e92e6872589a8cb1ae056d04f2", +exports.IDENTITY_RESIDENTCARD_CROPPEDFRONT = { + "vdxfid": "iLnx7NDcAWtb9uWicdgSaiwco56TywMh5w", + "indexid": "xRd4aAeh1q7Fn5PkUKLbZ7U9pj7UvU8v2V", + "hash160result": "fa7347c3517552a028890dacaf889a6ead39f6bd", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iJdUp47SVEzGEHCvoRyix2xufRsAeWSyxa" + "name": "vrsc::identity.residentcard.croppedfront" } }; -exports.IDENTITYDATA_PASSPORT_CATEGORY = { - "vdxfid": "iPinz8N4RxboKaHvTr4FcJXe9DLojw3bXH", - "indexid": "xUYuSvo9HGpTwkAxKXiQah4BAsMpZeqQLH", - "hash160result": "748058a57c693f07b6b69b53a9509086615215de", +exports.IDENTITY_RESIDENTCARD_CROPPEDBACK = { + "vdxfid": "i8WjL22L4UeaCDKZuj8R4Uub6zurTPdaLv", + "indexid": "xDLqnpTQunsEpPCbmQna2sS88evsLJL51v", + "hash160result": "b5134fe72682aa4f0dc645ceb73421dc07644337", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "i9MqRfXPAiYwv9q4iSjTtXquNCCZ1GgECn" + "name": "vrsc::identity.residentcard.croppedback" } }; -exports.IDENTITYDATA_PASSPORT_EXPIRATIONDATE = { - "vdxfid": "iBXSY6Ra3o5jK9QZdnrdttsrnFE6y3H8o9", - "indexid": "xGMYztreu7JPwKHbVUWnsHQPouF7mXgFAg", - "hash160result": "5cd8ab62f4b455d520e951243a6e6ac2be2a4e58", +exports.IDENTITY_RESIDENTCARD_FACE = { + "vdxfid": "i6dGShbLY2ppZnXSyfvdtdGFkCxBQd2r9Y", + "indexid": "xBTNuW2RPM3VBxQUqMans1nnmryCFH4rRD", + "hash160result": "25a41b37f64414a2477c5c0d1a139d64ce9b8f22", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iNgDKviLAeeV65eBztuduckUMDE2erB7jj" + "name": "vrsc::identity.residentcard.face" } }; -exports.IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED = { - "vdxfid": "iLjpTPmDufuH38s9XwatiLA8Wk67a2thc8", - "indexid": "xRZvvCCJkz7wfJkBPdF3gigfYQ78WXNncA", - "hash160result": "d53e23bd3ca7de97d1ed41b501d9a1f06b965ebd", +exports.IDENTITY_RESIDENTCARD_IDNUMBER = { + "vdxfid": "iKFkbwDcQRXjapZcZAXsaMXjgER9CZbwZx", + "indexid": "xQ5s4jehFjkQCzSeQrC2Yk4GhtSA2GbM4B", + "hash160result": "e30d9a01765325e02ca22f60335d4bdb499917ad", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iFgXmTd9Wi2sqZyPqaoejdHG2sMaJWLrEX" + "name": "vrsc::identity.residentcard.idnumber" } }; -exports.IDENTITYDATA_PASSPORT_ISSUING_REGION = { - "vdxfid": "i87HPTEfVQ9HKF8zrNppBEBF8wur6BAGBf", - "indexid": "xCwPrFfkLiMwwR22i4Uy9chnAbvrufhBnx", - "hash160result": "3f8308ca4fe693714fdab6fb3871698a5a2bd432", +exports.IDENTITY_RESIDENTCARD_CATEGORY = { + "vdxfid": "i46Fgc8ev9zAkjikjHWreqSXkMRpFr5Lsi", + "indexid": "x8vN9QZjmUCqNubnayB1dDy4n1SqAqg4vn", + "hash160result": "c0039a4929d081eec1d1f5ca3040e19bded3c106", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL" + "name": "vrsc::identity.residentcard.category" } }; -exports.IDENTITYDATA_PASSPORT_DATEOFBIRTH = { - "vdxfid": "iRe6ZecbVBajvySLEiFxAgMtgZwxBiZY78", - "indexid": "xWUD2T3gLVoQZ9KN6Pv794tRiDxy6henbx", - "hash160result": "27a8f2f7695013eef34f4bb36cb9a8eeb92a22f3", +exports.IDENTITY_RESIDENTCARD_EXPIRATIONDATE = { + "vdxfid": "iBA1oFvDABKqbu9i61AEGy1m5fFHdCWkpy", + "indexid": "xFz8G4MJ1VYWE52jwgpPFMYJ7KGJUd6Y4b", + "hash160result": "0866dd99514f509c9ad4584b3f570515f4c74054", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iQhjETQvSkadciDPy69QZNy3hSczWQ4iu4" + "name": "vrsc::identity.residentcard.expirationdate" } }; -exports.IDENTITYDATA_PASSPORT_ADDRESS = { - "vdxfid": "iCMcVHrazgA1N2WpXUmffifER2AhUzD6re", - "indexid": "xHBix6HfqzNfzCPrPARpe7BmSgBiQSui11", - "hash160result": "e6bb757f72e329878ff5e7e8409ee9a0bc706a61", +exports.IDENTITY_RESIDENTCARD_ISSUINGCOUNTRY = { + "vdxfid": "iHBgD199BSEQWREtiW8dP259DX4qg6KjkM", + "indexid": "xN1nfoaE2kT58b7vaBnnMQbgFB5rWuKCtd", + "hash160result": "ef88ffb14a8b66dacc690351fa9c3d35a8036296", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iGebr2v1TgkWvsyLjs1dQ5SqffqKL8rNm3" + "name": "vrsc::identity.residentcard.issuingcountry" } }; -exports.IDENTITYDATA_PASSPORT_ADDRESS_STREET1 = { - "vdxfid": "i79XJcQgvEz247HHaKWxTiyxVVnDboWYqv", - "indexid": "xBydmQqmmZCggHAKS1B7S7WVX9oEThCnwK", - "hash160result": "c9f030a041e6460517ff39854d3625f70e7e4828", +exports.IDENTITY_RESIDENTCARD_ISSUINGREGION = { + "vdxfid": "i6jygVNjzZUFEXVgtzWxXpBYf5rwjXF92J", + "indexid": "xBa69HopqsgurhNikgB7WCi5gjsxbi12z3", + "hash160result": "dc31e031328cfe3697527e046a52cc372687d423", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + "name": "vrsc::identity.residentcard.issuingregion" } }; -exports.IDENTITYDATA_PASSPORT_ADDRESS_CITY = { - "vdxfid": "iBM6AvLwRcHKHMwDjPmVts1VxKQYHAmFHA", - "indexid": "xGBCdin2GvVyuXpFb5ResFY2yyRZDWy6sS", - "hash160result": "78068da24f1196cf7bcb7e45d3f2bd90e8015956", +exports.IDENTITY_RESIDENTCARD_DATEOFBIRTH = { + "vdxfid": "iQfYTwmTxXzxxyFh6XbY2PQVLVwswRoJL1", + "indexid": "xVVevkCYorDdb98ixDFgzmw2N9xtnBn6M2", + "hash160result": "73e0e5f4af76255bc2a3583ad9a7b1d0241470e8", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + "name": "vrsc::identity.residentcard.dateofbirth" } }; -exports.IDENTITYDATA_PASSPORT_ADDRESS_REGION = { - "vdxfid": "iKBAveavEwQG28SE4eRUGY5ZqaSLNrCnM1", - "indexid": "xQ1HPT216FcveJKFvL5dEvc6sETMKCokvR", - "hash160result": "14ad7b91cee4646af2d5625fa0d5eeea8ed239ac", +exports.IDENTITY_RESIDENTCARD_ADDRESS_STREET1 = { + "vdxfid": "iJ67qMPN6tyrLXBhbJpKKBZYpkcBzZD8S4", + "indexid": "xNvEJ9pSxDCWxh4jSzUUHa65rQdCviMqur", + "hash160result": "8540d9cb71ca32f4c03caf26a4cffa4d51094da0", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" + "name": "vrsc::identity.residentcard.address.street1" } }; -exports.IDENTITYDATA_PASSPORT_ADDRESS_POSTCODE = { - "vdxfid": "iDZEoefPi6Q6WjWseS5LMYwk4PXVzU8Yfd", - "indexid": "xJPMGT6UZQcm8uPuW7jVKwUH63YWskMh6F", - "hash160result": "16150338c79c92a5469e14079ef0eb9d0e75956e", +exports.IDENTITY_RESIDENTCARD_ADDRESS_CITY = { + "vdxfid": "iLCQ2n5tKHzKcVBv8of1eYmdWEdEY5vTUN", + "indexid": "xR2WVaWyAcCzEf4wzVKAcwJAXteFUoFSux", + "hash160result": "7990100969a22f4b4ba35613b3994219e74d6db7", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" + "name": "vrsc::identity.residentcard.address.city" } }; -exports.IDENTITYDATA_PASSPORT_ADDRESS_COUNTRY = { - "vdxfid": "iNAWV5t3VpZc9mGxRxqHo8qBo5mRDmYNzh", - "indexid": "xSzcwtK8M8nGmw9zHeVSmXMipjnS4TfbaT", - "hash160result": "64016ff1aa45d5a017a351c87751052b721c02cd", +exports.IDENTITY_RESIDENTCARD_ADDRESS_REGION = { + "vdxfid": "iPWcAQ6zbC9rKaaWAgrpoHmKs5G5SQCprF", + "indexid": "xULidCY5SWNWwkTY2NWymgHrtjH6QfP6JL", + "hash160result": "ff3f1523bfb1fe501ef10f0036c9f059b64bc7db", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" + "name": "vrsc::identity.residentcard.address.region" } }; -exports.IDENTITYDATA_PASSPORT_DOCUMENTVERIFICATION_MATCHED = { - "vdxfid": "iRstHEJfNZfPvmcDUGMyqD6fLvfKvv9ZNr", - "indexid": "xWhzk2jkDst4YwVFKx28obdCNagLpBSeTi", - "hash160result": "ea0746c22573d01b7aa023e40381f655a9bcbdf5", +exports.IDENTITY_RESIDENTCARD_ADDRESS_POSTCODE = { + "vdxfid": "iG1QGYyp4SkiP7b9ngPwkTGC3DxVG3hB16", + "indexid": "xLqWjMQtukyP1HUBeN46iqnj4syW4eat4U", + "hash160result": "f345aa72196b006e2200bd08ed0ea165806c7889", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk" + "name": "vrsc::identity.residentcard.address.postcode" } }; -exports.IDENTITYDATA_PASSPORT_NAME_MATCHED = { - "vdxfid": "iNQ1CWDT7So5agryapjXpo2nhxto4w6yM8", - "indexid": "xTE7fJeXxm1kCrk1SWPgoBZKjcuoypYrZa", - "hash160result": "5e8b3b606e58d88fb46e055728ff0a8eeb7c8fcf", +exports.IDENTITY_RESIDENTCARD_ADDRESS_COUNTRY = { + "vdxfid": "i4wzngZfZb2QBnjr2TjtoMoMF9roSqQkho", + "indexid": "x9n7FUzkQuF4oxcst9Q3mkKtGospNqDjEQ", + "hash160result": "dd2a94da0a94115ed04de616b7d0ea1b19312a10", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iKCFQYZudPChh6jypSpcgENoQb5WeX5wHv" + "name": "vrsc::identity.residentcard.address.country" } }; -exports.IDENTITYDATA_PASSPORT_DATEOFBIRTHMATCHED = { - "vdxfid": "iHExwXrJTrVLTS5okNNtp9BMRoTbwBNBQu", - "indexid": "xN55QLHPKAi15bxqc433nXhtTTUcpv6xtK", - "hash160result": "3f79d48090f69366e7e78b5765b14565fb3a0197", +exports.IDENTITY_IDCARD = { + "vdxfid": "iK7FrcxNvsej84qZjYR73iGgEV96sGKwTU", + "indexid": "xPwNKRPTnBsPkEibbE5G26oDG9A7j4JSm7", + "hash160result": "4f2b2c852e4cfa5a640988af78c4d02243467cab", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iMUfUShqVwWrGSx6HvZcDJwHywiLW5Zusb" + "name": "vrsc::identity.idcard" } }; -exports.IDENTITYDATA_RESIDENCEPERMIT = { - "vdxfid": "iJzdKZ1ppXjnrbasWGH24nWtNchKTFE6oM", - "indexid": "xPpjnMSufqxTUmTuMwwB3B3RQGiLRSe3a7", - "hash160result": "eb1a88f1148f3f3798bd9f08a5b88a50bf473baa", +exports.IDENTITY_IDCARD_ORIGINALFRONT = { + "vdxfid": "iCnLNq42DxhuK84Nes4UGjFFUuNsGGpuBZ", + "indexid": "xHcSqdV75GvZwHwQWYidF7mnWZPtATN7Ky", + "hash160result": "9f5f63641e6e935628d7602e92814311ea631766", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" + "name": "vrsc::identity.idcard.originalfront" } }; -exports.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_FRONT = { - "vdxfid": "iCAHvT9dB52QoCHuHYuYJ2BBkytUndvMVj", - "indexid": "xGzQPFai2PF5RNAw9EZhGQhinduVgDqt5Q", - "hash160result": "e191b50000a4d871b4a310f3360dd8cad35d465f", +exports.IDENTITY_IDCARD_ORIGINALBACK = { + "vdxfid": "iJyfvwrUeTRiGxiYw6oJZ3uALsuBt7QTyy", + "indexid": "xPonPkHZVmeNu8bannTTXSRhNXvCpAD3MB", + "hash160result": "df3a44e11ad54673eff910c1320d9f50100b0daa", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iBrpt78Mdrqcc1RHwPWKYBALbNTC4cwdJQ" + "name": "vrsc::identity.idcard.originalback" } }; -exports.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_BACK = { - "vdxfid": "iE6M2Mibzrrneg3cZFbNrXHf9D9FMgBqx9", - "indexid": "xJvTVA9grB5TGqveQwFXpupCAsAGBbcCJR", - "hash160result": "9233dcff0e38f245836911eef94c4bb7238b7774", +exports.IDENTITY_IDCARD_CROPPEDFRONT = { + "vdxfid": "iFDp8jWwybweGStGQnYxwhbi8eiucZ29sr", + "indexid": "xL3vbXx2pvAJtcmJGUD7v68FAJjvZmrsga", + "hash160result": "b10845ae9b29f3ed25f33f091398fd0a1536d980", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iNRCZp7JBDHbpKQ2Vhc6TK97hUSRPG4jaX" + "name": "vrsc::identity.idcard.croppedfront" } }; -exports.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_FRONT = { - "vdxfid": "i91nujduYeu8scMbSkJj1iZuH5VSh3Z5rW", - "indexid": "xDquNY4zPy7oVnEdJRxsz76SJjWTcVNPwS", - "hash160result": "28ec50fb17556fceea921d0a90d822987471c23c", +exports.IDENTITY_IDCARD_CROPPEDBACK = { + "vdxfid": "i8GpXrygUPpQYVwcoZ7JVRB1xB46xZsMuG", + "indexid": "xD6vzfQmKi35AfpefEmTTohYyq57sdLVxr", + "hash160result": "84c05d2d84ab69db2834df22602f34445ae9a134", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iK822dFQwW2Y5tdpSpxQtHQemf47HoFxqs" + "name": "vrsc::identity.idcard.croppedback" } }; -exports.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_BACK = { - "vdxfid": "iLpNisoTSTZ8LLHtkPJ9HSxVu84QW1a98Z", - "indexid": "xReVBgEYHmmnxWAvc4xJFqV2vn5RR6aiTG", - "hash160result": "03f3ca2aa3bcdbc2c7b60d18913ae869c02f3bbe", +exports.IDENTITY_IDCARD_FACE = { + "vdxfid": "i8sfiwALhk4FtSaWSnBWYwKnWN3G7m3jyU", + "indexid": "xDhnBjbRZ4GvWcTYJTqfXKrKY24GxBC5cg", + "hash160result": "4afc5fda25a15a4627b8426f40594ff2e11d393b", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iCvxKVHbnbwHGZDTaGofeyyJLjsGBSZr7A" + "name": "vrsc::identity.idcard.face" } }; -exports.IDENTITYDATA_RESIDENCEPERMIT_FACE = { - "vdxfid": "iG9jwZT4PBKWSbm7o5zCWNKZkACyGCCZY3", - "indexid": "xLyrQMt9EVYB4me9emeMUkr6mpDz9wW5M5", - "hash160result": "75cd40bd50a7df36d91334c5e7087f9b602c0c8b", +exports.IDENTITY_IDCARD_IDNUMBER = { + "vdxfid": "iBEJB1xD1mpR4kYQbYieW3hNFpe5QmQ6qA", + "indexid": "xG4QdpPHs635gvRSTENoUSDuHUf6JB2izs", + "hash160result": "0af18c033e6ad395bdfb5fbdbf5144d63c1d1055", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iPrxPJC6NbzWnkNyLSvwa8AVrwJWBUV9mM" + "name": "vrsc::identity.idcard.idnumber" } }; -exports.IDENTITYDATA_RESIDENCEPERMIT_IDNUMBER = { - "vdxfid": "iFSUa91mA9uok8XL71HNkK5m8xvBKEiMBn", - "indexid": "xLGb2wSr1U8UNJQMxgwXihcJAcwCCmAsFQ", - "hash160result": "3463196fb71b581b22c2355dca63d8ce0b4a3e83", +exports.IDENTITY_IDCARD_CATEGORY = { + "vdxfid": "i4HCpvV1NJd4Ka8atCtDkXs4XLAkrmtKib", + "indexid": "x97KHiv6Dcqiwk1cjtYNivPbYzBmg48ama", + "hash160result": "68b49fa5bf2ed00672c881c15167fee2c304d408", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iJdUp47SVEzGEHCvoRyix2xufRsAeWSyxa" + "name": "vrsc::identity.idcard.category" } }; -exports.IDENTITYDATA_RESIDENCEPERMIT_CATEGORY = { - "vdxfid": "iJ7wb2r93YaLrXkLdKWgAs5nmowgE7Feth", - "indexid": "xNx43qHDtro1UhdNV1Aq9FcKoTxh6YYiWp", - "hash160result": "5eb69e44059f8c65fdc0f132bffe26ba8c50a5a0", +exports.IDENTITY_IDCARD_EXPIRATIONDATE = { + "vdxfid": "iNTbsfTmeAm7KUFehtCq3RH1JgbUdTJwCt", + "indexid": "xTHiLTtrVUymwe8gZZrz1ooYLLcVZC5A4n", + "hash160result": "f4b807e32848d5a40815e2aa19cb219c64ae3dd0", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "i9MqRfXPAiYwv9q4iSjTtXquNCCZ1GgECn" + "name": "vrsc::identity.idcard.expirationdate" } }; -exports.IDENTITYDATA_RESIDENCEPERMIT_EXPIRATIONDATE = { - "vdxfid": "iFTmB8nRz1e1LWy6VZy69z13JJDqSjGYzu", - "indexid": "xLHsdwDWqKrfxgr8MFdF8NXaKxErHmHoJn", - "hash160result": "4c0ea69b915ce91fecf6f82b5993835ea4907c83", +exports.IDENTITY_IDCARD_ISSUINGCOUNTRY = { + "vdxfid": "iJ5qVRWTHerkVreE9UrSfKyphD3XB9s8FA", + "indexid": "xNuwxDwY8y5R82XG1AWbdiWMis4Y3BXDg7", + "hash160result": "2cc5492966de5135e638de253b497cccb8643fa0", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iNgDKviLAeeV65eBztuduckUMDE2erB7jj" + "name": "vrsc::identity.idcard.issuingcountry" } }; -exports.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED = { - "vdxfid": "iDycAmsF8RoSfDCqt8GKwfLdajJEejPYBF", - "indexid": "xJoidaJKyk27HP5sjovUv3sAcPKFUR4Skz", - "hash160result": "198ee70ddf1dae654a868ee39d83015a37463173", +exports.IDENTITY_IDCARD_ISSUINGREGION = { + "vdxfid": "i8dHTbZ62Bth8NwkxasnKFpvX4EZYuBun4", + "indexid": "xDTPvPzAsW7MkYpnpGXwHeMTYiFaMyp6FD", + "hash160result": "f42f7b71bb43c590b9063755754bf2d534b58038", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iFgXmTd9Wi2sqZyPqaoejdHG2sMaJWLrEX" + "name": "vrsc::identity.idcard.issuingregion" } }; -exports.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_REGION = { - "vdxfid": "iLZnhoDnggyo9LGiyS8xvEovkSn1yRuRjz", - "indexid": "xRPuAbesY1CTmW9kq7o7tdLTn6o2m96TLY", - "hash160result": "f969f7afa0599e431674b2e76bc4ee5f3cf778bb", +exports.IDENTITY_IDCARD_DATEOFBIRTH = { + "vdxfid": "iGcwhC6znG63pb6jqsRnrtDjXV4aXXsub2", + "indexid": "xMT49zY5daJiSkymhZ5wqGkGZ95bMGYJ9r", + "hash160result": "4d0c72c3369a0ac64711e58ae1b10785f1363190", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL" + "name": "vrsc::identity.idcard.dateofbirth" } }; -exports.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTH = { - "vdxfid": "iMPmaDAiNuaqfSNV9SbCuaYG2TCvPNU495", - "indexid": "xSDt31boEDoWHcFX18FMsy4o47DwGgmFbq", - "hash160result": "93ab89f3abe5db79de5fb960f9362b02ecfc8bc4", +exports.IDENTITY_IDCARD_ADDRESS_STREET1 = { + "vdxfid": "i6jMXjNE9qioZ2dFricFnEBEQEWK5Kg3PS", + "indexid": "xBZTzXoK19wUBCWHiQGQkchmRtXKugcKWw", + "hash160result": "2cee0d13a2fdeaac83d052ad27610da8bf59b623", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iQhjETQvSkadciDPy69QZNy3hSczWQ4iu4" + "name": "vrsc::identity.idcard.address.street1" } }; -exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS = { - "vdxfid": "i5pghYvnurAvtbyT69Lt1wBk9NTQNYfWt5", - "indexid": "xAeoAMMsmAPbWmrUwq12zKiHB2URHSXqA1", - "hash160result": "43aa306c8ff55fc646a7a1bb0e0171576c4ec019", +exports.IDENTITY_IDCARD_ADDRESS_CITY = { + "vdxfid": "i3viAeqayk3KDk5tQpYcz6gFs1ayW5vBma", + "indexid": "x8kpdTGfq4FyquxvGWCmxVCntfbzM8iAVb", + "hash160result": "a10bfcd1cfd12d466a276339072d2f2a7ec6f304", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iGebr2v1TgkWvsyLjs1dQ5SqffqKL8rNm3" + "name": "vrsc::identity.idcard.address.city" } }; -exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_STREET1 = { - "vdxfid": "iC3BuU53cL5hXRnnezmmToKvUZxyQb1AUs", - "indexid": "xGsJNGW8TeJN9bfpWgRvSBrTWDyzMRUX1Q", - "hash160result": "64d4d3dd9f6acbd72f13a717572302109c6eee5d", +exports.IDENTITY_IDCARD_ADDRESS_REGION = { + "vdxfid": "iEHvf3XCFacMihTQPVXxNeo6hBCqggDFie", + "indexid": "xK837qxH6tq2LsLSFBC7M3KdiqDrYBNMK7", + "hash160result": "55af249b3ceb591709c693017e5b7b1cb131a876", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + "name": "vrsc::identity.idcard.address.region" } }; -exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_CITY = { - "vdxfid": "iHv1BkzjJgJcwsBHJCeGTgcUHmoCmGE5py", - "indexid": "xNk7eZRp9zXHa34K9tJRS591KRpDa69BBJ", - "hash160result": "6d9fbcb4cd86e46dfbf806c13f951108c253639e", +exports.IDENTITY_IDCARD_ADDRESS_POSTCODE = { + "vdxfid": "i3yAnt6zdceYxbCBnLwxn2tNdM4BnPkzhT", + "indexid": "x8oHFgY5UvsDam5De2c7kRQuf15ChzdWFA", + "hash160result": "acd086baf0863cff86fc56ec0fbb16dd18d56a05", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + "name": "vrsc::identity.idcard.address.postcode" } }; -exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_REGION = { - "vdxfid": "iKEHZjtgcCRd67iRsA93J7yphxvRUYdZig", - "indexid": "xQ4Q2YKmTWeHiHbTiqoCGWWMjcwSPM6wn6", - "hash160result": "6c5f8b7989f6210f50d9d270c170cae9dd9cd0ac", +exports.IDENTITY_IDCARD_ADDRESS_COUNTRY = { + "vdxfid": "iA6KVD2C4QJAyKfCS3XfQV8AxmpR9R3XG5", + "indexid": "xEvRx1TGuiWqbVYEHjBpNsehzRqS2fp4qg", + "hash160result": "bab14b514d91d7daa39175c90e29a956dec19548", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" + "name": "vrsc::identity.idcard.address.country" } }; -exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_POSTCODE = { - "vdxfid": "i7niNaE598TEVhfaf78do5rhKX6gXgdqAC", - "indexid": "xCcpqNf9zSfu7sYcWnnnmUPEMB7hMATGYv", - "hash160result": "ca2d0134ac28a0f46363ea91b036fc78531f512f", +exports.IDENTITY_VISA = { + "vdxfid": "iDCwZf84AhbJkm4zKZP7Le8h8ukJS9FySA", + "indexid": "xJ342TZ921oyNvx2BF3GK2fEAZmKGeUQUd", + "hash160result": "57faa6b546ac92c71022178b8c5e9fbae9bebe6a", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" + "name": "vrsc::identity.visa" } }; -exports.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_COUNTRY = { - "vdxfid": "i7sePTAMwZ5hVQvdgjfWr9mCg4G8YDvwcx", - "indexid": "xChkrFbSnsJN7aofYRKfpYHjhiH9PqemVR", - "hash160result": "2ffeb2e22fb423ede8ad0127d39be36133e03f30", +exports.IDENTITY_VISA_ORIGINALFRONT = { + "vdxfid": "iGAgzyLDVs5vYFLRgXVnkQpDRKy9Zh1TiV", + "indexid": "xLzoTmmJMBJbARDTYD9wioLkSyzARsVQWr", + "hash160result": "755da3361216260b786ba78fbe68800557223a8b", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" + "name": "vrsc::identity.visa.originalfront" } }; -exports.IDENTITYDATA_RESIDENCEPERMIT_DOCUMENTVERIFICATION_MATCHED = { - "vdxfid": "iGRk3K3N3Nr4gvVWL2aKdzfjP54ZNvpVaT", - "indexid": "xMFrW7USth4jK6NYBiEUcPCGQj5aM9U9ed", - "hash160result": "316ae15a805987678066399eb21d162759e9128e", +exports.IDENTITY_VISA_ORIGINALBACK = { + "vdxfid": "i3becgcmf85RiY2PAxsp3fbuGKG8Qc73t1", + "indexid": "x8Rm5V3rWSJ6LhuR2eXy248SHyH9Jjue4S", + "hash160result": "e71909c77e2e0361764d22b81f4f53085fe85801", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk" + "name": "vrsc::identity.visa.originalback" } }; -exports.IDENTITYDATA_RESIDENCEPERMIT_NAME_MATCHED = { - "vdxfid": "iPJhtbfg9yL4ydMLXfgb1XUqm4zvtcS3c7", - "indexid": "xU8pMQ6m1HYjboENPMLjyv1Nnj1wmqZv7q", - "hash160result": "52e2b8b282867a147bd6ce097359606cd91587d9", +exports.IDENTITY_VISA_CROPPEDFRONT = { + "vdxfid": "iAapfFQMAQy7USdjRwqzAZ2nWhRMSiQMmV", + "indexid": "xFQw83qS1jBn6cWmHdW98wZKYMSNHsb2wy", + "hash160result": "56ed30f8daf83e3b09eee57517be45b6b8c1f94d", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iKCFQYZudPChh6jypSpcgENoQb5WeX5wHv" + "name": "vrsc::identity.visa.croppedfront" } }; -exports.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTHMATCHED = { - "vdxfid": "iBZWkQDNUV46RpDHi3CMn78ENBcQj4RVUp", - "indexid": "xGPdDCeTKoGm3z6KZirWkVemPqdRgTRtbw", - "hash160result": "197dbc7ddf5795a60bb0bf037c8b846cda83b258", +exports.IDENTITY_VISA_CROPPEDBACK = { + "vdxfid": "i3quMdmv3vAQDBA6nzM8fTiFtqJrw7tcnf", + "indexid": "x8g1pSCzuEP4qM38eg1HdrEnvVKsoXBZ7R", + "hash160result": "1d8106821498549cebc0af6f8d120b9933090b04", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iMUfUShqVwWrGSx6HvZcDJwHywiLW5Zusb" + "name": "vrsc::identity.visa.croppedback" } }; -exports.IDENTITYDATA_RESIDENTCARD = { - "vdxfid": "iRZk3qsYq1ac6H53v3cSWhqx8VqUoMxpuK", - "indexid": "xWPrWeJdgKoGiSx5mjGbV6NVA9rVgyJnaL", - "hash160result": "b804f8f1b6006c80b18d5cda0fbcc39900614ff2", +exports.IDENTITY_VISA_FACE = { + "vdxfid": "iAqxnB58655ZcRLAUm2Utib2rguRXT9wZM", + "indexid": "xFg5EyWCwPJEEbDCLSgds77ZtLvSRpw2k9", + "hash160result": "59564e826c8342a2b721708f6a83c9761dc6d650", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" + "name": "vrsc::identity.visa.face" } }; -exports.IDENTITYDATA_RESIDENTCARD_ORIGINAL_FRONT = { - "vdxfid": "iHqGf5Yq5MTjS3vJS4GmfPkU2unJVFMLXs", - "indexid": "xNfP7syuvfgQ4DoLHjvvdnH14ZoKPe8ZfA", - "hash160result": "3ee1ac34db24100dbcd7ab1d0c110fc674297e9d", +exports.IDENTITY_VISA_IDNUMBER = { + "vdxfid": "iQ5LfUtuggDyqbePUB9iWLgxYj7tvDm2VE", + "indexid": "xUuT8HKzXzSeTmXRKrosUjDVaP8upm7rqg", + "hash160result": "77ae761bf6bf7922ff8e47b53bd88107be15f8e1", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iBrpt78Mdrqcc1RHwPWKYBALbNTC4cwdJQ" + "name": "vrsc::identity.visa.idnumber" } }; -exports.IDENTITYDATA_RESIDENTCARD_ORIGINAL_BACK = { - "vdxfid": "iQAb2ZQ7Z5tZXiiASNpuXYWGGA9ZNTho6m", - "indexid": "xUzhVMqCQQ7E9tbCJ4V4Vw2oHpAaA2pxef", - "hash160result": "cf0888932dddd9da9a7e8008dc7e3dfe9a27f6e2", +exports.IDENTITY_VISA_CATEGORY = { + "vdxfid": "iH4nhrNsZKK6bEkgLDu17fBPR5dnVgitiQ", + "indexid": "xMtuAeoxQdXmDQdiBuZA63hvSjeoT3wsnv", + "hash160result": "8052162609b4da20bb5932ead5b6deedbb861495", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iNRCZp7JBDHbpKQ2Vhc6TK97hUSRPG4jaX" + "name": "vrsc::identity.visa.category" } }; -exports.IDENTITYDATA_RESIDENTCARD_CROPPED_FRONT = { - "vdxfid": "iCAq6xmjVDq3an2yRkws3xmLfXmDfm6TK5", - "indexid": "xGzwZmCpLY3iCwv1HSc22MHshBnEaVnkU7", - "hash160result": "6e067b98f82fc5d158a11c57e86fd5583165605f", +exports.IDENTITY_VISA_EXPIRATIONDATE = { + "vdxfid": "iNW2k7p7hVK2GCc7m1k4mihqh8jd94Dmnh", + "indexid": "xTL9CvFCYoXgtNV9chQDk7ENinkdzPUodD", + "hash160result": "5eaa0aef6ed6d27ee4909bc6ce8619c60346b3d0", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iK822dFQwW2Y5tdpSpxQtHQemf47HoFxqs" + "name": "vrsc::identity.visa.expirationdate" } }; -exports.IDENTITYDATA_RESIDENTCARD_CROPPED_BACK = { - "vdxfid": "i5DMa83PXnoc3VaaDBvwUPqtXQS3VkJM65", - "indexid": "xA3U2vUUP72GffTc4sb6SnNRZ4T4Qptiiu", - "hash160result": "79ad91be4e21e9065c557d16d530bd53c5c71113", +exports.IDENTITY_VISA_ISSUINGCOUNTRY = { + "vdxfid": "i5vDfPKMfCRPXVRhfumjWPEvBFhNMVjtGK", + "indexid": "xAkL8BkSWWe49fJjXbRtUmmTCuiPJGBZ2c", + "hash160result": "ebf49255193b4ffbb3a0487106a4df98833bcc1a", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iCvxKVHbnbwHGZDTaGofeyyJLjsGBSZr7A" + "name": "vrsc::identity.visa.issuingcountry" } }; -exports.IDENTITYDATA_RESIDENTCARD_FACE = { - "vdxfid": "iMkREmUUamd78MP7GeP1wtFteRGoWEAgFj", - "indexid": "xSaXhZuZS5qmkXG98L3AvGnRg5HpLnMLTA", - "hash160result": "a8daf37e1cd1ccc4edbf4f0ee3b193f588bf73c8", +exports.IDENTITY_VISA_ISSUINGREGION = { + "vdxfid": "iPRc9Ns6LadQNYU7DqSNyx7LW8W9dPKDjC", + "indexid": "xUFicBJBBtr4ziM95X6XxLdsXnXAYQ1XFN", + "hash160result": "a1217c6e44b1f47faf9d59378206009d8433d5da", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iPrxPJC6NbzWnkNyLSvwa8AVrwJWBUV9mM" + "name": "vrsc::identity.visa.issuingregion" } }; -exports.IDENTITYDATA_RESIDENTCARD_IDNUMBER = { - "vdxfid": "iGYqQVqehuhYb95knMeydLdtoEzGAFJU9e", - "indexid": "xMNwsJGjZDvDDJxne3K8bjARpu1H4ShUgH", - "hash160result": "c9b041ee41a77909c6aee95418d9e5244d4d6a8f", +exports.IDENTITY_VISA_DATEOFBIRTH = { + "vdxfid": "i55bTsxLkCTmE6VvppvG8doYnmxuHhec65", + "indexid": "x9uhvgPRbWgRrGNxgWaR72L5pRyvA4vVWm", + "hash160result": "ed824bbfd195e63d6d5151a07eda49eba60c9a11", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iJdUp47SVEzGEHCvoRyix2xufRsAeWSyxa" + "name": "vrsc::identity.visa.dateofbirth" } }; -exports.IDENTITYDATA_RESIDENTCARD_CATEGORY = { - "vdxfid": "iMxE22zmptXB8ShHsSypWSqXLmEficJVug", - "indexid": "xSnLUqRrgCjqkcaKj8dyUqN4NRFgaJT7cn", - "hash160result": "5b6369f617841495baaeb8b396b6bf87c75fafca", +exports.IDENTITY_VISA_ADDRESS_STREET1 = { + "vdxfid": "iMzWxFVzJHbQm5YWv9c1eujvrUrPHAGVAc", + "indexid": "xSpdR3w59bp5PFRYmqGAdJGTt8sQ8o4mpu", + "hash160result": "05992eb838a4f562b6b7e0ff84bb05cdac571ecb", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "i9MqRfXPAiYwv9q4iSjTtXquNCCZ1GgECn" + "name": "vrsc::identity.visa.address.street1" } }; -exports.IDENTITYDATA_RESIDENTCARD_EXPIRATIONDATE = { - "vdxfid": "iFeEkx5dNqs9RmYnyBNnMJpigdVo75MA3Q", - "indexid": "xLUMDkWiEA5p3wRpps2wKhMFiHWp59WJtb", - "hash160result": "53ab24af7c986998582d42d98d4e7b4ef1bf7785", +exports.IDENTITY_VISA_ADDRESS_CITY = { + "vdxfid": "i8YXgZ7doRhidT5phX6qyRnttV6hZiyWTm", + "indexid": "xDNe9MYiejvPFcxrZCkzwpKRv97iS3TQjA", + "hash160result": "04959daab853c797bbbcb9c5ead7376e4a809a37", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iNgDKviLAeeV65eBztuduckUMDE2erB7jj" + "name": "vrsc::identity.visa.address.city" } }; -exports.IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED = { - "vdxfid": "iHHLQuEx2sQ5FHm8cHs2eW5YFKBu42QyT4", - "indexid": "xN7Sshg2tBcjsTeATyXBctc5GyCuutBKAi", - "hash160result": "c233566af8cb4d2bec45de1b6314a8c373fc7397", +exports.IDENTITY_VISA_ADDRESS_REGION = { + "vdxfid": "i6YkTDEi1M1mzuTyzww8hNoksJFpev17Fu", + "indexid": "xBNrv1fnrfESd5M1rdbHfmLHtxGqUoeALR", + "hash160result": "3a47a53e8717444b5d31e8618049daa8cde8b421", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iFgXmTd9Wi2sqZyPqaoejdHG2sMaJWLrEX" + "name": "vrsc::identity.visa.address.region" } }; -exports.IDENTITYDATA_RESIDENTCARD_ISSUING_REGION = { - "vdxfid": "iQSeWkZJbBknqaAvrVk8UpzXcbDcD3JwZK", - "indexid": "xVGkyYzPSVyTTk3xiBQHTDX4eFEd6nwER3", - "hash160result": "f46eda08f73c5415674385dafb8f913a5ab8ffe5", +exports.IDENTITY_VISA_ADDRESS_POSTCODE = { + "vdxfid": "iBJDLHSLB4cHvaeXazFp25Be3V9yRWmcoK", + "indexid": "xG8Ko5sR2NpxYkXZSfuxzTiB59AzMUATiw", + "hash160result": "dd0d87e3163157402aa16d2017a3ea06d6bccd55", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL" + "name": "vrsc::identity.visa.address.postcode" } }; -exports.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTH = { - "vdxfid": "iL3JyAfGXCDqotYbGTsC6Et9pe4x9zqKft", - "indexid": "xQsRRy6MNWSWS4Rd89XM4dQgrJ5y4pBTXB", - "hash160result": "ebc0dd42cc2bbf62c504fb64e7b6d29ebb55b5b5", +exports.IDENTITY_VISA_ADDRESS_COUNTRY = { + "vdxfid": "iQ9Z1PZMMp49rtDuGQSjfEZn3xACfxLAYa", + "indexid": "xUyfUBzSD8GpV46w866tdd6K5cBDbMPuNo", + "hash160result": "c45655a6924c0b377e9182869dc780df690dc4e2", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iQhjETQvSkadciDPy69QZNy3hSczWQ4iu4" + "name": "vrsc::identity.visa.address.country" } }; -exports.IDENTITYDATA_RESIDENTCARD_ADDRESS = { - "vdxfid": "iBU6zckdwpwkR9BbFPVKNEf5X7b8TWERYR", - "indexid": "xGJDTRBio9AR3K4d759ULdBcYmc9QPsq2R", - "hash160result": "921d0bf97b612e9de3294054e4a25e4c0c9bac57", +exports.IDENTITY_PERSONALDETAILS = { + "vdxfid": "i8SSgM1z7XVoCtoP9CCsMms3zCndaNjtCe", + "indexid": "xDGZ99T4xqiTq4gQzss2LAPb1roeUyLwkU", + "hash160result": "a8fbe89451c1d0a77b336ccf6b0fb7601dd47336", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iGebr2v1TgkWvsyLjs1dQ5SqffqKL8rNm3" + "name": "vrsc::identity.personaldetails" } }; -exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_STREET1 = { - "vdxfid": "i47Wp3Wt9Bib7KB6oSxm8QtQxmAqwxZV18", - "indexid": "x8wdGqwxzVwFjV48f8cv6oQwzRBrs4rtgB", - "hash160result": "4f18b96b75ce0af53a288a0e382c54df3adffe06", +exports.IDENTITY_CONTACTDETAILS = { + "vdxfid": "iRLT8V9NN178CvZQusJSHuyuFC2fD2QmE3", + "indexid": "xWAZbHaTDKKnq6SSmYxbGJWSGr3g1GRDYH", + "hash160result": "b9185ad980909708754a484bf11edc9febd8cbef", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + "name": "vrsc::identity.contactdetails" } }; -exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_CITY = { - "vdxfid": "iRNzrpZ74Wm6wMMFh5VeUzR2NBfa9R3UTo", - "indexid": "xWD7KczBupymZXEHYm9oTNwZPqgb5cJGDD", - "hash160result": "149842d5588eaf9a77f40e4b63520c09832a47f0", +exports.IDENTITY_LOCATION = { + "vdxfid": "iGmiLZ7J6GjxjZ4rkSMsDzyyvWtmMBjnbo", + "indexid": "xMbpoMYNwaxdMiwtc822CPWWxAunLDE1BS", + "hash160result": "15ea60d9ddde976095b0c79ceecef7b034cfd991", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + "name": "vrsc::identity.location" } }; -exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_REGION = { - "vdxfid": "iHAW2LhviXqcVdMsPTcap9khj6rfrfBKRu", - "indexid": "xMzcV991Zr4H7oEuF9GjnYHEkksgoPXYFo", - "hash160result": "c7cd6053d9cd2a7e4482f46366202e87e7182996", +exports.IDENTITY_BANKINGDETAILS = { + "vdxfid": "i8DUrZJJRjNQMJNeJ3Ti6pbpKPJ55LECyJ", + "indexid": "xD3bKMjPH3b4yUFg9j7s5D8MM3K612HEir", + "hash160result": "a7e5de6ac208f110d0509cffeb916b8dd03c0034", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" + "name": "vrsc::identity.bankingdetails" } }; -exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_POSTCODE = { - "vdxfid": "i9R5Y1NexqRDP3ztWox1qCPVEVZvbAS7Yx", - "indexid": "xEFBzoojp9dt1DsvNVcAoav2G9awPo2kkY", - "hash160result": "2ccf68aa3d77e0d0a30ef4bdae990b6a72e32941", +exports.IDENTITY_DOCUMENTS = { + "vdxfid": "iCm3ERZoUw2ze1P11QyRUtvhKYovCWFXbT", + "indexid": "xHb9hDztLFFfGBG2s6daTHTEMCpw3tcbVJ", + "hash160result": "ee9f8d5ba7366983cf9b9d3e5e8ac50898a9d865", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" + "name": "vrsc::identity.documents" } }; -exports.IDENTITYDATA_RESIDENTCARD_ADDRESS_COUNTRY = { - "vdxfid": "iAZGARqg4GFG8SdjuKe9Zkf9SNqS2fqqop", - "indexid": "xFPNdEGkuaTvkcWmm1JJY9BgU2rSwXWCNA", - "hash160result": "21c3b6b680c00fc148910e6684737549b636ae4d", +exports.IDENTITY_BANKACCOUNT = { + "vdxfid": "iN4AgB4KEN1C3TfZnYDFUhxn37PdcrZvxT", + "indexid": "xStH8yVQ5gDrfdYbeDsQT6VK4mQeYDjcFm", + "hash160result": "122bf0739d7d1def003656a63c443efb6c14cfcb", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" + "name": "vrsc::identity.bankaccount" } }; -exports.IDENTITYDATA_RESIDENTCARD_DOCUMENTVERIFICATION_MATCHED = { - "vdxfid": "iQvbQZ6EQmkESfrgtXhCJ8Vszu1oC9f5rt", - "indexid": "xVkhsMXKG5xu4qjikDMMGX2R2Z2p3yR8MD", - "hash160result": "817d1a8d17b92516bccc8e026fbf4d8e09c648eb", +exports.IDENTITY_BANKINGDETAILS_CURRENCY = { + "vdxfid": "i5k8pb9FHf5VZJKki6him1WMBkpyhe56BY", + "indexid": "xAaFHPaL8yJABUCnZnMsjQ2tDQqzfUkZRm", + "hash160result": "cc655f9f104ad6c25cc65407121fa7ac1208e418", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk" + "name": "vrsc::identity.bankingdetails.currency" } }; -exports.IDENTITYDATA_RESIDENTCARD_NAME_MATCHED = { - "vdxfid": "iNdqmEoGr2zr9eDPmPS99nHJQcK8c61SWR", - "indexid": "xTTxE3EMhMDWmp6Rd56J8AoqSGL9Yay9KW", - "hash160result": "13cc257f9ae7a639ce00b049198336b15a6f2dd2", +exports.IDENTITY_BANKINGDETAILS_COUNTRY = { + "vdxfid": "iHYqZF4Asa4erZR9kJ5G5nWRNGWdiS8vBh", + "indexid": "xNNx23VFitHKUjJBbyjR4B2xPvXebL5g4h", + "hash160result": "cf7870c11608bf6e58890fbfc18ffe0db98d629a", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iKCFQYZudPChh6jypSpcgENoQb5WeX5wHv" + "name": "vrsc::identity.bankingdetails.country" } }; -exports.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTHMATCHED = { - "vdxfid": "iL3YRkmngkLVsPa1xwAdWcb5NEjiZdCLbB", - "indexid": "xQsetZCsY4ZAVZT3pcpnV17cPtkjSpUs5B", - "hash160result": "800f1e6739db010a4edc9ed45e4d2422c591c0b5", +exports.IDENTITY_BANKINGDETAILS_STREET1 = { + "vdxfid": "iRhANjQk2G3aFXiaGtG68kZjdYr2iVXQJJ", + "indexid": "xWXGqXqpsaGEshbc8ZvF796GfCs3bDhrgC", + "hash160result": "bd420c73e6bba2e48542cddf188c23b8c098b6f3", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iMUfUShqVwWrGSx6HvZcDJwHywiLW5Zusb" + "name": "vrsc::identity.bankingdetails.street1" } }; -exports.IDENTITYDATA_VISA = { - "vdxfid": "iATKs43yLjHHyCcLmVtZt2gGZF5PaTvxfy", - "indexid": "xFHSKrV4C3VxbNVNdBYirRCoau6QSwcyaF", - "hash160result": "f3240ba891b8ed340bc5f8ca9f7c6e3391ce8e4c", +exports.IDENTITY_BANKINGDETAILS_STREET2 = { + "vdxfid": "iFWtcLUKAECLrREJr6mxtHM9xPUocxmTSY", + "indexid": "xLM158uQ1YR1Ub7LhnS7rfsgz3VpTpBcCu", + "hash160result": "7f1a53da2e265bab3230d9eec1ed0f36d7041484", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" + "name": "vrsc::identity.bankingdetails.street2" } }; -exports.IDENTITYDATA_VISA_ORIGINAL_FRONT = { - "vdxfid": "iSQ98EpyqS26vDxLz2sPkSLfHitiSE5W66", - "indexid": "xXEFb3G4gkEmYPqNqiXYipsCKNujJTbHCP", - "hash160result": "f7bb12de360a562c66b20e49714fdf7c979b76fb", +exports.IDENTITY_BANKINGDETAILS_CITY = { + "vdxfid": "iQxBEB8sXNez25HJCzvnTWtWqXUkEVAuo8", + "indexid": "xVnHgyZxNgseeFAL4gawRuR3sBVm7nyQqt", + "hash160result": "5878bb5b9371344acb1b679316e0e087046c95eb", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iBrpt78Mdrqcc1RHwPWKYBALbNTC4cwdJQ" + "name": "vrsc::identity.bankingdetails.city" } }; -exports.IDENTITYDATA_VISA_ORIGINAL_BACK = { - "vdxfid": "iP7hjj56oH2Xozpw6sPAx4tmXzdCqCGc8P", - "indexid": "xTwpCXWBebFCSAhxxZ3KvTRJZeeDgSAny1", - "hash160result": "d52e97ed89ccb3d384cee2509a0bf1aacf6172d7", +exports.IDENTITY_BANKINGDETAILS_REGION = { + "vdxfid": "i4HJ5yrzBFEwjiYgzptMcrBsCeBjPYQJFX", + "indexid": "x97QYnJ52ZTcMtRirWYWbEiQEJCkKnxArM", + "hash160result": "7bf3a5ee05846c54bd19032e6ee9069cbc68d808", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iNRCZp7JBDHbpKQ2Vhc6TK97hUSRPG4jaX" + "name": "vrsc::identity.bankingdetails.region" } }; -exports.IDENTITYDATA_VISA_CROPPED_FRONT = { - "vdxfid": "i5GYu5sBm2sJh1trhe7ry2J3h5vq5jtBi5", - "indexid": "xA6fMtJGcM5yKBmtZKn1wQpaijwquAGHpb", - "hash160result": "9f1a97f4206a3d10c987d982c6093c31c67bac13", +exports.IDENTITY_BANKINGDETAILS_POSTALCODE = { + "vdxfid": "iFVaE922Bzrro6rb87d9En2t2AAGx7EivG", + "indexid": "xLKggwT73K5XRGjcyoHJDAZR3pBHqz4Utt", + "hash160result": "ebd93a0f4fb8db6fb0cb8d397c45b41a0142d483", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iK822dFQwW2Y5tdpSpxQtHQemf47HoFxqs" + "name": "vrsc::identity.bankingdetails.postalcode" } }; -exports.IDENTITYDATA_VISA_CROPPED_BACK = { - "vdxfid": "iQRrKSZCi8oURCVTPdvFcNXARXq8BUmEPQ", - "indexid": "xVFxnEzHZT293NNVFKaQam3hTBr9B2SPr8", - "hash160result": "91705b953ea6a6824096763e55bd7ff89128d9e5", +exports.IDENTITY_BANKINGDETAILS_TAXNUMBER = { + "vdxfid": "i6Gbi3EkYrbREumkLmHUedbzrisXkRzwKY", + "indexid": "xB6iAqfqQAp5s5enCSwdd28XtNtYcHgrDb", + "hash160result": "bcc691f5d53f99e196b291ea2a00a9805ff4a61e", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iCvxKVHbnbwHGZDTaGofeyyJLjsGBSZr7A" + "name": "vrsc::identity.bankingdetails.taxnumber" } }; -exports.IDENTITYDATA_VISA_FACE = { - "vdxfid": "i5HD9vjKw9soTjAC4GwfKnEvEFVMuRU1Tt", - "indexid": "xA7KcjAQnU6U5u3DuxbpJAmTFuWNhv9uYv", - "hash160result": "9b92d6ae6541357cea0bb018f616586dfc6acc13", +exports.IDENTITY_BANKINGDETAILS_TAXCOUNTRY = { + "vdxfid": "iMJzAfPjqvWJdYyoWTX79cSjd51HbVc7wC", + "indexid": "xS96dTpphEiyFirqN9BG7zyGej2JTACDB1", + "hash160result": "e19f920e684c7d906dd8c85d72a5d5f0cd6ba4c3", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iPrxPJC6NbzWnkNyLSvwa8AVrwJWBUV9mM" + "name": "vrsc::identity.bankingdetails.taxcountry" } }; -exports.IDENTITYDATA_VISA_IDNUMBER = { - "vdxfid": "i7m6YfgMd7iELn25uZ36oA9sScTHdwHe1Z", - "indexid": "xCbD1U7SURvtxwu7mEhFmYgQUGUJaGUuzV", - "hash160result": "54d2d2bdfe71c96efe3d5630159f55c0e6cc022f", +exports.IDENTITY_BANKINGDETAILS_FIRSTNAME = { + "vdxfid": "iGAomW7jtsy7zRaoMFU48KvrHahHwdjzi7", + "indexid": "xLzvEJYpkCBncbTqCw8D6iTPKEiJpW3beK", + "hash160result": "d33bd09ba3184bf0e3fa00ad62e92a7a99c83f8b", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iJdUp47SVEzGEHCvoRyix2xufRsAeWSyxa" + "name": "vrsc::identity.bankingdetails.firstname" } }; -exports.IDENTITYDATA_VISA_CATEGORY = { - "vdxfid": "i5ADnmaWGg9VJhYueJwd5kFmSgxuhLxHrQ", - "indexid": "x9zLFa1b7zN9vsRwVzbn48nJULyvfSeNuC", - "hash160result": "c1a982a1a03c643bdace28189b80be6353097a12", +exports.IDENTITY_BANKINGDETAILS_LASTNAME = { + "vdxfid": "iMrvbLJnZawGsdFshtrHM3QKa4pDPbRk3L", + "indexid": "xSh348jsQu9wVo8uZaWSKRvrbiqED1eny3", + "hash160result": "4a0d68f2cafc3cbe827a91fd5038c65878bfaec9", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "i9MqRfXPAiYwv9q4iSjTtXquNCCZ1GgECn" + "name": "vrsc::identity.bankingdetails.lastname" } }; -exports.IDENTITYDATA_VISA_EXPIRATIONDATE = { - "vdxfid": "iAdCPpmiY4W1Mkb7vQNTiR38HFBMuwMcEe", - "indexid": "xFTJrdCoPNifyvU9n62cgoZfJuCNkyMTYH", - "hash160result": "a14a1b7acddd65bc3b403b8d080a982738bb6c4e", +exports.IDENTITY_BANKINGDETAILS_PHONENUMBER = { + "vdxfid": "i9jKPi8ubg5fx3BBmZdiyobJxNgzcmV9et", + "indexid": "xEZRrWZzSzJLaD4DdFHsxC7qz2i1YejHqk", + "hash160result": "b092c8f73031298d26b919f4b398fa9b66f19c44", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iNgDKviLAeeV65eBztuduckUMDE2erB7jj" + "name": "vrsc::identity.bankingdetails.phonenumber" } }; -exports.IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED = { - "vdxfid": "iRRYUVK9WZodGM15oJCrZgdXV6PaLZoxFC", - "indexid": "xWFewHkEMt2HtWt7eys1Y5A4WkQbHjGMmc", - "hash160result": "22ddef78469b09e9352e948b16fec0978a63c2f0", +exports.IDENTITY_BANKINGDETAILS_NUMBER = { + "vdxfid": "iKGaF7fZ6yAvwJyxcmpuas2Hn9PZPF99yf", + "indexid": "xQ6ghv6dxHPbZUrzUTV4ZFYpooQaFZG1aa", + "hash160result": "fcceea7c24223218bc9313e8176daea6155e3fad", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iFgXmTd9Wi2sqZyPqaoejdHG2sMaJWLrEX" + "name": "vrsc::identity.bankingdetails.number" } }; -exports.IDENTITYDATA_VISA_ISSUING_REGION = { - "vdxfid": "iE5fNZUT4G8ZnR1BbJTNCgc54FUFwqeUcp", - "indexid": "xJumqMuXuaMEQatDSz7XB58c5uVGrJL3e3", - "hash160result": "d7dd15c309c0ae09f5a7293b4b0cf15ca7715674", +exports.IDENTITY_BANKINGDETAILS_TYPE = { + "vdxfid": "iNkzXo7BBcUvCBH8somKyFtAFsR3mmmYuG", + "indexid": "xTb6zbYG2vhapMAAjVRUweQhHXS4csH9eB", + "hash160result": "26dcd354b4b2bd8b939af29fc5ea57a082aa87d3", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL" + "name": "vrsc::identity.bankingdetails.type" } }; -exports.IDENTITYDATA_VISA_DATEOFBIRTH = { - "vdxfid": "iF8CRZfCthVVm2VoxyfjMcmXw5x2EReAMv", - "indexid": "xKxJtN6Hk1iAPCNqpfKtL1J4xjy396V6v7", - "hash160result": "908c870f1f57ea5cd8aae089feb5f4f98752c97f", +exports.IDENTITY_BANKINGDETAILS_SORTCODE = { + "vdxfid": "i8v2y1beTivG8Nyi6Td3VFTc2ExFQJT8pC", + "indexid": "xDk9Rp2jK38vkYrjx9HCTdz93tyGLCaa3E", + "hash160result": "27df54160c8a8a962dd455004c8afac060aeab3b", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iQhjETQvSkadciDPy69QZNy3hSczWQ4iu4" + "name": "vrsc::identity.bankingdetails.sortcode" } }; -exports.IDENTITYDATA_VISA_ADDRESS = { - "vdxfid": "i53bAJPm5Dvbhovj671RVzkZq9Lej8M8iw", - "indexid": "x9shd6pqvY9GKyokwnfaUPH6roMfesuo4U", - "hash160result": "b3f7110b2359782dc7df5a12c740a275e9f63811", +exports.IDENTITY_DOCUMENTS_PASSPORT = { + "vdxfid": "iJHkDyp8dPnNdrh7P9fzow4gTshpbznkSK", + "indexid": "xP7rgnFDUi13G2a9EqL9nKbDVXiqVHVtyg", + "hash160result": "456f1956c77f7ff59d98dd57030d7ed22afd7fa2", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iGebr2v1TgkWvsyLjs1dQ5SqffqKL8rNm3" + "name": "vrsc::identity.documents.passport" } }; -exports.IDENTITYDATA_VISA_ADDRESS_STREET1 = { - "vdxfid": "iGpueUZCzRG6YVL5xZVV56sjpK39wXm3T6", - "indexid": "xMf27GzHqjUmAfD7pF9e3VQGqy4Ao4VwBi", - "hash160result": "e32af4b6f696c06f289e9d19674a31ad5f7f7492", +exports.IDENTITY_RESIDENCECARD = { + "vdxfid": "iQerHJHjqVT32hU1ZUyVYKQEkavs4xFtHo", + "indexid": "xVUxk6ipgofhesM3RAdeWhvmnEwsywApa2", + "hash160result": "0b2227f2bb574fe3cbcc683eecfc4d3bff884ee8", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + "name": "vrsc::identity.residencecard" } }; -exports.IDENTITYDATA_VISA_ADDRESS_CITY = { - "vdxfid": "iNRkLpudpDSAZtoyxSLAV6qp143Vny58dF", - "indexid": "xTFrodLifXeqC4h1p7zKTVNM2i4WdCQiTz", - "hash160result": "7a9966496c47f9b145e785c9fd76fbc515ebe3cf", +exports.IDENTITY_ATTESTOR = { + "vdxfid": "iFNc5DG22Btm69wBDDXatvSPLxzJq53QBa", + "indexid": "xLCiY1h6sW7RiKpD4uBjsJxvNd1Kiej8tW", + "hash160result": "e5d18dab811f87643c1e7a63627172331be38282", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + "name": "vrsc::identity.attestor" } }; -exports.IDENTITYDATA_VISA_ADDRESS_REGION = { - "vdxfid": "iR5syE1ENGxcDwcUXrvDnYT8jfXTF9RWLU", - "indexid": "xVuzS2SKDbBGr7VWPYaNkvyfmKYU7gkeus", - "hash160result": "1646f77db041fe2fd10d01a7afffc9cdf4570aed", +exports.IDENTITY_ATTESTATION_RECIPIENT = { + "vdxfid": "iAkd3VBhYQ3MK6PUCtfhXrLVNbqSghxxpn", + "indexid": "xFajWHcnPiG1wGGW4aKrWEs2QFrTbwP7wd", + "hash160result": "71b7cbbfc8be868f6d9f6c481c420b002438d44f", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" - } -}; -exports.IDENTITYDATA_VISA_ADDRESS_POSTCODE = { - "vdxfid": "i4MPAfFeCJGDuXgKsyDLRJgcam4ukpEo28", - "indexid": "x9BVdTgj3cUtXhZMjesVPhD9cR5vg2V94k", - "hash160result": "ceab8e1f6f76178916d73d6671e8767269509e09", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" - } -}; -exports.IDENTITYDATA_VISA_ADDRESS_COUNTRY = { - "vdxfid": "iPnjFJpqiiBQ7D6797hNoVmbNJMydCZdgj", - "indexid": "xUcqi7Fva2Q4jNy8zoMXmtJ8PxNzWUqNgK", - "hash160result": "1e10864c861d5eda424d0e6ecf1ae20977ddd3de", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" - } -}; -exports.IDENTITYDATA_VISA_DOCUMENTVERIFICATION_MATCHED = { - "vdxfid": "iKiQKkypr3B5NEHvPBg2sNEHeZcrZy3dL1", - "indexid": "xQYWnZQuhMPjzQAxEsLBqkkpgDdsNiGwfo", - "hash160result": "b36c238b24223f6a4652f6301bf5dfa5dae621b2", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk" - } -}; -exports.IDENTITYDATA_VISA_NAME_MATCHED = { - "vdxfid": "iKDJ8c248aZMWkKSFuVypNt4GVrZ91oArN", - "indexid": "xQ3QbQT8ytn28vCU7bA8nmQbJ9sa3AvkmG", - "hash160result": "96b725305bec875c2f0fb3028def34a277aba0ac", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iKCFQYZudPChh6jypSpcgENoQb5WeX5wHv" - } -}; -exports.IDENTITYDATA_VISA_DATEOFBIRTHMATCHED = { - "vdxfid": "i9o1iuJJTwfTCuJzCT6yw1X41SbEwJk1DC", - "indexid": "xEd8BhjPKFt7q5C248m8uQ3b36cFn4BGH7", - "hash160result": "e6f5f12e63f6b86c4dc1f4185ed6c89d7edb4f45", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iMUfUShqVwWrGSx6HvZcDJwHywiLW5Zusb" - } -}; -exports.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALFRONT = { - "vdxfid": "iBrpt78Mdrqcc1RHwPWKYBALbNTC4cwdJQ", - "indexid": "xGgwLuZSVB4HEBJKo5AUWZgsd2UCxbFCCA", - "hash160result": "734505c8a36a53d58aedfc18f8f0c9e312b9f85b", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.originalfront" - } -}; -exports.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALBACK = { - "vdxfid": "iNRCZp7JBDHbpKQ2Vhc6TK97hUSRPG4jaX", - "indexid": "xTFK2cYP2XWGSVH4MPGFRhfej8TSGxUzFR", - "hash160result": "fc576cd9799270c2e432da7b5481254c9864c9cf", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.originalback" - } -}; -exports.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDFRONT = { - "vdxfid": "iK822dFQwW2Y5tdpSpxQtHQemf47HoFxqs", - "indexid": "xPx8VRgVnpFCi4WrJWcZrfwBoK58CsfaGo", - "hash160result": "6b2cc84a0df71c4b1920d5332ecde7cdd625a1ab", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.croppedfront" - } -}; -exports.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDBACK = { - "vdxfid": "iCvxKVHbnbwHGZDTaGofeyyJLjsGBSZr7A", - "indexid": "xHm4nHigdv9wtj6VRxTpdNVqNPtH2yr1Kb", - "hash160result": "edcfcebea370f151dc72c13a34b972dd9fb8b867", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.croppedback" - } -}; -exports.IDENTITYDATA_DOCUMENTVERIFICATION_FACE = { - "vdxfid": "iPrxPJC6NbzWnkNyLSvwa8AVrwJWBUV9mM", - "indexid": "xUh4r6dBDvDBQvG1C8b6YWh2tbKX74nCWP", - "hash160result": "d65b41ab8d8c667a46921b860342f471eb7ea0df", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.face" - } -}; -exports.IDENTITYDATA_DOCUMENTVERIFICATION_IDNUMBER = { - "vdxfid": "iJdUp47SVEzGEHCvoRyix2xufRsAeWSyxa", - "indexid": "xPTbGrYXLZCvrT5xf7dsvRVSh5tBU3pzip", - "hash160result": "34ad72308593579994ebe622e284a67044713ba6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.idnumber" - } -}; -exports.IDENTITYDATA_DOCUMENTVERIFICATION_CATEGORY = { - "vdxfid": "i9MqRfXPAiYwv9q4iSjTtXquNCCZ1GgECn", - "indexid": "xEBwtTxU22mcYKi6a8PcrvNSPrDZtQ5nSL", - "hash160result": "6d03e9b13582f7069c52d73f7f55881dd9dc8c40", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.category" - } -}; -exports.IDENTITYDATA_DOCUMENTVERIFICATION_EXPIRATIONDATE = { - "vdxfid": "iNgDKviLAeeV65eBztuduckUMDE2erB7jj", - "indexid": "xTWKnj9R1xs9iFXDraZnt1H1NsF3UEb4Kf", - "hash160result": "6ecad210f102677f2d2d75a0929fb3676c44a0d2", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.expirationdate" - } -}; -exports.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY = { - "vdxfid": "iFgXmTd9Wi2sqZyPqaoejdHG2sMaJWLrEX", - "indexid": "xLWeEG4EN2FYTjrRhGToi1oo4XNbE2QwRu", - "hash160result": "c0e0b8f43025cc9574486117135e4c8fa8c7e685", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.issuingcountry" - } -}; -exports.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUING_REGION = { - "vdxfid": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL", - "indexid": "xGomhGg7SbfRombFesZCzxapM7Lc5aQFa4", - "hash160result": "1ff5e3f915ccb6616cbc04e0b51961f98694435d", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.issuingregion" - } -}; -exports.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTH = { - "vdxfid": "iQhjETQvSkadciDPy69QZNy3hSczWQ4iu4", - "indexid": "xVXqhFr1J4oJEt6RpmoZXmVaj6e1NWsjoF", - "hash160result": "38b824222653effa835ea81b8bf2397b18e6d9e8", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.dateofbirth" - } -}; -exports.IDENTITYDATA_DOCUMENTVERIFICATION_ADDRESS = { - "vdxfid": "iGebr2v1TgkWvsyLjs1dQ5SqffqKL8rNm3", - "indexid": "xMUiJqM6JzyBZ3rNbYfnNTyNhKrLEbbAy6", - "hash160result": "c1e17b8a68c7238fc479638a4ea90a09887a8190", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.address" - } -}; -exports.IDENTITYDATA_ADDRESS_STREET1 = { - "vdxfid": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj", - "indexid": "xNUFncPpokjWp66awDFYo1m4UPLA8ubaiB", - "hash160result": "b66f8fe85cc09f7df77e3a0af34bb10b3a77639b", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.address.street1" - } -}; -exports.IDENTITYDATA_ADDRESS_STREET2 = { - "vdxfid": "i3h8D5kGtn6DCVCwPFvbypbFCqfzAhXiD2", - "indexid": "x8XEftBMk6Jspf5yEwakxD7nEVh12MU6qD", - "hash160result": "c156ac2c6f101631e348f95b6fca8ad063056202", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.address.street2" - } -}; -exports.IDENTITYDATA_ADDRESS_CITY = { - "vdxfid": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD", - "indexid": "xM76PTRnxBRkvg1i4D1PKocd4n3RqY3CFe", - "hash160result": "b03fee48a0694abcf0e26aeee63386a538c26a8c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.address.city" - } -}; -exports.IDENTITYDATA_ADDRESS_REGION = { - "vdxfid": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x", - "indexid": "xCkRVkwGGxUE335WrtVKzFEV4EZ3XYsk9g", - "hash160result": "b838dcdca8dd93524a9bbeb4a551d41be3f7c030", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.address.region" - } -}; -exports.IDENTITYDATA_ADDRESS_POSTCODE = { - "vdxfid": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC", - "indexid": "xVQLwJNgMdU7oRYzDBi9Qj5sPwC4vbkTUi", - "hash160result": "2ee05285375ce5e909eb31e5c08d042231fb6ee7", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.address.postcode" - } -}; -exports.IDENTITYDATA_ADDRESS_COUNTRY = { - "vdxfid": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK", - "indexid": "xTi8RLedRrhDrkgbcdyrpPZmtNvpSJTWGw", - "hash160result": "fafe1c0c79889407ed4172586eb02bf3c6c4dbd4", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.address.country" - } -}; -exports.IDENTITYDATA_NATIONALITY = { - "vdxfid": "iDKfQZ4c568VzuikNenCNKffhx3f5pMNvi", - "indexid": "xJ9msMVgvQMAd5bnELSMLiCCjc4g2ZP2rB", - "hash160result": "a44ddb762301e0b405741f9b50dae55a9a2b046c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.nationality" - } -}; -exports.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED = { - "vdxfid": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk", - "indexid": "xPJ2puxZGpXvCmcBkgaaHMJ9vGBNfo83vX", - "hash160result": "5dfba519a35dbb63e0a12e071b47b4b2f99c6ca4", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.matched" - } -}; -exports.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED = { - "vdxfid": "iKCFQYZudPChh6jypSpcgENoQb5WeX5wHv", - "indexid": "xQ2MsLzzUhRNKGd1g8UmecuLSF6XcYynDa", - "hash160result": "0d02d8dce6be6e0b4c87efdac286f3739efa6dac", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.name.matched" - } -}; -exports.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED = { - "vdxfid": "iMUfUShqVwWrGSx6HvZcDJwHywiLW5Zusb", - "indexid": "xSJmwF8vMFjWtcq89cDmBhTq1bjMRkFKEg", - "hash160result": "3467c9e6461d44959372367130363b01ebf978c5", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.dateofbirthmatched" - } -}; -exports.IDENTITYDATA_NAME = { - "vdxfid": "iNtCaMhqbpwGubHkaepi9mhVFg8jPj2Sk4", - "indexid": "xTiK3A8vT99wXmAnSLUs8AE2HL9kKfRmzC", - "hash160result": "272c6f542e769f1006ee6db29be51ddbbaa1e4d4", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.name" - } -}; -exports.IDENTITYDATA_PERSONAL_DETAILS = { - "vdxfid": "iDeQpqFQNNxQaTGDJd762poXE9eCBNEELD", - "indexid": "xJUXHdgVDhB5Cd9FAJmF1DL4FofD5W44Wa", - "hash160result": "78d7089e964a3f6e6ae0233346554555d3e68f6f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.personaldetails" - } -}; -exports.IDENTITYDATA_CONTACT = { - "vdxfid": "iPHGUT7FpBbUjBKoPiuwTCzVFtcbQfkrs4", - "indexid": "xU7NwFYLfVp9MMCqFQa6RbX2HYdcGVBu6v", - "hash160result": "cef7d037aa9c9342008cc13ea0173610f17341d9", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.contactdetails" - } -}; -exports.IDENTITYDATA_LOCATIONS = { - "vdxfid": "iREAoeQFDuJA751i86EBWmDthRuZoGEKBi", - "indexid": "xW4HGSqL5DWpjEtjymtLV9kRj5vaeyFTX7", - "hash160result": "e89b7bc01f7fececa737c5451a6889006bb99bee", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.locationdetails" - } -}; -exports.IDENTITYDATA_BANKING_INFORMATION = { - "vdxfid": "iJPS5WjFmKhjJjNxA2m2CJUus8swyBSTWy", - "indexid": "xPDYYKALcdvPvuFz1iRBAh1StntxrcEUeM", - "hash160result": "1a79f042ce08168d0dcaf4b1062eb1e3525693a3", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankingdetails" - } -}; -exports.IDENTITYDATA_DOCUMENTS_AND_IMAGES = { - "vdxfid": "iDqUNrjpcHvenVoJUzkWxeo93txZJLRMsY", - "indexid": "xJfaqfAuTc9KQfgLLgQfw3Kg5Yya97dwwF", - "hash160result": "b93a86e345efacfa4cdd5ab1a07f41da4371a771", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documents" - } -}; -exports.PERSONAL_INFO_OBJECT = { - "vdxfid": "i6BFmbneE8TJHego8AkeX1iYMbQ4KXHLr9", - "indexid": "xB1NEQDj5SfxupZpyrQoVQF5PFR5Foqja6", - "hash160result": "50b7fa643e4b024ffbcaabd40403d22e1a3ba41d", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.personalinfo" - } -}; -exports.FIAT_CURRENCEY = { - "vdxfid": "i8sgE4s24ZZE9ts4MiYbWpng419T8a5yfW", - "indexid": "xDhngsJ6usmtn4k6DQCkVDKD5fATwqdYBr", - "hash160result": "f24235e62affcb4c57faecc6d0e3b3893889393b", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.fiatcurrency" - } -}; -exports.BANK_ACCOUNT = { - "vdxfid": "i7QCof7PM8unmLKefzRKokd6oHtkRN5NK4", - "indexid": "xCEKGTYUCT8TPWCgXg5Un99dpwumKZ9uek", - "hash160result": "c34f89a8cd8b6a32848632597ea0bd111c4a0f2b", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankaccount" - } -}; -exports.BANK_ACCOUNT_CURRENCY = { - "vdxfid": "iJdQpLtdyAgiRfoJstY8utsY5wEQZdM91y", - "indexid": "xPTXH9KipUuP3qgLjaCHtHQ57bFRREieor", - "hash160result": "2d60e910979af52ce62167b5ec5224858a1b38a6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankaccount" - }, - "bounddata": { - "vdxfkey": "i8sgE4s24ZZE9ts4MiYbWpng419T8a5yfW" - } -}; -exports.BANK_ACCOUNT_COUNTRY = { - "vdxfid": "iLcX5aezEdeeX63ZAk1fzh1qBVc5gr3hyT", - "indexid": "xRSdYP655wsK9Fvb2Rfpy5YND9d6Z9EL9o", - "hash160result": "0939ad4a2dcb7c1030a2f4efd046a818c92bfdbb", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankaccount" - }, - "bounddata": { - "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" - } -}; -exports.BANK_ACCOUNT_STREET1 = { - "vdxfid": "iDzy4tzp8CQqG4fh4qwyhjeM1EDgZvauwy", - "indexid": "xJq5XhRtyWdVtEYivXc8g8At2tEhSpargH", - "hash160result": "93a2d4461521cffba345fe384c86561fb5227373", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankaccount" - }, - "bounddata": { - "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" - } -}; -exports.BANK_ACCOUNT_STREET2 = { - "vdxfid": "iMf5baQkrp6EuacyScGu3vQ7EHt4vSiUsz", - "indexid": "xSVC4Nqqi8JuXkW1JHw42JveFwu5qj1Gkv", - "hash160result": "d3da8b39e046268d93d25d6b9f780950d04571c7", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankaccount" - }, - "bounddata": { - "vdxfkey": "i3h8D5kGtn6DCVCwPFvbypbFCqfzAhXiD2" - } -}; -exports.BANK_ACCOUNT_CITY = { - "vdxfid": "iBgQ4ev7sBd1FodofzgyfEriHWQw6phnwm", - "indexid": "xGWWXTMCiVqfsyWqXgM8ddPFKARx1ok9eq", - "hash160result": "aad5a1798ce03abfbe5166989f9bade19fd8ff59", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankaccount" - }, - "bounddata": { - "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" - } -}; -exports.BANK_ACCOUNT_REGION = { - "vdxfid": "iE2HNu3NkhUpFanwjq7z3K14pSKCVh2Yku", - "indexid": "xJrPqhUTc1hUskfybWn91hXbr6LDLwguv5", - "hash160result": "f8b4b7681f399f4ce6f77b16a3034cd014d6b273", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankaccount" - }, - "bounddata": { - "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" - } -}; -exports.BANK_ACCOUNT_POSTALCODE = { - "vdxfid": "iEnvTt4zt1iXttDpDCcqvfNYhbReBSeGoa", - "indexid": "xKd2vgW5jKwCX46r4tGzu3u5jFSf33Qv7t", - "hash160result": "23439436b34068051f5dfdaf133ae7ada918247c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankaccount" - }, - "bounddata": { - "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" - } -}; -exports.BANK_ACCOUNT_TAXNUMBER = { - "vdxfid": "iLZMhFEyg2BysiG8eQabdeGYLpNRzWUvVG", - "indexid": "xRPUA3g4XLQeVt9AW6Ekc2o5NUPSxw2wvq", - "hash160result": "fa32239bcdc55780096b55ce3e7ae9ddc01664bb", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.taxnumber" - } -}; -exports.BANK_ACCOUNT_TAXCOUNTRY = { - "vdxfid": "iNfhYoUGzruHxihV5dYSYnsruD4STZaKvF", - "indexid": "xTVp1buMrB7xataWwKCbXBQPvs5TN85VEX", - "hash160result": "c0728dd8a0644b69a990c7cddc133a8aeb6887d2", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.taxcountry" - } -}; -exports.BANK_ACCOUNT_FIRSTNAME = { - "vdxfid": "iLaKzdEJgoztyM5f9YnLoGBPQYpq3d6FxF", - "indexid": "xRQSTRfPY8DZbWxh1ESVmehvSCqqw8EGSr", - "hash160result": "25041a54186ca5d8c277e7a1a498c33fe01593bb", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankaccount" - }, - "bounddata": { - "vdxfkey": "i4GqsotHGa4czCdtg2d8FVHKfJFzVyBPrM" - } -}; -exports.BANK_ACCOUNT_LASTNAME = { - "vdxfid": "iR2fNBYnQDAgfU2BxvC7c4CJQPRY7LXAzm", - "indexid": "xVrmpyysFXPMHduDpbrGaSiqS3SYznwXmR", - "hash160result": "c4b8f6772ae63a6265c814ebf1637f6902936eec", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankaccount" - }, - "bounddata": { - "vdxfkey": "iHybTrNB1kXRrjsCtJXd6fvBKxepqMpS5Z" - } -}; -exports.BANK_ACCOUNT_PHONENUMBER = { - "vdxfid": "iNNkwqvht83J1HZyopGaqVXKMAzTQkj9zM", - "indexid": "xTCsQeMnjSFxdTT1fVvjot3rNq1UHrb19r", - "hash160result": "95d0bc46ca38214dcca8220507da3295a52c53cf", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankaccount" - }, - "bounddata": { - "vdxfkey": "i9ZQ5degEh3wQg5vNm8Tod88bcJBrLs5p3" - } -}; -exports.ACCOUNT_NUMBER = { - "vdxfid": "iS6TbNSaquK5uDZemFF9DLP6K6ZciN6TBd", - "indexid": "xWva4AsfhDXkXPSgcvuJBiudLkadg3ZHt5", - "hash160result": "8b15e73e57238a3dc6bcb31b368328495e891ef8", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.accountnumber" - } -}; -exports.ACCOUNT_TYPE = { - "vdxfid": "iNdRtUasuiojMC2sw35Nbs4W6hq7o8bWqY", - "indexid": "xTTYMH1xm32PyMuunijXaFb38Mr8ipmsky", - "hash160result": "b1d14abf13ce26753676953ec88c00ad448119d2", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.accounttype" - } -}; -exports.BANK_ACCOUNT_NUMBER = { - "vdxfid": "i64P8QWcucELMgrq1uxY7uKCq3eymRcwaQ", - "indexid": "xAtVbCwhkvSzyrjrsbch6Hqjrhfzdz82YM", - "hash160result": "240b1dd30e88528bc9307d3158ccb5fb3d76571c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankaccount" - }, - "bounddata": { - "vdxfkey": "iS6TbNSaquK5uDZemFF9DLP6K6ZciN6TBd" - } -}; -exports.BANK_ACCOUNT_TYPE = { - "vdxfid": "iLMsPy8GhsGSNDzXDpZ8SEcymJfgGrLUVj", - "indexid": "xRByrmZMZBV6zPsZ5WDHQd9Wnxgh8bD1RJ", - "hash160result": "faf99925bc81dc052b9deb8c3321965633e437b9", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankaccount" - }, - "bounddata": { - "vdxfkey": "iNdRtUasuiojMC2sw35Nbs4W6hq7o8bWqY" + "name": "vrsc::identity.attestation.recipient" } }; diff --git a/dist/vdxf/index.d.ts b/dist/vdxf/index.d.ts index 269d049..3623e13 100644 --- a/dist/vdxf/index.d.ts +++ b/dist/vdxf/index.d.ts @@ -58,6 +58,17 @@ export declare class BufferDataVdxfObject extends VDXFObject { vdxfkey: string; }; } +export declare class VDXFData extends VDXFObject { + data: Buffer; + constructor(data?: Buffer, vdxfkey?: string); + dataByteLength(): number; + toDataBuffer(): Buffer; + fromDataBuffer(buffer: Buffer, offset?: number): number; + toJson(): { + data: Buffer; + vdxfkey: string; + }; +} export declare class Utf8DataVdxfObject extends BufferDataVdxfObject { constructor(data?: string, vdxfkey?: string); } diff --git a/dist/vdxf/index.js b/dist/vdxf/index.js index 023604c..343a02f 100644 --- a/dist/vdxf/index.js +++ b/dist/vdxf/index.js @@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.VerusIDSignature = exports.Utf8OrBase58Object = exports.HexDataVdxfObject = exports.Utf8DataVdxfObject = exports.BufferDataVdxfObject = exports.VDXFObject = void 0; +exports.VerusIDSignature = exports.Utf8OrBase58Object = exports.HexDataVdxfObject = exports.Utf8DataVdxfObject = exports.VDXFData = exports.BufferDataVdxfObject = exports.VDXFObject = void 0; const base64url_1 = require("base64url"); const createHash = require("create-hash"); const vdxf_1 = require("../constants/vdxf"); @@ -123,6 +123,30 @@ class BufferDataVdxfObject extends VDXFObject { } } exports.BufferDataVdxfObject = BufferDataVdxfObject; +class VDXFData extends VDXFObject { + constructor(data = Buffer.from(""), vdxfkey = "") { + super(vdxfkey); + this.data = data; + } + dataByteLength() { + return this.data.length; + } + toDataBuffer() { + return this.data; + } + fromDataBuffer(buffer, offset) { + const reader = new bufferutils_1.default.BufferReader(buffer, offset); + this.data = reader.readVarSlice(); + return reader.offset; + } + toJson() { + return { + data: this.data, + vdxfkey: this.vdxfkey, + }; + } +} +exports.VDXFData = VDXFData; class Utf8DataVdxfObject extends BufferDataVdxfObject { constructor(data = "", vdxfkey = "") { super(data, vdxfkey, "utf-8"); diff --git a/dist/vdxf/keymap.js b/dist/vdxf/keymap.js index ce91803..1387b67 100644 --- a/dist/vdxf/keymap.js +++ b/dist/vdxf/keymap.js @@ -2,7 +2,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.IdentityVdxfidMap = exports.attestationDataKeys = exports.keymap = void 0; const keylist = require("./keys"); -const AttestationData = require("./classes/IdentityData"); +const AttestationData = require("../utils/IdentityData"); exports.keymap = Object.keys(keylist).reduce((obj, item) => { obj[keylist[item].vdxfid] = keylist[item]; return obj; }, {}); exports.attestationDataKeys = Object.keys(AttestationData).reduce((obj, item) => { obj[AttestationData[item].vdxfid] = AttestationData[item]; return obj; }, {}); exports.IdentityVdxfidMap = AttestationData.IdentityVdxfidMap; diff --git a/dist/vdxf/keys.d.ts b/dist/vdxf/keys.d.ts index f0ecc44..704d0c6 100644 --- a/dist/vdxf/keys.d.ts +++ b/dist/vdxf/keys.d.ts @@ -61,4 +61,5 @@ export declare const ATTESTATION_VIEW_REQUEST_NAME: VDXFKeyInterface; export declare const ATTESTATION_VIEW_REQUEST_ATTESTOR: VDXFKeyInterface; export declare const ATTESTATION_VIEW_REQUEST_ID: VDXFKeyInterface; export declare const PROFILE_DATA_VIEW_REQUEST: VDXFKeyInterface; +export declare const IDENTITY_SIGNDATA_REQUEST: VDXFKeyInterface; export declare const DATA_TYPE_STRING: VDXFKeyInterface; diff --git a/dist/vdxf/keys.js b/dist/vdxf/keys.js index f8801e4..25c3a5a 100644 --- a/dist/vdxf/keys.js +++ b/dist/vdxf/keys.js @@ -1,7 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ATTESTATION_VIEW_REQUEST_ID = exports.ATTESTATION_VIEW_REQUEST_ATTESTOR = exports.ATTESTATION_VIEW_REQUEST_NAME = exports.ATTESTATION_VIEW_REQUEST_KEY = exports.ATTESTATION_TYPE = exports.ATTESTATION_NAME = exports.ATTESTATION_ID = exports.ATTESTATION_VIEW_RESPONSE = exports.ATTESTATION_VIEW_REQUEST = exports.ATTESTATION_PROVISION_OBJECT = exports.ATTESTATION_PROVISION_TYPE = exports.ATTESTATION_PROVISION_URL = exports.CURRENCY_ADDRESS = exports.SIGNED_SESSION_OBJECT = exports.SIGNED_SESSION_OBJECT_DATA = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_TRANSFER_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_CREATION_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_COMMIT_FAILED = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN = exports.LOGIN_CONSENT_PROVISIONING_ERROR_KEY_NAMETAKEN = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_FAILED = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_COMPLETE = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL = exports.LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGREQUIREDINFO = exports.IDENTITY_UPDATE_TXID = exports.IDENTITY_REGISTRATION_TXID = exports.IDENTITY_NAME_COMMITMENT_TXID = exports.LOGIN_CONSENT_PROVISIONING_RESULT_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_PROVISIONING_REQUEST_VDXF_KEY = exports.ID_PARENT_VDXF_KEY = exports.ID_FULLYQUALIFIEDNAME_VDXF_KEY = exports.ID_SYSTEMID_VDXF_KEY = exports.ID_ADDRESS_VDXF_KEY = exports.LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_CONTEXT_VDXF_KEY = exports.LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_WEBHOOK_VDXF_KEY = exports.LOGIN_CONSENT_REDIRECT_VDXF_KEY = exports.WALLET_VDXF_KEY = exports.LOGIN_CONSENT_DECISION_VDXF_KEY = exports.LOGIN_CONSENT_CHALLENGE_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_VDXF_KEY = exports.LOGIN_CONSENT_REQUEST_VDXF_KEY = exports.LOGIN_CONSENT_RESPONSE_SIG_VDXF_KEY = exports.IDENTITY_AUTH_SIG_VDXF_KEY = exports.VERUSPAY_INVOICE_VDXF_KEY = void 0; -exports.DATA_TYPE_STRING = exports.PROFILE_DATA_VIEW_REQUEST = void 0; +exports.DATA_TYPE_STRING = exports.IDENTITY_SIGNDATA_REQUEST = exports.PROFILE_DATA_VIEW_REQUEST = void 0; exports.VERUSPAY_INVOICE_VDXF_KEY = { hash160result: "628efc28c2e2d40050e1a9de7a93e7ddf2aa0076", qualifiedname: { @@ -420,6 +420,15 @@ exports.PROFILE_DATA_VIEW_REQUEST = { "name": "vrsc::profile.data.view.request" } }; +exports.IDENTITY_SIGNDATA_REQUEST = { + "vdxfid": "i8pWCPRLoGD9MgL7HM13xo5Bhr9TsXjGxs", + "indexid": "xDecfBrReaRoyrD992fCwBbijWAUi4yjUN", + "hash160result": "0785689a95a2a08dd2e0efd60b71237e97ea9f3a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.signdata.request" + } +}; // DATA TYPES exports.DATA_TYPE_STRING = { "vdxfid": "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c", diff --git a/src/__tests__/attestation/attestation.test.ts b/src/__tests__/attestation/attestation.test.ts index 5daf6e6..21254d4 100644 --- a/src/__tests__/attestation/attestation.test.ts +++ b/src/__tests__/attestation/attestation.test.ts @@ -38,9 +38,9 @@ describe('Serializes and deserializes attestation request', () => { challenge: { challenge_id: "iMqzCkWdebC19xbjkLfVdDkkGP9Ni1oxoN", requested_access: [ - new RequestedPermission("", IDENTITY_VIEW.vdxfid), - new RequestedPermission("", PROFILE_DATA_VIEW_REQUEST.vdxfid), - new RequestedPermission("", LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY.vdxfid), + new RequestedPermission(IDENTITY_VIEW.vdxfid, ""), + new RequestedPermission(PROFILE_DATA_VIEW_REQUEST.vdxfid, ""), + new RequestedPermission(LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY.vdxfid, ""), ], redirect_uris: [], subject: [new Subject( @@ -85,7 +85,7 @@ describe('Serializes and deserializes attestation request', () => { }, challenge: { challenge_id: "iKNufKJdLX3Xg8qFru9AuLBvivAEJ88PW4", - requested_access: [new RequestedPermission("", IDENTITY_VIEW.vdxfid)], + requested_access: [new RequestedPermission(IDENTITY_VIEW.vdxfid, "")], session_id: "iRQZGW36o3RcVR1xyVT1qWdAKdxp3wUyrh", redirect_uris: [ new RedirectUri( @@ -115,7 +115,7 @@ describe('Serializes and deserializes attestation request', () => { }, challenge: { challenge_id: "iKNufKJdLX3Xg8qFru9AuLBvivAEJ88PW4", - requested_access: [new RequestedPermission("", IDENTITY_VIEW.vdxfid)], + requested_access: [new RequestedPermission(IDENTITY_VIEW.vdxfid, "")], session_id: "iRQZGW36o3RcVR1xyVT1qWdAKdxp3wUyrh", redirect_uris: [ new RedirectUri( diff --git a/src/__tests__/vdxf/loginconsent.test.ts b/src/__tests__/vdxf/loginconsent.test.ts index 6911201..6f2dade 100644 --- a/src/__tests__/vdxf/loginconsent.test.ts +++ b/src/__tests__/vdxf/loginconsent.test.ts @@ -18,7 +18,7 @@ describe('Serializes and deserializes signature objects properly', () => { }, challenge: { challenge_id: "iKNufKJdLX3Xg8qFru9AuLBvivAEJ88PW4", - requested_access: [new RequestedPermission("", IDENTITY_VIEW.vdxfid)], + requested_access: [new RequestedPermission(IDENTITY_VIEW.vdxfid, "")], subject: [ new Subject( "fully.qualified.name", @@ -230,7 +230,7 @@ describe('Serializes and deserializes signature objects properly', () => { }, challenge: { challenge_id: "iKNufKJdLX3Xg8qFru9AuLBvivAEJ88PW4", - requested_access: [new RequestedPermission("", IDENTITY_VIEW.vdxfid)], + requested_access: [new RequestedPermission(IDENTITY_VIEW.vdxfid, "")], session_id: "iRQZGW36o3RcVR1xyVT1qWdAKdxp3wUyrh", redirect_uris: [ new RedirectUri( diff --git a/src/__tests__/vdxf/parser.test.ts b/src/__tests__/vdxf/parser.test.ts index bed9af3..2a173e4 100644 --- a/src/__tests__/vdxf/parser.test.ts +++ b/src/__tests__/vdxf/parser.test.ts @@ -57,7 +57,7 @@ describe('Parses VDXF objects correctly', () => { }, challenge: { challenge_id: "iKNufKJdLX3Xg8qFru9AuLBvivAEJ88PW4", - requested_access: [new RequestedPermission("", IDENTITY_VIEW.vdxfid)], + requested_access: [new RequestedPermission(IDENTITY_VIEW.vdxfid, "")], subject: [ new Subject( "fully.qualified.name", diff --git a/src/api/ApiPrimitive.ts b/src/api/ApiPrimitive.ts index 85faf50..0fce8b0 100644 --- a/src/api/ApiPrimitive.ts +++ b/src/api/ApiPrimitive.ts @@ -3,6 +3,7 @@ import { IdentityDefinition } from "../identity/IdentityDefinition"; import { OfferForMaking } from "../offers/OfferForMaking"; import { ListedOffer } from "../offers/OfferList"; import { RawTransaction } from "../transaction/RawTransaction"; +import { signDataArgs } from "./classes/SignData/SignDataRequest"; export type ApiPrimitive = | string @@ -15,7 +16,8 @@ export type ApiPrimitive = | Array | IdentityDefinition | BlockInfo - | RawTransaction; + | RawTransaction + | signDataArgs; export type ApiPrimitiveJson = { [key: string]: ApiPrimitive | undefined }; diff --git a/src/api/classes/SignData/SignDataRequest.ts b/src/api/classes/SignData/SignDataRequest.ts new file mode 100644 index 0000000..4853626 --- /dev/null +++ b/src/api/classes/SignData/SignDataRequest.ts @@ -0,0 +1,55 @@ +import { ApiRequest } from "../../ApiRequest"; +import { ApiPrimitiveJson, RequestParams } from "../../ApiPrimitive"; +import { SIGN_DATA } from "../../../constants/cmds"; +import { DataDescriptor } from "../../../utils/types/DataDescriptor"; +import { SignData } from "../../../utils/types/SignData"; + +export type signDataArgs = { + address?: string; + filename?: string; + message?: string; + messagehex?: string; + messsagebase64?: string; + datahash?: string; + vdxfdata?: string; + mmrdata?: Array; + mmrsalt?: Array; + mmrhashtype?: string; + priormmr?: Array; + vdxfkeys?: Array; + vdxfkeynames?: Array; + boundhahses?: Array; + hashtype?: string; + signature?: string; + encrypttoaddress?: string; + createmmr?: boolean; +} + +export class SignDataRequest extends ApiRequest { + data: signDataArgs; + + constructor(chain: string, signableItems: signDataArgs) { + super(chain, SIGN_DATA); + this.data = signableItems; + } + + getParams(): RequestParams { + const params = [this.data]; + + return params.filter((x) => x != null); + } + + static fromJson(object: ApiPrimitiveJson): SignDataRequest { + return new SignDataRequest( + object.chain as string, + object.data as signDataArgs + ); + } + + toJson(): ApiPrimitiveJson { + return { + chain: this.chain, + data: this.data, + }; + } +} \ No newline at end of file diff --git a/src/api/classes/SignData/SignDataResponse.ts b/src/api/classes/SignData/SignDataResponse.ts new file mode 100644 index 0000000..18cc4db --- /dev/null +++ b/src/api/classes/SignData/SignDataResponse.ts @@ -0,0 +1,24 @@ +import { ApiResponse } from "../../ApiResponse"; +import { Signature } from "../../../utils/types/Signature"; +import { mmrDescriptorParameters } from "../../../utils/types/MmrDescriptor"; +import { DataDescriptor } from "../../../utils/types/DataDescriptor"; + +export class SignDataResponse extends ApiResponse { + result: { + mmrdescriptor_encrypted: mmrDescriptorParameters; + mmrdescriptor: mmrDescriptorParameters; + signature: string; + signaturedata_encrypted: DataDescriptor; + signaturedata_ssk: string; + signaturedata: Signature; + system: string; + systemid: string; + hashtype: string; + mmrhashtype: string; + hash: string; + identity: string; + canonicalname: string; + address: string; + signatureheight: number; + }; +} \ No newline at end of file diff --git a/src/api/classes/index.ts b/src/api/classes/index.ts index 53446bf..ffc0c10 100644 --- a/src/api/classes/index.ts +++ b/src/api/classes/index.ts @@ -24,6 +24,8 @@ import { SendRawTransactionRequest } from './SendRawTransaction/SendRawTransacti import { SendRawTransactionResponse } from './SendRawTransaction/SendRawTransactionResponse' import { SignMessageRequest } from './SignMessage/SignMessageRequest' import { SignMessageResponse } from './SignMessage/SignMessageResponse' +import { SignDataRequest } from './SignData/SignDataRequest' +import { SignDataResponse } from './SignData/SignDataResponse' import { VerifyMessageRequest } from './VerifyMessage/VerifyMessageRequest' import { VerifyMessageResponse } from './VerifyMessage/VerifyMessageResponse' import { GetAddressMempoolResponse } from './GetAddressMempool/GetAddressMempoolResponse' @@ -70,6 +72,8 @@ export { VerifyMessageResponse, SignMessageRequest, SignMessageResponse, + SignDataRequest, + SignDataResponse, SendCurrencyRequest, SendCurrencyResponse, FundRawTransactionRequest, @@ -98,6 +102,7 @@ export type RpcRequest = | typeof GetRawTransactionRequest | typeof VerifyMessageRequest | typeof SignMessageRequest + | typeof SignDataRequest | typeof SendCurrencyRequest | typeof FundRawTransactionRequest | typeof GetCurrencyConvertersRequest @@ -120,6 +125,7 @@ export type RpcResponse = | typeof GetRawTransactionResponse | typeof VerifyMessageResponse | typeof SignMessageResponse + | typeof SignDataResponse | typeof SendCurrencyResponse | typeof FundRawTransactionResponse | typeof GetCurrencyConvertersResponse diff --git a/src/constants/cmds.ts b/src/constants/cmds.ts index a1c52d2..48a7790 100644 --- a/src/constants/cmds.ts +++ b/src/constants/cmds.ts @@ -12,6 +12,7 @@ export const GET_ADDRESS_MEMPOOL = 'getaddressmempool' export const SEND_RAW_TRANSACTION = 'sendrawtransaction' export const GET_ADDRESS_UTXOS = 'getaddressutxos' export const SIGN_MESSAGE = 'signmessage' +export const SIGN_DATA = 'signdata' export const VERIFY_MESSAGE = 'verifymessage' export const FUND_RAW_TRANSACTION = 'fundrawtransaction' export const SEND_CURRENCY = 'sendcurrency' diff --git a/src/utils/IdentityData.ts b/src/utils/IdentityData.ts new file mode 100644 index 0000000..2b0ecc7 --- /dev/null +++ b/src/utils/IdentityData.ts @@ -0,0 +1,173 @@ + +import * as identitykeys from '../vdxf/identityDataKeys'; +import * as keylist from '../vdxf/keys'; +import * as VDXF_Data from '../vdxf/vdxfDataKeys'; + +export const friendlyName = (vdxfkey) => { + + if (vdxfkey in IdentityVdxfidMap) { + + return IdentityVdxfidMap[vdxfkey].name; + + } else { + throw new Error("Unknown VDXF key"); + } +} + +export const getIdentityDataType = (vdxfkey) => { + + if (vdxfkey in IdentityVdxfidMap) { + + return IdentityVdxfidMap[vdxfkey].type; + + } else { + throw new Error("Unknown VDXF key"); + } + } + +export const IdentityVdxfidMap = { + [identitykeys.IDENTITY_FIRSTNAME.vdxfid]: { name: "First Name", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_LASTNAME.vdxfid]: { name: "Last Name", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_NATIONALITY.vdxfid]: { name: "Nationality", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_ATTESTOR.vdxfid]: { name: "Attestor ID", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_ATTESTATION_RECIPIENT.vdxfid]: { name: "Attestation Recipient", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_PHONENUMBER.vdxfid]: { name: "Phone Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_OVER18.vdxfid]: { name: "Over 18", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITY_OVER21.vdxfid]: { name: "Over 21", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITY_OVER25.vdxfid]: { name: "Over 25", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITY_EMAIL.vdxfid]: { name: "Email Address", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_HOMEADDRESS.vdxfid]: { name: "Home address", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITY_HOMEADDRESS_STREET1.vdxfid]: { name: "Street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_HOMEADDRESS_STREET2.vdxfid]: { name: "Street 2", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_HOMEADDRESS_CITY.vdxfid]: { name: "City", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_HOMEADDRESS_REGION.vdxfid]: { name: "Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_HOMEADDRESS_POSTCODE.vdxfid]: { name: "Post Code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_HOMEADDRESS_COUNTRY.vdxfid]: { name: "Country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_IDNUMBER_VALUE.vdxfid]: { name: "ID Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_IDNUMBER_TYPE.vdxfid]: { name: "ID Type", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_VERIFICATION_STATUS.vdxfid]: { name: "Verification Status", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_ACCEPTEDTOS.vdxfid]: { name: "Accepted Terms and Conditions", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_VERIFIEDSMS.vdxfid]: { name: "SMS Verified", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_KYCCHECKED.vdxfid]: { name: "KYC Checked ok", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_DOCUMENTSVERIFIED.vdxfid]: { name: "Documents Verified", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_SELFIECHECKED.vdxfid]: { name: "Selfie Checked", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_WATCHLISTOK.vdxfid]: { name: "Watchlist ok", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Riskcheck ok", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITY_DRIVINGLICENCE.vdxfid]: { name: "Driving Licence", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ORIGINALFRONT.vdxfid]: { name: "Driving Licence Front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ORIGINALBACK.vdxfid]: { name: "Driving Licence Back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_CROPPEDFRONT.vdxfid]: { name: "Driving Licence Front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_CROPPEDBACK.vdxfid]: { name: "Driving Licence Back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_FACE.vdxfid]: { name: "Driving Licence Face", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_IDNUMBER.vdxfid]: { name: "Driving Licence Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_CATEGORY.vdxfid]: { name: "Driving Licence Catagory", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_EXPIRATIONDATE.vdxfid]: { name: "Driving Licence expiry date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ISSUINGCOUNTRY.vdxfid]: { name: "Driving Licence issuing country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ISSUINGREGION.vdxfid]: { name: "Driving Licence issuing region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_DATEOFBIRTH.vdxfid]: { name: "Driving Licence Date of Birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_STREET1.vdxfid]: { name: "Driving Licence Street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_CITY.vdxfid]: { name: "Driving Licence City", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_REGION.vdxfid]: { name: "Driving Licence Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_POSTCODE.vdxfid]: { name: "Driving Licence ZIP/Post Code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_COUNTRY.vdxfid]: { name: "Driving Licence Country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_SELFIECHECK_IMAGE.vdxfid]: { name: "Selfie Check image", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_SELFIECHECK_VIDEO.vdxfid]: { name: "Selfie Check video", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Risk Check Ok", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_EMAIL_ISDELIVERABLE.vdxfid]: { name: "Email address is deliverable", type: VDXF_Data.DataByteKeyName() }, + [identitykeys.IDENTITY_EMAIL_BREACHCOUNT.vdxfid]: { name: "Email breach count", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_EMAIL_FIRSTBREACHEDAT.vdxfid]: { name: "Email first breach date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_EMAIL_LASTBREACHEDAT.vdxfid]: { name: "Email last breach date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_EMAIL_DOMAIN_REGISTEREDAT.vdxfid]: { name: "Email domain registered at", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_EMAIL_DOMAIN_FREEPROVIDER.vdxfid]: { name: "Email is free provider", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_EMAIL_DOMAIN_CUSTOM.vdxfid]: { name: "Email Domain is custom", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_EMAIL_DOMAIN_DISPOSABLE.vdxfid]: { name: "Email Domain Disposable", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS.vdxfid]: { name: "Email top level Domain Suspicious", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_IDCARD.vdxfid]: { name: "ID Card", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITY_IDCARD_ORIGINALFRONT.vdxfid]: { name: "ID Card Front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_IDCARD_ORIGINALBACK.vdxfid]: { name: "ID Card Back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_IDCARD_CROPPEDFRONT.vdxfid]: { name: "ID Card Front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_IDCARD_CROPPEDBACK.vdxfid]: { name: "ID Card Back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_IDCARD_FACE.vdxfid]: { name: "ID Card Face", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_IDCARD_IDNUMBER.vdxfid]: { name: "ID Card ID Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_IDCARD_CATEGORY.vdxfid]: { name: "ID Card Category", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_IDCARD_EXPIRATIONDATE.vdxfid]: { name: "ID Card Expiry date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_IDCARD_ISSUINGREGION.vdxfid]: { name: "ID Card Issuing Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_IDCARD_DATEOFBIRTH.vdxfid]: { name: "ID Card Date of Birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_IDCARD_ADDRESS_STREET1.vdxfid]: { name: "ID Card Street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_IDCARD_ADDRESS_CITY.vdxfid]: { name: "ID Card City", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_IDCARD_ADDRESS_REGION.vdxfid]: { name: "ID Card Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_IDCARD_ADDRESS_POSTCODE.vdxfid]: { name: "ID Card Zip/Post Code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_IDCARD_ADDRESS_COUNTRY.vdxfid]: { name: "ID Card Country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_PASSPORT.vdxfid]: { name: "Passport", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITY_PASSPORT_ORIGINALFRONT.vdxfid]: { name: "Passport front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_PASSPORT_ORIGINALBACK.vdxfid]: { name: "Passport back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_PASSPORT_CROPPEDFRONT.vdxfid]: { name: "Passport front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_PASSPORT_CROPPEDBACK.vdxfid]: { name: "Passport back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_PASSPORT_FACE.vdxfid]: { name: "Passport face", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_PASSPORT_IDNUMBER.vdxfid]: { name: "Passport ID Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_PASSPORT_CATEGORY.vdxfid]: { name: "Passport Category", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_PASSPORT_EXPIRATIONDATE.vdxfid]: { name: "Passport expiry date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_PASSPORT_DATEOFBIRTH.vdxfid]: { name: "Passport date of birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_STREET1.vdxfid]: { name: "Passport street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_CITY.vdxfid]: { name: "Passport city", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_REGION.vdxfid]: { name: "Passport region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_POSTCODE.vdxfid]: { name: "Passport zip/post code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_COUNTRY.vdxfid]: { name: "Passport country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT.vdxfid]: { name: "Residence Permit", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ORIGINALFRONT.vdxfid]: { name: "Residence Permit front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ORIGINALBACK.vdxfid]: { name: "Residence Permit back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_CROPPEDFRONT.vdxfid]: { name: "Residence Permit front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_CROPPEDBACK.vdxfid]: { name: "Residence Permit back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_FACE.vdxfid]: { name: "Residence Permit face", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_IDNUMBER.vdxfid]: { name: "Residence Permit ID Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_CATEGORY.vdxfid]: { name: "Residence Permit category", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_EXPIRATIONDATE.vdxfid]: { name: "Residence Permit expiry date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ISSUINGREGION.vdxfid]: { name: "Residence Permit issuing region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_DATEOFBIRTH.vdxfid]: { name: "Residence Permit date of birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS.vdxfid]: { name: "Residence Permit Address", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_STREET1.vdxfid]: { name: "Residence Permit Street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_CITY.vdxfid]: { name: "Residence Permit City", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_REGION.vdxfid]: { name: "Residence Permit Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_POSTCODE.vdxfid]: { name: "Residence Permit Zip/Post code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_COUNTRY.vdxfid]: { name: "Residence Permit Country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENTCARD.vdxfid]: { name: "Resident Card", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITY_RESIDENTCARD_ORIGINALFRONT.vdxfid]: { name: "Resident Card Front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_RESIDENTCARD_ORIGINALBACK.vdxfid]: { name: "Resident Card Back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_RESIDENTCARD_CROPPEDFRONT.vdxfid]: { name: "Resident Card Front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_RESIDENTCARD_CROPPEDBACK.vdxfid]: { name: "Resident Card Back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_RESIDENTCARD_FACE.vdxfid]: { name: "Resident Card Face", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_RESIDENTCARD_IDNUMBER.vdxfid]: { name: "Resident Card ID Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENTCARD_CATEGORY.vdxfid]: { name: "Resident Card Category", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENTCARD_EXPIRATIONDATE.vdxfid]: { name: "Resident Card Expiry Date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENTCARD_ISSUINGREGION.vdxfid]: { name: "Resident Card Issuing Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENTCARD_DATEOFBIRTH.vdxfid]: { name: "Resident Card date of birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_STREET1.vdxfid]: { name: "Resident Card Street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_CITY.vdxfid]: { name: "Resident Card City", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_REGION.vdxfid]: { name: "Resident Card Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_POSTCODE.vdxfid]: { name: "Resident Card Zip/Post Code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_COUNTRY.vdxfid]: { name: "Resident Card Country", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_VISA.vdxfid]: { name: "Visa", type: VDXF_Data.DataUint160Key() }, + [identitykeys.IDENTITY_VISA_ORIGINALFRONT.vdxfid]: { name: "Visa front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_VISA_ORIGINALBACK.vdxfid]: { name: "Visa back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_VISA_CROPPEDFRONT.vdxfid]: { name: "Visa front", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_VISA_CROPPEDBACK.vdxfid]: { name: "Visa back", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_VISA_FACE.vdxfid]: { name: "Visa face", type: VDXF_Data.DataURLKeyName() }, + [identitykeys.IDENTITY_VISA_IDNUMBER.vdxfid]: { name: "Visa ID Number", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_VISA_CATEGORY.vdxfid]: { name: "Visa Category", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_VISA_EXPIRATIONDATE.vdxfid]: { name: "Visa expiry date", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_VISA_ISSUINGREGION.vdxfid]: { name: "Visa issuing region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_VISA_DATEOFBIRTH.vdxfid]: { name: "Visa date of birth", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_VISA_ADDRESS_STREET1.vdxfid]: { name: "Visa Street 1", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_VISA_ADDRESS_CITY.vdxfid]: { name: "Visa City", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_VISA_ADDRESS_REGION.vdxfid]: { name: "Visa Region", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_VISA_ADDRESS_POSTCODE.vdxfid]: { name: "Visa Zip/Post Code", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_VISA_ADDRESS_COUNTRY.vdxfid]: { name: "Visa Country", type: VDXF_Data.DataStringKey() }, + [keylist.ATTESTATION_PROVISION_TYPE.vdxfid]: { name: "Attestation Type", type: VDXF_Data.DataStringKey() }, + [keylist.ATTESTATION_PROVISION_URL.vdxfid]: { name: "Attestation URL", type: VDXF_Data.DataURLKeyName() }, + [keylist.ATTESTATION_VIEW_RESPONSE.vdxfid]: { name: "Attestation View Response", type: VDXF_Data.DataStringKey()}, + [keylist.ATTESTATION_VIEW_REQUEST.vdxfid]: { name: "Attestation View Response", type: VDXF_Data.DataStringKey()}, + [keylist.PROFILE_DATA_VIEW_REQUEST.vdxfid]: { name: "Profile Data View Request", type: VDXF_Data.DataStringKey()}, + [keylist.IDENTITY_SIGNDATA_REQUEST.vdxfid]: { name: "Identity Sign Data Request", type: VDXF_Data.DataStringKey()}, +}; + diff --git a/src/utils/types/DataDescriptor.ts b/src/utils/types/DataDescriptor.ts new file mode 100644 index 0000000..729767f --- /dev/null +++ b/src/utils/types/DataDescriptor.ts @@ -0,0 +1,12 @@ + +export type DataDescriptor = { + version?: number, + flags?: number, + objectdata?: string, + label?: string, + mimeType?: string, + salt?: string, + epk?: string, + ivk?: string, + ssk?: string +} diff --git a/src/utils/types/MmrDescriptor.ts b/src/utils/types/MmrDescriptor.ts new file mode 100644 index 0000000..284292b --- /dev/null +++ b/src/utils/types/MmrDescriptor.ts @@ -0,0 +1,10 @@ +import { DataDescriptor } from './DataDescriptor'; + +export type mmrDescriptorParameters = { + version?: number; + objecthashtype?: number; + mmrhashtype?: number; + mmrroot?: DataDescriptor; + mmrhashes?: DataDescriptor; + datadescriptors?: DataDescriptor[]; +} diff --git a/src/utils/types/SignData.ts b/src/utils/types/SignData.ts new file mode 100644 index 0000000..d6cdcea --- /dev/null +++ b/src/utils/types/SignData.ts @@ -0,0 +1,8 @@ +export type SignData = { + filename?: string; + message?: string; + messagehex?: string; + messsagebase64?: string; + datahash?: string; + vdxfdata?: string; +} \ No newline at end of file diff --git a/src/utils/types/Signature.ts b/src/utils/types/Signature.ts new file mode 100644 index 0000000..22b3e67 --- /dev/null +++ b/src/utils/types/Signature.ts @@ -0,0 +1,9 @@ +export type Signature = { + version: number; + systemid: string; + hashtype: number; + signaturehash: string; + identityid: string; + signaturetype: number; + signature: string; +} \ No newline at end of file diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index b9edc9b..e487010 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -144,7 +144,7 @@ export class Challenge extends VDXFObject implements ChallengeInterface { super(vdxfkey); this.challenge_id = challenge.challenge_id; - this.requested_access = challenge.requested_access ? challenge.requested_access.map((x) => new RequestedPermission(x.data, x.vdxfkey)) : challenge.requested_access; + this.requested_access = challenge.requested_access ? challenge.requested_access.map((x) => new RequestedPermission(x.vdxfkey, x.data)) : challenge.requested_access; this.requested_access_audience = challenge.requested_access_audience; this.subject = challenge.subject ? challenge.subject.map((x) => new Subject(x.data, x.vdxfkey)) @@ -333,7 +333,7 @@ export class Challenge extends VDXFObject implements ChallengeInterface { const _vdxfkey = toBase58Check(reader.buffer.slice(reader.offset, reader.offset + HASH160_BYTE_LENGTH), I_ADDR_VERSION); - const _perm = new RequestedPermission("", _vdxfkey); + const _perm = new RequestedPermission(_vdxfkey); reader.offset = _perm.fromBuffer(reader.buffer, reader.offset); this.requested_access.push(_perm); } @@ -422,4 +422,8 @@ export class Challenge extends VDXFObject implements ChallengeInterface { } } -export class RequestedPermission extends Utf8DataVdxfObject {} \ No newline at end of file +export class RequestedPermission extends Utf8DataVdxfObject { + constructor(vdxfkey: string = "", data: string = "") { + super(data, vdxfkey); + } +} \ No newline at end of file diff --git a/src/vdxf/classes/DataDescriptor.ts b/src/vdxf/classes/DataDescriptor.ts index 0ae58d6..377fda5 100644 --- a/src/vdxf/classes/DataDescriptor.ts +++ b/src/vdxf/classes/DataDescriptor.ts @@ -422,7 +422,6 @@ export enum EHashTypes { HASH_LASTTYPE = 5 }; - export class MMRDescriptor { static VERSION_INVALID = new BN(0); static FIRST_VERSION = new BN(1); diff --git a/src/vdxf/classes/IdentityData.ts b/src/vdxf/classes/IdentityData.ts deleted file mode 100644 index 524c1e6..0000000 --- a/src/vdxf/classes/IdentityData.ts +++ /dev/null @@ -1,246 +0,0 @@ - -import * as identitykeys from '../identityDataKeys'; -import * as keylist from '../keys'; -import * as VDXF_Data from '../vdxfDataKeys'; - -export const friendlyName = (vdfxkey) => { - - if (vdfxkey in IdentityVdxfidMap) { - - return IdentityVdxfidMap[vdfxkey].name; - - } else { - throw new Error("Unknown VDXF key"); - } -} - -export const getIdentityDataType = (vdfxkey) => { - - if (vdfxkey in IdentityVdxfidMap) { - - return IdentityVdxfidMap[vdfxkey].type; - - } else { - throw new Error("Unknown VDXF key"); - } - } - -export const IdentityVdxfidMap = { - [identitykeys.IDENTITYDATA_FIRSTNAME.vdxfid]: { name: "First Name", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_LASTNAME.vdxfid]: { name: "Last Name", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_NATIONALITY.vdxfid]: { name: "Nationality", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_ATTESTOR.vdxfid]: { name: "Attestor ID", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDENTITY.vdxfid]: { name: "Identity", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_ID.vdxfid]: { name: "ID", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_USERID.vdxfid]: { name: "User ID", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_CREATEDAT.vdxfid]: { name: "Created at", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_COMPLETEDAT.vdxfid]: { name: "Completed at", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PREVIOUSATTEMPTID.vdxfid]: { name: "Previous attempt ID", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_SHAREABLEURL.vdxfid]: { name: "Shareable URL", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_TEMPLATEID.vdxfid]: { name: "Template ID", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_TEMPLATEVERSION.vdxfid]: { name: "Template Version", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PHONENUMBER.vdxfid]: { name: "Phone Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_OVER18.vdxfid]: { name: "Over 18", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_OVER21.vdxfid]: { name: "Over 21", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_OVER25.vdxfid]: { name: "Over 25", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_IPADDRESS.vdxfid]: { name: "IP Address", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_EMAIL.vdxfid]: { name: "Email Address", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_HOMEADDRESS.vdxfid]: { name: "Home address", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1.vdxfid]: { name: "Street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2.vdxfid]: { name: "Street 2", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_CITY.vdxfid]: { name: "City", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_REGION.vdxfid]: { name: "Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE.vdxfid]: { name: "Post Code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY.vdxfid]: { name: "Country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDNUMBER_VALUE.vdxfid]: { name: "ID Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDNUMBER_TYPE.vdxfid]: { name: "ID Type", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_STATUS.vdxfid]: { name: "Status", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_APPROVALS_ACCEPTEDTOS.vdxfid]: { name: "Accepted Terms and Conditions", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_APPROVALS_VERIFIEDSMS.vdxfid]: { name: "SMS Verified", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_APPROVALS_KYCCHECKED.vdxfid]: { name: "KYC Checked ok", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_APPROVALS_DOCUMENTSVERIFIED.vdxfid]: { name: "Documents Verified", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_APPROVALS_SELFIECHECKED.vdxfid]: { name: "Selfie Checked", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_APPROVALS_WATCHLIST_OK.vdxfid]: { name: "Watchlist ok", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Riskcheck ok", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE.vdxfid]: { name: "Driving Licence", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_FRONT.vdxfid]: { name: "Driving Licence Front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_BACK.vdxfid]: { name: "Driving Licence Back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_FRONT.vdxfid]: { name: "Driving Licence Front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_BACK.vdxfid]: { name: "Driving Licence Back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_FACE.vdxfid]: { name: "Driving Licence Face", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_IDNUMBER.vdxfid]: { name: "Driving Licence Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CATEGORY.vdxfid]: { name: "Driving Licence Catagory", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_EXPIRATIONDATE.vdxfid]: { name: "Driving Licence expiry date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Driving Licence matches country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION.vdxfid]: { name: "Driving Licence issuing region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH.vdxfid]: { name: "Driving Licence Date of Birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ADDRESS.vdxfid]: { name: "Driving Licence Address", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_STREET1.vdxfid]: { name: "Driving Licence Street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CITY.vdxfid]: { name: "Driving Licence City", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_REGION.vdxfid]: { name: "Driving Licence Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_POSTCODE.vdxfid]: { name: "Driving Licence ZIP/Post Code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_COUNTRY.vdxfid]: { name: "Driving Licence Country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_MATCHED.vdxfid]: { name: "Driving Licence Matched all", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_NAME_MATCHED.vdxfid]: { name: "Driving Licence name matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH_MATCHED.vdxfid]: { name: "Driving Licence Date of Birth Matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_SELFIECHECK_SUCCESS.vdxfid]: { name: "Selfie Check success", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_SELFIECHECK_IMAGE.vdxfid]: { name: "Selfie Check image", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_SELFIECHECK_VIDEO.vdxfid]: { name: "Selfie Check video", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_SELFIECHECK_DRIVINGLICENCE_MATCH.vdxfid]: { name: "Selfie Driving Licence match", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_KYC_SUCCESS.vdxfid]: { name: "KYC Success", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_KYC_ADDRESS_MATCHED.vdxfid]: { name: "KYC Address Matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_KYC_TYPE.vdxfid]: { name: "KYC Type", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_KYC_NAME_MATCHED.vdxfid]: { name: "KYC Name Matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_KYC_DATEOFBIRTH_MATCHED.vdxfid]: { name: "KYC Date of Birth Matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_KYC_IDNUMBER_MATCHED.vdxfid]: { name: "KYC ID Matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_KYC_PHONENUMBER_MATCHED.vdxfid]: { name: "KYC Phone number matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_KYC_AREACODE_MATCHED.vdxfid]: { name: "KYC Areacode Matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RISKCHECK_STATUS.vdxfid]: { name: "Risk Check Status", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RISKCHECK_USERINTERACTIONS.vdxfid]: { name: "Risck Check User Interactions", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RISKCHECK_FRAUDRINGOK.vdxfid]: { name: "Risk Check No Fraudring", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RISKCHECK_BOTNOTDETECTED.vdxfid]: { name: "Risk Check bot free", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_EMAIL_ISDELIVERABLE.vdxfid]: { name: "Email address is deliverable", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_EMAIL_BREACHCOUNT.vdxfid]: { name: "Email breach count", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_EMAIL_FIRSTBREACHEDAT.vdxfid]: { name: "Email first breach date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_EMAIL_LASTBREACHEDAT.vdxfid]: { name: "Email last breach date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_REGISTEREDAT.vdxfid]: { name: "Email domain registered at", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_FREEPROVIDER.vdxfid]: { name: "Email is free provider", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_CUSTOM.vdxfid]: { name: "Email Domain is custom", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_DISPOSABLE.vdxfid]: { name: "Email Domain Disposable", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS.vdxfid]: { name: "Email top level Domain Suspicious", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD.vdxfid]: { name: "ID Card", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_FRONT.vdxfid]: { name: "ID Card Front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_BACK.vdxfid]: { name: "ID Card Back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_IDCARD_CROPPED_FRONT.vdxfid]: { name: "ID Card Front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_IDCARD_CROPPED_BACK.vdxfid]: { name: "ID Card Back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_IDCARD_FACE.vdxfid]: { name: "ID Card Face", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_IDCARD_IDNUMBER.vdxfid]: { name: "ID Card ID Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_CATEGORY.vdxfid]: { name: "ID Card Category", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_EXPIRATIONDATE.vdxfid]: { name: "ID Card Expiry date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "ID Card Issuing Country Matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_ISSUING_REGION.vdxfid]: { name: "ID Card Issuing Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTH.vdxfid]: { name: "ID Card Date of Birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS.vdxfid]: { name: "ID Card Address", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_STREET1.vdxfid]: { name: "ID Card Street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_CITY.vdxfid]: { name: "ID Card City", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_REGION.vdxfid]: { name: "ID Card Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_POSTCODE.vdxfid]: { name: "ID Card Zip/Post Code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_COUNTRY.vdxfid]: { name: "ID Card Country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "ID Card Matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_NAME_MATCHED.vdxfid]: { name: "ID Card Name Matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "ID Card Date of Birth Matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_PASSPORT.vdxfid]: { name: "Passport", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_FRONT.vdxfid]: { name: "Passport front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_BACK.vdxfid]: { name: "Passport back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_FRONT.vdxfid]: { name: "Passport front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_BACK.vdxfid]: { name: "Passport back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_PASSPORT_FACE.vdxfid]: { name: "Passport face", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_PASSPORT_IDNUMBER.vdxfid]: { name: "Passport ID Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_CATEGORY.vdxfid]: { name: "Passport Category", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_EXPIRATIONDATE.vdxfid]: { name: "Passport expiry date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Passport issuing country matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_REGION.vdxfid]: { name: "Passport issuing region matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTH.vdxfid]: { name: "Passport date of birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS.vdxfid]: { name: "Passport address", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_STREET1.vdxfid]: { name: "Passport street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_CITY.vdxfid]: { name: "Passport city", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_REGION.vdxfid]: { name: "Passport region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_POSTCODE.vdxfid]: { name: "Passport zip/post code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_COUNTRY.vdxfid]: { name: "Passport country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Passport matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_NAME_MATCHED.vdxfid]: { name: "Passport Name Matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTHMATCHED.vdxfid]: { name: "Passport date of birth matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT.vdxfid]: { name: "Residence Permit", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_FRONT.vdxfid]: { name: "Residence Permit front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_BACK.vdxfid]: { name: "Residence Permit back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_FRONT.vdxfid]: { name: "Residence Permit front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_BACK.vdxfid]: { name: "Residence Permit back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_FACE.vdxfid]: { name: "Residence Permit face", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_IDNUMBER.vdxfid]: { name: "Residence Permit ID Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CATEGORY.vdxfid]: { name: "Residence Permit category", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_EXPIRATIONDATE.vdxfid]: { name: "Residence Permit expiry date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Residence Permit issuing country matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_REGION.vdxfid]: { name: "Residence Permit issuing region matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTH.vdxfid]: { name: "Residence Permit date of birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS.vdxfid]: { name: "Residence Permit Address", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_STREET1.vdxfid]: { name: "Residence Permit Street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_CITY.vdxfid]: { name: "Residence Permit City", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_REGION.vdxfid]: { name: "Residence Permit Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_POSTCODE.vdxfid]: { name: "Residence Permit Zip/Post code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_COUNTRY.vdxfid]: { name: "Residence Permit Country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Residence Permit Matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_NAME_MATCHED.vdxfid]: { name: "Residence Permit name matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTHMATCHED.vdxfid]: { name: "Residence Permit date of birth matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD.vdxfid]: { name: "Resident Card", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_FRONT.vdxfid]: { name: "Resident Card Front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_BACK.vdxfid]: { name: "Resident Card Back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_FRONT.vdxfid]: { name: "Resident Card Front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_BACK.vdxfid]: { name: "Resident Card Back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_FACE.vdxfid]: { name: "Resident Card Face", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_IDNUMBER.vdxfid]: { name: "Resident Card ID Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_CATEGORY.vdxfid]: { name: "Resident Card Category", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_EXPIRATIONDATE.vdxfid]: { name: "Resident Card Expiry Date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Resident Card Issuing Country Matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_REGION.vdxfid]: { name: "Resident Card Issuing Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTH.vdxfid]: { name: "Resident Card date of birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS.vdxfid]: { name: "Resident Card address", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_STREET1.vdxfid]: { name: "Resident Card Street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_CITY.vdxfid]: { name: "Resident Card City", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_REGION.vdxfid]: { name: "Resident Card Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_POSTCODE.vdxfid]: { name: "Resident Card Zip/Post Code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_COUNTRY.vdxfid]: { name: "Resident Card Country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Resident Card Matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_NAME_MATCHED.vdxfid]: { name: "Resident Card Name Matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "Resident Card date of birth Matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_VISA.vdxfid]: { name: "Visa", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITYDATA_VISA_ORIGINAL_FRONT.vdxfid]: { name: "Visa front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_VISA_ORIGINAL_BACK.vdxfid]: { name: "Visa back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_VISA_CROPPED_FRONT.vdxfid]: { name: "Visa front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_VISA_CROPPED_BACK.vdxfid]: { name: "Visa back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_VISA_FACE.vdxfid]: { name: "Visa face", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_VISA_IDNUMBER.vdxfid]: { name: "Visa ID Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_CATEGORY.vdxfid]: { name: "Visa Category", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_EXPIRATIONDATE.vdxfid]: { name: "Visa expiry date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Visa issuing country matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_ISSUING_REGION.vdxfid]: { name: "Visa issuing region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTH.vdxfid]: { name: "Visa date of birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS.vdxfid]: { name: "Visa address", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_STREET1.vdxfid]: { name: "Visa Street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_CITY.vdxfid]: { name: "Visa City", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_REGION.vdxfid]: { name: "Visa Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_POSTCODE.vdxfid]: { name: "Visa Zip/Post Code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_COUNTRY.vdxfid]: { name: "Visa Country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Visa document matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_NAME_MATCHED.vdxfid]: { name: "Visa name matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTHMATCHED.vdxfid]: { name: "Visa date of birth matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALFRONT.vdxfid]: { name: "Original Front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALBACK.vdxfid]: { name: "Original Back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDFRONT.vdxfid]: { name: "Cropped Front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDBACK.vdxfid]: { name: "Cropped Back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_FACE.vdxfid]: { name: "Face", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_IDNUMBER.vdxfid]: { name: "ID Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CATEGORY.vdxfid]: { name: "Category", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_EXPIRATIONDATE.vdxfid]: { name: "Expiry Date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY.vdxfid]: { name: "Issuing Country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUING_REGION.vdxfid]: { name: "Issuing Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ADDRESS.vdxfid]: { name: "Address", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_ADDRESS_STREET1.vdxfid]: { name: "Street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_ADDRESS_STREET2.vdxfid]: { name: "Street 2", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_ADDRESS_CITY.vdxfid]: { name: "City", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_ADDRESS_REGION.vdxfid]: { name: "Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_ADDRESS_POSTCODE.vdxfid]: { name: "Zip/Postal Code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_ADDRESS_COUNTRY.vdxfid]: { name: "Country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Document Matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED.vdxfid]: { name: "Name Matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED.vdxfid]: { name: "Date of Birth Matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.BANK_ACCOUNT.vdxfid]: { name: "Bank Account", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITYDATA_DOCUMENTS_AND_IMAGES.vdxfid]: { name: "Official ID Documents", type: VDXF_Data.DataUint160Key() }, - [keylist.ATTESTATION_PROVISION_TYPE.vdxfid]: { name: "Attestation Type", type: VDXF_Data.DataStringKey() }, - [keylist.ATTESTATION_PROVISION_URL.vdxfid]: { name: "Attestation URL", type: VDXF_Data.DataURLKeyName() }, - [keylist.ATTESTATION_VIEW_RESPONSE.vdxfid]: { name: "Attestation View Response", type: VDXF_Data.DataStringKey()}, - [keylist.ATTESTATION_VIEW_REQUEST.vdxfid]: { name: "Attestation View Response", type: VDXF_Data.DataStringKey()}, - [keylist.PROFILE_DATA_VIEW_REQUEST.vdxfid]: { name: "Profile Data View Request", type: VDXF_Data.DataStringKey()}, -}; - diff --git a/src/vdxf/classes/PersonalProfile.ts b/src/vdxf/classes/PersonalProfile.ts index 0d7607b..68ee78c 100644 --- a/src/vdxf/classes/PersonalProfile.ts +++ b/src/vdxf/classes/PersonalProfile.ts @@ -1,6 +1,4 @@ import { VDXFObject } from ".."; -import * as identitykeys from '../identityDataKeys'; - export class DataCategory extends VDXFObject { data: Array; @@ -12,71 +10,4 @@ export class DataCategory extends VDXFObject { this.category = category || ""; this.details = details || ""; } -} - -export const defaultPersonalProfileDataTemplate = [ - new DataCategory( - identitykeys.IDENTITYDATA_PERSONAL_DETAILS.vdxfid, - [ - identitykeys.IDENTITYDATA_FIRSTNAME.vdxfid, - identitykeys.IDENTITYDATA_LASTNAME.vdxfid, - identitykeys.IDENTITYDATA_MIDDLENAME.vdxfid, - identitykeys.IDENTITYDATA_DATEOFBIRTH.vdxfid, - identitykeys.IDENTITYDATA_NATIONALITY.vdxfid - ], - "Personal Details", - "Name, birthday, nationality" - ), - new DataCategory(identitykeys.IDENTITYDATA_CONTACT.vdxfid, - [ - identitykeys.IDENTITYDATA_EMAIL.vdxfid, - identitykeys.IDENTITYDATA_PHONENUMBER.vdxfid - ], - "Contact", - "Email, phone number" - ), - new DataCategory(identitykeys.IDENTITYDATA_LOCATIONS.vdxfid, - [ - identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1.vdxfid, - identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2.vdxfid, - identitykeys.IDENTITYDATA_HOMEADDRESS_CITY.vdxfid, - identitykeys.IDENTITYDATA_HOMEADDRESS_REGION.vdxfid, - identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE.vdxfid, - identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY.vdxfid, - ], - "Locations", - "Tax residency, home address"), - new DataCategory(identitykeys.IDENTITYDATA_BANKING_INFORMATION.vdxfid, - [ - identitykeys.BANK_ACCOUNT.vdxfid, - identitykeys.BANK_ACCOUNT_CURRENCY.vdxfid, - identitykeys.BANK_ACCOUNT_COUNTRY.vdxfid, - identitykeys.BANK_ACCOUNT_STREET1.vdxfid, - identitykeys.BANK_ACCOUNT_STREET2.vdxfid, - identitykeys.BANK_ACCOUNT_CITY.vdxfid, - identitykeys.BANK_ACCOUNT_REGION.vdxfid, - identitykeys.BANK_ACCOUNT_POSTALCODE.vdxfid, - identitykeys.BANK_ACCOUNT_TAXNUMBER.vdxfid, - identitykeys.BANK_ACCOUNT_TAXCOUNTRY.vdxfid, - identitykeys.BANK_ACCOUNT_FIRSTNAME.vdxfid, - identitykeys.BANK_ACCOUNT_LASTNAME.vdxfid, - identitykeys.BANK_ACCOUNT_PHONENUMBER.vdxfid, - identitykeys.BANK_ACCOUNT_NUMBER.vdxfid, - identitykeys.BANK_ACCOUNT_TYPE.vdxfid - ], - "Banking Information", - "Bank accounts"), - new DataCategory(identitykeys.IDENTITYDATA_DOCUMENTS_AND_IMAGES.vdxfid, - [ - identitykeys.IDENTITYDATA_PASSPORT.vdxfid, - identitykeys.IDENTITYDATA_DRIVINGLICENCE.vdxfid, - identitykeys.IDENTITYDATA_RESIDENCEPERMIT.vdxfid, - identitykeys.IDENTITYDATA_RESIDENTCARD.vdxfid, - identitykeys.IDENTITYDATA_VISA.vdxfid, - identitykeys.IDENTITYDATA_IDCARD.vdxfid, - identitykeys.IDENTITYDATA_SELFIECHECK_IMAGE.vdxfid, - ], - "Documents", - "Passport, ID, driving license"), - -] \ No newline at end of file +} \ No newline at end of file diff --git a/src/vdxf/classes/SaltedData.ts b/src/vdxf/classes/SaltedData.ts new file mode 100644 index 0000000..a2d283f --- /dev/null +++ b/src/vdxf/classes/SaltedData.ts @@ -0,0 +1,102 @@ +import varint from '../../utils/varint' +import varuint from '../../utils/varuint' +import { fromBase58Check, toBase58Check } from "../../utils/address"; +import bufferutils from '../../utils/bufferutils' +import { BN } from 'bn.js'; +import { BigNumber } from '../../utils/types/BigNumber'; +import { I_ADDR_VERSION } from '../../constants/vdxf'; +import { VDXFData } from '../../'; +import { EHashTypes } from './DataDescriptor'; +const { BufferReader, BufferWriter } = bufferutils +const createHash = require("create-hash"); +import { VERUS_DATA_SIGNATURE_PREFIX } from "../../constants/vdxf"; +import { SaltedDataKey } from '../vdxfDataKeys'; + +export class SaltedData extends VDXFData { + + salt: Buffer; + + static VERSION_INVALID = new BN(0); + static FIRST_VERSION = new BN(1); + static LAST_VERSION = new BN(1); + static DEFAULT_VERSION = new BN(1); + + + constructor(data?: Buffer, salt: Buffer = Buffer.alloc(0)) { + super(data); + if (salt.length != 0) { + this.salt = salt; + } + this.vdxfkey = SaltedDataKey().vdxfid; + + } + + static fromJson(data: any) { + + const saltedData = new SaltedData(); + + if (data) { + if (data.version) { + saltedData.version = new BN(data.version); + } else { + saltedData.version = SaltedData.DEFAULT_VERSION; + } + if (data.salt) saltedData.salt = Buffer.from(data.salt, 'hex'); + if (data.data) saltedData.data = Buffer.from(data.data, 'hex'); + if (data.key) saltedData.vdxfkey = data.key; + } + + return saltedData; + } + getByteLength() { + let byteLength = 0; + + byteLength += 20; //key + byteLength += varint.encodingLength(this.version); + byteLength += varuint.encodingLength(this.data.length + this.salt.length); + byteLength += this.data.length + this.salt.length; + + return byteLength + } + + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) + + bufferWriter.writeSlice(fromBase58Check(this.vdxfkey).hash); + bufferWriter.writeVarInt(this.version); + bufferWriter.writeVarSlice(Buffer.concat([this.data, this.salt])); + + return bufferWriter.buffer + } + + fromBuffer(buffer: Buffer, offset: number = 0) { + const reader = new BufferReader(buffer, offset); + + this.vdxfkey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + this.version = reader.readVarInt(); + this.data = reader.readVarSlice(); + + this.salt = this.data.slice(this.data.length - 32); + this.data = this.data.slice(0, this.data.length - 32); + + return reader.offset; + } + + toJson(): any { + + return { + version: this.version.toString(), + key: this.vdxfkey, + data: this.data.toString('hex'), + salt: this.salt.toString('hex') + } + } + + getHash(hw: (data: Buffer) => Buffer ):Buffer { + + const hash = hw(Buffer.concat([this.data, this.salt])); + + return hash; + + } +} \ No newline at end of file diff --git a/src/vdxf/classes/index.ts b/src/vdxf/classes/index.ts index e790388..2508229 100644 --- a/src/vdxf/classes/index.ts +++ b/src/vdxf/classes/index.ts @@ -38,4 +38,4 @@ export { ProvisioningTxid } from './provisioning/ProvisioningResult' export { Context } from './Context' -export { defaultPersonalProfileDataTemplate, DataCategory } from './PersonalProfile' \ No newline at end of file +export { DataCategory } from './PersonalProfile' \ No newline at end of file diff --git a/src/vdxf/identityDataKeys.ts b/src/vdxf/identityDataKeys.ts index 3272d2e..17868ab 100644 --- a/src/vdxf/identityDataKeys.ts +++ b/src/vdxf/identityDataKeys.ts @@ -1,2769 +1,1832 @@ import { VDXFKeyInterface } from "./keys" -export const IDENTITYDATA_ATTESTOR: VDXFKeyInterface = { - "vdxfid": "iNe8VaRBRFDhb6xjZ7WHNWgfM73428GN8B", - "hash160result": "5e01d5d356d517df57ea0f391c86e11a84663bd2", +export const IDENTITY_ACCOUNT_ID: VDXFKeyInterface = { + "vdxfid": "i5Xgd7Aqds922eE8FDBUsKHSgiig39AnfS", + "indexid": "xAMo5ubvVBMgep7A6tqdqhoyiNjgq3j1ci", + "hash160result": "4c5e79bf46593fe959cb1918422eaa8fc82b8916", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.attestor" - } -}; - -export const IDENTITYDATA_IDENTITY: VDXFKeyInterface = { - "vdxfid": "iFa41TpKfvbjaEnP78BNpSA9KYNgED58ms", - "hash160result": "63730181dc037834a7b2b9e7fed49863ca1cad84", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.identity" - } -}; - -export const IDENTITYDATA_ID: VDXFKeyInterface = { - "vdxfid": "i3uDEe15gH8AN88WjGGwF7gv6jVwJa1Wt5", - "indexid": "x8jKhSSAXbLpzJ1Yaww6DWDT8PWxAzngtM", - "hash160result": "17bc967bf757bc093ba3fc1dd9298abb7235ab04", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.id" - } -} - -export const IDENTITYDATA_USERID: VDXFKeyInterface = { - "vdxfid": "iMxzsbP4iptfkxQD4CaYwYNqSRSqw1eqJp", - "indexid": "xSo7LPp9a97LP8HEutEhuvuNU5Trrjc77z", - "hash160result": "b6e3f22d3a87fbdffe53d16e1eab779b16d1d4ca", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.userid" - } -} - -export const IDENTITYDATA_CREATEDAT: VDXFKeyInterface = { - "vdxfid": "iNxvB8LET1HNQ2aWqS8RoVj8fcPr1UdcSA", - "indexid": "xTo2dvmKJKW32CTYh7namtFfhGQrrbP3Rv", - "hash160result": "dabed2d7a3d4cacbc482ce046dd1be8b6605c9d5", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.createdat" - } -} - -export const IDENTITYDATA_COMPLETEDAT: VDXFKeyInterface = { - "vdxfid": "iFtW78dkwZtb4Q9EhBEm4xYMYFxYEvP39D", - "indexid": "xLicZw4qnt7Fga2GYrtv3M4tZuyZ5zz9CJ", - "hash160result": "12903d8d58b28acf0dfefd6598b2ed6394622a88", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.completedat" - } -} - -export const IDENTITYDATA_PREVIOUSATTEMPTID: VDXFKeyInterface = { - "vdxfid": "iNVKxjLQJmxyFsPZGufmkb9rh8FoBrcS37", - "indexid": "xTKSRXmVA6Bdt3Gb8bKviygPinGp7XuZqr", - "hash160result": "f2154430bfab9e858dbd05f48e379f77dd3a91d0", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.previousattemptid" - } -} - -export const IDENTITYDATA_SHAREABLEURL: VDXFKeyInterface = { - "vdxfid": "i9nYbM8arP15YrJYqSLbxgi7iJgYbzPwXR", - "indexid": "xEcf49ZfhhDkB2Bah7zkw5EejxhZYZ83om", - "hash160result": "8a81df9444dcd55bf80dfff5e07b4a1fd0353945", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.shareableurl" - } -} - -export const IDENTITYDATA_TEMPLATEID: VDXFKeyInterface = { - "vdxfid": "i5j8xXGKYLBAENLD5CBosWtmB2LnWrxobF", - "indexid": "xAZFRKhQPePprYDEvsqxquRJCgMoTQzGzL", - "hash160result": "aefdfe818fd9323496ad29101b9b40e3d0bab318", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.templateid" - } -} - -export const IDENTITYDATA_TEMPLATEVERSION: VDXFKeyInterface = { - "vdxfid": "iQTADnLBxVAxxxAidEUgK8DVeuaaY7w78n", - "indexid": "xVHGgamGooPdb83kUv8qHWk2gZbbW3CZYi", - "hash160result": "1b1a410a4258fe91ee0e40904538d649c58418e6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.templateversion" - } -} - -export const IDENTITYDATA_PHONENUMBER: VDXFKeyInterface = { - "vdxfid": "i9ZQ5degEh3wQg5vNm8Tod88bcJBrLs5p3", - "indexid": "xEPWYS5m61Gc2qxxESncn1efdGKChdypms", - "hash160result": "c58e0231ddcd85747709016800cc6e796cb2bc42", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.phonenumber" - } -} - -export const IDENTITYDATA_DATEOFBIRTH: VDXFKeyInterface = { - "vdxfid": "iPzSt64gwsqmxcz3Ht7zhMngLC6no6S74K", - "indexid": "xUpZLtVmoC4Sans59Zn9fkKDMr7oe7NpkD", - "hash160result": "057c9866c848002e1fac1c419a300369f2310be1", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.dateofbirth" - } -} - -export const IDENTITYDATA_OVER18: VDXFKeyInterface = { - "vdxfid": "iF8QUrVj4LCSKdF5KFG6axidrUg8RiV65A", - "indexid": "xKxWwevoueR6wo87AvvFZMFAt8h9EHjvu5", - "hash160result": "70a65a9b459169a05b34f101ff0631cf0763d37f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.over18" - } -} - -export const IDENTITYDATA_OVER21: VDXFKeyInterface = { - "vdxfid": "i6E3RQUUX3jt8CkizuLX6ihZHTegCmmbj4", - "indexid": "xB49tCuZNMxYkNdkrazg57E6K7fh65oniA", - "hash160result": "6238fac23c82ebadd8f79306558cb8ddc62b2b1e", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.over21" - } -} - -export const IDENTITYDATA_OVER25: VDXFKeyInterface = { - "vdxfid": "iHqnuVSGJAjF4SXqurNB2h3sY7q5raxhDr", - "indexid": "xNfuNHsM9UwugcQsmY2L15aQZmr6n3MA8x", - "hash160result": "88c15026283fb46b5a6b3de4f4b5a33a7f69979d", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.over25" - } -} - -export const IDENTITYDATA_IPADDRESS: VDXFKeyInterface = { - "vdxfid": "i6HsaWESEEpa1RGPeuksdCQWZ8Svvq7w4e", - "indexid": "xB7z3JfX5Z3Edb9RWbR2baw3anTwtiKSmr", - "hash160result": "4fceb989885b50eb19d713f76fe53b62449ee41e", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.ipaddress" - } -} - -export const IDENTITYDATA_EMAIL: VDXFKeyInterface = { - "vdxfid": "i8nmFBXnQNFK6HmNM1XHr6xLECPEry44Xr", - "indexid": "xDcshyxsFgTyiTeQChBSpVUsFrQFg1ph6J", - "hash160result": "31b2f16b20e9fdc1e11f37d07ba97f5463a54b3a", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.email" - } -} - -export const IDENTITYDATA_FIRSTNAME: VDXFKeyInterface = { - "vdxfid": "i4GqsotHGa4czCdtg2d8FVHKfJFzVyBPrM", - "indexid": "x96xLcKN7tHHcNWvXiHHDsorgxH1REYzrR", - "hash160result": "31e7d78d45dd436cd977ac0f9ed03094bd87c208", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.firstname" - } -} - -export const IDENTITYDATA_MIDDLENAME: VDXFKeyInterface = { - "vdxfid": "iB8d3HBPEr3tsxsNoCGxDwfr9teVwugeyK", - "indexid": "xFxjW5cU6AGZW8kQesw7CLCPBYfWtK6d9G", - "hash160result": "2044d9008acd28b1795ff04788289d24135efd53", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.middlename" - } - } - -export const IDENTITYDATA_LASTNAME: VDXFKeyInterface = { - "vdxfid": "iHybTrNB1kXRrjsCtJXd6fvBKxepqMpS5Z", - "indexid": "xNohveoFs4k6UukEjzBn54SiMcfqhV66Vg", - "hash160result": "3c3fb99f2b33f5c20c890f36fa8cc1ff3d30119f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.lastname" - } -} - -export const IDENTITYDATA_HOMEADDRESS: VDXFKeyInterface = { - "vdxfid": "i6AtrvvqMkzVPQqtEmzn1EbjkzF3CbaM9L", - "indexid": "xB11KjMvD5DA1aiv6Tevyd8GneG45Q5BLp", - "hash160result": "f83d7549817e9eda543bf587689c06e814c7921d", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.homeaddress" - } -} - -export const IDENTITYDATA_HOMEADDRESS_STREET1: VDXFKeyInterface = { - "vdxfid": "iL29rGaWXcww4fwe8Us1kg7Y16XUDgaWFC", - "indexid": "xQrGK51bNwAbgqpfzAXAj4e52kYV4o2k7S", - "hash160result": "b898ec5f2c3633b099b4f8332b987d938c4e7db5", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.homeaddress" - }, - "bounddata": { - "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" - } -} - -export const IDENTITYDATA_HOMEADDRESS_STREET2: VDXFKeyInterface = { - "vdxfid": "iPfVvVxRkpE8WXKAeCYGTxsdpLa1Eh1KzD", - "indexid": "xUVcPJPWc8So8hCCVtCRSMQAqzb25YSnPA", - "hash160result": "8c2235594883052b88799461f306c084b0d475dd", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.homeaddress" - }, - "bounddata": { - "vdxfkey": "i3h8D5kGtn6DCVCwPFvbypbFCqfzAhXiD2" - } -} - -export const IDENTITYDATA_HOMEADDRESS_CITY: VDXFKeyInterface = { - "vdxfid": "iFRUFNWPsrDNNLfCWhAqFoUamhwryjx27c", - "indexid": "xLFaiAwUjAS2zWYENNpzEC17oMxspXLHnY", - "hash160result": "ea4cad23a3b421b827747769be86b29d699a0d83", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.homeaddress" - }, - "bounddata": { - "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" - } -} - -export const IDENTITYDATA_HOMEADDRESS_REGION: VDXFKeyInterface = { - "vdxfid": "iRmhi8Z6STjtt4nE1MWJCgYGrKBGT1dWaB", - "indexid": "xWbpAvzBHmxZWEfFs3ATB54osyCHLkZ74h", - "hash160result": "b94c5f0aba29341980e1711c4e6f4ac6cf6a92f4", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.homeaddress" - }, - "bounddata": { - "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" - } -} - -export const IDENTITYDATA_HOMEADDRESS_POSTCODE: VDXFKeyInterface = { - "vdxfid": "i8XMZQ3NGhEvtRA9e68tShsRgABHdrJYkV", - "indexid": "xDMU2CUT81TbWb3BVmo3R6PxhpCJZUQwNj", - "hash160result": "a94d72335f27128bf57a31ac38c6e0e374a26137", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.homeaddress" - }, - "bounddata": { - "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" - } -} - -export const IDENTITYDATA_HOMEADDRESS_COUNTRY: VDXFKeyInterface = { - "vdxfid": "iAaJZj9yTRxT1WrYu42YWCeTAuCkeWJnip", - "indexid": "xFQR2Xb4JkB7dgjakjghUbAzCZDmbcGPTX", - "hash160result": "15f33d581893957024d128d7fa060ec86fa2e04d", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.homeaddress" - }, - "bounddata": { - "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" - } -} - -export const IDENTITYDATA_IDNUMBER_VALUE: VDXFKeyInterface = { - "vdxfid": "i79FRsacpZYQ9yVFYUK5x6eeUeS1EGNprE", - "indexid": "xByMtg1hfsm4n9NHQ9yEvVBBWJT24wRXnq", - "hash160result": "e9b3c40de3185cb462bf8c76f75ba10da53d3b28", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idnumber.value" - } -} - -export const IDENTITYDATA_IDNUMBER_TYPE: VDXFKeyInterface = { - "vdxfid": "iHmUB12ZvCagSnp8RYifzEiVzu6q4EXSx6", - "indexid": "xNbadoTemWoM4xhAHENpxdF32Z7r2EHU4B", - "hash160result": "db12844ffbf6244f5506938229916f986f1cc69c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idnumber.type" - } -} - -export const IDENTITYDATA_STATUS: VDXFKeyInterface = { - "vdxfid": "iGDz9GLxDULfhzPJs2hU7MuHoyEzHUr1oA", - "indexid": "xM46c4n34nZLLAGLiiMd5kRpqdG17kNgXH", - "hash160result": "424d072b54b489c27a36a8a10ce7d0b738b1d98b", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.status" - } -} - -export const IDENTITYDATA_APPROVALS_ACCEPTEDTOS: VDXFKeyInterface = { - "vdxfid": "iAaWyLM18QHXa4WFSoYXNrbWP4DG3fGUqu", - "indexid": "xFQdS8n5yiWCCEPHJVCgMF83QiEGuAX7Lu", - "hash160result": "7c0f3d2f6ec35b7702f6e3b394a06877cafdea4d", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.approvals.acceptedtos" - } -} - -export const IDENTITYDATA_APPROVALS_VERIFIEDSMS: VDXFKeyInterface = { - "vdxfid": "iCjR6fQST9YLLn72B96aHgSjF54v6UXqSf", - "indexid": "xHZXZTqXJTkzxwz42pkjG4yGGj5vvcnSQq", - "hash160result": "26bf160fb405c0fad15a9b5c2f602dbd61158a65", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.approvals.verifiedsms" - } -} - -export const IDENTITYDATA_APPROVALS_KYCCHECKED: VDXFKeyInterface = { - "vdxfid": "iH9AxMi9qB1RFkZ3HQW11c2xcntwQ21j3M", - "indexid": "xMyHRA9EgVE5svS596A9yzZVeSuxBAkxdv", - "hash160result": "22d9177c4b16c2316d85f84a1594903f7bc3e895", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.approvals.kycchecked" - } -} - -export const IDENTITYDATA_APPROVALS_DOCUMENTSVERIFIED: VDXFKeyInterface = { - "vdxfid": "iAC86tdUvqwcSwUowKZGG4WPxTzNSwuHCo", - "indexid": "xF2EZh4ZnAAH57Mqo1DRET2vz81PNz5i7r", - "hash160result": "c183cce3b8a5360b52a6237a15c43f96e1bfae49", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.approvals.documentsverified" - } -} - -export const IDENTITYDATA_APPROVALS_SELFIECHECKED: VDXFKeyInterface = { - "vdxfid": "iFYWGcgSm4jGnDTfNnuk9TzcQmkWAdxpwe", - "indexid": "xLNcjR7XcNwwQPLhEUZu7rX9SRmX1dHrha", - "hash160result": "28e13d3434ffeb8045e813da5df34b06cc336284", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.approvals.selfiechecked" - } -} - -export const IDENTITYDATA_APPROVALS_WATCHLIST_OK: VDXFKeyInterface = { - "vdxfid": "iFtRaMKJGyaqgpiH4ZXeGZMMR47C1u34Jt", - "indexid": "xLiY39kP8HoWJzbJvFBoEwstSi8CsZK8Jz", - "hash160result": "d29c35a645ac1c92fa0506482c37370c609a2688", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.approvals.watchlist.ok" - } -} - -export const IDENTITYDATA_APPROVALS_RISKCHECKOK: VDXFKeyInterface = { - "vdxfid": "i4pkwqbNCZj3ZrukRooKDAidLJ2SJt57Tf", - "indexid": "x9esQe2T3swiC2nnHVTUBZFAMx3TBR2Ew1", - "hash160result": "4650258cd77d7928a47ee880075592d8a7b9cb0e", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.approvals.riskcheckok" - } -} - -export const IDENTITYDATA_DRIVINGLICENCE: VDXFKeyInterface = { - "vdxfid": "iQe74mwXJTFv1Bg8MRg7zqBMFUsD6jhTxz", - "indexid": "xVUDXaNc9mUadMZAD7LGyDhtH8tDzeHFrT", - "hash160result": "72eaff870cdd9c650afcfed1e379330fd7752ae8", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - } -} - -export const IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_FRONT: VDXFKeyInterface = { - "vdxfid": "iSBvWubN2yGHsdj6dGL3vMDjZMU6XSWxyG", - "indexid": "xX22yi2StHUxVoc8UwzCtjkGb1V7R95hsy", - "hash160result": "2720c73719ffc070c103fa30689283fc331727f9", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iBrpt78Mdrqcc1RHwPWKYBALbNTC4cwdJQ" + "name": "vrsc::identity.account.id" } } -export const IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_BACK: VDXFKeyInterface = { - "vdxfid": "iH81F6cj2Kjf2JzRxXAnc9oMQdGQqdQMzD", - "indexid": "xMx7hu3osdxKeUsTpCpwaYKtSHHRowL8Sr", - "hash160result": "e146bb291bd348f94e84910e13c00310b13db095", +export const IDENTITY_ACCOUNT_USERID: VDXFKeyInterface = { + "vdxfid": "iNKVUvr5GzdCHgybMauK11DdZZUyWE3pe3", + "indexid": "xT9bwjHA8JqrurrdDGZTyPkAbDVzR53C2o", + "hash160result": "93b62bfd8c861ac7a5aa3d3d9f618ccd8c04b5ce", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iNRCZp7JBDHbpKQ2Vhc6TK97hUSRPG4jaX" + "name": "vrsc::identity.account.userid" } } -export const IDENTITYDATA_DRIVINGLICENCE_CROPPED_FRONT: VDXFKeyInterface = { - "vdxfid": "i87ecHwJRUhAA2WaW9FtVotnEWx3BAt7Y8", - "indexid": "xCwm56NPGnupnCPcMpv3UCRKGAy43NWsQw", - "hash160result": "78d9f3f3ccdbf650adb03eb0482273cf51e2e532", +export const IDENTITY_ACCOUNT_CREATEDAT: VDXFKeyInterface = { + "vdxfid": "i42uTbJmVBcPacY3Ak1g95LBg5rBBntQby", + "indexid": "x8s1vPjrLVq4CnR52Rfq7TrihjsBzxAEic", + "hash160result": "c40b12b14582c976e67a2e5992b0fdf67fb21f06", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iK822dFQwW2Y5tdpSpxQtHQemf47HoFxqs" + "name": "vrsc::identity.account.createdat" } } -export const IDENTITYDATA_DRIVINGLICENCE_CROPPED_BACK: VDXFKeyInterface = { - "vdxfid": "iAPcY54xD3v1WC7zQatbbQnqJe4A6KUaex", - "indexid": "xFDizsW34N8g8N12GGYkZoKNLJ5AzeGTf7", - "hash160result": "b45cb25e26d152c9221f9719d696c18d8c0fdb4b", +export const IDENTITY_ACCOUNT_COMPLETEDAT: VDXFKeyInterface = { + "vdxfid": "iRJTZj7osY5EYA7pd7K3UcJVAApkvodDjZ", + "indexid": "xW8a2XYtirHuAKzrUnyCSzq2BpqmpCnnHQ", + "hash160result": "c568b6e1f734f5dc9b754e5932ebdb63f2606bef", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iCvxKVHbnbwHGZDTaGofeyyJLjsGBSZr7A" + "name": "vrsc::identity.account.completedat" } } -export const IDENTITYDATA_DRIVINGLICENCE_FACE: VDXFKeyInterface = { - "vdxfid": "i9fwBhdsQduiAWhG99wxXwnCRmRXJrbcG4", - "indexid": "xEW3eW4xFx8NngaHzqc7WLJjTRSYDHiUc7", - "hash160result": "834ec04a48c045a0814985a32f02d3125728f943", +export const IDENTITY_ACCOUNT_PREVIOUSATTEMPTID: VDXFKeyInterface = { + "vdxfid": "iGU6RCWyjU1sscCPLN77XhTESJ21JCTNxF", + "indexid": "xMJCszx4anEYVn5RC3mGW5ymTx32EBfaqs", + "hash160result": "50c2b12bb483802d14beae3c6b7454c6ecc0848e", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iPrxPJC6NbzWnkNyLSvwa8AVrwJWBUV9mM" + "name": "vrsc::identity.account.previousattemptid" } } -export const IDENTITYDATA_DRIVINGLICENCE_IDNUMBER: VDXFKeyInterface = { - "vdxfid": "i5JGvSuGVEb9xgNb9ezTTJ8zucrp75Ac98", - "indexid": "xA8PPFLMLYoparFd1LecRgfXwGsq32EUV4", - "hash160result": "26fae70b9b3ea6cb14ca10c9620dc04899faff13", +export const IDENTITY_ACCOUNT_SHAREABLEURL: VDXFKeyInterface = { + "vdxfid": "i92YkV3FVGZfp5Ep3j1sfQUgqUS37M9v82", + "indexid": "xDrfDHULLanLSF7quQg2do1Ds8T3yGCRw3", + "hash160result": "52e9f990e5e89cc1088acd29a2fda0ef140ae73c", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iJdUp47SVEzGEHCvoRyix2xufRsAeWSyxa" + "name": "vrsc::identity.account.shareableurl" } } -export const IDENTITYDATA_DRIVINGLICENCE_CATEGORY: VDXFKeyInterface = { - "vdxfid": "i5xXPRL3h45Zf2jErvDwD18DeDzGFRaACg", - "indexid": "xAndrDm8YNJEHCcGibt6BPekft1H9NjSHE", - "hash160result": "5d77333ae97ba2324126925bc54e06513adc3b1b", +export const IDENTITY_ACCOUNT_TEMPLATEID: VDXFKeyInterface = { + "vdxfid": "iL5diuVsHAG5DLVeyc8XYdEXR6fFro5G7s", + "indexid": "xQukBhvx8UUjqWNgqHngX1m4SkgGhnybh1", + "hash160result": "37ef653fe6685fca132d77834384702f6cd225b6", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "i9MqRfXPAiYwv9q4iSjTtXquNCCZ1GgECn" + "name": "vrsc::identity.account.templateid" } } -export const IDENTITYDATA_DRIVINGLICENCE_EXPIRATIONDATE: VDXFKeyInterface = { - "vdxfid": "iPUSmAtyyTsYNiDppDK8c4rkUjXyiDTm5D", - "indexid": "xUJZDyL4pn6Czt6rftyHaTPHWPYzXZS1No", - "hash160result": "6e6e96148a0314aaeecdfaed9a474150e09d5edb", +export const IDENTITY_ACCOUNT_TEMPLATEVERSION: VDXFKeyInterface = { + "vdxfid": "i7eBZNzKrgFov6c2Sx2QecyEmPq2Mc4BGe", + "indexid": "xCUJ2BRQhzUUYGV4JdgZd1Vmo3r39BsUym", + "hash160result": "e6e490ce8bfde333ab0374880ea0efbb9c12b42d", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iNgDKviLAeeV65eBztuduckUMDE2erB7jj" + "name": "vrsc::identity.account.templateversion" } } -export const IDENTITYDATA_DRIVINGLICENCE_ISSUING_COUNTRY_MATCHED: VDXFKeyInterface = { - "vdxfid": "iGvEHvVEiQJzUQXacJsPAt5oE5ufWpA5rB", - "indexid": "xMkLkivKZiXf6aQcTzXY9GcLFjvgMyaUmx", - "hash160result": "e4fb439a302b423d65dbccee97fdbd6757247693", +export const IDENTITY_ACCOUNT_STATUS: VDXFKeyInterface = { + "vdxfid": "iJf3EbihEtdEpJjbQ6PgUaL3GxDgZRzSWk", + "indexid": "xPV9hQ9n6CquSUcdFn3qSxraJcEhVfWa72", + "hash160result": "d6fc5578c2fbed3251f3aa250c73b58386ec86a6", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iFgXmTd9Wi2sqZyPqaoejdHG2sMaJWLrEX" + "name": "vrsc::identity.account.status" } } -export const IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION: VDXFKeyInterface = { - "vdxfid": "iJL72hPk4rFyEmBfdsHJGBUyKMJRrqcR9t", - "indexid": "xPADVVppvAUdrw4hVYwTEa1WM1KSjZsjUc", - "hash160result": "76a99a38988e107e418f24f32d1080f93930f2a2", +export const IDENTITY_PHONENUMBER: VDXFKeyInterface = { + "vdxfid": "iAQY8o4HwupzcJAw9aBtFwgrvWZGQStkge", + "indexid": "xFEebbVNoE3fEU3y1Fr3ELDPxAaHE7V2kN", + "hash160result": "32bc2c7919f626c39679630ee4d6d6d07bcd074c", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL" + "name": "vrsc::identity.phonenumber" } } -export const IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH: VDXFKeyInterface = { - "vdxfid": "iC88nTf9EzCKt2CnkudSRcu7yxNiA16c9G", - "indexid": "xGxFFG6E6JQzWC5pcbHbQ1Rf1cPj1kEyFH", - "hash160result": "f55e5a3f98219f06eb0b4b31a935ff1721e8dd5e", +export const IDENTITY_DATEOFBIRTH: VDXFKeyInterface = { + "vdxfid": "iSZsa7C4esogN3W6fBngUHR6GvSmt7We4j", + "indexid": "xXPz2ud9WC2LzDP8WsSqSfwdJaTnqpHdND", + "hash160result": "ab74371e952a27f615b079d3c084b38b98c84dfd", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iQhjETQvSkadciDPy69QZNy3hSczWQ4iu4" + "name": "vrsc::identity.dateofbirth" } } -export const IDENTITYDATA_DRIVINGLICENCE_ADDRESS: VDXFKeyInterface = { - "vdxfid": "iK8RX6S9uzcnUoVPeLigNt4Cu156zEpodu", - "indexid": "xPxXytsEmJqT6yNRW2NqMGajvf67xnbJFY", - "hash160result": "7fcee36de098accefe0f473da0b06914c9c1b4ab", +export const IDENTITY_OVER18: VDXFKeyInterface = { + "vdxfid": "iHPD8vB7jhtbuqPkUqzheqcZdfAfHUFVzM", + "indexid": "xNDKbicCb27GY1GnLXerdE96fKBg9tLUDT", + "hash160result": "28139ce1eae370e76f749066f778466597689098", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iGebr2v1TgkWvsyLjs1dQ5SqffqKL8rNm3" + "name": "vrsc::identity.over18" } } -export const IDENTITYDATA_DRIVINGLICENCE_STREET1: VDXFKeyInterface = { - "vdxfid": "iGNX6JaTu92GhPNBpbQkZ9Koro2W35GLjm", - "indexid": "xMCdZ71YkTEwKZFDgH4uXXrLtT3WwU1hvB", - "hash160result": "3e225a69f52b9bab5fee67ed7ed5d6c7d6da768d", +export const IDENTITY_OVER21: VDXFKeyInterface = { + "vdxfid": "iAXYYrZaipc4DAmAKXUFYZxavsf6uBJqaj", + "indexid": "xFMf1ezfa8piqLeCBD8QWxV7xXg7mxMc1Z", + "hash160result": "7a1fee70ace1c048c0a93c120a8a4c5f890f5b4d", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + "name": "vrsc::identity.over21" } } -export const IDENTITYDATA_DRIVINGLICENCE_CITY: VDXFKeyInterface = { - "vdxfid": "i7eLwQmDNfc64xc4Qm7AnSsaa1BwCdhTSK", - "indexid": "xCUTQDCJDypkh8V6GSmKkqQ7bfCx41No4i", - "hash160result": "d69209a7ac10320134b836872b7cd7ad10e7bb2d", +export const IDENTITY_OVER25: VDXFKeyInterface = { + "vdxfid": "iDuForPTZFeFBAgDX1HyrP3d6of7wzrRaS", + "indexid": "xJjNGepYQZruoLZFNgx8pmaA8Tg8qSfnzM", + "hash160result": "2a1e6fa6913ea3659dcaf1c5bc20a96e399d5e72", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + "name": "vrsc::identity.over25" } } -export const IDENTITYDATA_DRIVINGLICENCE_REGION: VDXFKeyInterface = { - "vdxfid": "iKtdJHgdvUJ4vxSxr86cNcaj8Zq4KCZJJh", - "indexid": "xQijm67imnWjZ8KzhokmM17GADr5GSTj4A", - "hash160result": "f88b44fa9b07a70cd77a9831e89e80505fe410b4", +export const IDENTITY_ACCOUNT_REQUESTING_IPADDRESS: VDXFKeyInterface = { + "vdxfid": "i4uE1EvnDbq9WGhF5UbBr6fbxNLsgk1eZ3", + "indexid": "x9jLU3Ms4v3p8SaGwAFLpVC8z2MtYJTVwp", + "hash160result": "05a3aa58192812972a2c4e4184af7bb5fbf9a30f", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" + "name": "vrsc::identity.account.requesting.ipaddress" } } -export const IDENTITYDATA_DRIVINGLICENCE_POSTCODE: VDXFKeyInterface = { - "vdxfid": "i3oy6rsBBWtJ11ZNHvyFPHERK9BGQtQod1", - "indexid": "x8e5ZfJG2q6xdBSQ9cdQMfkxLoCHEubx1i", - "hash160result": "9d7bfbe011ca5889ed8e47a1b2a0320c9654ad03", +export const IDENTITY_EMAIL: VDXFKeyInterface = { + "vdxfid": "iJ4pq4DCymfbu8SAuXyNhasLeSHFNKPr23", + "indexid": "xNtwHreHq5tGXJKCmDdXfyPsg6JGHUY6X1", + "hash160result": "15a8095b6298bbff5147060d9a6363a9df6c0ea0", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" + "name": "vrsc::identity.email" } } -export const IDENTITYDATA_DRIVINGLICENCE_COUNTRY: VDXFKeyInterface = { - "vdxfid": "iMZemCqP6BFZzxTA9AG34ghv4HaiFiS6E6", - "indexid": "xSPmE1GTwVUEd8LBzqvC35ET5wbj7m7HY8", - "hash160result": "546fdf34874119f799b1f8b0014a6cd467766ac6", +export const IDENTITY_NATIONALITY: VDXFKeyInterface = { + "vdxfid": "iEUYNTkw6kFhZWto7vyTpQqtdRL7eoKZY2", + "indexid": "xKJeqGC1x4UNBgmpycdcnoNRf5M8btexbt", + "hash160result": "db935713b90281d6aefe5e7b33e5b660962aaa78", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" + "name": "vrsc::identity.nationality" } } -export const IDENTITYDATA_DRIVINGLICENCE_MATCHED: VDXFKeyInterface = { - "vdxfid": "i5bAVLDcVEzbs6Awo2REXhHTjx34u9bEGC", - "indexid": "xARGx8ehLZDGVG3yei5PW5ozmc45h9ZyZa", - "hash160result": "d85c4cc4be13249bec299fde232bbcf323ae3117", +export const IDENTITY_FIRSTNAME: VDXFKeyInterface = { + "vdxfid": "iLB8SG7ErJtTYcG1f4w9RLuMJPpAsjFkiL", + "indexid": "xR1Eu4YKhd78An93WkbJPjRtL3qBprmMno", + "hash160result": "0bab76359b70b37c858399c2a3776939c5de2fb7", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk" + "name": "vrsc::identity.firstname" } } -export const IDENTITYDATA_DRIVINGLICENCE_NAME_MATCHED: VDXFKeyInterface = { - "vdxfid": "i97PqFTkPLKX4R22g27qk7TFdYbLk55fVf", - "indexid": "xDwWJ3tqEeYBgau4XhmziVynfCcMdnsQJP", - "hash160result": "f64f980f5bcde38d71bf6dfdde151c4ecaacd13d", +export const IDENTITY_MIDDLENAME: VDXFKeyInterface = { + "vdxfid": "iHG6ALRUPyRcgJMsPqBmvUCZxe4PrMfgej", + "indexid": "xN6Cd8rZFHeHJUEuFWqvtrj6zJ5QjX94j5", + "hash160result": "b98bd82034ec86ae5538313c9f5501c086ac3797", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iKCFQYZudPChh6jypSpcgENoQb5WeX5wHv" + "name": "vrsc::identity.middlename" } } -export const IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH_MATCHED: VDXFKeyInterface = { - "vdxfid": "iCkJW6AjbtNLTjf4boPPHXpiujRZa9KSeP", - "indexid": "xHaQxtbpTCb15uY6TV3YFvMFwPSaWD2Xv2", - "hash160result": "3261fc33de15f3cedc3a4a4f8c3638144cfeb465", +export const IDENTITY_LASTNAME: VDXFKeyInterface = { + "vdxfid": "iKRmfy4xgjWQyPdXYie6dJezRXF4aKdbHB", + "indexid": "xQFt8mW3Y3j5bZWZQQJFbhBXTBG5S4vdaZ", + "hash160result": "6b597e0c05d1430566b7b17a59da683fb4a6fcae", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.drivinglicence" - }, - "bounddata": { - "vdxfkey": "iMUfUShqVwWrGSx6HvZcDJwHywiLW5Zusb" + "name": "vrsc::identity.lastname" } } -export const IDENTITYDATA_SELFIECHECK_SUCCESS: VDXFKeyInterface = { - "vdxfid": "i6cbKQVGd1upW3uCQAhvUf7PzFgcoFyH3S", - "indexid": "xBShnCvMUL8V8DnEFrN5T3dw1uhdgNupLp", - "hash160result": "c0b5f21d131d3a18be6c3a1b5442197cb4f26e22", +export const IDENTITY_GENDER: VDXFKeyInterface = { + "vdxfid": "iShgSBdiYDQnVwgNcDnSbNYHGU6CTwBDb1", + "indexid": "xXXntz4oPXdT87ZQTuSbZm4pJ87DGEgHpG", + "hash160result": "3baee594e927d47b641c7cf3927ab3229dd0c7fe", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.selfiecheck.success" + "name": "vrsc::identity.gender" } } -export const IDENTITYDATA_SELFIECHECK_IMAGE: VDXFKeyInterface = { - "vdxfid": "i9oYuguYwqLhXN1y4afj6vYjaWmzuWtuZU", - "indexid": "xEdfNVLdo9ZN9XtzvGKt5K5GcAo1jKrFH7", - "hash160result": "dacb095d88ab704ac181d701a7fcdf20e0e36945", +export const IDENTITY_HEIGHT: VDXFKeyInterface = { + "vdxfid": "iLmLmsFMTUm4dd2iMuMe4xaMC8VSZN9soP", + "indexid": "xRbTEfgSJnyjFnukDb1o3M6tDnWTSUiii7", + "hash160result": "e80652253fa52b95cd9ea5ff43d51642ea4fa8bd", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.selfiecheck.image" + "name": "vrsc::identity.height" } } -export const IDENTITYDATA_SELFIECHECK_VIDEO: VDXFKeyInterface = { - "vdxfid": "iGQGK7d1Wdfq9ERxmNXD5fjH7v5SUHxZ9K", - "indexid": "xMENmv46MwtVmQJzd4BN44Fp9a6TKf2CyG", - "hash160result": "5a4b0ee7c8e2f91d641d3e18b35343ee8a59cb8d", +export const IDENTITY_EYECOLOR: VDXFKeyInterface = { + "vdxfid": "iRo2XT8tcMtLTpuPJ6V5WxbnVWa2CrcdsJ", + "indexid": "xWd8zFZyTg715znR9n9EVM8KXAb328xGbZ", + "hash160result": "c60fdfcc04173f273aa92a3b1844964b368ad2f4", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.selfiecheck.video" + "name": "vrsc::identity.eyecolor" } } -export const IDENTITYDATA_SELFIECHECK_DRIVINGLICENCE_MATCH: VDXFKeyInterface = { - "vdxfid": "iLGaXTpb8baibivmJL2yVvX259ir3tewjx", - "indexid": "xR6gzGFfyuoPDtooA1h8UK3Z6ojrxc8Jyf", - "hash160result": "19b7f38204fa54f56f62b7b67275ff4c84ba37b8", +export const IDENTITY_ETHNICITY: VDXFKeyInterface = { + "vdxfid": "i9jHPJokwnLoCQ83P6jqezCcEZUD1g34B9", + "indexid": "xEZPr7Eqo6ZTpa15EnPzdNj9GDVDsfToki", + "hash160result": "0476d568a9cf949bc8b6d84dc73e38cf85449b44", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.selfiecheck.drivinglicence.match" + "name": "vrsc::identity.ethnicity" } } -export const IDENTITYDATA_KYC_SUCCESS: VDXFKeyInterface = { - "vdxfid": "iJbbE37yKagBMCvoYPMnkKd3P6eTTGv1Qd", - "indexid": "xPRhgqZ4AttqyNoqQ51wii9aQkfUKWhnpJ", - "hash160result": "1a1bebe6bade7b23cb555a5d1c65f5d2d8f6dfa5", +export const IDENTITY_WEIGHT: VDXFKeyInterface = { + "vdxfid": "iMzGK44r6SNkzi3N3AmcZBtuysPvgYiRiT", + "indexid": "xSpNmrVvwkbRcsvPtrRmXaRT1XQwXFe2Ut", + "hash160result": "8abe0e94cb1ff345f1351720acc8eefed91e12cb", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.kyc.success" + "name": "vrsc::identity.weight" } } -export const IDENTITYDATA_KYC_ADDRESS_MATCHED: VDXFKeyInterface = { - "vdxfid": "iP8T2Li3giM7MCJRMw65tajQ2ydx4kW7m6", - "indexid": "xTxZV998Y2ZmyNBTDckEryFw4dexvb7HLT", - "hash160result": "0f7b56de7b92854cffb85f278ca8f7b70a8496d7", +export const IDENTITY_HOMEADDRESS: VDXFKeyInterface = { + "vdxfid": "i9A1fD5sVwFFXzEmCJWSRDqN94PXp9oNaS", + "indexid": "xDz881WxMFTvAA7o3zAbPcMuAiQYiT4Vnc", + "hash160result": "072a3abed3a353e001288074d9426285e569503e", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.kyc.address.matched" + "name": "vrsc::identity.homeaddress" } } -export const IDENTITYDATA_KYC_TYPE: VDXFKeyInterface = { - "vdxfid": "iN4C7XtyceBJrNcqAs3dZ3T2DA4vycpUYM", - "indexid": "xStJaLL4TxPyUYVs2YhnXRyZEp5wrpthtP", - "hash160result": "79da13c496750b37d4804e85094e5d0b8f47d0cb", +export const IDENTITY_HOMEADDRESS_STREET1: VDXFKeyInterface = { + "vdxfid": "i5BJAwQbrP4Bht8gUpoqSrovuBwfRc6jiv", + "indexid": "xA1QdjqghhGrL41iLWTzRFLTvqxgNsVzXY", + "hash160result": "ff22b196e64c9388daab76a57bcaea50491cae12", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.kyc.type" + "name": "vrsc::identity.homeaddress.street1" } } -export const IDENTITYDATA_KYC_NAME_MATCHED: VDXFKeyInterface = { - "vdxfid": "i69dDR9m6JB8bYvT1PbfsVEKiWPZYNgD1E", - "indexid": "xAyjgDaqwcPoDioUs5FpqskrkAQaRi64Pv", - "hash160result": "bf852464c1379ab65e5bb2646bbbb19ee84c551d", +export const IDENTITY_HOMEADDRESS_STREET2: VDXFKeyInterface = { + "vdxfid": "iMx71C14hrBoWD3yyhYChmhJEw4Kqw1zj4", + "indexid": "xSnDTzS9ZAQU8Nw1qPCMgADqGb5Lgqb4zw", + "hash160result": "efdda473a6a9e98cd91b02d36bfeb5dec784a9ca", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.kyc.name.matched" + "name": "vrsc::identity.homeaddress.street2" } } -export const IDENTITYDATA_KYC_DATEOFBIRTH_MATCHED: VDXFKeyInterface = { - "vdxfid": "iHfdYydzo83X6Y6y66N4n8UvcFTLQSmj9Y", - "indexid": "xNVk1n55eSGBihyzwn2DkX1TduUMHqN49h", - "hash160result": "f26bc9aa3851d21c679d521f60722045c571ab9b", +export const IDENTITY_HOMEADDRESS_CITY: VDXFKeyInterface = { + "vdxfid": "i75ZpW5T6wgQEMVxyvqHT9ZaV4fjsQ7kws", + "indexid": "xBugHJWXxFu4rXNzqcVSRY67WigkoCUEUQ", + "hash160result": "fcae40d5d327f13dc0e0c1e80f3db212a4ed8827", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.kyc.dateofbirth.matched" + "name": "vrsc::identity.homeaddress.city" } } -export const IDENTITYDATA_KYC_IDNUMBER_MATCHED: VDXFKeyInterface = { - "vdxfid": "iJQ5KQrVCkHAKRfmBRa6TuMxW8ZfHKuiMS", - "indexid": "xPEBnDHa44VpwbYo37EFSHtVXnag7ePNwv", - "hash160result": "94abb5b38f44545c981134f44db4d6395c6cb2a3", +export const IDENTITY_HOMEADDRESS_REGION: VDXFKeyInterface = { + "vdxfid": "iRkYck3JowdFWmrM6VUAS8Wtpmxds2fLXS", + "indexid": "xWaf5YUPfFqv8wjNxB8KQX3RrRyenbioh5", + "hash160result": "fa06b90a547658a3efc3cd1797d6b3cd30695af4", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.kyc.idnumber.matched" + "name": "vrsc::identity.homeaddress.region" } } -export const IDENTITYDATA_KYC_PHONENUMBER_MATCHED: VDXFKeyInterface = { - "vdxfid": "iBFp1jupLByoSLJaZWz2gg3v2GipUFoADv", - "indexid": "xG5vUYLuBWCU4WBcRCeBf4aT3vjqNDUWJY", - "hash160result": "7c59b8b820c001d0b361ca67a99c45677c705955", +export const IDENTITY_HOMEADDRESS_POSTCODE: VDXFKeyInterface = { + "vdxfid": "iAL2FRG8PVi18fN8MatjXhV1YkuZr7PM4T", + "indexid": "xFA8iDhDEovfkqFADGYtW61YaQvahtrhJA", + "hash160result": "b4f4c3a08fdcf32209482fa3d8c7b01201312d4b", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.kyc.phonenumber.matched" + "name": "vrsc::identity.homeaddress.postcode" } } -export const IDENTITYDATA_KYC_AREACODE_MATCHED: VDXFKeyInterface = { - "vdxfid": "i7GX7K3sGs227Vf4NEJe3QKxruuUyqFFzp", - "indexid": "xC6da7Ux8BEgjfY6Duxo1nrVtZvVsySF4F", - "hash160result": "4ae70956a849099e8fd2bf0a9b5daa8fd43d9b29", +export const IDENTITY_HOMEADDRESS_COUNTRY: VDXFKeyInterface = { + "vdxfid": "iABYGvas6uUDk9ejCkfCVLvE9PPJXgyCKX", + "indexid": "xF1ejj1wxDgtNKXm4SKMTjSmB3QKL8LhQG", + "hash160result": "bafb2cb6d5cc86478622feb8a00097d71d839249", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.kyc.areacode.matched" + "name": "vrsc::identity.homeaddress.country" } } -export const IDENTITYDATA_RISKCHECK_STATUS: VDXFKeyInterface = { - "vdxfid": "i3b3wvsNm5JaMUoV21Y7maVx85BJ2B8xTF", - "indexid": "x8RAQjJTcPXEyegWshCGjy2V9jCJtGhaAq", - "hash160result": "1de1fb500f5c4594a322e249949bc289d9f73b01", +export const IDENTITY_IDNUMBER_VALUE: VDXFKeyInterface = { + "vdxfid": "iQrnvbCNWMaG6PjTmeXzrcuAXKsMzmNJWA", + "indexid": "xVguPPdTMfnviZcVdLC9q1RhYytNuZ3ToS", + "hash160result": "72cf52b2f6b4f68173c933fb046e892870b990ea", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.riskcheck.status" + "name": "vrsc::identity.idnumber.value" } } -export const IDENTITYDATA_RISKCHECK_USERINTERACTIONS: VDXFKeyInterface = { - "vdxfid": "iEGi5rmUzAmnfutUCPp2dS34rSEk1DrevE", - "indexid": "xK6pYfCZqUzTJ5mW45UBbpZbt6FkuN8K7e", - "hash160result": "b0fef6f09eb8a36672e8b15313574b298f486d76", +export const IDENTITY_IDNUMBER_TYPE: VDXFKeyInterface = { + "vdxfid": "iSSZX5yUdQh7zLf1gUewH5rVfbXtSq2c4s", + "indexid": "xXGfytQZUiuncWY3YAK6FUP2hFYuQ4yYwW", + "hash160result": "2807f356d687b4c6208ce0379b31043c7fcdebfb", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.riskcheck.userinteractions" + "name": "vrsc::identity.idnumber.type" } } -export const IDENTITYDATA_RISKCHECK_FRAUDRINGOK: VDXFKeyInterface = { - "vdxfid": "i8MQDH1wrdWCf5rTRznhC5ijRy188i1kYU", - "indexid": "xDBWg5T2hwisHFjVHgSrAUFGTd291gaveW", - "hash160result": "7754803c155ad687f4376285828dcda68db07f35", +export const IDENTITY_VERIFICATION_STATUS: VDXFKeyInterface = { + "vdxfid": "i8MhqW3ejupmV1M5UyhyhG13dkS8A7g7zg", + "indexid": "xDBpJJUjbE3S7BE7LfN8feXafQT92YQZPm", + "hash160result": "47f2864de74ffe01ccb7eeabf0f2d848e3668e35", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.riskcheck.fraudringok" + "name": "vrsc::identity.verification.status" } } -export const IDENTITYDATA_RISKCHECK_BOTNOTDETECTED: VDXFKeyInterface = { - "vdxfid": "iSLcYw9ZcKnYJJTYvJYfk3jo3rjFHHPV7h", - "indexid": "xXAj1jaeTe1CvULamzCpiSGL5WkG8ZjCka", - "hash160result": "48835abfcd59557f6325f32773bbaf667bd6cbfa", +export const IDENTITY_VERIFICATION_APPROVALS: VDXFKeyInterface = { + "vdxfid": "iBMkZtqC9yqVrFL4GfYtXckFpYAhRkE2mj", + "indexid": "xGBs2hGH1J4AURD68MD3W1GnrCBiJ3nRgG", + "hash160result": "a98801de1ba5ff5e571dbdde50519483140f7956", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.riskcheck.botnotdetected" + "name": "vrsc::identity.verification.approvals" } } -export const IDENTITYDATA_EMAIL_ISDELIVERABLE: VDXFKeyInterface = { - "vdxfid": "i8P6w5ypyh7byWTYAdTY3vHezomSBSznWB", - "indexid": "xDDDPtQuq1LGbgLa2K7h2JpC2TnT48N3FF", - "hash160result": "6b6d001cedc2852156e286c8d63ce4bf0119d235", +export const IDENTITY_VERIFICATION_APPROVALS_ACCEPTEDTOS: VDXFKeyInterface = { + "vdxfid": "iH32QkXBKyWEJD6kh9HJ4KMfeiWfPWoHEh", + "indexid": "xMs8sYxGBHitvNynYpwT2htCgNXgHt6VAW", + "hash160result": "bbe4c09ae069561d3c14b04e3b7b96c98622bf94", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.email.isdeliverable" + "name": "vrsc::identity.verification.approvals.acceptedtos" } } -export const IDENTITYDATA_EMAIL_BREACHCOUNT: VDXFKeyInterface = { - "vdxfid": "iBhchzsBh8zKXhCAquQ5mWPdFAM6mkGvix", - "indexid": "xGXjAoJGYTCz9s5Chb4EjtvAGpN7gnJjc6", - "hash160result": "ea91d5cb1ff8532c4e9c847228859e4014d13a5a", +export const IDENTITY_VERIFICATION_APPROVALS_VERIFIEDSMS: VDXFKeyInterface = { + "vdxfid": "iPgyMDFQ9QMNrqc3ckEBEubDNwLnvubUdW", + "indexid": "xUX5p1gUzia3V1V5URtLDJ7kQbMosPsVj8", + "hash160result": "72853b66aa158531e1f15b9ff075199a1224bddd", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.email.breachcount" + "name": "vrsc::identity.verification.approvals.verifiedsms" } } -export const IDENTITYDATA_EMAIL_FIRSTBREACHEDAT: VDXFKeyInterface = { - "vdxfid": "iKwvVd8mHF7phMqPJVQ32bHpYT7hFG14D8", - "indexid": "xQn2xRZr8ZLVKXiRAB4BzypMa78i5iPxyd", - "hash160result": "597919a7c88a513db2c9223f6948ca4f767eb0b4", +export const IDENTITY_VERIFICATION_APPROVALS_KYCCHECKED: VDXFKeyInterface = { + "vdxfid": "iRnbiA4dAPbeuB6KQN2donBHP9mKUHHFZf", + "indexid": "xWciAxVi1hpKXLyMG3gnnAhpQonLQapWPv", + "hash160result": "c6114ffec250b746bde117903b930d9a34d3bdf4", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.email.firstbreachedat" + "name": "vrsc::identity.verification.approvals.kycchecked" } } -export const IDENTITYDATA_EMAIL_LASTBREACHEDAT: VDXFKeyInterface = { - "vdxfid": "iNUujoAd6CCR9X4kBQZaV6o9mt3MDqsfHs", - "indexid": "xTK2CbbhwWR5mgwn36DjTVKgoY4N7JGP5y", - "hash160result": "ebbc28818ea68e09defb0b67c0a5882e75027dd0", +export const IDENTITY_VERIFICATION_APPROVALS_DOCUMENTSVERIFIED: VDXFKeyInterface = { + "vdxfid": "iBjML9DHV67MBQyMEHVTSoJPhU8DNeWRTE", + "indexid": "xGZTnweNLQL1oarP5y9cRBpvj89EGt5VSm", + "hash160result": "0a93883010769ff783be5ced074ecfa50dd08e5a", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.email.lastbreachedat" + "name": "vrsc::identity.verification.approvals.documentsverified" } } -export const IDENTITYDATA_EMAIL_DOMAIN_REGISTEREDAT: VDXFKeyInterface = { - "vdxfid": "i8jTA9VrLRrAmTNwCnQJg93ivmVN5GWcVX", - "indexid": "xDZZcwvwBk4qPdFy4U4TeXaFxRWNxA1Bqd", - "hash160result": "d8d1e9bd02ff4c40c805099613567531d04cab39", +export const IDENTITY_VERIFICATION_APPROVALS_SELFIECHECKED: VDXFKeyInterface = { + "vdxfid": "iKgeFKoy6WMx9MoEjig5vHoXbyxVFBPWDN", + "indexid": "xQWki8F3wpacmXgGbQLEtgL4ddyWC8UZLv", + "hash160result": "6a044306ef77ce9896ffcd26ee40174651b1ccb1", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.email.domain.registeredat" + "name": "vrsc::identity.verification.approvals.selfiechecked" } } -export const IDENTITYDATA_EMAIL_DOMAIN_FREEPROVIDER: VDXFKeyInterface = { - "vdxfid": "i8XPHcH1caNn6kQVxFERZG33ATxHfawrSB", - "indexid": "xDMVkQi6TtbSivHXovtaXeZaC7yJSskirY", - "hash160result": "a2c3c98d38df08384ed3d863895fd6c1ad136337", +export const IDENTITY_VERIFICATION_APPROVALS_WATCHLISTOK: VDXFKeyInterface = { + "vdxfid": "iFDB1qKYSrWMRaMCWX6hNGE8HVXB1cNtJu", + "indexid": "xL3HUdkdJAj23kEENCkrLekfK9YBymnLrX", + "hash160result": "e691a2d2af30df6ee21f0eb805a98e11d539ba80", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.email.domain.freeprovider" + "name": "vrsc::identity.verification.approvals.watchlistok" } } -export const IDENTITYDATA_EMAIL_DOMAIN_CUSTOM: VDXFKeyInterface = { - "vdxfid": "iE7HSAqMXwxtM6XxUDRLMBUUcWniEh9hRk", - "indexid": "xJwPtyGSPGBYyGQzKu5VKa11eAojBypGax", - "hash160result": "48b3f1d4988af1dd73b8ccf1e5b547a891f6a474", +export const IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK: VDXFKeyInterface = { + "vdxfid": "i9dva492S7vQphjLiK2UaS7JikZKs5TQsB", + "indexid": "xEU32ra7HS95SscNZzgdYpdqkQaLjnzcyC", + "hash160result": "6ffdbee07124450d29698724573bd6ab07d09743", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.email.domain.custom" + "name": "vrsc::identity.verification.approvals.riskcheckok" } } -export const IDENTITYDATA_EMAIL_DOMAIN_DISPOSABLE: VDXFKeyInterface = { - "vdxfid": "iBteZWnaYtBLRxQyNutN7eatZZ4ZpCAoin", - "indexid": "xGim2KDfQCQ148J1EbYX637RbD5aehG6fm", - "hash160result": "8bb328cc7630490b07742507e6cdb77290f0505c", +export const IDENTITY_VERIFICATION_APPROVALS_STATUS: VDXFKeyInterface = { + "vdxfid": "iKhGUcTH4ZQ7uiy933m8f1GbwSLcwJW8ev", + "indexid": "xQXNwQtMuscnXtrAtjRHdPo8y6MdomjAXM", + "hash160result": "00612f17d9cedc346fcd139c0c5b56e666efeab1", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.email.domain.disposable" + "name": "vrsc::identity.verification.approvals.status" } } -export const IDENTITYDATA_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS: VDXFKeyInterface = { - "vdxfid": "iHbaMpJAjVPgroTQYm6xwTqmVUnv4qh5mw", - "indexid": "xNRgpcjFaocMUyLSQSm7urNJX8ovwS8zbS", - "hash160result": "c95978851fbb34305351b4c465d7bdf59b1de79a", +export const IDENTITY_DRIVINGLICENCE: VDXFKeyInterface = { + "vdxfid": "iMYQw33ryywcNyQDjFjiVvFm2kAwG85poV", + "indexid": "xSNXPqUwqJAH19HFawPsUJnJ4QBxCATPNx", + "hash160result": "e2857ddcc4f3301c354a00d1376558a75e802ec6", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.email.domain.toplevel.suspicious" + "name": "vrsc::identity.drivinglicence" } } -export const IDENTITYDATA_IDCARD: VDXFKeyInterface = { - "vdxfid": "iJLpqieejHL8YncTbnhAW7cUTaMsfHdSGL", - "indexid": "xPAwJX5jabYoAxVVTUMKUW91VENtUTZwau", - "hash160result": "49b9d595086e85ce8fd4159995bbe350181715a3", +export const IDENTITY_DRIVINGLICENCE_ORIGINALFRONT: VDXFKeyInterface = { + "vdxfid": "i3fq6ET2dL8CxC3BJzdYTpUsjEsQaKP7bX", + "indexid": "x8VwZ2t7UeLsaMvDAgHhSD1QkttRPYndPW", + "hash160result": "26bab54e1f760b1abb888229a38a5179cc502302", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" + "name": "vrsc::identity.drivinglicence.originalfront" } } -export const IDENTITYDATA_IDCARD_ORIGINAL_FRONT: VDXFKeyInterface = { - "vdxfid": "iB7XpaW684q2BYjnqveLSKhSG9zwudnS6o", - "indexid": "xFweHNwAyP3goicphcJVQiDyHp1xo2uuYa", - "hash160result": "29f714a5b08b68b9046525c6c005a00a4d98c853", +export const IDENTITY_DRIVINGLICENCE_ORIGINALBACK: VDXFKeyInterface = { + "vdxfid": "i7LTNZvJmm5LjAwMWuryb52yKt7txaV5FW", + "indexid": "xCAZqNMPd5J1MLpPNbX8ZTZWMY8unxdAfs", + "hash160result": "c7b3e9a70908fafc8de3e81f6ac2e0c131c9592a", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iBrpt78Mdrqcc1RHwPWKYBALbNTC4cwdJQ" + "name": "vrsc::identity.drivinglicence.originalback" } } -export const IDENTITYDATA_IDCARD_ORIGINAL_BACK: VDXFKeyInterface = { - "vdxfid": "iH9K2ZhRcyJWbByyUyWsXh544SVhUSrVFt", - "indexid": "xMyRVN8WUHXBDMs1LfB2W5bb66WiNi4FtU", - "hash160result": "24585446879161aed3198273e81ea9a69080ef95", +export const IDENTITY_DRIVINGLICENCE_CROPPEDFRONT: VDXFKeyInterface = { + "vdxfid": "i8KsL3JJgbJyuqEyEbu5KZkDBFvHscLoM6", + "indexid": "xD9ynqjPXuXeY1816HZEHxGkCuwJoHBx54", + "hash160result": "7b28226a4f3eaae379cddbc84d037cfe587e3535", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iNRCZp7JBDHbpKQ2Vhc6TK97hUSRPG4jaX" + "name": "vrsc::identity.drivinglicence.croppedfront" } } -export const IDENTITYDATA_IDCARD_CROPPED_FRONT: VDXFKeyInterface = { - "vdxfid": "iR8r1t4mYfk8xqZmaNDra6TQrUsZjbGiKS", - "indexid": "xVxxUgVrPyxob1SoS3t1YUywt8tahdr3L4", - "hash160result": "2bc1abbdc2c25032842bc2354e857939cef599ed", +export const IDENTITY_DRIVINGLICENCE_CROPPEDBACK: VDXFKeyInterface = { + "vdxfid": "iRwumhx12vtT8CkspBLmKQY8WZywurxVXo", + "indexid": "xWn2EWP5tF77kNdufrzvHo4fYDzxhjXyZz", + "hash160result": "0b6edf21bfe119173b3fffab6118d79a39a580f6", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iK822dFQwW2Y5tdpSpxQtHQemf47HoFxqs" + "name": "vrsc::identity.drivinglicence.croppedback" } } -export const IDENTITYDATA_IDCARD_CROPPED_BACK: VDXFKeyInterface = { - "vdxfid": "iSM5GLZ1FvzGDNX62vgUgRQC43iaeKxoHK", - "indexid": "xXBBj8z67FCvqYQ7tcLdeovj5hjbbVdh5q", - "hash160result": "56fb7c2a25fc9646e588273ad379ad202e23e2fa", +export const IDENTITY_DRIVINGLICENCE_FACE: VDXFKeyInterface = { + "vdxfid": "i5i7U4EAbgPzhCRebtbmoZt6pTyqGqP8jj", + "indexid": "xAYDvrfFSzcfKNJgTaFvmxQdr7zr6oGgFh", + "hash160result": "1f47647bf3e71f0c1c2638c99e6a42e6bf118218", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iCvxKVHbnbwHGZDTaGofeyyJLjsGBSZr7A" + "name": "vrsc::identity.drivinglicence.face" } } -export const IDENTITYDATA_IDCARD_FACE: VDXFKeyInterface = { - "vdxfid": "i51M1ZmuPqEZDcC5KJbz6F9XYVacoyBE2X", - "indexid": "x9qTUNCzF9TDqn57AzG94dg4a9bdgabnve", - "hash160result": "77d6aa5baa62d04f8cb7d8fe899bcdebfb51cc10", +export const IDENTITY_DRIVINGLICENCE_IDNUMBER: VDXFKeyInterface = { + "vdxfid": "iBCA8b4zS5ygVgTFqxabke7BBFs92dhcXQ", + "indexid": "xG2GbPW5HQCM7rLHheEkj2diCut9vgFhM2", + "hash160result": "fcf0571278bd1afce6d93f0a99f41437bb91a854", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iPrxPJC6NbzWnkNyLSvwa8AVrwJWBUV9mM" + "name": "vrsc::identity.drivinglicence.idnumber" } } -export const IDENTITYDATA_IDCARD_IDNUMBER: VDXFKeyInterface = { - "vdxfid": "i5bnW5iRQbCtg21NLNybykc6ArhxUwSnVh", - "indexid": "xARtxt9WFuRZJBtQC4dkx98dCWiyQpWVav", - "hash160result": "d525af458c62617e95f5fa1b70b6e36e08be4f17", +export const IDENTITY_DRIVINGLICENCE_CATEGORY: VDXFKeyInterface = { + "vdxfid": "i5Cm95DZa6FPP66bA6aFfoYL2jaojetHMp", + "indexid": "xA2sbseeRQU41Fyd1nEQeC4s4Pbpf63xB4", + "hash160result": "3b91fccdf59d99b21e442441b89abb31bf09f512", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iJdUp47SVEzGEHCvoRyix2xufRsAeWSyxa" + "name": "vrsc::identity.drivinglicence.category" } } -export const IDENTITYDATA_IDCARD_CATEGORY: VDXFKeyInterface = { - "vdxfid": "iESZ7w2LiZbcxEEWaD4BgVr4VKYkMn1dqk", - "indexid": "xKGfajTRZspHaQ7YRtiLetNbWyZmEdZbq1", - "hash160result": "36204ef98b988fa4ddad9a94d09bae40c7f54978", +export const IDENTITY_DRIVINGLICENCE_EXPIRATIONDATE: VDXFKeyInterface = { + "vdxfid": "iJvGpPoP1uUkUqn9bAchLyfaGWyy8JGQoX", + "indexid": "xPkPHCETsDhR71fBSrGrKNC7JAzz17RsLk", + "hash160result": "96aee63b3c6094a4d9edbc04b63a8e45688068a9", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "i9MqRfXPAiYwv9q4iSjTtXquNCCZ1GgECn" + "name": "vrsc::identity.drivinglicence.expirationdate" } } -export const IDENTITYDATA_IDCARD_EXPIRATIONDATE: VDXFKeyInterface = { - "vdxfid": "i8BCBwaioR3PSSgjRcWGx9RfFUCbVXNYxe", - "indexid": "xD1Jek1oejG44cZmHJARvXxCH8DcSWVK4B", - "hash160result": "e2187beb59c4815c0b4926bfa14e5d48657e9133", +export const IDENTITY_DRIVINGLICENCE_ISSUINGCOUNTRY: VDXFKeyInterface = { + "vdxfid": "iBsNEqysX64cQAjiRHHL1msd7LxroGM6Mb", + "indexid": "xGhUheQxNQHH2LckGxwUzAQA8zysfnKDSU", + "hash160result": "f2f24dd2383538493d21ff0aca77c7cd1fe6125c", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iNgDKviLAeeV65eBztuduckUMDE2erB7jj" + "name": "vrsc::identity.drivinglicence.issuingcountry" } } -export const IDENTITYDATA_IDCARD_ISSUING_COUNTRY_MATCHED: VDXFKeyInterface = { - "vdxfid": "i6ubxHFxwzxQU1zmBvLW1oYj6iozy3znSU", - "indexid": "xBjiR5h3oKB56Bso3bzezC5G8Nq1rhjRiV", - "hash160result": "96eb5b9e8921784e76c96e272b20f009d68ca625", +export const IDENTITY_DRIVINGLICENCE_ISSUINGREGION: VDXFKeyInterface = { + "vdxfid": "i6gZSDYpK9inexaeFQDSk9GuAmew1ymMFo", + "indexid": "xBWfu1yuATwTH8Tg75sbiXoSCRfwsxQzeR", + "hash160result": "67f4fd5c49250912aecf1eb8ab17f29d590a2f23", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iFgXmTd9Wi2sqZyPqaoejdHG2sMaJWLrEX" + "name": "vrsc::identity.drivinglicence.issuingregion" } } -export const IDENTITYDATA_IDCARD_ISSUING_REGION: VDXFKeyInterface = { - "vdxfid": "i4AFd1rzyfsmgTLgyn472E3gc2VBaw4uFK", - "indexid": "x8zN5pJ5pz6SJdDiqTiFzcaDdgWCSVW9s9", - "hash160result": "5d8fc30a870e94f5274d09d6c16e5d8795708307", +export const IDENTITY_DRIVINGLICENCE_DATEOFBIRTH: VDXFKeyInterface = { + "vdxfid": "iChWUsL1NQwDqcwXbFGxHiCegfquGPyadv", + "indexid": "xHXcwfm6Dj9tTnpZSvw7G6jBiKrvBUhwaw", + "hash160result": "3c7bd13bcdb54368e7590a9f2da5b201b7be2d65", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL" + "name": "vrsc::identity.drivinglicence.dateofbirth" } } -export const IDENTITYDATA_IDCARD_DATEOFBIRTH: VDXFKeyInterface = { - "vdxfid": "i48Nsi8VjHvSdW9MCB59vVF8AeoCSALbW6", - "indexid": "x8xVLWZaac97Fg2P3rjJtsmfCJpDMvuw4c", - "hash160result": "99acfcbf72a37bcfa3ccf9f3d8a60f60a3a92807", +export const IDENTITY_DRIVINGLICENCE_ADDRESS_STREET1: VDXFKeyInterface = { + "vdxfid": "i9xaEvSQ537wuYgcVPRgG3zop9bVzeDTBw", + "indexid": "xEnghisUvMLcXiZeM55qESXLqocWsv6zmJ", + "hash160result": "48dd1caf84c1a49209ca44064846dc4ad0be1e47", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iQhjETQvSkadciDPy69QZNy3hSczWQ4iu4" + "name": "vrsc::identity.drivinglicence.address.street1" } } -export const IDENTITYDATA_IDCARD_ADDRESS: VDXFKeyInterface = { - "vdxfid": "iHQjj4N8axeE24n8RctE8cQtSUdSoTFBMv", - "indexid": "xNErBroDSGrteEfAHJYP6zwRU8eTdJWVVZ", - "hash160result": "744a4f4b004c403c1d671053d717a36ecf5bda98", +export const IDENTITY_DRIVINGLICENCE_ADDRESS_CITY: VDXFKeyInterface = { + "vdxfid": "i6XMEh3jrxzdyoVYoNWhRSncR9oWSnmikd", + "indexid": "xBMThVUpiHDJbyNaf4ArPqK9SopXGndEyv", + "hash160result": "c1f3612774870d1f12320bff317e7790211d7121", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iGebr2v1TgkWvsyLjs1dQ5SqffqKL8rNm3" + "name": "vrsc::identity.drivinglicence.address.city" } } -export const IDENTITYDATA_IDCARD_ADDRESS_STREET1: VDXFKeyInterface = { - "vdxfid": "iKTakiCWF81oLmpY9nQD9pgQttsKyYBEYz", - "indexid": "xQHhDWdb6SETxwha1U4N8DCwvYtLoHXM2c", - "hash160result": "c284feffa60f1978b8f8551cbd6724ca795e54af", +export const IDENTITY_DRIVINGLICENCE_ADDRESS_REGION: VDXFKeyInterface = { + "vdxfid": "i7sPBSqerD23RAqfN167aYePjfC8LL34UA", + "indexid": "xChVeFGjhXEi3LihDgkGYwAvmKD9CsNunu", + "hash160result": "991d24c053cb59a816e161fe3af2f40a7f2e3330", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + "name": "vrsc::identity.drivinglicence.address.region" } } -export const IDENTITYDATA_IDCARD_ADDRESS_CITY: VDXFKeyInterface = { - "vdxfid": "iEwv5MTy2Dg5atRBc8bSTjMLDHsMLQzVDU", - "indexid": "xKn2Y9u3sXtkD4JDTpFbS7ssEwtNDGiHDg", - "hash160result": "bee2235466779e3ea61b5531b3aa396a0984d77d", +export const IDENTITY_DRIVINGLICENCE_ADDRESS_POSTCODE: VDXFKeyInterface = { + "vdxfid": "i9eHAmpeA3tmpsVeG5EkHuVfALFrmpzLqM", + "indexid": "xEUPdaFj1N7ST3Ng7ktuGJ2CBzGsZbja5V", + "hash160result": "f5905bbdf2eb60b24ccf6851716cc0efe801a943", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + "name": "vrsc::identity.drivinglicence.address.postcode" } } -export const IDENTITYDATA_IDCARD_ADDRESS_REGION: VDXFKeyInterface = { - "vdxfid": "i97JbWvVd6qSRXh8eqjZKG95dj2NeigvWF", - "indexid": "xDwR4KMaUR473haAWXPiHefcfP3PYf7uVw", - "hash160result": "4a74b6e17bea7b240dc8acd7f7e4a82fb34dcd3d", +export const IDENTITY_DRIVINGLICENCE_ADDRESS_COUNTRY: VDXFKeyInterface = { + "vdxfid": "i3xAMYBKLVdK89kuheXhTjuJTAxozmypj3", + "indexid": "x8nGpLcQBoqykKdwZLBrS8RqUpypqVUEV5", + "hash160result": "459844e00df4387514f31f182a88f7e13b0d3a05", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" + "name": "vrsc::identity.drivinglicence.address.country" } } -export const IDENTITYDATA_IDCARD_ADDRESS_POSTCODE: VDXFKeyInterface = { - "vdxfid": "iLhtE8EXXJ6ATCZ7xJzbvyJKRTYXUX4A7i", - "indexid": "xRXzgvfcNcJq5NS9ozekuMprT7ZYKa7cdy", - "hash160result": "556f2f620f185c90906aac53e60810665be700bd", +export const IDENTITY_SELFIECHECK_IMAGE: VDXFKeyInterface = { + "vdxfid": "iC22PxGqY7Mx3YT9kNrW1d11JNyGL56N8e", + "indexid": "xGr8rkhvPRacfiLBc4Wez1XYL2zHDDbJgD", + "hash160result": "c52d0023cce8c847a5097b6898f867651914b65d", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" + "name": "vrsc::identity.selfiecheck.image" } } -export const IDENTITYDATA_IDCARD_ADDRESS_COUNTRY: VDXFKeyInterface = { - "vdxfid": "iNxc7w91fgHgvRoNsifWYxHMFSJcrCuGss", - "indexid": "xTniaja6WzWMYbgQjQKfXLotH6Kdg4E8gT", - "hash160result": "0cab0e442caf58e660f32d2d36f8e64b12f3b9d5", +export const IDENTITY_SELFIECHECK_VIDEO: VDXFKeyInterface = { + "vdxfid": "iLfnRYzcdQXR6am8rZk7xNtTUbLZo5NLG6", + "indexid": "xRVttMRhUik5ikeAiFQGvmQzWFMajwrVzX", + "hash160result": "ac0674f6d656d434e0b5b310daaaed554c3a9bbc", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" + "name": "vrsc::identity.selfiecheck.video" } } -export const IDENTITYDATA_IDCARD_DOCUMENTVERIFICATION_MATCHED: VDXFKeyInterface = { - "vdxfid": "iMHhAMLCDnisJVbZpTzwdAjwQQobVtkP3e", - "indexid": "xS7od9mH56wXvfUbg9f6bZGUS4pcQztAYY", - "hash160result": "361025b8f50593f08f332b0cd227ade34dcf65c3", +export const IDENTITY_EMAIL_ISDELIVERABLE: VDXFKeyInterface = { + "vdxfid": "iN5Tdse8NSwuW6A4ZavHbHoDyD8aVjn1Ky", + "indexid": "xSua6g5DDmAa8G36RGaSZgKkzs9bSnFbCX", + "hash160result": "8194ee01a0bc66dca2af9ba7c3bba4a24da70dcc", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk" + "name": "vrsc::identity.email.isdeliverable" } } -export const IDENTITYDATA_IDCARD_NAME_MATCHED: VDXFKeyInterface = { - "vdxfid": "i3duYwSwdrLztnP43wuwiTfH9G5adxpZJm", - "indexid": "x8U21jt2VAZfWxG5uda6grBpAv6bc21iUD", - "hash160result": "11c10b7a91af6a813b1cc0f2945a63bf0435c601", +export const IDENTITY_EMAIL_BREACHCOUNT: VDXFKeyInterface = { + "vdxfid": "iDy1YKGhzVjAiMiuAvFDqxQbmLRhLEjwPo", + "indexid": "xJo817hnqowqLXbw2buNpLw8nzSiAygHhx", + "hash160result": "8144d2d8cafd733bb03847166be8493d275e1473", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iKCFQYZudPChh6jypSpcgENoQb5WeX5wHv" + "name": "vrsc::identity.email.breachcount" } } -export const IDENTITYDATA_IDCARD_DATEOFBIRTHMATCHED: VDXFKeyInterface = { - "vdxfid": "iPFTbFBXsM4df4BkNoMfFoHynxzKKkUqJv", - "indexid": "xU5a43ccifHJHE4nEV1pEBpWpd1LCCSSq8", - "hash160result": "ba6a81f6ea53e339ff4d8e2aa5c1d660aee6e9d8", +export const IDENTITY_EMAIL_FIRSTBREACHEDAT: VDXFKeyInterface = { + "vdxfid": "i3eSGR4wrLk5djHsnT18dDHrJBFSBBxVST", + "indexid": "x8UYjDW2hexkFuAue8fHbbpPKqGT4mjAzH", + "hash160result": "df796054181f57d3b61d655d604d42d6c6d8df01", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.idcard" - }, - "bounddata": { - "vdxfkey": "iMUfUShqVwWrGSx6HvZcDJwHywiLW5Zusb" + "name": "vrsc::identity.email.firstbreachedat" } } -export const IDENTITYDATA_PASSPORT: VDXFKeyInterface = { - "vdxfid": "i8oiYgB9L9WJWGJgpcrm68mvoq4KoTASNL", - "indexid": "xDdq1UcEBTiy8SBigJWv4XJTqV5LiS8drz", - "hash160result": "a7e8f210eb00dcc94038864f8c59b8403ccf793a", +export const IDENTITY_EMAIL_LASTBREACHEDAT: VDXFKeyInterface = { + "vdxfid": "iCuZWBzmxCoFcRFjXYFgC6g4jT7kzxvhew", + "indexid": "xHjfxzRroX1vEb8mPDuqAVCbm78ms8Hkhd", + "hash160result": "d1b421db4c835cfa67b491342c31f89283427567", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" + "name": "vrsc::identity.email.lastbreachedat" } } -export const IDENTITYDATA_PASSPORT_ORIGINAL_FRONT: VDXFKeyInterface = { - "vdxfid": "iQhPuQoj5PDXpF5XsA26PhnvbvBVHUCgtM", - "indexid": "xVXWNDEovhSCSQxZiqgFN6KTdaCWDq4RVw", - "hash160result": "942c2ac1a23d27ab82ea20072a31a3aba9c3c9e8", +export const IDENTITY_EMAIL_DOMAIN_REGISTEREDAT: VDXFKeyInterface = { + "vdxfid": "iGxV4SBRZMk5qWrQEKgUS4RoqzpDmyBEpC", + "indexid": "xMnbXEcWQfxkTgjS61LdQSxLseqEcTADNA", + "hash160result": "e195ef220f8e71bfa7bef160291ecaa0164de393", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iBrpt78Mdrqcc1RHwPWKYBALbNTC4cwdJQ" + "name": "vrsc::identity.email.domain.registeredat" } } -export const IDENTITYDATA_PASSPORT_ORIGINAL_BACK: VDXFKeyInterface = { - "vdxfid": "iHZRBTVpGXBpq1D3JQvB37HwwC81UVaEBt", - "indexid": "xNPXeFvu7qQVTB65A6aL1VpUxr92J21Y2e", - "hash160result": "0b0574e283da6e3dd272ca2f7088634d309f7e9a", +export const IDENTITY_EMAIL_DOMAIN_FREEPROVIDER: VDXFKeyInterface = { + "vdxfid": "iLUfvKcg92CYo3BvCuRf5o844d44kGLhJL", + "indexid": "xRJnP83kzLRDRD4x4b5p4Beb6H55fetTy7", + "hash160result": "0b0f213c88a1b0df6cd01721955b1d0c103981ba", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iNRCZp7JBDHbpKQ2Vhc6TK97hUSRPG4jaX" + "name": "vrsc::identity.email.domain.freeprovider" } } -export const IDENTITYDATA_PASSPORT_CROPPED_FRONT: VDXFKeyInterface = { - "vdxfid": "iGsEp6i4xXh4gNizJgWEoiCwZxzPsuPvnJ", - "indexid": "xMhMGu99oqujJYc2ANAPn6jUbd1Qimj8Dp", - "hash160result": "c26f63c41583bbf9fb1fb6eb714c87c71054e592", +export const IDENTITY_EMAIL_DOMAIN_CUSTOM: VDXFKeyInterface = { + "vdxfid": "i4FSBFpQ6Ccjiy2g61GrxhBppv1jDDh6on", + "indexid": "x95Ye4FUwWqQM8uhwgw1w5iMra2k7F1Lfz", + "hash160result": "bea1175185aeaf256aa7f04795b2c8d0c8547e08", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iK822dFQwW2Y5tdpSpxQtHQemf47HoFxqs" + "name": "vrsc::identity.email.domain.custom" } } -export const IDENTITYDATA_PASSPORT_CROPPED_BACK: VDXFKeyInterface = { - "vdxfid": "iHfLky17R6QTL1tkhN4YzjigfaNKFMXJwg", - "indexid": "xNVTDmSCGQd7xBmnZ3ihy8FDhEPLApagju", - "hash160result": "b49b18cb2d18cabafd16b138f6de43b1136d9d9b", +export const IDENTITY_EMAIL_DOMAIN_DISPOSABLE: VDXFKeyInterface = { + "vdxfid": "i52PJxRyjKAEkmQFd2oGYgZV3pcsQUcD1T", + "indexid": "x9rVmks4adNuNwHHUiTRX5625UdtJPBQ1w", + "hash160result": "3adf98cb5cc90a074a52a651c50f67f5f0a7fe10", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iCvxKVHbnbwHGZDTaGofeyyJLjsGBSZr7A" + "name": "vrsc::identity.email.domain.disposable" } } -export const IDENTITYDATA_PASSPORT_FACE: VDXFKeyInterface = { - "vdxfid": "iGvZEAbQPV74x8zimmH857Eyug1YYG6da8", - "indexid": "xMkfgy2VEoKjaJskdSwH3VmWwL2ZPGWyYL", - "hash160result": "c1b64e1b1d902fce4bca08951958ae30c3f28593", +export const IDENTITY_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS: VDXFKeyInterface = { + "vdxfid": "iCtAZWinafiyf4tmvPxFkKNn5KxayXTPSV", + "indexid": "xHiH2K9sRyweHEmon5cQihuK6yybre797b", + "hash160result": "85477eb8148562614c396ca64fc7563637b13167", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iPrxPJC6NbzWnkNyLSvwa8AVrwJWBUV9mM" + "name": "vrsc::identity.email.domain.toplevel.suspicious" } } -export const IDENTITYDATA_PASSPORT_IDNUMBER: VDXFKeyInterface = { - "vdxfid": "iRYCG1nfoPiuZFKqbsugCgi317aY2ErtkM", - "indexid": "xWNJipDkehwaBRCsTZZqB5Ea2mbYowicUR", - "hash160result": "abd6da27bddaf9e92e6872589a8cb1ae056d04f2", +export const IDENTITY_PASSPORT: VDXFKeyInterface = { + "vdxfid": "iKgbqmZ4Ks9SPNQGj5PZ5TgXomYG4CtaXv", + "indexid": "xQWiJZz9BBN71YHJam3i3rD4qRZH1sbLHD", + "hash160result": "775f52820102c994e30a29b1828b064421afcab1", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iJdUp47SVEzGEHCvoRyix2xufRsAeWSyxa" + "name": "vrsc::identity.passport" } } -export const IDENTITYDATA_PASSPORT_CATEGORY: VDXFKeyInterface = { - "vdxfid": "iPinz8N4RxboKaHvTr4FcJXe9DLojw3bXH", - "indexid": "xUYuSvo9HGpTwkAxKXiQah4BAsMpZeqQLH", - "hash160result": "748058a57c693f07b6b69b53a9509086615215de", +export const IDENTITY_PASSPORT_ORIGINALFRONT: VDXFKeyInterface = { + "vdxfid": "iCwT1mHdci9wooC6Q8mtx8QssXzwiL4hxp", + "indexid": "xHmZUZiiU2NcRy58FpS3vWwQuC1xdM48mW", + "hash160result": "25023e23a25ba4daa7ac0a9c96180f5e90acd067", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "i9MqRfXPAiYwv9q4iSjTtXquNCCZ1GgECn" + "name": "vrsc::identity.passport.originalfront" } } -export const IDENTITYDATA_PASSPORT_EXPIRATIONDATE: VDXFKeyInterface = { - "vdxfid": "iBXSY6Ra3o5jK9QZdnrdttsrnFE6y3H8o9", - "indexid": "xGMYztreu7JPwKHbVUWnsHQPouF7mXgFAg", - "hash160result": "5cd8ab62f4b455d520e951243a6e6ac2be2a4e58", +export const IDENTITY_PASSPORT_ORIGINALBACK: VDXFKeyInterface = { + "vdxfid": "iDXKJaroNRKr9GZfLFvH7LttJQaXqGoSrc", + "indexid": "xJMRmPHtDjYWmSShBwaS5jRRL4bYmTdC9J", + "hash160result": "21734b0f37ec51dd77bdab8c10065cf67b61386e", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iNgDKviLAeeV65eBztuduckUMDE2erB7jj" + "name": "vrsc::identity.passport.originalback" } } -export const IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED: VDXFKeyInterface = { - "vdxfid": "iLjpTPmDufuH38s9XwatiLA8Wk67a2thc8", - "indexid": "xRZvvCCJkz7wfJkBPdF3gigfYQ78WXNncA", - "hash160result": "d53e23bd3ca7de97d1ed41b501d9a1f06b965ebd", +export const IDENTITY_PASSPORT_CROPPEDFRONT: VDXFKeyInterface = { + "vdxfid": "i4cr6CxCYDHUDjc6UoMsDVAZoNep6Meuyi", + "indexid": "x9SxZ1PHPXW8quV8LV22Bsh6q2fpxtJ6Zd", + "hash160result": "274c241806d31576a57a074cc2f6b4c624078b0c", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iFgXmTd9Wi2sqZyPqaoejdHG2sMaJWLrEX" + "name": "vrsc::identity.passport.croppedfront" } } -export const IDENTITYDATA_PASSPORT_ISSUING_REGION: VDXFKeyInterface = { - "vdxfid": "i87HPTEfVQ9HKF8zrNppBEBF8wur6BAGBf", - "indexid": "xCwPrFfkLiMwwR22i4Uy9chnAbvrufhBnx", - "hash160result": "3f8308ca4fe693714fdab6fb3871698a5a2bd432", +export const IDENTITY_PASSPORT_CROPPEDBACK: VDXFKeyInterface = { + "vdxfid": "i6wA2ttX7vcxBXmrdmGEa44NZEFBZWoRYa", + "indexid": "xBmGVhKbyEqcohetVSvPYSauatGCUYDMs2", + "hash160result": "f56f1db46ddebc99f3c8954fc8bf1d26a9bef125", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL" + "name": "vrsc::identity.passport.croppedback" } } -export const IDENTITYDATA_PASSPORT_DATEOFBIRTH: VDXFKeyInterface = { - "vdxfid": "iRe6ZecbVBajvySLEiFxAgMtgZwxBiZY78", - "indexid": "xWUD2T3gLVoQZ9KN6Pv794tRiDxy6henbx", - "hash160result": "27a8f2f7695013eef34f4bb36cb9a8eeb92a22f3", +export const IDENTITY_PASSPORT_FACE: VDXFKeyInterface = { + "vdxfid": "iLCbvnyU4V3XeMz18CXAG5MCtjb2FjpcZX", + "indexid": "xR2iPbQYuoGCGXs2ytBKETsjvPc35DNZDm", + "hash160result": "26f7dc9d524f84a21c8a9e3f2dc5149f3a3c77b7", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iQhjETQvSkadciDPy69QZNy3hSczWQ4iu4" + "name": "vrsc::identity.passport.face" } } -export const IDENTITYDATA_PASSPORT_ADDRESS: VDXFKeyInterface = { - "vdxfid": "iCMcVHrazgA1N2WpXUmffifER2AhUzD6re", - "indexid": "xHBix6HfqzNfzCPrPARpe7BmSgBiQSui11", - "hash160result": "e6bb757f72e329878ff5e7e8409ee9a0bc706a61", +export const IDENTITY_PASSPORT_IDNUMBER: VDXFKeyInterface = { + "vdxfid": "iDYih1jmCA1oexyxZ1PQFL5ewyciqoQ2rw", + "indexid": "xJNq9pAr3UEUH8rzQh3ZDicByddjgKM4vN", + "hash160result": "c8a25af227fc07e260119b370da0eae2a9517c6e", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iGebr2v1TgkWvsyLjs1dQ5SqffqKL8rNm3" + "name": "vrsc::identity.passport.idnumber" } } -export const IDENTITYDATA_PASSPORT_ADDRESS_STREET1: VDXFKeyInterface = { - "vdxfid": "i79XJcQgvEz247HHaKWxTiyxVVnDboWYqv", - "indexid": "xBydmQqmmZCggHAKS1B7S7WVX9oEThCnwK", - "hash160result": "c9f030a041e6460517ff39854d3625f70e7e4828", +export const IDENTITY_PASSPORT_CATEGORY: VDXFKeyInterface = { + "vdxfid": "iMtpUJYWZmnnSJyJcshHRdWJZMhZVZZifT", + "indexid": "xSivw6ybR61T4UrLUZMSQ22qb1iaQux7BU", + "hash160result": "84a9f125285d7e93a1e676ed48e3fbe459780aca", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + "name": "vrsc::identity.passport.category" } } -export const IDENTITYDATA_PASSPORT_ADDRESS_CITY: VDXFKeyInterface = { - "vdxfid": "iBM6AvLwRcHKHMwDjPmVts1VxKQYHAmFHA", - "indexid": "xGBCdin2GvVyuXpFb5ResFY2yyRZDWy6sS", - "hash160result": "78068da24f1196cf7bcb7e45d3f2bd90e8015956", +export const IDENTITY_PASSPORT_EXPIRATIONDATE: VDXFKeyInterface = { + "vdxfid": "i98TaZ3wTh3qRw2ufeunVY2MD5eKwoamGE", + "indexid": "xDxa3MV2K1GW46uwXLZwTvYtEjfLspcYEK", + "hash160result": "07727b480c654d59cb611ed01715e254eb37053e", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + "name": "vrsc::identity.passport.expirationdate" } } -export const IDENTITYDATA_PASSPORT_ADDRESS_REGION: VDXFKeyInterface = { - "vdxfid": "iKBAveavEwQG28SE4eRUGY5ZqaSLNrCnM1", - "indexid": "xQ1HPT216FcveJKFvL5dEvc6sETMKCokvR", - "hash160result": "14ad7b91cee4646af2d5625fa0d5eeea8ed239ac", +export const IDENTITY_PASSPORT_ISSUINGCOUNTRY: VDXFKeyInterface = { + "vdxfid": "iRHGM2GEYeRUuHKSG1wENVA16bdyVRxchn", + "indexid": "xW7NophKPxe9XTCU7hbPLsgY8FezLKmJHi", + "hash160result": "4798dee337b16fc22d26748fb0803738f99831ef", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" + "name": "vrsc::identity.passport.issuingcountry" } } -export const IDENTITYDATA_PASSPORT_ADDRESS_POSTCODE: VDXFKeyInterface = { - "vdxfid": "iDZEoefPi6Q6WjWseS5LMYwk4PXVzU8Yfd", - "indexid": "xJPMGT6UZQcm8uPuW7jVKwUH63YWskMh6F", - "hash160result": "16150338c79c92a5469e14079ef0eb9d0e75956e", +export const IDENTITY_PASSPORT_ISSUINGREGION: VDXFKeyInterface = { + "vdxfid": "i6Ay9VdcZjGrJur5SNyhBDZWzxGmo7qUmW", + "indexid": "xB15cJ4hR3VWw5j7J4dr9c642cHnbq2nm9", + "hash160result": "f3d9b605096f4c816de7d72c597fee07e75a961d", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" + "name": "vrsc::identity.passport.issuingregion" } } -export const IDENTITYDATA_PASSPORT_ADDRESS_COUNTRY: VDXFKeyInterface = { - "vdxfid": "iNAWV5t3VpZc9mGxRxqHo8qBo5mRDmYNzh", - "indexid": "xSzcwtK8M8nGmw9zHeVSmXMipjnS4TfbaT", - "hash160result": "64016ff1aa45d5a017a351c87751052b721c02cd", +export const IDENTITY_PASSPORT_DATEOFBIRTH: VDXFKeyInterface = { + "vdxfid": "iAjG8DwYfKxt9affJy6CUBDDFK5jaeHRLJ", + "indexid": "xFZNb2NdWeBYmkYhAekMSZjkGy6kWqAqyd", + "hash160result": "73eb23619d178f495a24b41aaf6aac107357924f", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" + "name": "vrsc::identity.passport.dateofbirth" } } -export const IDENTITYDATA_PASSPORT_DOCUMENTVERIFICATION_MATCHED: VDXFKeyInterface = { - "vdxfid": "iRstHEJfNZfPvmcDUGMyqD6fLvfKvv9ZNr", - "indexid": "xWhzk2jkDst4YwVFKx28obdCNagLpBSeTi", - "hash160result": "ea0746c22573d01b7aa023e40381f655a9bcbdf5", +export const IDENTITY_PASSPORT_ADDRESS_STREET1: VDXFKeyInterface = { + "vdxfid": "i7HPJNB16V5pws8xSq4a8pHF29Mcg6sUyy", + "indexid": "xC7VmAc5woJVa31zJWij7Con3oNdXuBysY", + "hash160result": "c28625c4dfc12d3cdd85f8c7272e87a57523c529", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk" + "name": "vrsc::identity.passport.address.street1" } } -export const IDENTITYDATA_PASSPORT_NAME_MATCHED: VDXFKeyInterface = { - "vdxfid": "iNQ1CWDT7So5agryapjXpo2nhxto4w6yM8", - "indexid": "xTE7fJeXxm1kCrk1SWPgoBZKjcuoypYrZa", - "hash160result": "5e8b3b606e58d88fb46e055728ff0a8eeb7c8fcf", +export const IDENTITY_PASSPORT_ADDRESS_CITY: VDXFKeyInterface = { + "vdxfid": "iFSLsk21VvWSWLg9a4XFTB3kEN8bLnTB7c", + "indexid": "xLGTLYT6MEj78WZBRkBQRZaHG29cBfjnYu", + "hash160result": "c06884e75232e86de75c6ccbd5605a3352dd3783", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iKCFQYZudPChh6jypSpcgENoQb5WeX5wHv" + "name": "vrsc::identity.passport.address.city" } } -export const IDENTITYDATA_PASSPORT_DATEOFBIRTHMATCHED: VDXFKeyInterface = { - "vdxfid": "iHExwXrJTrVLTS5okNNtp9BMRoTbwBNBQu", - "indexid": "xN55QLHPKAi15bxqc433nXhtTTUcpv6xtK", - "hash160result": "3f79d48090f69366e7e78b5765b14565fb3a0197", +export const IDENTITY_PASSPORT_ADDRESS_REGION: VDXFKeyInterface = { + "vdxfid": "iFNoUQhExFEYTgrqgy7x22Q6URM7ek9L3J", + "indexid": "xLCuwD8KoZTD5rjsYen6zQvdW5N8Z4oGqf", + "hash160result": "7b7baa6d0d788f434536aa472c57d9de40678c82", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.passport" - }, - "bounddata": { - "vdxfkey": "iMUfUShqVwWrGSx6HvZcDJwHywiLW5Zusb" + "name": "vrsc::identity.passport.address.region" } } -export const IDENTITYDATA_RESIDENCEPERMIT: VDXFKeyInterface = { - "vdxfid": "iJzdKZ1ppXjnrbasWGH24nWtNchKTFE6oM", - "indexid": "xPpjnMSufqxTUmTuMwwB3B3RQGiLRSe3a7", - "hash160result": "eb1a88f1148f3f3798bd9f08a5b88a50bf473baa", +export const IDENTITY_PASSPORT_ADDRESS_POSTCODE: VDXFKeyInterface = { + "vdxfid": "iS4SakGdB4ek1Q1QAitXUwFEk1RVyi3rLY", + "indexid": "xWtZ3Yhi2NsQdZtS2QYgTKmmmfSWrxdFKY", + "hash160result": "4457551bc48db37393f5ec3ec3d0cf6766dcbcf7", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" + "name": "vrsc::identity.passport.address.postcode" } } -export const IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_FRONT: VDXFKeyInterface = { - "vdxfid": "iCAHvT9dB52QoCHuHYuYJ2BBkytUndvMVj", - "indexid": "xGzQPFai2PF5RNAw9EZhGQhinduVgDqt5Q", - "hash160result": "e191b50000a4d871b4a310f3360dd8cad35d465f", +export const IDENTITY_PASSPORT_ADDRESS_COUNTRY: VDXFKeyInterface = { + "vdxfid": "iB9w9GgcJdGTt3ZuM2pm5qpDBA3UaJdcvj", + "indexid": "xFz3c57h9wV8WDSwCiUv4ELkCp4VNyPHLr", + "hash160result": "dd93bcbecc805e5b1606efafa1ecab6b33e53c54", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iBrpt78Mdrqcc1RHwPWKYBALbNTC4cwdJQ" + "name": "vrsc::identity.passport.address.country" } } -export const IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_BACK: VDXFKeyInterface = { - "vdxfid": "iE6M2Mibzrrneg3cZFbNrXHf9D9FMgBqx9", - "indexid": "xJvTVA9grB5TGqveQwFXpupCAsAGBbcCJR", - "hash160result": "9233dcff0e38f245836911eef94c4bb7238b7774", +export const IDENTITY_RESIDENCEPERMIT: VDXFKeyInterface = { + "vdxfid": "i8WZetqKFn98rHRZGvAvPuzPyrJeyUMjfb", + "indexid": "xDLg7hGQ76MoUTJb8bq5NJWw1WKftQg9VL", + "hash160result": "712ef00d9937eb4ade0fd3e627c2df1d99503b37", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iNRCZp7JBDHbpKQ2Vhc6TK97hUSRPG4jaX" + "name": "vrsc::identity.residencepermit" } } -export const IDENTITYDATA_RESIDENCEPERMIT_CROPPED_FRONT: VDXFKeyInterface = { - "vdxfid": "i91nujduYeu8scMbSkJj1iZuH5VSh3Z5rW", - "indexid": "xDquNY4zPy7oVnEdJRxsz76SJjWTcVNPwS", - "hash160result": "28ec50fb17556fceea921d0a90d822987471c23c", +export const IDENTITY_RESIDENCEPERMIT_ORIGINALFRONT: VDXFKeyInterface = { + "vdxfid": "iC5NrmPgKckxBjKv7v9HjUMytm4jRtEBgZ", + "indexid": "xGuVKZpmAvycouCwyboShrtWvR5kNYzWoH", + "hash160result": "639ed2ef9da2f5e75fe63e1ccf83d1b54e68585e", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iK822dFQwW2Y5tdpSpxQtHQemf47HoFxqs" + "name": "vrsc::identity.residencepermit.originalfront" } } -export const IDENTITYDATA_RESIDENCEPERMIT_CROPPED_BACK: VDXFKeyInterface = { - "vdxfid": "iLpNisoTSTZ8LLHtkPJ9HSxVu84QW1a98Z", - "indexid": "xReVBgEYHmmnxWAvc4xJFqV2vn5RR6aiTG", - "hash160result": "03f3ca2aa3bcdbc2c7b60d18913ae869c02f3bbe", +export const IDENTITY_RESIDENCEPERMIT_ORIGINALBACK: VDXFKeyInterface = { + "vdxfid": "iLTPvrZi8HNALuVmYeAWnSnLdZ5GsAAUcx", + "indexid": "xRHWPeznybapy5NoQKpfkqJsfD6HmQW5eW", + "hash160result": "94d200a22dbdfa7ba47d1970c21eacb65f7543ba", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iCvxKVHbnbwHGZDTaGofeyyJLjsGBSZr7A" + "name": "vrsc::identity.residencepermit.originalback" } } -export const IDENTITYDATA_RESIDENCEPERMIT_FACE: VDXFKeyInterface = { - "vdxfid": "iG9jwZT4PBKWSbm7o5zCWNKZkACyGCCZY3", - "indexid": "xLyrQMt9EVYB4me9emeMUkr6mpDz9wW5M5", - "hash160result": "75cd40bd50a7df36d91334c5e7087f9b602c0c8b", +export const IDENTITY_RESIDENCEPERMIT_CROPPEDFRONT: VDXFKeyInterface = { + "vdxfid": "i6T3rairykWA5vVEtQqptjp5RBRhTCmsBS", + "indexid": "xBHAKP9wq4ipi6NGk6Vys8LcSqSiKAMKZU", + "hash160result": "14136815f288a4b6426c7f4ab6b28221dcf0a020", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iPrxPJC6NbzWnkNyLSvwa8AVrwJWBUV9mM" + "name": "vrsc::identity.residencepermit.croppedfront" } } -export const IDENTITYDATA_RESIDENCEPERMIT_IDNUMBER: VDXFKeyInterface = { - "vdxfid": "iFSUa91mA9uok8XL71HNkK5m8xvBKEiMBn", - "indexid": "xLGb2wSr1U8UNJQMxgwXihcJAcwCCmAsFQ", - "hash160result": "3463196fb71b581b22c2355dca63d8ce0b4a3e83", +export const IDENTITY_RESIDENCEPERMIT_CROPPEDBACK: VDXFKeyInterface = { + "vdxfid": "iHssgpjB2gsusjjLH36N3KqUQqz7JPXumA", + "indexid": "xNhz9dAFt16aVucN8ikX1iN1SW18D7SNDP", + "hash160result": "ce3cae77f2010009817f1e01de52ce8a493cfc9d", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iJdUp47SVEzGEHCvoRyix2xufRsAeWSyxa" + "name": "vrsc::identity.residencepermit.croppedback" } } -export const IDENTITYDATA_RESIDENCEPERMIT_CATEGORY: VDXFKeyInterface = { - "vdxfid": "iJ7wb2r93YaLrXkLdKWgAs5nmowgE7Feth", - "indexid": "xNx43qHDtro1UhdNV1Aq9FcKoTxh6YYiWp", - "hash160result": "5eb69e44059f8c65fdc0f132bffe26ba8c50a5a0", +export const IDENTITY_RESIDENCEPERMIT_FACE: VDXFKeyInterface = { + "vdxfid": "iNVvVYKcKuredXKvctn5uQxp3kNXoJrwNb", + "indexid": "xTL2xLkhBE5KFhCxUaSEsoVM5QPYfELeHf", + "hash160result": "4dd17db50d569a63cc892d78850ac9de1d0eaed0", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "i9MqRfXPAiYwv9q4iSjTtXquNCCZ1GgECn" + "name": "vrsc::identity.residencepermit.face" } } -export const IDENTITYDATA_RESIDENCEPERMIT_EXPIRATIONDATE: VDXFKeyInterface = { - "vdxfid": "iFTmB8nRz1e1LWy6VZy69z13JJDqSjGYzu", - "indexid": "xLHsdwDWqKrfxgr8MFdF8NXaKxErHmHoJn", - "hash160result": "4c0ea69b915ce91fecf6f82b5993835ea4907c83", +export const IDENTITY_RESIDENCEPERMIT_IDNUMBER: VDXFKeyInterface = { + "vdxfid": "iMxygBvDFftAnmUCjVLh21etV5v4wt9zdk", + "indexid": "xSo68zMJ6z6qQwMEbAzqzQBRWjw5u6Tm63", + "hash160result": "ab544471e583d6a11245bb971e3ee1ef5ed1d3ca", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iNgDKviLAeeV65eBztuduckUMDE2erB7jj" + "name": "vrsc::identity.residencepermit.idnumber" } } -export const IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED: VDXFKeyInterface = { - "vdxfid": "iDycAmsF8RoSfDCqt8GKwfLdajJEejPYBF", - "indexid": "xJoidaJKyk27HP5sjovUv3sAcPKFUR4Skz", - "hash160result": "198ee70ddf1dae654a868ee39d83015a37463173", +export const IDENTITY_RESIDENCEPERMIT_CATEGORY: VDXFKeyInterface = { + "vdxfid": "iGbMb21an69VE6iTH2iRtRFKCEUZPJHTwU", + "indexid": "xMRU3pSfdQN9rGbV8iNaromrDtVaCufAXu", + "hash160result": "ae9031bab1ee600e10aa16ec1d4c13def953e48f", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iFgXmTd9Wi2sqZyPqaoejdHG2sMaJWLrEX" + "name": "vrsc::identity.residencepermit.category" } } -export const IDENTITYDATA_RESIDENCEPERMIT_ISSUING_REGION: VDXFKeyInterface = { - "vdxfid": "iLZnhoDnggyo9LGiyS8xvEovkSn1yRuRjz", - "indexid": "xRPuAbesY1CTmW9kq7o7tdLTn6o2m96TLY", - "hash160result": "f969f7afa0599e431674b2e76bc4ee5f3cf778bb", +export const IDENTITY_RESIDENCEPERMIT_EXPIRATIONDATE: VDXFKeyInterface = { + "vdxfid": "iJ48ALemxyMV6DYzeuRMe8Fn78iMZdjSXZ", + "indexid": "xNtEd95rpHa9iPS2Wb5WcWnK8njNXD9HEH", + "hash160result": "d3083b08621d6ff5dc3f7f9cace34f944d7aec9f", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL" + "name": "vrsc::identity.residencepermit.expirationdate" } } -export const IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTH: VDXFKeyInterface = { - "vdxfid": "iMPmaDAiNuaqfSNV9SbCuaYG2TCvPNU495", - "indexid": "xSDt31boEDoWHcFX18FMsy4o47DwGgmFbq", - "hash160result": "93ab89f3abe5db79de5fb960f9362b02ecfc8bc4", +export const IDENTITY_RESIDENCEPERMIT_ISSUINGCOUNTRY: VDXFKeyInterface = { + "vdxfid": "i7UhTp4gruQwtkC1bi4RxE4wUAsro6n9Ym", + "indexid": "xCJovcVmiDdcWv53TPiavcbUVptsgMKzdL", + "hash160result": "75e37dc8957c8c6765c60962804d446b2de0e82b", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iQhjETQvSkadciDPy69QZNy3hSczWQ4iu4" + "name": "vrsc::identity.residencepermit.issuingcountry" } } -export const IDENTITYDATA_RESIDENCEPERMIT_ADDRESS: VDXFKeyInterface = { - "vdxfid": "i5pghYvnurAvtbyT69Lt1wBk9NTQNYfWt5", - "indexid": "xAeoAMMsmAPbWmrUwq12zKiHB2URHSXqA1", - "hash160result": "43aa306c8ff55fc646a7a1bb0e0171576c4ec019", +export const IDENTITY_RESIDENCEPERMIT_ISSUINGREGION: VDXFKeyInterface = { + "vdxfid": "iERBNWk2tyaGJ2w8P1kM88Mdj5WA9qFzbv", + "indexid": "xKFHqKB7kHnvvCpAEhQW6WtAkjXAymjqXM", + "hash160result": "788165581de37b5473c2f127d387f3d7a8630778", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iGebr2v1TgkWvsyLjs1dQ5SqffqKL8rNm3" + "name": "vrsc::identity.residencepermit.issuingregion" } } -export const IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_STREET1: VDXFKeyInterface = { - "vdxfid": "iC3BuU53cL5hXRnnezmmToKvUZxyQb1AUs", - "indexid": "xGsJNGW8TeJN9bfpWgRvSBrTWDyzMRUX1Q", - "hash160result": "64d4d3dd9f6acbd72f13a717572302109c6eee5d", +export const IDENTITY_RESIDENCEPERMIT_DATEOFBIRTH: VDXFKeyInterface = { + "vdxfid": "iM62dN7LSHWDuetPi6qAewG6bzYwFrcqBN", + "indexid": "xRv96AYRHbitXpmRZnVKdKnddeZxAivvFE", + "hash160result": "e2533190e4822ab51c5b2029039fbb0d431131c1", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + "name": "vrsc::identity.residencepermit.dateofbirth" } } -export const IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_CITY: VDXFKeyInterface = { - "vdxfid": "iHv1BkzjJgJcwsBHJCeGTgcUHmoCmGE5py", - "indexid": "xNk7eZRp9zXHa34K9tJRS591KRpDa69BBJ", - "hash160result": "6d9fbcb4cd86e46dfbf806c13f951108c253639e", +export const IDENTITY_RESIDENCEPERMIT_ADDRESS: VDXFKeyInterface = { + "vdxfid": "iCA8P2rVs5DjtzQpXEnPJcG4KBs79C9EpL", + "indexid": "xGzEqqHaiPSQXAHrNvSYGznbLqt83gLGV5", + "hash160result": "2c7264a72e1d7937da951620039e48a0c8663e5f", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + "name": "vrsc::identity.residencepermit.address" } } -export const IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_REGION: VDXFKeyInterface = { - "vdxfid": "iKEHZjtgcCRd67iRsA93J7yphxvRUYdZig", - "indexid": "xQ4Q2YKmTWeHiHbTiqoCGWWMjcwSPM6wn6", - "hash160result": "6c5f8b7989f6210f50d9d270c170cae9dd9cd0ac", +export const IDENTITY_RESIDENCEPERMIT_ADDRESS_STREET1: VDXFKeyInterface = { + "vdxfid": "iMuY2CbmQpCFzodGBtqxogmTb5dYfNbCJa", + "indexid": "xSjeV12rG8QvcyWJ3aW7n5HzcjeZaxtGwr", + "hash160result": "444cbb0dc6f471ecb2261dc7d6731cd97e272dca", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" + "name": "vrsc::identity.residencepermit.address.street1" } } -export const IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_POSTCODE: VDXFKeyInterface = { - "vdxfid": "i7niNaE598TEVhfaf78do5rhKX6gXgdqAC", - "indexid": "xCcpqNf9zSfu7sYcWnnnmUPEMB7hMATGYv", - "hash160result": "ca2d0134ac28a0f46363ea91b036fc78531f512f", +export const IDENTITY_RESIDENCEPERMIT_ADDRESS_CITY: VDXFKeyInterface = { + "vdxfid": "iRckJ1VkfYazfVHWJuA9iXTth83ZYp8znz", + "indexid": "xWSrkovqWrofHfAYAapJguzRin4aPEqHJK", + "hash160result": "73e22f5d24515103052ab165736a0198a7d4e0f2", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" + "name": "vrsc::identity.residencepermit.address.city" } } -export const IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_COUNTRY: VDXFKeyInterface = { - "vdxfid": "i7sePTAMwZ5hVQvdgjfWr9mCg4G8YDvwcx", - "indexid": "xChkrFbSnsJN7aofYRKfpYHjhiH9PqemVR", - "hash160result": "2ffeb2e22fb423ede8ad0127d39be36133e03f30", +export const IDENTITY_RESIDENCEPERMIT_ADDRESS_REGION: VDXFKeyInterface = { + "vdxfid": "iBpH337NTJSLjSxbBWuu2wBLu12k4JVGk4", + "indexid": "xGePVqYTJcf1Mcqd3Ca41Khsvf3kyxtNXH", + "hash160result": "2f7b3040cf60259ee4bf6dfc93a4de42ab4e7d5b", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" + "name": "vrsc::identity.residencepermit.address.region" } } -export const IDENTITYDATA_RESIDENCEPERMIT_DOCUMENTVERIFICATION_MATCHED: VDXFKeyInterface = { - "vdxfid": "iGRk3K3N3Nr4gvVWL2aKdzfjP54ZNvpVaT", - "indexid": "xMFrW7USth4jK6NYBiEUcPCGQj5aM9U9ed", - "hash160result": "316ae15a805987678066399eb21d162759e9128e", +export const IDENTITY_RESIDENCEPERMIT_ADDRESS_POSTCODE: VDXFKeyInterface = { + "vdxfid": "iGKi47jtg6CumKYSUBj57drgLNGzhJY3Gj", + "indexid": "xM9pWvAyXQRaPVRUKsPE62PDN2J1Zp4d6b", + "hash160result": "db85ea63848a6ad2c3a0e82bb29e215c00c2ee8c", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk" + "name": "vrsc::identity.residencepermit.address.postcode" } } -export const IDENTITYDATA_RESIDENCEPERMIT_NAME_MATCHED: VDXFKeyInterface = { - "vdxfid": "iPJhtbfg9yL4ydMLXfgb1XUqm4zvtcS3c7", - "indexid": "xU8pMQ6m1HYjboENPMLjyv1Nnj1wmqZv7q", - "hash160result": "52e2b8b282867a147bd6ce097359606cd91587d9", +export const IDENTITY_RESIDENCEPERMIT_ADDRESS_COUNTRY: VDXFKeyInterface = { + "vdxfid": "i8KD9CUn7Su4YT44WhbD8HYA1K425cFCqM", + "indexid": "xD9Kbzurxm7jAcw6NPFN6g4h2y531jRanx", + "hash160result": "75970ae74cd40419dc78ecef7be22c5ee09d1535", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iKCFQYZudPChh6jypSpcgENoQb5WeX5wHv" + "name": "vrsc::identity.residencepermit.address.country" } } -export const IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTHMATCHED: VDXFKeyInterface = { - "vdxfid": "iBZWkQDNUV46RpDHi3CMn78ENBcQj4RVUp", - "indexid": "xGPdDCeTKoGm3z6KZirWkVemPqdRgTRtbw", - "hash160result": "197dbc7ddf5795a60bb0bf037c8b846cda83b258", +export const IDENTITY_RESIDENTCARD: VDXFKeyInterface = { + "vdxfid": "iKkJFFtbxRMJutjoruW47Mc1sCfdGYQrC9", + "indexid": "xQaQi4KgojZyY4cqibAD5k8Ytrge9jwt3u", + "hash160result": "2b737a5733b91d305dcf07d9e75797740da97db2", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residencepermit" - }, - "bounddata": { - "vdxfkey": "iMUfUShqVwWrGSx6HvZcDJwHywiLW5Zusb" + "name": "vrsc::identity.residentcard" } } -export const IDENTITYDATA_RESIDENTCARD: VDXFKeyInterface = { - "vdxfid": "iRZk3qsYq1ac6H53v3cSWhqx8VqUoMxpuK", - "indexid": "xWPrWeJdgKoGiSx5mjGbV6NVA9rVgyJnaL", - "hash160result": "b804f8f1b6006c80b18d5cda0fbcc39900614ff2", +export const IDENTITY_RESIDENTCARD_ORIGINALFRONT: VDXFKeyInterface = { + "vdxfid": "iNMJhZ3wie5U2SRF7WSFTpjJo6B6RSTR4t", + "indexid": "xTBRAMV2ZxJ8ecJGyC6QSDFqpkC7KTFMbW", + "hash160result": "e440d2d8bab46633691a12e7bed0ea785bd90ccf", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" + "name": "vrsc::identity.residentcard.originalfront" } } -export const IDENTITYDATA_RESIDENTCARD_ORIGINAL_FRONT: VDXFKeyInterface = { - "vdxfid": "iHqGf5Yq5MTjS3vJS4GmfPkU2unJVFMLXs", - "indexid": "xNfP7syuvfgQ4DoLHjvvdnH14ZoKPe8ZfA", - "hash160result": "3ee1ac34db24100dbcd7ab1d0c110fc674297e9d", +export const IDENTITY_RESIDENTCARD_ORIGINALBACK: VDXFKeyInterface = { + "vdxfid": "i4pAk8J5ec2wn55VattFRr7PyN4J2L13HJ", + "indexid": "x9eHCvjAVvFcQExXSaYQQEdw125Jz84d8u", + "hash160result": "9fa70ca8b49eab8c3e704f78f0e0ae1bc52caf0e", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iBrpt78Mdrqcc1RHwPWKYBALbNTC4cwdJQ" + "name": "vrsc::identity.residentcard.originalback" } } -export const IDENTITYDATA_RESIDENTCARD_ORIGINAL_BACK: VDXFKeyInterface = { - "vdxfid": "iQAb2ZQ7Z5tZXiiASNpuXYWGGA9ZNTho6m", - "indexid": "xUzhVMqCQQ7E9tbCJ4V4Vw2oHpAaA2pxef", - "hash160result": "cf0888932dddd9da9a7e8008dc7e3dfe9a27f6e2", +export const IDENTITY_RESIDENTCARD_CROPPEDFRONT: VDXFKeyInterface = { + "vdxfid": "iLnx7NDcAWtb9uWicdgSaiwco56TywMh5w", + "indexid": "xRd4aAeh1q7Fn5PkUKLbZ7U9pj7UvU8v2V", + "hash160result": "fa7347c3517552a028890dacaf889a6ead39f6bd", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iNRCZp7JBDHbpKQ2Vhc6TK97hUSRPG4jaX" + "name": "vrsc::identity.residentcard.croppedfront" } } -export const IDENTITYDATA_RESIDENTCARD_CROPPED_FRONT: VDXFKeyInterface = { - "vdxfid": "iCAq6xmjVDq3an2yRkws3xmLfXmDfm6TK5", - "indexid": "xGzwZmCpLY3iCwv1HSc22MHshBnEaVnkU7", - "hash160result": "6e067b98f82fc5d158a11c57e86fd5583165605f", +export const IDENTITY_RESIDENTCARD_CROPPEDBACK: VDXFKeyInterface = { + "vdxfid": "i8WjL22L4UeaCDKZuj8R4Uub6zurTPdaLv", + "indexid": "xDLqnpTQunsEpPCbmQna2sS88evsLJL51v", + "hash160result": "b5134fe72682aa4f0dc645ceb73421dc07644337", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iK822dFQwW2Y5tdpSpxQtHQemf47HoFxqs" + "name": "vrsc::identity.residentcard.croppedback" } } -export const IDENTITYDATA_RESIDENTCARD_CROPPED_BACK: VDXFKeyInterface = { - "vdxfid": "i5DMa83PXnoc3VaaDBvwUPqtXQS3VkJM65", - "indexid": "xA3U2vUUP72GffTc4sb6SnNRZ4T4Qptiiu", - "hash160result": "79ad91be4e21e9065c557d16d530bd53c5c71113", +export const IDENTITY_RESIDENTCARD_FACE: VDXFKeyInterface = { + "vdxfid": "i6dGShbLY2ppZnXSyfvdtdGFkCxBQd2r9Y", + "indexid": "xBTNuW2RPM3VBxQUqMans1nnmryCFH4rRD", + "hash160result": "25a41b37f64414a2477c5c0d1a139d64ce9b8f22", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iCvxKVHbnbwHGZDTaGofeyyJLjsGBSZr7A" + "name": "vrsc::identity.residentcard.face" } } -export const IDENTITYDATA_RESIDENTCARD_FACE: VDXFKeyInterface = { - "vdxfid": "iMkREmUUamd78MP7GeP1wtFteRGoWEAgFj", - "indexid": "xSaXhZuZS5qmkXG98L3AvGnRg5HpLnMLTA", - "hash160result": "a8daf37e1cd1ccc4edbf4f0ee3b193f588bf73c8", +export const IDENTITY_RESIDENTCARD_IDNUMBER: VDXFKeyInterface = { + "vdxfid": "iKFkbwDcQRXjapZcZAXsaMXjgER9CZbwZx", + "indexid": "xQ5s4jehFjkQCzSeQrC2Yk4GhtSA2GbM4B", + "hash160result": "e30d9a01765325e02ca22f60335d4bdb499917ad", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iPrxPJC6NbzWnkNyLSvwa8AVrwJWBUV9mM" + "name": "vrsc::identity.residentcard.idnumber" } } -export const IDENTITYDATA_RESIDENTCARD_IDNUMBER: VDXFKeyInterface = { - "vdxfid": "iGYqQVqehuhYb95knMeydLdtoEzGAFJU9e", - "indexid": "xMNwsJGjZDvDDJxne3K8bjARpu1H4ShUgH", - "hash160result": "c9b041ee41a77909c6aee95418d9e5244d4d6a8f", +export const IDENTITY_RESIDENTCARD_CATEGORY: VDXFKeyInterface = { + "vdxfid": "i46Fgc8ev9zAkjikjHWreqSXkMRpFr5Lsi", + "indexid": "x8vN9QZjmUCqNubnayB1dDy4n1SqAqg4vn", + "hash160result": "c0039a4929d081eec1d1f5ca3040e19bded3c106", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iJdUp47SVEzGEHCvoRyix2xufRsAeWSyxa" + "name": "vrsc::identity.residentcard.category" } } -export const IDENTITYDATA_RESIDENTCARD_CATEGORY: VDXFKeyInterface = { - "vdxfid": "iMxE22zmptXB8ShHsSypWSqXLmEficJVug", - "indexid": "xSnLUqRrgCjqkcaKj8dyUqN4NRFgaJT7cn", - "hash160result": "5b6369f617841495baaeb8b396b6bf87c75fafca", +export const IDENTITY_RESIDENTCARD_EXPIRATIONDATE: VDXFKeyInterface = { + "vdxfid": "iBA1oFvDABKqbu9i61AEGy1m5fFHdCWkpy", + "indexid": "xFz8G4MJ1VYWE52jwgpPFMYJ7KGJUd6Y4b", + "hash160result": "0866dd99514f509c9ad4584b3f570515f4c74054", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "i9MqRfXPAiYwv9q4iSjTtXquNCCZ1GgECn" + "name": "vrsc::identity.residentcard.expirationdate" } } -export const IDENTITYDATA_RESIDENTCARD_EXPIRATIONDATE: VDXFKeyInterface = { - "vdxfid": "iFeEkx5dNqs9RmYnyBNnMJpigdVo75MA3Q", - "indexid": "xLUMDkWiEA5p3wRpps2wKhMFiHWp59WJtb", - "hash160result": "53ab24af7c986998582d42d98d4e7b4ef1bf7785", +export const IDENTITY_RESIDENTCARD_ISSUINGCOUNTRY: VDXFKeyInterface = { + "vdxfid": "iHBgD199BSEQWREtiW8dP259DX4qg6KjkM", + "indexid": "xN1nfoaE2kT58b7vaBnnMQbgFB5rWuKCtd", + "hash160result": "ef88ffb14a8b66dacc690351fa9c3d35a8036296", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iNgDKviLAeeV65eBztuduckUMDE2erB7jj" + "name": "vrsc::identity.residentcard.issuingcountry" } } -export const IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED: VDXFKeyInterface = { - "vdxfid": "iHHLQuEx2sQ5FHm8cHs2eW5YFKBu42QyT4", - "indexid": "xN7Sshg2tBcjsTeATyXBctc5GyCuutBKAi", - "hash160result": "c233566af8cb4d2bec45de1b6314a8c373fc7397", +export const IDENTITY_RESIDENTCARD_ISSUINGREGION: VDXFKeyInterface = { + "vdxfid": "i6jygVNjzZUFEXVgtzWxXpBYf5rwjXF92J", + "indexid": "xBa69HopqsgurhNikgB7WCi5gjsxbi12z3", + "hash160result": "dc31e031328cfe3697527e046a52cc372687d423", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iFgXmTd9Wi2sqZyPqaoejdHG2sMaJWLrEX" + "name": "vrsc::identity.residentcard.issuingregion" } } -export const IDENTITYDATA_RESIDENTCARD_ISSUING_REGION: VDXFKeyInterface = { - "vdxfid": "iQSeWkZJbBknqaAvrVk8UpzXcbDcD3JwZK", - "indexid": "xVGkyYzPSVyTTk3xiBQHTDX4eFEd6nwER3", - "hash160result": "f46eda08f73c5415674385dafb8f913a5ab8ffe5", +export const IDENTITY_RESIDENTCARD_DATEOFBIRTH: VDXFKeyInterface = { + "vdxfid": "iQfYTwmTxXzxxyFh6XbY2PQVLVwswRoJL1", + "indexid": "xVVevkCYorDdb98ixDFgzmw2N9xtnBn6M2", + "hash160result": "73e0e5f4af76255bc2a3583ad9a7b1d0241470e8", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL" + "name": "vrsc::identity.residentcard.dateofbirth" } } -export const IDENTITYDATA_RESIDENTCARD_DATEOFBIRTH: VDXFKeyInterface = { - "vdxfid": "iL3JyAfGXCDqotYbGTsC6Et9pe4x9zqKft", - "indexid": "xQsRRy6MNWSWS4Rd89XM4dQgrJ5y4pBTXB", - "hash160result": "ebc0dd42cc2bbf62c504fb64e7b6d29ebb55b5b5", +export const IDENTITY_RESIDENTCARD_ADDRESS_STREET1: VDXFKeyInterface = { + "vdxfid": "iJ67qMPN6tyrLXBhbJpKKBZYpkcBzZD8S4", + "indexid": "xNvEJ9pSxDCWxh4jSzUUHa65rQdCviMqur", + "hash160result": "8540d9cb71ca32f4c03caf26a4cffa4d51094da0", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iQhjETQvSkadciDPy69QZNy3hSczWQ4iu4" + "name": "vrsc::identity.residentcard.address.street1" } } -export const IDENTITYDATA_RESIDENTCARD_ADDRESS: VDXFKeyInterface = { - "vdxfid": "iBU6zckdwpwkR9BbFPVKNEf5X7b8TWERYR", - "indexid": "xGJDTRBio9AR3K4d759ULdBcYmc9QPsq2R", - "hash160result": "921d0bf97b612e9de3294054e4a25e4c0c9bac57", +export const IDENTITY_RESIDENTCARD_ADDRESS_CITY: VDXFKeyInterface = { + "vdxfid": "iLCQ2n5tKHzKcVBv8of1eYmdWEdEY5vTUN", + "indexid": "xR2WVaWyAcCzEf4wzVKAcwJAXteFUoFSux", + "hash160result": "7990100969a22f4b4ba35613b3994219e74d6db7", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iGebr2v1TgkWvsyLjs1dQ5SqffqKL8rNm3" + "name": "vrsc::identity.residentcard.address.city" } } -export const IDENTITYDATA_RESIDENTCARD_ADDRESS_STREET1: VDXFKeyInterface = { - "vdxfid": "i47Wp3Wt9Bib7KB6oSxm8QtQxmAqwxZV18", - "indexid": "x8wdGqwxzVwFjV48f8cv6oQwzRBrs4rtgB", - "hash160result": "4f18b96b75ce0af53a288a0e382c54df3adffe06", +export const IDENTITY_RESIDENTCARD_ADDRESS_REGION: VDXFKeyInterface = { + "vdxfid": "iPWcAQ6zbC9rKaaWAgrpoHmKs5G5SQCprF", + "indexid": "xULidCY5SWNWwkTY2NWymgHrtjH6QfP6JL", + "hash160result": "ff3f1523bfb1fe501ef10f0036c9f059b64bc7db", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + "name": "vrsc::identity.residentcard.address.region" } } -export const IDENTITYDATA_RESIDENTCARD_ADDRESS_CITY: VDXFKeyInterface = { - "vdxfid": "iRNzrpZ74Wm6wMMFh5VeUzR2NBfa9R3UTo", - "indexid": "xWD7KczBupymZXEHYm9oTNwZPqgb5cJGDD", - "hash160result": "149842d5588eaf9a77f40e4b63520c09832a47f0", +export const IDENTITY_RESIDENTCARD_ADDRESS_POSTCODE: VDXFKeyInterface = { + "vdxfid": "iG1QGYyp4SkiP7b9ngPwkTGC3DxVG3hB16", + "indexid": "xLqWjMQtukyP1HUBeN46iqnj4syW4eat4U", + "hash160result": "f345aa72196b006e2200bd08ed0ea165806c7889", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + "name": "vrsc::identity.residentcard.address.postcode" } } -export const IDENTITYDATA_RESIDENTCARD_ADDRESS_REGION: VDXFKeyInterface = { - "vdxfid": "iHAW2LhviXqcVdMsPTcap9khj6rfrfBKRu", - "indexid": "xMzcV991Zr4H7oEuF9GjnYHEkksgoPXYFo", - "hash160result": "c7cd6053d9cd2a7e4482f46366202e87e7182996", +export const IDENTITY_RESIDENTCARD_ADDRESS_COUNTRY: VDXFKeyInterface = { + "vdxfid": "i4wzngZfZb2QBnjr2TjtoMoMF9roSqQkho", + "indexid": "x9n7FUzkQuF4oxcst9Q3mkKtGospNqDjEQ", + "hash160result": "dd2a94da0a94115ed04de616b7d0ea1b19312a10", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" + "name": "vrsc::identity.residentcard.address.country" } } -export const IDENTITYDATA_RESIDENTCARD_ADDRESS_POSTCODE: VDXFKeyInterface = { - "vdxfid": "i9R5Y1NexqRDP3ztWox1qCPVEVZvbAS7Yx", - "indexid": "xEFBzoojp9dt1DsvNVcAoav2G9awPo2kkY", - "hash160result": "2ccf68aa3d77e0d0a30ef4bdae990b6a72e32941", +export const IDENTITY_IDCARD: VDXFKeyInterface = { + "vdxfid": "iK7FrcxNvsej84qZjYR73iGgEV96sGKwTU", + "indexid": "xPwNKRPTnBsPkEibbE5G26oDG9A7j4JSm7", + "hash160result": "4f2b2c852e4cfa5a640988af78c4d02243467cab", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" + "name": "vrsc::identity.idcard" } } -export const IDENTITYDATA_RESIDENTCARD_ADDRESS_COUNTRY: VDXFKeyInterface = { - "vdxfid": "iAZGARqg4GFG8SdjuKe9Zkf9SNqS2fqqop", - "indexid": "xFPNdEGkuaTvkcWmm1JJY9BgU2rSwXWCNA", - "hash160result": "21c3b6b680c00fc148910e6684737549b636ae4d", +export const IDENTITY_IDCARD_ORIGINALFRONT: VDXFKeyInterface = { + "vdxfid": "iCnLNq42DxhuK84Nes4UGjFFUuNsGGpuBZ", + "indexid": "xHcSqdV75GvZwHwQWYidF7mnWZPtATN7Ky", + "hash160result": "9f5f63641e6e935628d7602e92814311ea631766", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" + "name": "vrsc::identity.idcard.originalfront" } } -export const IDENTITYDATA_RESIDENTCARD_DOCUMENTVERIFICATION_MATCHED: VDXFKeyInterface = { - "vdxfid": "iQvbQZ6EQmkESfrgtXhCJ8Vszu1oC9f5rt", - "indexid": "xVkhsMXKG5xu4qjikDMMGX2R2Z2p3yR8MD", - "hash160result": "817d1a8d17b92516bccc8e026fbf4d8e09c648eb", +export const IDENTITY_IDCARD_ORIGINALBACK: VDXFKeyInterface = { + "vdxfid": "iJyfvwrUeTRiGxiYw6oJZ3uALsuBt7QTyy", + "indexid": "xPonPkHZVmeNu8bannTTXSRhNXvCpAD3MB", + "hash160result": "df3a44e11ad54673eff910c1320d9f50100b0daa", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk" + "name": "vrsc::identity.idcard.originalback" } } -export const IDENTITYDATA_RESIDENTCARD_NAME_MATCHED: VDXFKeyInterface = { - "vdxfid": "iNdqmEoGr2zr9eDPmPS99nHJQcK8c61SWR", - "indexid": "xTTxE3EMhMDWmp6Rd56J8AoqSGL9Yay9KW", - "hash160result": "13cc257f9ae7a639ce00b049198336b15a6f2dd2", +export const IDENTITY_IDCARD_CROPPEDFRONT: VDXFKeyInterface = { + "vdxfid": "iFDp8jWwybweGStGQnYxwhbi8eiucZ29sr", + "indexid": "xL3vbXx2pvAJtcmJGUD7v68FAJjvZmrsga", + "hash160result": "b10845ae9b29f3ed25f33f091398fd0a1536d980", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iKCFQYZudPChh6jypSpcgENoQb5WeX5wHv" + "name": "vrsc::identity.idcard.croppedfront" } } -export const IDENTITYDATA_RESIDENTCARD_DATEOFBIRTHMATCHED: VDXFKeyInterface = { - "vdxfid": "iL3YRkmngkLVsPa1xwAdWcb5NEjiZdCLbB", - "indexid": "xQsetZCsY4ZAVZT3pcpnV17cPtkjSpUs5B", - "hash160result": "800f1e6739db010a4edc9ed45e4d2422c591c0b5", +export const IDENTITY_IDCARD_CROPPEDBACK: VDXFKeyInterface = { + "vdxfid": "i8GpXrygUPpQYVwcoZ7JVRB1xB46xZsMuG", + "indexid": "xD6vzfQmKi35AfpefEmTTohYyq57sdLVxr", + "hash160result": "84c05d2d84ab69db2834df22602f34445ae9a134", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.residentcard" - }, - "bounddata": { - "vdxfkey": "iMUfUShqVwWrGSx6HvZcDJwHywiLW5Zusb" + "name": "vrsc::identity.idcard.croppedback" } } -export const IDENTITYDATA_VISA: VDXFKeyInterface = { - "vdxfid": "iATKs43yLjHHyCcLmVtZt2gGZF5PaTvxfy", - "indexid": "xFHSKrV4C3VxbNVNdBYirRCoau6QSwcyaF", - "hash160result": "f3240ba891b8ed340bc5f8ca9f7c6e3391ce8e4c", +export const IDENTITY_IDCARD_FACE: VDXFKeyInterface = { + "vdxfid": "i8sfiwALhk4FtSaWSnBWYwKnWN3G7m3jyU", + "indexid": "xDhnBjbRZ4GvWcTYJTqfXKrKY24GxBC5cg", + "hash160result": "4afc5fda25a15a4627b8426f40594ff2e11d393b", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" + "name": "vrsc::identity.idcard.face" } } -export const IDENTITYDATA_VISA_ORIGINAL_FRONT: VDXFKeyInterface = { - "vdxfid": "iSQ98EpyqS26vDxLz2sPkSLfHitiSE5W66", - "indexid": "xXEFb3G4gkEmYPqNqiXYipsCKNujJTbHCP", - "hash160result": "f7bb12de360a562c66b20e49714fdf7c979b76fb", +export const IDENTITY_IDCARD_IDNUMBER: VDXFKeyInterface = { + "vdxfid": "iBEJB1xD1mpR4kYQbYieW3hNFpe5QmQ6qA", + "indexid": "xG4QdpPHs635gvRSTENoUSDuHUf6JB2izs", + "hash160result": "0af18c033e6ad395bdfb5fbdbf5144d63c1d1055", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iBrpt78Mdrqcc1RHwPWKYBALbNTC4cwdJQ" + "name": "vrsc::identity.idcard.idnumber" } } -export const IDENTITYDATA_VISA_ORIGINAL_BACK: VDXFKeyInterface = { - "vdxfid": "iP7hjj56oH2Xozpw6sPAx4tmXzdCqCGc8P", - "indexid": "xTwpCXWBebFCSAhxxZ3KvTRJZeeDgSAny1", - "hash160result": "d52e97ed89ccb3d384cee2509a0bf1aacf6172d7", +export const IDENTITY_IDCARD_CATEGORY: VDXFKeyInterface = { + "vdxfid": "i4HCpvV1NJd4Ka8atCtDkXs4XLAkrmtKib", + "indexid": "x97KHiv6Dcqiwk1cjtYNivPbYzBmg48ama", + "hash160result": "68b49fa5bf2ed00672c881c15167fee2c304d408", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iNRCZp7JBDHbpKQ2Vhc6TK97hUSRPG4jaX" + "name": "vrsc::identity.idcard.category" } } -export const IDENTITYDATA_VISA_CROPPED_FRONT: VDXFKeyInterface = { - "vdxfid": "i5GYu5sBm2sJh1trhe7ry2J3h5vq5jtBi5", - "indexid": "xA6fMtJGcM5yKBmtZKn1wQpaijwquAGHpb", - "hash160result": "9f1a97f4206a3d10c987d982c6093c31c67bac13", +export const IDENTITY_IDCARD_EXPIRATIONDATE: VDXFKeyInterface = { + "vdxfid": "iNTbsfTmeAm7KUFehtCq3RH1JgbUdTJwCt", + "indexid": "xTHiLTtrVUymwe8gZZrz1ooYLLcVZC5A4n", + "hash160result": "f4b807e32848d5a40815e2aa19cb219c64ae3dd0", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iK822dFQwW2Y5tdpSpxQtHQemf47HoFxqs" + "name": "vrsc::identity.idcard.expirationdate" } } -export const IDENTITYDATA_VISA_CROPPED_BACK: VDXFKeyInterface = { - "vdxfid": "iQRrKSZCi8oURCVTPdvFcNXARXq8BUmEPQ", - "indexid": "xVFxnEzHZT293NNVFKaQam3hTBr9B2SPr8", - "hash160result": "91705b953ea6a6824096763e55bd7ff89128d9e5", +export const IDENTITY_IDCARD_ISSUINGCOUNTRY: VDXFKeyInterface = { + "vdxfid": "iJ5qVRWTHerkVreE9UrSfKyphD3XB9s8FA", + "indexid": "xNuwxDwY8y5R82XG1AWbdiWMis4Y3BXDg7", + "hash160result": "2cc5492966de5135e638de253b497cccb8643fa0", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iCvxKVHbnbwHGZDTaGofeyyJLjsGBSZr7A" + "name": "vrsc::identity.idcard.issuingcountry" } } -export const IDENTITYDATA_VISA_FACE: VDXFKeyInterface = { - "vdxfid": "i5HD9vjKw9soTjAC4GwfKnEvEFVMuRU1Tt", - "indexid": "xA7KcjAQnU6U5u3DuxbpJAmTFuWNhv9uYv", - "hash160result": "9b92d6ae6541357cea0bb018f616586dfc6acc13", +export const IDENTITY_IDCARD_ISSUINGREGION: VDXFKeyInterface = { + "vdxfid": "i8dHTbZ62Bth8NwkxasnKFpvX4EZYuBun4", + "indexid": "xDTPvPzAsW7MkYpnpGXwHeMTYiFaMyp6FD", + "hash160result": "f42f7b71bb43c590b9063755754bf2d534b58038", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iPrxPJC6NbzWnkNyLSvwa8AVrwJWBUV9mM" + "name": "vrsc::identity.idcard.issuingregion" } } -export const IDENTITYDATA_VISA_IDNUMBER: VDXFKeyInterface = { - "vdxfid": "i7m6YfgMd7iELn25uZ36oA9sScTHdwHe1Z", - "indexid": "xCbD1U7SURvtxwu7mEhFmYgQUGUJaGUuzV", - "hash160result": "54d2d2bdfe71c96efe3d5630159f55c0e6cc022f", +export const IDENTITY_IDCARD_DATEOFBIRTH: VDXFKeyInterface = { + "vdxfid": "iGcwhC6znG63pb6jqsRnrtDjXV4aXXsub2", + "indexid": "xMT49zY5daJiSkymhZ5wqGkGZ95bMGYJ9r", + "hash160result": "4d0c72c3369a0ac64711e58ae1b10785f1363190", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iJdUp47SVEzGEHCvoRyix2xufRsAeWSyxa" + "name": "vrsc::identity.idcard.dateofbirth" } } -export const IDENTITYDATA_VISA_CATEGORY: VDXFKeyInterface = { - "vdxfid": "i5ADnmaWGg9VJhYueJwd5kFmSgxuhLxHrQ", - "indexid": "x9zLFa1b7zN9vsRwVzbn48nJULyvfSeNuC", - "hash160result": "c1a982a1a03c643bdace28189b80be6353097a12", +export const IDENTITY_IDCARD_ADDRESS_STREET1: VDXFKeyInterface = { + "vdxfid": "i6jMXjNE9qioZ2dFricFnEBEQEWK5Kg3PS", + "indexid": "xBZTzXoK19wUBCWHiQGQkchmRtXKugcKWw", + "hash160result": "2cee0d13a2fdeaac83d052ad27610da8bf59b623", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "i9MqRfXPAiYwv9q4iSjTtXquNCCZ1GgECn" + "name": "vrsc::identity.idcard.address.street1" } } -export const IDENTITYDATA_VISA_EXPIRATIONDATE: VDXFKeyInterface = { - "vdxfid": "iAdCPpmiY4W1Mkb7vQNTiR38HFBMuwMcEe", - "indexid": "xFTJrdCoPNifyvU9n62cgoZfJuCNkyMTYH", - "hash160result": "a14a1b7acddd65bc3b403b8d080a982738bb6c4e", +export const IDENTITY_IDCARD_ADDRESS_CITY: VDXFKeyInterface = { + "vdxfid": "i3viAeqayk3KDk5tQpYcz6gFs1ayW5vBma", + "indexid": "x8kpdTGfq4FyquxvGWCmxVCntfbzM8iAVb", + "hash160result": "a10bfcd1cfd12d466a276339072d2f2a7ec6f304", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iNgDKviLAeeV65eBztuduckUMDE2erB7jj" + "name": "vrsc::identity.idcard.address.city" } } -export const IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED: VDXFKeyInterface = { - "vdxfid": "iRRYUVK9WZodGM15oJCrZgdXV6PaLZoxFC", - "indexid": "xWFewHkEMt2HtWt7eys1Y5A4WkQbHjGMmc", - "hash160result": "22ddef78469b09e9352e948b16fec0978a63c2f0", +export const IDENTITY_IDCARD_ADDRESS_REGION: VDXFKeyInterface = { + "vdxfid": "iEHvf3XCFacMihTQPVXxNeo6hBCqggDFie", + "indexid": "xK837qxH6tq2LsLSFBC7M3KdiqDrYBNMK7", + "hash160result": "55af249b3ceb591709c693017e5b7b1cb131a876", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iFgXmTd9Wi2sqZyPqaoejdHG2sMaJWLrEX" + "name": "vrsc::identity.idcard.address.region" } } -export const IDENTITYDATA_VISA_ISSUING_REGION: VDXFKeyInterface = { - "vdxfid": "iE5fNZUT4G8ZnR1BbJTNCgc54FUFwqeUcp", - "indexid": "xJumqMuXuaMEQatDSz7XB58c5uVGrJL3e3", - "hash160result": "d7dd15c309c0ae09f5a7293b4b0cf15ca7715674", +export const IDENTITY_IDCARD_ADDRESS_POSTCODE: VDXFKeyInterface = { + "vdxfid": "i3yAnt6zdceYxbCBnLwxn2tNdM4BnPkzhT", + "indexid": "x8oHFgY5UvsDam5De2c7kRQuf15ChzdWFA", + "hash160result": "acd086baf0863cff86fc56ec0fbb16dd18d56a05", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL" + "name": "vrsc::identity.idcard.address.postcode" } } -export const IDENTITYDATA_VISA_DATEOFBIRTH: VDXFKeyInterface = { - "vdxfid": "iF8CRZfCthVVm2VoxyfjMcmXw5x2EReAMv", - "indexid": "xKxJtN6Hk1iAPCNqpfKtL1J4xjy396V6v7", - "hash160result": "908c870f1f57ea5cd8aae089feb5f4f98752c97f", +export const IDENTITY_IDCARD_ADDRESS_COUNTRY: VDXFKeyInterface = { + "vdxfid": "iA6KVD2C4QJAyKfCS3XfQV8AxmpR9R3XG5", + "indexid": "xEvRx1TGuiWqbVYEHjBpNsehzRqS2fp4qg", + "hash160result": "bab14b514d91d7daa39175c90e29a956dec19548", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iQhjETQvSkadciDPy69QZNy3hSczWQ4iu4" + "name": "vrsc::identity.idcard.address.country" } } -export const IDENTITYDATA_VISA_ADDRESS: VDXFKeyInterface = { - "vdxfid": "i53bAJPm5Dvbhovj671RVzkZq9Lej8M8iw", - "indexid": "x9shd6pqvY9GKyokwnfaUPH6roMfesuo4U", - "hash160result": "b3f7110b2359782dc7df5a12c740a275e9f63811", +export const IDENTITY_VISA: VDXFKeyInterface = { + "vdxfid": "iDCwZf84AhbJkm4zKZP7Le8h8ukJS9FySA", + "indexid": "xJ342TZ921oyNvx2BF3GK2fEAZmKGeUQUd", + "hash160result": "57faa6b546ac92c71022178b8c5e9fbae9bebe6a", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iGebr2v1TgkWvsyLjs1dQ5SqffqKL8rNm3" + "name": "vrsc::identity.visa" } } -export const IDENTITYDATA_VISA_ADDRESS_STREET1: VDXFKeyInterface = { - "vdxfid": "iGpueUZCzRG6YVL5xZVV56sjpK39wXm3T6", - "indexid": "xMf27GzHqjUmAfD7pF9e3VQGqy4Ao4VwBi", - "hash160result": "e32af4b6f696c06f289e9d19674a31ad5f7f7492", +export const IDENTITY_VISA_ORIGINALFRONT: VDXFKeyInterface = { + "vdxfid": "iGAgzyLDVs5vYFLRgXVnkQpDRKy9Zh1TiV", + "indexid": "xLzoTmmJMBJbARDTYD9wioLkSyzARsVQWr", + "hash160result": "755da3361216260b786ba78fbe68800557223a8b", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" + "name": "vrsc::identity.visa.originalfront" } } -export const IDENTITYDATA_VISA_ADDRESS_CITY: VDXFKeyInterface = { - "vdxfid": "iNRkLpudpDSAZtoyxSLAV6qp143Vny58dF", - "indexid": "xTFrodLifXeqC4h1p7zKTVNM2i4WdCQiTz", - "hash160result": "7a9966496c47f9b145e785c9fd76fbc515ebe3cf", +export const IDENTITY_VISA_ORIGINALBACK: VDXFKeyInterface = { + "vdxfid": "i3becgcmf85RiY2PAxsp3fbuGKG8Qc73t1", + "indexid": "x8Rm5V3rWSJ6LhuR2eXy248SHyH9Jjue4S", + "hash160result": "e71909c77e2e0361764d22b81f4f53085fe85801", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" + "name": "vrsc::identity.visa.originalback" } } -export const IDENTITYDATA_VISA_ADDRESS_REGION: VDXFKeyInterface = { - "vdxfid": "iR5syE1ENGxcDwcUXrvDnYT8jfXTF9RWLU", - "indexid": "xVuzS2SKDbBGr7VWPYaNkvyfmKYU7gkeus", - "hash160result": "1646f77db041fe2fd10d01a7afffc9cdf4570aed", +export const IDENTITY_VISA_CROPPEDFRONT: VDXFKeyInterface = { + "vdxfid": "iAapfFQMAQy7USdjRwqzAZ2nWhRMSiQMmV", + "indexid": "xFQw83qS1jBn6cWmHdW98wZKYMSNHsb2wy", + "hash160result": "56ed30f8daf83e3b09eee57517be45b6b8c1f94d", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" + "name": "vrsc::identity.visa.croppedfront" } } -export const IDENTITYDATA_VISA_ADDRESS_POSTCODE: VDXFKeyInterface = { - "vdxfid": "i4MPAfFeCJGDuXgKsyDLRJgcam4ukpEo28", - "indexid": "x9BVdTgj3cUtXhZMjesVPhD9cR5vg2V94k", - "hash160result": "ceab8e1f6f76178916d73d6671e8767269509e09", +export const IDENTITY_VISA_CROPPEDBACK: VDXFKeyInterface = { + "vdxfid": "i3quMdmv3vAQDBA6nzM8fTiFtqJrw7tcnf", + "indexid": "x8g1pSCzuEP4qM38eg1HdrEnvVKsoXBZ7R", + "hash160result": "1d8106821498549cebc0af6f8d120b9933090b04", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" + "name": "vrsc::identity.visa.croppedback" } } -export const IDENTITYDATA_VISA_ADDRESS_COUNTRY: VDXFKeyInterface = { - "vdxfid": "iPnjFJpqiiBQ7D6797hNoVmbNJMydCZdgj", - "indexid": "xUcqi7Fva2Q4jNy8zoMXmtJ8PxNzWUqNgK", - "hash160result": "1e10864c861d5eda424d0e6ecf1ae20977ddd3de", +export const IDENTITY_VISA_FACE: VDXFKeyInterface = { + "vdxfid": "iAqxnB58655ZcRLAUm2Utib2rguRXT9wZM", + "indexid": "xFg5EyWCwPJEEbDCLSgds77ZtLvSRpw2k9", + "hash160result": "59564e826c8342a2b721708f6a83c9761dc6d650", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" + "name": "vrsc::identity.visa.face" } } -export const IDENTITYDATA_VISA_DOCUMENTVERIFICATION_MATCHED: VDXFKeyInterface = { - "vdxfid": "iKiQKkypr3B5NEHvPBg2sNEHeZcrZy3dL1", - "indexid": "xQYWnZQuhMPjzQAxEsLBqkkpgDdsNiGwfo", - "hash160result": "b36c238b24223f6a4652f6301bf5dfa5dae621b2", +export const IDENTITY_VISA_IDNUMBER: VDXFKeyInterface = { + "vdxfid": "iQ5LfUtuggDyqbePUB9iWLgxYj7tvDm2VE", + "indexid": "xUuT8HKzXzSeTmXRKrosUjDVaP8upm7rqg", + "hash160result": "77ae761bf6bf7922ff8e47b53bd88107be15f8e1", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk" + "name": "vrsc::identity.visa.idnumber" } } -export const IDENTITYDATA_VISA_NAME_MATCHED: VDXFKeyInterface = { - "vdxfid": "iKDJ8c248aZMWkKSFuVypNt4GVrZ91oArN", - "indexid": "xQ3QbQT8ytn28vCU7bA8nmQbJ9sa3AvkmG", - "hash160result": "96b725305bec875c2f0fb3028def34a277aba0ac", +export const IDENTITY_VISA_CATEGORY: VDXFKeyInterface = { + "vdxfid": "iH4nhrNsZKK6bEkgLDu17fBPR5dnVgitiQ", + "indexid": "xMtuAeoxQdXmDQdiBuZA63hvSjeoT3wsnv", + "hash160result": "8052162609b4da20bb5932ead5b6deedbb861495", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iKCFQYZudPChh6jypSpcgENoQb5WeX5wHv" + "name": "vrsc::identity.visa.category" } } -export const IDENTITYDATA_VISA_DATEOFBIRTHMATCHED: VDXFKeyInterface = { - "vdxfid": "i9o1iuJJTwfTCuJzCT6yw1X41SbEwJk1DC", - "indexid": "xEd8BhjPKFt7q5C248m8uQ3b36cFn4BGH7", - "hash160result": "e6f5f12e63f6b86c4dc1f4185ed6c89d7edb4f45", +export const IDENTITY_VISA_EXPIRATIONDATE: VDXFKeyInterface = { + "vdxfid": "iNW2k7p7hVK2GCc7m1k4mihqh8jd94Dmnh", + "indexid": "xTL9CvFCYoXgtNV9chQDk7ENinkdzPUodD", + "hash160result": "5eaa0aef6ed6d27ee4909bc6ce8619c60346b3d0", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.visa" - }, - "bounddata": { - "vdxfkey": "iMUfUShqVwWrGSx6HvZcDJwHywiLW5Zusb" + "name": "vrsc::identity.visa.expirationdate" } } -export const IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALFRONT: VDXFKeyInterface = { - "vdxfid": "iBrpt78Mdrqcc1RHwPWKYBALbNTC4cwdJQ", - "indexid": "xGgwLuZSVB4HEBJKo5AUWZgsd2UCxbFCCA", - "hash160result": "734505c8a36a53d58aedfc18f8f0c9e312b9f85b", +export const IDENTITY_VISA_ISSUINGCOUNTRY: VDXFKeyInterface = { + "vdxfid": "i5vDfPKMfCRPXVRhfumjWPEvBFhNMVjtGK", + "indexid": "xAkL8BkSWWe49fJjXbRtUmmTCuiPJGBZ2c", + "hash160result": "ebf49255193b4ffbb3a0487106a4df98833bcc1a", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.originalfront" + "name": "vrsc::identity.visa.issuingcountry" } } -export const IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALBACK: VDXFKeyInterface = { - "vdxfid": "iNRCZp7JBDHbpKQ2Vhc6TK97hUSRPG4jaX", - "indexid": "xTFK2cYP2XWGSVH4MPGFRhfej8TSGxUzFR", - "hash160result": "fc576cd9799270c2e432da7b5481254c9864c9cf", +export const IDENTITY_VISA_ISSUINGREGION: VDXFKeyInterface = { + "vdxfid": "iPRc9Ns6LadQNYU7DqSNyx7LW8W9dPKDjC", + "indexid": "xUFicBJBBtr4ziM95X6XxLdsXnXAYQ1XFN", + "hash160result": "a1217c6e44b1f47faf9d59378206009d8433d5da", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.originalback" + "name": "vrsc::identity.visa.issuingregion" } } -export const IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDFRONT: VDXFKeyInterface = { - "vdxfid": "iK822dFQwW2Y5tdpSpxQtHQemf47HoFxqs", - "indexid": "xPx8VRgVnpFCi4WrJWcZrfwBoK58CsfaGo", - "hash160result": "6b2cc84a0df71c4b1920d5332ecde7cdd625a1ab", +export const IDENTITY_VISA_DATEOFBIRTH: VDXFKeyInterface = { + "vdxfid": "i55bTsxLkCTmE6VvppvG8doYnmxuHhec65", + "indexid": "x9uhvgPRbWgRrGNxgWaR72L5pRyvA4vVWm", + "hash160result": "ed824bbfd195e63d6d5151a07eda49eba60c9a11", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.croppedfront" + "name": "vrsc::identity.visa.dateofbirth" } } -export const IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDBACK: VDXFKeyInterface = { - "vdxfid": "iCvxKVHbnbwHGZDTaGofeyyJLjsGBSZr7A", - "indexid": "xHm4nHigdv9wtj6VRxTpdNVqNPtH2yr1Kb", - "hash160result": "edcfcebea370f151dc72c13a34b972dd9fb8b867", +export const IDENTITY_VISA_ADDRESS_STREET1: VDXFKeyInterface = { + "vdxfid": "iMzWxFVzJHbQm5YWv9c1eujvrUrPHAGVAc", + "indexid": "xSpdR3w59bp5PFRYmqGAdJGTt8sQ8o4mpu", + "hash160result": "05992eb838a4f562b6b7e0ff84bb05cdac571ecb", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.croppedback" + "name": "vrsc::identity.visa.address.street1" } } -export const IDENTITYDATA_DOCUMENTVERIFICATION_FACE: VDXFKeyInterface = { - "vdxfid": "iPrxPJC6NbzWnkNyLSvwa8AVrwJWBUV9mM", - "indexid": "xUh4r6dBDvDBQvG1C8b6YWh2tbKX74nCWP", - "hash160result": "d65b41ab8d8c667a46921b860342f471eb7ea0df", +export const IDENTITY_VISA_ADDRESS_CITY: VDXFKeyInterface = { + "vdxfid": "i8YXgZ7doRhidT5phX6qyRnttV6hZiyWTm", + "indexid": "xDNe9MYiejvPFcxrZCkzwpKRv97iS3TQjA", + "hash160result": "04959daab853c797bbbcb9c5ead7376e4a809a37", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.face" + "name": "vrsc::identity.visa.address.city" } } -export const IDENTITYDATA_DOCUMENTVERIFICATION_IDNUMBER: VDXFKeyInterface = { - "vdxfid": "iJdUp47SVEzGEHCvoRyix2xufRsAeWSyxa", - "indexid": "xPTbGrYXLZCvrT5xf7dsvRVSh5tBU3pzip", - "hash160result": "34ad72308593579994ebe622e284a67044713ba6", +export const IDENTITY_VISA_ADDRESS_REGION: VDXFKeyInterface = { + "vdxfid": "i6YkTDEi1M1mzuTyzww8hNoksJFpev17Fu", + "indexid": "xBNrv1fnrfESd5M1rdbHfmLHtxGqUoeALR", + "hash160result": "3a47a53e8717444b5d31e8618049daa8cde8b421", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.idnumber" + "name": "vrsc::identity.visa.address.region" } } -export const IDENTITYDATA_DOCUMENTVERIFICATION_CATEGORY: VDXFKeyInterface = { - "vdxfid": "i9MqRfXPAiYwv9q4iSjTtXquNCCZ1GgECn", - "indexid": "xEBwtTxU22mcYKi6a8PcrvNSPrDZtQ5nSL", - "hash160result": "6d03e9b13582f7069c52d73f7f55881dd9dc8c40", +export const IDENTITY_VISA_ADDRESS_POSTCODE: VDXFKeyInterface = { + "vdxfid": "iBJDLHSLB4cHvaeXazFp25Be3V9yRWmcoK", + "indexid": "xG8Ko5sR2NpxYkXZSfuxzTiB59AzMUATiw", + "hash160result": "dd0d87e3163157402aa16d2017a3ea06d6bccd55", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.category" + "name": "vrsc::identity.visa.address.postcode" } } -export const IDENTITYDATA_DOCUMENTVERIFICATION_EXPIRATIONDATE: VDXFKeyInterface = { - "vdxfid": "iNgDKviLAeeV65eBztuduckUMDE2erB7jj", - "indexid": "xTWKnj9R1xs9iFXDraZnt1H1NsF3UEb4Kf", - "hash160result": "6ecad210f102677f2d2d75a0929fb3676c44a0d2", +export const IDENTITY_VISA_ADDRESS_COUNTRY: VDXFKeyInterface = { + "vdxfid": "iQ9Z1PZMMp49rtDuGQSjfEZn3xACfxLAYa", + "indexid": "xUyfUBzSD8GpV46w866tdd6K5cBDbMPuNo", + "hash160result": "c45655a6924c0b377e9182869dc780df690dc4e2", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.expirationdate" + "name": "vrsc::identity.visa.address.country" } } -export const IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY: VDXFKeyInterface = { - "vdxfid": "iFgXmTd9Wi2sqZyPqaoejdHG2sMaJWLrEX", - "indexid": "xLWeEG4EN2FYTjrRhGToi1oo4XNbE2QwRu", - "hash160result": "c0e0b8f43025cc9574486117135e4c8fa8c7e685", +export const IDENTITY_PERSONALDETAILS: VDXFKeyInterface = { + "vdxfid": "i8SSgM1z7XVoCtoP9CCsMms3zCndaNjtCe", + "indexid": "xDGZ99T4xqiTq4gQzss2LAPb1roeUyLwkU", + "hash160result": "a8fbe89451c1d0a77b336ccf6b0fb7601dd47336", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.issuingcountry" + "name": "vrsc::identity.personaldetails" } } -export const IDENTITYDATA_DOCUMENTVERIFICATION_ISSUING_REGION: VDXFKeyInterface = { - "vdxfid": "iByfEUF2bHSmBbiDoBu42a4HKTKbDvPGbL", - "indexid": "xGomhGg7SbfRombFesZCzxapM7Lc5aQFa4", - "hash160result": "1ff5e3f915ccb6616cbc04e0b51961f98694435d", +export const IDENTITY_CONTACTDETAILS: VDXFKeyInterface = { + "vdxfid": "iRLT8V9NN178CvZQusJSHuyuFC2fD2QmE3", + "indexid": "xWAZbHaTDKKnq6SSmYxbGJWSGr3g1GRDYH", + "hash160result": "b9185ad980909708754a484bf11edc9febd8cbef", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.issuingregion" + "name": "vrsc::identity.contactdetails" } } -export const IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTH: VDXFKeyInterface = { - "vdxfid": "iQhjETQvSkadciDPy69QZNy3hSczWQ4iu4", - "indexid": "xVXqhFr1J4oJEt6RpmoZXmVaj6e1NWsjoF", - "hash160result": "38b824222653effa835ea81b8bf2397b18e6d9e8", +export const IDENTITY_LOCATION: VDXFKeyInterface = { + "vdxfid": "iGmiLZ7J6GjxjZ4rkSMsDzyyvWtmMBjnbo", + "indexid": "xMbpoMYNwaxdMiwtc822CPWWxAunLDE1BS", + "hash160result": "15ea60d9ddde976095b0c79ceecef7b034cfd991", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.dateofbirth" + "name": "vrsc::identity.location" } } -export const IDENTITYDATA_DOCUMENTVERIFICATION_ADDRESS: VDXFKeyInterface = { - "vdxfid": "iGebr2v1TgkWvsyLjs1dQ5SqffqKL8rNm3", - "indexid": "xMUiJqM6JzyBZ3rNbYfnNTyNhKrLEbbAy6", - "hash160result": "c1e17b8a68c7238fc479638a4ea90a09887a8190", +export const IDENTITY_BANKINGDETAILS: VDXFKeyInterface = { + "vdxfid": "i8DUrZJJRjNQMJNeJ3Ti6pbpKPJ55LECyJ", + "indexid": "xD3bKMjPH3b4yUFg9j7s5D8MM3K612HEir", + "hash160result": "a7e5de6ac208f110d0509cffeb916b8dd03c0034", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.address" + "name": "vrsc::identity.bankingdetails" } } -export const IDENTITYDATA_ADDRESS_STREET1: VDXFKeyInterface = { - "vdxfid": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj", - "indexid": "xNUFncPpokjWp66awDFYo1m4UPLA8ubaiB", - "hash160result": "b66f8fe85cc09f7df77e3a0af34bb10b3a77639b", +export const IDENTITY_DOCUMENTS: VDXFKeyInterface = { + "vdxfid": "iCm3ERZoUw2ze1P11QyRUtvhKYovCWFXbT", + "indexid": "xHb9hDztLFFfGBG2s6daTHTEMCpw3tcbVJ", + "hash160result": "ee9f8d5ba7366983cf9b9d3e5e8ac50898a9d865", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.address.street1" + "name": "vrsc::identity.documents" } } -export const IDENTITYDATA_ADDRESS_STREET2: VDXFKeyInterface = { - "vdxfid": "i3h8D5kGtn6DCVCwPFvbypbFCqfzAhXiD2", - "indexid": "x8XEftBMk6Jspf5yEwakxD7nEVh12MU6qD", - "hash160result": "c156ac2c6f101631e348f95b6fca8ad063056202", +export const IDENTITY_BANKACCOUNT: VDXFKeyInterface = { + "vdxfid": "iN4AgB4KEN1C3TfZnYDFUhxn37PdcrZvxT", + "indexid": "xStH8yVQ5gDrfdYbeDsQT6VK4mQeYDjcFm", + "hash160result": "122bf0739d7d1def003656a63c443efb6c14cfcb", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.address.street2" + "name": "vrsc::identity.bankaccount" } } -export const IDENTITYDATA_ADDRESS_CITY: VDXFKeyInterface = { - "vdxfid": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD", - "indexid": "xM76PTRnxBRkvg1i4D1PKocd4n3RqY3CFe", - "hash160result": "b03fee48a0694abcf0e26aeee63386a538c26a8c", +export const IDENTITY_BANKINGDETAILS_CURRENCY: VDXFKeyInterface = { + "vdxfid": "i5k8pb9FHf5VZJKki6him1WMBkpyhe56BY", + "indexid": "xAaFHPaL8yJABUCnZnMsjQ2tDQqzfUkZRm", + "hash160result": "cc655f9f104ad6c25cc65407121fa7ac1208e418", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.address.city" + "name": "vrsc::identity.bankingdetails.currency" } } -export const IDENTITYDATA_ADDRESS_REGION: VDXFKeyInterface = { - "vdxfid": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x", - "indexid": "xCkRVkwGGxUE335WrtVKzFEV4EZ3XYsk9g", - "hash160result": "b838dcdca8dd93524a9bbeb4a551d41be3f7c030", +export const IDENTITY_BANKINGDETAILS_COUNTRY: VDXFKeyInterface = { + "vdxfid": "iHYqZF4Asa4erZR9kJ5G5nWRNGWdiS8vBh", + "indexid": "xNNx23VFitHKUjJBbyjR4B2xPvXebL5g4h", + "hash160result": "cf7870c11608bf6e58890fbfc18ffe0db98d629a", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.address.region" + "name": "vrsc::identity.bankingdetails.country" } } -export const IDENTITYDATA_ADDRESS_POSTCODE: VDXFKeyInterface = { - "vdxfid": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC", - "indexid": "xVQLwJNgMdU7oRYzDBi9Qj5sPwC4vbkTUi", - "hash160result": "2ee05285375ce5e909eb31e5c08d042231fb6ee7", +export const IDENTITY_BANKINGDETAILS_STREET1: VDXFKeyInterface = { + "vdxfid": "iRhANjQk2G3aFXiaGtG68kZjdYr2iVXQJJ", + "indexid": "xWXGqXqpsaGEshbc8ZvF796GfCs3bDhrgC", + "hash160result": "bd420c73e6bba2e48542cddf188c23b8c098b6f3", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.address.postcode" + "name": "vrsc::identity.bankingdetails.street1" } } -export const IDENTITYDATA_ADDRESS_COUNTRY: VDXFKeyInterface = { - "vdxfid": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK", - "indexid": "xTi8RLedRrhDrkgbcdyrpPZmtNvpSJTWGw", - "hash160result": "fafe1c0c79889407ed4172586eb02bf3c6c4dbd4", +export const IDENTITY_BANKINGDETAILS_STREET2: VDXFKeyInterface = { + "vdxfid": "iFWtcLUKAECLrREJr6mxtHM9xPUocxmTSY", + "indexid": "xLM158uQ1YR1Ub7LhnS7rfsgz3VpTpBcCu", + "hash160result": "7f1a53da2e265bab3230d9eec1ed0f36d7041484", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.address.country" + "name": "vrsc::identity.bankingdetails.street2" } } -export const IDENTITYDATA_NATIONALITY: VDXFKeyInterface = { - "vdxfid": "iDKfQZ4c568VzuikNenCNKffhx3f5pMNvi", - "indexid": "xJ9msMVgvQMAd5bnELSMLiCCjc4g2ZP2rB", - "hash160result": "a44ddb762301e0b405741f9b50dae55a9a2b046c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.nationality" - } -} - - -export const IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED: VDXFKeyInterface = { - "vdxfid": "iJTvN7XURWKFabj9tzvRJxmctcAMk3D9Hk", - "indexid": "xPJ2puxZGpXvCmcBkgaaHMJ9vGBNfo83vX", - "hash160result": "5dfba519a35dbb63e0a12e071b47b4b2f99c6ca4", +export const IDENTITY_BANKINGDETAILS_CITY: VDXFKeyInterface = { + "vdxfid": "iQxBEB8sXNez25HJCzvnTWtWqXUkEVAuo8", + "indexid": "xVnHgyZxNgseeFAL4gawRuR3sBVm7nyQqt", + "hash160result": "5878bb5b9371344acb1b679316e0e087046c95eb", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.matched" + "name": "vrsc::identity.bankingdetails.city" } } -export const IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED: VDXFKeyInterface = { - "vdxfid": "iKCFQYZudPChh6jypSpcgENoQb5WeX5wHv", - "indexid": "xQ2MsLzzUhRNKGd1g8UmecuLSF6XcYynDa", - "hash160result": "0d02d8dce6be6e0b4c87efdac286f3739efa6dac", +export const IDENTITY_BANKINGDETAILS_REGION: VDXFKeyInterface = { + "vdxfid": "i4HJ5yrzBFEwjiYgzptMcrBsCeBjPYQJFX", + "indexid": "x97QYnJ52ZTcMtRirWYWbEiQEJCkKnxArM", + "hash160result": "7bf3a5ee05846c54bd19032e6ee9069cbc68d808", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.name.matched" + "name": "vrsc::identity.bankingdetails.region" } } -export const IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED: VDXFKeyInterface = { - "vdxfid": "iMUfUShqVwWrGSx6HvZcDJwHywiLW5Zusb", - "indexid": "xSJmwF8vMFjWtcq89cDmBhTq1bjMRkFKEg", - "hash160result": "3467c9e6461d44959372367130363b01ebf978c5", +export const IDENTITY_BANKINGDETAILS_POSTALCODE: VDXFKeyInterface = { + "vdxfid": "iFVaE922Bzrro6rb87d9En2t2AAGx7EivG", + "indexid": "xLKggwT73K5XRGjcyoHJDAZR3pBHqz4Utt", + "hash160result": "ebd93a0f4fb8db6fb0cb8d397c45b41a0142d483", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documentverification.dateofbirthmatched" + "name": "vrsc::identity.bankingdetails.postalcode" } } -export const IDENTITYDATA_NAME: VDXFKeyInterface = { - "vdxfid": "iNtCaMhqbpwGubHkaepi9mhVFg8jPj2Sk4", - "indexid": "xTiK3A8vT99wXmAnSLUs8AE2HL9kKfRmzC", - "hash160result": "272c6f542e769f1006ee6db29be51ddbbaa1e4d4", +export const IDENTITY_BANKINGDETAILS_TAXNUMBER: VDXFKeyInterface = { + "vdxfid": "i6Gbi3EkYrbREumkLmHUedbzrisXkRzwKY", + "indexid": "xB6iAqfqQAp5s5enCSwdd28XtNtYcHgrDb", + "hash160result": "bcc691f5d53f99e196b291ea2a00a9805ff4a61e", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.name" + "name": "vrsc::identity.bankingdetails.taxnumber" } } -export const IDENTITYDATA_PERSONAL_DETAILS: VDXFKeyInterface = { - "vdxfid": "iDeQpqFQNNxQaTGDJd762poXE9eCBNEELD", - "indexid": "xJUXHdgVDhB5Cd9FAJmF1DL4FofD5W44Wa", - "hash160result": "78d7089e964a3f6e6ae0233346554555d3e68f6f", +export const IDENTITY_BANKINGDETAILS_TAXCOUNTRY: VDXFKeyInterface = { + "vdxfid": "iMJzAfPjqvWJdYyoWTX79cSjd51HbVc7wC", + "indexid": "xS96dTpphEiyFirqN9BG7zyGej2JTACDB1", + "hash160result": "e19f920e684c7d906dd8c85d72a5d5f0cd6ba4c3", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.personaldetails" + "name": "vrsc::identity.bankingdetails.taxcountry" } } -export const IDENTITYDATA_CONTACT: VDXFKeyInterface = { - "vdxfid": "iPHGUT7FpBbUjBKoPiuwTCzVFtcbQfkrs4", - "indexid": "xU7NwFYLfVp9MMCqFQa6RbX2HYdcGVBu6v", - "hash160result": "cef7d037aa9c9342008cc13ea0173610f17341d9", +export const IDENTITY_BANKINGDETAILS_FIRSTNAME: VDXFKeyInterface = { + "vdxfid": "iGAomW7jtsy7zRaoMFU48KvrHahHwdjzi7", + "indexid": "xLzvEJYpkCBncbTqCw8D6iTPKEiJpW3beK", + "hash160result": "d33bd09ba3184bf0e3fa00ad62e92a7a99c83f8b", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.contactdetails" + "name": "vrsc::identity.bankingdetails.firstname" } } -export const IDENTITYDATA_LOCATIONS: VDXFKeyInterface = { - "vdxfid": "iREAoeQFDuJA751i86EBWmDthRuZoGEKBi", - "indexid": "xW4HGSqL5DWpjEtjymtLV9kRj5vaeyFTX7", - "hash160result": "e89b7bc01f7fececa737c5451a6889006bb99bee", +export const IDENTITY_BANKINGDETAILS_LASTNAME: VDXFKeyInterface = { + "vdxfid": "iMrvbLJnZawGsdFshtrHM3QKa4pDPbRk3L", + "indexid": "xSh348jsQu9wVo8uZaWSKRvrbiqED1eny3", + "hash160result": "4a0d68f2cafc3cbe827a91fd5038c65878bfaec9", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.locationdetails" + "name": "vrsc::identity.bankingdetails.lastname" } } -export const IDENTITYDATA_BANKING_INFORMATION: VDXFKeyInterface = { - "vdxfid": "iJPS5WjFmKhjJjNxA2m2CJUus8swyBSTWy", - "indexid": "xPDYYKALcdvPvuFz1iRBAh1StntxrcEUeM", - "hash160result": "1a79f042ce08168d0dcaf4b1062eb1e3525693a3", +export const IDENTITY_BANKINGDETAILS_PHONENUMBER: VDXFKeyInterface = { + "vdxfid": "i9jKPi8ubg5fx3BBmZdiyobJxNgzcmV9et", + "indexid": "xEZRrWZzSzJLaD4DdFHsxC7qz2i1YejHqk", + "hash160result": "b092c8f73031298d26b919f4b398fa9b66f19c44", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankingdetails" + "name": "vrsc::identity.bankingdetails.phonenumber" } } -export const IDENTITYDATA_DOCUMENTS_AND_IMAGES: VDXFKeyInterface = { - "vdxfid": "iDqUNrjpcHvenVoJUzkWxeo93txZJLRMsY", - "indexid": "xJfaqfAuTc9KQfgLLgQfw3Kg5Yya97dwwF", - "hash160result": "b93a86e345efacfa4cdd5ab1a07f41da4371a771", +export const IDENTITY_BANKINGDETAILS_NUMBER: VDXFKeyInterface = { + "vdxfid": "iKGaF7fZ6yAvwJyxcmpuas2Hn9PZPF99yf", + "indexid": "xQ6ghv6dxHPbZUrzUTV4ZFYpooQaFZG1aa", + "hash160result": "fcceea7c24223218bc9313e8176daea6155e3fad", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.documents" + "name": "vrsc::identity.bankingdetails.number" } } -export const PERSONAL_INFO_OBJECT: VDXFKeyInterface = { - "vdxfid": "i6BFmbneE8TJHego8AkeX1iYMbQ4KXHLr9", - "indexid": "xB1NEQDj5SfxupZpyrQoVQF5PFR5Foqja6", - "hash160result": "50b7fa643e4b024ffbcaabd40403d22e1a3ba41d", +export const IDENTITY_BANKINGDETAILS_TYPE: VDXFKeyInterface = { + "vdxfid": "iNkzXo7BBcUvCBH8somKyFtAFsR3mmmYuG", + "indexid": "xTb6zbYG2vhapMAAjVRUweQhHXS4csH9eB", + "hash160result": "26dcd354b4b2bd8b939af29fc5ea57a082aa87d3", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.personalinfo" + "name": "vrsc::identity.bankingdetails.type" } } -export const FIAT_CURRENCEY: VDXFKeyInterface = { - "vdxfid": "i8sgE4s24ZZE9ts4MiYbWpng419T8a5yfW", - "indexid": "xDhngsJ6usmtn4k6DQCkVDKD5fATwqdYBr", - "hash160result": "f24235e62affcb4c57faecc6d0e3b3893889393b", +export const IDENTITY_BANKINGDETAILS_SORTCODE: VDXFKeyInterface = { + "vdxfid": "i8v2y1beTivG8Nyi6Td3VFTc2ExFQJT8pC", + "indexid": "xDk9Rp2jK38vkYrjx9HCTdz93tyGLCaa3E", + "hash160result": "27df54160c8a8a962dd455004c8afac060aeab3b", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.fiatcurrency" + "name": "vrsc::identity.bankingdetails.sortcode" } } - -export const BANK_ACCOUNT: VDXFKeyInterface = { - "vdxfid": "i7QCof7PM8unmLKefzRKokd6oHtkRN5NK4", - "indexid": "xCEKGTYUCT8TPWCgXg5Un99dpwumKZ9uek", - "hash160result": "c34f89a8cd8b6a32848632597ea0bd111c4a0f2b", +export const IDENTITY_DOCUMENTS_PASSPORT: VDXFKeyInterface = { + "vdxfid": "iJHkDyp8dPnNdrh7P9fzow4gTshpbznkSK", + "indexid": "xP7rgnFDUi13G2a9EqL9nKbDVXiqVHVtyg", + "hash160result": "456f1956c77f7ff59d98dd57030d7ed22afd7fa2", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankaccount" + "name": "vrsc::identity.documents.passport" } } -export const BANK_ACCOUNT_CURRENCY: VDXFKeyInterface = -{ - "vdxfid": "iJdQpLtdyAgiRfoJstY8utsY5wEQZdM91y", - "indexid": "xPTXH9KipUuP3qgLjaCHtHQ57bFRREieor", - "hash160result": "2d60e910979af52ce62167b5ec5224858a1b38a6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankaccount" - }, - "bounddata": { - "vdxfkey": "i8sgE4s24ZZE9ts4MiYbWpng419T8a5yfW" - } -} - -export const BANK_ACCOUNT_COUNTRY: VDXFKeyInterface = { - "vdxfid": "iLcX5aezEdeeX63ZAk1fzh1qBVc5gr3hyT", - "indexid": "xRSdYP655wsK9Fvb2Rfpy5YND9d6Z9EL9o", - "hash160result": "0939ad4a2dcb7c1030a2f4efd046a818c92bfdbb", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankaccount" - }, - "bounddata": { - "vdxfkey": "iNt1xYDYaYUZEaoZkxKhr13EriuoWiwcxK" - } -} - -export const BANK_ACCOUNT_STREET1: VDXFKeyInterface = { - "vdxfid": "iDzy4tzp8CQqG4fh4qwyhjeM1EDgZvauwy", - "indexid": "xJq5XhRtyWdVtEYivXc8g8At2tEhSpargH", - "hash160result": "93a2d4461521cffba345fe384c86561fb5227373", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankaccount" - }, - "bounddata": { - "vdxfkey": "iHe9KoxjxSWrBvDZ5XbPpdEXSjK9DoWALj" - } -} - -export const BANK_ACCOUNT_STREET2: VDXFKeyInterface = -{ - "vdxfid": "iMf5baQkrp6EuacyScGu3vQ7EHt4vSiUsz", - "indexid": "xSVC4Nqqi8JuXkW1JHw42JveFwu5qj1Gkv", - "hash160result": "d3da8b39e046268d93d25d6b9f780950d04571c7", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankaccount" - }, - "bounddata": { - "vdxfkey": "i3h8D5kGtn6DCVCwPFvbypbFCqfzAhXiD2" - } -} - -export const BANK_ACCOUNT_CITY: VDXFKeyInterface = { - "vdxfid": "iBgQ4ev7sBd1FodofzgyfEriHWQw6phnwm", - "indexid": "xGWWXTMCiVqfsyWqXgM8ddPFKARx1ok9eq", - "hash160result": "aad5a1798ce03abfbe5166989f9bade19fd8ff59", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankaccount" - }, - "bounddata": { - "vdxfkey": "iGGyvezi6sD6JW8gCXMEMR66382QvEPXHD" - } -} - -export const BANK_ACCOUNT_REGION: VDXFKeyInterface = { - "vdxfid": "iE2HNu3NkhUpFanwjq7z3K14pSKCVh2Yku", - "indexid": "xJrPqhUTc1hUskfybWn91hXbr6LDLwguv5", - "hash160result": "f8b4b7681f399f4ce6f77b16a3034cd014d6b273", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankaccount" - }, - "bounddata": { - "vdxfkey": "i7vK2xWBReFZQsCV1CqB1rhx2aY2eGyo9x" - } -} - -export const BANK_ACCOUNT_POSTALCODE: VDXFKeyInterface = { - "vdxfid": "iEnvTt4zt1iXttDpDCcqvfNYhbReBSeGoa", - "indexid": "xKd2vgW5jKwCX46r4tGzu3u5jFSf33Qv7t", - "hash160result": "23439436b34068051f5dfdaf133ae7ada918247c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankaccount" - }, - "bounddata": { - "vdxfkey": "iQaEUVwbWKFTBFfxMW3zSLZLNHB43r15qC" - } -} - -export const BANK_ACCOUNT_TAXNUMBER: VDXFKeyInterface = { - "vdxfid": "iLZMhFEyg2BysiG8eQabdeGYLpNRzWUvVG", - "indexid": "xRPUA3g4XLQeVt9AW6Ekc2o5NUPSxw2wvq", - "hash160result": "fa32239bcdc55780096b55ce3e7ae9ddc01664bb", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.taxnumber" - } -} - -export const BANK_ACCOUNT_TAXCOUNTRY: VDXFKeyInterface = { - "vdxfid": "iNfhYoUGzruHxihV5dYSYnsruD4STZaKvF", - "indexid": "xTVp1buMrB7xataWwKCbXBQPvs5TN85VEX", - "hash160result": "c0728dd8a0644b69a990c7cddc133a8aeb6887d2", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.taxcountry" - } -} - -export const BANK_ACCOUNT_FIRSTNAME: VDXFKeyInterface = -{ - "vdxfid": "iLaKzdEJgoztyM5f9YnLoGBPQYpq3d6FxF", - "indexid": "xRQSTRfPY8DZbWxh1ESVmehvSCqqw8EGSr", - "hash160result": "25041a54186ca5d8c277e7a1a498c33fe01593bb", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankaccount" - }, - "bounddata": { - "vdxfkey": "i4GqsotHGa4czCdtg2d8FVHKfJFzVyBPrM" - } -} - -export const BANK_ACCOUNT_LASTNAME: VDXFKeyInterface = { - "vdxfid": "iR2fNBYnQDAgfU2BxvC7c4CJQPRY7LXAzm", - "indexid": "xVrmpyysFXPMHduDpbrGaSiqS3SYznwXmR", - "hash160result": "c4b8f6772ae63a6265c814ebf1637f6902936eec", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankaccount" - }, - "bounddata": { - "vdxfkey": "iHybTrNB1kXRrjsCtJXd6fvBKxepqMpS5Z" - } -} - -export const BANK_ACCOUNT_PHONENUMBER: VDXFKeyInterface = -{ - "vdxfid": "iNNkwqvht83J1HZyopGaqVXKMAzTQkj9zM", - "indexid": "xTCsQeMnjSFxdTT1fVvjot3rNq1UHrb19r", - "hash160result": "95d0bc46ca38214dcca8220507da3295a52c53cf", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankaccount" - }, - "bounddata": { - "vdxfkey": "i9ZQ5degEh3wQg5vNm8Tod88bcJBrLs5p3" - } -} - -export const ACCOUNT_NUMBER: VDXFKeyInterface = { - "vdxfid": "iS6TbNSaquK5uDZemFF9DLP6K6ZciN6TBd", - "indexid": "xWva4AsfhDXkXPSgcvuJBiudLkadg3ZHt5", - "hash160result": "8b15e73e57238a3dc6bcb31b368328495e891ef8", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.accountnumber" - } -} -export const ACCOUNT_TYPE: VDXFKeyInterface = { - "vdxfid": "iNdRtUasuiojMC2sw35Nbs4W6hq7o8bWqY", - "indexid": "xTTYMH1xm32PyMuunijXaFb38Mr8ipmsky", - "hash160result": "b1d14abf13ce26753676953ec88c00ad448119d2", +export const IDENTITY_RESIDENCECARD: VDXFKeyInterface = { + "vdxfid": "iQerHJHjqVT32hU1ZUyVYKQEkavs4xFtHo", + "indexid": "xVUxk6ipgofhesM3RAdeWhvmnEwsywApa2", + "hash160result": "0b2227f2bb574fe3cbcc683eecfc4d3bff884ee8", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.accounttype" + "name": "vrsc::identity.residencecard" } } -export const BANK_ACCOUNT_NUMBER: VDXFKeyInterface = { - "vdxfid": "i64P8QWcucELMgrq1uxY7uKCq3eymRcwaQ", - "indexid": "xAtVbCwhkvSzyrjrsbch6Hqjrhfzdz82YM", - "hash160result": "240b1dd30e88528bc9307d3158ccb5fb3d76571c", +export const IDENTITY_ATTESTOR: VDXFKeyInterface = { + "vdxfid": "iFNc5DG22Btm69wBDDXatvSPLxzJq53QBa", + "indexid": "xLCiY1h6sW7RiKpD4uBjsJxvNd1Kiej8tW", + "hash160result": "e5d18dab811f87643c1e7a63627172331be38282", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankaccount" - }, - "bounddata": { - "vdxfkey": "iS6TbNSaquK5uDZemFF9DLP6K6ZciN6TBd" + "name": "vrsc::identity.attestor" } } -export const BANK_ACCOUNT_TYPE: VDXFKeyInterface = { - "vdxfid": "iLMsPy8GhsGSNDzXDpZ8SEcymJfgGrLUVj", - "indexid": "xRByrmZMZBV6zPsZ5WDHQd9Wnxgh8bD1RJ", - "hash160result": "faf99925bc81dc052b9deb8c3321965633e437b9", +export const IDENTITY_ATTESTATION_RECIPIENT: VDXFKeyInterface = { + "vdxfid": "iAkd3VBhYQ3MK6PUCtfhXrLVNbqSghxxpn", + "indexid": "xFajWHcnPiG1wGGW4aKrWEs2QFrTbwP7wd", + "hash160result": "71b7cbbfc8be868f6d9f6c481c420b002438d44f", "qualifiedname": { "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identitydata.bankaccount" - }, - "bounddata": { - "vdxfkey": "iNdRtUasuiojMC2sw35Nbs4W6hq7o8bWqY" + "name": "vrsc::identity.attestation.recipient" } } diff --git a/src/vdxf/index.ts b/src/vdxf/index.ts index 4ce25ef..7d224b8 100644 --- a/src/vdxf/index.ts +++ b/src/vdxf/index.ts @@ -169,6 +169,42 @@ export class BufferDataVdxfObject extends VDXFObject { } } +export class VDXFData extends VDXFObject { + data: Buffer + + constructor( + data: Buffer = Buffer.from(""), + vdxfkey: string = "" + ) { + super(vdxfkey); + this.data = data; + } + + dataByteLength(): number { + return this.data.length; + } + + toDataBuffer(): Buffer { + return this.data; + } + + fromDataBuffer(buffer: Buffer, offset?: number): number { + const reader = new bufferutils.BufferReader(buffer, offset); + + this.data = reader.readVarSlice(); + + return reader.offset; + } + + toJson() { + return { + data: this.data, + vdxfkey: this.vdxfkey, + }; + } + + } + export class Utf8DataVdxfObject extends BufferDataVdxfObject { constructor(data: string = "", vdxfkey: string = "") { super(data, vdxfkey, "utf-8"); diff --git a/src/vdxf/keymap.ts b/src/vdxf/keymap.ts index b37e0c8..f32e73b 100644 --- a/src/vdxf/keymap.ts +++ b/src/vdxf/keymap.ts @@ -1,5 +1,5 @@ import * as keylist from './keys'; -import * as AttestationData from './classes/IdentityData'; +import * as AttestationData from '../utils/IdentityData'; import { VDXFKeyInterface } from './keys'; export const keymap = Object.keys(keylist).reduce((obj: { [key: string]: VDXFKeyInterface }, item) => { obj[keylist[item].vdxfid] = keylist[item]; return obj }, {}); export const attestationDataKeys = Object.keys(AttestationData).reduce((obj: { [key: string]: VDXFKeyInterface }, item) => { obj[AttestationData[item].vdxfid] = AttestationData[item]; return obj }, {}); diff --git a/src/vdxf/keys.ts b/src/vdxf/keys.ts index 481154f..adb7918 100644 --- a/src/vdxf/keys.ts +++ b/src/vdxf/keys.ts @@ -490,6 +490,16 @@ export const PROFILE_DATA_VIEW_REQUEST: VDXFKeyInterface = { } } +export const IDENTITY_SIGNDATA_REQUEST: VDXFKeyInterface = { + "vdxfid": "i8pWCPRLoGD9MgL7HM13xo5Bhr9TsXjGxs", + "indexid": "xDecfBrReaRoyrD992fCwBbijWAUi4yjUN", + "hash160result": "0785689a95a2a08dd2e0efd60b71237e97ea9f3a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.signdata.request" + } +} + // DATA TYPES export const DATA_TYPE_STRING: VDXFKeyInterface = { From 35ceb68f2254c84c7a99689f228569e1e999be70 Mon Sep 17 00:00:00 2001 From: Monkins1010 Date: Fri, 27 Sep 2024 15:39:26 +0100 Subject: [PATCH 105/120] update dist --- dist/vdxf/classes/IdentityData.d.ts | 12 -- dist/vdxf/classes/IdentityData.js | 242 ---------------------------- 2 files changed, 254 deletions(-) delete mode 100644 dist/vdxf/classes/IdentityData.d.ts delete mode 100644 dist/vdxf/classes/IdentityData.js diff --git a/dist/vdxf/classes/IdentityData.d.ts b/dist/vdxf/classes/IdentityData.d.ts deleted file mode 100644 index 00defaa..0000000 --- a/dist/vdxf/classes/IdentityData.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import * as keylist from '../keys'; -export declare const friendlyName: (vdfxkey: any) => string; -export declare const getIdentityDataType: (vdfxkey: any) => string | keylist.VDXFKeyInterface; -export declare const IdentityVdxfidMap: { - [x: string]: { - name: string; - type: keylist.VDXFKeyInterface; - } | { - name: string; - type: string; - }; -}; diff --git a/dist/vdxf/classes/IdentityData.js b/dist/vdxf/classes/IdentityData.js deleted file mode 100644 index 2c712df..0000000 --- a/dist/vdxf/classes/IdentityData.js +++ /dev/null @@ -1,242 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.IdentityVdxfidMap = exports.getIdentityDataType = exports.friendlyName = void 0; -const identitykeys = require("../identityDataKeys"); -const keylist = require("../keys"); -const VDXF_Data = require("../vdxfDataKeys"); -const friendlyName = (vdfxkey) => { - if (vdfxkey in exports.IdentityVdxfidMap) { - return exports.IdentityVdxfidMap[vdfxkey].name; - } - else { - throw new Error("Unknown VDXF key"); - } -}; -exports.friendlyName = friendlyName; -const getIdentityDataType = (vdfxkey) => { - if (vdfxkey in exports.IdentityVdxfidMap) { - return exports.IdentityVdxfidMap[vdfxkey].type; - } - else { - throw new Error("Unknown VDXF key"); - } -}; -exports.getIdentityDataType = getIdentityDataType; -exports.IdentityVdxfidMap = { - [identitykeys.IDENTITYDATA_FIRSTNAME.vdxfid]: { name: "First Name", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_LASTNAME.vdxfid]: { name: "Last Name", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_NATIONALITY.vdxfid]: { name: "Nationality", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_ATTESTOR.vdxfid]: { name: "Attestor ID", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDENTITY.vdxfid]: { name: "Identity", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_ID.vdxfid]: { name: "ID", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_USERID.vdxfid]: { name: "User ID", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_CREATEDAT.vdxfid]: { name: "Created at", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_COMPLETEDAT.vdxfid]: { name: "Completed at", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PREVIOUSATTEMPTID.vdxfid]: { name: "Previous attempt ID", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_SHAREABLEURL.vdxfid]: { name: "Shareable URL", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_TEMPLATEID.vdxfid]: { name: "Template ID", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_TEMPLATEVERSION.vdxfid]: { name: "Template Version", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PHONENUMBER.vdxfid]: { name: "Phone Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_OVER18.vdxfid]: { name: "Over 18", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_OVER21.vdxfid]: { name: "Over 21", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_OVER25.vdxfid]: { name: "Over 25", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_IPADDRESS.vdxfid]: { name: "IP Address", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_EMAIL.vdxfid]: { name: "Email Address", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_HOMEADDRESS.vdxfid]: { name: "Home address", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET1.vdxfid]: { name: "Street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_STREET2.vdxfid]: { name: "Street 2", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_CITY.vdxfid]: { name: "City", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_REGION.vdxfid]: { name: "Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_POSTCODE.vdxfid]: { name: "Post Code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_HOMEADDRESS_COUNTRY.vdxfid]: { name: "Country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDNUMBER_VALUE.vdxfid]: { name: "ID Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDNUMBER_TYPE.vdxfid]: { name: "ID Type", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_STATUS.vdxfid]: { name: "Status", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_APPROVALS_ACCEPTEDTOS.vdxfid]: { name: "Accepted Terms and Conditions", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_APPROVALS_VERIFIEDSMS.vdxfid]: { name: "SMS Verified", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_APPROVALS_KYCCHECKED.vdxfid]: { name: "KYC Checked ok", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_APPROVALS_DOCUMENTSVERIFIED.vdxfid]: { name: "Documents Verified", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_APPROVALS_SELFIECHECKED.vdxfid]: { name: "Selfie Checked", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_APPROVALS_WATCHLIST_OK.vdxfid]: { name: "Watchlist ok", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Riskcheck ok", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE.vdxfid]: { name: "Driving Licence", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_FRONT.vdxfid]: { name: "Driving Licence Front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ORIGINAL_BACK.vdxfid]: { name: "Driving Licence Back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_FRONT.vdxfid]: { name: "Driving Licence Front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CROPPED_BACK.vdxfid]: { name: "Driving Licence Back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_FACE.vdxfid]: { name: "Driving Licence Face", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_IDNUMBER.vdxfid]: { name: "Driving Licence Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CATEGORY.vdxfid]: { name: "Driving Licence Catagory", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_EXPIRATIONDATE.vdxfid]: { name: "Driving Licence expiry date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Driving Licence matches country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ISSUING_REGION.vdxfid]: { name: "Driving Licence issuing region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH.vdxfid]: { name: "Driving Licence Date of Birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_ADDRESS.vdxfid]: { name: "Driving Licence Address", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_STREET1.vdxfid]: { name: "Driving Licence Street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_CITY.vdxfid]: { name: "Driving Licence City", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_REGION.vdxfid]: { name: "Driving Licence Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_POSTCODE.vdxfid]: { name: "Driving Licence ZIP/Post Code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_COUNTRY.vdxfid]: { name: "Driving Licence Country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_MATCHED.vdxfid]: { name: "Driving Licence Matched all", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_NAME_MATCHED.vdxfid]: { name: "Driving Licence name matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_DRIVINGLICENCE_DATEOFBIRTH_MATCHED.vdxfid]: { name: "Driving Licence Date of Birth Matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_SELFIECHECK_SUCCESS.vdxfid]: { name: "Selfie Check success", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_SELFIECHECK_IMAGE.vdxfid]: { name: "Selfie Check image", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_SELFIECHECK_VIDEO.vdxfid]: { name: "Selfie Check video", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_SELFIECHECK_DRIVINGLICENCE_MATCH.vdxfid]: { name: "Selfie Driving Licence match", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_KYC_SUCCESS.vdxfid]: { name: "KYC Success", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_KYC_ADDRESS_MATCHED.vdxfid]: { name: "KYC Address Matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_KYC_TYPE.vdxfid]: { name: "KYC Type", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_KYC_NAME_MATCHED.vdxfid]: { name: "KYC Name Matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_KYC_DATEOFBIRTH_MATCHED.vdxfid]: { name: "KYC Date of Birth Matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_KYC_IDNUMBER_MATCHED.vdxfid]: { name: "KYC ID Matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_KYC_PHONENUMBER_MATCHED.vdxfid]: { name: "KYC Phone number matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_KYC_AREACODE_MATCHED.vdxfid]: { name: "KYC Areacode Matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RISKCHECK_STATUS.vdxfid]: { name: "Risk Check Status", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RISKCHECK_USERINTERACTIONS.vdxfid]: { name: "Risck Check User Interactions", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RISKCHECK_FRAUDRINGOK.vdxfid]: { name: "Risk Check No Fraudring", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RISKCHECK_BOTNOTDETECTED.vdxfid]: { name: "Risk Check bot free", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_EMAIL_ISDELIVERABLE.vdxfid]: { name: "Email address is deliverable", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_EMAIL_BREACHCOUNT.vdxfid]: { name: "Email breach count", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_EMAIL_FIRSTBREACHEDAT.vdxfid]: { name: "Email first breach date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_EMAIL_LASTBREACHEDAT.vdxfid]: { name: "Email last breach date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_REGISTEREDAT.vdxfid]: { name: "Email domain registered at", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_FREEPROVIDER.vdxfid]: { name: "Email is free provider", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_CUSTOM.vdxfid]: { name: "Email Domain is custom", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_DISPOSABLE.vdxfid]: { name: "Email Domain Disposable", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS.vdxfid]: { name: "Email top level Domain Suspicious", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD.vdxfid]: { name: "ID Card", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_FRONT.vdxfid]: { name: "ID Card Front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_IDCARD_ORIGINAL_BACK.vdxfid]: { name: "ID Card Back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_IDCARD_CROPPED_FRONT.vdxfid]: { name: "ID Card Front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_IDCARD_CROPPED_BACK.vdxfid]: { name: "ID Card Back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_IDCARD_FACE.vdxfid]: { name: "ID Card Face", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_IDCARD_IDNUMBER.vdxfid]: { name: "ID Card ID Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_CATEGORY.vdxfid]: { name: "ID Card Category", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_EXPIRATIONDATE.vdxfid]: { name: "ID Card Expiry date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "ID Card Issuing Country Matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_ISSUING_REGION.vdxfid]: { name: "ID Card Issuing Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTH.vdxfid]: { name: "ID Card Date of Birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS.vdxfid]: { name: "ID Card Address", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_STREET1.vdxfid]: { name: "ID Card Street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_CITY.vdxfid]: { name: "ID Card City", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_REGION.vdxfid]: { name: "ID Card Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_POSTCODE.vdxfid]: { name: "ID Card Zip/Post Code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_ADDRESS_COUNTRY.vdxfid]: { name: "ID Card Country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "ID Card Matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_IDCARD_NAME_MATCHED.vdxfid]: { name: "ID Card Name Matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_IDCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "ID Card Date of Birth Matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_PASSPORT.vdxfid]: { name: "Passport", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_FRONT.vdxfid]: { name: "Passport front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_PASSPORT_ORIGINAL_BACK.vdxfid]: { name: "Passport back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_FRONT.vdxfid]: { name: "Passport front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_PASSPORT_CROPPED_BACK.vdxfid]: { name: "Passport back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_PASSPORT_FACE.vdxfid]: { name: "Passport face", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_PASSPORT_IDNUMBER.vdxfid]: { name: "Passport ID Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_CATEGORY.vdxfid]: { name: "Passport Category", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_EXPIRATIONDATE.vdxfid]: { name: "Passport expiry date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Passport issuing country matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_ISSUING_REGION.vdxfid]: { name: "Passport issuing region matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTH.vdxfid]: { name: "Passport date of birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS.vdxfid]: { name: "Passport address", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_STREET1.vdxfid]: { name: "Passport street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_CITY.vdxfid]: { name: "Passport city", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_REGION.vdxfid]: { name: "Passport region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_POSTCODE.vdxfid]: { name: "Passport zip/post code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_ADDRESS_COUNTRY.vdxfid]: { name: "Passport country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Passport matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_PASSPORT_NAME_MATCHED.vdxfid]: { name: "Passport Name Matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_PASSPORT_DATEOFBIRTHMATCHED.vdxfid]: { name: "Passport date of birth matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT.vdxfid]: { name: "Residence Permit", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_FRONT.vdxfid]: { name: "Residence Permit front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ORIGINAL_BACK.vdxfid]: { name: "Residence Permit back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_FRONT.vdxfid]: { name: "Residence Permit front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CROPPED_BACK.vdxfid]: { name: "Residence Permit back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_FACE.vdxfid]: { name: "Residence Permit face", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_IDNUMBER.vdxfid]: { name: "Residence Permit ID Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_CATEGORY.vdxfid]: { name: "Residence Permit category", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_EXPIRATIONDATE.vdxfid]: { name: "Residence Permit expiry date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Residence Permit issuing country matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ISSUING_REGION.vdxfid]: { name: "Residence Permit issuing region matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTH.vdxfid]: { name: "Residence Permit date of birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS.vdxfid]: { name: "Residence Permit Address", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_STREET1.vdxfid]: { name: "Residence Permit Street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_CITY.vdxfid]: { name: "Residence Permit City", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_REGION.vdxfid]: { name: "Residence Permit Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_POSTCODE.vdxfid]: { name: "Residence Permit Zip/Post code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_ADDRESS_COUNTRY.vdxfid]: { name: "Residence Permit Country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Residence Permit Matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_NAME_MATCHED.vdxfid]: { name: "Residence Permit name matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENCEPERMIT_DATEOFBIRTHMATCHED.vdxfid]: { name: "Residence Permit date of birth matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD.vdxfid]: { name: "Resident Card", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_FRONT.vdxfid]: { name: "Resident Card Front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ORIGINAL_BACK.vdxfid]: { name: "Resident Card Back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_FRONT.vdxfid]: { name: "Resident Card Front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_CROPPED_BACK.vdxfid]: { name: "Resident Card Back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_FACE.vdxfid]: { name: "Resident Card Face", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_IDNUMBER.vdxfid]: { name: "Resident Card ID Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_CATEGORY.vdxfid]: { name: "Resident Card Category", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_EXPIRATIONDATE.vdxfid]: { name: "Resident Card Expiry Date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Resident Card Issuing Country Matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ISSUING_REGION.vdxfid]: { name: "Resident Card Issuing Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTH.vdxfid]: { name: "Resident Card date of birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS.vdxfid]: { name: "Resident Card address", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_STREET1.vdxfid]: { name: "Resident Card Street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_CITY.vdxfid]: { name: "Resident Card City", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_REGION.vdxfid]: { name: "Resident Card Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_POSTCODE.vdxfid]: { name: "Resident Card Zip/Post Code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_ADDRESS_COUNTRY.vdxfid]: { name: "Resident Card Country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Resident Card Matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_NAME_MATCHED.vdxfid]: { name: "Resident Card Name Matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_RESIDENTCARD_DATEOFBIRTHMATCHED.vdxfid]: { name: "Resident Card date of birth Matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_VISA.vdxfid]: { name: "Visa", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITYDATA_VISA_ORIGINAL_FRONT.vdxfid]: { name: "Visa front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_VISA_ORIGINAL_BACK.vdxfid]: { name: "Visa back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_VISA_CROPPED_FRONT.vdxfid]: { name: "Visa front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_VISA_CROPPED_BACK.vdxfid]: { name: "Visa back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_VISA_FACE.vdxfid]: { name: "Visa face", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_VISA_IDNUMBER.vdxfid]: { name: "Visa ID Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_CATEGORY.vdxfid]: { name: "Visa Category", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_EXPIRATIONDATE.vdxfid]: { name: "Visa expiry date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_ISSUING_COUNTRY_MATCHED.vdxfid]: { name: "Visa issuing country matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_ISSUING_REGION.vdxfid]: { name: "Visa issuing region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTH.vdxfid]: { name: "Visa date of birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS.vdxfid]: { name: "Visa address", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_STREET1.vdxfid]: { name: "Visa Street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_CITY.vdxfid]: { name: "Visa City", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_REGION.vdxfid]: { name: "Visa Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_POSTCODE.vdxfid]: { name: "Visa Zip/Post Code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_ADDRESS_COUNTRY.vdxfid]: { name: "Visa Country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Visa document matched", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_VISA_NAME_MATCHED.vdxfid]: { name: "Visa name matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_VISA_DATEOFBIRTHMATCHED.vdxfid]: { name: "Visa date of birth matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALFRONT.vdxfid]: { name: "Original Front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ORIGINALBACK.vdxfid]: { name: "Original Back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDFRONT.vdxfid]: { name: "Cropped Front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CROPPEDBACK.vdxfid]: { name: "Cropped Back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_FACE.vdxfid]: { name: "Face", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_IDNUMBER.vdxfid]: { name: "ID Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_CATEGORY.vdxfid]: { name: "Category", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_EXPIRATIONDATE.vdxfid]: { name: "Expiry Date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUINGCOUNTRY.vdxfid]: { name: "Issuing Country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ISSUING_REGION.vdxfid]: { name: "Issuing Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_ADDRESS.vdxfid]: { name: "Address", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_ADDRESS_STREET1.vdxfid]: { name: "Street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_ADDRESS_STREET2.vdxfid]: { name: "Street 2", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_ADDRESS_CITY.vdxfid]: { name: "City", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_ADDRESS_REGION.vdxfid]: { name: "Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_ADDRESS_POSTCODE.vdxfid]: { name: "Zip/Postal Code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_ADDRESS_COUNTRY.vdxfid]: { name: "Country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_MATCHED.vdxfid]: { name: "Document Matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_NAME_MATCHED.vdxfid]: { name: "Name Matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITYDATA_DOCUMENTVERIFICATION_DATEOFBIRTHMATCHED.vdxfid]: { name: "Date of Birth Matched", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.BANK_ACCOUNT.vdxfid]: { name: "Bank Account", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITYDATA_DOCUMENTS_AND_IMAGES.vdxfid]: { name: "Official ID Documents", type: VDXF_Data.DataUint160Key() }, - [keylist.ATTESTATION_PROVISION_TYPE.vdxfid]: { name: "Attestation Type", type: VDXF_Data.DataStringKey() }, - [keylist.ATTESTATION_PROVISION_URL.vdxfid]: { name: "Attestation URL", type: VDXF_Data.DataURLKeyName() }, - [keylist.ATTESTATION_VIEW_RESPONSE.vdxfid]: { name: "Attestation View Response", type: VDXF_Data.DataStringKey() }, - [keylist.ATTESTATION_VIEW_REQUEST.vdxfid]: { name: "Attestation View Response", type: VDXF_Data.DataStringKey() }, - [keylist.PROFILE_DATA_VIEW_REQUEST.vdxfid]: { name: "Profile Data View Request", type: VDXF_Data.DataStringKey() }, -}; From d71f45b7afb7c5f075b58ecb3e9f0aaace2d7e00 Mon Sep 17 00:00:00 2001 From: Monkins1010 Date: Tue, 1 Oct 2024 17:28:31 +0100 Subject: [PATCH 106/120] Updates to code base from code reveiew comments. --- dist/pbaas/ContentMultiMapRemove.d.ts | 8 +- dist/pbaas/ContentMultiMapRemove.js | 12 +- dist/pbaas/CurrencyValueMap.d.ts | 6 +- dist/pbaas/CurrencyValueMap.js | 2 +- dist/pbaas/Rating.d.ts | 8 +- dist/pbaas/Rating.js | 17 +- dist/pbaas/TransferDestination.d.ts | 4 +- dist/pbaas/TransferDestination.js | 10 +- dist/vdxf/classes/Attestation.d.ts | 40 +++- dist/vdxf/classes/Attestation.js | 166 ++++++++++---- dist/vdxf/classes/DataDescriptor.d.ts | 4 +- dist/vdxf/classes/DataDescriptor.js | 24 +- dist/vdxf/classes/SignatureData.d.ts | 2 +- dist/vdxf/classes/SignatureData.js | 2 +- dist/vdxf/index.js | 2 +- src/__tests__/attestation/attestation.test.ts | 95 ++++---- .../attestation/personalInfo.test.ts | 62 ++++-- src/__tests__/pbaas/reservetransfer.test.ts | 43 +++- src/__tests__/vdxf/loginconsent.test.ts | 64 ------ src/pbaas/ContentMultiMapRemove.ts | 18 +- src/pbaas/CurrencyValueMap.ts | 4 +- src/pbaas/Rating.ts | 31 ++- src/pbaas/TransferDestination.ts | 10 +- src/vdxf/classes/Attestation.ts | 209 +++++++++++++----- src/vdxf/classes/Challenge.ts | 7 +- src/vdxf/classes/DataDescriptor.ts | 24 +- src/vdxf/classes/SignatureData.ts | 2 +- src/vdxf/index.ts | 6 +- 28 files changed, 544 insertions(+), 338 deletions(-) diff --git a/dist/pbaas/ContentMultiMapRemove.d.ts b/dist/pbaas/ContentMultiMapRemove.d.ts index 34df29c..2a73625 100644 --- a/dist/pbaas/ContentMultiMapRemove.d.ts +++ b/dist/pbaas/ContentMultiMapRemove.d.ts @@ -5,8 +5,8 @@ import { SerializableEntity } from '../utils/types/SerializableEntity'; export declare class ContentMultiMapRemove implements SerializableEntity { version: BigNumber; action: BigNumber; - entryKey: string; - valueHash: Buffer; + entry_key: string; + value_hash: Buffer; static VERSION_INVALID: import("bn.js"); static VERSION_FIRST: import("bn.js"); static VERSION_LAST: import("bn.js"); @@ -20,8 +20,8 @@ export declare class ContentMultiMapRemove implements SerializableEntity { constructor(data: { version?: BigNumber; action?: BigNumber; - entryKey?: string; - valueHash?: Buffer; + entry_key?: string; + value_hash?: Buffer; }); getByteLength(): number; toBuffer(): Buffer; diff --git a/dist/pbaas/ContentMultiMapRemove.js b/dist/pbaas/ContentMultiMapRemove.js index 7fe5ba3..04e77e2 100644 --- a/dist/pbaas/ContentMultiMapRemove.js +++ b/dist/pbaas/ContentMultiMapRemove.js @@ -10,8 +10,8 @@ class ContentMultiMapRemove { constructor(data) { this.version = data.version || new bn_js_1.BN(1, 10); this.action = data.action || new bn_js_1.BN(0, 10); - this.entryKey = data.entryKey || ""; - this.valueHash = data.valueHash || Buffer.alloc(0); + this.entry_key = data.entry_key || ""; + this.value_hash = data.value_hash || Buffer.alloc(0); } getByteLength() { let byteLength = 0; @@ -30,9 +30,9 @@ class ContentMultiMapRemove { bufferWriter.writeUInt32(this.version.toNumber()); bufferWriter.writeUInt32(this.action.toNumber()); if (this.action != ContentMultiMapRemove.ACTION_CLEAR_MAP) { - bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.entryKey).hash); + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.entry_key).hash); if (this.action != ContentMultiMapRemove.ACTION_REMOVE_ALL_KEY) { - bufferWriter.writeSlice(this.valueHash); + bufferWriter.writeSlice(this.value_hash); } } return bufferWriter.buffer; @@ -42,9 +42,9 @@ class ContentMultiMapRemove { this.version = new bn_js_1.BN(reader.readUInt32()); this.action = new bn_js_1.BN(reader.readUInt32()); if (this.action != ContentMultiMapRemove.ACTION_CLEAR_MAP) { - this.entryKey = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + this.entry_key = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); if (this.action != ContentMultiMapRemove.ACTION_REMOVE_ALL_KEY) { - this.valueHash = reader.readSlice(32); + this.value_hash = reader.readSlice(32); } } return reader.offset; diff --git a/dist/pbaas/CurrencyValueMap.d.ts b/dist/pbaas/CurrencyValueMap.d.ts index 30ae1e9..ffc1d08 100644 --- a/dist/pbaas/CurrencyValueMap.d.ts +++ b/dist/pbaas/CurrencyValueMap.d.ts @@ -13,6 +13,8 @@ export declare class CurrencyValueMap implements SerializableEntity { getByteLength(): number; toBuffer(): Buffer; fromBuffer(buffer: Buffer, offset?: number): number; - IsValid(): boolean; - toJson(): any; + isValid(): boolean; + toJson(): { + [key: string]: string; + }; } diff --git a/dist/pbaas/CurrencyValueMap.js b/dist/pbaas/CurrencyValueMap.js index 108feb3..2307058 100644 --- a/dist/pbaas/CurrencyValueMap.js +++ b/dist/pbaas/CurrencyValueMap.js @@ -59,7 +59,7 @@ class CurrencyValueMap { } return reader.offset; } - IsValid() { + isValid() { for (let [key, value] of this.value_map) { if (!key) { return false; diff --git a/dist/pbaas/Rating.d.ts b/dist/pbaas/Rating.d.ts index 2cf382d..996f82c 100644 --- a/dist/pbaas/Rating.d.ts +++ b/dist/pbaas/Rating.d.ts @@ -13,20 +13,20 @@ export declare class Rating implements SerializableEntity { static TRUST_FIRST: import("bn.js"); static TRUST_LAST: import("bn.js"); version: BigNumber; - trustLevel: BigNumber; + trust_level: BigNumber; ratings: Map; constructor(data?: { version?: BigNumber; - trustLevel?: BigNumber; + trust_level?: BigNumber; ratings?: Map; }); getByteLength(): number; toBuffer(): Buffer; fromBuffer(buffer: Buffer, offset?: number): number; - IsValid(): boolean; + isValid(): boolean; toJson(): { version: string; - trustlevel: string; + trust_level: string; ratings: Map; }; } diff --git a/dist/pbaas/Rating.js b/dist/pbaas/Rating.js index c48459e..744e92b 100644 --- a/dist/pbaas/Rating.js +++ b/dist/pbaas/Rating.js @@ -1,7 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Rating = void 0; -const varint_1 = require("../utils/varint"); const varuint_1 = require("../utils/varuint"); const address_1 = require("../utils/address"); const bufferutils_1 = require("../utils/bufferutils"); @@ -11,17 +10,17 @@ const { BufferReader, BufferWriter } = bufferutils_1.default; class Rating { constructor(data = {}) { this.version = data.version || new bn_js_1.BN(1, 10); - this.trustLevel = data.trustLevel || new bn_js_1.BN(0, 10); + this.trust_level = data.trust_level || new bn_js_1.BN(0, 10); this.ratings = new Map(data.ratings || []); } getByteLength() { let byteLength = 0; byteLength += 4; // version uint32 - byteLength + 1; // trustLevel uint8 + byteLength + 1; // trust_level uint8 byteLength += varuint_1.default.encodingLength(this.ratings.size); for (const [key, value] of this.ratings) { byteLength += 20; - byteLength += varint_1.default.encodingLength(new bn_js_1.BN(value.length)); + byteLength += varuint_1.default.encodingLength(value.length); byteLength += value.length; } return byteLength; @@ -29,7 +28,7 @@ class Rating { toBuffer() { const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())); bufferWriter.writeUInt32(this.version.toNumber()); - bufferWriter.writeUInt8(this.trustLevel.toNumber()); + bufferWriter.writeUInt8(this.trust_level.toNumber()); bufferWriter.writeCompactSize(this.ratings.size); for (const [key, value] of this.ratings) { const { hash } = (0, address_1.fromBase58Check)(key); @@ -41,7 +40,7 @@ class Rating { fromBuffer(buffer, offset = 0) { const reader = new BufferReader(buffer, offset); this.version = new bn_js_1.BN(reader.readUInt32()); - this.trustLevel = new bn_js_1.BN(reader.readUInt8()); + this.trust_level = new bn_js_1.BN(reader.readUInt8()); const count = reader.readCompactSize(); for (let i = 0; i < count; i++) { const hash = reader.readSlice(20); @@ -51,14 +50,14 @@ class Rating { } return reader.offset; } - IsValid() { + isValid() { return this.version.gte(Rating.VERSION_FIRST) && this.version.lte(Rating.VERSION_LAST) && - this.trustLevel.gte(Rating.TRUST_FIRST) && this.trustLevel.lte(Rating.TRUST_LAST); + this.trust_level.gte(Rating.TRUST_FIRST) && this.trust_level.lte(Rating.TRUST_LAST); } toJson() { return { version: this.version.toString(), - trustlevel: this.trustLevel.toString(), + trust_level: this.trust_level.toString(), ratings: this.ratings }; } diff --git a/dist/pbaas/TransferDestination.d.ts b/dist/pbaas/TransferDestination.d.ts index e8010c2..ca9f848 100644 --- a/dist/pbaas/TransferDestination.d.ts +++ b/dist/pbaas/TransferDestination.d.ts @@ -53,6 +53,6 @@ export declare class TransferDestination implements SerializableEntity { fromBuffer(buffer: Buffer, offset?: number): number; static fromJson(data: TransferDestinationJson): TransferDestination; toJson(): TransferDestinationJson; - IsValid(): boolean; - GetAuxDest(destNum: any): TransferDestination; + isValid(): boolean; + getAuxDest(destNum: any): TransferDestination; } diff --git a/dist/pbaas/TransferDestination.js b/dist/pbaas/TransferDestination.js index 296b409..7ce4f86 100644 --- a/dist/pbaas/TransferDestination.js +++ b/dist/pbaas/TransferDestination.js @@ -163,12 +163,12 @@ class TransferDestination { aux_dests: this.aux_dests.map(x => x.toJson()) }; } - IsValid() { + isValid() { // verify aux dests let valid = (((this.type.and(exports.FLAG_DEST_AUX).gt(new bn_js_1.BN(0))) && this.aux_dests.length > 0) || (!(this.type.and(exports.FLAG_DEST_AUX).gt(new bn_js_1.BN(0))) && !(this.aux_dests.length > 0))); - if (valid && this.aux_dests) { + if (valid && this.aux_dests && this.aux_dests.length > 0) { for (let i = 0; i < this.aux_dests.length; i++) { - if (!this.GetAuxDest(i).IsValid()) { + if (!this.getAuxDest(i).isValid()) { valid = false; break; } @@ -177,9 +177,9 @@ class TransferDestination { return !!(valid && !this.typeNoFlags().eq(exports.DEST_INVALID) && this.typeNoFlags().lte(exports.LAST_VALID_TYPE_NO_FLAGS) && - ((!(this.type.and(exports.FLAG_DEST_GATEWAY)) && !this.gateway_id) || this.gateway_id)); + (((this.type.and(exports.FLAG_DEST_GATEWAY).eq(new bn_js_1.BN(0))) && (this.gateway_id == null)) || this.gateway_id != null)); } - GetAuxDest(destNum) { + getAuxDest(destNum) { const retVal = this.aux_dests[destNum]; if (destNum >= 0 && destNum < this.aux_dests.length) { if (retVal.type.and(exports.FLAG_DEST_AUX).gt(new bn_js_1.BN(0)) || retVal.aux_dests.length > 0) { diff --git a/dist/vdxf/classes/Attestation.d.ts b/dist/vdxf/classes/Attestation.d.ts index adc9b81..b9b44e3 100644 --- a/dist/vdxf/classes/Attestation.d.ts +++ b/dist/vdxf/classes/Attestation.d.ts @@ -1,12 +1,38 @@ +/// import { BufferDataVdxfObject } from '../index'; -export interface AttestationRequestInterface { - attestationId: string; +import { SerializableEntity } from '../../utils/types/SerializableEntity'; +export declare class Attestation extends BufferDataVdxfObject { + getAttestationData(): { + [key: string]: AttestationViewRequest; + }; +} +export declare class AttestationViewRequest implements SerializableEntity { + attestation_id: string; accepted_attestors: Array; attestation_keys: Array; - attestor_filters?: Array; + attestor_filters: Array; + constructor(data?: { + attestation_id?: string; + accepted_attestors?: Array; + attestation_keys?: Array; + attestor_filters?: Array; + }); + getByteLength(): number; + toBuffer(): Buffer; + fromBuffer(buffer: Buffer, offset?: number): number; } -export declare class Attestation extends BufferDataVdxfObject { - setAttestationViewRequestData(attestationId: string, accepted_attestors: Array, attestation_keys: Array, attestor_filters: Array): void; - getAttestationViewRequestData(): AttestationRequestInterface; - getAttestationProvisioningData(): any[]; +export declare class AttestationProvisioningData implements SerializableEntity { + attestation_id: string; + accepted_attestors: Array; + attestation_keys: Array; + attestor_filters: Array; + constructor(data?: { + attestation_id?: string; + accepted_attestors?: Array; + attestation_keys?: Array; + attestor_filters?: Array; + }); + getByteLength(): number; + toBuffer(): Buffer; + fromBuffer(buffer: Buffer, offset?: number): number; } diff --git a/dist/vdxf/classes/Attestation.js b/dist/vdxf/classes/Attestation.js index 6abacc2..e7c0ff9 100644 --- a/dist/vdxf/classes/Attestation.js +++ b/dist/vdxf/classes/Attestation.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.Attestation = void 0; +exports.AttestationProvisioningData = exports.AttestationViewRequest = exports.Attestation = void 0; const bufferutils_1 = require("../../utils/bufferutils"); const address_1 = require("../../utils/address"); const vdxf_1 = require("../../constants/vdxf"); @@ -10,69 +10,137 @@ const varuint_1 = require("../../utils/varuint"); const index_1 = require("../index"); const { BufferReader, BufferWriter } = bufferutils_1.default; class Attestation extends index_1.BufferDataVdxfObject { - setAttestationViewRequestData(attestationId, accepted_attestors, attestation_keys, attestor_filters) { - this.vdxfkey = __1.ATTESTATION_VIEW_REQUEST.vdxfid; - let length = 20; // attestationId - length += varuint_1.default.encodingLength(accepted_attestors.length); - length += accepted_attestors.length * 20; // accepted_attestors - length += varuint_1.default.encodingLength(attestation_keys.length); - length += attestation_keys.length * 20; // attestation_keys - length += varuint_1.default.encodingLength(attestor_filters.length); - length += attestor_filters.length * 20; // attestor_filters - let writer = new BufferWriter(Buffer.alloc(length)); - writer.writeSlice((0, address_1.fromBase58Check)(attestationId).hash); - writer.writeCompactSize(accepted_attestors.length); - for (let i = 0; i < accepted_attestors.length; i++) { - writer.writeSlice((0, address_1.fromBase58Check)(accepted_attestors[i]).hash); + getAttestationData() { + const reader = new BufferReader(Buffer.from(this.data, 'hex')); + const returnedData = {}; + while (reader.buffer.length > reader.offset) { + let vdxfkey = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + switch (vdxfkey) { + case __1.ATTESTATION_VIEW_REQUEST.vdxfid: + returnedData[vdxfkey] = new AttestationViewRequest(); + reader.offset = returnedData[vdxfkey].fromBuffer(reader.buffer, reader.offset); + break; + case __1.ATTESTATION_PROVISION_TYPE.vdxfid: + let dataDescriptorItemsCount = reader.readCompactSize(); + let dataDescriptors = []; + for (let i = 0; i < dataDescriptorItemsCount; i++) { + let dataDescriptor = new DataDescriptor_1.DataDescriptor(); + reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); + dataDescriptors.push(dataDescriptor); + } + returnedData[vdxfkey] = dataDescriptors; + break; + default: + throw new Error("Unsupported Attestation Data Type"); + } } - writer.writeCompactSize(attestation_keys.length); - for (let i = 0; i < attestation_keys.length; i++) { - writer.writeSlice((0, address_1.fromBase58Check)(attestation_keys[i]).hash); + return returnedData; + } +} +exports.Attestation = Attestation; +class AttestationViewRequest { + constructor(data) { + this.attestation_id = data.attestation_id || ""; + this.accepted_attestors = data.accepted_attestors || []; + this.attestation_keys = data.attestation_keys || []; + this.attestor_filters = data.attestor_filters || []; + } + getByteLength() { + let length = 0; // attestation_id + length += varuint_1.default.encodingLength(this.accepted_attestors.length); + length += this.accepted_attestors.length * 20; // accepted_attestors + length += varuint_1.default.encodingLength(this.attestation_keys.length); + length += this.attestation_keys.length * 20; // attestation_keys + length += varuint_1.default.encodingLength(this.attestor_filters.length); + length += this.attestor_filters.length * 20; // attestor_filters + return length; + } + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())); + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.attestation_id).hash); + bufferWriter.writeCompactSize(this.accepted_attestors.length); + for (let i = 0; i < this.accepted_attestors.length; i++) { + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.accepted_attestors[i]).hash); } - writer.writeCompactSize(attestor_filters.length); - for (let i = 0; i < attestor_filters.length; i++) { - writer.writeSlice((0, address_1.fromBase58Check)(attestor_filters[i]).hash); + bufferWriter.writeCompactSize(this.attestation_keys.length); + for (let i = 0; i < this.attestation_keys.length; i++) { + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.attestation_keys[i]).hash); } - } - getAttestationViewRequestData() { - if (this.vdxfkey != __1.ATTESTATION_VIEW_REQUEST.vdxfid) { - throw new Error("Invalid attestation request type"); + bufferWriter.writeCompactSize(this.attestor_filters.length); + for (let i = 0; i < this.attestor_filters.length; i++) { + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.attestor_filters[i]).hash); } - let retVal = { - attestationId: "", - accepted_attestors: [], - attestation_keys: [], - attestor_filters: [] - }; - const reader = new BufferReader(Buffer.from(this.data, 'hex'), 0); - retVal.attestationId = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + return bufferWriter.buffer; + } + fromBuffer(buffer, offset = 0) { + const reader = new BufferReader(buffer, offset); + this.attestation_id = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); let attestorCount = reader.readCompactSize(); for (let i = 0; i < attestorCount; i++) { - retVal.accepted_attestors.push((0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION)); + this.accepted_attestors.push((0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION)); } let attestationKeyCount = reader.readCompactSize(); for (let i = 0; i < attestationKeyCount; i++) { - retVal.attestation_keys.push((0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION)); + this.attestation_keys.push((0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION)); } let attestorFilterCount = reader.readCompactSize(); for (let i = 0; i < attestorFilterCount; i++) { - retVal.attestor_filters.push((0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION)); + this.attestor_filters.push((0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION)); + } + return reader.offset; + } +} +exports.AttestationViewRequest = AttestationViewRequest; +class AttestationProvisioningData { + constructor(data) { + this.attestation_id = data.attestation_id || ""; + this.accepted_attestors = data.accepted_attestors || []; + this.attestation_keys = data.attestation_keys || []; + this.attestor_filters = data.attestor_filters || []; + } + getByteLength() { + let length = 0; // attestation_id + length += varuint_1.default.encodingLength(this.accepted_attestors.length); + length += this.accepted_attestors.length * 20; // accepted_attestors + length += varuint_1.default.encodingLength(this.attestation_keys.length); + length += this.attestation_keys.length * 20; // attestation_keys + length += varuint_1.default.encodingLength(this.attestor_filters.length); + length += this.attestor_filters.length * 20; // attestor_filters + return length; + } + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())); + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.attestation_id).hash); + bufferWriter.writeCompactSize(this.accepted_attestors.length); + for (let i = 0; i < this.accepted_attestors.length; i++) { + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.accepted_attestors[i]).hash); + } + bufferWriter.writeCompactSize(this.attestation_keys.length); + for (let i = 0; i < this.attestation_keys.length; i++) { + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.attestation_keys[i]).hash); + } + bufferWriter.writeCompactSize(this.attestor_filters.length); + for (let i = 0; i < this.attestor_filters.length; i++) { + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.attestor_filters[i]).hash); } - return retVal; + return bufferWriter.buffer; } - getAttestationProvisioningData() { - if (this.vdxfkey != __1.ATTESTATION_PROVISION_TYPE.vdxfid) { - throw new Error("Invalid attestation request type"); + fromBuffer(buffer, offset = 0) { + const reader = new BufferReader(buffer, offset); + this.attestation_id = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + let attestorCount = reader.readCompactSize(); + for (let i = 0; i < attestorCount; i++) { + this.accepted_attestors.push((0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION)); } - const reader = new BufferReader(Buffer.from(this.data, 'hex'), 0); - let dataDescriptorItemsCount = reader.readCompactSize(); - let dataDescriptors = []; - for (let i = 0; i < dataDescriptorItemsCount; i++) { - let dataDescriptor = new DataDescriptor_1.DataDescriptor(); - reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); - dataDescriptors.push(dataDescriptor); + let attestationKeyCount = reader.readCompactSize(); + for (let i = 0; i < attestationKeyCount; i++) { + this.attestation_keys.push((0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION)); } - return dataDescriptors; + let attestorFilterCount = reader.readCompactSize(); + for (let i = 0; i < attestorFilterCount; i++) { + this.attestor_filters.push((0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION)); + } + return reader.offset; } } -exports.Attestation = Attestation; +exports.AttestationProvisioningData = AttestationProvisioningData; diff --git a/dist/vdxf/classes/DataDescriptor.d.ts b/dist/vdxf/classes/DataDescriptor.d.ts index bcfa6da..9fd95f7 100644 --- a/dist/vdxf/classes/DataDescriptor.d.ts +++ b/dist/vdxf/classes/DataDescriptor.d.ts @@ -50,7 +50,7 @@ export declare class DataDescriptor { HasLabel(): boolean; CalcFlags(): BigNumber; SetFlags(): void; - IsValid(): boolean; + isValid(): boolean; toJson(): { version: string; flags: string; @@ -105,7 +105,7 @@ export declare class MMRDescriptor { toBuffer(): Buffer; fromBuffer(buffer: Buffer, offset?: number): number; HasData(): boolean; - IsValid(): boolean; + isValid(): boolean; toJson(): { version: string; objecthashtype: EHashTypes; diff --git a/dist/vdxf/classes/DataDescriptor.js b/dist/vdxf/classes/DataDescriptor.js index 468fa46..2aa263f 100644 --- a/dist/vdxf/classes/DataDescriptor.js +++ b/dist/vdxf/classes/DataDescriptor.js @@ -209,7 +209,7 @@ class DataDescriptor { SetFlags() { this.flags = this.CalcFlags(); } - IsValid() { + isValid() { return !!(this.version.gte(DataDescriptor.FIRST_VERSION) && this.version.lte(DataDescriptor.LAST_VERSION) && this.flags.and(DataDescriptor.FLAG_MASK.notn(DataDescriptor.FLAG_MASK.bitLength()))); } toJson() { @@ -419,7 +419,7 @@ class MMRDescriptor { HasData() { return !!(this.mmrHashes.objectdata && this.dataDescriptors); } - IsValid() { + isValid() { return this.version >= MMRDescriptor.FIRST_VERSION && this.version <= MMRDescriptor.LAST_VERSION; } toJson() { @@ -560,10 +560,10 @@ const VectorEncodeVDXFUni = (obj) => { } else if (objTypeKey == VDXF_Data.DataRatingsKey().vdxfid) { const version = new bn_js_1.BN(oneValValues[k].version); - const trustLevel = new bn_js_1.BN(oneValValues[k].trustLevel); + const trust_level = new bn_js_1.BN(oneValValues[k].trust_level); const destinations = Object.keys(oneValValues[k].rating); const values = Object.values(oneValValues[k]); - const oneRatingMap = new Rating_1.Rating({ ratings: new Map(destinations.map((key, index) => [key, Buffer.from(values[index], 'hex')])), version, trustLevel }); + const oneRatingMap = new Rating_1.Rating({ ratings: new Map(destinations.map((key, index) => [key, Buffer.from(values[index], 'hex')])), version, trust_level }); let length = 20; length += varint_1.default.encodingLength(oneRatingMap.version); length += varuint_1.default.encodingLength(oneRatingMap.getByteLength()); @@ -673,7 +673,7 @@ const VDXFDataToUniValue = (buffer, offset = 0, pSuccess = null) => { version = reader.readVarInt(); objSize = reader.readCompactSize(); reader.offset = oneCurrencyMap.fromBuffer(reader.buffer, reader.offset); - if (oneCurrencyMap.IsValid()) { + if (oneCurrencyMap.isValid()) { objectUni = { [checkVal]: oneCurrencyMap.toJson() }; } } @@ -682,7 +682,7 @@ const VDXFDataToUniValue = (buffer, offset = 0, pSuccess = null) => { version = reader.readVarInt(); objSize = reader.readCompactSize(); reader.offset = oneRatingObj.fromBuffer(reader.buffer, reader.offset); - if (oneRatingObj.IsValid()) { + if (oneRatingObj.isValid()) { objectUni = { [checkVal]: oneRatingObj.toJson() }; } } @@ -691,7 +691,7 @@ const VDXFDataToUniValue = (buffer, offset = 0, pSuccess = null) => { version = reader.readVarInt(); objSize = reader.readCompactSize(); reader.offset = oneTransferDest.fromBuffer(reader.buffer, reader.offset); - if (oneTransferDest.IsValid()) { + if (oneTransferDest.isValid()) { objectUni = { [checkVal]: oneTransferDest.toJson() }; } } @@ -702,7 +702,7 @@ const VDXFDataToUniValue = (buffer, offset = 0, pSuccess = null) => { // ss >> VARINT(version); // ss >> COMPACTSIZE(objSize); // ss >> oneContentRemove; - // if (oneContentRemove.IsValid()) + // if (oneContentRemove.isValid()) // { // objectUni = UniValue(UniValue::VOBJ); // objectUni.pushKV(EncodeDestination(CIdentityID(checkVal)), oneContentRemove.ToUniValue()); @@ -729,7 +729,7 @@ const VDXFDataToUniValue = (buffer, offset = 0, pSuccess = null) => { // ss >> VARINT(version); // ss >> COMPACTSIZE(objSize); // ss >> dataRef; - // if (dataRef.IsValid()) + // if (dataRef.isValid()) // { // objectUni = UniValue(UniValue::VOBJ); // objectUni.pushKV(EncodeDestination(CIdentityID(checkVal)), dataRef.ToUniValue()); @@ -740,7 +740,7 @@ const VDXFDataToUniValue = (buffer, offset = 0, pSuccess = null) => { version = reader.readVarInt(); objSize = reader.readCompactSize(); reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); - if (dataDescriptor.IsValid()) { + if (dataDescriptor.isValid()) { objectUni = { [checkVal]: dataDescriptor.toJson() }; } } @@ -749,7 +749,7 @@ const VDXFDataToUniValue = (buffer, offset = 0, pSuccess = null) => { version = reader.readVarInt(); objSize = reader.readCompactSize(); reader.offset = mmrDescriptor.fromBuffer(reader.buffer, reader.offset); - if (mmrDescriptor.IsValid()) { + if (mmrDescriptor.isValid()) { objectUni = { [checkVal]: mmrDescriptor.toJson() }; } } @@ -758,7 +758,7 @@ const VDXFDataToUniValue = (buffer, offset = 0, pSuccess = null) => { version = reader.readVarInt(); objSize = reader.readCompactSize(); reader.offset = sigData.fromBuffer(reader.buffer, reader.offset); - if (sigData.IsValid()) { + if (sigData.isValid()) { objectUni = { [checkVal]: sigData.toJson() }; } } diff --git a/dist/vdxf/classes/SignatureData.d.ts b/dist/vdxf/classes/SignatureData.d.ts index 5809707..f327d7d 100644 --- a/dist/vdxf/classes/SignatureData.d.ts +++ b/dist/vdxf/classes/SignatureData.d.ts @@ -24,7 +24,7 @@ export declare class SignatureData implements SerializableEntity { getByteLength(): number; toBuffer(): Buffer; fromBuffer(buffer: Buffer, offset?: number): number; - IsValid(): boolean; + isValid(): boolean; toJson(): { version: string; systemid: string; diff --git a/dist/vdxf/classes/SignatureData.js b/dist/vdxf/classes/SignatureData.js index 43681c6..90093b4 100644 --- a/dist/vdxf/classes/SignatureData.js +++ b/dist/vdxf/classes/SignatureData.js @@ -123,7 +123,7 @@ class SignatureData { this.signatureAsVch = reader.readVarSlice(); return reader.offset; } - IsValid() { + isValid() { return !!(this.version.gte(SignatureData.FIRST_VERSION) && this.version.lte(SignatureData.LAST_VERSION) && this.systemID); diff --git a/dist/vdxf/index.js b/dist/vdxf/index.js index 343a02f..5b59082 100644 --- a/dist/vdxf/index.js +++ b/dist/vdxf/index.js @@ -53,7 +53,7 @@ class VDXFObject { return Buffer.alloc(0); } fromDataBuffer(buffer, offset = 0) { - return offset + 1; + return offset; } isValidVersion() { return true; diff --git a/src/__tests__/attestation/attestation.test.ts b/src/__tests__/attestation/attestation.test.ts index 21254d4..6a478f6 100644 --- a/src/__tests__/attestation/attestation.test.ts +++ b/src/__tests__/attestation/attestation.test.ts @@ -2,31 +2,27 @@ import { LOGIN_CONSENT_ATTESTATION_WEBHOOK_VDXF_KEY, PROFILE_DATA_VIEW_REQUEST, LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY, - ATTESTATION_READ_REQUEST, IDENTITY_VIEW, - IDENTITYDATA_FIRSTNAME, LOGIN_CONSENT_REDIRECT_VDXF_KEY, - VerusIDSignature, - IDENTITYDATA_LASTNAME, - IDENTITYDATA_ATTESTOR, - IDENTITYDATA_IDENTITY, - IDENTITYDATA_PERSONAL_DETAILS, - IDENTITYDATA_CONTACT, - IDENTITYDATA_LOCATIONS, - IDENTITYDATA_BANKING_INFORMATION, - IDENTITYDATA_DOCUMENTS_AND_IMAGES + IDENTITY_PERSONALDETAILS, + IDENTITY_CONTACTDETAILS, + IDENTITY_LOCATION, + IDENTITY_BANKINGDETAILS, + IDENTITY_DOCUMENTS, + ATTESTATION_PROVISION_TYPE, + ATTESTATION_PROVISION_OBJECT } from "../../vdxf"; import { Attestation, LoginConsentRequest } from "../../vdxf/classes"; import { RedirectUri, RequestedPermission } from "../../vdxf/classes/Challenge"; import { Context } from "../../vdxf/classes/Context"; import { Subject } from "../../vdxf/classes/Challenge"; - - +import { DataDescriptor } from "../../vdxf/classes/DataDescriptor"; +import { toBase58Check, fromBase58Check } from '../../utils/address'; describe('Serializes and deserializes attestation request', () => { - test("request profile information", async () => { + test("request profile information to Create an Attestation", async () => { const profileInfoRequest = new LoginConsentRequest({ system_id: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", @@ -44,23 +40,23 @@ describe('Serializes and deserializes attestation request', () => { ], redirect_uris: [], subject: [new Subject( - IDENTITYDATA_PERSONAL_DETAILS.vdxfid, + IDENTITY_PERSONALDETAILS.vdxfid, PROFILE_DATA_VIEW_REQUEST.vdxfid ), new Subject( - IDENTITYDATA_CONTACT.vdxfid, + IDENTITY_CONTACTDETAILS.vdxfid, PROFILE_DATA_VIEW_REQUEST.vdxfid ), new Subject( - IDENTITYDATA_LOCATIONS.vdxfid, + IDENTITY_LOCATION.vdxfid, PROFILE_DATA_VIEW_REQUEST.vdxfid ), new Subject( - IDENTITYDATA_BANKING_INFORMATION.vdxfid, + IDENTITY_BANKINGDETAILS.vdxfid, PROFILE_DATA_VIEW_REQUEST.vdxfid ), new Subject( - IDENTITYDATA_DOCUMENTS_AND_IMAGES.vdxfid, + IDENTITY_DOCUMENTS.vdxfid, PROFILE_DATA_VIEW_REQUEST.vdxfid ), new Subject( @@ -71,8 +67,13 @@ describe('Serializes and deserializes attestation request', () => { provisioning_info: [], created_at: Number((Date.now() / 1000).toFixed(0)), } - }); + + const serializedRequest = profileInfoRequest.toBuffer().toString('hex'); // Serialize the request to a hex string + const newProfileInfoRequest = new LoginConsentRequest(); + + newProfileInfoRequest.fromBuffer(Buffer.from(serializedRequest, 'hex')); // Deserialize the request from the hex string + expect(serializedRequest).toStrictEqual(newProfileInfoRequest.toBuffer().toString('hex')) // Compare the original serialized request to the new serialized request }); test("send attestation to a user", async () => { @@ -101,11 +102,39 @@ describe('Serializes and deserializes attestation request', () => { }, }); + const serializedRequest = req.toBuffer().toString('hex'); // Serialize the request to a hex string + const newProfileInfoRequest = new LoginConsentRequest(); + + newProfileInfoRequest.fromBuffer(Buffer.from(serializedRequest, 'hex')); // Deserialize the request from the hex string + expect(serializedRequest).toStrictEqual(newProfileInfoRequest.toBuffer().toString('hex')) // Compare the original serialized request to the new serialized request }); + test('attestation provision serialize and deserialize', async () => { + + const attestationDataDescriptor = DataDescriptor.fromJson({ + version: 1, + "flags": 2, + "objectdata": { + "i4GC1YGEVD21afWudGoFJVdnfjJ5XWnCQv": { + "version": 1, + "flags": 96, + "mimetype": "text/plain", + "objectdata": { + "message": "John" + }, + "label": "i4GqsotHGa4czCdtg2d8FVHKfJFzVyBPrM" + } + }, + "salt": "4f66603f256d3f757b6dc3ea44802d4041d2a1901e06005028fd60b85a5878a2" + }); + + const attestationitem = Buffer.concat([fromBase58Check(ATTESTATION_PROVISION_TYPE.vdxfid).hash, + Buffer.from([0x01]), + attestationDataDescriptor.toBuffer()]); + + const attestationObject = new Attestation(attestationitem.toString('hex'), ATTESTATION_PROVISION_OBJECT.vdxfid); - test('attestation request with reply', async () => { const req = new LoginConsentRequest({ system_id: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", signing_id: "iB5PRXMHLYcNtM8dfLB6KwfJrHU2mKDYuU", @@ -128,29 +157,15 @@ describe('Serializes and deserializes attestation request', () => { context: new Context({ ["i4KyLCxWZXeSkw15dF95CUKytEK3HU7em9"]: "test", }), + attestations: [ attestationObject] }, }); - // TODO - // const componentsMap = new Map(); - - // componentsMap.set(0, new AttestationDataType("Chris", IDENTITYDATA_FIRSTNAME.vdxfid, "8e6744dc4f229e543bbd00d65b395829e44c8eb7b358ee3131ca25e6ecc3b210")); - // componentsMap.set(1, new AttestationDataType("Monkins", IDENTITYDATA_LASTNAME.vdxfid, "7c3920940db4385cd305557a57a8df33346712096e76b58d7c4ace05e17b90a2")); - // componentsMap.set(2, new AttestationDataType("chad@", IDENTITYDATA_IDENTITY.vdxfid, "ce662d61a20ae211728cdb1b924628c84edfe0fcbd59a86f56a125ad73689ac1")); - // componentsMap.set(3, new AttestationDataType("valu attestation@", IDENTITYDATA_ATTESTOR.vdxfid, "9067dc6a9b38dd15f985770bb819eb62de39a5d1f0e12f9a4807f78968794af4")); - - - // const signaturesForAttestation = new VerusIDSignature({ - // signature: "AYG2IQABQSAN1fp6A9NIVbxvKuOVLLU+0I+G3oQGbRtS6u4Eampfb217Cdf5FCMScQhV9kMxtjI9GWzpchmjuiTB2tctk6qT", - // }) + const serializedRequest = req.toBuffer().toString('hex'); // Serialize the request to a hex string + const attestationProvisionRequest = new LoginConsentRequest(); - // const attestationResponse = new Attestation({ - // data: new AttestationData(componentsMap), - // signature: signaturesForAttestation, - // system_id: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - // signing_id: "iB5PRXMHLYcNtM8dfLB6KwfJrHU2mKDYuU" - // }, - // ); + attestationProvisionRequest.fromBuffer(Buffer.from(serializedRequest, 'hex')); // Deserialize the request from the hex string + expect(serializedRequest).toStrictEqual(attestationProvisionRequest.toBuffer().toString('hex')) // Compare the original serialized request to the new serialized request }); diff --git a/src/__tests__/attestation/personalInfo.test.ts b/src/__tests__/attestation/personalInfo.test.ts index 170b336..9c34c95 100644 --- a/src/__tests__/attestation/personalInfo.test.ts +++ b/src/__tests__/attestation/personalInfo.test.ts @@ -22,13 +22,16 @@ describe('Create a personal info request', () => { "salt": "4f66603f256d3f757b6dc3ea44802d4041d2a1901e06005028fd60b85a5878a2" }); - const testserali = personalDataCategory.toBuffer().toString('hex'); + const initialDescriptor = personalDataCategory.toBuffer().toString('hex'); + const newDescriptor = new DataDescriptor(); - expect(testserali).toStrictEqual("01024b08a2ebb2c55f83a8e2a426a53320ed4d42124f4d01350160044a6f686e2269344771736f7448476134637a436474673264384656484b664a467a56794250724d0a746578742f706c61696e204f66603f256d3f757b6dc3ea44802d4041d2a1901e06005028fd60b85a5878a2"); + newDescriptor.fromBuffer(Buffer.from(initialDescriptor, 'hex')); + + expect(initialDescriptor).toStrictEqual(newDescriptor.toBuffer().toString('hex')); }); - test('serialize mmrdescriptor', async () => { + test('serialize and deserialize a mmrdescriptor', async () => { const mmrdescriptor = { "version": 1, @@ -81,12 +84,16 @@ describe('Create a personal info request', () => { } const mmrdescriptorBuffer = MMRDescriptor.fromJson(mmrdescriptor); - const mmrbuffer = mmrdescriptorBuffer.toBuffer().toString('hex'); - expect(mmrbuffer).toStrictEqual("01050101002030395e0868b1953477e14bb5c16349622239a94115a4d1f02b72b6ecf8b1c79c01005741d826d3c6cbbc3a96992670d2f604e959fd1a8c014102f1eac8f180bee7fb256b801b219e20612fbc9f5e99da111a8364d1197ff3e3fbef8259770f618dacee9489e8cd2cd5dd77d36ede6c42cebdabd85a5b5e8af60b0201024c08a2ebb2c55f83a8e2a426a53320ed4d42124f4d013601600543687269732269344771736f7448476134637a436474673264384656484b664a467a56794250724d0a746578742f706c61696e204f66603f256d3f757b6dc3ea44802d4041d2a1901e06005028fd60b85a5878a201024e08a2ebb2c55f83a8e2a426a53320ed4d42124f4d01380160074d6f6e6b696e73226948796254724e42316b5852726a7343744a5864366676424b786570714d7053355a0a746578742f706c61696e2062fae0c46b2ad1177749e25fd6d48ccb40213d3cc72e4b2b0dc533039cbe8314"); + const initialDescriptor = mmrdescriptorBuffer.toBuffer().toString('hex'); + const newDescriptor = new MMRDescriptor(); + + newDescriptor.fromBuffer(Buffer.from(initialDescriptor, 'hex')); + + expect(initialDescriptor).toStrictEqual(newDescriptor.toBuffer().toString('hex')); }); - test('serialize mmrdescriptor', async () => { + test('serialize and deserialize a mmrdescriptor', async () => { const mmrdescriptor = { "version": 1, @@ -139,11 +146,16 @@ describe('Create a personal info request', () => { } const mmrdescriptorBuffer = MMRDescriptor.fromJson(mmrdescriptor); - const mmrbuffer = mmrdescriptorBuffer.toBuffer().toString('hex'); - expect(mmrbuffer).toStrictEqual("01050101002030395e0868b1953477e14bb5c16349622239a94115a4d1f02b72b6ecf8b1c79c01005741d826d3c6cbbc3a96992670d2f604e959fd1a8c014102f1eac8f180bee7fb256b801b219e20612fbc9f5e99da111a8364d1197ff3e3fbef8259770f618dacee9489e8cd2cd5dd77d36ede6c42cebdabd85a5b5e8af60b0201024c08a2ebb2c55f83a8e2a426a53320ed4d42124f4d013601600543687269732269344771736f7448476134637a436474673264384656484b664a467a56794250724d0a746578742f706c61696e204f66603f256d3f757b6dc3ea44802d4041d2a1901e06005028fd60b85a5878a201024e08a2ebb2c55f83a8e2a426a53320ed4d42124f4d01380160074d6f6e6b696e73226948796254724e42316b5852726a7343744a5864366676424b786570714d7053355a0a746578742f706c61696e2062fae0c46b2ad1177749e25fd6d48ccb40213d3cc72e4b2b0dc533039cbe8314"); + const initialDescriptor = mmrdescriptorBuffer.toBuffer().toString('hex'); + const newDescriptor = new MMRDescriptor(); + + newDescriptor.fromBuffer(Buffer.from(initialDescriptor, 'hex')); + + expect(initialDescriptor).toStrictEqual(newDescriptor.toBuffer().toString('hex')); }); - test('serialize mmrdescriptor', async () => { + + test('serialize and deserialize an encrypted mmrdescriptor', async () => { const encryptedmmrdescriptor = { "version": 1, @@ -178,12 +190,16 @@ describe('Create a personal info request', () => { } const mmrdescriptorBuffer = MMRDescriptor.fromJson(encryptedmmrdescriptor); - const mmrbuffer = mmrdescriptorBuffer.toBuffer().toString('hex'); - expect(mmrbuffer).toStrictEqual("010501010549dec21b940a475989ac9220081ec3816a0026921594462841d2155a3d8462bdd8ada9f02cb7b795a01b842dce0a3c5bfe83e57fd46f34b19a67ee716a1e771264db1b7831cd2341a51520bdea4d6f2a88a954bed38de4ed6e7f6ff7d483fc799f1428be2ccfe6f27c87c90105808ad904b879fc67d7f0ceee8accd593549af8225d03772153465c666bb552eff607883d3d07f154a5515e167d9952feb7e3c121033e18ae855cdad782bc7ccbeb8e4737e9fdfcad31dc066695014e8aec572d4de728b8a1dedd740891ee848f85cc5eb16959761d89feafd78ac1e93494d08ea50311fa424c436bdb24b47ff369207939e04d89b5713ad3a809ba4cedb4b320df8f380a8b5999e24ce4465fe43b18020105960e953a1bb2c81f2c101d9439736e9f614e1c289621dedfd4a0ff8455a36473c8023f4c8a35bdc546e8e48e17030cb7bc418ef248705f0873f3a1ce5674b800030294cace9b26d8d5cf06ac5a7a379be8c2a1d3e6643249312cfa83fbfe9f882a8f5cde0ddb4b940a53e5d4e69bacffa571b6e8eca218ee9d02b751c71426e8433aeabe6cf79e54495510626b5c43c690c47ca877083520c7f2304a170a54dbb97951a93f7444cf689d487e46172f2f5e54923aefe8865e01059805615e1c62f2a0b5311ec1d4e78d7709f3e29ac52e98a87c4222796ee532f457d0f68a4759464d0d7ea72c90177752d7ee179cfcb25d42ff4d19755650443c1f26490d80db903d28423fb38bd32f19f855f50e52b1e53529da16da8755cfc9857a4a4af1bc4327caa691633a79ef718bcf4547abf5d4cc1f26f5f6919711fc99f6de8e351726d828b534aa090bdcdc5987b117fe0c0b2e0620cf066d1ca66ea90a7a3de353e4a7db6fd4f88c7ae2eb47bcef9a78a0c8be6010"); + const initialDescriptor = mmrdescriptorBuffer.toBuffer().toString('hex'); + const newDescriptor = new MMRDescriptor(); + + newDescriptor.fromBuffer(Buffer.from(initialDescriptor, 'hex')); + + expect(initialDescriptor).toStrictEqual(newDescriptor.toBuffer().toString('hex')); }); - test('serialize signaturedata', async () => { + test('serialize and deserialize signaturedata', async () => { const signaturedata = { "version": 1, @@ -196,22 +212,36 @@ describe('Create a personal info request', () => { } const mmrdescriptorBuffer = SignatureData.fromJson(signaturedata); - const mmrbuffer = mmrdescriptorBuffer.toBuffer().toString('hex'); - expect(mmrbuffer).toStrictEqual("01a6ef9ea235635e328124ff3429db9f9e91b64e2d0120da513b88a56ef93a55cfd7e8f49e1143fd26a2e6095a67fc0d368327d8e3d3dfb26820ee0c9b1276aac834cf457026a575dfce8401000000490205ce0a000001411f0a24ae90af6d838e9c60ea479b1cca8cdaae583c8d73c1f9f3eb8b48e626aa551c354c5607c8f79f34f544729e246ca0740c2b523e6267f03d1f7faa615f47f6"); + const initialDescriptor = mmrdescriptorBuffer.toBuffer().toString('hex'); + const newDescriptor = new SignatureData(); + + newDescriptor.fromBuffer(Buffer.from(initialDescriptor, 'hex')); + expect(initialDescriptor).toStrictEqual(newDescriptor.toBuffer().toString('hex')); + }); - test('deserialize mmrhashes', async () => { + test('deserialize and desserialize mmrhashes', async () => { const mmrhashes = DataDescriptor.fromJson({ "version": 1, "flags": 0, "objectdata": "41d826d3c6cbbc3a96992670d2f604e959fd1a8c014102c78ee8fa7c01db81cbf60181fc9baa101aa8c07d40c324d771145699168d3b18867a587f139173cf8b961d581fe15bbf15f5d02813a615e54c050d2b6b1cd4ee" }) + + const initialDescriptor = mmrhashes.toBuffer().toString('hex'); + const newDescriptor = new DataDescriptor(); + + newDescriptor.fromBuffer(Buffer.from(initialDescriptor, 'hex')); + + expect(initialDescriptor).toStrictEqual(newDescriptor.toBuffer().toString('hex')); + + // test to see if the hashed object is the correct size const hashes = mmrhashes.DecodeHashVector(); expect(typeof hashes).toStrictEqual('object') expect(hashes.length).toStrictEqual(2); - expect(hashes[0].toString('hex')).toStrictEqual("c78ee8fa7c01db81cbf60181fc9baa101aa8c07d40c324d771145699168d3b18"); + expect(hashes[0].length).toStrictEqual(32); + expect(hashes[1].length).toStrictEqual(32); }); diff --git a/src/__tests__/pbaas/reservetransfer.test.ts b/src/__tests__/pbaas/reservetransfer.test.ts index 0cb972e..9806a4e 100644 --- a/src/__tests__/pbaas/reservetransfer.test.ts +++ b/src/__tests__/pbaas/reservetransfer.test.ts @@ -2,7 +2,7 @@ import { BN } from "bn.js"; import { CurrencyValueMap } from "../../pbaas/CurrencyValueMap"; import { ReserveTransfer } from "../../pbaas/ReserveTransfer"; import { BigNumber } from "../../utils/types/BigNumber"; -import { DEST_ETH, DEST_ID, DEST_PKH, TransferDestination } from "../../pbaas/TransferDestination"; +import { DEST_ETH, DEST_ID, DEST_PKH, TransferDestination, DEST_INVALID } from "../../pbaas/TransferDestination"; import { fromBase58Check } from "../../utils/address"; describe('Serializes and deserializes token output properly', () => { @@ -338,4 +338,45 @@ describe('Serializes and deserializes token output properly', () => { expect(transdestid.isETHAccount()).toBe(false); expect(transdestid.isPKH()).toBe(false); }); + + test('transferdestination isValid working as intended', async () => { + const destpkh = "R9J8E2no2HVjQmzX6Ntes2ShSGcn7WiRcx"; + const desteth = "0x1f9090aae28b8a3dceadf281b0f12828e676c326"; + + const transdestpkh = new TransferDestination({ + type: DEST_PKH, + destination_bytes: fromBase58Check(destpkh).hash + }); + expect(transdestpkh.isValid()).toBe(true); + + const transdesteth = new TransferDestination({ + type: DEST_INVALID, + destination_bytes: Buffer.from(desteth.substring(2), 'hex') + }); + expect(transdesteth.isValid()).toBe(false); + }); + + test('transferdestination getAuxDest working as intended', async () => { + const destpkh = "R9J8E2no2HVjQmzX6Ntes2ShSGcn7WiRcx"; + const desteth = "0x1f9090aae28b8a3dceadf281b0f12828e676c326"; + + const auxDest = [new TransferDestination({ + type: DEST_ETH, + destination_bytes: Buffer.from(desteth.substring(2), 'hex') + })] + + const transdestpkh = new TransferDestination({ + type: DEST_PKH, + destination_bytes: fromBase58Check(destpkh).hash, + aux_dests: auxDest + }); + + const extractedAuxDest = transdestpkh.getAuxDest(0); + + expect(extractedAuxDest.getAddressString()).toBe(desteth); + expect(extractedAuxDest.isETHAccount()).toBe(true); + expect(extractedAuxDest.isPKH()).toBe(false); + expect(extractedAuxDest.isIAddr()).toBe(false); + + }); }); \ No newline at end of file diff --git a/src/__tests__/vdxf/loginconsent.test.ts b/src/__tests__/vdxf/loginconsent.test.ts index 6f2dade..f5d2168 100644 --- a/src/__tests__/vdxf/loginconsent.test.ts +++ b/src/__tests__/vdxf/loginconsent.test.ts @@ -220,68 +220,4 @@ describe('Serializes and deserializes signature objects properly', () => { expect(_req.getChallengeHash().toString('hex')).toBe(req.getChallengeHash().toString('hex')) }); - test('attestation request', async () => { - const req = new LoginConsentRequest({ - system_id: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - signing_id: "iB5PRXMHLYcNtM8dfLB6KwfJrHU2mKDYuU", - signature: { - signature: - "AYG2IQABQSAN1fp6A9NIVbxvKuOVLLU+0I+G3oQGbRtS6u4Eampfb217Cdf5FCMScQhV9kMxtjI9GWzpchmjuiTB2tctk6qT", - }, - challenge: { - challenge_id: "iKNufKJdLX3Xg8qFru9AuLBvivAEJ88PW4", - requested_access: [new RequestedPermission(IDENTITY_VIEW.vdxfid, "")], - session_id: "iRQZGW36o3RcVR1xyVT1qWdAKdxp3wUyrh", - redirect_uris: [ - new RedirectUri( - "https://www.verus.io", - LOGIN_CONSENT_REDIRECT_VDXF_KEY.vdxfid - ), - ], - created_at: 1664382484, - salt: "i6NawEzHMocZnU4h8pPkGpHApvsrHjxwXE", - context: new Context({ - ["i4KyLCxWZXeSkw15dF95CUKytEK3HU7em9"]: "test", - }), - }, - }); - - const res = new LoginConsentResponse({ - system_id: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - signing_id: "iB5PRXMHLYcNtM8dfLB6KwfJrHU2mKDYuU", - signature: { - signature: - "AYG2IQABQSAN1fp6A9NIVbxvKuOVLLU+0I+G3oQGbRtS6u4Eampfb217Cdf5FCMScQhV9kMxtjI9GWzpchmjuiTB2tctk6qT", - }, - decision: { - decision_id: "iBTMBHzDbsW3QG1MLBoYtmo6c1xuzn6xxb", - context: new Context({ - ["i4KyLCxWZXeSkw15dF95CUKytEK3HU7em9"]: "test", - }), - request: req, - created_at: 1664392484 - } - }) - - const reqbuf = req.toBuffer() - const _req = new LoginConsentRequest() - _req.fromBuffer(reqbuf) - - const resbuf = res.toBuffer() - const _res = new LoginConsentResponse() - _res.fromBuffer(resbuf) - - - expect(_res.toBuffer().toString('hex')).toBe(resbuf.toString('hex')); - expect(_req.toBuffer().toString('hex')).toBe(reqbuf.toString('hex')); - - expect(_res.getDecisionHash(10000, 1).toString('hex')).toBe(res.getDecisionHash(10000, 1).toString('hex')) - expect(_req.getChallengeHash(10000, 1).toString('hex')).toBe(req.getChallengeHash(10000, 1).toString('hex')) - expect(_res.getDecisionHash(10000, 2).toString('hex')).toBe(res.getDecisionHash(10000, 2).toString('hex')) - expect(_req.getChallengeHash(10000, 2).toString('hex')).toBe(req.getChallengeHash(10000, 2).toString('hex')) - - const uri = _req.toWalletDeeplinkUri() - - expect(uri).toBe(LoginConsentRequest.fromWalletDeeplinkUri(uri).toWalletDeeplinkUri()); - }); }); diff --git a/src/pbaas/ContentMultiMapRemove.ts b/src/pbaas/ContentMultiMapRemove.ts index f54748f..0f359ff 100644 --- a/src/pbaas/ContentMultiMapRemove.ts +++ b/src/pbaas/ContentMultiMapRemove.ts @@ -11,8 +11,8 @@ const { BufferReader, BufferWriter } = bufferutils export class ContentMultiMapRemove implements SerializableEntity { version: BigNumber; action: BigNumber; - entryKey: string; - valueHash: Buffer; + entry_key: string; + value_hash: Buffer; static VERSION_INVALID = new BN(0); static VERSION_FIRST = new BN(1); @@ -25,11 +25,11 @@ export class ContentMultiMapRemove implements SerializableEntity { static ACTION_CLEAR_MAP = new BN(4); static ACTION_LAST = new BN(4); - constructor (data: { version?: BigNumber, action?: BigNumber, entryKey?: string, valueHash?: Buffer}) { + constructor (data: { version?: BigNumber, action?: BigNumber, entry_key?: string, value_hash?: Buffer}) { this.version = data.version || new BN(1, 10); this.action = data.action || new BN(0, 10); - this.entryKey = data.entryKey || ""; - this.valueHash = data.valueHash || Buffer.alloc(0); + this.entry_key = data.entry_key || ""; + this.value_hash = data.value_hash || Buffer.alloc(0); } getByteLength() { @@ -53,9 +53,9 @@ export class ContentMultiMapRemove implements SerializableEntity { bufferWriter.writeUInt32(this.action.toNumber()); if (this.action != ContentMultiMapRemove.ACTION_CLEAR_MAP){ - bufferWriter.writeSlice(fromBase58Check(this.entryKey).hash); + bufferWriter.writeSlice(fromBase58Check(this.entry_key).hash); if (this.action != ContentMultiMapRemove.ACTION_REMOVE_ALL_KEY){ - bufferWriter.writeSlice(this.valueHash); + bufferWriter.writeSlice(this.value_hash); } } @@ -69,9 +69,9 @@ export class ContentMultiMapRemove implements SerializableEntity { this.action = new BN(reader.readUInt32()); if (this.action != ContentMultiMapRemove.ACTION_CLEAR_MAP){ - this.entryKey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION) + this.entry_key = toBase58Check(reader.readSlice(20), I_ADDR_VERSION) if (this.action != ContentMultiMapRemove.ACTION_REMOVE_ALL_KEY){ - this.valueHash = reader.readSlice(32) + this.value_hash = reader.readSlice(32) } } return reader.offset; diff --git a/src/pbaas/CurrencyValueMap.ts b/src/pbaas/CurrencyValueMap.ts index b79823d..4b46bc5 100644 --- a/src/pbaas/CurrencyValueMap.ts +++ b/src/pbaas/CurrencyValueMap.ts @@ -77,7 +77,7 @@ export class CurrencyValueMap implements SerializableEntity { return reader.offset; } - IsValid():boolean + isValid():boolean { for (let [key, value] of this.value_map) { @@ -90,7 +90,7 @@ export class CurrencyValueMap implements SerializableEntity { } toJson() { - const value_map: any = {}; + const value_map: {[key: string]: string} = {}; for (let [key, value] of this.value_map) { value_map[key] = value.toString() diff --git a/src/pbaas/Rating.ts b/src/pbaas/Rating.ts index 84767b7..9520eab 100644 --- a/src/pbaas/Rating.ts +++ b/src/pbaas/Rating.ts @@ -1,4 +1,3 @@ -import varint from '../utils/varint' import varuint from '../utils/varuint' import { fromBase58Check, toBase58Check } from "../utils/address"; import bufferutils from '../utils/bufferutils' @@ -8,7 +7,6 @@ import { I_ADDR_VERSION } from '../constants/vdxf'; import { SerializableEntity } from '../utils/types/SerializableEntity'; const { BufferReader, BufferWriter } = bufferutils - export class Rating implements SerializableEntity { static VERSION_INVALID = new BN(0, 10) @@ -23,12 +21,12 @@ export class Rating implements SerializableEntity { static TRUST_LAST = new BN(2, 10) version: BigNumber; - trustLevel: BigNumber; - ratings: Map; + trust_level: BigNumber; + ratings: Map; - constructor (data: { version?: BigNumber, trustLevel?: BigNumber, ratings?: Map} = {}) { + constructor(data: { version?: BigNumber, trust_level?: BigNumber, ratings?: Map } = {}) { this.version = data.version || new BN(1, 10); - this.trustLevel = data.trustLevel || new BN(0, 10); + this.trust_level = data.trust_level || new BN(0, 10); this.ratings = new Map(data.ratings || []); } @@ -36,12 +34,12 @@ export class Rating implements SerializableEntity { let byteLength = 0; byteLength += 4; // version uint32 - byteLength + 1; // trustLevel uint8 + byteLength + 1; // trust_level uint8 byteLength += varuint.encodingLength(this.ratings.size); for (const [key, value] of this.ratings) { byteLength += 20 - byteLength += varint.encodingLength(new BN(value.length)) + byteLength += varuint.encodingLength(value.length) byteLength += value.length } @@ -49,12 +47,11 @@ export class Rating implements SerializableEntity { return byteLength } - toBuffer () { + toBuffer() { const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) bufferWriter.writeUInt32(this.version.toNumber()); - bufferWriter.writeUInt8(this.trustLevel.toNumber()); - + bufferWriter.writeUInt8(this.trust_level.toNumber()); bufferWriter.writeCompactSize(this.ratings.size); for (const [key, value] of this.ratings) { @@ -67,11 +64,11 @@ export class Rating implements SerializableEntity { return bufferWriter.buffer } - fromBuffer (buffer: Buffer, offset: number = 0) { + fromBuffer(buffer: Buffer, offset: number = 0) { const reader = new BufferReader(buffer, offset); - + this.version = new BN(reader.readUInt32()); - this.trustLevel = new BN(reader.readUInt8()); + this.trust_level = new BN(reader.readUInt8()); const count = reader.readCompactSize(); @@ -87,14 +84,14 @@ export class Rating implements SerializableEntity { return reader.offset; } - IsValid() { + isValid() { return this.version.gte(Rating.VERSION_FIRST) && this.version.lte(Rating.VERSION_LAST) && - this.trustLevel.gte(Rating.TRUST_FIRST) && this.trustLevel.lte(Rating.TRUST_LAST); + this.trust_level.gte(Rating.TRUST_FIRST) && this.trust_level.lte(Rating.TRUST_LAST); } toJson() { return { version: this.version.toString(), - trustlevel: this.trustLevel.toString(), + trust_level: this.trust_level.toString(), ratings: this.ratings } } diff --git a/src/pbaas/TransferDestination.ts b/src/pbaas/TransferDestination.ts index 0d6a651..6e5731d 100644 --- a/src/pbaas/TransferDestination.ts +++ b/src/pbaas/TransferDestination.ts @@ -200,15 +200,15 @@ export class TransferDestination implements SerializableEntity { } } - IsValid(): boolean + isValid(): boolean { // verify aux dests let valid = (((this.type.and(FLAG_DEST_AUX).gt(new BN(0))) && this.aux_dests.length > 0) || (!(this.type.and(FLAG_DEST_AUX).gt(new BN(0))) && !(this.aux_dests.length > 0))); - if (valid && this.aux_dests) + if (valid && this.aux_dests && this.aux_dests.length > 0) { for (let i = 0; i < this.aux_dests.length; i++) { - if (!this.GetAuxDest(i).IsValid()) + if (!this.getAuxDest(i).isValid()) { valid = false; break; @@ -218,10 +218,10 @@ export class TransferDestination implements SerializableEntity { return !!(valid && !this.typeNoFlags().eq(DEST_INVALID) && this.typeNoFlags().lte(LAST_VALID_TYPE_NO_FLAGS) && - ((!(this.type.and(FLAG_DEST_GATEWAY)) && !this.gateway_id) || this.gateway_id)); + (((this.type.and(FLAG_DEST_GATEWAY).eq(new BN(0))) && (this.gateway_id == null)) || this.gateway_id != null)); } - GetAuxDest(destNum) + getAuxDest(destNum) { const retVal = this.aux_dests[destNum]; if (destNum >= 0 && destNum < this.aux_dests.length) diff --git a/src/vdxf/classes/Attestation.ts b/src/vdxf/classes/Attestation.ts index db0327f..e9dcffd 100644 --- a/src/vdxf/classes/Attestation.ts +++ b/src/vdxf/classes/Attestation.ts @@ -5,109 +5,208 @@ import { DataDescriptor } from './DataDescriptor'; import { ATTESTATION_VIEW_REQUEST, ATTESTATION_PROVISION_TYPE } from '../'; import varuint from '../../utils/varuint'; import { BufferDataVdxfObject } from '../index'; +import { Serializable } from 'child_process'; +import { SerializableEntity } from '../../utils/types/SerializableEntity'; const { BufferReader, BufferWriter } = bufferutils; -export interface AttestationRequestInterface { - attestationId: string, - accepted_attestors: Array, - attestation_keys: Array, - attestor_filters?: Array} - export class Attestation extends BufferDataVdxfObject { - setAttestationViewRequestData(attestationId: string, accepted_attestors: Array, attestation_keys: Array, attestor_filters: Array) { - - this.vdxfkey = ATTESTATION_VIEW_REQUEST.vdxfid; + getAttestationData(): { [key: string]: AttestationViewRequest } { - let length = 20; // attestationId - length += varuint.encodingLength(accepted_attestors.length); - length += accepted_attestors.length * 20; // accepted_attestors - length += varuint.encodingLength(attestation_keys.length); - length += attestation_keys.length * 20; // attestation_keys - length += varuint.encodingLength(attestor_filters.length); - length += attestor_filters.length * 20; // attestor_filters + const reader = new BufferReader(Buffer.from(this.data, 'hex')); - let writer = new BufferWriter(Buffer.alloc(length)); + const returnedData = {}; - writer.writeSlice(fromBase58Check(attestationId).hash); + while (reader.buffer.length > reader.offset) { - writer.writeCompactSize(accepted_attestors.length); + let vdxfkey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); - for (let i = 0; i < accepted_attestors.length; i++) { - writer.writeSlice(fromBase58Check(accepted_attestors[i]).hash); - } + switch (vdxfkey) { + case ATTESTATION_VIEW_REQUEST.vdxfid: + returnedData[vdxfkey] = new AttestationViewRequest(); + reader.offset = returnedData[vdxfkey].fromBuffer(reader.buffer, reader.offset); + break; + case ATTESTATION_PROVISION_TYPE.vdxfid: + + let dataDescriptorItemsCount = reader.readCompactSize(); - writer.writeCompactSize(attestation_keys.length); + let dataDescriptors = []; + + for (let i = 0; i < dataDescriptorItemsCount; i++) { + let dataDescriptor = new DataDescriptor(); + reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); + dataDescriptors.push(dataDescriptor); + } + returnedData[vdxfkey] = dataDescriptors; + break; + default: + throw new Error("Unsupported Attestation Data Type"); + } - for (let i = 0; i < attestation_keys.length; i++) { - writer.writeSlice(fromBase58Check(attestation_keys[i]).hash); } - writer.writeCompactSize(attestor_filters.length); + return returnedData; + } +} + +export class AttestationViewRequest implements SerializableEntity { + attestation_id: string; + accepted_attestors: Array; + attestation_keys: Array; + attestor_filters: Array; + + constructor(data?: { attestation_id?: string, accepted_attestors?: Array, attestation_keys?: Array, attestor_filters?: Array }) { + this.attestation_id = data.attestation_id || ""; + this.accepted_attestors = data.accepted_attestors || []; + this.attestation_keys = data.attestation_keys || []; + this.attestor_filters = data.attestor_filters || []; + } + + getByteLength() { + + let length = 0; // attestation_id + length += varuint.encodingLength(this.accepted_attestors.length); + length += this.accepted_attestors.length * 20; // accepted_attestors + length += varuint.encodingLength(this.attestation_keys.length); + length += this.attestation_keys.length * 20; // attestation_keys + length += varuint.encodingLength(this.attestor_filters.length); + length += this.attestor_filters.length * 20; // attestor_filters - for (let i = 0; i < attestor_filters.length; i++) { - writer.writeSlice(fromBase58Check(attestor_filters[i]).hash); - } + return length } - getAttestationViewRequestData(): AttestationRequestInterface { + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) + + bufferWriter.writeSlice(fromBase58Check(this.attestation_id).hash); + + bufferWriter.writeCompactSize(this.accepted_attestors.length); + + for (let i = 0; i < this.accepted_attestors.length; i++) { + bufferWriter.writeSlice(fromBase58Check(this.accepted_attestors[i]).hash); + } + + bufferWriter.writeCompactSize(this.attestation_keys.length); + + for (let i = 0; i < this.attestation_keys.length; i++) { + bufferWriter.writeSlice(fromBase58Check(this.attestation_keys[i]).hash); + } + + bufferWriter.writeCompactSize(this.attestor_filters.length); - if (this.vdxfkey != ATTESTATION_VIEW_REQUEST.vdxfid) { - throw new Error("Invalid attestation request type"); + for (let i = 0; i < this.attestor_filters.length; i++) { + bufferWriter.writeSlice(fromBase58Check(this.attestor_filters[i]).hash); } - let retVal: AttestationRequestInterface = { - attestationId: "", - accepted_attestors: [], - attestation_keys: [], - attestor_filters: [] - }; + return bufferWriter.buffer + } + + fromBuffer(buffer: Buffer, offset: number = 0) { + const reader = new BufferReader(buffer, offset); - const reader = new BufferReader(Buffer.from(this.data, 'hex'), 0); - retVal.attestationId = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + this.attestation_id = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); let attestorCount = reader.readCompactSize(); for (let i = 0; i < attestorCount; i++) { - retVal.accepted_attestors.push(toBase58Check(reader.readSlice(20), I_ADDR_VERSION)); + this.accepted_attestors.push(toBase58Check(reader.readSlice(20), I_ADDR_VERSION)); } let attestationKeyCount = reader.readCompactSize(); for (let i = 0; i < attestationKeyCount; i++) { - retVal.attestation_keys.push(toBase58Check(reader.readSlice(20), I_ADDR_VERSION)); + this.attestation_keys.push(toBase58Check(reader.readSlice(20), I_ADDR_VERSION)); } let attestorFilterCount = reader.readCompactSize(); for (let i = 0; i < attestorFilterCount; i++) { - retVal.attestor_filters.push(toBase58Check(reader.readSlice(20), I_ADDR_VERSION)); + this.attestor_filters.push(toBase58Check(reader.readSlice(20), I_ADDR_VERSION)); + } + + return reader.offset; + } + +} + +export class AttestationProvisioningData implements SerializableEntity { + attestation_id: string; + accepted_attestors: Array; + attestation_keys: Array; + attestor_filters: Array; + + constructor(data?: { attestation_id?: string, accepted_attestors?: Array, attestation_keys?: Array, attestor_filters?: Array }) { + this.attestation_id = data.attestation_id || ""; + this.accepted_attestors = data.accepted_attestors || []; + this.attestation_keys = data.attestation_keys || []; + this.attestor_filters = data.attestor_filters || []; + } + + getByteLength() { + + let length = 0; // attestation_id + length += varuint.encodingLength(this.accepted_attestors.length); + length += this.accepted_attestors.length * 20; // accepted_attestors + length += varuint.encodingLength(this.attestation_keys.length); + length += this.attestation_keys.length * 20; // attestation_keys + length += varuint.encodingLength(this.attestor_filters.length); + length += this.attestor_filters.length * 20; // attestor_filters + + return length + } + + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) + + bufferWriter.writeSlice(fromBase58Check(this.attestation_id).hash); + + bufferWriter.writeCompactSize(this.accepted_attestors.length); + + for (let i = 0; i < this.accepted_attestors.length; i++) { + bufferWriter.writeSlice(fromBase58Check(this.accepted_attestors[i]).hash); + } + + bufferWriter.writeCompactSize(this.attestation_keys.length); + + for (let i = 0; i < this.attestation_keys.length; i++) { + bufferWriter.writeSlice(fromBase58Check(this.attestation_keys[i]).hash); } - return retVal; + bufferWriter.writeCompactSize(this.attestor_filters.length); + for (let i = 0; i < this.attestor_filters.length; i++) { + bufferWriter.writeSlice(fromBase58Check(this.attestor_filters[i]).hash); + } + + return bufferWriter.buffer } - getAttestationProvisioningData() { + fromBuffer(buffer: Buffer, offset: number = 0) { + const reader = new BufferReader(buffer, offset); + + + this.attestation_id = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + + let attestorCount = reader.readCompactSize(); - if (this.vdxfkey != ATTESTATION_PROVISION_TYPE.vdxfid) { - throw new Error("Invalid attestation request type"); + for (let i = 0; i < attestorCount; i++) { + this.accepted_attestors.push(toBase58Check(reader.readSlice(20), I_ADDR_VERSION)); } - const reader = new BufferReader(Buffer.from(this.data, 'hex'), 0); + let attestationKeyCount = reader.readCompactSize(); - let dataDescriptorItemsCount = reader.readCompactSize(); + for (let i = 0; i < attestationKeyCount; i++) { + this.attestation_keys.push(toBase58Check(reader.readSlice(20), I_ADDR_VERSION)); + } - let dataDescriptors = []; + let attestorFilterCount = reader.readCompactSize(); - for (let i = 0; i < dataDescriptorItemsCount; i++) { - let dataDescriptor = new DataDescriptor(); - reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); - dataDescriptors.push(dataDescriptor); + for (let i = 0; i < attestorFilterCount; i++) { + this.attestor_filters.push(toBase58Check(reader.readSlice(20), I_ADDR_VERSION)); } - return dataDescriptors; + return reader.offset; } } \ No newline at end of file diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index e487010..7746bc3 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -5,12 +5,7 @@ import { ID_SYSTEMID_VDXF_KEY, Utf8DataVdxfObject, VDXFObject, - Utf8OrBase58Object, - ATTESTATION_READ_REQUEST, - IDENTITY_VIEW, - IDENTITY_AGREEMENT, - PROFILE_DATA_VIEW_REQUEST, - LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY + Utf8OrBase58Object } from "../"; import bufferutils from "../../utils/bufferutils"; import varuint from "../../utils/varuint"; diff --git a/src/vdxf/classes/DataDescriptor.ts b/src/vdxf/classes/DataDescriptor.ts index 377fda5..9427436 100644 --- a/src/vdxf/classes/DataDescriptor.ts +++ b/src/vdxf/classes/DataDescriptor.ts @@ -289,7 +289,7 @@ export class DataDescriptor { this.flags = this.CalcFlags(); } - IsValid(): boolean { + isValid(): boolean { return !!(this.version.gte(DataDescriptor.FIRST_VERSION) && this.version.lte(DataDescriptor.LAST_VERSION) && this.flags.and(DataDescriptor.FLAG_MASK.notn(DataDescriptor.FLAG_MASK.bitLength()))); } @@ -535,7 +535,7 @@ export class MMRDescriptor { return !!(this.mmrHashes.objectdata && this.dataDescriptors); } - IsValid(): boolean { + isValid(): boolean { return this.version >= MMRDescriptor.FIRST_VERSION && this.version <= MMRDescriptor.LAST_VERSION; } @@ -696,12 +696,12 @@ export const VectorEncodeVDXFUni = (obj): Buffer => { else if (objTypeKey == VDXF_Data.DataRatingsKey().vdxfid) { const version = new BN((oneValValues[k] as { version: number }).version); - const trustLevel = new BN((oneValValues[k] as { trustLevel: number }).trustLevel); + const trust_level = new BN((oneValValues[k] as { trust_level: number }).trust_level); const destinations = Object.keys((oneValValues[k] as { rating: BigNumber }).rating); const values = Object.values(oneValValues[k]); - const oneRatingMap = new Rating({ ratings: new Map(destinations.map((key, index) => [key, Buffer.from(values[index], 'hex')])), version, trustLevel }); + const oneRatingMap = new Rating({ ratings: new Map(destinations.map((key, index) => [key, Buffer.from(values[index], 'hex')])), version, trust_level }); let length = 20; length += varint.encodingLength(oneRatingMap.version); @@ -855,7 +855,7 @@ export const VDXFDataToUniValue = (buffer: Buffer, offset: number = 0, pSuccess version = reader.readVarInt(); objSize = reader.readCompactSize(); reader.offset = oneCurrencyMap.fromBuffer(reader.buffer, reader.offset); - if (oneCurrencyMap.IsValid()) + if (oneCurrencyMap.isValid()) { objectUni = {[checkVal]: oneCurrencyMap.toJson()}; } @@ -866,7 +866,7 @@ export const VDXFDataToUniValue = (buffer: Buffer, offset: number = 0, pSuccess version = reader.readVarInt(); objSize = reader.readCompactSize(); reader.offset = oneRatingObj.fromBuffer(reader.buffer, reader.offset); - if (oneRatingObj.IsValid()) + if (oneRatingObj.isValid()) { objectUni = {[checkVal]: oneRatingObj.toJson()}; } @@ -877,7 +877,7 @@ export const VDXFDataToUniValue = (buffer: Buffer, offset: number = 0, pSuccess version = reader.readVarInt(); objSize = reader.readCompactSize(); reader.offset = oneTransferDest.fromBuffer(reader.buffer, reader.offset); - if (oneTransferDest.IsValid()) + if (oneTransferDest.isValid()) { objectUni = {[checkVal]: oneTransferDest.toJson()}; } @@ -891,7 +891,7 @@ export const VDXFDataToUniValue = (buffer: Buffer, offset: number = 0, pSuccess // ss >> VARINT(version); // ss >> COMPACTSIZE(objSize); // ss >> oneContentRemove; - // if (oneContentRemove.IsValid()) + // if (oneContentRemove.isValid()) // { // objectUni = UniValue(UniValue::VOBJ); // objectUni.pushKV(EncodeDestination(CIdentityID(checkVal)), oneContentRemove.ToUniValue()); @@ -921,7 +921,7 @@ export const VDXFDataToUniValue = (buffer: Buffer, offset: number = 0, pSuccess // ss >> VARINT(version); // ss >> COMPACTSIZE(objSize); // ss >> dataRef; - // if (dataRef.IsValid()) + // if (dataRef.isValid()) // { // objectUni = UniValue(UniValue::VOBJ); // objectUni.pushKV(EncodeDestination(CIdentityID(checkVal)), dataRef.ToUniValue()); @@ -933,7 +933,7 @@ export const VDXFDataToUniValue = (buffer: Buffer, offset: number = 0, pSuccess version = reader.readVarInt(); objSize = reader.readCompactSize(); reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); - if (dataDescriptor.IsValid()) + if (dataDescriptor.isValid()) { objectUni = {[checkVal]: dataDescriptor.toJson()}; } @@ -944,7 +944,7 @@ export const VDXFDataToUniValue = (buffer: Buffer, offset: number = 0, pSuccess version = reader.readVarInt(); objSize = reader.readCompactSize(); reader.offset = mmrDescriptor.fromBuffer(reader.buffer, reader.offset); - if (mmrDescriptor.IsValid()) + if (mmrDescriptor.isValid()) { objectUni = {[checkVal]: mmrDescriptor.toJson()}; } @@ -955,7 +955,7 @@ export const VDXFDataToUniValue = (buffer: Buffer, offset: number = 0, pSuccess version = reader.readVarInt(); objSize = reader.readCompactSize(); reader.offset = sigData.fromBuffer(reader.buffer, reader.offset); - if (sigData.IsValid()) + if (sigData.isValid()) { objectUni = {[checkVal]: sigData.toJson()}; } diff --git a/src/vdxf/classes/SignatureData.ts b/src/vdxf/classes/SignatureData.ts index acad2a2..2be597c 100644 --- a/src/vdxf/classes/SignatureData.ts +++ b/src/vdxf/classes/SignatureData.ts @@ -165,7 +165,7 @@ export class SignatureData implements SerializableEntity { return reader.offset; } - IsValid() { + isValid() { return !!(this.version.gte(SignatureData.FIRST_VERSION) && this.version.lte(SignatureData.LAST_VERSION) && this.systemID); diff --git a/src/vdxf/index.ts b/src/vdxf/index.ts index 7d224b8..e981afb 100644 --- a/src/vdxf/index.ts +++ b/src/vdxf/index.ts @@ -69,7 +69,7 @@ export class VDXFObject implements VDXFObjectInterface { } fromDataBuffer(buffer: Buffer, offset: number = 0) { - return offset + 1; + return offset; } isValidVersion() { @@ -117,10 +117,8 @@ export class VDXFObject implements VDXFObjectInterface { } writer.writeVarInt(new BN(this.version, 10)); - - - writer.writeVarSlice(this.toDataBuffer()); + writer.writeVarSlice(this.toDataBuffer()); return writer.buffer; } From b6b37bbae50c2b6d85c2e0bc806f54899ca9ac79 Mon Sep 17 00:00:00 2001 From: Monkins1010 Date: Wed, 2 Oct 2024 16:09:06 +0100 Subject: [PATCH 107/120] Updates to comments for review --- dist/pbaas/CrossChainDataRef.d.ts | 18 + dist/pbaas/CrossChainDataRef.js | 62 + .../classes => pbaas}/DataDescriptor.d.ts | 61 +- dist/pbaas/DataDescriptor.js | 323 ++++++ dist/pbaas/IdentityMultimapRef.d.ts | 29 + dist/pbaas/IdentityMultimapRef.js | 115 ++ dist/pbaas/MMR.d.ts | 71 ++ dist/{vdxf/classes => pbaas}/MMR.js | 182 +-- dist/pbaas/MMRDescriptor.d.ts | 49 + dist/pbaas/MMRDescriptor.js | 120 ++ dist/pbaas/PBaaSEvidenceRef.d.ts | 31 + dist/pbaas/PBaaSEvidenceRef.js | 89 ++ dist/pbaas/SignatureData.d.ts | 50 + dist/pbaas/SignatureData.js | 192 ++++ dist/pbaas/URLRef.d.ts | 22 + dist/pbaas/URLRef.js | 51 + dist/pbaas/UTXORef.d.ts | 19 + dist/pbaas/UTXORef.js | 40 + dist/pbaas/VdxfUniValue.d.ts | 7 + dist/pbaas/VdxfUniValue.js | 372 ++++++ dist/utils/IdentityData.d.ts | 4 +- dist/utils/IdentityData.js | 300 ++--- dist/utils/mmr.d.ts | 2 + dist/utils/mmr.js | 87 ++ dist/vdxf/classes/Attestation.js | 2 +- dist/vdxf/classes/Challenge.js | 5 +- dist/vdxf/classes/CrossChainDataRef.d.ts | 70 -- dist/vdxf/classes/CrossChainDataRef.js | 235 ---- dist/vdxf/classes/DataDescriptor.js | 811 ------------- dist/vdxf/classes/MMR.d.ts | 73 -- dist/vdxf/classes/SaltedData.js | 4 +- dist/vdxf/classes/SignatureData.d.ts | 38 - dist/vdxf/classes/SignatureData.js | 186 --- dist/vdxf/index.d.ts | 4 +- dist/vdxf/index.js | 4 +- dist/vdxf/keymap.js | 10 +- dist/vdxf/vdxfDataKeys.d.ts | 136 +-- dist/vdxf/vdxfDataKeys.js | 884 ++++++-------- package.json | 2 +- src/__tests__/attestation/attestation.test.ts | 2 +- .../attestation/personalInfo.test.ts | 6 +- src/__tests__/pbaas/dataDescriptor.test.ts | 118 ++ src/pbaas/CrossChainDataRef.ts | 74 ++ src/pbaas/DataDescriptor.ts | 417 +++++++ src/pbaas/IdentityMultimapRef.ts | 146 +++ src/{vdxf/classes => pbaas}/MMR.ts | 231 +--- src/pbaas/MMRDescriptor.ts | 145 +++ src/pbaas/PBaaSEvidenceRef.ts | 119 ++ src/pbaas/SignatureData.ts | 253 ++++ src/pbaas/URLRef.ts | 68 ++ src/pbaas/UTXORef.ts | 58 + src/pbaas/VdxfUniValue.ts | 452 +++++++- src/utils/IdentityData.ts | 294 ++--- src/utils/mmr.ts | 105 ++ src/vdxf/classes/Attestation.ts | 2 +- src/vdxf/classes/Challenge.ts | 5 +- src/vdxf/classes/CrossChainDataRef.ts | 312 ----- src/vdxf/classes/DataDescriptor.ts | 1020 ----------------- src/vdxf/classes/SaltedData.ts | 6 +- src/vdxf/classes/SignatureData.ts | 233 ---- src/vdxf/index.ts | 4 +- src/vdxf/keymap.ts | 15 +- src/vdxf/vdxfDataKeys.ts | 931 +++++++-------- 63 files changed, 4998 insertions(+), 4778 deletions(-) create mode 100644 dist/pbaas/CrossChainDataRef.d.ts create mode 100644 dist/pbaas/CrossChainDataRef.js rename dist/{vdxf/classes => pbaas}/DataDescriptor.d.ts (57%) create mode 100644 dist/pbaas/DataDescriptor.js create mode 100644 dist/pbaas/IdentityMultimapRef.d.ts create mode 100644 dist/pbaas/IdentityMultimapRef.js create mode 100644 dist/pbaas/MMR.d.ts rename dist/{vdxf/classes => pbaas}/MMR.js (78%) create mode 100644 dist/pbaas/MMRDescriptor.d.ts create mode 100644 dist/pbaas/MMRDescriptor.js create mode 100644 dist/pbaas/PBaaSEvidenceRef.d.ts create mode 100644 dist/pbaas/PBaaSEvidenceRef.js create mode 100644 dist/pbaas/SignatureData.d.ts create mode 100644 dist/pbaas/SignatureData.js create mode 100644 dist/pbaas/URLRef.d.ts create mode 100644 dist/pbaas/URLRef.js create mode 100644 dist/pbaas/UTXORef.d.ts create mode 100644 dist/pbaas/UTXORef.js create mode 100644 dist/utils/mmr.d.ts create mode 100644 dist/utils/mmr.js delete mode 100644 dist/vdxf/classes/CrossChainDataRef.d.ts delete mode 100644 dist/vdxf/classes/CrossChainDataRef.js delete mode 100644 dist/vdxf/classes/DataDescriptor.js delete mode 100644 dist/vdxf/classes/MMR.d.ts delete mode 100644 dist/vdxf/classes/SignatureData.d.ts delete mode 100644 dist/vdxf/classes/SignatureData.js create mode 100644 src/__tests__/pbaas/dataDescriptor.test.ts create mode 100644 src/pbaas/CrossChainDataRef.ts create mode 100644 src/pbaas/DataDescriptor.ts create mode 100644 src/pbaas/IdentityMultimapRef.ts rename src/{vdxf/classes => pbaas}/MMR.ts (74%) create mode 100644 src/pbaas/MMRDescriptor.ts create mode 100644 src/pbaas/PBaaSEvidenceRef.ts create mode 100644 src/pbaas/SignatureData.ts create mode 100644 src/pbaas/URLRef.ts create mode 100644 src/pbaas/UTXORef.ts create mode 100644 src/utils/mmr.ts delete mode 100644 src/vdxf/classes/CrossChainDataRef.ts delete mode 100644 src/vdxf/classes/DataDescriptor.ts delete mode 100644 src/vdxf/classes/SignatureData.ts diff --git a/dist/pbaas/CrossChainDataRef.d.ts b/dist/pbaas/CrossChainDataRef.d.ts new file mode 100644 index 0000000..e919fe4 --- /dev/null +++ b/dist/pbaas/CrossChainDataRef.d.ts @@ -0,0 +1,18 @@ +/// +import { SerializableEntity } from '../utils/types/SerializableEntity'; +import { PBaaSEvidenceRef } from './PBaaSEvidenceRef'; +import { IdentityMultimapRef } from './IdentityMultimapRef'; +import { URLRef } from './URLRef'; +export declare class CrossChainDataRef implements SerializableEntity { + ref: PBaaSEvidenceRef | IdentityMultimapRef | URLRef; + static TYPE_CROSSCHAIN_DATAREF: number; + static TYPE_IDENTITY_DATAREF: number; + static TYPE_URL_REF: number; + constructor(data?: PBaaSEvidenceRef | IdentityMultimapRef | URLRef | any); + which(): number; + getByteLength(): number; + toBuffer(): Buffer; + fromBuffer(buffer: Buffer, offset?: number): number; + isValid(): boolean; + toJson(): any; +} diff --git a/dist/pbaas/CrossChainDataRef.js b/dist/pbaas/CrossChainDataRef.js new file mode 100644 index 0000000..37ca0d3 --- /dev/null +++ b/dist/pbaas/CrossChainDataRef.js @@ -0,0 +1,62 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CrossChainDataRef = void 0; +const bufferutils_1 = require("../utils/bufferutils"); +const PBaaSEvidenceRef_1 = require("./PBaaSEvidenceRef"); +const IdentityMultimapRef_1 = require("./IdentityMultimapRef"); +const URLRef_1 = require("./URLRef"); +const { BufferReader, BufferWriter } = bufferutils_1.default; +class CrossChainDataRef { + constructor(data) { + this.ref = data || null; + } + which() { + if (this.ref instanceof PBaaSEvidenceRef_1.PBaaSEvidenceRef) { + return CrossChainDataRef.TYPE_CROSSCHAIN_DATAREF; + } + else if (this.ref instanceof IdentityMultimapRef_1.IdentityMultimapRef) { + return CrossChainDataRef.TYPE_IDENTITY_DATAREF; + } + else if (this.ref instanceof URLRef_1.URLRef) { + return CrossChainDataRef.TYPE_URL_REF; + } + } + getByteLength() { + let byteLength = 1; //type uint8 + byteLength += this.ref.getByteLength(); + return byteLength; + } + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())); + bufferWriter.writeUInt8(this.which()); + bufferWriter.writeSlice(this.ref.toBuffer()); + return bufferWriter.buffer; + } + fromBuffer(buffer, offset = 0) { + const reader = new BufferReader(buffer, offset); + const type = reader.readUInt8(); + if (type == CrossChainDataRef.TYPE_CROSSCHAIN_DATAREF) { + this.ref = new PBaaSEvidenceRef_1.PBaaSEvidenceRef(); + } + else if (type == CrossChainDataRef.TYPE_IDENTITY_DATAREF) { + this.ref = new IdentityMultimapRef_1.IdentityMultimapRef(); + } + else if (type == CrossChainDataRef.TYPE_URL_REF) { + this.ref = new URLRef_1.URLRef(); + } + offset = this.ref.fromBuffer(buffer, reader.offset); + return reader.offset; + } + isValid() { + return (typeof (this.ref) == typeof (PBaaSEvidenceRef_1.PBaaSEvidenceRef) && this.ref.isValid()) || + (typeof (this.ref) == typeof (IdentityMultimapRef_1.IdentityMultimapRef) && this.ref.isValid()) || + (typeof (this.ref) == typeof (URLRef_1.URLRef) && this.ref.isValid()); + } + toJson() { + return this.ref.toJson(); + } +} +exports.CrossChainDataRef = CrossChainDataRef; +CrossChainDataRef.TYPE_CROSSCHAIN_DATAREF = 0; +CrossChainDataRef.TYPE_IDENTITY_DATAREF = 1; +CrossChainDataRef.TYPE_URL_REF = 2; diff --git a/dist/vdxf/classes/DataDescriptor.d.ts b/dist/pbaas/DataDescriptor.d.ts similarity index 57% rename from dist/vdxf/classes/DataDescriptor.d.ts rename to dist/pbaas/DataDescriptor.d.ts index 9fd95f7..fc4cda8 100644 --- a/dist/vdxf/classes/DataDescriptor.d.ts +++ b/dist/pbaas/DataDescriptor.d.ts @@ -1,8 +1,9 @@ /// /// -import { BigNumber } from '../../utils/types/BigNumber'; -import { BufferDataVdxfObject } from '../index'; -export declare class DataDescriptor { +import { BigNumber } from '../utils/types/BigNumber'; +import { BufferDataVdxfObject } from '../vdxf/index'; +import { SerializableEntity } from '../utils/types/SerializableEntity'; +export declare class DataDescriptor implements SerializableEntity { static VERSION_INVALID: import("bn.js"); static VERSION_FIRST: import("bn.js"); static FIRST_VERSION: import("bn.js"); @@ -38,7 +39,7 @@ export declare class DataDescriptor { }); static fromJson(data: any): DataDescriptor; DecodeHashVector(): Array; - byteLength(): number; + getByteLength(): number; toBuffer(): Buffer; fromBuffer(buffer: Buffer, offset?: number): number; HasEncryptedData(): boolean; @@ -59,7 +60,7 @@ export declare class DataDescriptor { export declare class VDXFDataDescriptor extends BufferDataVdxfObject { dataDescriptor: DataDescriptor; constructor(dataDescriptor?: DataDescriptor, vdxfkey?: string, version?: BigNumber); - static fromDataVdfxObject(data: BufferDataVdxfObject): VDXFDataDescriptor; + static fromDataVdxfObject(data: BufferDataVdxfObject): VDXFDataDescriptor; dataByteLength(): number; toDataBuffer(): Buffer; fromDataBuffer(buffer: Buffer, offset?: number): number; @@ -81,53 +82,3 @@ export declare enum EHashTypes { HASH_SHA256 = 5, HASH_LASTTYPE = 5 } -export declare class MMRDescriptor { - static VERSION_INVALID: import("bn.js"); - static FIRST_VERSION: import("bn.js"); - static LAST_VERSION: import("bn.js"); - static DEFAULT_VERSION: import("bn.js"); - version: BigNumber; - objectHashType: EHashTypes; - mmrHashType: EHashTypes; - mmrRoot: DataDescriptor; - mmrHashes: DataDescriptor; - dataDescriptors: DataDescriptor[]; - constructor(data?: { - version?: BigNumber; - objectHashType?: EHashTypes; - mmrHashType?: EHashTypes; - mmrRoot?: DataDescriptor; - mmrHashes?: DataDescriptor; - dataDescriptors?: DataDescriptor[]; - }); - static fromJson(data: any): MMRDescriptor; - byteLength(): number; - toBuffer(): Buffer; - fromBuffer(buffer: Buffer, offset?: number): number; - HasData(): boolean; - isValid(): boolean; - toJson(): { - version: string; - objecthashtype: EHashTypes; - mmrhashtype: EHashTypes; - mmrroot: { - version: string; - flags: string; - }; - mmrhashes: { - version: string; - flags: string; - }; - datadescriptors: { - version: string; - flags: string; - }[]; - }; -} -export declare const VectorEncodeVDXFUni: (obj: any) => Buffer; -export declare const VDXFDataToUniValue: (buffer: Buffer, offset?: number, pSuccess?: any) => { - objectUni: any; - offset: number; - pSuccess: any; -}; -export declare const VDXFDataToUniValueArray: (buffer: Buffer, offset?: number) => any; diff --git a/dist/pbaas/DataDescriptor.js b/dist/pbaas/DataDescriptor.js new file mode 100644 index 0000000..d1780e7 --- /dev/null +++ b/dist/pbaas/DataDescriptor.js @@ -0,0 +1,323 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.EHashTypes = exports.VDXFDataDescriptor = exports.DataDescriptor = void 0; +const bn_js_1 = require("bn.js"); +const varint_1 = require("../utils/varint"); +const varuint_1 = require("../utils/varuint"); +const bufferutils_1 = require("../utils/bufferutils"); +const { BufferReader, BufferWriter } = bufferutils_1.default; +const _1 = require("."); +const index_1 = require("../vdxf/index"); +const VDXF_Data = require("../vdxf/vdxfdatakeys"); +class DataDescriptor { + constructor(data) { + this.flags = new bn_js_1.BN(0); + this.version = DataDescriptor.DEFAULT_VERSION; + if (data != null) { + if (data.flags != null) + this.flags = data.flags; + if (data.version != null) + this.version = data.version; + if (data.objectdata != null) + this.objectdata = data.objectdata; + if (data.label != null) + this.label = data.label; + if (data.mimeType != null) + this.mimeType = data.mimeType; + if (data.salt != null) + this.salt = data.salt; + if (data.epk != null) + this.epk = data.epk; + if (data.ivk != null) + this.ivk = data.ivk; + if (data.ssk != null) + this.ssk = data.ssk; + if (this.label && this.label.length > 64) { + this.label = this.label.slice(0, 64); + } + if (this.mimeType && this.mimeType.length > 128) { + this.mimeType = this.mimeType.slice(0, 128); + } + this.SetFlags(); + } + } + static fromJson(data) { + const newDataDescriptor = new DataDescriptor(); + if (data != null) { + if (data.flags != null) + newDataDescriptor.flags = new bn_js_1.BN(data.flags); + if (data.version != null) + newDataDescriptor.version = new bn_js_1.BN(data.version); + if (data.objectdata != null) + newDataDescriptor.objectdata = _1.VdxfUniValue.vectorEncodeVDXFUni(data.objectdata); + if (data.label != null) + newDataDescriptor.label = data.label; + if (data.mimetype != null) + newDataDescriptor.mimeType = data.mimetype; + if (data.salt != null) + newDataDescriptor.salt = Buffer.from(data.salt, 'hex'); + if (data.epk != null) + newDataDescriptor.epk = Buffer.from(data.epk, 'hex'); + if (data.ivk != null) + newDataDescriptor.ivk = Buffer.from(data.ivk, 'hex'); + if (data.ssk != null) + newDataDescriptor.ssk = Buffer.from(data.ssk, 'hex'); + if (newDataDescriptor.label && newDataDescriptor.label.length > 64) { + newDataDescriptor.label = newDataDescriptor.label.slice(0, 64); + } + if (newDataDescriptor.mimeType && newDataDescriptor.mimeType.length > 128) { + newDataDescriptor.mimeType = newDataDescriptor.mimeType.slice(0, 128); + } + } + ; + newDataDescriptor.SetFlags(); + return newDataDescriptor; + } + DecodeHashVector() { + const vdxfData = new index_1.BufferDataVdxfObject(); + vdxfData.fromBuffer(this.objectdata); + const hashes = []; + if (vdxfData.vdxfkey == VDXF_Data.VectorUint256Key.vdxfid) { + const reader = new BufferReader(Buffer.from(vdxfData.data, 'hex')); + const count = reader.readVarInt(); + for (let i = 0; i < count.toNumber(); i++) { + hashes.push(reader.readSlice(32)); + } + } + return hashes; + } + getByteLength() { + let length = 0; + length += varint_1.default.encodingLength(this.version); + length += varint_1.default.encodingLength(this.flags); + length += varuint_1.default.encodingLength(this.objectdata.length); + length += this.objectdata.length; + if (this.HasLabel()) { + if (this.label.length > 64) { + throw new Error("Label too long"); + } + length += varuint_1.default.encodingLength(this.label.length); + length += this.label.length; + } + if (this.HasMIME()) { + if (this.mimeType.length > 128) { + throw new Error("MIME type too long"); + } + length += varuint_1.default.encodingLength(this.mimeType.length); + length += this.mimeType.length; + } + if (this.HasSalt()) { + length += varuint_1.default.encodingLength(this.salt.length); + length += this.salt.length; + } + if (this.HasEPK()) { + length += varuint_1.default.encodingLength(this.epk.length); + length += this.epk.length; + } + if (this.HasIVK()) { + length += varuint_1.default.encodingLength(this.ivk.length); + length += this.ivk.length; + } + if (this.HasSSK()) { + length += varuint_1.default.encodingLength(this.ssk.length); + length += this.ssk.length; + } + return length; + } + toBuffer() { + const writer = new BufferWriter(Buffer.alloc(this.getByteLength())); + writer.writeVarInt(this.version); + writer.writeVarInt(this.flags); + writer.writeVarSlice(this.objectdata); + if (this.HasLabel()) { + writer.writeVarSlice(Buffer.from(this.label)); + } + if (this.HasMIME()) { + writer.writeVarSlice(Buffer.from(this.mimeType)); + } + if (this.HasSalt()) { + writer.writeVarSlice(this.salt); + } + if (this.HasEPK()) { + writer.writeVarSlice(this.epk); + } + if (this.HasIVK()) { + writer.writeVarSlice(this.ivk); + } + if (this.HasSSK()) { + writer.writeVarSlice(this.ssk); + } + return writer.buffer; + } + fromBuffer(buffer, offset = 0) { + const reader = new BufferReader(buffer, offset); + this.version = reader.readVarInt(); + this.flags = reader.readVarInt(); + this.objectdata = reader.readVarSlice(); + if (this.HasLabel()) { + this.label = reader.readVarSlice().toString(); + } + if (this.HasMIME()) { + this.mimeType = reader.readVarSlice().toString(); + } + if (this.HasSalt()) { + this.salt = reader.readVarSlice(); + } + if (this.HasEPK()) { + this.epk = reader.readVarSlice(); + } + if (this.HasIVK()) { + this.ivk = reader.readVarSlice(); + } + if (this.HasSSK()) { + this.ssk = reader.readVarSlice(); + } + return reader.offset; + } + HasEncryptedData() { + return this.flags.and(DataDescriptor.FLAG_ENCRYPTED_DATA).gt(new bn_js_1.BN(0)); + } + HasSalt() { + return this.flags.and(DataDescriptor.FLAG_SALT_PRESENT).gt(new bn_js_1.BN(0)); + } + HasEPK() { + return this.flags.and(DataDescriptor.FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT).gt(new bn_js_1.BN(0)); + } + HasMIME() { + return this.flags.and(DataDescriptor.FLAG_MIME_TYPE_PRESENT).gt(new bn_js_1.BN(0)); + } + HasIVK() { + return this.flags.and(DataDescriptor.FLAG_INCOMING_VIEWING_KEY_PRESENT).gt(new bn_js_1.BN(0)); + } + HasSSK() { + return this.flags.and(DataDescriptor.FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT).gt(new bn_js_1.BN(0)); + } + HasLabel() { + return this.flags.and(DataDescriptor.FLAG_LABEL_PRESENT).gt(new bn_js_1.BN(0)); + } + CalcFlags() { + return this.flags.and(DataDescriptor.FLAG_ENCRYPTED_DATA).add(this.label ? DataDescriptor.FLAG_LABEL_PRESENT : new bn_js_1.BN(0)).add(this.mimeType ? DataDescriptor.FLAG_MIME_TYPE_PRESENT : new bn_js_1.BN(0)).add(this.salt ? DataDescriptor.FLAG_SALT_PRESENT : new bn_js_1.BN(0)).add(this.epk ? DataDescriptor.FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT : new bn_js_1.BN(0)).add(this.ivk ? DataDescriptor.FLAG_INCOMING_VIEWING_KEY_PRESENT : new bn_js_1.BN(0)).add(this.ssk ? DataDescriptor.FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT : new bn_js_1.BN(0)); + } + SetFlags() { + this.flags = this.CalcFlags(); + } + isValid() { + return !!(this.version.gte(DataDescriptor.FIRST_VERSION) && this.version.lte(DataDescriptor.LAST_VERSION) && this.flags.and(DataDescriptor.FLAG_MASK.notn(DataDescriptor.FLAG_MASK.bitLength()))); + } + toJson() { + const retval = { + version: this.version.toString(), + flags: this.flags.toString() + }; + let isText = false; + if (this.mimeType) { + retval['mimetype'] = this.mimeType; + if (this.mimeType.startsWith("text/")) + isText = true; + } + let processedObject = _1.VdxfUniValue.VDXFDataToUniValueArray(this.objectdata); + if (isText && typeof processedObject === 'string' || processedObject instanceof String) { + let objectDataUni = { message: Buffer.from(processedObject, 'hex').toString('utf-8') }; + retval['objectdata'] = objectDataUni; + } + else { + retval['objectdata'] = processedObject; + } + if (this.label) + retval['label'] = this.label; + if (this.salt) + retval['salt'] = this.salt.toString('hex'); + if (this.epk) + retval['epk'] = this.epk.toString('hex'); + if (this.ivk) + retval['ivk'] = this.ivk.toString('hex'); + if (this.ssk) + retval['ssk'] = this.ssk.toString('hex'); + return retval; + } +} +exports.DataDescriptor = DataDescriptor; +DataDescriptor.VERSION_INVALID = new bn_js_1.BN(0); +DataDescriptor.VERSION_FIRST = new bn_js_1.BN(1); +DataDescriptor.FIRST_VERSION = new bn_js_1.BN(1); +DataDescriptor.LAST_VERSION = new bn_js_1.BN(1); +DataDescriptor.DEFAULT_VERSION = new bn_js_1.BN(1); +DataDescriptor.FLAG_ENCRYPTED_DATA = new bn_js_1.BN(1); +DataDescriptor.FLAG_SALT_PRESENT = new bn_js_1.BN(2); +DataDescriptor.FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT = new bn_js_1.BN(4); +DataDescriptor.FLAG_INCOMING_VIEWING_KEY_PRESENT = new bn_js_1.BN(8); +DataDescriptor.FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT = new bn_js_1.BN(0x10); +DataDescriptor.FLAG_LABEL_PRESENT = new bn_js_1.BN(0x20); +DataDescriptor.FLAG_MIME_TYPE_PRESENT = new bn_js_1.BN(0x40); +DataDescriptor.FLAG_MASK = (DataDescriptor.FLAG_ENCRYPTED_DATA.add(DataDescriptor.FLAG_SALT_PRESENT).add(DataDescriptor.FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT).add(DataDescriptor.FLAG_INCOMING_VIEWING_KEY_PRESENT).add(DataDescriptor.FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT).add(DataDescriptor.FLAG_LABEL_PRESENT).add(DataDescriptor.FLAG_MIME_TYPE_PRESENT)); +; +class VDXFDataDescriptor extends index_1.BufferDataVdxfObject { + constructor(dataDescriptor, vdxfkey = "", version = new bn_js_1.BN(1)) { + super("", vdxfkey); + this.version = version; + if (dataDescriptor) { + this.dataDescriptor = dataDescriptor; + } + } + static fromDataVdxfObject(data) { + const retval = new VDXFDataDescriptor(); + retval.version = data.version; + retval.data = data.data; + retval.fromBuffer(Buffer.from(retval.data, 'hex')); + delete retval.data; + return retval; + } + dataByteLength() { + let length = 0; + length += this.dataDescriptor.getByteLength(); + return length; + } + toDataBuffer() { + return this.dataDescriptor.toBuffer(); + } + fromDataBuffer(buffer, offset) { + const reader = new bufferutils_1.default.BufferReader(buffer, offset); + this.data = reader.readVarSlice().toString('hex'); + this.dataDescriptor = new DataDescriptor(); + this.dataDescriptor.fromBuffer(Buffer.from(this.data, 'hex'), reader.offset); + delete this.data; + return reader.offset; + } + HasEncryptedData() { + return this.dataDescriptor.HasEncryptedData(); + } + HasLabel() { + return this.dataDescriptor.HasLabel(); + } + HasSalt() { + return this.dataDescriptor.HasSalt(); + } + HasEPK() { + return this.dataDescriptor.HasEPK(); + } + HasIVK() { + return this.dataDescriptor.HasIVK(); + } + HasSSK() { + return this.dataDescriptor.HasSSK(); + } + CalcFlags() { + return this.dataDescriptor.CalcFlags(); + } + SetFlags() { + return this.dataDescriptor.SetFlags(); + } +} +exports.VDXFDataDescriptor = VDXFDataDescriptor; +; +var EHashTypes; +(function (EHashTypes) { + EHashTypes[EHashTypes["HASH_INVALID"] = 0] = "HASH_INVALID"; + EHashTypes[EHashTypes["HASH_BLAKE2BMMR"] = 1] = "HASH_BLAKE2BMMR"; + EHashTypes[EHashTypes["HASH_BLAKE2BMMR2"] = 2] = "HASH_BLAKE2BMMR2"; + EHashTypes[EHashTypes["HASH_KECCAK"] = 3] = "HASH_KECCAK"; + EHashTypes[EHashTypes["HASH_SHA256D"] = 4] = "HASH_SHA256D"; + EHashTypes[EHashTypes["HASH_SHA256"] = 5] = "HASH_SHA256"; + EHashTypes[EHashTypes["HASH_LASTTYPE"] = 5] = "HASH_LASTTYPE"; +})(EHashTypes = exports.EHashTypes || (exports.EHashTypes = {})); +; diff --git a/dist/pbaas/IdentityMultimapRef.d.ts b/dist/pbaas/IdentityMultimapRef.d.ts new file mode 100644 index 0000000..437007a --- /dev/null +++ b/dist/pbaas/IdentityMultimapRef.d.ts @@ -0,0 +1,29 @@ +/// +/// +import { BigNumber } from '../utils/types/BigNumber'; +import { SerializableEntity } from '../utils/types/SerializableEntity'; +export declare class IdentityMultimapRef implements SerializableEntity { + version: BigNumber; + flags: BigNumber; + id_ID: string; + key: string; + height_start: BigNumber; + height_end: BigNumber; + data_hash: Buffer; + system_id: string; + static FLAG_NO_DELETION: import("bn.js"); + static FLAG_HAS_DATAHASH: import("bn.js"); + static FLAG_HAS_SYSTEM: import("bn.js"); + static FIRST_VERSION: import("bn.js"); + static LAST_VERSION: import("bn.js"); + static CURRENT_VERSION: import("bn.js"); + constructor(data?: any); + setFlags(): void; + getByteLength(): number; + toBuffer(): Buffer; + fromBuffer(buffer: Buffer, offset?: number): number; + isValid(): boolean; + hasDataHash(): boolean; + hasSystemID(): boolean; + toJson(): void; +} diff --git a/dist/pbaas/IdentityMultimapRef.js b/dist/pbaas/IdentityMultimapRef.js new file mode 100644 index 0000000..72edc89 --- /dev/null +++ b/dist/pbaas/IdentityMultimapRef.js @@ -0,0 +1,115 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.IdentityMultimapRef = void 0; +const varint_1 = require("../utils/varint"); +const address_1 = require("../utils/address"); +const bufferutils_1 = require("../utils/bufferutils"); +const bn_js_1 = require("bn.js"); +const vdxf_1 = require("../constants/vdxf"); +const { BufferReader, BufferWriter } = bufferutils_1.default; +class IdentityMultimapRef { + constructor(data) { + if (data) { + this.version = data.version || IdentityMultimapRef.CURRENT_VERSION; + this.flags = data.flags || new bn_js_1.BN(0); + this.id_ID = data.id_ID || ""; + this.key = data.key || ""; + this.height_start = data.height_start || new bn_js_1.BN(0); + this.height_end = data.height_end || new bn_js_1.BN(0); + this.data_hash = data.data_hash || Buffer.alloc(0); + this.system_id = data.system_id || ""; + } + } + setFlags() { + this.flags = this.flags.and(IdentityMultimapRef.FLAG_NO_DELETION); + if (this.data_hash && this.data_hash.length > 0) { + this.flags = this.flags.or(IdentityMultimapRef.FLAG_HAS_DATAHASH); + } + if (this.system_id && this.system_id.length > 0) { + this.flags = this.flags.or(IdentityMultimapRef.FLAG_HAS_SYSTEM); + } + } + getByteLength() { + let byteLength = 0; + this.setFlags(); + byteLength += varint_1.default.encodingLength(this.version); + byteLength += varint_1.default.encodingLength(this.flags); + byteLength += 20; // id_ID uint160 + byteLength += 20; // key uint160 + byteLength += varint_1.default.encodingLength(this.height_start); // height_start uint32 + byteLength += varint_1.default.encodingLength(this.height_end); // height_end uint32 + byteLength += 32; // data_hash uint25 + if (this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH).gt(new bn_js_1.BN(0))) { + byteLength += 32; + } + if (this.flags.and(IdentityMultimapRef.FLAG_HAS_SYSTEM).gt(new bn_js_1.BN(0))) { + byteLength += 20; + } + return byteLength; + } + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())); + bufferWriter.writeVarInt(this.version); + bufferWriter.writeVarInt(this.flags); + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.id_ID).hash); + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.key).hash); + bufferWriter.writeVarInt(this.height_start); + bufferWriter.writeVarInt(this.height_end); + if (this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH).gt(new bn_js_1.BN(0))) { + bufferWriter.writeSlice(this.data_hash); + } + if (this.flags.and(IdentityMultimapRef.FLAG_HAS_SYSTEM).gt(new bn_js_1.BN(0))) { + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.system_id).hash); + } + return bufferWriter.buffer; + } + fromBuffer(buffer, offset = 0) { + const reader = new BufferReader(buffer, offset); + this.version = reader.readVarInt(); + this.flags = reader.readVarInt(); + this.id_ID = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + this.key = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + this.height_start = reader.readVarInt(); + this.height_end = reader.readVarInt(); + if (this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH).gt(new bn_js_1.BN(0))) { + this.data_hash = reader.readSlice(32); + } + if (this.flags.and(IdentityMultimapRef.FLAG_HAS_SYSTEM).gt(new bn_js_1.BN(0))) { + this.system_id = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + } + return reader.offset; + } + isValid() { + return this.version.gte(IdentityMultimapRef.FIRST_VERSION) && + this.version.lte(IdentityMultimapRef.LAST_VERSION) && + (this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH.add(IdentityMultimapRef.FLAG_HAS_SYSTEM).notn(16))).eq(new bn_js_1.BN(0)) && + !(!this.id_ID || this.id_ID.length === 0) && !(!this.key || this.key.length === 0); + } + hasDataHash() { + return this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH).gt(new bn_js_1.BN(0)); + } + hasSystemID() { + return this.flags.and(IdentityMultimapRef.FLAG_HAS_SYSTEM).gt(new bn_js_1.BN(0)); + } + toJson() { + let retval; + retval.version = this.version.toString(10); + retval.flags = this.flags.toString(10); + retval.vdxfkey = this.key; + if (this.hasDataHash()) { + retval.datahash = this.data_hash.toString('hex'); + } + if (this.hasSystemID()) { + retval.systemid = this.system_id; + } + retval.startheight = this.height_start.toString(10); + retval.endheight = this.height_end.toString(10); + } +} +exports.IdentityMultimapRef = IdentityMultimapRef; +IdentityMultimapRef.FLAG_NO_DELETION = new bn_js_1.BN(1); +IdentityMultimapRef.FLAG_HAS_DATAHASH = new bn_js_1.BN(2); +IdentityMultimapRef.FLAG_HAS_SYSTEM = new bn_js_1.BN(4); +IdentityMultimapRef.FIRST_VERSION = new bn_js_1.BN(1); +IdentityMultimapRef.LAST_VERSION = new bn_js_1.BN(1); +IdentityMultimapRef.CURRENT_VERSION = new bn_js_1.BN(1); diff --git a/dist/pbaas/MMR.d.ts b/dist/pbaas/MMR.d.ts new file mode 100644 index 0000000..762fece --- /dev/null +++ b/dist/pbaas/MMR.d.ts @@ -0,0 +1,71 @@ +/// +export declare class MMRLayer { + private vSize; + private nodes; + constructor(); + size(): number; + getIndex(idx: number): NODE_TYPE; + push_back(node: NODE_TYPE): void; + clear(): void; +} +export declare class MMRNode { + hash: Buffer; + constructor(Hash?: Buffer); + digest(input: any): any; + hashObj(obj: Buffer, onbjR?: Buffer): Buffer; + createParentNode(nRight: MMRNode): MMRNode; + getProofHash(opposite: MMRNode): Array; + getLeafHash(): Array; + getExtraHashCount(): number; +} +export declare class MerkleMountainRange { + layer0: MMRLayer; + vSize: number; + upperNodes: Array>; + _leafLength: number; + constructor(); + getbyteLength(): number; + toBuffer(): Buffer; + fromBuffer(bufferIn: Buffer): MerkleMountainRange; + add(leaf: MMRNode): number; + size(): number; + height(): number; + getNode(Height: any, Index: any): MMRNode; +} +export declare class MMRBranch { + branchType?: number; + nIndex?: number; + nSize?: number; + branch?: Array; + constructor(branchType?: number, nIndex?: number, nSize?: number, branch?: Array); + dataByteLength(): number; + toBuffer(): Buffer; + fromBuffer(buffer: Buffer, offset?: number): number; + digest(input: any): any; + safeCheck(hash: Buffer): Buffer; +} +export declare class MMRProof { + proofSequence: Array; + setProof(proof: MMRBranch): void; + dataByteLength(): number; + toBuffer(): Buffer; + fromDataBuffer(buffer: Buffer, offset?: number): number; +} +export declare class MerkleMountainView { + mmr: MerkleMountainRange; + sizes: Array; + peaks: Array; + peakMerkle: Array>; + constructor(mountainRange: MerkleMountainRange, viewSize?: number); + size(): number; + calcPeaks(force?: boolean): void; + resize(newSize: number): number; + maxsize(): number; + getPeaks(): Array; + getRoot(): Buffer; + getRootNode(): MMRNode; + getHash(index: number): Buffer; + getBranchType(): number; + getProof(retProof: MMRProof, pos: number): boolean; + getProofBits(pos: number, mmvSize: number): void; +} diff --git a/dist/vdxf/classes/MMR.js b/dist/pbaas/MMR.js similarity index 78% rename from dist/vdxf/classes/MMR.js rename to dist/pbaas/MMR.js index 1f56f27..a0fc004 100644 --- a/dist/vdxf/classes/MMR.js +++ b/dist/pbaas/MMR.js @@ -2,14 +2,15 @@ // Licence MIT // Adapted to Verus Blake2b MMR. Object.defineProperty(exports, "__esModule", { value: true }); -exports.GetMMRProofIndex = exports.CMerkleMountainView = exports.CMMRProof = exports.CMMRBranch = exports.CMerkleMountainRange = exports.CMMRNode = exports.CLayer = void 0; +exports.MerkleMountainView = exports.MMRProof = exports.MMRBranch = exports.MerkleMountainRange = exports.MMRNode = exports.MMRLayer = void 0; var blake2b = require('blake2b'); const bn_js_1 = require("bn.js"); -const varuint_1 = require("../../utils/varuint"); -const bufferutils_1 = require("../../utils/bufferutils"); +const varuint_1 = require("../utils/varuint"); +const bufferutils_1 = require("../utils/bufferutils"); +const mmr_1 = require("../utils/mmr"); const { BufferReader, BufferWriter } = bufferutils_1.default; const BRANCH_MMRBLAKE_NODE = 2; -class CLayer { +class MMRLayer { constructor() { this.vSize = 0; } size() { return this.vSize; @@ -34,10 +35,10 @@ class CLayer { this.vSize = 0; } } -exports.CLayer = CLayer; +exports.MMRLayer = MMRLayer; ; //template -class COverlayNodeLayer { +class OverlayNodeLayer { constructor(NodeSource) { this.nodeSource = NodeSource; this.vSize = 0; @@ -61,7 +62,7 @@ class COverlayNodeLayer { resize(newSize) { this.vSize = newSize; } } ; -class CMMRNode { +class MMRNode { constructor(Hash) { if (Hash) { this.hash = Hash; @@ -71,37 +72,33 @@ class CMMRNode { var out = Buffer.allocUnsafe(32); return blake2b(out.length, null, null, Buffer.from("VerusDefaultHash")).update(input).digest(out); } - HashObj(obj, onbjR) { + hashObj(obj, onbjR) { if (!onbjR) return this.digest(obj); else return this.digest(Buffer.concat([obj, onbjR])); } // add a right to this left and create a parent node - CreateParentNode(nRight) { - return new CMMRNode(this.digest(Buffer.concat([this.hash, nRight.hash]))); + createParentNode(nRight) { + return new MMRNode(this.digest(Buffer.concat([this.hash, nRight.hash]))); } - GetProofHash(opposite) { + getProofHash(opposite) { return [this.hash]; } // leaf nodes that track additional data, such as block power, may need a hash added to the path // at the very beginning - GetLeafHash() { return []; } - GetExtraHashCount() { + getLeafHash() { return []; } + getExtraHashCount() { // how many extra proof hashes per layer are added with this node return 0; } } -exports.CMMRNode = CMMRNode; +exports.MMRNode = MMRNode; ; -function loggingIdentity(arg) { - console.log(arg.length); - return arg; -} //template , typename LAYER0_TYPE=LAYER_TYPE> -class CMerkleMountainRange { +class MerkleMountainRange { constructor() { - this.layer0 = new CLayer(); + this.layer0 = new MMRLayer(); this.vSize = 0; this.upperNodes = new Array(); this._leafLength = 0; @@ -113,7 +110,7 @@ class CMerkleMountainRange { return Buffer.from([]); } fromBuffer(bufferIn) { - return new CMerkleMountainRange(); + return new MerkleMountainRange(); } add(leaf) { this.layer0.push_back(leaf); @@ -123,17 +120,17 @@ class CMerkleMountainRange { let newSizeAbove = layerSize >> 1; // expand vector of vectors if we are adding a new layer if (height == this.upperNodes.length) { - this.upperNodes.push(new CLayer()); + this.upperNodes.push(new MMRLayer()); } let curSizeAbove = this.upperNodes[height].size(); // if we need to add an element to the vector above us, do it if (!(layerSize & 1) && newSizeAbove > curSizeAbove) { let idx = layerSize - 2; if (height > 0) { - this.upperNodes[height].push_back(this.upperNodes[height - 1].getIndex(idx).CreateParentNode(this.upperNodes[height - 1].getIndex(idx + 1))); + this.upperNodes[height].push_back(this.upperNodes[height - 1].getIndex(idx).createParentNode(this.upperNodes[height - 1].getIndex(idx + 1))); } else { - this.upperNodes[height].push_back(this.layer0.getIndex(idx).CreateParentNode(this.layer0.getIndex(idx + 1))); + this.upperNodes[height].push_back(this.layer0.getIndex(idx).createParentNode(this.layer0.getIndex(idx + 1))); } } layerSize = newSizeAbove; @@ -164,8 +161,8 @@ class CMerkleMountainRange { return null; } } -exports.CMerkleMountainRange = CMerkleMountainRange; -class CMMRBranch { +exports.MerkleMountainRange = MerkleMountainRange; +class MMRBranch { constructor(branchType = BRANCH_MMRBLAKE_NODE, nIndex = 0, nSize = 0, branch = new Array()) { this.branchType = branchType; this.nIndex = nIndex; @@ -211,7 +208,7 @@ class CMMRBranch { return blake2b(out.length, null, null, Buffer.from("VerusDefaultHash")).update(input).digest(out); } safeCheck(hash) { - let index = (0, exports.GetMMRProofIndex)(this.nIndex, this.nSize, 0); + let index = (0, mmr_1.GetMMRProofIndex)(this.nIndex, this.nSize, 0); let joined = Buffer.allocUnsafe(64); let hashInProgress = hash; for (let i = 0; i < this.branch.length; i++) { @@ -229,8 +226,8 @@ class CMMRBranch { return hashInProgress; } } -exports.CMMRBranch = CMMRBranch; -class CMMRProof { +exports.MMRBranch = MMRBranch; +class MMRProof { setProof(proof) { if (!this.proofSequence) { this.proofSequence = new Array(); @@ -258,16 +255,16 @@ class CMMRProof { let proofSequenceLength = reader.readCompactSize(); this.proofSequence = new Array(); for (let i = 0; i < proofSequenceLength; i++) { - let proof = new CMMRBranch(); + let proof = new MMRBranch(); reader.offset = proof.fromBuffer(reader.buffer, reader.offset); this.setProof(proof); } return reader.offset; } } -exports.CMMRProof = CMMRProof; +exports.MMRProof = MMRProof; //template , typename LAYER0_TYPE=LAYER_TYPE, typename HASHALGOWRITER=CBLAKE2bWriter> -class CMerkleMountainView { +class MerkleMountainView { constructor(mountainRange, viewSize = 0) { this.mmr = mountainRange; let maxSize = this.mmr.size(); @@ -287,7 +284,7 @@ class CMerkleMountainView { // zero if empty or the size of the zeroeth layer return this.sizes.length == 0 ? 0 : this.sizes[0]; } - CalcPeaks(force = false) { + calcPeaks(force = false) { // if we don't yet have calculated peaks, calculate them if (force || (this.peaks.length == 0 && this.size() != 0)) { // reset the peak merkle tree, in case this is forced @@ -322,15 +319,15 @@ class CMerkleMountainView { maxsize() { return this.mmr.size() - 1; } - GetPeaks() { - this.CalcPeaks(); + getPeaks() { + this.calcPeaks(); return this.peaks; } - GetRoot() { + getRoot() { let rootHash = Buffer.allocUnsafe(32); if (this.size() > 0 && this.peakMerkle.length == 0) { // get peaks and hash to a root - this.CalcPeaks(); + this.calcPeaks(); let layerNum = 0, layerSize = this.peaks.length; // with an odd number of elements below, the edge passes through for (let passThrough = !!(layerSize & 1); layerNum == 0 || layerSize > 1; passThrough = !!(layerSize & 1), layerNum++) { @@ -339,10 +336,10 @@ class CMerkleMountainView { let layerIndex = layerNum ? layerNum - 1 : 0; // layerNum is base 1 for (i = 0; i < (layerSize >> 1); i++) { if (layerNum > 0) { - this.peakMerkle[this.peakMerkle.length - 1].push(this.peakMerkle[layerIndex][i << 1].CreateParentNode(this.peakMerkle[layerIndex][(i << 1) + 1])); + this.peakMerkle[this.peakMerkle.length - 1].push(this.peakMerkle[layerIndex][i << 1].createParentNode(this.peakMerkle[layerIndex][(i << 1) + 1])); } else { - this.peakMerkle[this.peakMerkle.length - 1].push(this.peaks[i << 1].CreateParentNode(this.peaks[(i << 1) + 1])); + this.peakMerkle[this.peakMerkle.length - 1].push(this.peaks[i << 1].createParentNode(this.peaks[(i << 1) + 1])); } } if (passThrough) { @@ -364,9 +361,9 @@ class CMerkleMountainView { } return rootHash; } - GetRootNode() { + getRootNode() { // ensure merkle tree is calculated - let root = this.GetRoot(); + let root = this.getRoot(); if (root.length > 0) { return this.peakMerkle[this.peakMerkle.length - 1][0]; } @@ -375,7 +372,7 @@ class CMerkleMountainView { } } // return hash of the element at "index" - GetHash(index) { + getHash(index) { if (index < this.size()) { return this.mmr.layer0[index].hash; } @@ -383,18 +380,18 @@ class CMerkleMountainView { return Buffer.allocUnsafe(32); } } - GetBranchType() { + getBranchType() { return BRANCH_MMRBLAKE_NODE; } // return a proof of the element at "pos" - GetProof(retProof, pos) { + getProof(retProof, pos) { // find a path from the indicated position to the root in the current view - let retBranch = new CMMRBranch(); + let retBranch = new MMRBranch(); if (pos < this.size()) { // just make sure the peakMerkle tree is calculated - this.GetRoot(); + this.getRoot(); // if we have leaf information, add it - let toAdd = this.mmr.layer0.getIndex(pos).GetLeafHash(); + let toAdd = this.mmr.layer0.getIndex(pos).getLeafHash(); if (toAdd.length > 0) { retBranch.branch.splice(retBranch.branch.length, 0, toAdd[0]); } @@ -416,7 +413,7 @@ class CMerkleMountainView { /* for (auto &oneNode : peaks) { printf("peaknode: "); - for (auto oneHash : oneNode.GetProofHash(oneNode)) + for (auto oneHash : oneNode.getProofHash(oneNode)) { printf("%s:", oneHash.GetHex().c_str()); } @@ -469,7 +466,7 @@ class CMerkleMountainView { } } } - retBranch.branchType = this.GetBranchType(); + retBranch.branchType = this.getBranchType(); retBranch.nSize = this.size(); retBranch.nIndex = pos; retProof.setProof(retBranch); @@ -480,92 +477,9 @@ class CMerkleMountainView { // return a vector of the bits, either 1 or 0 in each byte, to represent both the size // of the proof by the size of the vector, and the expected bit in each position for the given // position in a Merkle Mountain View of the specified size - GetProofBits(pos, mmvSize) { + getProofBits(pos, mmvSize) { //NOTE: Not implmented. } ; } -exports.CMerkleMountainView = CMerkleMountainView; -const GetMMRProofIndex = (pos, mmvSize, extraHashes) => { - let index = new bn_js_1.BN(0); - let layerSizes = []; - let merkleSizes = []; - let peakIndexes = []; - let bitPos = 0; - //start at the beginning - //create a simulation of a mmr based on size - if (!(pos > 0 && pos < mmvSize)) - return new bn_js_1.BN(0); - //create an array of all the sizes - while (mmvSize) { - layerSizes.push(mmvSize); - mmvSize = mmvSize >> 1; - } - for (let height = 0; height < layerSizes.length; height++) { - if (height == layerSizes.length - 1 || layerSizes[height] & 1) { - peakIndexes.push(height); - } - } - //array flip peak indexes - peakIndexes.reverse(); - let layerNum = 0; - let layerSize = peakIndexes.length; - for (let passThrough = (layerSize & 1); layerNum == 0 || layerSize > 1; passThrough = (layerSize & 1), layerNum++) { - layerSize = (layerSize >> 1) + passThrough; - if (layerSize) { - merkleSizes.push(layerSize); - } - } - //flip the merklesizes - for (let i = 0; i < extraHashes; i++) { - bitPos++; - } - let p = pos; - for (let l = 0; l < layerSizes.length; l++) { - if (p & 1) { - index = index.or(new bn_js_1.BN(1).shln(bitPos++)); - p >>= 1; - for (let i = 0; i < extraHashes; i++) { - bitPos++; - } - } - else { - if (layerSizes[l] > (p + 1)) { - bitPos++; - p >>= 1; - for (let i = 0; i < extraHashes; i++) { - bitPos++; - } - } - else { - for (p = 0; p < peakIndexes.length; p++) { - if (peakIndexes[p] == l) { - break; - } - } - for (let layerNum = -1, layerSize = peakIndexes.length; layerNum == -1 || layerSize > 1; layerSize = merkleSizes[++layerNum]) { - if (p < (layerSize - 1) || (p & 1)) { - if (p & 1) { - // hash with the one before us - index = index.or(new bn_js_1.BN(1).shln(bitPos++)); - for (let i = 0; i < extraHashes; i++) { - bitPos++; - } - } - else { - // hash with the one in front of us - bitPos++; - for (let i = 0; i < extraHashes; i++) { - bitPos++; - } - } - } - p >>= 1; - } - break; - } - } - } - return index; -}; -exports.GetMMRProofIndex = GetMMRProofIndex; +exports.MerkleMountainView = MerkleMountainView; diff --git a/dist/pbaas/MMRDescriptor.d.ts b/dist/pbaas/MMRDescriptor.d.ts new file mode 100644 index 0000000..5ee4902 --- /dev/null +++ b/dist/pbaas/MMRDescriptor.d.ts @@ -0,0 +1,49 @@ +/// +/// +import { BigNumber } from '../utils/types/BigNumber'; +import { DataDescriptor } from './DataDescriptor'; +import { EHashTypes } from './DataDescriptor'; +import { SerializableEntity } from '../utils/types/SerializableEntity'; +export declare class MMRDescriptor implements SerializableEntity { + static VERSION_INVALID: import("bn.js"); + static FIRST_VERSION: import("bn.js"); + static LAST_VERSION: import("bn.js"); + static DEFAULT_VERSION: import("bn.js"); + version: BigNumber; + objectHashType: EHashTypes; + mmrHashType: EHashTypes; + mmrRoot: DataDescriptor; + mmrHashes: DataDescriptor; + dataDescriptors: DataDescriptor[]; + constructor(data?: { + version?: BigNumber; + objectHashType?: EHashTypes; + mmrHashType?: EHashTypes; + mmrRoot?: DataDescriptor; + mmrHashes?: DataDescriptor; + dataDescriptors?: DataDescriptor[]; + }); + static fromJson(data: any): MMRDescriptor; + getByteLength(): number; + toBuffer(): Buffer; + fromBuffer(buffer: Buffer, offset?: number): number; + HasData(): boolean; + isValid(): boolean; + toJson(): { + version: string; + objecthashtype: EHashTypes; + mmrhashtype: EHashTypes; + mmrroot: { + version: string; + flags: string; + }; + mmrhashes: { + version: string; + flags: string; + }; + datadescriptors: { + version: string; + flags: string; + }[]; + }; +} diff --git a/dist/pbaas/MMRDescriptor.js b/dist/pbaas/MMRDescriptor.js new file mode 100644 index 0000000..2a58919 --- /dev/null +++ b/dist/pbaas/MMRDescriptor.js @@ -0,0 +1,120 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MMRDescriptor = void 0; +const bn_js_1 = require("bn.js"); +const varint_1 = require("../utils/varint"); +const varuint_1 = require("../utils/varuint"); +const bufferutils_1 = require("../utils/bufferutils"); +const { BufferReader, BufferWriter } = bufferutils_1.default; +const DataDescriptor_1 = require("./DataDescriptor"); +class MMRDescriptor { + constructor(data) { + if (data) { + if (data.version) + this.version = data.version; + if (data.objectHashType) + this.objectHashType = data.objectHashType; + if (data.mmrHashType) + this.mmrHashType = data.mmrHashType; + if (data.mmrRoot) + this.mmrRoot = data.mmrRoot; + if (data.mmrHashes) + this.mmrHashes = data.mmrHashes; + if (data.dataDescriptors) + this.dataDescriptors = data.dataDescriptors; + } + else { + this.version = MMRDescriptor.DEFAULT_VERSION; + } + } + static fromJson(data) { + const newMMRDescriptor = new MMRDescriptor(); + if (data) { + if (data.version) + newMMRDescriptor.version = new bn_js_1.BN(data.version); + if (data.objecthashtype) + newMMRDescriptor.objectHashType = data.objecthashtype; + if (data.mmrhashtype) + newMMRDescriptor.mmrHashType = data.mmrhashtype; + if (data.mmrroot) + newMMRDescriptor.mmrRoot = DataDescriptor_1.DataDescriptor.fromJson(data.mmrroot); + if (data.mmrhashes) + newMMRDescriptor.mmrHashes = DataDescriptor_1.DataDescriptor.fromJson(data.mmrhashes); + if (data.datadescriptors) { + newMMRDescriptor.dataDescriptors = []; + data.datadescriptors.forEach((data) => { + newMMRDescriptor.dataDescriptors.push(DataDescriptor_1.DataDescriptor.fromJson(data)); + }); + } + ; + } + return newMMRDescriptor; + } + getByteLength() { + let length = 0; + length += varint_1.default.encodingLength(this.version); + length += varint_1.default.encodingLength(new bn_js_1.BN(this.objectHashType)); + length += varint_1.default.encodingLength(new bn_js_1.BN(this.mmrHashType)); + length += this.mmrRoot.getByteLength(); + length += this.mmrHashes.getByteLength(); + length += varuint_1.default.encodingLength(this.dataDescriptors.length); + this.dataDescriptors.forEach((dataDescriptor) => { + length += dataDescriptor.getByteLength(); + }); + return length; + } + toBuffer() { + const writer = new BufferWriter(Buffer.alloc(this.getByteLength())); + writer.writeVarInt(this.version); + writer.writeVarInt(new bn_js_1.BN(this.objectHashType)); + writer.writeVarInt(new bn_js_1.BN(this.mmrHashType)); + writer.writeSlice(this.mmrRoot.toBuffer()); + writer.writeSlice(this.mmrHashes.toBuffer()); + writer.writeCompactSize(this.dataDescriptors.length); + this.dataDescriptors.forEach((dataDescriptor) => { + writer.writeSlice(dataDescriptor.toBuffer()); + }); + return writer.buffer; + } + fromBuffer(buffer, offset) { + const reader = new BufferReader(buffer, offset); + this.version = reader.readVarInt(); + this.objectHashType = reader.readVarInt().toNumber(); + this.mmrHashType = reader.readVarInt().toNumber(); + this.mmrRoot = new DataDescriptor_1.DataDescriptor(); + reader.offset = this.mmrRoot.fromBuffer(reader.buffer, reader.offset); + this.mmrHashes = new DataDescriptor_1.DataDescriptor(); + reader.offset = this.mmrHashes.fromBuffer(reader.buffer, reader.offset); + const dataDescriptorsLength = reader.readCompactSize(); + this.dataDescriptors = []; + for (let i = 0; i < dataDescriptorsLength; i++) { + const dataDescriptor = new DataDescriptor_1.DataDescriptor(); + reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); + this.dataDescriptors.push(dataDescriptor); + } + return reader.offset; + } + HasData() { + return !!(this.mmrHashes.objectdata && this.dataDescriptors); + } + isValid() { + return this.version >= MMRDescriptor.FIRST_VERSION && this.version <= MMRDescriptor.LAST_VERSION; + } + toJson() { + const retval = { + version: this.version.toString(), + objecthashtype: this.objectHashType, + mmrhashtype: this.mmrHashType, + mmrroot: this.mmrRoot.toJson(), + mmrhashes: this.mmrHashes.toJson(), + datadescriptors: this.dataDescriptors.map((dataDescriptor) => dataDescriptor.toJson()) + }; + return retval; + } +} +exports.MMRDescriptor = MMRDescriptor; +MMRDescriptor.VERSION_INVALID = new bn_js_1.BN(0); +MMRDescriptor.FIRST_VERSION = new bn_js_1.BN(1); +MMRDescriptor.LAST_VERSION = new bn_js_1.BN(1); +MMRDescriptor.DEFAULT_VERSION = new bn_js_1.BN(1); +; diff --git a/dist/pbaas/PBaaSEvidenceRef.d.ts b/dist/pbaas/PBaaSEvidenceRef.d.ts new file mode 100644 index 0000000..44de737 --- /dev/null +++ b/dist/pbaas/PBaaSEvidenceRef.d.ts @@ -0,0 +1,31 @@ +/// +/// +import { BigNumber } from '../utils/types/BigNumber'; +import { SerializableEntity } from '../utils/types/SerializableEntity'; +import { UTXORef } from './UTXORef'; +export declare class PBaaSEvidenceRef implements SerializableEntity { + version: BigNumber; + flags: BigNumber; + output: UTXORef; + object_num: BigNumber; + sub_object: BigNumber; + system_id: string; + static FLAG_ISEVIDENCE: import("bn.js"); + static FLAG_HAS_SYSTEM: import("bn.js"); + static FIRST_VERSION: import("bn.js"); + static LAST_VERSION: import("bn.js"); + constructor(data?: { + version?: BigNumber; + flags?: BigNumber; + output?: UTXORef; + object_num?: BigNumber; + sub_object?: BigNumber; + system_id?: string; + }); + setFlags(): void; + getByteLength(): number; + toBuffer(): Buffer; + fromBuffer(buffer: Buffer, offset?: number): number; + isValid(): boolean; + toJson(): any; +} diff --git a/dist/pbaas/PBaaSEvidenceRef.js b/dist/pbaas/PBaaSEvidenceRef.js new file mode 100644 index 0000000..1f5b439 --- /dev/null +++ b/dist/pbaas/PBaaSEvidenceRef.js @@ -0,0 +1,89 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PBaaSEvidenceRef = void 0; +const varint_1 = require("../utils/varint"); +const address_1 = require("../utils/address"); +const bufferutils_1 = require("../utils/bufferutils"); +const bn_js_1 = require("bn.js"); +const vdxf_1 = require("../constants/vdxf"); +const UTXORef_1 = require("./UTXORef"); +const IdentityMultimapRef_1 = require("./IdentityMultimapRef"); +const { BufferReader, BufferWriter } = bufferutils_1.default; +class PBaaSEvidenceRef { + constructor(data) { + if (data) { + this.version = data.version || new bn_js_1.BN(1, 10); + this.flags = data.flags || new bn_js_1.BN(0); + this.output = data.output || new UTXORef_1.UTXORef(); + this.object_num = data.object_num || new bn_js_1.BN(0); + this.sub_object = data.sub_object || new bn_js_1.BN(0); + this.system_id = data.system_id || ""; + } + } + setFlags() { + this.flags = this.flags.and(PBaaSEvidenceRef.FLAG_ISEVIDENCE); + if (this.system_id && this.system_id.length > 0) { + this.flags = this.flags.or(PBaaSEvidenceRef.FLAG_HAS_SYSTEM); + } + } + getByteLength() { + let byteLength = 0; + this.setFlags(); + byteLength += varint_1.default.encodingLength(this.version); + byteLength += varint_1.default.encodingLength(this.flags); + byteLength += this.output.getByteLength(); + byteLength += varint_1.default.encodingLength(this.object_num); + byteLength += varint_1.default.encodingLength(this.sub_object); + if (this.flags.and(PBaaSEvidenceRef.FLAG_HAS_SYSTEM).gt(new bn_js_1.BN(0))) { + byteLength += 20; + } + return byteLength; + } + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())); + bufferWriter.writeVarInt(this.version); + bufferWriter.writeVarInt(this.flags); + bufferWriter.writeSlice(this.output.toBuffer()); + bufferWriter.writeVarInt(this.object_num); + bufferWriter.writeVarInt(this.sub_object); + if (this.flags.and(PBaaSEvidenceRef.FLAG_HAS_SYSTEM).gt(new bn_js_1.BN(0))) { + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.system_id).hash); + } + return bufferWriter.buffer; + } + fromBuffer(buffer, offset = 0) { + const reader = new BufferReader(buffer, offset); + this.version = reader.readVarInt(); + this.flags = reader.readVarInt(); + this.output = new UTXORef_1.UTXORef(); + offset = this.output.fromBuffer(reader.buffer, reader.offset); + this.object_num = reader.readVarInt(); + this.sub_object = reader.readVarInt(); + if (this.flags.and(IdentityMultimapRef_1.IdentityMultimapRef.FLAG_HAS_DATAHASH).gt(new bn_js_1.BN(0))) { + this.system_id = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + } + return reader.offset; + } + isValid() { + return this.output.isValid() && this.version.gte(PBaaSEvidenceRef.FIRST_VERSION) && + this.version.lte(PBaaSEvidenceRef.LAST_VERSION) && + (this.flags.and(PBaaSEvidenceRef.FLAG_ISEVIDENCE).gt(new bn_js_1.BN(0))); + } + toJson() { + let retval; + retval.version = this.version.toString(10); + retval.flags = this.flags.toString(10); + retval.output = this.output.toJson(); + if (this.flags.and(PBaaSEvidenceRef.FLAG_HAS_SYSTEM).gt(new bn_js_1.BN(0))) { + retval.systemid = this.system_id; + } + retval.objectnum = this.object_num.toString(10); + retval.subobject = this.sub_object.toString(10); + return retval; + } +} +exports.PBaaSEvidenceRef = PBaaSEvidenceRef; +PBaaSEvidenceRef.FLAG_ISEVIDENCE = new bn_js_1.BN(1); +PBaaSEvidenceRef.FLAG_HAS_SYSTEM = new bn_js_1.BN(2); +PBaaSEvidenceRef.FIRST_VERSION = new bn_js_1.BN(1); +PBaaSEvidenceRef.LAST_VERSION = new bn_js_1.BN(1); diff --git a/dist/pbaas/SignatureData.d.ts b/dist/pbaas/SignatureData.d.ts new file mode 100644 index 0000000..2ad2a5f --- /dev/null +++ b/dist/pbaas/SignatureData.d.ts @@ -0,0 +1,50 @@ +/// +/// +import { BigNumber } from '../utils/types/BigNumber'; +import { SerializableEntity } from '../utils/types/SerializableEntity'; +export interface SignatureJsonDataInterface { + version: number; + systemid: string; + hashtype: number; + signaturehash: string; + identityid: string; + signaturetype: number; + vdxfkeys: Array; + vdxfkeynames: Array; + boundhashes: Array; + signature: string; +} +export declare class SignatureData implements SerializableEntity { + version: BigNumber; + system_ID: string; + hash_type: BigNumber; + signature_hash: Buffer; + identity_ID: string; + sig_type: BigNumber; + vdxf_keys: Array; + vdxf_key_names: Array; + bound_hashes: Array; + signature_as_vch: Buffer; + static VERSION_INVALID: import("bn.js"); + static FIRST_VERSION: import("bn.js"); + static LAST_VERSION: import("bn.js"); + static DEFAULT_VERSION: import("bn.js"); + static TYPE_VERUSID_DEFAULT: import("bn.js"); + constructor(data?: any); + static fromJson(data: SignatureJsonDataInterface | any): SignatureData; + static getSignatureHashType(input: Buffer): number; + getByteLength(): number; + toBuffer(): Buffer; + fromBuffer(buffer: Buffer, offset?: number): number; + isValid(): boolean; + toJson(): { + version: string; + systemid: string; + hashtype: string; + }; + getIdentityHash(sigObject: { + version: number; + hash_type: number; + height: number; + }): any; +} diff --git a/dist/pbaas/SignatureData.js b/dist/pbaas/SignatureData.js new file mode 100644 index 0000000..c1ddc77 --- /dev/null +++ b/dist/pbaas/SignatureData.js @@ -0,0 +1,192 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SignatureData = void 0; +const varint_1 = require("../utils/varint"); +const varuint_1 = require("../utils/varuint"); +const address_1 = require("../utils/address"); +const bufferutils_1 = require("../utils/bufferutils"); +const bn_js_1 = require("bn.js"); +const vdxf_1 = require("../constants/vdxf"); +const DataDescriptor_1 = require("./DataDescriptor"); +const { BufferReader, BufferWriter } = bufferutils_1.default; +const createHash = require("create-hash"); +const vdxf_2 = require("../constants/vdxf"); +class SignatureData { + constructor(data) { + if (data) { + this.version = data.version || new bn_js_1.BN(1, 10); + this.system_ID = data.system_ID || ""; + this.hash_type = data.hash_type || new bn_js_1.BN(0); + this.signature_hash = data.signature_hash || Buffer.alloc(0); + this.identity_ID = data.identity_ID || ""; + this.sig_type = data.sig_type || new bn_js_1.BN(0); + this.vdxf_keys = data.vdxf_keys || []; + this.vdxf_key_names = data.vdxf_key_names || []; + this.bound_hashes = data.bound_hashes || []; + this.signature_as_vch = data.signature_as_vch || Buffer.alloc(0); + } + } + static fromJson(data) { + var _a; + const signatureData = new SignatureData(); + if (data) { + signatureData.version = new bn_js_1.BN(data.version); + signatureData.system_ID = data.systemid; + signatureData.hash_type = new bn_js_1.BN(data.hashtype); + signatureData.identity_ID = data.identityid; + signatureData.sig_type = new bn_js_1.BN(data.signaturetype); + if (signatureData.hash_type == new bn_js_1.BN(DataDescriptor_1.EHashTypes.HASH_SHA256)) { + signatureData.signature_hash = Buffer.from(data.signaturehash, 'hex').reverse(); + } + else { + signatureData.signature_hash = Buffer.from(data.signaturehash, 'hex'); + } + signatureData.signature_as_vch = Buffer.from(data.signature, 'base64'); + signatureData.vdxf_keys = data.vdxfkeys || []; + signatureData.vdxf_key_names = data.vdxfkeynames || []; + signatureData.bound_hashes = ((_a = data.boundhashes) === null || _a === void 0 ? void 0 : _a.map((hash) => Buffer.from(hash, 'hex'))) || []; + } + return signatureData; + } + static getSignatureHashType(input) { + var bufferReader = new bufferutils_1.default.BufferReader(input, 0); + let version = bufferReader.readUInt8(); + if (version === 2) + return bufferReader.readUInt8(); + else + return DataDescriptor_1.EHashTypes.HASH_SHA256; + } + getByteLength() { + let byteLength = 0; + byteLength += varint_1.default.encodingLength(this.version); + byteLength += 20; // system_ID uint160 + byteLength += varint_1.default.encodingLength(this.hash_type); + byteLength += varuint_1.default.encodingLength(this.signature_hash.length); + byteLength += this.signature_hash.length; + byteLength += 20; // identity_ID uint160 + byteLength += varint_1.default.encodingLength(this.sig_type); + byteLength += varuint_1.default.encodingLength(this.vdxf_keys.length); + byteLength += this.vdxf_keys.length * 20; + byteLength += varuint_1.default.encodingLength(this.vdxf_key_names.length); + for (const keyName of this.vdxf_key_names) { + byteLength += varuint_1.default.encodingLength(Buffer.from(keyName, 'utf8').length); + byteLength += Buffer.from(keyName, 'utf8').length; + } + byteLength += varuint_1.default.encodingLength(this.bound_hashes.length); + byteLength += this.bound_hashes.length * 32; + byteLength += varuint_1.default.encodingLength(this.signature_as_vch.length); + byteLength += this.signature_as_vch.length; + return byteLength; + } + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())); + bufferWriter.writeVarInt(this.version); + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.system_ID).hash); + bufferWriter.writeVarInt(this.hash_type); + bufferWriter.writeVarSlice(this.signature_hash); + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.identity_ID).hash); + bufferWriter.writeVarInt(this.sig_type); + bufferWriter.writeCompactSize(this.vdxf_keys.length); + for (const key of this.vdxf_keys) { + bufferWriter.writeSlice((0, address_1.fromBase58Check)(key).hash); + } + bufferWriter.writeCompactSize(this.vdxf_key_names.length); + for (const keyName of this.vdxf_key_names) { + bufferWriter.writeVarSlice(Buffer.from(keyName, 'utf8')); + } + bufferWriter.writeCompactSize(this.bound_hashes.length); + for (const boundHash of this.bound_hashes) { + bufferWriter.writeSlice(boundHash); + } + bufferWriter.writeVarSlice(this.signature_as_vch); + return bufferWriter.buffer; + } + fromBuffer(buffer, offset = 0) { + const reader = new BufferReader(buffer, offset); + this.version = reader.readVarInt(); + this.system_ID = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + this.hash_type = reader.readVarInt(); + this.signature_hash = reader.readVarSlice(); + this.identity_ID = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + this.sig_type = reader.readVarInt(); + const vdxfKeysLength = reader.readCompactSize(); + this.vdxf_keys = []; + for (let i = 0; i < vdxfKeysLength; i++) { + this.vdxf_keys.push((0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION)); + } + const vdxfKeyNamesLength = reader.readCompactSize(); + this.vdxf_key_names = []; + for (let i = 0; i < vdxfKeyNamesLength; i++) { + this.vdxf_key_names.push(reader.readVarSlice().toString('utf8')); + } + const boundHashesLength = reader.readCompactSize(); + this.bound_hashes = []; + for (let i = 0; i < boundHashesLength; i++) { + this.bound_hashes.push(reader.readSlice(32)); + } + this.signature_as_vch = reader.readVarSlice(); + return reader.offset; + } + isValid() { + return !!(this.version.gte(SignatureData.FIRST_VERSION) && + this.version.lte(SignatureData.LAST_VERSION) && + this.system_ID); + } + toJson() { + const returnObj = { + version: this.version.toString(), + systemid: this.system_ID, + hashtype: this.hash_type.toString() + }; + if (this.hash_type == new bn_js_1.BN(DataDescriptor_1.EHashTypes.HASH_SHA256)) { + returnObj['signaturehash'] = this.signature_hash.reverse().toString('hex'); + } + else { + returnObj['signaturehash'] = this.signature_hash.toString('hex'); + } + returnObj['identityid'] = this.identity_ID; + returnObj['signaturetype'] = this.sig_type.toString(); + returnObj['signature'] = this.signature_as_vch.toString('base64'); + if (this.vdxf_keys) { + returnObj['vdxfkeys'] = this.vdxf_keys; + } + if (this.vdxf_key_names) { + returnObj['vdxfkeynames'] = this.vdxf_key_names; + } + if (this.bound_hashes) { + returnObj['boundhashes'] = this.bound_hashes; + } + return returnObj; + } + getIdentityHash(sigObject) { + var heightBuffer = Buffer.allocUnsafe(4); + heightBuffer.writeUInt32LE(sigObject.height); + if (sigObject.hash_type != Number(DataDescriptor_1.EHashTypes.HASH_SHA256)) { + throw new Error("Invalid signature type for identity hash"); + } + if (sigObject.version == 1) { + return createHash("sha256") + .update(vdxf_2.VERUS_DATA_SIGNATURE_PREFIX) + .update((0, address_1.fromBase58Check)(this.system_ID).hash) + .update(heightBuffer) + .update((0, address_1.fromBase58Check)(this.identity_ID).hash) + .update(this.signature_hash) + .digest(); + } + else { + return createHash("sha256") + .update((0, address_1.fromBase58Check)(this.system_ID).hash) + .update(heightBuffer) + .update((0, address_1.fromBase58Check)(this.identity_ID).hash) + .update(vdxf_2.VERUS_DATA_SIGNATURE_PREFIX) + .update(this.signature_hash) + .digest(); + } + } +} +exports.SignatureData = SignatureData; +SignatureData.VERSION_INVALID = new bn_js_1.BN(0); +SignatureData.FIRST_VERSION = new bn_js_1.BN(1); +SignatureData.LAST_VERSION = new bn_js_1.BN(1); +SignatureData.DEFAULT_VERSION = new bn_js_1.BN(1); +SignatureData.TYPE_VERUSID_DEFAULT = new bn_js_1.BN(1); diff --git a/dist/pbaas/URLRef.d.ts b/dist/pbaas/URLRef.d.ts new file mode 100644 index 0000000..1165fdd --- /dev/null +++ b/dist/pbaas/URLRef.d.ts @@ -0,0 +1,22 @@ +/// +/// +import { BigNumber } from '../utils/types/BigNumber'; +import { SerializableEntity } from '../utils/types/SerializableEntity'; +export declare class URLRef implements SerializableEntity { + static FIRST_VERSION: import("bn.js"); + static LAST_VERSION: import("bn.js"); + version: BigNumber; + url: string; + constructor(data?: { + version?: BigNumber; + url?: string; + }); + getByteLength(): number; + toBuffer(): Buffer; + fromBuffer(buffer: Buffer, offset?: number): number; + isValid(): boolean; + toJson(): { + version: string; + url: string; + }; +} diff --git a/dist/pbaas/URLRef.js b/dist/pbaas/URLRef.js new file mode 100644 index 0000000..b3b0526 --- /dev/null +++ b/dist/pbaas/URLRef.js @@ -0,0 +1,51 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.URLRef = void 0; +const varint_1 = require("../utils/varint"); +const varuint_1 = require("../utils/varuint"); +const bufferutils_1 = require("../utils/bufferutils"); +const bn_js_1 = require("bn.js"); +const { BufferReader, BufferWriter } = bufferutils_1.default; +class URLRef { + constructor(data) { + if (data) { + this.version = data.version || new bn_js_1.BN(1, 10); + this.url = data.url || ""; + } + } + getByteLength() { + let byteLength = 0; + byteLength += varint_1.default.encodingLength(this.version); + byteLength += varuint_1.default.encodingLength(Buffer.from(this.url, 'utf8').length); + byteLength += Buffer.from(this.url, 'utf8').length; + if (byteLength > 4096) + throw new Error("URLRef exceeds maximum length of 4096 bytes"); + return byteLength; + } + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())); + bufferWriter.writeVarInt(this.version); + bufferWriter.writeVarSlice(Buffer.from(this.url, 'utf8')); + return bufferWriter.buffer; + } + fromBuffer(buffer, offset = 0) { + const reader = new BufferReader(buffer, offset); + this.version = reader.readVarInt(); + this.url = reader.readVarSlice().toString('utf8'); + return reader.offset; + } + isValid() { + return this.version.gte(URLRef.FIRST_VERSION) && + this.version.lte(URLRef.LAST_VERSION) && + !(!this.url || this.url.length === 0); + } + toJson() { + return { + version: this.version.toString(10), + url: this.url + }; + } +} +exports.URLRef = URLRef; +URLRef.FIRST_VERSION = new bn_js_1.BN(1); +URLRef.LAST_VERSION = new bn_js_1.BN(1); diff --git a/dist/pbaas/UTXORef.d.ts b/dist/pbaas/UTXORef.d.ts new file mode 100644 index 0000000..2c6cca9 --- /dev/null +++ b/dist/pbaas/UTXORef.d.ts @@ -0,0 +1,19 @@ +/// +import { BigNumber } from '../utils/types/BigNumber'; +import { SerializableEntity } from '../utils/types/SerializableEntity'; +export declare class UTXORef implements SerializableEntity { + hash: Buffer; + n: BigNumber; + constructor(data?: { + hash?: Buffer; + n?: BigNumber; + }); + getByteLength(): number; + toBuffer(): Buffer; + fromBuffer(buffer: Buffer, offset?: number): number; + isValid(): boolean; + toJson(): { + hash: string; + n: string; + }; +} diff --git a/dist/pbaas/UTXORef.js b/dist/pbaas/UTXORef.js new file mode 100644 index 0000000..6bcec58 --- /dev/null +++ b/dist/pbaas/UTXORef.js @@ -0,0 +1,40 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.UTXORef = void 0; +const bufferutils_1 = require("../utils/bufferutils"); +const bn_js_1 = require("bn.js"); +const { BufferReader, BufferWriter } = bufferutils_1.default; +class UTXORef { + constructor(data) { + this.hash = data.hash || Buffer.alloc(0); + this.n = data.n || new bn_js_1.BN(0); + } + getByteLength() { + let byteLength = 0; + byteLength += 32; // hash uint256 + byteLength += 4; // n uint32 + return byteLength; + } + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())); + bufferWriter.writeSlice(this.hash); + bufferWriter.writeUInt32(this.n.toNumber()); + return bufferWriter.buffer; + } + fromBuffer(buffer, offset = 0) { + const reader = new BufferReader(buffer, offset); + this.hash = reader.readSlice(32); + this.n = new bn_js_1.BN(reader.readUInt32()); + return reader.offset; + } + isValid() { + return this.n.lt(new bn_js_1.BN(0xffffffff)); + } + toJson() { + return { + hash: this.hash.toString('hex'), + n: this.n.toString(10) + }; + } +} +exports.UTXORef = UTXORef; diff --git a/dist/pbaas/VdxfUniValue.d.ts b/dist/pbaas/VdxfUniValue.d.ts index d1a9698..9046846 100644 --- a/dist/pbaas/VdxfUniValue.d.ts +++ b/dist/pbaas/VdxfUniValue.d.ts @@ -20,4 +20,11 @@ export declare class VdxfUniValue implements SerializableEntity { fromBuffer(buffer: Buffer, offset?: number, keylist?: Array): number; static fromJson(obj: VdxfUniValueJson): VdxfUniValue; toJson(): VdxfUniValueJson; + static vectorEncodeVDXFUni: (obj: any) => Buffer; + static VDXFDataToUniValue: (buffer: Buffer, offset?: number, pSuccess?: any) => { + objectUni: any; + offset: number; + pSuccess: any; + }; + static VDXFDataToUniValueArray: (buffer: Buffer, offset?: number) => any; } diff --git a/dist/pbaas/VdxfUniValue.js b/dist/pbaas/VdxfUniValue.js index d0c677c..c3edc8a 100644 --- a/dist/pbaas/VdxfUniValue.js +++ b/dist/pbaas/VdxfUniValue.js @@ -8,6 +8,16 @@ const vdxf_1 = require("../constants/vdxf"); const bn_js_1 = require("bn.js"); const vdxf_2 = require("../vdxf"); const varint_1 = require("../utils/varint"); +const string_1 = require("../utils/string"); +const CurrencyValueMap_1 = require("./CurrencyValueMap"); +const Rating_1 = require("./Rating"); +const TransferDestination_1 = require("./TransferDestination"); +const ContentMultiMapRemove_1 = require("./ContentMultiMapRemove"); +const CrossChainDataRef_1 = require("./CrossChainDataRef"); +const SignatureData_1 = require("./SignatureData"); +const DataDescriptor_1 = require("./DataDescriptor"); +const MMRDescriptor_1 = require("./MMRDescriptor"); +const VDXF_Data = require("../vdxf/vdxfdatakeys"); exports.VDXF_UNI_VALUE_VERSION_INVALID = new bn_js_1.BN(0, 10); exports.VDXF_UNI_VALUE_VERSION_CURRENT = new bn_js_1.BN(1, 10); const { BufferWriter, BufferReader } = bufferutils_1.default; @@ -106,3 +116,365 @@ class VdxfUniValue { } } exports.VdxfUniValue = VdxfUniValue; +VdxfUniValue.vectorEncodeVDXFUni = (obj) => { + let ss = Buffer.from(''); + if (typeof (obj) != 'object') { + if (typeof (obj) != 'string') + throw new Error('VectorEncodeVDXFUni: not JSON string as expected'); + if ((0, string_1.isHexString)(obj)) { + return Buffer.from(obj, "hex"); + } + return Buffer.from(obj, "utf-8"); + } + if (obj.serializedHex) { + if (!(0, string_1.isHexString)(obj.serializedHex)) { + throw new Error("contentmap: If the \"serializedhex\" key is present, it's data must be only valid hex and complete"); + } + return Buffer.from(obj.serializedHex); + } + if (obj.serializedBase64) { + try { + return Buffer.from(obj.serializedBase64, 'base64'); + } + catch (e) { + throw new Error("contentmap: If the \"serializedBase64\" key is present, it's data must be only valid base64 and complete"); + } + } + if (obj.message) { + return Buffer.from(obj.message, "utf-8"); + } + // this should be an object with "vdxfkey" as the key and {object} as the json object to serialize + const oneValKeys = Object.keys(obj); + const oneValValues = Object.values(obj); + for (let k = 0; k < oneValKeys.length; k++) { + const objTypeKey = oneValKeys[k]; + if (objTypeKey == VDXF_Data.DataByteKey.vdxfid) { + const oneByte = Buffer.from(oneValValues[k], "hex"); + if (oneByte.length != 1) { + throw new Error("contentmap: byte data must be exactly one byte"); + } + ss = Buffer.concat([ss, oneByte]); + } + else if (objTypeKey == VDXF_Data.DataInt16Key.vdxfid) { + const oneShort = Buffer.alloc(2); + oneShort.writeInt16LE(oneValValues[k]); + ss = Buffer.concat([ss, oneShort]); + } + else if (objTypeKey == VDXF_Data.DataUint16Key.vdxfid) { + const oneUShort = Buffer.alloc(2); + oneUShort.writeUInt16LE(oneValValues[k]); + ss = Buffer.concat([ss, oneUShort]); + } + else if (objTypeKey == VDXF_Data.DataInt32Key.vdxfid) { + const oneInt = Buffer.alloc(4); + oneInt.writeInt32LE(oneValValues[k]); + ss = Buffer.concat([ss, oneInt]); + } + else if (objTypeKey == VDXF_Data.DataUint32Key.vdxfid) { + const oneUInt = Buffer.alloc(4); + oneUInt.writeUInt32LE(oneValValues[k]); + ss = Buffer.concat([ss, oneUInt]); + } + else if (objTypeKey == VDXF_Data.DataInt64Key.vdxfid) { + const oneInt64 = Buffer.alloc(8); + oneInt64.writeIntLE(oneValValues[k], 0, 8); + ss = Buffer.concat([ss, oneInt64]); + } + else if (objTypeKey == VDXF_Data.DataUint160Key.vdxfid) { + const oneKey = (0, address_1.fromBase58Check)(oneValValues[k]).hash; + ss = Buffer.concat([ss, oneKey]); + } + else if (objTypeKey == VDXF_Data.DataUint256Key.vdxfid) { + const oneHash = Buffer.from(oneValValues[k], "hex"); + if (oneHash.length != 32) { + throw new Error("contentmap: hash data must be exactly 32 bytes"); + } + ss = Buffer.concat([ss, oneHash.reverse()]); + } + else if (objTypeKey == VDXF_Data.DataStringKey.vdxfid) { + let length = 20; + length += 1; + const encodedLength = varuint_1.default.encodingLength(Buffer.from(oneValValues[k], "utf-8").length); + length += varuint_1.default.encodingLength(encodedLength + Buffer.from(oneValValues[k], "utf-8").length); + length += encodedLength; + length += Buffer.from(oneValValues[k], "utf-8").length; + const writer = new BufferWriter(Buffer.alloc(length)); + writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); + writer.writeVarInt(new bn_js_1.BN(1)); + writer.writeCompactSize(encodedLength + Buffer.from(oneValValues[k], "utf-8").length); + writer.writeVarSlice(Buffer.from(oneValValues[k], "utf-8")); + ss = Buffer.concat([ss, writer.buffer]); + } + else if (objTypeKey == VDXF_Data.DataByteVectorKey.vdxfid) { + let length = 20; + length += 1; + const encodedLength = varuint_1.default.encodingLength(Buffer.from(oneValValues[k], "hex").length); + length += varuint_1.default.encodingLength(encodedLength + Buffer.from(oneValValues[k], "hex").length); + length += encodedLength; + length += Buffer.from(oneValValues[k], "hex").length; + const writer = new BufferWriter(Buffer.alloc(length)); + writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); + writer.writeVarInt(new bn_js_1.BN(1)); + writer.writeCompactSize(encodedLength + Buffer.from(oneValValues[k], "hex").length); + writer.writeVarSlice(Buffer.from(oneValValues[k], "hex")); + ss = Buffer.concat([ss, writer.buffer]); + } + else if (objTypeKey == VDXF_Data.DataCurrencyMapKey.vdxfid) { + const destinations = Object.keys(oneValValues[k]); + const values = Object.values(oneValValues[k]); + const oneCurMap = new CurrencyValueMap_1.CurrencyValueMap({ value_map: new Map(destinations.map((key, index) => [key, new bn_js_1.BN(values[index])])), multivalue: true }); + let length = 20; + length += 1; + length += varuint_1.default.encodingLength(oneCurMap.getByteLength()); + length += oneCurMap.getByteLength(); + const writer = new BufferWriter(Buffer.alloc(length)); + writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); + writer.writeVarInt(new bn_js_1.BN(1)); + writer.writeCompactSize(oneCurMap.getByteLength()); + writer.writeSlice(oneCurMap.toBuffer()); + ss = Buffer.concat([ss, writer.buffer]); + } + else if (objTypeKey == VDXF_Data.DataRatingsKey.vdxfid) { + const version = new bn_js_1.BN(oneValValues[k].version); + const trust_level = new bn_js_1.BN(oneValValues[k].trust_level); + const destinations = Object.keys(oneValValues[k].rating); + const values = Object.values(oneValValues[k]); + const oneRatingMap = new Rating_1.Rating({ ratings: new Map(destinations.map((key, index) => [key, Buffer.from(values[index], 'hex')])), version, trust_level }); + let length = 20; + length += varint_1.default.encodingLength(oneRatingMap.version); + length += varuint_1.default.encodingLength(oneRatingMap.getByteLength()); + length += oneRatingMap.getByteLength(); + const writer = new BufferWriter(Buffer.alloc(length)); + writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); + writer.writeVarInt(oneRatingMap.version); + writer.writeCompactSize(oneRatingMap.getByteLength()); + writer.writeSlice(oneRatingMap.toBuffer()); + ss = Buffer.concat([ss, writer.buffer]); + } + else if (objTypeKey == VDXF_Data.DataTransferDestinationKey.vdxfid) { + const transferDest = new TransferDestination_1.TransferDestination(oneValValues[k]); + let length = 20; + length += varint_1.default.encodingLength(transferDest.typeNoFlags()); + length += varuint_1.default.encodingLength(transferDest.getByteLength()); + length += transferDest.getByteLength(); + const writer = new BufferWriter(Buffer.alloc(length)); + writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); + writer.writeVarInt(transferDest.typeNoFlags()); + writer.writeCompactSize(transferDest.getByteLength()); + writer.writeSlice(transferDest.toBuffer()); + ss = Buffer.concat([ss, writer.buffer]); + } + else if (objTypeKey == VDXF_Data.ContentMultiMapRemoveKey.vdxfid) { + const transferDest = new ContentMultiMapRemove_1.ContentMultiMapRemove(oneValValues[k]); + let length = 20; + length += varint_1.default.encodingLength(transferDest.version); + length += varuint_1.default.encodingLength(transferDest.getByteLength()); + length += transferDest.getByteLength(); + const writer = new BufferWriter(Buffer.alloc(length)); + writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); + writer.writeVarInt(transferDest.version); + writer.writeCompactSize(transferDest.getByteLength()); + writer.writeSlice(transferDest.toBuffer()); + ss = Buffer.concat([ss, writer.buffer]); + } + else if (objTypeKey == VDXF_Data.CrossChainDataRefKey.vdxfid) { + const transferDest = new CrossChainDataRef_1.CrossChainDataRef(oneValValues[k]); + let length = 20; + length += varint_1.default.encodingLength(vdxf_1.VDXF_OBJECT_DEFAULT_VERSION); + length += varuint_1.default.encodingLength(transferDest.getByteLength()); + length += transferDest.getByteLength(); + const writer = new BufferWriter(Buffer.alloc(length)); + writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); + writer.writeVarInt(vdxf_1.VDXF_OBJECT_DEFAULT_VERSION); + writer.writeCompactSize(transferDest.getByteLength()); + writer.writeSlice(transferDest.toBuffer()); + ss = Buffer.concat([ss, writer.buffer]); + } + else if (objTypeKey == VDXF_Data.DataDescriptorKey.vdxfid) { + const descr = DataDescriptor_1.DataDescriptor.fromJson(oneValValues[k]); + let length = 20; + length += varint_1.default.encodingLength(descr.version); + length += varuint_1.default.encodingLength(descr.getByteLength()); + length += descr.getByteLength(); + const writer = new BufferWriter(Buffer.alloc(length)); + writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); + writer.writeVarInt(descr.version); + writer.writeCompactSize(descr.getByteLength()); + writer.writeSlice(descr.toBuffer()); + ss = Buffer.concat([ss, writer.buffer]); + } + else if (objTypeKey == VDXF_Data.MMRDescriptorKey.vdxfid) { + const descr = MMRDescriptor_1.MMRDescriptor.fromJson(oneValValues[k]); + let length = 20; + length += varint_1.default.encodingLength(descr.version); + length += varuint_1.default.encodingLength(descr.getByteLength()); + length += descr.getByteLength(); + const writer = new BufferWriter(Buffer.alloc(length)); + writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); + writer.writeVarInt(descr.version); + writer.writeCompactSize(descr.getByteLength()); + writer.writeSlice(descr.toBuffer()); + ss = Buffer.concat([ss, writer.buffer]); + } + else if (objTypeKey == VDXF_Data.SignatureDataKey.vdxfid) { + const sigData = SignatureData_1.SignatureData.fromJson(oneValValues[k]); + let length = 20; + length += varint_1.default.encodingLength(sigData.version); + length += varuint_1.default.encodingLength(sigData.getByteLength()); + length += sigData.getByteLength(); + const writer = new BufferWriter(Buffer.alloc(length)); + writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); + writer.writeVarInt(sigData.version); + writer.writeCompactSize(sigData.getByteLength()); + writer.writeSlice(sigData.toBuffer()); + ss = Buffer.concat([ss, writer.buffer]); + } + else { + throw new Error("contentmap invalid or unrecognized vdxfkey for object type: " + oneValValues[k]); + } + } + return ss; +}; +VdxfUniValue.VDXFDataToUniValue = (buffer, offset = 0, pSuccess = null) => { + const reader = new BufferReader(buffer, offset); + let objectUni; + try { + let checkVal; + let version = new bn_js_1.BN(0); + let objSize = 0; + checkVal = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + if (checkVal == VDXF_Data.DataCurrencyMapKey.vdxfid) { + const oneCurrencyMap = new CurrencyValueMap_1.CurrencyValueMap(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = oneCurrencyMap.fromBuffer(reader.buffer, reader.offset); + if (oneCurrencyMap.isValid()) { + objectUni = { [checkVal]: oneCurrencyMap.toJson() }; + } + } + else if (checkVal == VDXF_Data.DataRatingsKey.vdxfid) { + const oneRatingObj = new Rating_1.Rating(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = oneRatingObj.fromBuffer(reader.buffer, reader.offset); + if (oneRatingObj.isValid()) { + objectUni = { [checkVal]: oneRatingObj.toJson() }; + } + } + else if (checkVal == VDXF_Data.DataTransferDestinationKey.vdxfid) { + const oneTransferDest = new TransferDestination_1.TransferDestination(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = oneTransferDest.fromBuffer(reader.buffer, reader.offset); + if (oneTransferDest.isValid()) { + objectUni = { [checkVal]: oneTransferDest.toJson() }; + } + } + else if (checkVal == VDXF_Data.ContentMultiMapRemoveKey.vdxfid) { + throw new Error("ContentMultiMapRemoveKey not implemented"); + // TODO: Implement ContentMultiMapRemoveKey + // CContentMultiMapRemove oneContentRemove; + // ss >> VARINT(version); + // ss >> COMPACTSIZE(objSize); + // ss >> oneContentRemove; + // if (oneContentRemove.isValid()) + // { + // objectUni = UniValue(UniValue::VOBJ); + // objectUni.pushKV(EncodeDestination(CIdentityID(checkVal)), oneContentRemove.ToUniValue()); + // } + } + else if (checkVal == VDXF_Data.DataStringKey.vdxfid) { + let stringVal; + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + stringVal = reader.readVarSlice.toString(); + objectUni = { [checkVal]: stringVal }; + } + else if (checkVal == VDXF_Data.DataByteVectorKey.vdxfid) { + let vecVal; + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + vecVal = reader.readVarSlice(); + objectUni = { [checkVal]: vecVal.toString('hex') }; + } + else if (checkVal == VDXF_Data.CrossChainDataRefKey.vdxfid) { + const dataRef = new CrossChainDataRef_1.CrossChainDataRef(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = dataRef.fromBuffer(reader.buffer, reader.offset); + if (dataRef.isValid()) { + objectUni = { [checkVal]: dataRef.toJson() }; + } + } + else if (checkVal == VDXF_Data.DataDescriptorKey.vdxfid) { + const dataDescriptor = new DataDescriptor_1.DataDescriptor(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); + if (dataDescriptor.isValid()) { + objectUni = { [checkVal]: dataDescriptor.toJson() }; + } + } + else if (checkVal == VDXF_Data.MMRDescriptorKey.vdxfid) { + const mmrDescriptor = new MMRDescriptor_1.MMRDescriptor(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = mmrDescriptor.fromBuffer(reader.buffer, reader.offset); + if (mmrDescriptor.isValid()) { + objectUni = { [checkVal]: mmrDescriptor.toJson() }; + } + } + else if (checkVal == VDXF_Data.SignatureDataKey.vdxfid) { + const sigData = new SignatureData_1.SignatureData(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = sigData.fromBuffer(reader.buffer, reader.offset); + if (sigData.isValid()) { + objectUni = { [checkVal]: sigData.toJson() }; + } + } + // if we have an object that we recognized, encode it + if (objectUni) { + if (pSuccess != null) { + pSuccess.value = true; + } + } + else { + if (pSuccess != null) { + pSuccess.value = false; + } + } + } + catch (e) { + if (pSuccess != null) { + pSuccess.value = false; + } + } + return { objectUni, offset: reader.offset, pSuccess }; +}; +VdxfUniValue.VDXFDataToUniValueArray = (buffer, offset = 0) => { + let entryArr = []; + const reader = new BufferReader(buffer, offset); + let bytesLeft = buffer.length; + while (bytesLeft > 20) // size of uint160 + { + let objOut = { value: false }; + const { objectUni, offset } = VdxfUniValue.VDXFDataToUniValue(reader.buffer, reader.offset, objOut); + reader.offset = offset; + bytesLeft = buffer.length - reader.offset; + if (objOut.value) { + entryArr.push(objectUni); + } + else { + // add the remaining data as a hex string + reader.offset = reader.offset - 20; + entryArr.push(reader.readSlice(bytesLeft + 20).toString('hex')); + bytesLeft = 0; + break; + } + } + if (bytesLeft && bytesLeft <= 20) { + entryArr.push(reader.readSlice(bytesLeft).toString('hex')); + } + return entryArr.length == 0 ? null : (entryArr.length == 1 ? entryArr[0] : entryArr); +}; diff --git a/dist/utils/IdentityData.d.ts b/dist/utils/IdentityData.d.ts index 5b80453..fc2a41d 100644 --- a/dist/utils/IdentityData.d.ts +++ b/dist/utils/IdentityData.d.ts @@ -1,6 +1,6 @@ import * as keylist from '../vdxf/keys'; -export declare const friendlyName: (vdxfkey: any) => string; -export declare const getIdentityDataType: (vdxfkey: any) => string | keylist.VDXFKeyInterface; +export declare const getFriendlyNameForVdxfKey: (vdxfkey: any) => string; +export declare const getIdentityDataTypeForVdxfKey: (vdxfkey: any) => string | keylist.VDXFKeyInterface; export declare const IdentityVdxfidMap: { [x: string]: { name: string; diff --git a/dist/utils/IdentityData.js b/dist/utils/IdentityData.js index 08e984d..19afd51 100644 --- a/dist/utils/IdentityData.js +++ b/dist/utils/IdentityData.js @@ -1,10 +1,10 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.IdentityVdxfidMap = exports.getIdentityDataType = exports.friendlyName = void 0; -const identitykeys = require("../vdxf/identityDataKeys"); +exports.IdentityVdxfidMap = exports.getIdentityDataTypeForVdxfKey = exports.getFriendlyNameForVdxfKey = void 0; +const identitykeys = require("../vdxf/identitydatakeys"); const keylist = require("../vdxf/keys"); -const VDXF_Data = require("../vdxf/vdxfDataKeys"); -const friendlyName = (vdxfkey) => { +const VDXF_Data = require("../vdxf/vdxfdatakeys"); +const getFriendlyNameForVdxfKey = (vdxfkey) => { if (vdxfkey in exports.IdentityVdxfidMap) { return exports.IdentityVdxfidMap[vdxfkey].name; } @@ -12,8 +12,8 @@ const friendlyName = (vdxfkey) => { throw new Error("Unknown VDXF key"); } }; -exports.friendlyName = friendlyName; -const getIdentityDataType = (vdxfkey) => { +exports.getFriendlyNameForVdxfKey = getFriendlyNameForVdxfKey; +const getIdentityDataTypeForVdxfKey = (vdxfkey) => { if (vdxfkey in exports.IdentityVdxfidMap) { return exports.IdentityVdxfidMap[vdxfkey].type; } @@ -21,149 +21,149 @@ const getIdentityDataType = (vdxfkey) => { throw new Error("Unknown VDXF key"); } }; -exports.getIdentityDataType = getIdentityDataType; +exports.getIdentityDataTypeForVdxfKey = getIdentityDataTypeForVdxfKey; exports.IdentityVdxfidMap = { - [identitykeys.IDENTITY_FIRSTNAME.vdxfid]: { name: "First Name", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_LASTNAME.vdxfid]: { name: "Last Name", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_NATIONALITY.vdxfid]: { name: "Nationality", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_ATTESTOR.vdxfid]: { name: "Attestor ID", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_ATTESTATION_RECIPIENT.vdxfid]: { name: "Attestation Recipient", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_PHONENUMBER.vdxfid]: { name: "Phone Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_OVER18.vdxfid]: { name: "Over 18", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITY_OVER21.vdxfid]: { name: "Over 21", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITY_OVER25.vdxfid]: { name: "Over 25", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITY_EMAIL.vdxfid]: { name: "Email Address", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_HOMEADDRESS.vdxfid]: { name: "Home address", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITY_HOMEADDRESS_STREET1.vdxfid]: { name: "Street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_HOMEADDRESS_STREET2.vdxfid]: { name: "Street 2", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_HOMEADDRESS_CITY.vdxfid]: { name: "City", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_HOMEADDRESS_REGION.vdxfid]: { name: "Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_HOMEADDRESS_POSTCODE.vdxfid]: { name: "Post Code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_HOMEADDRESS_COUNTRY.vdxfid]: { name: "Country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_IDNUMBER_VALUE.vdxfid]: { name: "ID Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_IDNUMBER_TYPE.vdxfid]: { name: "ID Type", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_VERIFICATION_STATUS.vdxfid]: { name: "Verification Status", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_ACCEPTEDTOS.vdxfid]: { name: "Accepted Terms and Conditions", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_VERIFIEDSMS.vdxfid]: { name: "SMS Verified", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_KYCCHECKED.vdxfid]: { name: "KYC Checked ok", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_DOCUMENTSVERIFIED.vdxfid]: { name: "Documents Verified", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_SELFIECHECKED.vdxfid]: { name: "Selfie Checked", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_WATCHLISTOK.vdxfid]: { name: "Watchlist ok", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Riskcheck ok", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITY_DRIVINGLICENCE.vdxfid]: { name: "Driving Licence", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ORIGINALFRONT.vdxfid]: { name: "Driving Licence Front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ORIGINALBACK.vdxfid]: { name: "Driving Licence Back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_CROPPEDFRONT.vdxfid]: { name: "Driving Licence Front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_CROPPEDBACK.vdxfid]: { name: "Driving Licence Back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_FACE.vdxfid]: { name: "Driving Licence Face", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_IDNUMBER.vdxfid]: { name: "Driving Licence Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_CATEGORY.vdxfid]: { name: "Driving Licence Catagory", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_EXPIRATIONDATE.vdxfid]: { name: "Driving Licence expiry date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ISSUINGCOUNTRY.vdxfid]: { name: "Driving Licence issuing country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ISSUINGREGION.vdxfid]: { name: "Driving Licence issuing region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_DATEOFBIRTH.vdxfid]: { name: "Driving Licence Date of Birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_STREET1.vdxfid]: { name: "Driving Licence Street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_CITY.vdxfid]: { name: "Driving Licence City", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_REGION.vdxfid]: { name: "Driving Licence Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_POSTCODE.vdxfid]: { name: "Driving Licence ZIP/Post Code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_COUNTRY.vdxfid]: { name: "Driving Licence Country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_SELFIECHECK_IMAGE.vdxfid]: { name: "Selfie Check image", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_SELFIECHECK_VIDEO.vdxfid]: { name: "Selfie Check video", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Risk Check Ok", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_EMAIL_ISDELIVERABLE.vdxfid]: { name: "Email address is deliverable", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITY_EMAIL_BREACHCOUNT.vdxfid]: { name: "Email breach count", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_EMAIL_FIRSTBREACHEDAT.vdxfid]: { name: "Email first breach date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_EMAIL_LASTBREACHEDAT.vdxfid]: { name: "Email last breach date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_EMAIL_DOMAIN_REGISTEREDAT.vdxfid]: { name: "Email domain registered at", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_EMAIL_DOMAIN_FREEPROVIDER.vdxfid]: { name: "Email is free provider", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_EMAIL_DOMAIN_CUSTOM.vdxfid]: { name: "Email Domain is custom", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_EMAIL_DOMAIN_DISPOSABLE.vdxfid]: { name: "Email Domain Disposable", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS.vdxfid]: { name: "Email top level Domain Suspicious", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_IDCARD.vdxfid]: { name: "ID Card", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITY_IDCARD_ORIGINALFRONT.vdxfid]: { name: "ID Card Front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_IDCARD_ORIGINALBACK.vdxfid]: { name: "ID Card Back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_IDCARD_CROPPEDFRONT.vdxfid]: { name: "ID Card Front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_IDCARD_CROPPEDBACK.vdxfid]: { name: "ID Card Back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_IDCARD_FACE.vdxfid]: { name: "ID Card Face", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_IDCARD_IDNUMBER.vdxfid]: { name: "ID Card ID Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_IDCARD_CATEGORY.vdxfid]: { name: "ID Card Category", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_IDCARD_EXPIRATIONDATE.vdxfid]: { name: "ID Card Expiry date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_IDCARD_ISSUINGREGION.vdxfid]: { name: "ID Card Issuing Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_IDCARD_DATEOFBIRTH.vdxfid]: { name: "ID Card Date of Birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_IDCARD_ADDRESS_STREET1.vdxfid]: { name: "ID Card Street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_IDCARD_ADDRESS_CITY.vdxfid]: { name: "ID Card City", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_IDCARD_ADDRESS_REGION.vdxfid]: { name: "ID Card Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_IDCARD_ADDRESS_POSTCODE.vdxfid]: { name: "ID Card Zip/Post Code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_IDCARD_ADDRESS_COUNTRY.vdxfid]: { name: "ID Card Country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_PASSPORT.vdxfid]: { name: "Passport", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITY_PASSPORT_ORIGINALFRONT.vdxfid]: { name: "Passport front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_PASSPORT_ORIGINALBACK.vdxfid]: { name: "Passport back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_PASSPORT_CROPPEDFRONT.vdxfid]: { name: "Passport front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_PASSPORT_CROPPEDBACK.vdxfid]: { name: "Passport back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_PASSPORT_FACE.vdxfid]: { name: "Passport face", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_PASSPORT_IDNUMBER.vdxfid]: { name: "Passport ID Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_PASSPORT_CATEGORY.vdxfid]: { name: "Passport Category", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_PASSPORT_EXPIRATIONDATE.vdxfid]: { name: "Passport expiry date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_PASSPORT_DATEOFBIRTH.vdxfid]: { name: "Passport date of birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_PASSPORT_ADDRESS_STREET1.vdxfid]: { name: "Passport street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_PASSPORT_ADDRESS_CITY.vdxfid]: { name: "Passport city", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_PASSPORT_ADDRESS_REGION.vdxfid]: { name: "Passport region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_PASSPORT_ADDRESS_POSTCODE.vdxfid]: { name: "Passport zip/post code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_PASSPORT_ADDRESS_COUNTRY.vdxfid]: { name: "Passport country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT.vdxfid]: { name: "Residence Permit", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ORIGINALFRONT.vdxfid]: { name: "Residence Permit front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ORIGINALBACK.vdxfid]: { name: "Residence Permit back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_CROPPEDFRONT.vdxfid]: { name: "Residence Permit front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_CROPPEDBACK.vdxfid]: { name: "Residence Permit back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_FACE.vdxfid]: { name: "Residence Permit face", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_IDNUMBER.vdxfid]: { name: "Residence Permit ID Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_CATEGORY.vdxfid]: { name: "Residence Permit category", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_EXPIRATIONDATE.vdxfid]: { name: "Residence Permit expiry date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ISSUINGREGION.vdxfid]: { name: "Residence Permit issuing region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_DATEOFBIRTH.vdxfid]: { name: "Residence Permit date of birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS.vdxfid]: { name: "Residence Permit Address", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_STREET1.vdxfid]: { name: "Residence Permit Street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_CITY.vdxfid]: { name: "Residence Permit City", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_REGION.vdxfid]: { name: "Residence Permit Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_POSTCODE.vdxfid]: { name: "Residence Permit Zip/Post code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_COUNTRY.vdxfid]: { name: "Residence Permit Country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENTCARD.vdxfid]: { name: "Resident Card", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITY_RESIDENTCARD_ORIGINALFRONT.vdxfid]: { name: "Resident Card Front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_RESIDENTCARD_ORIGINALBACK.vdxfid]: { name: "Resident Card Back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_RESIDENTCARD_CROPPEDFRONT.vdxfid]: { name: "Resident Card Front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_RESIDENTCARD_CROPPEDBACK.vdxfid]: { name: "Resident Card Back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_RESIDENTCARD_FACE.vdxfid]: { name: "Resident Card Face", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_RESIDENTCARD_IDNUMBER.vdxfid]: { name: "Resident Card ID Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENTCARD_CATEGORY.vdxfid]: { name: "Resident Card Category", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENTCARD_EXPIRATIONDATE.vdxfid]: { name: "Resident Card Expiry Date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENTCARD_ISSUINGREGION.vdxfid]: { name: "Resident Card Issuing Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENTCARD_DATEOFBIRTH.vdxfid]: { name: "Resident Card date of birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_STREET1.vdxfid]: { name: "Resident Card Street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_CITY.vdxfid]: { name: "Resident Card City", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_REGION.vdxfid]: { name: "Resident Card Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_POSTCODE.vdxfid]: { name: "Resident Card Zip/Post Code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_COUNTRY.vdxfid]: { name: "Resident Card Country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_VISA.vdxfid]: { name: "Visa", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITY_VISA_ORIGINALFRONT.vdxfid]: { name: "Visa front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_VISA_ORIGINALBACK.vdxfid]: { name: "Visa back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_VISA_CROPPEDFRONT.vdxfid]: { name: "Visa front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_VISA_CROPPEDBACK.vdxfid]: { name: "Visa back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_VISA_FACE.vdxfid]: { name: "Visa face", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_VISA_IDNUMBER.vdxfid]: { name: "Visa ID Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_VISA_CATEGORY.vdxfid]: { name: "Visa Category", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_VISA_EXPIRATIONDATE.vdxfid]: { name: "Visa expiry date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_VISA_ISSUINGREGION.vdxfid]: { name: "Visa issuing region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_VISA_DATEOFBIRTH.vdxfid]: { name: "Visa date of birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_VISA_ADDRESS_STREET1.vdxfid]: { name: "Visa Street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_VISA_ADDRESS_CITY.vdxfid]: { name: "Visa City", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_VISA_ADDRESS_REGION.vdxfid]: { name: "Visa Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_VISA_ADDRESS_POSTCODE.vdxfid]: { name: "Visa Zip/Post Code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_VISA_ADDRESS_COUNTRY.vdxfid]: { name: "Visa Country", type: VDXF_Data.DataStringKey() }, - [keylist.ATTESTATION_PROVISION_TYPE.vdxfid]: { name: "Attestation Type", type: VDXF_Data.DataStringKey() }, - [keylist.ATTESTATION_PROVISION_URL.vdxfid]: { name: "Attestation URL", type: VDXF_Data.DataURLKeyName() }, - [keylist.ATTESTATION_VIEW_RESPONSE.vdxfid]: { name: "Attestation View Response", type: VDXF_Data.DataStringKey() }, - [keylist.ATTESTATION_VIEW_REQUEST.vdxfid]: { name: "Attestation View Response", type: VDXF_Data.DataStringKey() }, - [keylist.PROFILE_DATA_VIEW_REQUEST.vdxfid]: { name: "Profile Data View Request", type: VDXF_Data.DataStringKey() }, - [keylist.IDENTITY_SIGNDATA_REQUEST.vdxfid]: { name: "Identity Sign Data Request", type: VDXF_Data.DataStringKey() }, + [identitykeys.IDENTITY_FIRSTNAME.vdxfid]: { name: "First Name", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_LASTNAME.vdxfid]: { name: "Last Name", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_NATIONALITY.vdxfid]: { name: "Nationality", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_ATTESTOR.vdxfid]: { name: "Attestor ID", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_ATTESTATION_RECIPIENT.vdxfid]: { name: "Attestation Recipient", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_PHONENUMBER.vdxfid]: { name: "Phone Number", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_OVER18.vdxfid]: { name: "Over 18", type: VDXF_Data.DataByteKeyName }, + [identitykeys.IDENTITY_OVER21.vdxfid]: { name: "Over 21", type: VDXF_Data.DataByteKeyName }, + [identitykeys.IDENTITY_OVER25.vdxfid]: { name: "Over 25", type: VDXF_Data.DataByteKeyName }, + [identitykeys.IDENTITY_EMAIL.vdxfid]: { name: "Email Address", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_HOMEADDRESS.vdxfid]: { name: "Home address", type: VDXF_Data.DataUint160Key }, + [identitykeys.IDENTITY_HOMEADDRESS_STREET1.vdxfid]: { name: "Street 1", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_HOMEADDRESS_STREET2.vdxfid]: { name: "Street 2", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_HOMEADDRESS_CITY.vdxfid]: { name: "City", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_HOMEADDRESS_REGION.vdxfid]: { name: "Region", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_HOMEADDRESS_POSTCODE.vdxfid]: { name: "Post Code", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_HOMEADDRESS_COUNTRY.vdxfid]: { name: "Country", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_IDNUMBER_VALUE.vdxfid]: { name: "ID Number", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_IDNUMBER_TYPE.vdxfid]: { name: "ID Type", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_VERIFICATION_STATUS.vdxfid]: { name: "Verification Status", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_ACCEPTEDTOS.vdxfid]: { name: "Accepted Terms and Conditions", type: VDXF_Data.DataByteKeyName }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_VERIFIEDSMS.vdxfid]: { name: "SMS Verified", type: VDXF_Data.DataByteKeyName }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_KYCCHECKED.vdxfid]: { name: "KYC Checked ok", type: VDXF_Data.DataByteKeyName }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_DOCUMENTSVERIFIED.vdxfid]: { name: "Documents Verified", type: VDXF_Data.DataByteKeyName }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_SELFIECHECKED.vdxfid]: { name: "Selfie Checked", type: VDXF_Data.DataByteKeyName }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_WATCHLISTOK.vdxfid]: { name: "Watchlist ok", type: VDXF_Data.DataByteKeyName }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Riskcheck ok", type: VDXF_Data.DataByteKeyName }, + [identitykeys.IDENTITY_DRIVINGLICENCE.vdxfid]: { name: "Driving Licence", type: VDXF_Data.DataUint160Key }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ORIGINALFRONT.vdxfid]: { name: "Driving Licence Front", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ORIGINALBACK.vdxfid]: { name: "Driving Licence Back", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_DRIVINGLICENCE_CROPPEDFRONT.vdxfid]: { name: "Driving Licence Front", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_DRIVINGLICENCE_CROPPEDBACK.vdxfid]: { name: "Driving Licence Back", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_DRIVINGLICENCE_FACE.vdxfid]: { name: "Driving Licence Face", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_DRIVINGLICENCE_IDNUMBER.vdxfid]: { name: "Driving Licence Number", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_DRIVINGLICENCE_CATEGORY.vdxfid]: { name: "Driving Licence Catagory", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_DRIVINGLICENCE_EXPIRATIONDATE.vdxfid]: { name: "Driving Licence expiry date", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ISSUINGCOUNTRY.vdxfid]: { name: "Driving Licence issuing country", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ISSUINGREGION.vdxfid]: { name: "Driving Licence issuing region", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_DRIVINGLICENCE_DATEOFBIRTH.vdxfid]: { name: "Driving Licence Date of Birth", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_STREET1.vdxfid]: { name: "Driving Licence Street 1", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_CITY.vdxfid]: { name: "Driving Licence City", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_REGION.vdxfid]: { name: "Driving Licence Region", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_POSTCODE.vdxfid]: { name: "Driving Licence ZIP/Post Code", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_COUNTRY.vdxfid]: { name: "Driving Licence Country", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_SELFIECHECK_IMAGE.vdxfid]: { name: "Selfie Check image", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_SELFIECHECK_VIDEO.vdxfid]: { name: "Selfie Check video", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Risk Check Ok", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_EMAIL_ISDELIVERABLE.vdxfid]: { name: "Email address is deliverable", type: VDXF_Data.DataByteKeyName }, + [identitykeys.IDENTITY_EMAIL_BREACHCOUNT.vdxfid]: { name: "Email breach count", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_EMAIL_FIRSTBREACHEDAT.vdxfid]: { name: "Email first breach date", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_EMAIL_LASTBREACHEDAT.vdxfid]: { name: "Email last breach date", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_EMAIL_DOMAIN_REGISTEREDAT.vdxfid]: { name: "Email domain registered at", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_EMAIL_DOMAIN_FREEPROVIDER.vdxfid]: { name: "Email is free provider", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_EMAIL_DOMAIN_CUSTOM.vdxfid]: { name: "Email Domain is custom", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_EMAIL_DOMAIN_DISPOSABLE.vdxfid]: { name: "Email Domain Disposable", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS.vdxfid]: { name: "Email top level Domain Suspicious", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_IDCARD.vdxfid]: { name: "ID Card", type: VDXF_Data.DataUint160Key }, + [identitykeys.IDENTITY_IDCARD_ORIGINALFRONT.vdxfid]: { name: "ID Card Front", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_IDCARD_ORIGINALBACK.vdxfid]: { name: "ID Card Back", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_IDCARD_CROPPEDFRONT.vdxfid]: { name: "ID Card Front", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_IDCARD_CROPPEDBACK.vdxfid]: { name: "ID Card Back", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_IDCARD_FACE.vdxfid]: { name: "ID Card Face", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_IDCARD_IDNUMBER.vdxfid]: { name: "ID Card ID Number", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_IDCARD_CATEGORY.vdxfid]: { name: "ID Card Category", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_IDCARD_EXPIRATIONDATE.vdxfid]: { name: "ID Card Expiry date", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_IDCARD_ISSUINGREGION.vdxfid]: { name: "ID Card Issuing Region", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_IDCARD_DATEOFBIRTH.vdxfid]: { name: "ID Card Date of Birth", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_IDCARD_ADDRESS_STREET1.vdxfid]: { name: "ID Card Street 1", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_IDCARD_ADDRESS_CITY.vdxfid]: { name: "ID Card City", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_IDCARD_ADDRESS_REGION.vdxfid]: { name: "ID Card Region", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_IDCARD_ADDRESS_POSTCODE.vdxfid]: { name: "ID Card Zip/Post Code", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_IDCARD_ADDRESS_COUNTRY.vdxfid]: { name: "ID Card Country", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_PASSPORT.vdxfid]: { name: "Passport", type: VDXF_Data.DataUint160Key }, + [identitykeys.IDENTITY_PASSPORT_ORIGINALFRONT.vdxfid]: { name: "Passport front", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_PASSPORT_ORIGINALBACK.vdxfid]: { name: "Passport back", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_PASSPORT_CROPPEDFRONT.vdxfid]: { name: "Passport front", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_PASSPORT_CROPPEDBACK.vdxfid]: { name: "Passport back", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_PASSPORT_FACE.vdxfid]: { name: "Passport face", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_PASSPORT_IDNUMBER.vdxfid]: { name: "Passport ID Number", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_PASSPORT_CATEGORY.vdxfid]: { name: "Passport Category", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_PASSPORT_EXPIRATIONDATE.vdxfid]: { name: "Passport expiry date", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_PASSPORT_DATEOFBIRTH.vdxfid]: { name: "Passport date of birth", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_STREET1.vdxfid]: { name: "Passport street 1", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_CITY.vdxfid]: { name: "Passport city", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_REGION.vdxfid]: { name: "Passport region", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_POSTCODE.vdxfid]: { name: "Passport zip/post code", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_COUNTRY.vdxfid]: { name: "Passport country", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENCEPERMIT.vdxfid]: { name: "Residence Permit", type: VDXF_Data.DataUint160Key }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ORIGINALFRONT.vdxfid]: { name: "Residence Permit front", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ORIGINALBACK.vdxfid]: { name: "Residence Permit back", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_CROPPEDFRONT.vdxfid]: { name: "Residence Permit front", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_CROPPEDBACK.vdxfid]: { name: "Residence Permit back", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_FACE.vdxfid]: { name: "Residence Permit face", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_IDNUMBER.vdxfid]: { name: "Residence Permit ID Number", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_CATEGORY.vdxfid]: { name: "Residence Permit category", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_EXPIRATIONDATE.vdxfid]: { name: "Residence Permit expiry date", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ISSUINGREGION.vdxfid]: { name: "Residence Permit issuing region", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_DATEOFBIRTH.vdxfid]: { name: "Residence Permit date of birth", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS.vdxfid]: { name: "Residence Permit Address", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_STREET1.vdxfid]: { name: "Residence Permit Street 1", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_CITY.vdxfid]: { name: "Residence Permit City", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_REGION.vdxfid]: { name: "Residence Permit Region", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_POSTCODE.vdxfid]: { name: "Residence Permit Zip/Post code", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_COUNTRY.vdxfid]: { name: "Residence Permit Country", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENTCARD.vdxfid]: { name: "Resident Card", type: VDXF_Data.DataUint160Key }, + [identitykeys.IDENTITY_RESIDENTCARD_ORIGINALFRONT.vdxfid]: { name: "Resident Card Front", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_RESIDENTCARD_ORIGINALBACK.vdxfid]: { name: "Resident Card Back", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_RESIDENTCARD_CROPPEDFRONT.vdxfid]: { name: "Resident Card Front", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_RESIDENTCARD_CROPPEDBACK.vdxfid]: { name: "Resident Card Back", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_RESIDENTCARD_FACE.vdxfid]: { name: "Resident Card Face", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_RESIDENTCARD_IDNUMBER.vdxfid]: { name: "Resident Card ID Number", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENTCARD_CATEGORY.vdxfid]: { name: "Resident Card Category", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENTCARD_EXPIRATIONDATE.vdxfid]: { name: "Resident Card Expiry Date", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENTCARD_ISSUINGREGION.vdxfid]: { name: "Resident Card Issuing Region", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENTCARD_DATEOFBIRTH.vdxfid]: { name: "Resident Card date of birth", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_STREET1.vdxfid]: { name: "Resident Card Street 1", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_CITY.vdxfid]: { name: "Resident Card City", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_REGION.vdxfid]: { name: "Resident Card Region", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_POSTCODE.vdxfid]: { name: "Resident Card Zip/Post Code", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_COUNTRY.vdxfid]: { name: "Resident Card Country", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_VISA.vdxfid]: { name: "Visa", type: VDXF_Data.DataUint160Key }, + [identitykeys.IDENTITY_VISA_ORIGINALFRONT.vdxfid]: { name: "Visa front", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_VISA_ORIGINALBACK.vdxfid]: { name: "Visa back", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_VISA_CROPPEDFRONT.vdxfid]: { name: "Visa front", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_VISA_CROPPEDBACK.vdxfid]: { name: "Visa back", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_VISA_FACE.vdxfid]: { name: "Visa face", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_VISA_IDNUMBER.vdxfid]: { name: "Visa ID Number", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_VISA_CATEGORY.vdxfid]: { name: "Visa Category", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_VISA_EXPIRATIONDATE.vdxfid]: { name: "Visa expiry date", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_VISA_ISSUINGREGION.vdxfid]: { name: "Visa issuing region", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_VISA_DATEOFBIRTH.vdxfid]: { name: "Visa date of birth", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_VISA_ADDRESS_STREET1.vdxfid]: { name: "Visa Street 1", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_VISA_ADDRESS_CITY.vdxfid]: { name: "Visa City", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_VISA_ADDRESS_REGION.vdxfid]: { name: "Visa Region", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_VISA_ADDRESS_POSTCODE.vdxfid]: { name: "Visa Zip/Post Code", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_VISA_ADDRESS_COUNTRY.vdxfid]: { name: "Visa Country", type: VDXF_Data.DataStringKey }, + [keylist.ATTESTATION_PROVISION_TYPE.vdxfid]: { name: "Attestation Type", type: VDXF_Data.DataStringKey }, + [keylist.ATTESTATION_PROVISION_URL.vdxfid]: { name: "Attestation URL", type: VDXF_Data.DataURLKeyName }, + [keylist.ATTESTATION_VIEW_RESPONSE.vdxfid]: { name: "Attestation View Response", type: VDXF_Data.DataStringKey }, + [keylist.ATTESTATION_VIEW_REQUEST.vdxfid]: { name: "Attestation View Response", type: VDXF_Data.DataStringKey }, + [keylist.PROFILE_DATA_VIEW_REQUEST.vdxfid]: { name: "Profile Data View Request", type: VDXF_Data.DataStringKey }, + [keylist.IDENTITY_SIGNDATA_REQUEST.vdxfid]: { name: "Identity Sign Data Request", type: VDXF_Data.DataStringKey }, }; diff --git a/dist/utils/mmr.d.ts b/dist/utils/mmr.d.ts new file mode 100644 index 0000000..4bf5e50 --- /dev/null +++ b/dist/utils/mmr.d.ts @@ -0,0 +1,2 @@ +import { BN } from 'bn.js'; +export declare const GetMMRProofIndex: (pos: number, mmvSize: number, extraHashes: number) => InstanceType; diff --git a/dist/utils/mmr.js b/dist/utils/mmr.js new file mode 100644 index 0000000..8cbc00e --- /dev/null +++ b/dist/utils/mmr.js @@ -0,0 +1,87 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GetMMRProofIndex = void 0; +const bn_js_1 = require("bn.js"); +const GetMMRProofIndex = (pos, mmvSize, extraHashes) => { + let index = new bn_js_1.BN(0); + let layerSizes = []; + let merkleSizes = []; + let peakIndexes = []; + let bitPos = 0; + //start at the beginning + //create a simulation of a mmr based on size + if (!(pos > 0 && pos < mmvSize)) + return new bn_js_1.BN(0); + //create an array of all the sizes + while (mmvSize) { + layerSizes.push(mmvSize); + mmvSize = mmvSize >> 1; + } + for (let height = 0; height < layerSizes.length; height++) { + if (height == layerSizes.length - 1 || layerSizes[height] & 1) { + peakIndexes.push(height); + } + } + //array flip peak indexes + peakIndexes.reverse(); + let layerNum = 0; + let layerSize = peakIndexes.length; + for (let passThrough = (layerSize & 1); layerNum == 0 || layerSize > 1; passThrough = (layerSize & 1), layerNum++) { + layerSize = (layerSize >> 1) + passThrough; + if (layerSize) { + merkleSizes.push(layerSize); + } + } + //flip the merklesizes + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } + let p = pos; + for (let l = 0; l < layerSizes.length; l++) { + if (p & 1) { + index = index.or(new bn_js_1.BN(1).shln(bitPos++)); + p >>= 1; + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } + } + else { + if (layerSizes[l] > (p + 1)) { + bitPos++; + p >>= 1; + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } + } + else { + for (p = 0; p < peakIndexes.length; p++) { + if (peakIndexes[p] == l) { + break; + } + } + for (let layerNum = -1, layerSize = peakIndexes.length; layerNum == -1 || layerSize > 1; layerSize = merkleSizes[++layerNum]) { + if (p < (layerSize - 1) || (p & 1)) { + if (p & 1) { + // hash with the one before us + index = index.or(new bn_js_1.BN(1).shln(bitPos++)); + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } + } + else { + // hash with the one in front of us + bitPos++; + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } + } + } + p >>= 1; + } + break; + } + } + } + return index; +}; +exports.GetMMRProofIndex = GetMMRProofIndex; diff --git a/dist/vdxf/classes/Attestation.js b/dist/vdxf/classes/Attestation.js index e7c0ff9..608690d 100644 --- a/dist/vdxf/classes/Attestation.js +++ b/dist/vdxf/classes/Attestation.js @@ -4,7 +4,7 @@ exports.AttestationProvisioningData = exports.AttestationViewRequest = exports.A const bufferutils_1 = require("../../utils/bufferutils"); const address_1 = require("../../utils/address"); const vdxf_1 = require("../../constants/vdxf"); -const DataDescriptor_1 = require("./DataDescriptor"); +const DataDescriptor_1 = require("../../pbaas/DataDescriptor"); const __1 = require("../"); const varuint_1 = require("../../utils/varuint"); const index_1 = require("../index"); diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index b3f94ff..1c3fd67 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -7,8 +7,6 @@ const varuint_1 = require("../../utils/varuint"); const Context_1 = require("./Context"); const Hash160_1 = require("./Hash160"); const Attestation_1 = require("./Attestation"); -const address_1 = require("../../utils/address"); -const vdxf_1 = require("../../constants/vdxf"); class RedirectUri extends __1.VDXFObject { constructor(uri = "", vdxfkey = "") { super(vdxfkey); @@ -186,8 +184,7 @@ class Challenge extends __1.VDXFObject { this.requested_access = []; const requestedAccessLength = reader.readCompactSize(); for (let i = 0; i < requestedAccessLength; i++) { - const _vdxfkey = (0, address_1.toBase58Check)(reader.buffer.slice(reader.offset, reader.offset + vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION); - const _perm = new RequestedPermission(_vdxfkey); + const _perm = new RequestedPermission(); reader.offset = _perm.fromBuffer(reader.buffer, reader.offset); this.requested_access.push(_perm); } diff --git a/dist/vdxf/classes/CrossChainDataRef.d.ts b/dist/vdxf/classes/CrossChainDataRef.d.ts deleted file mode 100644 index e034818..0000000 --- a/dist/vdxf/classes/CrossChainDataRef.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -/// -/// -import { BigNumber } from '../../utils/types/BigNumber'; -import { SerializableEntity } from '../../utils/types/SerializableEntity'; -export declare class CUTXORef implements SerializableEntity { - hash: Buffer; - n: BigNumber; - constructor(data?: { - hash?: Buffer; - n?: BigNumber; - }); - getByteLength(): number; - toBuffer(): Buffer; - fromBuffer(buffer: Buffer, offset?: number): number; -} -export declare class PBaaSEvidenceRef implements SerializableEntity { - version: BigNumber; - flags: BigNumber; - output: CUTXORef; - objectNum: BigNumber; - subObject: BigNumber; - systemID: string; - static FLAG_ISEVIDENCE: import("bn.js"); - static FLAG_HAS_SYSTEM: import("bn.js"); - constructor(data?: any); - SetFlags(): void; - getByteLength(): number; - toBuffer(): Buffer; - fromBuffer(buffer: Buffer, offset?: number): number; -} -export declare class IdentityMultimapRef implements SerializableEntity { - version: BigNumber; - flags: BigNumber; - idID: string; - key: string; - heightStart: BigNumber; - heightEnd: BigNumber; - dataHash: Buffer; - systemID: string; - static FLAG_NO_DELETION: import("bn.js"); - static FLAG_HAS_DATAHASH: import("bn.js"); - static FLAG_HAS_SYSTEM: import("bn.js"); - constructor(data?: any); - SetFlags(): void; - getByteLength(): number; - toBuffer(): Buffer; - fromBuffer(buffer: Buffer, offset?: number): number; -} -export declare class URLRef implements SerializableEntity { - version: BigNumber; - url: string; - constructor(data?: { - version?: BigNumber; - url?: string; - }); - getByteLength(): number; - toBuffer(): Buffer; - fromBuffer(buffer: Buffer, offset?: number): number; -} -export declare class CrossChainDataRef implements SerializableEntity { - ref: PBaaSEvidenceRef | IdentityMultimapRef | URLRef; - static TYPE_CROSSCHAIN_DATAREF: number; - static TYPE_IDENTITY_DATAREF: number; - static TYPE_URL_REF: number; - constructor(data: PBaaSEvidenceRef | IdentityMultimapRef | URLRef | any); - which(): number; - getByteLength(): number; - toBuffer(): Buffer; - fromBuffer(buffer: Buffer, offset?: number): number; -} diff --git a/dist/vdxf/classes/CrossChainDataRef.js b/dist/vdxf/classes/CrossChainDataRef.js deleted file mode 100644 index b2dfbd8..0000000 --- a/dist/vdxf/classes/CrossChainDataRef.js +++ /dev/null @@ -1,235 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CrossChainDataRef = exports.URLRef = exports.IdentityMultimapRef = exports.PBaaSEvidenceRef = exports.CUTXORef = void 0; -const varint_1 = require("../../utils/varint"); -const varuint_1 = require("../../utils/varuint"); -const address_1 = require("../../utils/address"); -const bufferutils_1 = require("../../utils/bufferutils"); -const bn_js_1 = require("bn.js"); -const vdxf_1 = require("../../constants/vdxf"); -const { BufferReader, BufferWriter } = bufferutils_1.default; -class CUTXORef { - constructor(data) { - this.hash = data.hash || Buffer.alloc(0); - this.n = data.n || new bn_js_1.BN(0); - } - getByteLength() { - let byteLength = 0; - byteLength += 32; // hash uint256 - byteLength += 4; // n uint32 - return byteLength; - } - toBuffer() { - const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())); - bufferWriter.writeSlice(this.hash); - bufferWriter.writeUInt32(this.n.toNumber()); - return bufferWriter.buffer; - } - fromBuffer(buffer, offset = 0) { - const reader = new BufferReader(buffer, offset); - this.hash = reader.readSlice(32); - this.n = new bn_js_1.BN(reader.readUInt32()); - return reader.offset; - } -} -exports.CUTXORef = CUTXORef; -class PBaaSEvidenceRef { - constructor(data) { - if (data) { - Object.assign(this, data); - } - } - SetFlags() { - this.flags = this.flags.and(PBaaSEvidenceRef.FLAG_ISEVIDENCE); - if (this.systemID && this.systemID.length > 0) { - this.flags = this.flags.or(PBaaSEvidenceRef.FLAG_HAS_SYSTEM); - } - } - getByteLength() { - let byteLength = 0; - this.SetFlags(); - byteLength += varint_1.default.encodingLength(this.version); - byteLength += varint_1.default.encodingLength(this.flags); - byteLength += this.output.getByteLength(); - byteLength += varint_1.default.encodingLength(this.objectNum); - byteLength += varint_1.default.encodingLength(this.subObject); - if (this.flags.and(PBaaSEvidenceRef.FLAG_HAS_SYSTEM).gt(new bn_js_1.BN(0))) { - byteLength += 20; - } - return byteLength; - } - toBuffer() { - const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())); - bufferWriter.writeVarInt(this.version); - bufferWriter.writeVarInt(this.flags); - bufferWriter.writeSlice(this.output.toBuffer()); - bufferWriter.writeVarInt(this.objectNum); - bufferWriter.writeVarInt(this.subObject); - if (this.flags.and(PBaaSEvidenceRef.FLAG_HAS_SYSTEM).gt(new bn_js_1.BN(0))) { - bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.systemID).hash); - } - return bufferWriter.buffer; - } - fromBuffer(buffer, offset = 0) { - const reader = new BufferReader(buffer, offset); - this.version = reader.readVarInt(); - this.flags = reader.readVarInt(); - this.output = new CUTXORef(); - offset = this.output.fromBuffer(reader.buffer, reader.offset); - this.objectNum = reader.readVarInt(); - this.subObject = reader.readVarInt(); - if (this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH).gt(new bn_js_1.BN(0))) { - this.systemID = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); - } - return reader.offset; - } -} -exports.PBaaSEvidenceRef = PBaaSEvidenceRef; -PBaaSEvidenceRef.FLAG_ISEVIDENCE = new bn_js_1.BN(1); -PBaaSEvidenceRef.FLAG_HAS_SYSTEM = new bn_js_1.BN(2); -class IdentityMultimapRef { - constructor(data) { - if (data) { - Object.assign(this, data); - } - } - SetFlags() { - this.flags = this.flags.and(IdentityMultimapRef.FLAG_NO_DELETION); - if (this.dataHash && this.dataHash.length > 0) { - this.flags = this.flags.or(IdentityMultimapRef.FLAG_HAS_DATAHASH); - } - if (this.systemID && this.systemID.length > 0) { - this.flags = this.flags.or(IdentityMultimapRef.FLAG_HAS_SYSTEM); - } - } - getByteLength() { - let byteLength = 0; - this.SetFlags(); - byteLength += varint_1.default.encodingLength(this.version); - byteLength += varint_1.default.encodingLength(this.flags); - byteLength += 20; // idID uint160 - byteLength += 20; // key uint160 - byteLength += varint_1.default.encodingLength(this.heightStart); // heightStart uint32 - byteLength += varint_1.default.encodingLength(this.heightEnd); // heightEnd uint32 - byteLength += 32; // dataHash uint25 - if (this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH).gt(new bn_js_1.BN(0))) { - byteLength += 32; - } - if (this.flags.and(IdentityMultimapRef.FLAG_HAS_SYSTEM).gt(new bn_js_1.BN(0))) { - byteLength += 20; - } - return byteLength; - } - toBuffer() { - const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())); - bufferWriter.writeVarInt(this.version); - bufferWriter.writeVarInt(this.flags); - bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.idID).hash); - bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.key).hash); - bufferWriter.writeVarInt(this.heightStart); - bufferWriter.writeVarInt(this.heightEnd); - if (this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH).gt(new bn_js_1.BN(0))) { - bufferWriter.writeSlice(this.dataHash); - } - if (this.flags.and(IdentityMultimapRef.FLAG_HAS_SYSTEM).gt(new bn_js_1.BN(0))) { - bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.systemID).hash); - } - return bufferWriter.buffer; - } - fromBuffer(buffer, offset = 0) { - const reader = new BufferReader(buffer, offset); - this.version = reader.readVarInt(); - this.flags = reader.readVarInt(); - this.idID = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); - this.key = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); - this.heightStart = reader.readVarInt(); - this.heightEnd = reader.readVarInt(); - if (this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH).gt(new bn_js_1.BN(0))) { - this.dataHash = reader.readSlice(32); - } - if (this.flags.and(IdentityMultimapRef.FLAG_HAS_SYSTEM).gt(new bn_js_1.BN(0))) { - this.systemID = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); - } - return reader.offset; - } -} -exports.IdentityMultimapRef = IdentityMultimapRef; -IdentityMultimapRef.FLAG_NO_DELETION = new bn_js_1.BN(1); -IdentityMultimapRef.FLAG_HAS_DATAHASH = new bn_js_1.BN(2); -IdentityMultimapRef.FLAG_HAS_SYSTEM = new bn_js_1.BN(4); -class URLRef { - constructor(data) { - if (data) { - this.version = data.version || new bn_js_1.BN(1, 10); - this.url = data.url || ""; - } - } - getByteLength() { - let byteLength = 0; - byteLength += varint_1.default.encodingLength(this.version); - byteLength += varuint_1.default.encodingLength(Buffer.from(this.url, 'utf8').length); - byteLength += Buffer.from(this.url, 'utf8').length; - if (byteLength > 4096) - throw new Error("URLRef exceeds maximum length of 4096 bytes"); - return byteLength; - } - toBuffer() { - const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())); - bufferWriter.writeVarInt(this.version); - bufferWriter.writeVarSlice(Buffer.from(this.url, 'utf8')); - return bufferWriter.buffer; - } - fromBuffer(buffer, offset = 0) { - const reader = new BufferReader(buffer, offset); - this.version = reader.readVarInt(); - this.url = reader.readVarSlice().toString('utf8'); - return reader.offset; - } -} -exports.URLRef = URLRef; -class CrossChainDataRef { - constructor(data) { - this.ref = data || null; - } - which() { - if (this.ref instanceof PBaaSEvidenceRef) { - return CrossChainDataRef.TYPE_CROSSCHAIN_DATAREF; - } - else if (this.ref instanceof IdentityMultimapRef) { - return CrossChainDataRef.TYPE_IDENTITY_DATAREF; - } - else if (this.ref instanceof URLRef) { - return CrossChainDataRef.TYPE_URL_REF; - } - } - getByteLength() { - let byteLength = 1; //type uint8 - byteLength += this.ref.getByteLength(); - return byteLength; - } - toBuffer() { - const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())); - bufferWriter.writeUInt8(this.which()); - bufferWriter.writeSlice(this.ref.toBuffer()); - return bufferWriter.buffer; - } - fromBuffer(buffer, offset = 0) { - const reader = new BufferReader(buffer, offset); - const type = reader.readUInt8(); - if (type == CrossChainDataRef.TYPE_CROSSCHAIN_DATAREF) { - this.ref = new PBaaSEvidenceRef(); - } - else if (type == CrossChainDataRef.TYPE_IDENTITY_DATAREF) { - this.ref = new IdentityMultimapRef(); - } - else if (type == CrossChainDataRef.TYPE_URL_REF) { - this.ref = new URLRef(); - } - offset = this.ref.fromBuffer(buffer, reader.offset); - return reader.offset; - } -} -exports.CrossChainDataRef = CrossChainDataRef; -CrossChainDataRef.TYPE_CROSSCHAIN_DATAREF = 0; -CrossChainDataRef.TYPE_IDENTITY_DATAREF = 1; -CrossChainDataRef.TYPE_URL_REF = 2; diff --git a/dist/vdxf/classes/DataDescriptor.js b/dist/vdxf/classes/DataDescriptor.js deleted file mode 100644 index 2aa263f..0000000 --- a/dist/vdxf/classes/DataDescriptor.js +++ /dev/null @@ -1,811 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.VDXFDataToUniValueArray = exports.VDXFDataToUniValue = exports.VectorEncodeVDXFUni = exports.MMRDescriptor = exports.EHashTypes = exports.VDXFDataDescriptor = exports.DataDescriptor = void 0; -const bn_js_1 = require("bn.js"); -const varint_1 = require("../../utils/varint"); -const varuint_1 = require("../../utils/varuint"); -const bufferutils_1 = require("../../utils/bufferutils"); -const { BufferReader, BufferWriter } = bufferutils_1.default; -const string_1 = require("../../utils/string"); -const address_1 = require("../../utils/address"); -const CurrencyValueMap_1 = require("../../pbaas/CurrencyValueMap"); -const Rating_1 = require("../../pbaas/Rating"); -const TransferDestination_1 = require("../../pbaas/TransferDestination"); -const ContentMultiMapRemove_1 = require("../../pbaas/ContentMultiMapRemove"); -const CrossChainDataRef_1 = require("./CrossChainDataRef"); -const vdxf_1 = require("../../constants/vdxf"); -const SignatureData_1 = require("./SignatureData"); -const index_1 = require("../index"); -const VDXF_Data = require("../vdxfDataKeys"); -class DataDescriptor { - constructor(data) { - this.flags = new bn_js_1.BN(0); - this.version = DataDescriptor.DEFAULT_VERSION; - if (data != null) { - if (data.flags != null) - this.flags = data.flags; - if (data.version != null) - this.version = data.version; - if (data.objectdata != null) - this.objectdata = data.objectdata; - if (data.label != null) - this.label = data.label; - if (data.mimeType != null) - this.mimeType = data.mimeType; - if (data.salt != null) - this.salt = data.salt; - if (data.epk != null) - this.epk = data.epk; - if (data.ivk != null) - this.ivk = data.ivk; - if (data.ssk != null) - this.ssk = data.ssk; - if (this.label && this.label.length > 64) { - this.label = this.label.slice(0, 64); - } - if (this.mimeType && this.mimeType.length > 128) { - this.mimeType = this.mimeType.slice(0, 128); - } - this.SetFlags(); - } - } - static fromJson(data) { - const newDataDescriptor = new DataDescriptor(); - if (data != null) { - if (data.flags != null) - newDataDescriptor.flags = new bn_js_1.BN(data.flags); - if (data.version != null) - newDataDescriptor.version = new bn_js_1.BN(data.version); - if (data.objectdata != null) - newDataDescriptor.objectdata = (0, exports.VectorEncodeVDXFUni)(data.objectdata); - if (data.label != null) - newDataDescriptor.label = data.label; - if (data.mimetype != null) - newDataDescriptor.mimeType = data.mimetype; - if (data.salt != null) - newDataDescriptor.salt = Buffer.from(data.salt, 'hex'); - if (data.epk != null) - newDataDescriptor.epk = Buffer.from(data.epk, 'hex'); - if (data.ivk != null) - newDataDescriptor.ivk = Buffer.from(data.ivk, 'hex'); - if (data.ssk != null) - newDataDescriptor.ssk = Buffer.from(data.ssk, 'hex'); - if (newDataDescriptor.label && newDataDescriptor.label.length > 64) { - newDataDescriptor.label = newDataDescriptor.label.slice(0, 64); - } - if (newDataDescriptor.mimeType && newDataDescriptor.mimeType.length > 128) { - newDataDescriptor.mimeType = newDataDescriptor.mimeType.slice(0, 128); - } - } - ; - newDataDescriptor.SetFlags(); - return newDataDescriptor; - } - DecodeHashVector() { - const vdxfData = new index_1.BufferDataVdxfObject(); - vdxfData.fromBuffer(this.objectdata); - const hashes = []; - if (vdxfData.vdxfkey == VDXF_Data.VectorUint256Key().vdxfid) { - const reader = new BufferReader(Buffer.from(vdxfData.data, 'hex')); - const count = reader.readVarInt(); - for (let i = 0; i < count.toNumber(); i++) { - hashes.push(reader.readSlice(32)); - } - } - return hashes; - } - byteLength() { - let length = 0; - length += varint_1.default.encodingLength(this.version); - length += varint_1.default.encodingLength(this.flags); - length += varuint_1.default.encodingLength(this.objectdata.length); - length += this.objectdata.length; - if (this.HasLabel()) { - if (this.label.length > 64) { - throw new Error("Label too long"); - } - length += varuint_1.default.encodingLength(this.label.length); - length += this.label.length; - } - if (this.HasMIME()) { - if (this.mimeType.length > 128) { - throw new Error("MIME type too long"); - } - length += varuint_1.default.encodingLength(this.mimeType.length); - length += this.mimeType.length; - } - if (this.HasSalt()) { - length += varuint_1.default.encodingLength(this.salt.length); - length += this.salt.length; - } - if (this.HasEPK()) { - length += varuint_1.default.encodingLength(this.epk.length); - length += this.epk.length; - } - if (this.HasIVK()) { - length += varuint_1.default.encodingLength(this.ivk.length); - length += this.ivk.length; - } - if (this.HasSSK()) { - length += varuint_1.default.encodingLength(this.ssk.length); - length += this.ssk.length; - } - return length; - } - toBuffer() { - const writer = new BufferWriter(Buffer.alloc(this.byteLength())); - writer.writeVarInt(this.version); - writer.writeVarInt(this.flags); - writer.writeVarSlice(this.objectdata); - if (this.HasLabel()) { - writer.writeVarSlice(Buffer.from(this.label)); - } - if (this.HasMIME()) { - writer.writeVarSlice(Buffer.from(this.mimeType)); - } - if (this.HasSalt()) { - writer.writeVarSlice(this.salt); - } - if (this.HasEPK()) { - writer.writeVarSlice(this.epk); - } - if (this.HasIVK()) { - writer.writeVarSlice(this.ivk); - } - if (this.HasSSK()) { - writer.writeVarSlice(this.ssk); - } - return writer.buffer; - } - fromBuffer(buffer, offset = 0) { - const reader = new BufferReader(buffer, offset); - this.version = reader.readVarInt(); - this.flags = reader.readVarInt(); - this.objectdata = reader.readVarSlice(); - if (this.HasLabel()) { - this.label = reader.readVarSlice().toString(); - } - if (this.HasMIME()) { - this.mimeType = reader.readVarSlice().toString(); - } - if (this.HasSalt()) { - this.salt = reader.readVarSlice(); - } - if (this.HasEPK()) { - this.epk = reader.readVarSlice(); - } - if (this.HasIVK()) { - this.ivk = reader.readVarSlice(); - } - if (this.HasSSK()) { - this.ssk = reader.readVarSlice(); - } - return reader.offset; - } - HasEncryptedData() { - return this.flags.and(DataDescriptor.FLAG_ENCRYPTED_DATA).gt(new bn_js_1.BN(0)); - } - HasSalt() { - return this.flags.and(DataDescriptor.FLAG_SALT_PRESENT).gt(new bn_js_1.BN(0)); - } - HasEPK() { - return this.flags.and(DataDescriptor.FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT).gt(new bn_js_1.BN(0)); - } - HasMIME() { - return this.flags.and(DataDescriptor.FLAG_MIME_TYPE_PRESENT).gt(new bn_js_1.BN(0)); - } - HasIVK() { - return this.flags.and(DataDescriptor.FLAG_INCOMING_VIEWING_KEY_PRESENT).gt(new bn_js_1.BN(0)); - } - HasSSK() { - return this.flags.and(DataDescriptor.FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT).gt(new bn_js_1.BN(0)); - } - HasLabel() { - return this.flags.and(DataDescriptor.FLAG_LABEL_PRESENT).gt(new bn_js_1.BN(0)); - } - CalcFlags() { - return this.flags.and(DataDescriptor.FLAG_ENCRYPTED_DATA).add(this.label ? DataDescriptor.FLAG_LABEL_PRESENT : new bn_js_1.BN(0)).add(this.mimeType ? DataDescriptor.FLAG_MIME_TYPE_PRESENT : new bn_js_1.BN(0)).add(this.salt ? DataDescriptor.FLAG_SALT_PRESENT : new bn_js_1.BN(0)).add(this.epk ? DataDescriptor.FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT : new bn_js_1.BN(0)).add(this.ivk ? DataDescriptor.FLAG_INCOMING_VIEWING_KEY_PRESENT : new bn_js_1.BN(0)).add(this.ssk ? DataDescriptor.FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT : new bn_js_1.BN(0)); - } - SetFlags() { - this.flags = this.CalcFlags(); - } - isValid() { - return !!(this.version.gte(DataDescriptor.FIRST_VERSION) && this.version.lte(DataDescriptor.LAST_VERSION) && this.flags.and(DataDescriptor.FLAG_MASK.notn(DataDescriptor.FLAG_MASK.bitLength()))); - } - toJson() { - const retval = { - version: this.version.toString(), - flags: this.flags.toString() - }; - let isText = false; - if (this.mimeType) { - retval['mimetype'] = this.mimeType; - if (this.mimeType.startsWith("text/")) - isText = true; - } - let processedObject = (0, exports.VDXFDataToUniValueArray)(this.objectdata); - if (isText && typeof processedObject === 'string' || processedObject instanceof String) { - let objectDataUni = { message: Buffer.from(processedObject, 'hex').toString('utf-8') }; - retval['objectdata'] = objectDataUni; - } - else { - retval['objectdata'] = processedObject; - } - if (this.label) - retval['label'] = this.label; - if (this.salt) - retval['salt'] = this.salt.toString('hex'); - if (this.epk) - retval['epk'] = this.epk.toString('hex'); - if (this.ivk) - retval['ivk'] = this.ivk.toString('hex'); - if (this.ssk) - retval['ssk'] = this.ssk.toString('hex'); - return retval; - } -} -exports.DataDescriptor = DataDescriptor; -DataDescriptor.VERSION_INVALID = new bn_js_1.BN(0); -DataDescriptor.VERSION_FIRST = new bn_js_1.BN(1); -DataDescriptor.FIRST_VERSION = new bn_js_1.BN(1); -DataDescriptor.LAST_VERSION = new bn_js_1.BN(1); -DataDescriptor.DEFAULT_VERSION = new bn_js_1.BN(1); -DataDescriptor.FLAG_ENCRYPTED_DATA = new bn_js_1.BN(1); -DataDescriptor.FLAG_SALT_PRESENT = new bn_js_1.BN(2); -DataDescriptor.FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT = new bn_js_1.BN(4); -DataDescriptor.FLAG_INCOMING_VIEWING_KEY_PRESENT = new bn_js_1.BN(8); -DataDescriptor.FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT = new bn_js_1.BN(0x10); -DataDescriptor.FLAG_LABEL_PRESENT = new bn_js_1.BN(0x20); -DataDescriptor.FLAG_MIME_TYPE_PRESENT = new bn_js_1.BN(0x40); -DataDescriptor.FLAG_MASK = (DataDescriptor.FLAG_ENCRYPTED_DATA.add(DataDescriptor.FLAG_SALT_PRESENT).add(DataDescriptor.FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT).add(DataDescriptor.FLAG_INCOMING_VIEWING_KEY_PRESENT).add(DataDescriptor.FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT).add(DataDescriptor.FLAG_LABEL_PRESENT).add(DataDescriptor.FLAG_MIME_TYPE_PRESENT)); -; -class VDXFDataDescriptor extends index_1.BufferDataVdxfObject { - constructor(dataDescriptor, vdxfkey = "", version = new bn_js_1.BN(1)) { - super("", vdxfkey); - this.version = version; - if (dataDescriptor) { - this.dataDescriptor = dataDescriptor; - } - } - static fromDataVdfxObject(data) { - const retval = new VDXFDataDescriptor(); - retval.version = data.version; - retval.data = data.data; - retval.fromBuffer(Buffer.from(retval.data, 'hex')); - delete retval.data; - return retval; - } - dataByteLength() { - let length = 0; - length += this.dataDescriptor.byteLength(); - return length; - } - toDataBuffer() { - return this.dataDescriptor.toBuffer(); - } - fromDataBuffer(buffer, offset) { - const reader = new bufferutils_1.default.BufferReader(buffer, offset); - this.data = reader.readVarSlice().toString('hex'); - this.dataDescriptor = new DataDescriptor(); - this.dataDescriptor.fromBuffer(Buffer.from(this.data, 'hex'), reader.offset); - delete this.data; - return reader.offset; - } - HasEncryptedData() { - return this.dataDescriptor.HasEncryptedData(); - } - HasLabel() { - return this.dataDescriptor.HasLabel(); - } - HasSalt() { - return this.dataDescriptor.HasSalt(); - } - HasEPK() { - return this.dataDescriptor.HasEPK(); - } - HasIVK() { - return this.dataDescriptor.HasIVK(); - } - HasSSK() { - return this.dataDescriptor.HasSSK(); - } - CalcFlags() { - return this.dataDescriptor.CalcFlags(); - } - SetFlags() { - return this.dataDescriptor.SetFlags(); - } -} -exports.VDXFDataDescriptor = VDXFDataDescriptor; -; -var EHashTypes; -(function (EHashTypes) { - EHashTypes[EHashTypes["HASH_INVALID"] = 0] = "HASH_INVALID"; - EHashTypes[EHashTypes["HASH_BLAKE2BMMR"] = 1] = "HASH_BLAKE2BMMR"; - EHashTypes[EHashTypes["HASH_BLAKE2BMMR2"] = 2] = "HASH_BLAKE2BMMR2"; - EHashTypes[EHashTypes["HASH_KECCAK"] = 3] = "HASH_KECCAK"; - EHashTypes[EHashTypes["HASH_SHA256D"] = 4] = "HASH_SHA256D"; - EHashTypes[EHashTypes["HASH_SHA256"] = 5] = "HASH_SHA256"; - EHashTypes[EHashTypes["HASH_LASTTYPE"] = 5] = "HASH_LASTTYPE"; -})(EHashTypes = exports.EHashTypes || (exports.EHashTypes = {})); -; -class MMRDescriptor { - constructor(data) { - if (data) { - if (data.version) - this.version = data.version; - if (data.objectHashType) - this.objectHashType = data.objectHashType; - if (data.mmrHashType) - this.mmrHashType = data.mmrHashType; - if (data.mmrRoot) - this.mmrRoot = data.mmrRoot; - if (data.mmrHashes) - this.mmrHashes = data.mmrHashes; - if (data.dataDescriptors) - this.dataDescriptors = data.dataDescriptors; - } - else { - this.version = MMRDescriptor.DEFAULT_VERSION; - } - } - static fromJson(data) { - const newMMRDescriptor = new MMRDescriptor(); - if (data) { - if (data.version) - newMMRDescriptor.version = new bn_js_1.BN(data.version); - if (data.objecthashtype) - newMMRDescriptor.objectHashType = data.objecthashtype; - if (data.mmrhashtype) - newMMRDescriptor.mmrHashType = data.mmrhashtype; - if (data.mmrroot) - newMMRDescriptor.mmrRoot = DataDescriptor.fromJson(data.mmrroot); - if (data.mmrhashes) - newMMRDescriptor.mmrHashes = DataDescriptor.fromJson(data.mmrhashes); - if (data.datadescriptors) { - newMMRDescriptor.dataDescriptors = []; - data.datadescriptors.forEach((data) => { - newMMRDescriptor.dataDescriptors.push(DataDescriptor.fromJson(data)); - }); - } - ; - } - return newMMRDescriptor; - } - byteLength() { - let length = 0; - length += varint_1.default.encodingLength(this.version); - length += varint_1.default.encodingLength(new bn_js_1.BN(this.objectHashType)); - length += varint_1.default.encodingLength(new bn_js_1.BN(this.mmrHashType)); - length += this.mmrRoot.byteLength(); - length += this.mmrHashes.byteLength(); - length += varuint_1.default.encodingLength(this.dataDescriptors.length); - this.dataDescriptors.forEach((dataDescriptor) => { - length += dataDescriptor.byteLength(); - }); - return length; - } - toBuffer() { - const writer = new BufferWriter(Buffer.alloc(this.byteLength())); - writer.writeVarInt(this.version); - writer.writeVarInt(new bn_js_1.BN(this.objectHashType)); - writer.writeVarInt(new bn_js_1.BN(this.mmrHashType)); - writer.writeSlice(this.mmrRoot.toBuffer()); - writer.writeSlice(this.mmrHashes.toBuffer()); - writer.writeCompactSize(this.dataDescriptors.length); - this.dataDescriptors.forEach((dataDescriptor) => { - writer.writeSlice(dataDescriptor.toBuffer()); - }); - return writer.buffer; - } - fromBuffer(buffer, offset) { - const reader = new BufferReader(buffer, offset); - this.version = reader.readVarInt(); - this.objectHashType = reader.readVarInt().toNumber(); - this.mmrHashType = reader.readVarInt().toNumber(); - this.mmrRoot = new DataDescriptor(); - reader.offset = this.mmrRoot.fromBuffer(reader.buffer, reader.offset); - this.mmrHashes = new DataDescriptor(); - reader.offset = this.mmrHashes.fromBuffer(reader.buffer, reader.offset); - const dataDescriptorsLength = reader.readCompactSize(); - this.dataDescriptors = []; - for (let i = 0; i < dataDescriptorsLength; i++) { - const dataDescriptor = new DataDescriptor(); - reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); - this.dataDescriptors.push(dataDescriptor); - } - return reader.offset; - } - HasData() { - return !!(this.mmrHashes.objectdata && this.dataDescriptors); - } - isValid() { - return this.version >= MMRDescriptor.FIRST_VERSION && this.version <= MMRDescriptor.LAST_VERSION; - } - toJson() { - const retval = { - version: this.version.toString(), - objecthashtype: this.objectHashType, - mmrhashtype: this.mmrHashType, - mmrroot: this.mmrRoot.toJson(), - mmrhashes: this.mmrHashes.toJson(), - datadescriptors: this.dataDescriptors.map((dataDescriptor) => dataDescriptor.toJson()) - }; - return retval; - } -} -exports.MMRDescriptor = MMRDescriptor; -MMRDescriptor.VERSION_INVALID = new bn_js_1.BN(0); -MMRDescriptor.FIRST_VERSION = new bn_js_1.BN(1); -MMRDescriptor.LAST_VERSION = new bn_js_1.BN(1); -MMRDescriptor.DEFAULT_VERSION = new bn_js_1.BN(1); -; -const VectorEncodeVDXFUni = (obj) => { - let ss = Buffer.from(''); - if (typeof (obj) != 'object') { - if (typeof (obj) != 'string') - throw new Error('VectorEncodeVDXFUni: not JSON string as expected'); - if ((0, string_1.isHexString)(obj)) { - return Buffer.from(obj, "hex"); - } - return Buffer.from(obj, "utf-8"); - } - if (obj.serializedHex) { - if (!(0, string_1.isHexString)(obj.serializedHex)) { - throw new Error("contentmap: If the \"serializedhex\" key is present, it's data must be only valid hex and complete"); - } - return Buffer.from(obj.serializedHex); - } - if (obj.serializedBase64) { - try { - return Buffer.from(obj.serializedBase64, 'base64'); - } - catch (e) { - throw new Error("contentmap: If the \"serializedBase64\" key is present, it's data must be only valid base64 and complete"); - } - } - if (obj.message) { - return Buffer.from(obj.message, "utf-8"); - } - // this should be an object with "vdxfkey" as the key and {object} as the json object to serialize - const oneValKeys = Object.keys(obj); - const oneValValues = Object.values(obj); - for (let k = 0; k < oneValKeys.length; k++) { - const objTypeKey = oneValKeys[k]; - if (objTypeKey == VDXF_Data.DataByteKey().vdxfid) { - const oneByte = Buffer.from(oneValValues[k], "hex"); - if (oneByte.length != 1) { - throw new Error("contentmap: byte data must be exactly one byte"); - } - ss = Buffer.concat([ss, oneByte]); - } - else if (objTypeKey == VDXF_Data.DataInt16Key().vdxfid) { - const oneShort = Buffer.alloc(2); - oneShort.writeInt16LE(oneValValues[k]); - ss = Buffer.concat([ss, oneShort]); - } - else if (objTypeKey == VDXF_Data.DataUint16Key().vdxfid) { - const oneUShort = Buffer.alloc(2); - oneUShort.writeUInt16LE(oneValValues[k]); - ss = Buffer.concat([ss, oneUShort]); - } - else if (objTypeKey == VDXF_Data.DataInt32Key().vdxfid) { - const oneInt = Buffer.alloc(4); - oneInt.writeInt32LE(oneValValues[k]); - ss = Buffer.concat([ss, oneInt]); - } - else if (objTypeKey == VDXF_Data.DataUint32Key().vdxfid) { - const oneUInt = Buffer.alloc(4); - oneUInt.writeUInt32LE(oneValValues[k]); - ss = Buffer.concat([ss, oneUInt]); - } - else if (objTypeKey == VDXF_Data.DataInt64Key().vdxfid) { - const oneInt64 = Buffer.alloc(8); - oneInt64.writeIntLE(oneValValues[k], 0, 8); - ss = Buffer.concat([ss, oneInt64]); - } - else if (objTypeKey == VDXF_Data.DataUint160Key().vdxfid) { - const oneKey = (0, address_1.fromBase58Check)(oneValValues[k]).hash; - ss = Buffer.concat([ss, oneKey]); - } - else if (objTypeKey == VDXF_Data.DataUint256Key().vdxfid) { - const oneHash = Buffer.from(oneValValues[k], "hex"); - if (oneHash.length != 32) { - throw new Error("contentmap: hash data must be exactly 32 bytes"); - } - ss = Buffer.concat([ss, oneHash.reverse()]); - } - else if (objTypeKey == VDXF_Data.DataStringKey().vdxfid) { - let length = 20; - length += 1; - const encodedLength = varuint_1.default.encodingLength(Buffer.from(oneValValues[k], "utf-8").length); - length += varuint_1.default.encodingLength(encodedLength + Buffer.from(oneValValues[k], "utf-8").length); - length += encodedLength; - length += Buffer.from(oneValValues[k], "utf-8").length; - const writer = new BufferWriter(Buffer.alloc(length)); - writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); - writer.writeVarInt(new bn_js_1.BN(1)); - writer.writeCompactSize(encodedLength + Buffer.from(oneValValues[k], "utf-8").length); - writer.writeVarSlice(Buffer.from(oneValValues[k], "utf-8")); - ss = Buffer.concat([ss, writer.buffer]); - } - else if (objTypeKey == VDXF_Data.DataByteVectorKey().vdxfid) { - let length = 20; - length += 1; - const encodedLength = varuint_1.default.encodingLength(Buffer.from(oneValValues[k], "hex").length); - length += varuint_1.default.encodingLength(encodedLength + Buffer.from(oneValValues[k], "hex").length); - length += encodedLength; - length += Buffer.from(oneValValues[k], "hex").length; - const writer = new BufferWriter(Buffer.alloc(length)); - writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); - writer.writeVarInt(new bn_js_1.BN(1)); - writer.writeCompactSize(encodedLength + Buffer.from(oneValValues[k], "hex").length); - writer.writeVarSlice(Buffer.from(oneValValues[k], "hex")); - ss = Buffer.concat([ss, writer.buffer]); - } - else if (objTypeKey == VDXF_Data.DataCurrencyMapKey().vdxfid) { - const destinations = Object.keys(oneValValues[k]); - const values = Object.values(oneValValues[k]); - const oneCurMap = new CurrencyValueMap_1.CurrencyValueMap({ value_map: new Map(destinations.map((key, index) => [key, new bn_js_1.BN(values[index])])), multivalue: true }); - let length = 20; - length += 1; - length += varuint_1.default.encodingLength(oneCurMap.getByteLength()); - length += oneCurMap.getByteLength(); - const writer = new BufferWriter(Buffer.alloc(length)); - writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); - writer.writeVarInt(new bn_js_1.BN(1)); - writer.writeCompactSize(oneCurMap.getByteLength()); - writer.writeSlice(oneCurMap.toBuffer()); - ss = Buffer.concat([ss, writer.buffer]); - } - else if (objTypeKey == VDXF_Data.DataRatingsKey().vdxfid) { - const version = new bn_js_1.BN(oneValValues[k].version); - const trust_level = new bn_js_1.BN(oneValValues[k].trust_level); - const destinations = Object.keys(oneValValues[k].rating); - const values = Object.values(oneValValues[k]); - const oneRatingMap = new Rating_1.Rating({ ratings: new Map(destinations.map((key, index) => [key, Buffer.from(values[index], 'hex')])), version, trust_level }); - let length = 20; - length += varint_1.default.encodingLength(oneRatingMap.version); - length += varuint_1.default.encodingLength(oneRatingMap.getByteLength()); - length += oneRatingMap.getByteLength(); - const writer = new BufferWriter(Buffer.alloc(length)); - writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); - writer.writeVarInt(oneRatingMap.version); - writer.writeCompactSize(oneRatingMap.getByteLength()); - writer.writeSlice(oneRatingMap.toBuffer()); - ss = Buffer.concat([ss, writer.buffer]); - } - else if (objTypeKey == VDXF_Data.DataTransferDestinationKey().vdxfid) { - const transferDest = new TransferDestination_1.TransferDestination(oneValValues[k]); - let length = 20; - length += varint_1.default.encodingLength(transferDest.typeNoFlags()); - length += varuint_1.default.encodingLength(transferDest.getByteLength()); - length += transferDest.getByteLength(); - const writer = new BufferWriter(Buffer.alloc(length)); - writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); - writer.writeVarInt(transferDest.typeNoFlags()); - writer.writeCompactSize(transferDest.getByteLength()); - writer.writeSlice(transferDest.toBuffer()); - ss = Buffer.concat([ss, writer.buffer]); - } - else if (objTypeKey == VDXF_Data.ContentMultiMapRemoveKey().vdxfid) { - const transferDest = new ContentMultiMapRemove_1.ContentMultiMapRemove(oneValValues[k]); - let length = 20; - length += varint_1.default.encodingLength(transferDest.version); - length += varuint_1.default.encodingLength(transferDest.getByteLength()); - length += transferDest.getByteLength(); - const writer = new BufferWriter(Buffer.alloc(length)); - writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); - writer.writeVarInt(transferDest.version); - writer.writeCompactSize(transferDest.getByteLength()); - writer.writeSlice(transferDest.toBuffer()); - ss = Buffer.concat([ss, writer.buffer]); - } - else if (objTypeKey == VDXF_Data.CrossChainDataRefKey().vdxfid) { - const transferDest = new CrossChainDataRef_1.CrossChainDataRef(oneValValues[k]); - let length = 20; - length += varint_1.default.encodingLength(vdxf_1.VDXF_OBJECT_DEFAULT_VERSION); - length += varuint_1.default.encodingLength(transferDest.getByteLength()); - length += transferDest.getByteLength(); - const writer = new BufferWriter(Buffer.alloc(length)); - writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); - writer.writeVarInt(vdxf_1.VDXF_OBJECT_DEFAULT_VERSION); - writer.writeCompactSize(transferDest.getByteLength()); - writer.writeSlice(transferDest.toBuffer()); - ss = Buffer.concat([ss, writer.buffer]); - } - else if (objTypeKey == VDXF_Data.DataDescriptorKey().vdxfid) { - const descr = DataDescriptor.fromJson(oneValValues[k]); - let length = 20; - length += varint_1.default.encodingLength(descr.version); - length += varuint_1.default.encodingLength(descr.byteLength()); - length += descr.byteLength(); - const writer = new BufferWriter(Buffer.alloc(length)); - writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); - writer.writeVarInt(descr.version); - writer.writeCompactSize(descr.byteLength()); - writer.writeSlice(descr.toBuffer()); - ss = Buffer.concat([ss, writer.buffer]); - } - else if (objTypeKey == VDXF_Data.MMRDescriptorKey().vdxfid) { - const descr = MMRDescriptor.fromJson(oneValValues[k]); - let length = 20; - length += varint_1.default.encodingLength(descr.version); - length += varuint_1.default.encodingLength(descr.byteLength()); - length += descr.byteLength(); - const writer = new BufferWriter(Buffer.alloc(length)); - writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); - writer.writeVarInt(descr.version); - writer.writeCompactSize(descr.byteLength()); - writer.writeSlice(descr.toBuffer()); - ss = Buffer.concat([ss, writer.buffer]); - } - else if (objTypeKey == VDXF_Data.SignatureDataKey().vdxfid) { - const sigData = SignatureData_1.SignatureData.fromJson(oneValValues[k]); - let length = 20; - length += varint_1.default.encodingLength(sigData.version); - length += varuint_1.default.encodingLength(sigData.getByteLength()); - length += sigData.getByteLength(); - const writer = new BufferWriter(Buffer.alloc(length)); - writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); - writer.writeVarInt(sigData.version); - writer.writeCompactSize(sigData.getByteLength()); - writer.writeSlice(sigData.toBuffer()); - ss = Buffer.concat([ss, writer.buffer]); - } - else { - throw new Error("contentmap invalid or unrecognized vdxfkey for object type: " + oneValValues[k]); - } - } - return ss; -}; -exports.VectorEncodeVDXFUni = VectorEncodeVDXFUni; -const VDXFDataToUniValue = (buffer, offset = 0, pSuccess = null) => { - const reader = new BufferReader(buffer, offset); - let objectUni; - try { - let checkVal; - let version = new bn_js_1.BN(0); - let objSize = 0; - checkVal = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); - if (checkVal == VDXF_Data.DataCurrencyMapKey().vdxfid) { - const oneCurrencyMap = new CurrencyValueMap_1.CurrencyValueMap(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = oneCurrencyMap.fromBuffer(reader.buffer, reader.offset); - if (oneCurrencyMap.isValid()) { - objectUni = { [checkVal]: oneCurrencyMap.toJson() }; - } - } - else if (checkVal == VDXF_Data.DataRatingsKey().vdxfid) { - const oneRatingObj = new Rating_1.Rating(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = oneRatingObj.fromBuffer(reader.buffer, reader.offset); - if (oneRatingObj.isValid()) { - objectUni = { [checkVal]: oneRatingObj.toJson() }; - } - } - else if (checkVal == VDXF_Data.DataTransferDestinationKey().vdxfid) { - const oneTransferDest = new TransferDestination_1.TransferDestination(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = oneTransferDest.fromBuffer(reader.buffer, reader.offset); - if (oneTransferDest.isValid()) { - objectUni = { [checkVal]: oneTransferDest.toJson() }; - } - } - else if (checkVal == VDXF_Data.ContentMultiMapRemoveKey().vdxfid) { - throw new Error("ContentMultiMapRemoveKey not implemented"); - // TODO: Implement ContentMultiMapRemoveKey - // CContentMultiMapRemove oneContentRemove; - // ss >> VARINT(version); - // ss >> COMPACTSIZE(objSize); - // ss >> oneContentRemove; - // if (oneContentRemove.isValid()) - // { - // objectUni = UniValue(UniValue::VOBJ); - // objectUni.pushKV(EncodeDestination(CIdentityID(checkVal)), oneContentRemove.ToUniValue()); - // } - } - else if (checkVal == VDXF_Data.DataStringKey().vdxfid) { - let stringVal; - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - stringVal = reader.readVarSlice().toString('utf-8'); - objectUni = { [checkVal]: stringVal }; - } - else if (checkVal == VDXF_Data.DataByteVectorKey().vdxfid) { - let vecVal; - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - vecVal = reader.readVarSlice(); - objectUni = { [checkVal]: vecVal.toString('hex') }; - } - else if (checkVal == VDXF_Data.CrossChainDataRefKey().vdxfid) { - throw new Error("CrossChainDataRefKey not implemented"); - // TODO: Implement CrossChainDataRefKey - // CCrossChainDataRef dataRef; - // ss >> VARINT(version); - // ss >> COMPACTSIZE(objSize); - // ss >> dataRef; - // if (dataRef.isValid()) - // { - // objectUni = UniValue(UniValue::VOBJ); - // objectUni.pushKV(EncodeDestination(CIdentityID(checkVal)), dataRef.ToUniValue()); - // } - } - else if (checkVal == VDXF_Data.DataDescriptorKey().vdxfid) { - const dataDescriptor = new DataDescriptor(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); - if (dataDescriptor.isValid()) { - objectUni = { [checkVal]: dataDescriptor.toJson() }; - } - } - else if (checkVal == VDXF_Data.MMRDescriptorKey().vdxfid) { - const mmrDescriptor = new MMRDescriptor(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = mmrDescriptor.fromBuffer(reader.buffer, reader.offset); - if (mmrDescriptor.isValid()) { - objectUni = { [checkVal]: mmrDescriptor.toJson() }; - } - } - else if (checkVal == VDXF_Data.SignatureDataKey().vdxfid) { - const sigData = new SignatureData_1.SignatureData(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = sigData.fromBuffer(reader.buffer, reader.offset); - if (sigData.isValid()) { - objectUni = { [checkVal]: sigData.toJson() }; - } - } - // if we have an object that we recognized, encode it - if (objectUni) { - if (pSuccess != null) { - pSuccess.value = true; - } - } - else { - if (pSuccess != null) { - pSuccess.value = false; - } - } - } - catch (e) { - if (pSuccess != null) { - pSuccess.value = false; - } - } - return { objectUni, offset: reader.offset, pSuccess }; -}; -exports.VDXFDataToUniValue = VDXFDataToUniValue; -const VDXFDataToUniValueArray = (buffer, offset = 0) => { - let entryArr = []; - const reader = new BufferReader(buffer, offset); - let bytesLeft = buffer.length; - while (bytesLeft > 20) // size of uint160 - { - let objOut = { value: false }; - const { objectUni, offset } = (0, exports.VDXFDataToUniValue)(reader.buffer, reader.offset, objOut); - reader.offset = offset; - bytesLeft = buffer.length - reader.offset; - if (objOut.value) { - entryArr.push(objectUni); - } - else { - // add the remaining data as a hex string - reader.offset = reader.offset - 20; - entryArr.push(reader.readSlice(bytesLeft + 20).toString('hex')); - bytesLeft = 0; - break; - } - } - if (bytesLeft && bytesLeft <= 20) { - entryArr.push(reader.readSlice(bytesLeft).toString('hex')); - } - return entryArr.length == 0 ? null : (entryArr.length == 1 ? entryArr[0] : entryArr); -}; -exports.VDXFDataToUniValueArray = VDXFDataToUniValueArray; diff --git a/dist/vdxf/classes/MMR.d.ts b/dist/vdxf/classes/MMR.d.ts deleted file mode 100644 index 8b106e9..0000000 --- a/dist/vdxf/classes/MMR.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -/// -import { BN } from 'bn.js'; -export declare class CLayer { - private vSize; - private nodes; - constructor(); - size(): number; - getIndex(idx: number): NODE_TYPE; - push_back(node: NODE_TYPE): void; - clear(): void; -} -export declare class CMMRNode { - hash: Buffer; - constructor(Hash?: Buffer); - digest(input: any): any; - HashObj(obj: Buffer, onbjR?: Buffer): Buffer; - CreateParentNode(nRight: CMMRNode): CMMRNode; - GetProofHash(opposite: CMMRNode): Array; - GetLeafHash(): Array; - GetExtraHashCount(): number; -} -export declare class CMerkleMountainRange { - layer0: CLayer; - vSize: number; - upperNodes: Array>; - _leafLength: number; - constructor(); - getbyteLength(): number; - toBuffer(): Buffer; - fromBuffer(bufferIn: Buffer): CMerkleMountainRange; - add(leaf: CMMRNode): number; - size(): number; - height(): number; - getNode(Height: any, Index: any): CMMRNode; -} -export declare class CMMRBranch { - branchType?: number; - nIndex?: number; - nSize?: number; - branch?: Array; - constructor(branchType?: number, nIndex?: number, nSize?: number, branch?: Array); - dataByteLength(): number; - toBuffer(): Buffer; - fromBuffer(buffer: Buffer, offset?: number): number; - digest(input: any): any; - safeCheck(hash: Buffer): Buffer; -} -export declare class CMMRProof { - proofSequence: Array; - setProof(proof: CMMRBranch): void; - dataByteLength(): number; - toBuffer(): Buffer; - fromDataBuffer(buffer: Buffer, offset?: number): number; -} -export declare class CMerkleMountainView { - mmr: CMerkleMountainRange; - sizes: Array; - peaks: Array; - peakMerkle: Array>; - constructor(mountainRange: CMerkleMountainRange, viewSize?: number); - size(): number; - CalcPeaks(force?: boolean): void; - resize(newSize: number): number; - maxsize(): number; - GetPeaks(): Array; - GetRoot(): Buffer; - GetRootNode(): CMMRNode; - GetHash(index: number): Buffer; - GetBranchType(): number; - GetProof(retProof: CMMRProof, pos: number): boolean; - GetProofBits(pos: number, mmvSize: number): void; -} -export declare const GetMMRProofIndex: (pos: number, mmvSize: number, extraHashes: number) => InstanceType; diff --git a/dist/vdxf/classes/SaltedData.js b/dist/vdxf/classes/SaltedData.js index bba1dbd..7a2d015 100644 --- a/dist/vdxf/classes/SaltedData.js +++ b/dist/vdxf/classes/SaltedData.js @@ -10,14 +10,14 @@ const vdxf_1 = require("../../constants/vdxf"); const __1 = require("../../"); const { BufferReader, BufferWriter } = bufferutils_1.default; const createHash = require("create-hash"); -const vdxfDataKeys_1 = require("../vdxfDataKeys"); +const vdxfdatakeys_1 = require("../vdxfdatakeys"); class SaltedData extends __1.VDXFData { constructor(data, salt = Buffer.alloc(0)) { super(data); if (salt.length != 0) { this.salt = salt; } - this.vdxfkey = (0, vdxfDataKeys_1.SaltedDataKey)().vdxfid; + this.vdxfkey = vdxfdatakeys_1.SaltedDataKey.vdxfid; } static fromJson(data) { const saltedData = new SaltedData(); diff --git a/dist/vdxf/classes/SignatureData.d.ts b/dist/vdxf/classes/SignatureData.d.ts deleted file mode 100644 index f327d7d..0000000 --- a/dist/vdxf/classes/SignatureData.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -/// -/// -import { BigNumber } from '../../utils/types/BigNumber'; -import { SerializableEntity } from '../../utils/types/SerializableEntity'; -export declare class SignatureData implements SerializableEntity { - version: BigNumber; - systemID: string; - hashType: BigNumber; - signatureHash: Buffer; - identityID: string; - sigType: BigNumber; - vdxfKeys: Array; - vdxfKeyNames: Array; - boundHashes: Array; - signatureAsVch: Buffer; - static VERSION_INVALID: import("bn.js"); - static FIRST_VERSION: import("bn.js"); - static LAST_VERSION: import("bn.js"); - static DEFAULT_VERSION: import("bn.js"); - static TYPE_VERUSID_DEFAULT: import("bn.js"); - constructor(data?: any); - static fromJson(data: any): SignatureData; - static getSignatureHashType(buffer: any): number; - getByteLength(): number; - toBuffer(): Buffer; - fromBuffer(buffer: Buffer, offset?: number): number; - isValid(): boolean; - toJson(): { - version: string; - systemid: string; - hashtype: string; - }; - getIdentityHash(sigObject: { - version: number; - hashtype: number; - height: number; - }): any; -} diff --git a/dist/vdxf/classes/SignatureData.js b/dist/vdxf/classes/SignatureData.js deleted file mode 100644 index 90093b4..0000000 --- a/dist/vdxf/classes/SignatureData.js +++ /dev/null @@ -1,186 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SignatureData = void 0; -const varint_1 = require("../../utils/varint"); -const varuint_1 = require("../../utils/varuint"); -const address_1 = require("../../utils/address"); -const bufferutils_1 = require("../../utils/bufferutils"); -const bn_js_1 = require("bn.js"); -const vdxf_1 = require("../../constants/vdxf"); -const DataDescriptor_1 = require("./DataDescriptor"); -const { BufferReader, BufferWriter } = bufferutils_1.default; -const createHash = require("create-hash"); -const vdxf_2 = require("../../constants/vdxf"); -class SignatureData { - constructor(data) { - if (data) { - Object.assign(this, data); - } - } - static fromJson(data) { - const signatureData = new SignatureData(); - if (data) { - if (data.version) - signatureData.version = new bn_js_1.BN(data.version); - if (data.systemid) - signatureData.systemID = data.systemid; - if (data.hashtype) - signatureData.hashType = new bn_js_1.BN(data.hashtype); - let hashType = SignatureData.getSignatureHashType(Buffer.from(data.signaturehash, 'hex')); - if (hashType == DataDescriptor_1.EHashTypes.HASH_SHA256) { - signatureData.signatureHash = Buffer.from(data.signaturehash, 'hex').reverse(); - } - else { - signatureData.signatureHash = Buffer.from(data.signaturehash, 'hex'); - } - if (data.identityid) - signatureData.identityID = data.identityid; - if (data.signaturetype) - signatureData.sigType = new bn_js_1.BN(data.signaturetype); - signatureData.vdxfKeys = data.vdxfkeys || []; - signatureData.vdxfKeyNames = data.vdxfkeynames || []; - signatureData.boundHashes = data.boundhashes || []; - signatureData.signatureAsVch = Buffer.from(data.signature, 'base64'); - } - return signatureData; - } - static getSignatureHashType(buffer) { - var bufferReader = new bufferutils_1.default.BufferReader(buffer, 0); - let version = bufferReader.readUInt8(); - if (version === 2) - return bufferReader.readUInt8(); - else - return DataDescriptor_1.EHashTypes.HASH_SHA256; - } - getByteLength() { - let byteLength = 0; - byteLength += varint_1.default.encodingLength(this.version); - byteLength += 20; // systemID uint160 - byteLength += varint_1.default.encodingLength(this.hashType); - byteLength += varuint_1.default.encodingLength(this.signatureHash.length); - byteLength += this.signatureHash.length; - byteLength += 20; // identityID uint160 - byteLength += varint_1.default.encodingLength(this.sigType); - byteLength += varuint_1.default.encodingLength(this.vdxfKeys.length); - byteLength += this.vdxfKeys.length * 20; - byteLength += varuint_1.default.encodingLength(this.vdxfKeyNames.length); - for (const keyName of this.vdxfKeyNames) { - byteLength += varuint_1.default.encodingLength(Buffer.from(keyName, 'utf8').length); - byteLength += Buffer.from(keyName, 'utf8').length; - } - byteLength += varuint_1.default.encodingLength(this.boundHashes.length); - byteLength += this.boundHashes.length * 32; - byteLength += varuint_1.default.encodingLength(this.signatureAsVch.length); - byteLength += this.signatureAsVch.length; - return byteLength; - } - toBuffer() { - const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())); - bufferWriter.writeVarInt(this.version); - bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.systemID).hash); - bufferWriter.writeVarInt(this.hashType); - bufferWriter.writeVarSlice(this.signatureHash); - bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.identityID).hash); - bufferWriter.writeVarInt(this.sigType); - bufferWriter.writeCompactSize(this.vdxfKeys.length); - for (const key of this.vdxfKeys) { - bufferWriter.writeSlice((0, address_1.fromBase58Check)(key).hash); - } - bufferWriter.writeCompactSize(this.vdxfKeyNames.length); - for (const keyName of this.vdxfKeyNames) { - bufferWriter.writeVarSlice(Buffer.from(keyName, 'utf8')); - } - bufferWriter.writeCompactSize(this.boundHashes.length); - for (const boundHash of this.boundHashes) { - bufferWriter.writeSlice(boundHash); - } - bufferWriter.writeVarSlice(this.signatureAsVch); - return bufferWriter.buffer; - } - fromBuffer(buffer, offset = 0) { - const reader = new BufferReader(buffer, offset); - this.version = reader.readVarInt(); - this.systemID = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); - this.hashType = reader.readVarInt(); - this.signatureHash = reader.readVarSlice(); - this.identityID = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); - this.sigType = reader.readVarInt(); - const vdxfKeysLength = reader.readCompactSize(); - this.vdxfKeys = []; - for (let i = 0; i < vdxfKeysLength; i++) { - this.vdxfKeys.push((0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION)); - } - const vdxfKeyNamesLength = reader.readCompactSize(); - this.vdxfKeyNames = []; - for (let i = 0; i < vdxfKeyNamesLength; i++) { - this.vdxfKeyNames.push(reader.readVarSlice().toString('utf8')); - } - const boundHashesLength = reader.readCompactSize(); - this.boundHashes = []; - for (let i = 0; i < boundHashesLength; i++) { - this.boundHashes.push(reader.readSlice(32)); - } - this.signatureAsVch = reader.readVarSlice(); - return reader.offset; - } - isValid() { - return !!(this.version.gte(SignatureData.FIRST_VERSION) && - this.version.lte(SignatureData.LAST_VERSION) && - this.systemID); - } - toJson() { - const returnObj = { version: this.version.toString(), - systemid: this.systemID, - hashtype: this.hashType.toString() }; - if (this.hashType == new bn_js_1.BN(DataDescriptor_1.EHashTypes.HASH_SHA256)) { - returnObj['signaturehash'] = this.signatureHash.reverse().toString('hex'); - } - else { - returnObj['signaturehash'] = this.signatureHash.toString('hex'); - } - returnObj['identityid'] = this.identityID; - returnObj['signaturetype'] = this.sigType.toString(); - returnObj['signature'] = this.signatureAsVch.toString('base64'); - if (this.vdxfKeys) { - returnObj['vdxfkeys'] = this.vdxfKeys; - } - if (this.vdxfKeyNames) { - returnObj['vdxfkeynames'] = this.vdxfKeyNames; - } - if (this.boundHashes) { - returnObj['boundhashes'] = this.boundHashes; - } - return returnObj; - } - getIdentityHash(sigObject) { - var heightBuffer = Buffer.allocUnsafe(4); - heightBuffer.writeUInt32LE(sigObject.height); - if (sigObject.hashtype != Number(DataDescriptor_1.EHashTypes.HASH_SHA256)) { - throw new Error("Invalid signature type for identity hash"); - } - if (sigObject.version == 1) { - return createHash("sha256") - .update(vdxf_2.VERUS_DATA_SIGNATURE_PREFIX) - .update((0, address_1.fromBase58Check)(this.systemID).hash) - .update(heightBuffer) - .update((0, address_1.fromBase58Check)(this.identityID).hash) - .update(this.signatureHash) - .digest(); - } - else { - return createHash("sha256") - .update((0, address_1.fromBase58Check)(this.systemID).hash) - .update(heightBuffer) - .update((0, address_1.fromBase58Check)(this.identityID).hash) - .update(vdxf_2.VERUS_DATA_SIGNATURE_PREFIX) - .update(this.signatureHash) - .digest(); - } - } -} -exports.SignatureData = SignatureData; -SignatureData.VERSION_INVALID = new bn_js_1.BN(0); -SignatureData.FIRST_VERSION = new bn_js_1.BN(1); -SignatureData.LAST_VERSION = new bn_js_1.BN(1); -SignatureData.DEFAULT_VERSION = new bn_js_1.BN(1); -SignatureData.TYPE_VERUSID_DEFAULT = new bn_js_1.BN(1); diff --git a/dist/vdxf/index.d.ts b/dist/vdxf/index.d.ts index 3623e13..db5ed09 100644 --- a/dist/vdxf/index.d.ts +++ b/dist/vdxf/index.d.ts @@ -5,8 +5,8 @@ import { BigNumber } from "../utils/types/BigNumber"; export * from './keys'; export * from './scopes'; export * from './keymap'; -export * from './identityDataKeys'; -export * from './vdxfDataKeys'; +export * from './identitydatakeys'; +export * from './vdxfdatakeys'; export interface VDXFObjectInterface { vdxfkey: string; toString: () => string; diff --git a/dist/vdxf/index.js b/dist/vdxf/index.js index 5b59082..c247140 100644 --- a/dist/vdxf/index.js +++ b/dist/vdxf/index.js @@ -28,8 +28,8 @@ const bn_js_1 = require("bn.js"); __exportStar(require("./keys"), exports); __exportStar(require("./scopes"), exports); __exportStar(require("./keymap"), exports); -__exportStar(require("./identityDataKeys"), exports); -__exportStar(require("./vdxfDataKeys"), exports); +__exportStar(require("./identitydatakeys"), exports); +__exportStar(require("./vdxfdatakeys"), exports); class VDXFObject { constructor(key = "", serializekey = true) { this.serializekey = true; diff --git a/dist/vdxf/keymap.js b/dist/vdxf/keymap.js index 1387b67..d9f9d9d 100644 --- a/dist/vdxf/keymap.js +++ b/dist/vdxf/keymap.js @@ -2,7 +2,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.IdentityVdxfidMap = exports.attestationDataKeys = exports.keymap = void 0; const keylist = require("./keys"); -const AttestationData = require("../utils/IdentityData"); -exports.keymap = Object.keys(keylist).reduce((obj, item) => { obj[keylist[item].vdxfid] = keylist[item]; return obj; }, {}); -exports.attestationDataKeys = Object.keys(AttestationData).reduce((obj, item) => { obj[AttestationData[item].vdxfid] = AttestationData[item]; return obj; }, {}); -exports.IdentityVdxfidMap = AttestationData.IdentityVdxfidMap; +const attestationData = require("../utils/IdentityData"); +exports.keymap = Object.keys(keylist) + .reduce((obj, item) => { obj[keylist[item].vdxfid] = keylist[item]; return obj; }, {}); +exports.attestationDataKeys = Object.keys(attestationData) + .reduce((obj, item) => { obj[attestationData[item].vdxfid] = attestationData[item]; return obj; }, {}); +exports.IdentityVdxfidMap = attestationData.IdentityVdxfidMap; diff --git a/dist/vdxf/vdxfDataKeys.d.ts b/dist/vdxf/vdxfDataKeys.d.ts index a1e2e66..2103be3 100644 --- a/dist/vdxf/vdxfDataKeys.d.ts +++ b/dist/vdxf/vdxfDataKeys.d.ts @@ -1,69 +1,69 @@ import { VDXFKeyInterface } from "./keys"; -export declare function DataByteKeyName(): string; -export declare function DataByteKey(): VDXFKeyInterface; -export declare function DataInt16KeyName(): string; -export declare function DataInt16Key(): VDXFKeyInterface; -export declare function DataUint16KeyName(): string; -export declare function DataUint16Key(): VDXFKeyInterface; -export declare function DataInt32KeyName(): string; -export declare function DataInt32Key(): VDXFKeyInterface; -export declare function DataUint32KeyName(): string; -export declare function DataUint32Key(): VDXFKeyInterface; -export declare function DataInt64KeyName(): string; -export declare function DataInt64Key(): VDXFKeyInterface; -export declare function DataUint64KeyName(): string; -export declare function DataUint64Key(): VDXFKeyInterface; -export declare function DataUint160KeyName(): string; -export declare function DataUint160Key(): VDXFKeyInterface; -export declare function DataUint256KeyName(): string; -export declare function DataUint256Key(): VDXFKeyInterface; -export declare function DataStringKeyName(): string; -export declare function DataStringKey(): VDXFKeyInterface; -export declare function DataVectorKeyName(): string; -export declare function DataVectorKey(): VDXFKeyInterface; -export declare function DataByteVectorKeyName(): string; -export declare function DataByteVectorKey(): VDXFKeyInterface; -export declare function DataInt32VectorKeyName(): string; -export declare function DataInt32VectorKey(): VDXFKeyInterface; -export declare function DataInt64VectorKeyName(): string; -export declare function DataInt64VectorKey(): VDXFKeyInterface; -export declare function DataCurrencyMapKeyName(): string; -export declare function DataCurrencyMapKey(): VDXFKeyInterface; -export declare function DataRatingsKeyName(): string; -export declare function DataRatingsKey(): VDXFKeyInterface; -export declare function DataURLKeyName(): string; -export declare function DataURLKey(): VDXFKeyInterface; -export declare function DataTransferDestinationKeyName(): string; -export declare function DataTransferDestinationKey(): VDXFKeyInterface; -export declare function UTXORefKeyName(): string; -export declare function UTXORefKey(): VDXFKeyInterface; -export declare function CrossChainDataRefKeyName(): string; -export declare function CrossChainDataRefKey(): VDXFKeyInterface; -export declare function EncryptionDescriptorKeyName(): string; -export declare function EncryptionDescriptorKey(): VDXFKeyInterface; -export declare function SaltedDataKeyName(): string; -export declare function SaltedDataKey(): VDXFKeyInterface; -export declare function DataDescriptorKeyName(): string; -export declare function DataDescriptorKey(): VDXFKeyInterface; -export declare function SignatureDataKeyName(): string; -export declare function SignatureDataKey(): VDXFKeyInterface; -export declare function VectorUint256KeyName(): string; -export declare function VectorUint256Key(): VDXFKeyInterface; -export declare function MMRLinksKeyName(): string; -export declare function MMRLinksKey(): VDXFKeyInterface; -export declare function MMRDescriptorKeyName(): string; -export declare function MMRDescriptorKey(): VDXFKeyInterface; -export declare function TypeDefinitionKeyName(): string; -export declare function TypeDefinitionKey(): VDXFKeyInterface; -export declare function MultiMapKeyName(): string; -export declare function MultiMapKey(): VDXFKeyInterface; -export declare function ContentMultiMapRemoveKeyName(): string; -export declare function ContentMultiMapRemoveKey(): VDXFKeyInterface; -export declare function ProfileMediaKeyName(): string; -export declare function ProfileMediaKey(): VDXFKeyInterface; -export declare function ZMemoMessageKeyName(): string; -export declare function ZMemoMessageKey(): VDXFKeyInterface; -export declare function ZMemoSignatureKeyName(): string; -export declare function ZMemoSignatureKey(): VDXFKeyInterface; -export declare function CurrencyStartNotarizationKeyName(): string; -export declare function CurrencyStartNotarizationKey(): VDXFKeyInterface; +export declare const DataByteKeyName = "vrsc::data.type.byte"; +export declare const DataByteKey: VDXFKeyInterface; +export declare const DataInt16KeyName = "vrsc::data.type.int16"; +export declare const DataInt16Key: VDXFKeyInterface; +export declare const DataUint16KeyName = "vrsc::data.type.uint16"; +export declare const DataUint16Key: VDXFKeyInterface; +export declare const DataInt32KeyName = "vrsc::data.type.int32"; +export declare const DataInt32Key: VDXFKeyInterface; +export declare const DataUint32KeyName = "vrsc::data.type.uint32"; +export declare const DataUint32Key: VDXFKeyInterface; +export declare const DataInt64KeyName = "vrsc::data.type.int64"; +export declare const DataInt64Key: VDXFKeyInterface; +export declare const DataUint64KeyName = "vrsc::data.type.uint64"; +export declare const DataUint64Key: VDXFKeyInterface; +export declare const DataUint160KeyName = "vrsc::data.type.uint160"; +export declare const DataUint160Key: VDXFKeyInterface; +export declare const DataUint256KeyName = "vrsc::data.type.uint256"; +export declare const DataUint256Key: VDXFKeyInterface; +export declare const DataStringKeyName = "vrsc::data.type.string"; +export declare const DataStringKey: VDXFKeyInterface; +export declare const DataVectorKeyName = "vrsc::data.type.vector"; +export declare const DataVectorKey: VDXFKeyInterface; +export declare const DataByteVectorKeyName = "vrsc::data.type.bytevector"; +export declare const DataByteVectorKey: VDXFKeyInterface; +export declare const DataInt32VectorKeyName = "vrsc::data.type.int32vector"; +export declare const DataInt32VectorKey: VDXFKeyInterface; +export declare const DataInt64VectorKeyName = "vrsc::data.type.int64vector"; +export declare const DataInt64VectorKey: VDXFKeyInterface; +export declare const DataCurrencyMapKeyName = "vrsc::data.type.object.currencymap"; +export declare const DataCurrencyMapKey: VDXFKeyInterface; +export declare const DataRatingsKeyName = "vrsc::data.type.object.ratings"; +export declare const DataRatingsKey: VDXFKeyInterface; +export declare const DataURLKeyName = "vrsc::data.type.object.url"; +export declare const DataURLKey: VDXFKeyInterface; +export declare const DataTransferDestinationKeyName = "vrsc::data.type.object.transferdestination"; +export declare const DataTransferDestinationKey: VDXFKeyInterface; +export declare const UTXORefKeyName = "vrsc::data.type.object.utxoref"; +export declare const UTXORefKey: VDXFKeyInterface; +export declare const CrossChainDataRefKeyName = "vrsc::data.type.object.crosschaindataref"; +export declare const CrossChainDataRefKey: VDXFKeyInterface; +export declare const EncryptionDescriptorKeyName = "vrsc::data.type.encryptiondescriptor"; +export declare const EncryptionDescriptorKey: VDXFKeyInterface; +export declare const SaltedDataKeyName = "vrsc::data.type.salteddata"; +export declare const SaltedDataKey: VDXFKeyInterface; +export declare const DataDescriptorKeyName = "vrsc::data.type.object.datadescriptor"; +export declare const DataDescriptorKey: VDXFKeyInterface; +export declare const SignatureDataKeyName = "vrsc::data.signaturedata"; +export declare const SignatureDataKey: VDXFKeyInterface; +export declare const VectorUint256KeyName = "vrsc::data.mmrhashes"; +export declare const VectorUint256Key: VDXFKeyInterface; +export declare const MMRLinksKeyName = "vrsc::data.mmrlinks"; +export declare const MMRLinksKey: VDXFKeyInterface; +export declare const MMRDescriptorKeyName = "vrsc::data.mmrdescriptor"; +export declare const MMRDescriptorKey: VDXFKeyInterface; +export declare const TypeDefinitionKeyName = "vrsc::data.type.typedefinition"; +export declare const TypeDefinitionKey: VDXFKeyInterface; +export declare const MultiMapKeyName = "vrsc::identity.multimapkey"; +export declare const MultiMapKey: VDXFKeyInterface; +export declare const ContentMultiMapRemoveKeyName = "vrsc::identity.multimapremove"; +export declare const ContentMultiMapRemoveKey: VDXFKeyInterface; +export declare const ProfileMediaKeyName = "vrsc::identity.profile.media"; +export declare const ProfileMediaKey: VDXFKeyInterface; +export declare const ZMemoMessageKeyName = "vrsc::system.zmemo.message"; +export declare const ZMemoMessageKey: VDXFKeyInterface; +export declare const ZMemoSignatureKeyName = "vrsc::system.zmemo.signature"; +export declare const ZMemoSignatureKey: VDXFKeyInterface; +export declare const CurrencyStartNotarizationKeyName = "vrsc::system.currency.startnotarization"; +export declare const CurrencyStartNotarizationKey: VDXFKeyInterface; diff --git a/dist/vdxf/vdxfDataKeys.js b/dist/vdxf/vdxfDataKeys.js index a072f19..d70e41f 100644 --- a/dist/vdxf/vdxfDataKeys.js +++ b/dist/vdxf/vdxfDataKeys.js @@ -2,550 +2,346 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.VectorUint256Key = exports.VectorUint256KeyName = exports.SignatureDataKey = exports.SignatureDataKeyName = exports.DataDescriptorKey = exports.DataDescriptorKeyName = exports.SaltedDataKey = exports.SaltedDataKeyName = exports.EncryptionDescriptorKey = exports.EncryptionDescriptorKeyName = exports.CrossChainDataRefKey = exports.CrossChainDataRefKeyName = exports.UTXORefKey = exports.UTXORefKeyName = exports.DataTransferDestinationKey = exports.DataTransferDestinationKeyName = exports.DataURLKey = exports.DataURLKeyName = exports.DataRatingsKey = exports.DataRatingsKeyName = exports.DataCurrencyMapKey = exports.DataCurrencyMapKeyName = exports.DataInt64VectorKey = exports.DataInt64VectorKeyName = exports.DataInt32VectorKey = exports.DataInt32VectorKeyName = exports.DataByteVectorKey = exports.DataByteVectorKeyName = exports.DataVectorKey = exports.DataVectorKeyName = exports.DataStringKey = exports.DataStringKeyName = exports.DataUint256Key = exports.DataUint256KeyName = exports.DataUint160Key = exports.DataUint160KeyName = exports.DataUint64Key = exports.DataUint64KeyName = exports.DataInt64Key = exports.DataInt64KeyName = exports.DataUint32Key = exports.DataUint32KeyName = exports.DataInt32Key = exports.DataInt32KeyName = exports.DataUint16Key = exports.DataUint16KeyName = exports.DataInt16Key = exports.DataInt16KeyName = exports.DataByteKey = exports.DataByteKeyName = void 0; exports.CurrencyStartNotarizationKey = exports.CurrencyStartNotarizationKeyName = exports.ZMemoSignatureKey = exports.ZMemoSignatureKeyName = exports.ZMemoMessageKey = exports.ZMemoMessageKeyName = exports.ProfileMediaKey = exports.ProfileMediaKeyName = exports.ContentMultiMapRemoveKey = exports.ContentMultiMapRemoveKeyName = exports.MultiMapKey = exports.MultiMapKeyName = exports.TypeDefinitionKey = exports.TypeDefinitionKeyName = exports.MMRDescriptorKey = exports.MMRDescriptorKeyName = exports.MMRLinksKey = exports.MMRLinksKeyName = void 0; -function DataByteKeyName() { - return "vrsc::data.type.byte"; -} -exports.DataByteKeyName = DataByteKeyName; -function DataByteKey() { - return { - "vdxfid": "iBXUHbh4iacbeZnzDRxishvBSrYk2S2k7t", - "indexid": "xGMakQ89ZtqGGjg257csr6SiUWZksGmjWp", - "hash160result": "2e97a8bba443773812341e1d761530d3bba04f58", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.byte" - } - }; -} -exports.DataByteKey = DataByteKey; -function DataInt16KeyName() { - return "vrsc::data.type.int16"; -} -exports.DataInt16KeyName = DataInt16KeyName; -function DataInt16Key() { - return { - "vdxfid": "iDtTv3wf1Vk3M2Y46RjLPKtttx5hydwtY1", - "indexid": "xJiaNrNjroxhyCR5x7PVMiRRvc6ipg6N9g", - "hash160result": "ee334ebd432db0b24cc2702eda61c28ff44d3872", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int16" - } - }; -} -exports.DataInt16Key = DataInt16Key; -function DataUint16KeyName() { - return "vrsc::data.type.uint16"; -} -exports.DataUint16KeyName = DataUint16KeyName; -function DataUint16Key() { - return { - "vdxfid": "iHn7urT2yVfS7pQn6WGAmCVWh4HBLV24n3", - "indexid": "xNcENet7pot6jzHoxBvKjb23iiJCGpekDk", - "hash160result": "5cfc322d2a216145f7b82714115e7953269de59c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint16" - } - }; -} -exports.DataUint16Key = DataUint16Key; -function DataInt32KeyName() { - return "vrsc::data.type.int32"; -} -exports.DataInt32KeyName = DataInt32KeyName; -function DataInt32Key() { - return { - "vdxfid": "iHpLPprRDv3H5H3ZMaJ9nyHFzkG9xJWZDb", - "indexid": "xNeSrdHW5EFwhSvbDFxJmMoo2QHAtoEaEM", - "hash160result": "3e9ba478b23b13232f28d21051d907ce8fdd509d", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int32" - } - }; -} -exports.DataInt32Key = DataInt32Key; -function DataUint32KeyName() { - return "vrsc::data.type.uint32"; -} -exports.DataUint32KeyName = DataUint32KeyName; -function DataUint32Key() { - return { - "vdxfid": "iKSj5zhd6cSsLudaGhtfmisRNgEM7SPFWY", - "indexid": "xQGqYo8hwvfXy5Wc8PYpk7PxQLFMwfP7Fp", - "hash160result": "f279818aeb4fe768956b350d1fc7216ca0e82aaf", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint32" - } - }; -} -exports.DataUint32Key = DataUint32Key; -function DataInt64KeyName() { - return "vrsc::data.type.int64"; -} -exports.DataInt64KeyName = DataInt64KeyName; -function DataInt64Key() { - return { - "vdxfid": "iKB3TGi9Dg5HZ4nQAgLQAgp3tuXBaRKHpC", - "indexid": "xQ19v59E4zHxBEfS2MzZ95LavZYCTTeuyg", - "hash160result": "ab3705f8a7fae59786ef897b014df85fcd9533ac", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int64" - } - }; -} -exports.DataInt64Key = DataInt64Key; -function DataUint64KeyName() { - return "vrsc::data.type.uint64"; -} -exports.DataUint64KeyName = DataUint64KeyName; -function DataUint64Key() { - return { - "vdxfid": "iPamkQf38AeGQ8z4zSsZL7t9kXMeUkYLJL", - "indexid": "xUQtDD67yUrw2Js6r8XiJWQgnBNfNeeoUq", - "hash160result": "bb2ae9ed3e9f400def0724937fbf65f23ef690dc", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint64" - } - }; -} -exports.DataUint64Key = DataUint64Key; -function DataUint160KeyName() { - return "vrsc::data.type.uint160"; -} -exports.DataUint160KeyName = DataUint160KeyName; -function DataUint160Key() { - return { - "vdxfid": "iAAwdbLyKYL39nJ1eQHaHtb75krg4mV1Lq", - "indexid": "xF146Pn4ArYhmxB3W5wjGH7e7Qsgx9bkpj", - "hash160result": "d97d2295d4c73f6f6f0697c8086bd822d6977549", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint160" - } - }; -} -exports.DataUint160Key = DataUint160Key; -function DataUint256KeyName() { - return "vrsc::data.type.uint256"; -} -exports.DataUint256KeyName = DataUint256KeyName; -function DataUint256Key() { - return { - "vdxfid": "i8k7g7z6grtGYrNZmZr5TQ872aHssXuuua", - "indexid": "xDaE8vRBYB6wB2FbdFWERnee4EJtjbCtMM", - "hash160result": "939b27bea698d180237c40b2194025acc673cb39", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint256" - } - }; -} -exports.DataUint256Key = DataUint256Key; -function DataStringKeyName() { - return "vrsc::data.type.string"; -} -exports.DataStringKeyName = DataStringKeyName; -function DataStringKey() { - return { - "vdxfid": "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c", - "indexid": "xPwgY6oPdusaAgNK3u5yHCQG5NsHEcBpi5", - "hash160result": "e5c061641228a399169211e666de18448b7b8bab", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.string" - } - }; -} -exports.DataStringKey = DataStringKey; +exports.DataByteKeyName = "vrsc::data.type.byte"; +exports.DataByteKey = { + "vdxfid": "iBXUHbh4iacbeZnzDRxishvBSrYk2S2k7t", + "indexid": "xGMakQ89ZtqGGjg257csr6SiUWZksGmjWp", + "hash160result": "2e97a8bba443773812341e1d761530d3bba04f58", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.byte" + } +}; +exports.DataInt16KeyName = "vrsc::data.type.int16"; +exports.DataInt16Key = { + "vdxfid": "iDtTv3wf1Vk3M2Y46RjLPKtttx5hydwtY1", + "indexid": "xJiaNrNjroxhyCR5x7PVMiRRvc6ipg6N9g", + "hash160result": "ee334ebd432db0b24cc2702eda61c28ff44d3872", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int16" + } +}; +exports.DataUint16KeyName = "vrsc::data.type.uint16"; +exports.DataUint16Key = { + "vdxfid": "iHn7urT2yVfS7pQn6WGAmCVWh4HBLV24n3", + "indexid": "xNcENet7pot6jzHoxBvKjb23iiJCGpekDk", + "hash160result": "5cfc322d2a216145f7b82714115e7953269de59c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint16" + } +}; +exports.DataInt32KeyName = "vrsc::data.type.int32"; +exports.DataInt32Key = { + "vdxfid": "iHpLPprRDv3H5H3ZMaJ9nyHFzkG9xJWZDb", + "indexid": "xNeSrdHW5EFwhSvbDFxJmMoo2QHAtoEaEM", + "hash160result": "3e9ba478b23b13232f28d21051d907ce8fdd509d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int32" + } +}; +exports.DataUint32KeyName = "vrsc::data.type.uint32"; +exports.DataUint32Key = { + "vdxfid": "iKSj5zhd6cSsLudaGhtfmisRNgEM7SPFWY", + "indexid": "xQGqYo8hwvfXy5Wc8PYpk7PxQLFMwfP7Fp", + "hash160result": "f279818aeb4fe768956b350d1fc7216ca0e82aaf", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint32" + } +}; +exports.DataInt64KeyName = "vrsc::data.type.int64"; +exports.DataInt64Key = { + "vdxfid": "iKB3TGi9Dg5HZ4nQAgLQAgp3tuXBaRKHpC", + "indexid": "xQ19v59E4zHxBEfS2MzZ95LavZYCTTeuyg", + "hash160result": "ab3705f8a7fae59786ef897b014df85fcd9533ac", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int64" + } +}; +exports.DataUint64KeyName = "vrsc::data.type.uint64"; +exports.DataUint64Key = { + "vdxfid": "iPamkQf38AeGQ8z4zSsZL7t9kXMeUkYLJL", + "indexid": "xUQtDD67yUrw2Js6r8XiJWQgnBNfNeeoUq", + "hash160result": "bb2ae9ed3e9f400def0724937fbf65f23ef690dc", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint64" + } +}; +exports.DataUint160KeyName = "vrsc::data.type.uint160"; +exports.DataUint160Key = { + "vdxfid": "iAAwdbLyKYL39nJ1eQHaHtb75krg4mV1Lq", + "indexid": "xF146Pn4ArYhmxB3W5wjGH7e7Qsgx9bkpj", + "hash160result": "d97d2295d4c73f6f6f0697c8086bd822d6977549", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint160" + } +}; +exports.DataUint256KeyName = "vrsc::data.type.uint256"; +exports.DataUint256Key = { + "vdxfid": "i8k7g7z6grtGYrNZmZr5TQ872aHssXuuua", + "indexid": "xDaE8vRBYB6wB2FbdFWERnee4EJtjbCtMM", + "hash160result": "939b27bea698d180237c40b2194025acc673cb39", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint256" + } +}; +exports.DataStringKeyName = "vrsc::data.type.string"; +exports.DataStringKey = { + "vdxfid": "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c", + "indexid": "xPwgY6oPdusaAgNK3u5yHCQG5NsHEcBpi5", + "hash160result": "e5c061641228a399169211e666de18448b7b8bab", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.string" + } +}; // this is a key for a typed vector, which will have the object type key following the vector key -function DataVectorKeyName() { - return "vrsc::data.type.vector"; -} -exports.DataVectorKeyName = DataVectorKeyName; -function DataVectorKey() { - return { - "vdxfid": "iAEShwk1xjdGhaUSz3Maa2XR32o3vRuHq7", - "indexid": "xF4ZAkB6p3qwKkMUqj1jYR3x4gp4mGz657", - "hash160result": "503875b0dc301189a98927d3ece56c5f921c1f4a", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.vector" - } - }; -} -exports.DataVectorKey = DataVectorKey; -function DataByteVectorKeyName() { - return "vrsc::data.type.bytevector"; -} -exports.DataByteVectorKeyName = DataByteVectorKeyName; -function DataByteVectorKey() { - return { - "vdxfid": "iKMhRLX1JHQihVZx2t2pAWW2uzmK6AzwW3", - "indexid": "xQBot8x69bdPKfSytZgy8u2ZwenKzVjR4X", - "hash160result": "cc3ae6466006629f5105f71325bb2a19107037ae", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.bytevector" - } - }; -} -exports.DataByteVectorKey = DataByteVectorKey; -function DataInt32VectorKeyName() { - return "vrsc::data.type.int32vector"; -} -exports.DataInt32VectorKeyName = DataInt32VectorKeyName; -function DataInt32VectorKey() { - return { - "vdxfid": "iJZt2fcUv1iivbfC3tuPuefabcTppQEoVq", - "indexid": "xPPzVU3ZmKwPYmYDuaZYt3C7dGUqk939N7", - "hash160result": "c0847f3025c408059b5a8f6a9e414a8ed8288da5", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int32vector" - } - }; -} -exports.DataInt32VectorKey = DataInt32VectorKey; -function DataInt64VectorKeyName() { - return "vrsc::data.type.int64vector"; -} -exports.DataInt64VectorKeyName = DataInt64VectorKeyName; -function DataInt64VectorKey() { - return { - "vdxfid": "i4qtYkFS9iNyu2AkqwoSn1xyCdfH9PUvak", - "indexid": "x9g11YgX12beXC3nhdTbkQVWEHgJ2jqfz1", - "hash160result": "c6219ea13884987453692cb14c72d5f6a47c020f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int64vector" - } - }; -} -exports.DataInt64VectorKey = DataInt64VectorKey; -function DataCurrencyMapKeyName() { - return "vrsc::data.type.object.currencymap"; -} -exports.DataCurrencyMapKeyName = DataCurrencyMapKeyName; -function DataCurrencyMapKey() { - return { - "vdxfid": "iMrGhzkZq5fpWWSa1RambRySFPb7CuvKuX", - "indexid": "xSgPAoBegPtV8gKbs7EvZpVyH3c858ZUvL", - "hash160result": "25db70c2fcae2571f89201181bec04587e1f8fc9", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.currencymap" - } - }; -} -exports.DataCurrencyMapKey = DataCurrencyMapKey; -function DataRatingsKeyName() { - return "vrsc::data.type.object.ratings"; -} -exports.DataRatingsKeyName = DataRatingsKeyName; -function DataRatingsKey() { - return { - "vdxfid": "iHJComZUXXGniLkDhjYprWYEN8qvQGDoam", - "indexid": "xN8KGZzZNqVTLWdFZRCypu4mPnrwHFKbCK", - "hash160result": "32cad57ff1dc5db4b5ba573ce01bc9c89b0d9e97", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.ratings" - } - }; -} -exports.DataRatingsKey = DataRatingsKey; -function DataURLKeyName() { - return "vrsc::data.type.object.url"; -} -exports.DataURLKeyName = DataURLKeyName; -function DataURLKey() { - return { - "vdxfid": "iJ7xdhJTJAvJubNnSJFXyA3jujzqGxjLuZ", - "indexid": "xNx56VjY9V8yXmFpHyugwYaGwQ1rCt6J9W", - "hash160result": "7748bfaf53dd2ff63ed5f73a41174c360f30a6a0", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.url" - } - }; -} -exports.DataURLKey = DataURLKey; -function DataTransferDestinationKeyName() { - return "vrsc::data.type.object.transferdestination"; -} -exports.DataTransferDestinationKeyName = DataTransferDestinationKeyName; -function DataTransferDestinationKey() { - return { - "vdxfid": "i91L6zwZQrkbNVMB1AZ1Z671qybexRmeVK", - "indexid": "xDqSZoNeGAyFzfECrrDAXUdYsdcfs3Zuku", - "hash160result": "92f38773849383146037b16a48ea350c1c11ac3c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.transferdestination" - } - }; -} -exports.DataTransferDestinationKey = DataTransferDestinationKey; -function UTXORefKeyName() { - return "vrsc::data.type.object.utxoref"; -} -exports.UTXORefKeyName = UTXORefKeyName; -function UTXORefKey() { - return { - "vdxfid": "iNcKvh7mazaXptzHf85q6EtpFYFE7asKC1", - "indexid": "xTSSPVYrSJoCT4sKWojz4dRMHCGF3h9tM4", - "hash160result": "013e760f7451c289672993ea391ae643c21ce4d1", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.utxoref" - } - }; -} -exports.UTXORefKey = UTXORefKey; -function CrossChainDataRefKeyName() { - return "vrsc::data.type.object.crosschaindataref"; -} -exports.CrossChainDataRefKeyName = CrossChainDataRefKeyName; -function CrossChainDataRefKey() { - return { - "vdxfid": "iP3euVSzNcXUrLNHnQnR9G6q8jeYuGSxgw", - "indexid": "xTsmNHt5Dvk9UWFKe6Sa7edNAPfZmJVgLc", - "hash160result": "4d33e0aee0f648c7871b2661d1221b57c05aaed6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.crosschaindataref" - } - }; -} -exports.CrossChainDataRefKey = CrossChainDataRefKey; -function EncryptionDescriptorKeyName() { - return "vrsc::data.type.encryptiondescriptor"; -} -exports.EncryptionDescriptorKeyName = EncryptionDescriptorKeyName; -function EncryptionDescriptorKey() { - return { - "vdxfid": "iHEEK8ipj58BeKZNWuaaR2tDR5RK2kmf9A", - "indexid": "xN4Lmw9uaPLrGVSQNbEjPRQkSjSKxsHUQu", - "hash160result": "8d021acc1b68335bd7d37b28ff773c138ea5dd96", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.encryptiondescriptor" - } - }; -} -exports.EncryptionDescriptorKey = EncryptionDescriptorKey; -function SaltedDataKeyName() { - return "vrsc::data.type.salteddata"; -} -exports.SaltedDataKeyName = SaltedDataKeyName; -function SaltedDataKey() { - return { - "vdxfid": "i92U1nLuLJkC44FZZ4Lq9zk4qW3HrWAWNo", - "indexid": "xDraUamzBcxrgE8bQjzz8PGbsA4JiFskTD", - "hash160result": "9e13510e01d0d03a7bc90d7a2ef32824f515e33c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.salteddata" - } - }; -} -exports.SaltedDataKey = SaltedDataKey; -function DataDescriptorKeyName() { - return "vrsc::data.type.object.datadescriptor"; -} -exports.DataDescriptorKeyName = DataDescriptorKeyName; -function DataDescriptorKey() { - return { - "vdxfid": "i4GC1YGEVD21afWudGoFJVdnfjJ5XWnCQv", - "indexid": "x96JULhKLXEgCqPwUxTQGtAKhPK6Qh1iaW", - "hash160result": "4d4f12424ded2033a526a4e2a8835fc5b2eba208", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.datadescriptor" - } - }; -} -exports.DataDescriptorKey = DataDescriptorKey; -function SignatureDataKeyName() { - return "vrsc::data.signaturedata"; -} -exports.SignatureDataKeyName = SignatureDataKeyName; -function SignatureDataKey() { - return { - "vdxfid": "i7PcVF9wwPtQ6p6jDtCVpohX65pTZuP2ah", - "indexid": "xCDix3b2ni74iyym5ZreoCE47jqUTBFRAb", - "hash160result": "b48b359e9a00042cec64f7f66ac717d388a4f22a", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.signaturedata" - } - }; -} -exports.SignatureDataKey = SignatureDataKey; -function VectorUint256KeyName() { - return "vrsc::data.mmrhashes"; -} -exports.VectorUint256KeyName = VectorUint256KeyName; -function VectorUint256Key() { - return { - "vdxfid": "i9UgJ2WxGw95PKdoCXjpfnBShtP5gi9fxS", - "indexid": "xEJnkpx38FMk1VWq4DPyeAhyjYQ6X5Gsti", - "hash160result": "8c1afd59e904f6d2702699963abccbc6d326d841", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.mmrhashes" - } - }; -} -exports.VectorUint256Key = VectorUint256Key; -function MMRLinksKeyName() { - return "vrsc::data.mmrlinks"; -} -exports.MMRLinksKeyName = MMRLinksKeyName; -function MMRLinksKey() { - return { - "vdxfid": "iPQsnA1R8UjHNddZKZ3FxsuKQ5WzKqSC7w", - "indexid": "xUEzExSVynwwzoWbBEhQwGRrRjY1Bc2MYc", - "hash160result": "f535a4e9ac0f94eda01695d16489a4a102d6b1da", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.mmrlinks" - } - }; -} -exports.MMRLinksKey = MMRLinksKey; -function MMRDescriptorKeyName() { - return "vrsc::data.mmrdescriptor"; -} -exports.MMRDescriptorKeyName = MMRDescriptorKeyName; -function MMRDescriptorKey() { - return { - "vdxfid": "i9dVDb4LgfMYrZD1JBNP2uaso4bNAkT4Jr", - "indexid": "xETbgPVRXyaDUj639s2Y1J7QpicP4DvZMt", - "hash160result": "97273a4c02d6be002f8d69c3979616732ba68243", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.mmrdescriptor" - } - }; -} -exports.MMRDescriptorKey = MMRDescriptorKey; -function TypeDefinitionKeyName() { - return "vrsc::data.type.typedefinition"; -} -exports.TypeDefinitionKeyName = TypeDefinitionKeyName; -function TypeDefinitionKey() { - return { - "vdxfid": "iL5MPPHWXQEY3p2Q1UsmGDvXsgPiqd1W1S", - "indexid": "xQuTrBibNiTCfyuRsAXvEcT4uLQjhxrpyL", - "hash160result": "ae8d805d9650c0512a6b6ec33e963386542f18b6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.typedefinition" - } - }; -} -exports.TypeDefinitionKey = TypeDefinitionKey; -function MultiMapKeyName() { - return "vrsc::identity.multimapkey"; -} -exports.MultiMapKeyName = MultiMapKeyName; -function MultiMapKey() { - return { - "vdxfid": "i3mbggp3NBR77C5JeFQJTpAxmgMidayLLE", - "indexid": "x8bi9VF8DVdmjMxLVw4TSChVoLNjUyapgs", - "hash160result": "6920bb81b420bc95e29a10ed677379b1e39e3a03", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.multimapkey" - } - }; -} -exports.MultiMapKey = MultiMapKey; -function ContentMultiMapRemoveKeyName() { - return "vrsc::identity.multimapremove"; -} -exports.ContentMultiMapRemoveKeyName = ContentMultiMapRemoveKeyName; -function ContentMultiMapRemoveKey() { - return { - "vdxfid": "i5Zkx5Z7tEfh42xtKfwbJ5LgEWE9rEgpFY", - "indexid": "xAPsQszCjYtMgCqvBMbkGTsDGAFAmrN33A", - "hash160result": "d393b986e4f82db7bec82d97b186882d739ded16", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.multimapremove" - } - }; -} -exports.ContentMultiMapRemoveKey = ContentMultiMapRemoveKey; +exports.DataVectorKeyName = "vrsc::data.type.vector"; +exports.DataVectorKey = { + "vdxfid": "iAEShwk1xjdGhaUSz3Maa2XR32o3vRuHq7", + "indexid": "xF4ZAkB6p3qwKkMUqj1jYR3x4gp4mGz657", + "hash160result": "503875b0dc301189a98927d3ece56c5f921c1f4a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.vector" + } +}; +exports.DataByteVectorKeyName = "vrsc::data.type.bytevector"; +exports.DataByteVectorKey = { + "vdxfid": "iKMhRLX1JHQihVZx2t2pAWW2uzmK6AzwW3", + "indexid": "xQBot8x69bdPKfSytZgy8u2ZwenKzVjR4X", + "hash160result": "cc3ae6466006629f5105f71325bb2a19107037ae", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.bytevector" + } +}; +exports.DataInt32VectorKeyName = "vrsc::data.type.int32vector"; +exports.DataInt32VectorKey = { + "vdxfid": "iJZt2fcUv1iivbfC3tuPuefabcTppQEoVq", + "indexid": "xPPzVU3ZmKwPYmYDuaZYt3C7dGUqk939N7", + "hash160result": "c0847f3025c408059b5a8f6a9e414a8ed8288da5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int32vector" + } +}; +exports.DataInt64VectorKeyName = "vrsc::data.type.int64vector"; +exports.DataInt64VectorKey = { + "vdxfid": "i4qtYkFS9iNyu2AkqwoSn1xyCdfH9PUvak", + "indexid": "x9g11YgX12beXC3nhdTbkQVWEHgJ2jqfz1", + "hash160result": "c6219ea13884987453692cb14c72d5f6a47c020f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int64vector" + } +}; +exports.DataCurrencyMapKeyName = "vrsc::data.type.object.currencymap"; +exports.DataCurrencyMapKey = { + "vdxfid": "iMrGhzkZq5fpWWSa1RambRySFPb7CuvKuX", + "indexid": "xSgPAoBegPtV8gKbs7EvZpVyH3c858ZUvL", + "hash160result": "25db70c2fcae2571f89201181bec04587e1f8fc9", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.currencymap" + } +}; +exports.DataRatingsKeyName = "vrsc::data.type.object.ratings"; +exports.DataRatingsKey = { + "vdxfid": "iHJComZUXXGniLkDhjYprWYEN8qvQGDoam", + "indexid": "xN8KGZzZNqVTLWdFZRCypu4mPnrwHFKbCK", + "hash160result": "32cad57ff1dc5db4b5ba573ce01bc9c89b0d9e97", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.ratings" + } +}; +exports.DataURLKeyName = "vrsc::data.type.object.url"; +exports.DataURLKey = { + "vdxfid": "iJ7xdhJTJAvJubNnSJFXyA3jujzqGxjLuZ", + "indexid": "xNx56VjY9V8yXmFpHyugwYaGwQ1rCt6J9W", + "hash160result": "7748bfaf53dd2ff63ed5f73a41174c360f30a6a0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.url" + } +}; +exports.DataTransferDestinationKeyName = "vrsc::data.type.object.transferdestination"; +exports.DataTransferDestinationKey = { + "vdxfid": "i91L6zwZQrkbNVMB1AZ1Z671qybexRmeVK", + "indexid": "xDqSZoNeGAyFzfECrrDAXUdYsdcfs3Zuku", + "hash160result": "92f38773849383146037b16a48ea350c1c11ac3c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.transferdestination" + } +}; +exports.UTXORefKeyName = "vrsc::data.type.object.utxoref"; +exports.UTXORefKey = { + "vdxfid": "iNcKvh7mazaXptzHf85q6EtpFYFE7asKC1", + "indexid": "xTSSPVYrSJoCT4sKWojz4dRMHCGF3h9tM4", + "hash160result": "013e760f7451c289672993ea391ae643c21ce4d1", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.utxoref" + } +}; +exports.CrossChainDataRefKeyName = "vrsc::data.type.object.crosschaindataref"; +exports.CrossChainDataRefKey = { + "vdxfid": "iP3euVSzNcXUrLNHnQnR9G6q8jeYuGSxgw", + "indexid": "xTsmNHt5Dvk9UWFKe6Sa7edNAPfZmJVgLc", + "hash160result": "4d33e0aee0f648c7871b2661d1221b57c05aaed6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.crosschaindataref" + } +}; +exports.EncryptionDescriptorKeyName = "vrsc::data.type.encryptiondescriptor"; +exports.EncryptionDescriptorKey = { + "vdxfid": "iHEEK8ipj58BeKZNWuaaR2tDR5RK2kmf9A", + "indexid": "xN4Lmw9uaPLrGVSQNbEjPRQkSjSKxsHUQu", + "hash160result": "8d021acc1b68335bd7d37b28ff773c138ea5dd96", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.encryptiondescriptor" + } +}; +exports.SaltedDataKeyName = "vrsc::data.type.salteddata"; +exports.SaltedDataKey = { + "vdxfid": "i92U1nLuLJkC44FZZ4Lq9zk4qW3HrWAWNo", + "indexid": "xDraUamzBcxrgE8bQjzz8PGbsA4JiFskTD", + "hash160result": "9e13510e01d0d03a7bc90d7a2ef32824f515e33c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.salteddata" + } +}; +exports.DataDescriptorKeyName = "vrsc::data.type.object.datadescriptor"; +exports.DataDescriptorKey = { + "vdxfid": "i4GC1YGEVD21afWudGoFJVdnfjJ5XWnCQv", + "indexid": "x96JULhKLXEgCqPwUxTQGtAKhPK6Qh1iaW", + "hash160result": "4d4f12424ded2033a526a4e2a8835fc5b2eba208", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.datadescriptor" + } +}; +exports.SignatureDataKeyName = "vrsc::data.signaturedata"; +exports.SignatureDataKey = { + "vdxfid": "i7PcVF9wwPtQ6p6jDtCVpohX65pTZuP2ah", + "indexid": "xCDix3b2ni74iyym5ZreoCE47jqUTBFRAb", + "hash160result": "b48b359e9a00042cec64f7f66ac717d388a4f22a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.signaturedata" + } +}; +exports.VectorUint256KeyName = "vrsc::data.mmrhashes"; +exports.VectorUint256Key = { + "vdxfid": "i9UgJ2WxGw95PKdoCXjpfnBShtP5gi9fxS", + "indexid": "xEJnkpx38FMk1VWq4DPyeAhyjYQ6X5Gsti", + "hash160result": "8c1afd59e904f6d2702699963abccbc6d326d841", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.mmrhashes" + } +}; +exports.MMRLinksKeyName = "vrsc::data.mmrlinks"; +exports.MMRLinksKey = { + "vdxfid": "iPQsnA1R8UjHNddZKZ3FxsuKQ5WzKqSC7w", + "indexid": "xUEzExSVynwwzoWbBEhQwGRrRjY1Bc2MYc", + "hash160result": "f535a4e9ac0f94eda01695d16489a4a102d6b1da", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.mmrlinks" + } +}; +exports.MMRDescriptorKeyName = "vrsc::data.mmrdescriptor"; +exports.MMRDescriptorKey = { + "vdxfid": "i9dVDb4LgfMYrZD1JBNP2uaso4bNAkT4Jr", + "indexid": "xETbgPVRXyaDUj639s2Y1J7QpicP4DvZMt", + "hash160result": "97273a4c02d6be002f8d69c3979616732ba68243", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.mmrdescriptor" + } +}; +exports.TypeDefinitionKeyName = "vrsc::data.type.typedefinition"; +exports.TypeDefinitionKey = { + "vdxfid": "iL5MPPHWXQEY3p2Q1UsmGDvXsgPiqd1W1S", + "indexid": "xQuTrBibNiTCfyuRsAXvEcT4uLQjhxrpyL", + "hash160result": "ae8d805d9650c0512a6b6ec33e963386542f18b6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.typedefinition" + } +}; +exports.MultiMapKeyName = "vrsc::identity.multimapkey"; +exports.MultiMapKey = { + "vdxfid": "i3mbggp3NBR77C5JeFQJTpAxmgMidayLLE", + "indexid": "x8bi9VF8DVdmjMxLVw4TSChVoLNjUyapgs", + "hash160result": "6920bb81b420bc95e29a10ed677379b1e39e3a03", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.multimapkey" + } +}; +exports.ContentMultiMapRemoveKeyName = "vrsc::identity.multimapremove"; +exports.ContentMultiMapRemoveKey = { + "vdxfid": "i5Zkx5Z7tEfh42xtKfwbJ5LgEWE9rEgpFY", + "indexid": "xAPsQszCjYtMgCqvBMbkGTsDGAFAmrN33A", + "hash160result": "d393b986e4f82db7bec82d97b186882d739ded16", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.multimapremove" + } +}; // for any ID, this key indexes content that applies to representing the profile of // that ID. there may be many mime-type instances of a particular piece of profile media -function ProfileMediaKeyName() { - return "vrsc::identity.profile.media"; -} -exports.ProfileMediaKeyName = ProfileMediaKeyName; -function ProfileMediaKey() { - return { - "vdxfid": "iEYsp2njSt1M4EVYi9uuAPBU2wpKmThkkr", - "indexid": "xKNzGqDpJCE1gQNaZqa48mi14bqLaG669g", - "hash160result": "e95b2ee1abb130a93900ddaef2d8e528010f7c79", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.profile.media" - } - }; -} -exports.ProfileMediaKey = ProfileMediaKey; -function ZMemoMessageKeyName() { - return "vrsc::system.zmemo.message"; -} -exports.ZMemoMessageKeyName = ZMemoMessageKeyName; -function ZMemoMessageKey() { - return { - "vdxfid": "iNHg1n828PUxktkYeNxC6sdVmuKTipn3L3", - "indexid": "xT7nUaZ6yhhdP4daW4cM5GA2oZLUaNVaBD", - "hash160result": "4a8f418203621f10d1a61701be8dbbbb38fa5cce", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::system.zmemo.message" - } - }; -} -exports.ZMemoMessageKey = ZMemoMessageKey; -function ZMemoSignatureKeyName() { - return "vrsc::system.zmemo.signature"; -} -exports.ZMemoSignatureKeyName = ZMemoSignatureKeyName; -function ZMemoSignatureKey() { - return { - "vdxfid": "i7mrLLjUfGYuHJwnsxFvd282hsdn4staJG", - "indexid": "xCbxo9AZWamZuUppjdv5bQeZjXeo1vbaCc", - "hash160result": "7b47c8cd90c4c3ddc542f37ca77473b7325a272f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::system.zmemo.signature" - } - }; -} -exports.ZMemoSignatureKey = ZMemoSignatureKey; -function CurrencyStartNotarizationKeyName() { - return "vrsc::system.currency.startnotarization"; -} -exports.CurrencyStartNotarizationKeyName = CurrencyStartNotarizationKeyName; -function CurrencyStartNotarizationKey() { - return { - "vdxfid": "iRvxVcGLaCXcDiAfnQ5FfeBCo2AiBibAft", - "indexid": "xWm4xQhRRWkGqt3he5jQe2hjpgBj5C7Tj3", - "hash160result": "b537201ca6465976bea7bdb03119644a858052f6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::system.currency.startnotarization" - } - }; -} -exports.CurrencyStartNotarizationKey = CurrencyStartNotarizationKey; +exports.ProfileMediaKeyName = "vrsc::identity.profile.media"; +exports.ProfileMediaKey = { + "vdxfid": "iEYsp2njSt1M4EVYi9uuAPBU2wpKmThkkr", + "indexid": "xKNzGqDpJCE1gQNaZqa48mi14bqLaG669g", + "hash160result": "e95b2ee1abb130a93900ddaef2d8e528010f7c79", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.profile.media" + } +}; +exports.ZMemoMessageKeyName = "vrsc::system.zmemo.message"; +exports.ZMemoMessageKey = { + "vdxfid": "iNHg1n828PUxktkYeNxC6sdVmuKTipn3L3", + "indexid": "xT7nUaZ6yhhdP4daW4cM5GA2oZLUaNVaBD", + "hash160result": "4a8f418203621f10d1a61701be8dbbbb38fa5cce", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::system.zmemo.message" + } +}; +exports.ZMemoSignatureKeyName = "vrsc::system.zmemo.signature"; +exports.ZMemoSignatureKey = { + "vdxfid": "i7mrLLjUfGYuHJwnsxFvd282hsdn4staJG", + "indexid": "xCbxo9AZWamZuUppjdv5bQeZjXeo1vbaCc", + "hash160result": "7b47c8cd90c4c3ddc542f37ca77473b7325a272f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::system.zmemo.signature" + } +}; +exports.CurrencyStartNotarizationKeyName = "vrsc::system.currency.startnotarization"; +exports.CurrencyStartNotarizationKey = { + "vdxfid": "iRvxVcGLaCXcDiAfnQ5FfeBCo2AiBibAft", + "indexid": "xWm4xQhRRWkGqt3he5jQe2hjpgBj5C7Tj3", + "hash160result": "b537201ca6465976bea7bdb03119644a858052f6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::system.currency.startnotarization" + } +}; diff --git a/package.json b/package.json index ecad87e..674a47f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "verus-typescript-primitives", - "version": "1.0.1", + "version": "1.0.0", "main": "dist/index.js", "types": "dist/index.d.ts", "files": [ diff --git a/src/__tests__/attestation/attestation.test.ts b/src/__tests__/attestation/attestation.test.ts index 6a478f6..4025798 100644 --- a/src/__tests__/attestation/attestation.test.ts +++ b/src/__tests__/attestation/attestation.test.ts @@ -17,7 +17,7 @@ import { Attestation, LoginConsentRequest } from "../../vdxf/classes"; import { RedirectUri, RequestedPermission } from "../../vdxf/classes/Challenge"; import { Context } from "../../vdxf/classes/Context"; import { Subject } from "../../vdxf/classes/Challenge"; -import { DataDescriptor } from "../../vdxf/classes/DataDescriptor"; +import { DataDescriptor } from "../../pbaas/DataDescriptor"; import { toBase58Check, fromBase58Check } from '../../utils/address'; describe('Serializes and deserializes attestation request', () => { diff --git a/src/__tests__/attestation/personalInfo.test.ts b/src/__tests__/attestation/personalInfo.test.ts index 9c34c95..6b8875c 100644 --- a/src/__tests__/attestation/personalInfo.test.ts +++ b/src/__tests__/attestation/personalInfo.test.ts @@ -1,6 +1,6 @@ -import { DataDescriptor } from "../../vdxf/classes/DataDescriptor"; -import { MMRDescriptor } from "../../vdxf/classes/DataDescriptor"; -import { SignatureData } from "../../vdxf/classes/SignatureData"; +import { DataDescriptor } from "../../pbaas/DataDescriptor"; +import { MMRDescriptor } from "../../pbaas/MMRDescriptor"; +import { SignatureData } from "../../pbaas/SignatureData"; describe('Create a personal info request', () => { test('serialize datadescriptor with nested datadescriptor', async () => { diff --git a/src/__tests__/pbaas/dataDescriptor.test.ts b/src/__tests__/pbaas/dataDescriptor.test.ts new file mode 100644 index 0000000..29ccb9b --- /dev/null +++ b/src/__tests__/pbaas/dataDescriptor.test.ts @@ -0,0 +1,118 @@ +import { DataDescriptor, } from "../../pbaas/DataDescriptor"; +import { PBaaSEvidenceRef } from "../../pbaas/PBaaSEvidenceRef"; +import { UTXORef } from "../../pbaas/UTXORef"; +import { CrossChainDataRef } from "../../pbaas/CrossChainDataRef"; +import { VdxfUniValue } from "../../pbaas/VdxfUniValue"; +import { SignatureData } from "../../pbaas/SignatureData"; +import { TransferDestination, DEST_ID } from "../../pbaas/TransferDestination"; +import * as VDXF_Data from '../../vdxf/vdxfdatakeys'; +import { toBase58Check, fromBase58Check } from '../../utils/address'; +import { BN } from "bn.js"; + +describe('Serializes and deserializes dataDescriptors', () => { + + test('Nested datadescriptor with dataDescriptor in it', async () => { + + const nestedDescriptor = DataDescriptor.fromJson({ + version: 1, + "flags": 2, + "objectdata": { + "i4GC1YGEVD21afWudGoFJVdnfjJ5XWnCQv": { + "version": 1, + "flags": 96, + "mimetype": "text/plain", + "objectdata": { + "message": "Something 1" + }, + "label": "label 1" + } + }, + "salt": "4f66603f256d3f757b6dc3ea44802d4041d2a1901e06005028fd60b85a5878a2" + }); + + const serializedDesc = nestedDescriptor.toBuffer().toString('hex'); // Serialize the request to a hex string + const newDescriptor = new DataDescriptor(); + + newDescriptor.fromBuffer(Buffer.from(serializedDesc, 'hex')); // Deserialize the request from the hex string + expect(serializedDesc).toStrictEqual(newDescriptor.toBuffer().toString('hex')) // Compare the original serialized request to the new serialized request + + }); + + test('Datadescriptor with CrossChainDataRef', async () => { + + const evid = new PBaaSEvidenceRef(); + + evid.version = new BN(1); + evid.flags = new BN(1); //type IS_EVIDENCE = 1 + evid.output = new UTXORef({ hash: Buffer.from('30395e0868b1953477e14bb5c16349622239a94115a4d1f02b72b6ecf8b1c79c', 'hex'), n: new BN(0) }); + evid.object_num = new BN(0); + evid.sub_object = new BN(0); + evid.system_id = "i5v3h9FWVdRFbNHU7DfcpGykQjRaHtMqu7"; + + const crossChainRef = new CrossChainDataRef(evid); + const crossChainVector = VdxfUniValue.vectorEncodeVDXFUni({[VDXF_Data.CrossChainDataRefKey.vdxfid]: crossChainRef}); + + const nestedDescriptor = DataDescriptor.fromJson({ + version: 1, + "flags": 2, //FLAG_SALT_PRESENT = 2 + "objectdata": crossChainVector.toString('hex'), + "salt": "4f66603f256d3f757b6dc3ea44802d4041d2a1901e06005028fd60b85a5878a2" + }); + + const serializedDesc = nestedDescriptor.toBuffer().toString('hex'); // Serialize the request to a hex string + const newDescriptor = new DataDescriptor(); + + newDescriptor.fromBuffer(Buffer.from(serializedDesc, 'hex')); // Deserialize the request from the hex string + expect(serializedDesc).toStrictEqual(newDescriptor.toBuffer().toString('hex')) // Compare the original serialized request to the new serialized request + expect(newDescriptor.objectdata) + }); + test('Datadescriptor with TransferDestination', async () => { + + const destid = "iCtawpxUiCc2sEupt7Z4u8SDAncGZpgSKm"; + + const txDest = new TransferDestination({ + type: DEST_ID, + destination_bytes: fromBase58Check(destid).hash + }); + + const txDestVector = VdxfUniValue.vectorEncodeVDXFUni({[VDXF_Data.DataTransferDestinationKey.vdxfid]: txDest}); + + const nestedDescriptor = DataDescriptor.fromJson({ + version: 1, + "flags": 2, //FLAG_SALT_PRESENT = 2 + "objectdata": txDestVector.toString('hex'), + "salt": "4f66603f256d3f757b6dc3ea44802d4041d2a1901e06005028fd60b85a5878a2" + }); + + const serializedDesc = nestedDescriptor.toBuffer().toString('hex'); // Serialize the request to a hex string + const newDescriptor = new DataDescriptor(); + + newDescriptor.fromBuffer(Buffer.from(serializedDesc, 'hex')); // Deserialize the request from the hex string + expect(serializedDesc).toStrictEqual(newDescriptor.toBuffer().toString('hex')) // Compare the original serialized request to the new serialized request + }); + test('Datadescriptor with SignatureData', async () => { + + const destid = "iCtawpxUiCc2sEupt7Z4u8SDAncGZpgSKm"; + + const txDest = new SignatureData({ + type: DEST_ID, + destination_bytes: fromBase58Check(destid).hash + }); + + const txDestVector = VdxfUniValue.vectorEncodeVDXFUni({[VDXF_Data.DataTransferDestinationKey.vdxfid]: txDest}); + + const nestedDescriptor = DataDescriptor.fromJson({ + version: 1, + "flags": 2, //FLAG_SALT_PRESENT = 2 + "objectdata": txDestVector.toString('hex'), + "salt": "4f66603f256d3f757b6dc3ea44802d4041d2a1901e06005028fd60b85a5878a2" + }); + + const serializedDesc = nestedDescriptor.toBuffer().toString('hex'); // Serialize the request to a hex string + const newDescriptor = new DataDescriptor(); + + newDescriptor.fromBuffer(Buffer.from(serializedDesc, 'hex')); // Deserialize the request from the hex string + expect(serializedDesc).toStrictEqual(newDescriptor.toBuffer().toString('hex')) // Compare the original serialized request to the new serialized request + }); + +}); diff --git a/src/pbaas/CrossChainDataRef.ts b/src/pbaas/CrossChainDataRef.ts new file mode 100644 index 0000000..aa6fd05 --- /dev/null +++ b/src/pbaas/CrossChainDataRef.ts @@ -0,0 +1,74 @@ +import varint from '../utils/varint' +import varuint from '../utils/varuint' +import { fromBase58Check, toBase58Check } from "../utils/address"; +import bufferutils from '../utils/bufferutils' +import { BN } from 'bn.js'; +import { BigNumber } from '../utils/types/BigNumber'; +import { I_ADDR_VERSION } from '../constants/vdxf'; +import { SerializableEntity } from '../utils/types/SerializableEntity'; +import { PBaaSEvidenceRef } from './PBaaSEvidenceRef'; +import { IdentityMultimapRef } from './IdentityMultimapRef'; +import { URLRef } from './URLRef'; + +const { BufferReader, BufferWriter } = bufferutils +export class CrossChainDataRef implements SerializableEntity { + ref: PBaaSEvidenceRef | IdentityMultimapRef | URLRef; + + static TYPE_CROSSCHAIN_DATAREF = 0; + static TYPE_IDENTITY_DATAREF = 1; + static TYPE_URL_REF = 2; + + constructor(data?: PBaaSEvidenceRef | IdentityMultimapRef | URLRef | any) { + this.ref = data || null; + } + + which(): number { + if (this.ref instanceof PBaaSEvidenceRef) { + return CrossChainDataRef.TYPE_CROSSCHAIN_DATAREF; + } else if (this.ref instanceof IdentityMultimapRef) { + return CrossChainDataRef.TYPE_IDENTITY_DATAREF; + } else if (this.ref instanceof URLRef) { + return CrossChainDataRef.TYPE_URL_REF; + } + } + + getByteLength() { + let byteLength = 1; //type uint8 + byteLength += this.ref.getByteLength(); + return byteLength + } + + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) + bufferWriter.writeUInt8(this.which()); + bufferWriter.writeSlice(this.ref.toBuffer()); + return bufferWriter.buffer + } + + fromBuffer(buffer: Buffer, offset: number = 0) { + const reader = new BufferReader(buffer, offset); + + const type = reader.readUInt8(); + + if (type == CrossChainDataRef.TYPE_CROSSCHAIN_DATAREF) { + this.ref = new PBaaSEvidenceRef(); + } else if (type == CrossChainDataRef.TYPE_IDENTITY_DATAREF) { + this.ref = new IdentityMultimapRef(); + } else if (type == CrossChainDataRef.TYPE_URL_REF) { + this.ref = new URLRef(); + } + + offset = this.ref.fromBuffer(buffer, reader.offset); + return reader.offset; + } + + isValid(): boolean { + return (typeof (this.ref) == typeof (PBaaSEvidenceRef) && this.ref.isValid()) || + (typeof (this.ref) == typeof (IdentityMultimapRef) && this.ref.isValid()) || + (typeof (this.ref) == typeof (URLRef) && this.ref.isValid()); + } + + toJson() { + return this.ref.toJson(); + } +} \ No newline at end of file diff --git a/src/pbaas/DataDescriptor.ts b/src/pbaas/DataDescriptor.ts new file mode 100644 index 0000000..4ae5449 --- /dev/null +++ b/src/pbaas/DataDescriptor.ts @@ -0,0 +1,417 @@ +import { BigNumber } from '../utils/types/BigNumber'; +import { BN } from 'bn.js'; +import varint from '../utils/varint' +import varuint from '../utils/varuint' +import bufferutils from '../utils/bufferutils' +const { BufferReader, BufferWriter } = bufferutils +import { VdxfUniValue } from '.'; +import { BufferDataVdxfObject } from '../vdxf/index'; +import * as VDXF_Data from '../vdxf/vdxfdatakeys'; +import { SerializableEntity } from '../utils/types/SerializableEntity'; + +export class DataDescriptor implements SerializableEntity { + + static VERSION_INVALID = new BN(0); + static VERSION_FIRST = new BN(1); + static FIRST_VERSION = new BN(1); + static LAST_VERSION = new BN(1); + static DEFAULT_VERSION = new BN(1); + + static FLAG_ENCRYPTED_DATA = new BN(1); + static FLAG_SALT_PRESENT = new BN(2); + static FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT = new BN(4); + static FLAG_INCOMING_VIEWING_KEY_PRESENT = new BN(8); + static FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT = new BN(0x10); + static FLAG_LABEL_PRESENT = new BN(0x20); + static FLAG_MIME_TYPE_PRESENT = new BN(0x40); + static FLAG_MASK = (DataDescriptor.FLAG_ENCRYPTED_DATA.add( + DataDescriptor.FLAG_SALT_PRESENT).add( + DataDescriptor.FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT).add( + DataDescriptor.FLAG_INCOMING_VIEWING_KEY_PRESENT).add( + DataDescriptor.FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT).add( + DataDescriptor.FLAG_LABEL_PRESENT).add( + DataDescriptor.FLAG_MIME_TYPE_PRESENT)); + + version: BigNumber; + flags: BigNumber; // Flags indicating what items are present in the object + objectdata: Buffer; // either direct data or serialized UTXORef +offset, length, and/or other type of info for different links + label: string; // label associated with this data + mimeType: string; // optional mime type + salt: Buffer; // encryption public key, data only present if encrypted or data referenced by unencrypted link is encrypted + epk: Buffer; // encryption public key, data only present if encrypted or data referenced by unencrypted link is encrypted + ivk: Buffer; // incoming viewing key, optional and contains data only if full viewing key is published at this encryption level + ssk: Buffer; // specific symmetric key, optional and only to decrypt this linked sub-object + + constructor(data?: { + version?: BigNumber, + flags?: BigNumber, + objectdata?: Buffer, + label?: string, + mimeType?: string, + salt?: Buffer, + epk?: Buffer, + ivk?: Buffer, + ssk?: Buffer + }) { + this.flags = new BN(0); + this.version = DataDescriptor.DEFAULT_VERSION; + + if (data != null) { + if (data.flags != null) this.flags = data.flags + if (data.version != null) this.version = data.version + if (data.objectdata != null) this.objectdata = data.objectdata + if (data.label != null) this.label = data.label; + if (data.mimeType != null) this.mimeType = data.mimeType; + if (data.salt != null) this.salt = data.salt; + + if (data.epk != null) this.epk = data.epk; + if (data.ivk != null) this.ivk = data.ivk; + if (data.ssk != null) this.ssk = data.ssk; + + if (this.label && this.label.length > 64) { + this.label = this.label.slice(0, 64); + } + if (this.mimeType && this.mimeType.length > 128) { + this.mimeType = this.mimeType.slice(0, 128); + } + + this.SetFlags(); + + } + } + + static fromJson(data: any): DataDescriptor { + + const newDataDescriptor = new DataDescriptor(); + + if (data != null) { + if (data.flags != null) newDataDescriptor.flags = new BN(data.flags) + if (data.version != null) newDataDescriptor.version = new BN(data.version) + if (data.objectdata != null) newDataDescriptor.objectdata = VdxfUniValue.vectorEncodeVDXFUni(data.objectdata) + if (data.label != null) newDataDescriptor.label = data.label; + if (data.mimetype != null) newDataDescriptor.mimeType = data.mimetype; + if (data.salt != null) newDataDescriptor.salt = Buffer.from(data.salt, 'hex'); + if (data.epk != null) newDataDescriptor.epk = Buffer.from(data.epk, 'hex'); + if (data.ivk != null) newDataDescriptor.ivk = Buffer.from(data.ivk, 'hex'); + if (data.ssk != null) newDataDescriptor.ssk = Buffer.from(data.ssk, 'hex'); + + if (newDataDescriptor.label && newDataDescriptor.label.length > 64) { + newDataDescriptor.label = newDataDescriptor.label.slice(0, 64); + } + if (newDataDescriptor.mimeType && newDataDescriptor.mimeType.length > 128) { + newDataDescriptor.mimeType = newDataDescriptor.mimeType.slice(0, 128); + } + }; + + newDataDescriptor.SetFlags(); + + return newDataDescriptor; + + } + + DecodeHashVector(): Array { + + const vdxfData = new BufferDataVdxfObject(); + vdxfData.fromBuffer(this.objectdata); + const hashes = []; + + if (vdxfData.vdxfkey == VDXF_Data.VectorUint256Key.vdxfid) { + const reader = new BufferReader(Buffer.from(vdxfData.data, 'hex')); + const count = reader.readVarInt(); + for (let i = 0; i < count.toNumber(); i++) { + hashes.push(reader.readSlice(32)); + } + } + return hashes; + + } + + getByteLength(): number { + + let length = 0; + + length += varint.encodingLength(this.version); + length += varint.encodingLength(this.flags); + length += varuint.encodingLength(this.objectdata.length); + length += this.objectdata.length; + + if (this.HasLabel()) { + if (this.label.length > 64) { + throw new Error("Label too long"); + } + length += varuint.encodingLength(this.label.length); + length += this.label.length; + } + + if (this.HasMIME()) { + if (this.mimeType.length > 128) { + throw new Error("MIME type too long"); + } + length += varuint.encodingLength(this.mimeType.length); + length += this.mimeType.length; + } + + if (this.HasSalt()) { + length += varuint.encodingLength(this.salt.length); + length += this.salt.length; + } + + if (this.HasEPK()) { + length += varuint.encodingLength(this.epk.length); + length += this.epk.length; + } + + if (this.HasIVK()) { + length += varuint.encodingLength(this.ivk.length); + length += this.ivk.length; + } + + if (this.HasSSK()) { + length += varuint.encodingLength(this.ssk.length); + length += this.ssk.length; + } + return length; + } + + toBuffer(): Buffer { + const writer = new BufferWriter(Buffer.alloc(this.getByteLength())); + + writer.writeVarInt(this.version); + writer.writeVarInt(this.flags); + writer.writeVarSlice(this.objectdata); + + if (this.HasLabel()) { + writer.writeVarSlice(Buffer.from(this.label)); + } + + if (this.HasMIME()) { + writer.writeVarSlice(Buffer.from(this.mimeType)); + } + + if (this.HasSalt()) { + writer.writeVarSlice(this.salt); + } + + if (this.HasEPK()) { + writer.writeVarSlice(this.epk); + } + + if (this.HasIVK()) { + writer.writeVarSlice(this.ivk); + } + + if (this.HasSSK()) { + writer.writeVarSlice(this.ssk); + } + + return writer.buffer; + } + + fromBuffer(buffer: Buffer, offset: number = 0): number { + const reader = new BufferReader(buffer, offset); + this.version = reader.readVarInt(); + this.flags = reader.readVarInt(); + this.objectdata = reader.readVarSlice(); + + if (this.HasLabel()) { + this.label = reader.readVarSlice().toString(); + } + + if (this.HasMIME()) { + this.mimeType = reader.readVarSlice().toString(); + } + + if (this.HasSalt()) { + this.salt = reader.readVarSlice(); + } + + if (this.HasEPK()) { + this.epk = reader.readVarSlice(); + } + + if (this.HasIVK()) { + this.ivk = reader.readVarSlice(); + } + + if (this.HasSSK()) { + this.ssk = reader.readVarSlice(); + } + return reader.offset; + + } + + HasEncryptedData(): boolean { + return this.flags.and(DataDescriptor.FLAG_ENCRYPTED_DATA).gt(new BN(0)); + } + + HasSalt(): boolean { + return this.flags.and(DataDescriptor.FLAG_SALT_PRESENT).gt(new BN(0)); + } + + HasEPK(): boolean { + return this.flags.and(DataDescriptor.FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT).gt(new BN(0)); + } + + HasMIME(): boolean { + return this.flags.and(DataDescriptor.FLAG_MIME_TYPE_PRESENT).gt(new BN(0)); + } + + HasIVK(): boolean { + return this.flags.and(DataDescriptor.FLAG_INCOMING_VIEWING_KEY_PRESENT).gt(new BN(0)); + } + + HasSSK(): boolean { + return this.flags.and(DataDescriptor.FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT).gt(new BN(0)); + } + + HasLabel(): boolean { + return this.flags.and(DataDescriptor.FLAG_LABEL_PRESENT).gt(new BN(0)); + } + + CalcFlags(): BigNumber { + return this.flags.and(DataDescriptor.FLAG_ENCRYPTED_DATA).add + (this.label ? DataDescriptor.FLAG_LABEL_PRESENT : new BN(0)).add + (this.mimeType ? DataDescriptor.FLAG_MIME_TYPE_PRESENT : new BN(0)).add + (this.salt ? DataDescriptor.FLAG_SALT_PRESENT : new BN(0)).add + (this.epk ? DataDescriptor.FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT : new BN(0)).add + (this.ivk ? DataDescriptor.FLAG_INCOMING_VIEWING_KEY_PRESENT : new BN(0)).add + (this.ssk ? DataDescriptor.FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT : new BN(0)); + } + + SetFlags() { + this.flags = this.CalcFlags(); + } + + isValid(): boolean { + return !!(this.version.gte(DataDescriptor.FIRST_VERSION) && this.version.lte(DataDescriptor.LAST_VERSION) && this.flags.and(DataDescriptor.FLAG_MASK.notn(DataDescriptor.FLAG_MASK.bitLength()))); + } + + toJson() { + + const retval = { + version: this.version.toString(), + flags: this.flags.toString() + }; + + let isText = false; + if (this.mimeType) { + retval['mimetype'] = this.mimeType; + if (this.mimeType.startsWith("text/")) isText = true; + } + + let processedObject = VdxfUniValue.VDXFDataToUniValueArray(this.objectdata) + + if (isText && typeof processedObject === 'string' || processedObject instanceof String) { + + let objectDataUni = { message: Buffer.from(processedObject, 'hex').toString('utf-8') }; + retval['objectdata'] = objectDataUni; + + } else { + retval['objectdata'] = processedObject; + } + + if (this.label) retval['label'] = this.label; + if (this.salt) retval['salt'] = this.salt.toString('hex'); + if (this.epk) retval['epk'] = this.epk.toString('hex'); + if (this.ivk) retval['ivk'] = this.ivk.toString('hex'); + if (this.ssk) retval['ssk'] = this.ssk.toString('hex'); + + return retval; + } + +}; + + +export class VDXFDataDescriptor extends BufferDataVdxfObject { + dataDescriptor: DataDescriptor; + + constructor(dataDescriptor?: DataDescriptor, + vdxfkey: string = "", + version: BigNumber = new BN(1)) { + super("", vdxfkey); + this.version = version; + if (dataDescriptor) { + this.dataDescriptor = dataDescriptor; + } + } + + static fromDataVdxfObject(data: BufferDataVdxfObject): VDXFDataDescriptor { + + const retval = new VDXFDataDescriptor(); + retval.version = data.version; + retval.data = data.data; + retval.fromBuffer(Buffer.from(retval.data, 'hex')); + delete retval.data; + return retval; + + } + dataByteLength(): number { + + let length = 0; + + length += this.dataDescriptor.getByteLength(); + + return length; + } + + toDataBuffer(): Buffer { + + return this.dataDescriptor.toBuffer(); + } + + fromDataBuffer(buffer: Buffer, offset?: number): number { + const reader = new bufferutils.BufferReader(buffer, offset); + + this.data = reader.readVarSlice().toString('hex'); + + this.dataDescriptor = new DataDescriptor(); + this.dataDescriptor.fromBuffer(Buffer.from(this.data, 'hex'), reader.offset); + delete this.data; + + return reader.offset; + } + + HasEncryptedData(): boolean { + return this.dataDescriptor.HasEncryptedData(); + } + + HasLabel(): boolean { + return this.dataDescriptor.HasLabel(); + } + + HasSalt(): boolean { + return this.dataDescriptor.HasSalt(); + } + + HasEPK(): boolean { + return this.dataDescriptor.HasEPK(); + } + + HasIVK(): boolean { + return this.dataDescriptor.HasIVK(); + } + + HasSSK(): boolean { + return this.dataDescriptor.HasSSK(); + } + + CalcFlags(): BigNumber { + return this.dataDescriptor.CalcFlags(); + } + + SetFlags() { + return this.dataDescriptor.SetFlags(); + } + +}; + +export enum EHashTypes { + HASH_INVALID = 0, + HASH_BLAKE2BMMR = 1, + HASH_BLAKE2BMMR2 = 2, + HASH_KECCAK = 3, + HASH_SHA256D = 4, + HASH_SHA256 = 5, + HASH_LASTTYPE = 5 +}; + diff --git a/src/pbaas/IdentityMultimapRef.ts b/src/pbaas/IdentityMultimapRef.ts new file mode 100644 index 0000000..83bc1b0 --- /dev/null +++ b/src/pbaas/IdentityMultimapRef.ts @@ -0,0 +1,146 @@ +import varint from '../utils/varint' +import varuint from '../utils/varuint' +import { fromBase58Check, toBase58Check } from "../utils/address"; +import bufferutils from '../utils/bufferutils' +import { BN } from 'bn.js'; +import { BigNumber } from '../utils/types/BigNumber'; +import { I_ADDR_VERSION } from '../constants/vdxf'; +import { SerializableEntity } from '../utils/types/SerializableEntity'; + +const { BufferReader, BufferWriter } = bufferutils +export class IdentityMultimapRef implements SerializableEntity { + version: BigNumber; + flags: BigNumber; + id_ID: string; + key: string; + height_start: BigNumber; + height_end: BigNumber; + data_hash: Buffer; + system_id: string; + + static FLAG_NO_DELETION = new BN(1) + static FLAG_HAS_DATAHASH = new BN(2) + static FLAG_HAS_SYSTEM = new BN(4) + static FIRST_VERSION = new BN(1) + static LAST_VERSION = new BN(1) + static CURRENT_VERSION = new BN(1) + + constructor(data?) { + + if (data) { + this.version = data.version || IdentityMultimapRef.CURRENT_VERSION; + this.flags = data.flags || new BN(0); + this.id_ID = data.id_ID || ""; + this.key = data.key || ""; + this.height_start = data.height_start || new BN(0); + this.height_end = data.height_end || new BN(0); + this.data_hash = data.data_hash || Buffer.alloc(0); + this.system_id = data.system_id || ""; + } + } + + setFlags() { + this.flags = this.flags.and(IdentityMultimapRef.FLAG_NO_DELETION); + if (this.data_hash && this.data_hash.length > 0) { + this.flags = this.flags.or(IdentityMultimapRef.FLAG_HAS_DATAHASH); + } + if (this.system_id && this.system_id.length > 0) { + this.flags = this.flags.or(IdentityMultimapRef.FLAG_HAS_SYSTEM); + } + } + + getByteLength() { + let byteLength = 0; + this.setFlags(); + + byteLength += varint.encodingLength(this.version); + byteLength += varint.encodingLength(this.flags); + byteLength += 20; // id_ID uint160 + byteLength += 20; // key uint160 + byteLength += varint.encodingLength(this.height_start); // height_start uint32 + byteLength += varint.encodingLength(this.height_end); // height_end uint32 + byteLength += 32; // data_hash uint25 + + if (this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH).gt(new BN(0))) { + byteLength += 32; + } + + if (this.flags.and(IdentityMultimapRef.FLAG_HAS_SYSTEM).gt(new BN(0))) { + byteLength += 20 + } + return byteLength + } + + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) + + bufferWriter.writeVarInt(this.version); + bufferWriter.writeVarInt(this.flags); + bufferWriter.writeSlice(fromBase58Check(this.id_ID).hash); + bufferWriter.writeSlice(fromBase58Check(this.key).hash); + bufferWriter.writeVarInt(this.height_start); + bufferWriter.writeVarInt(this.height_end); + + if (this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH).gt(new BN(0))) { + bufferWriter.writeSlice(this.data_hash); + } + if (this.flags.and(IdentityMultimapRef.FLAG_HAS_SYSTEM).gt(new BN(0))) { + bufferWriter.writeSlice(fromBase58Check(this.system_id).hash); + } + + return bufferWriter.buffer + } + + fromBuffer(buffer: Buffer, offset: number = 0) { + const reader = new BufferReader(buffer, offset); + + this.version = reader.readVarInt(); + this.flags = reader.readVarInt(); + this.id_ID = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + this.key = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + this.height_start = reader.readVarInt(); + this.height_end = reader.readVarInt(); + + if (this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH).gt(new BN(0))) { + this.data_hash = reader.readSlice(32); + } + + if (this.flags.and(IdentityMultimapRef.FLAG_HAS_SYSTEM).gt(new BN(0))) { + this.system_id = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + } + return reader.offset; + } + + isValid(): boolean { + return this.version.gte(IdentityMultimapRef.FIRST_VERSION) && + this.version.lte(IdentityMultimapRef.LAST_VERSION) && + (this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH.add(IdentityMultimapRef.FLAG_HAS_SYSTEM).notn(16))).eq(new BN(0)) && + !(!this.id_ID || this.id_ID.length === 0) && !(!this.key || this.key.length === 0); + } + + hasDataHash() { + return this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH).gt(new BN(0)); + } + + hasSystemID() { + return this.flags.and(IdentityMultimapRef.FLAG_HAS_SYSTEM).gt(new BN(0)); + } + + toJson() { + + let retval; + + retval.version = this.version.toString(10); + retval.flags = this.flags.toString(10); + retval.vdxfkey = this.key; + if (this.hasDataHash()) { + retval.datahash = this.data_hash.toString('hex'); + } + + if (this.hasSystemID()) { + retval.systemid = this.system_id; + } + retval.startheight = this.height_start.toString(10); + retval.endheight = this.height_end.toString(10); + } +} \ No newline at end of file diff --git a/src/vdxf/classes/MMR.ts b/src/pbaas/MMR.ts similarity index 74% rename from src/vdxf/classes/MMR.ts rename to src/pbaas/MMR.ts index c92edae..f25b35c 100644 --- a/src/vdxf/classes/MMR.ts +++ b/src/pbaas/MMR.ts @@ -4,15 +4,15 @@ var blake2b = require('blake2b') import { BN } from 'bn.js'; -import { VDXFObject } from "../"; -import varuint from '../../utils/varuint' -import bufferutils from '../../utils/bufferutils' +import { VDXFObject } from "../vdxf"; +import varuint from '../utils/varuint' +import bufferutils from '../utils/bufferutils' +import { GetMMRProofIndex } from '../utils/mmr'; const { BufferReader, BufferWriter } = bufferutils; const BRANCH_MMRBLAKE_NODE = 2 -export class CLayer -{ +export class MMRLayer { private vSize: number; private nodes: Array; @@ -48,7 +48,7 @@ export class CLayer }; //template -class COverlayNodeLayer { +class OverlayNodeLayer { private nodeSource: UNDERLYING; private vSize: number; @@ -79,7 +79,7 @@ class COverlayNodeLayer { clear() { this.vSize = 0; } resize(newSize: number) { this.vSize = newSize; } }; -export class CMMRNode { +export class MMRNode { hash: Buffer; constructor(Hash?: Buffer) { @@ -93,46 +93,43 @@ export class CMMRNode { return blake2b(out.length, null, null, Buffer.from("VerusDefaultHash")).update(input).digest(out); } - HashObj(obj: Buffer, onbjR?: Buffer): Buffer { + hashObj(obj: Buffer, onbjR?: Buffer): Buffer { if (!onbjR) return this.digest(obj); else return this.digest(Buffer.concat([obj, onbjR])); } // add a right to this left and create a parent node - CreateParentNode(nRight: CMMRNode): CMMRNode { - return new CMMRNode(this.digest(Buffer.concat([this.hash, nRight.hash]))); + createParentNode(nRight: MMRNode): MMRNode { + return new MMRNode(this.digest(Buffer.concat([this.hash, nRight.hash]))); } - GetProofHash(opposite: CMMRNode): Array { + getProofHash(opposite: MMRNode): Array { return [this.hash]; } // leaf nodes that track additional data, such as block power, may need a hash added to the path // at the very beginning - GetLeafHash(): Array { return []; } + getLeafHash(): Array { return []; } - GetExtraHashCount() { + getExtraHashCount() { // how many extra proof hashes per layer are added with this node return 0; } }; -function loggingIdentity(arg: Type[]): Type[] { - console.log(arg.length); - return arg; -} + //template , typename LAYER0_TYPE=LAYER_TYPE> -export class CMerkleMountainRange { - layer0: CLayer; +export class MerkleMountainRange { + layer0: MMRLayer; vSize: number; - upperNodes: Array>; + upperNodes: Array>; _leafLength: number; constructor() { - this.layer0 = new CLayer(); + this.layer0 = new MMRLayer(); this.vSize = 0; - this.upperNodes = new Array>(); + this.upperNodes = new Array>(); this._leafLength = 0; } @@ -144,11 +141,11 @@ export class CMerkleMountainRange { return Buffer.from([]); } - fromBuffer(bufferIn: Buffer): CMerkleMountainRange { - return new CMerkleMountainRange(); + fromBuffer(bufferIn: Buffer): MerkleMountainRange { + return new MerkleMountainRange(); } - add(leaf: CMMRNode): number { + add(leaf: MMRNode): number { this.layer0.push_back(leaf); let height = 0; @@ -158,7 +155,7 @@ export class CMerkleMountainRange { // expand vector of vectors if we are adding a new layer if (height == this.upperNodes.length) { - this.upperNodes.push(new CLayer()); + this.upperNodes.push(new MMRLayer()); } let curSizeAbove = this.upperNodes[height].size(); @@ -169,10 +166,10 @@ export class CMerkleMountainRange { let idx = layerSize - 2; if (height > 0) { - this.upperNodes[height].push_back(this.upperNodes[height - 1].getIndex(idx).CreateParentNode(this.upperNodes[height - 1].getIndex(idx + 1))); + this.upperNodes[height].push_back(this.upperNodes[height - 1].getIndex(idx).createParentNode(this.upperNodes[height - 1].getIndex(idx + 1))); } else { - this.upperNodes[height].push_back(this.layer0.getIndex(idx).CreateParentNode(this.layer0.getIndex(idx + 1))); + this.upperNodes[height].push_back(this.layer0.getIndex(idx).createParentNode(this.layer0.getIndex(idx + 1))); } } @@ -189,7 +186,7 @@ export class CMerkleMountainRange { return this.layer0.size() > 0 ? this.upperNodes.length + 1 : 0; } - getNode(Height, Index): CMMRNode { + getNode(Height, Index): MMRNode { let layers = this.height(); if (Height < layers) { if (Height) { @@ -208,7 +205,7 @@ export class CMerkleMountainRange { } -export class CMMRBranch { +export class MMRBranch { branchType?: number; nIndex?: number; nSize?: number; @@ -304,12 +301,12 @@ export class CMMRBranch { } } -export class CMMRProof { - proofSequence: Array; +export class MMRProof { + proofSequence: Array; - setProof(proof: CMMRBranch) { + setProof(proof: MMRBranch) { if (!this.proofSequence) { - this.proofSequence = new Array(); + this.proofSequence = new Array(); } this.proofSequence.push(proof); } @@ -347,10 +344,10 @@ export class CMMRProof { let proofSequenceLength = reader.readCompactSize(); - this.proofSequence = new Array(); + this.proofSequence = new Array(); for (let i = 0; i < proofSequenceLength; i++) { - let proof = new CMMRBranch(); + let proof = new MMRBranch(); reader.offset = proof.fromBuffer(reader.buffer, reader.offset); this.setProof(proof); } @@ -361,13 +358,13 @@ export class CMMRProof { } //template , typename LAYER0_TYPE=LAYER_TYPE, typename HASHALGOWRITER=CBLAKE2bWriter> -export class CMerkleMountainView { - mmr: CMerkleMountainRange; // the underlying mountain range, which provides the hash vectors +export class MerkleMountainView { + mmr: MerkleMountainRange; // the underlying mountain range, which provides the hash vectors sizes: Array; // sizes that we will use as proxies for the size of each vector at each height - peaks: Array; // peaks - peakMerkle: Array>; // cached layers for the peak merkle if needed + peaks: Array; // peaks + peakMerkle: Array>; // cached layers for the peak merkle if needed - constructor(mountainRange: CMerkleMountainRange, viewSize: number = 0) { + constructor(mountainRange: MerkleMountainRange, viewSize: number = 0) { this.mmr = mountainRange; let maxSize = this.mmr.size(); if (viewSize > maxSize || viewSize == 0) { @@ -379,8 +376,8 @@ export class CMerkleMountainView { for (viewSize >>= 1; viewSize; viewSize >>= 1) { this.sizes.push(viewSize); } - this.peakMerkle = new Array>(); - this.peaks = new Array(); + this.peakMerkle = new Array>(); + this.peaks = new Array(); } @@ -391,12 +388,12 @@ export class CMerkleMountainView { return this.sizes.length == 0 ? 0 : this.sizes[0]; } - CalcPeaks(force = false) { + calcPeaks(force = false) { // if we don't yet have calculated peaks, calculate them if (force || (this.peaks.length == 0 && this.size() != 0)) { // reset the peak merkle tree, in case this is forced - this.peaks = new Array; - this.peakMerkle = new Array>; + this.peaks = new Array; + this.peakMerkle = new Array>; for (let ht = 0; ht < this.sizes.length; ht++) { // if we're at the top or the layer above us is smaller than 1/2 the size of this layer, rounded up, we are a peak if (ht == (this.sizes.length - 1) || this.sizes[ht + 1] < ((this.sizes[ht] + 1) >> 1)) { @@ -410,8 +407,8 @@ export class CMerkleMountainView { if (newSize != this.size()) { this.sizes = new Array; - this.peaks = new Array; - this.peakMerkle = new Array>; + this.peaks = new Array; + this.peakMerkle = new Array>; let maxSize = this.mmr.size(); if (newSize > maxSize) { @@ -432,32 +429,32 @@ export class CMerkleMountainView { return this.mmr.size() - 1; } - GetPeaks(): Array { - this.CalcPeaks(); + getPeaks(): Array { + this.calcPeaks(); return this.peaks; } - GetRoot(): Buffer { + getRoot(): Buffer { let rootHash = Buffer.allocUnsafe(32); if (this.size() > 0 && this.peakMerkle.length == 0) { // get peaks and hash to a root - this.CalcPeaks(); + this.calcPeaks(); let layerNum: number = 0, layerSize = this.peaks.length; // with an odd number of elements below, the edge passes through for (let passThrough: boolean = !!(layerSize & 1); layerNum == 0 || layerSize > 1; passThrough = !!(layerSize & 1), layerNum++) { - this.peakMerkle.push(Array()); + this.peakMerkle.push(Array()); let i; let layerIndex = layerNum ? layerNum - 1 : 0; // layerNum is base 1 for (i = 0; i < (layerSize >> 1); i++) { if (layerNum > 0) { - this.peakMerkle[this.peakMerkle.length - 1].push(this.peakMerkle[layerIndex][i << 1].CreateParentNode(this.peakMerkle[layerIndex][(i << 1) + 1])); + this.peakMerkle[this.peakMerkle.length - 1].push(this.peakMerkle[layerIndex][i << 1].createParentNode(this.peakMerkle[layerIndex][(i << 1) + 1])); } else { - this.peakMerkle[this.peakMerkle.length - 1].push(this.peaks[i << 1].CreateParentNode(this.peaks[(i << 1) + 1])); + this.peakMerkle[this.peakMerkle.length - 1].push(this.peaks[i << 1].createParentNode(this.peaks[(i << 1) + 1])); } } if (passThrough) { @@ -480,9 +477,9 @@ export class CMerkleMountainView { return rootHash; } - GetRootNode(): CMMRNode { + getRootNode(): MMRNode { // ensure merkle tree is calculated - let root = this.GetRoot(); + let root = this.getRoot(); if (root.length > 0) { return this.peakMerkle[this.peakMerkle.length - 1][0]; } @@ -492,7 +489,7 @@ export class CMerkleMountainView { } // return hash of the element at "index" - GetHash(index: number): Buffer { + getHash(index: number): Buffer { if (index < this.size()) { return this.mmr.layer0[index].hash; } @@ -501,22 +498,22 @@ export class CMerkleMountainView { } } - GetBranchType(): number { + getBranchType(): number { return BRANCH_MMRBLAKE_NODE; } // return a proof of the element at "pos" - GetProof(retProof: CMMRProof, pos: number): boolean { + getProof(retProof: MMRProof, pos: number): boolean { // find a path from the indicated position to the root in the current view - let retBranch = new CMMRBranch(); + let retBranch = new MMRBranch(); if (pos < this.size()) { // just make sure the peakMerkle tree is calculated - this.GetRoot(); + this.getRoot(); // if we have leaf information, add it - let toAdd: Array = this.mmr.layer0.getIndex(pos).GetLeafHash(); + let toAdd: Array = this.mmr.layer0.getIndex(pos).getLeafHash(); if (toAdd.length > 0) { retBranch.branch.splice(retBranch.branch.length, 0, toAdd[0]); } @@ -539,7 +536,7 @@ export class CMerkleMountainView { /* for (auto &oneNode : peaks) { printf("peaknode: "); - for (auto oneHash : oneNode.GetProofHash(oneNode)) + for (auto oneHash : oneNode.getProofHash(oneNode)) { printf("%s:", oneHash.GetHex().c_str()); } @@ -597,7 +594,7 @@ export class CMerkleMountainView { } } } - retBranch.branchType = this.GetBranchType(); + retBranch.branchType = this.getBranchType(); retBranch.nSize = this.size(); retBranch.nIndex = pos; retProof.setProof(retBranch); @@ -609,110 +606,8 @@ export class CMerkleMountainView { // return a vector of the bits, either 1 or 0 in each byte, to represent both the size // of the proof by the size of the vector, and the expected bit in each position for the given // position in a Merkle Mountain View of the specified size - GetProofBits(pos: number, mmvSize: number) { + getProofBits(pos: number, mmvSize: number) { //NOTE: Not implmented. }; } -export const GetMMRProofIndex = (pos: number, mmvSize: number, extraHashes: number): InstanceType => { - let index = new BN(0); - let layerSizes = []; - let merkleSizes = []; - let peakIndexes = []; - let bitPos = 0; - - //start at the beginning - //create a simulation of a mmr based on size - if (!(pos > 0 && pos < mmvSize)) return new BN(0); - - //create an array of all the sizes - while (mmvSize) { - layerSizes.push(mmvSize); - mmvSize = mmvSize >> 1 - } - - for (let height = 0; height < layerSizes.length; height++) { - if (height == layerSizes.length - 1 || layerSizes[height] & 1) { - peakIndexes.push(height); - } - } - - //array flip peak indexes - peakIndexes.reverse(); - - let layerNum = 0; - let layerSize = peakIndexes.length; - - for (let passThrough = (layerSize & 1); layerNum == 0 || layerSize > 1; passThrough = (layerSize & 1), layerNum++) { - layerSize = (layerSize >> 1) + passThrough; - if (layerSize) { - merkleSizes.push(layerSize); - } - } - //flip the merklesizes - - for (let i = 0; i < extraHashes; i++) { - bitPos++; - } - - let p = pos; - for (let l = 0; l < layerSizes.length; l++) { - if (p & 1) { - index = index.or(new BN(1).shln(bitPos++)); - - p >>= 1; - - for (let i = 0; i < extraHashes; i++) { - bitPos++; - } - - } else { - if (layerSizes[l] > (p + 1)) { - - bitPos++; - p >>= 1; - for (let i = 0; i < extraHashes; i++) { - bitPos++; - } - } else { - - for (p = 0; p < peakIndexes.length; p++) { - - if (peakIndexes[p] == l) { - break; - } - } - - for (let layerNum = -1, layerSize = peakIndexes.length; layerNum == -1 || layerSize > 1; layerSize = merkleSizes[++layerNum]) { - - if (p < (layerSize - 1) || (p & 1)) { - - - if (p & 1) { - // hash with the one before us - index = index.or(new BN(1).shln(bitPos++)); - - for (let i = 0; i < extraHashes; i++) { - bitPos++; - } - } else { - // hash with the one in front of us - bitPos++; - - for (let i = 0; i < extraHashes; i++) { - bitPos++; - } - } - } - p >>= 1; - } - - break; - } - - } - } - return index; -} - - diff --git a/src/pbaas/MMRDescriptor.ts b/src/pbaas/MMRDescriptor.ts new file mode 100644 index 0000000..3ab8fc2 --- /dev/null +++ b/src/pbaas/MMRDescriptor.ts @@ -0,0 +1,145 @@ +import { BigNumber } from '../utils/types/BigNumber'; +import { BN } from 'bn.js'; +import varint from '../utils/varint' +import varuint from '../utils/varuint' +import bufferutils from '../utils/bufferutils' +const { BufferReader, BufferWriter } = bufferutils +import { DataDescriptor } from './DataDescriptor'; +import { EHashTypes } from './DataDescriptor'; +import { VdxfUniValue } from '.'; +import { BufferDataVdxfObject } from '../vdxf/index'; +import * as VDXF_Data from '../vdxf/vdxfdatakeys'; +import { SerializableEntity } from '../utils/types/SerializableEntity'; + +export class MMRDescriptor implements SerializableEntity { + static VERSION_INVALID = new BN(0); + static FIRST_VERSION = new BN(1); + static LAST_VERSION = new BN(1); + static DEFAULT_VERSION = new BN(1); + + version: BigNumber; + objectHashType: EHashTypes; + mmrHashType: EHashTypes; + mmrRoot: DataDescriptor; + mmrHashes: DataDescriptor; + dataDescriptors: DataDescriptor[]; + + constructor(data?: { + version?: BigNumber, + objectHashType?: EHashTypes, + mmrHashType?: EHashTypes, + mmrRoot?: DataDescriptor, + mmrHashes?: DataDescriptor, + dataDescriptors?: DataDescriptor[] + }) { + + if (data) { + if (data.version) this.version = data.version; + if (data.objectHashType) this.objectHashType = data.objectHashType; + if (data.mmrHashType) this.mmrHashType = data.mmrHashType; + if (data.mmrRoot) this.mmrRoot = data.mmrRoot; + if (data.mmrHashes) this.mmrHashes = data.mmrHashes; + if (data.dataDescriptors) this.dataDescriptors = data.dataDescriptors; + + } else { + this.version = MMRDescriptor.DEFAULT_VERSION; + } + } + + static fromJson(data: any): MMRDescriptor { + + const newMMRDescriptor = new MMRDescriptor(); + + if (data) { + if (data.version) newMMRDescriptor.version = new BN(data.version); + if (data.objecthashtype) newMMRDescriptor.objectHashType = data.objecthashtype; + if (data.mmrhashtype) newMMRDescriptor.mmrHashType = data.mmrhashtype; + if (data.mmrroot) newMMRDescriptor.mmrRoot = DataDescriptor.fromJson(data.mmrroot); + if (data.mmrhashes) newMMRDescriptor.mmrHashes = DataDescriptor.fromJson(data.mmrhashes); + if (data.datadescriptors) { + newMMRDescriptor.dataDescriptors = []; + + data.datadescriptors.forEach((data) => { + newMMRDescriptor.dataDescriptors.push(DataDescriptor.fromJson(data)); + }); + + }; + } + return newMMRDescriptor; + } + + getByteLength(): number { + let length = 0; + + length += varint.encodingLength(this.version); + length += varint.encodingLength(new BN(this.objectHashType)); + length += varint.encodingLength(new BN(this.mmrHashType)); + length += this.mmrRoot.getByteLength(); + length += this.mmrHashes.getByteLength(); + length += varuint.encodingLength(this.dataDescriptors.length); + this.dataDescriptors.forEach((dataDescriptor) => { + length += dataDescriptor.getByteLength(); + }); + + return length; + } + + toBuffer(): Buffer { + + const writer = new BufferWriter(Buffer.alloc(this.getByteLength())); + + writer.writeVarInt(this.version); + writer.writeVarInt(new BN(this.objectHashType)); + writer.writeVarInt(new BN(this.mmrHashType)); + writer.writeSlice(this.mmrRoot.toBuffer()); + writer.writeSlice(this.mmrHashes.toBuffer()); + writer.writeCompactSize(this.dataDescriptors.length); + + this.dataDescriptors.forEach((dataDescriptor) => { + writer.writeSlice(dataDescriptor.toBuffer()); + }); + return writer.buffer; + } + + fromBuffer(buffer: Buffer, offset?: number): number { + const reader = new BufferReader(buffer, offset); + this.version = reader.readVarInt(); + this.objectHashType = reader.readVarInt().toNumber(); + this.mmrHashType = reader.readVarInt().toNumber(); + this.mmrRoot = new DataDescriptor(); + reader.offset = this.mmrRoot.fromBuffer(reader.buffer, reader.offset); + this.mmrHashes = new DataDescriptor(); + reader.offset = this.mmrHashes.fromBuffer(reader.buffer, reader.offset); + const dataDescriptorsLength = reader.readCompactSize(); + this.dataDescriptors = []; + for (let i = 0; i < dataDescriptorsLength; i++) { + const dataDescriptor = new DataDescriptor(); + reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); + this.dataDescriptors.push(dataDescriptor); + } + return reader.offset; + } + + HasData(): boolean { + return !!(this.mmrHashes.objectdata && this.dataDescriptors); + } + + isValid(): boolean { + return this.version >= MMRDescriptor.FIRST_VERSION && this.version <= MMRDescriptor.LAST_VERSION; + } + + toJson() { + + const retval = { + version: this.version.toString(), + objecthashtype: this.objectHashType, + mmrhashtype: this.mmrHashType, + mmrroot: this.mmrRoot.toJson(), + mmrhashes: this.mmrHashes.toJson(), + datadescriptors: this.dataDescriptors.map((dataDescriptor) => dataDescriptor.toJson()) + }; + + return retval; + } +}; + diff --git a/src/pbaas/PBaaSEvidenceRef.ts b/src/pbaas/PBaaSEvidenceRef.ts new file mode 100644 index 0000000..614ff93 --- /dev/null +++ b/src/pbaas/PBaaSEvidenceRef.ts @@ -0,0 +1,119 @@ +import varint from '../utils/varint' +import varuint from '../utils/varuint' +import { fromBase58Check, toBase58Check } from "../utils/address"; +import bufferutils from '../utils/bufferutils' +import { BN } from 'bn.js'; +import { BigNumber } from '../utils/types/BigNumber'; +import { I_ADDR_VERSION } from '../constants/vdxf'; +import { SerializableEntity } from '../utils/types/SerializableEntity'; +import { UTXORef } from './UTXORef'; +import { IdentityMultimapRef } from './IdentityMultimapRef'; + +const { BufferReader, BufferWriter } = bufferutils + +export class PBaaSEvidenceRef implements SerializableEntity { + version: BigNumber; + flags: BigNumber; + output: UTXORef; + object_num: BigNumber; + sub_object: BigNumber; + system_id: string; + + static FLAG_ISEVIDENCE = new BN(1) + static FLAG_HAS_SYSTEM = new BN(2) + static FIRST_VERSION = new BN(1) + static LAST_VERSION = new BN(1) + + constructor(data?: { version?: BigNumber, flags?: BigNumber, output?: UTXORef, object_num?: BigNumber, sub_object?: BigNumber, system_id?: string }) { + + if (data) { + this.version = data.version || new BN(1, 10); + this.flags = data.flags || new BN(0); + this.output = data.output || new UTXORef(); + this.object_num = data.object_num || new BN(0); + this.sub_object = data.sub_object || new BN(0); + this.system_id = data.system_id || ""; + } + } + + setFlags() { + this.flags = this.flags.and(PBaaSEvidenceRef.FLAG_ISEVIDENCE); + if (this.system_id && this.system_id.length > 0) { + this.flags = this.flags.or(PBaaSEvidenceRef.FLAG_HAS_SYSTEM); + } + + } + + getByteLength() { + let byteLength = 0; + this.setFlags(); + + byteLength += varint.encodingLength(this.version); + byteLength += varint.encodingLength(this.flags); + byteLength += this.output.getByteLength(); + byteLength += varint.encodingLength(this.object_num); + byteLength += varint.encodingLength(this.sub_object); + + if (this.flags.and(PBaaSEvidenceRef.FLAG_HAS_SYSTEM).gt(new BN(0))) { + byteLength += 20; + } + + return byteLength + } + + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) + + bufferWriter.writeVarInt(this.version); + bufferWriter.writeVarInt(this.flags); + bufferWriter.writeSlice(this.output.toBuffer()); + bufferWriter.writeVarInt(this.object_num); + bufferWriter.writeVarInt(this.sub_object); + + if (this.flags.and(PBaaSEvidenceRef.FLAG_HAS_SYSTEM).gt(new BN(0))) { + bufferWriter.writeSlice(fromBase58Check(this.system_id).hash); + } + + return bufferWriter.buffer + } + + fromBuffer(buffer: Buffer, offset: number = 0) { + const reader = new BufferReader(buffer, offset); + + this.version = reader.readVarInt(); + this.flags = reader.readVarInt(); + this.output = new UTXORef(); + offset = this.output.fromBuffer(reader.buffer, reader.offset); + this.object_num = reader.readVarInt(); + this.sub_object = reader.readVarInt(); + + if (this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH).gt(new BN(0))) { + this.system_id = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + } + + return reader.offset; + } + + isValid(): boolean { + return this.output.isValid() && this.version.gte(PBaaSEvidenceRef.FIRST_VERSION) && + this.version.lte(PBaaSEvidenceRef.LAST_VERSION) && + (this.flags.and(PBaaSEvidenceRef.FLAG_ISEVIDENCE).gt(new BN(0))); + } + + toJson() { + + let retval; + + retval.version = this.version.toString(10); + retval.flags = this.flags.toString(10); + retval.output = this.output.toJson(); + + if (this.flags.and(PBaaSEvidenceRef.FLAG_HAS_SYSTEM).gt(new BN(0))) { + retval.systemid = this.system_id; + } + retval.objectnum = this.object_num.toString(10); + retval.subobject = this.sub_object.toString(10); + + return retval; + } +} \ No newline at end of file diff --git a/src/pbaas/SignatureData.ts b/src/pbaas/SignatureData.ts new file mode 100644 index 0000000..f39d21f --- /dev/null +++ b/src/pbaas/SignatureData.ts @@ -0,0 +1,253 @@ +import varint from '../utils/varint' +import varuint from '../utils/varuint' +import { fromBase58Check, toBase58Check } from "../utils/address"; +import bufferutils from '../utils/bufferutils' +import { BN } from 'bn.js'; +import { BigNumber } from '../utils/types/BigNumber'; +import { I_ADDR_VERSION } from '../constants/vdxf'; +import { SerializableEntity } from '../utils/types/SerializableEntity'; +import { EHashTypes } from './DataDescriptor'; +const { BufferReader, BufferWriter } = bufferutils +const createHash = require("create-hash"); +import { VERUS_DATA_SIGNATURE_PREFIX } from "../constants/vdxf"; + +export interface SignatureJsonDataInterface { + version: number; + systemid: string; + hashtype: number; + signaturehash: string; + identityid: string; + signaturetype: number; + vdxfkeys: Array; + vdxfkeynames: Array; + boundhashes: Array; + signature: string; +} + +export class SignatureData implements SerializableEntity { + version: BigNumber; + system_ID: string; + hash_type: BigNumber; + signature_hash: Buffer; + identity_ID: string; + sig_type: BigNumber; + vdxf_keys: Array; + vdxf_key_names: Array; + bound_hashes: Array; + signature_as_vch: Buffer; + + static VERSION_INVALID = new BN(0); + static FIRST_VERSION = new BN(1); + static LAST_VERSION = new BN(1); + static DEFAULT_VERSION = new BN(1); + static TYPE_VERUSID_DEFAULT = new BN(1); + + constructor(data?) { + + if (data) { + this.version = data.version || new BN(1, 10); + this.system_ID = data.system_ID || ""; + this.hash_type = data.hash_type || new BN(0); + this.signature_hash = data.signature_hash || Buffer.alloc(0); + this.identity_ID = data.identity_ID || ""; + this.sig_type = data.sig_type || new BN(0); + this.vdxf_keys = data.vdxf_keys || []; + this.vdxf_key_names = data.vdxf_key_names || []; + this.bound_hashes = data.bound_hashes || []; + this.signature_as_vch = data.signature_as_vch || Buffer.alloc(0); + } + } + + static fromJson(data: SignatureJsonDataInterface | any) { + + const signatureData = new SignatureData(); + + if (data) { + signatureData.version = new BN(data.version); + signatureData.system_ID = data.systemid; + signatureData.hash_type = new BN(data.hashtype); + signatureData.identity_ID = data.identityid; + signatureData.sig_type = new BN(data.signaturetype); + + if (signatureData.hash_type == new BN(EHashTypes.HASH_SHA256)) { + signatureData.signature_hash = Buffer.from(data.signaturehash, 'hex').reverse(); + } else { + signatureData.signature_hash = Buffer.from(data.signaturehash, 'hex'); + } + + signatureData.signature_as_vch = Buffer.from(data.signature, 'base64'); + signatureData.vdxf_keys = data.vdxfkeys || []; + signatureData.vdxf_key_names = data.vdxfkeynames || []; + signatureData.bound_hashes = data.boundhashes?.map((hash) => Buffer.from(hash, 'hex')) || []; + + } + + return signatureData; + } + + static getSignatureHashType(input: Buffer) { + + var bufferReader = new bufferutils.BufferReader(input, 0); + let version = bufferReader.readUInt8(); + if (version === 2) + return bufferReader.readUInt8(); + else + return EHashTypes.HASH_SHA256; + } + + getByteLength() { + let byteLength = 0; + + byteLength += varint.encodingLength(this.version); + byteLength += 20; // system_ID uint160 + byteLength += varint.encodingLength(this.hash_type); + byteLength += varuint.encodingLength(this.signature_hash.length); + byteLength += this.signature_hash.length; + byteLength += 20; // identity_ID uint160 + byteLength += varint.encodingLength(this.sig_type); + byteLength += varuint.encodingLength(this.vdxf_keys.length); + byteLength += this.vdxf_keys.length * 20; + byteLength += varuint.encodingLength(this.vdxf_key_names.length); + + for (const keyName of this.vdxf_key_names) { + byteLength += varuint.encodingLength(Buffer.from(keyName, 'utf8').length); + byteLength += Buffer.from(keyName, 'utf8').length; + } + + byteLength += varuint.encodingLength(this.bound_hashes.length); + byteLength += this.bound_hashes.length * 32; + byteLength += varuint.encodingLength(this.signature_as_vch.length); + byteLength += this.signature_as_vch.length; + + return byteLength + } + + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) + + bufferWriter.writeVarInt(this.version); + bufferWriter.writeSlice(fromBase58Check(this.system_ID).hash); + bufferWriter.writeVarInt(this.hash_type); + bufferWriter.writeVarSlice(this.signature_hash); + bufferWriter.writeSlice(fromBase58Check(this.identity_ID).hash); + bufferWriter.writeVarInt(this.sig_type); + bufferWriter.writeCompactSize(this.vdxf_keys.length); + + for (const key of this.vdxf_keys) { + bufferWriter.writeSlice(fromBase58Check(key).hash); + } + + bufferWriter.writeCompactSize(this.vdxf_key_names.length); + for (const keyName of this.vdxf_key_names) { + bufferWriter.writeVarSlice(Buffer.from(keyName, 'utf8')); + } + bufferWriter.writeCompactSize(this.bound_hashes.length); + for (const boundHash of this.bound_hashes) { + bufferWriter.writeSlice(boundHash); + } + bufferWriter.writeVarSlice(this.signature_as_vch); + + return bufferWriter.buffer + } + + fromBuffer(buffer: Buffer, offset: number = 0) { + const reader = new BufferReader(buffer, offset); + + this.version = reader.readVarInt(); + this.system_ID = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + this.hash_type = reader.readVarInt(); + this.signature_hash = reader.readVarSlice(); + this.identity_ID = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + this.sig_type = reader.readVarInt(); + const vdxfKeysLength = reader.readCompactSize(); + this.vdxf_keys = []; + + for (let i = 0; i < vdxfKeysLength; i++) { + this.vdxf_keys.push(toBase58Check(reader.readSlice(20), I_ADDR_VERSION)); + } + + const vdxfKeyNamesLength = reader.readCompactSize(); + this.vdxf_key_names = []; + + for (let i = 0; i < vdxfKeyNamesLength; i++) { + this.vdxf_key_names.push(reader.readVarSlice().toString('utf8')); + } + + const boundHashesLength = reader.readCompactSize(); + this.bound_hashes = []; + + for (let i = 0; i < boundHashesLength; i++) { + this.bound_hashes.push(reader.readSlice(32)); + } + + this.signature_as_vch = reader.readVarSlice(); + + return reader.offset; + } + + isValid() { + return !!(this.version.gte(SignatureData.FIRST_VERSION) && + this.version.lte(SignatureData.LAST_VERSION) && + this.system_ID); + } + + toJson() { + + const returnObj = { + version: this.version.toString(), + systemid: this.system_ID, + hashtype: this.hash_type.toString() + } + + if (this.hash_type == new BN(EHashTypes.HASH_SHA256)) { + returnObj['signaturehash'] = this.signature_hash.reverse().toString('hex'); + } else { + returnObj['signaturehash'] = this.signature_hash.toString('hex'); + } + + returnObj['identityid'] = this.identity_ID; + returnObj['signaturetype'] = this.sig_type.toString(); + returnObj['signature'] = this.signature_as_vch.toString('base64'); + + if (this.vdxf_keys) { + returnObj['vdxfkeys'] = this.vdxf_keys; + } + + if (this.vdxf_key_names) { + returnObj['vdxfkeynames'] = this.vdxf_key_names; + } + + if (this.bound_hashes) { + returnObj['boundhashes'] = this.bound_hashes; + } + + return returnObj + } + + getIdentityHash(sigObject: { version: number, hash_type: number, height: number }) { + var heightBuffer = Buffer.allocUnsafe(4) + heightBuffer.writeUInt32LE(sigObject.height); + + if (sigObject.hash_type != Number(EHashTypes.HASH_SHA256)) { + throw new Error("Invalid signature type for identity hash"); + } + + if (sigObject.version == 1) { + return createHash("sha256") + .update(VERUS_DATA_SIGNATURE_PREFIX) + .update(fromBase58Check(this.system_ID).hash) + .update(heightBuffer) + .update(fromBase58Check(this.identity_ID).hash) + .update(this.signature_hash) + .digest(); + } else { + return createHash("sha256") + .update(fromBase58Check(this.system_ID).hash) + .update(heightBuffer) + .update(fromBase58Check(this.identity_ID).hash) + .update(VERUS_DATA_SIGNATURE_PREFIX) + .update(this.signature_hash) + .digest(); + } + } +} \ No newline at end of file diff --git a/src/pbaas/URLRef.ts b/src/pbaas/URLRef.ts new file mode 100644 index 0000000..b10dc6b --- /dev/null +++ b/src/pbaas/URLRef.ts @@ -0,0 +1,68 @@ +import varint from '../utils/varint' +import varuint from '../utils/varuint' +import { fromBase58Check, toBase58Check } from "../utils/address"; +import bufferutils from '../utils/bufferutils' +import { BN } from 'bn.js'; +import { BigNumber } from '../utils/types/BigNumber'; +import { I_ADDR_VERSION } from '../constants/vdxf'; +import { SerializableEntity } from '../utils/types/SerializableEntity'; + +const { BufferReader, BufferWriter } = bufferutils + +export class URLRef implements SerializableEntity { + + static FIRST_VERSION = new BN(1); + static LAST_VERSION = new BN(1); + + version: BigNumber; + url: string; + constructor(data?: { version?: BigNumber, url?: string }) { + + if (data) { + this.version = data.version || new BN(1, 10); + this.url = data.url || ""; + } + } + + getByteLength() { + let byteLength = 0; + + byteLength += varint.encodingLength(this.version); + byteLength += varuint.encodingLength(Buffer.from(this.url, 'utf8').length); + byteLength += Buffer.from(this.url, 'utf8').length; + if (byteLength > 4096) + throw new Error("URLRef exceeds maximum length of 4096 bytes") + return byteLength + } + + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) + + bufferWriter.writeVarInt(this.version); + bufferWriter.writeVarSlice(Buffer.from(this.url, 'utf8')); + + return bufferWriter.buffer + } + + fromBuffer(buffer: Buffer, offset: number = 0) { + const reader = new BufferReader(buffer, offset); + + this.version = reader.readVarInt(); + this.url = reader.readVarSlice().toString('utf8'); + + return reader.offset; + } + + isValid(): boolean { + return this.version.gte(URLRef.FIRST_VERSION) && + this.version.lte(URLRef.LAST_VERSION) && + !(!this.url || this.url.length === 0); + } + + toJson() { + return { + version: this.version.toString(10), + url: this.url + } + } +} \ No newline at end of file diff --git a/src/pbaas/UTXORef.ts b/src/pbaas/UTXORef.ts new file mode 100644 index 0000000..81dde5d --- /dev/null +++ b/src/pbaas/UTXORef.ts @@ -0,0 +1,58 @@ +import varint from '../utils/varint' +import varuint from '../utils/varuint' +import { fromBase58Check, toBase58Check } from "../utils/address"; +import bufferutils from '../utils/bufferutils' +import { BN } from 'bn.js'; +import { BigNumber } from '../utils/types/BigNumber'; +import { I_ADDR_VERSION } from '../constants/vdxf'; +import { SerializableEntity } from '../utils/types/SerializableEntity'; + +const { BufferReader, BufferWriter } = bufferutils + +export class UTXORef implements SerializableEntity { + hash: Buffer; + n: BigNumber; + + constructor(data?: { hash?: Buffer, n?: BigNumber }) { + this.hash = data.hash || Buffer.alloc(0); + this.n = data.n || new BN(0); + } + + getByteLength() { + let byteLength = 0; + + byteLength += 32; // hash uint256 + byteLength += 4; // n uint32 + + return byteLength + } + + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) + + bufferWriter.writeSlice(this.hash); + bufferWriter.writeUInt32(this.n.toNumber()); + + return bufferWriter.buffer + } + + fromBuffer(buffer: Buffer, offset: number = 0) { + const reader = new BufferReader(buffer, offset); + + this.hash = reader.readSlice(32); + this.n = new BN(reader.readUInt32()); + + return reader.offset; + } + + isValid(): boolean { + return this.n.lt(new BN(0xffffffff)); + } + + toJson() { + return { + hash: this.hash.toString('hex'), + n: this.n.toString(10) + } + } +} \ No newline at end of file diff --git a/src/pbaas/VdxfUniValue.ts b/src/pbaas/VdxfUniValue.ts index 8fc1019..a78978c 100644 --- a/src/pbaas/VdxfUniValue.ts +++ b/src/pbaas/VdxfUniValue.ts @@ -2,11 +2,22 @@ import varuint from '../utils/varuint' import bufferutils from '../utils/bufferutils' import { BigNumber } from '../utils/types/BigNumber'; import { fromBase58Check, toBase58Check } from '../utils/address'; -import { HASH160_BYTE_LENGTH, I_ADDR_VERSION } from '../constants/vdxf'; +import { HASH160_BYTE_LENGTH, I_ADDR_VERSION, VDXF_OBJECT_DEFAULT_VERSION } from '../constants/vdxf'; import { BN } from 'bn.js'; import { DATA_TYPE_STRING } from '../vdxf'; import { SerializableEntity } from '../utils/types/SerializableEntity'; import varint from '../utils/varint'; +import { isHexString } from '../utils/string'; +import { CurrencyValueMap } from './CurrencyValueMap'; +import { Rating } from './Rating'; +import { TransferDestination } from './TransferDestination'; +import { ContentMultiMapRemove } from './ContentMultiMapRemove'; +import { CrossChainDataRef } from './CrossChainDataRef'; +import { SignatureData } from './SignatureData'; +import { DataDescriptor } from './DataDescriptor'; +import { MMRDescriptor } from './MMRDescriptor'; +import { BufferDataVdxfObject } from '../index'; +import * as VDXF_Data from '../vdxf/vdxfdatakeys'; export const VDXF_UNI_VALUE_VERSION_INVALID = new BN(0, 10); export const VDXF_UNI_VALUE_VERSION_CURRENT = new BN(1, 10); @@ -55,7 +66,7 @@ export class VdxfUniValue implements SerializableEntity { toBuffer() { const writer = new BufferWriter(Buffer.alloc(this.getByteLength())); - for (const key of this.values.keys()) { + for (const key of this.values.keys()) { const value = this.values.get(key); writer.writeSlice(fromBase58Check(key).hash) writer.writeVarInt(this.version); @@ -83,7 +94,7 @@ export class VdxfUniValue implements SerializableEntity { try { return toBase58Check(reader.readSlice(20), I_ADDR_VERSION); - } catch(e) { + } catch (e) { return null; } } @@ -131,4 +142,439 @@ export class VdxfUniValue implements SerializableEntity { return ret; } + + static vectorEncodeVDXFUni = (obj): Buffer => { + let ss = Buffer.from(''); + + if (typeof (obj) != 'object') { + if (typeof (obj) != 'string') throw new Error('VectorEncodeVDXFUni: not JSON string as expected'); + if (isHexString(obj)) { + return Buffer.from(obj, "hex"); + } + return Buffer.from(obj, "utf-8"); + } + + if (obj.serializedHex) { + if (!isHexString(obj.serializedHex)) { + throw new Error("contentmap: If the \"serializedhex\" key is present, it's data must be only valid hex and complete"); + } + return Buffer.from(obj.serializedHex); + } + + if (obj.serializedBase64) { + try { + return Buffer.from(obj.serializedBase64, 'base64'); + } catch (e) { + throw new Error("contentmap: If the \"serializedBase64\" key is present, it's data must be only valid base64 and complete"); + } + } + + if (obj.message) { + return Buffer.from(obj.message, "utf-8"); + } + + // this should be an object with "vdxfkey" as the key and {object} as the json object to serialize + const oneValKeys = Object.keys(obj); + const oneValValues = Object.values(obj); + + for (let k = 0; k < oneValKeys.length; k++) { + const objTypeKey = oneValKeys[k]; + if (objTypeKey == VDXF_Data.DataByteKey.vdxfid) { + const oneByte = Buffer.from(oneValValues[k] as string, "hex"); + if (oneByte.length != 1) { + throw new Error("contentmap: byte data must be exactly one byte"); + } + ss = Buffer.concat([ss, oneByte]); + } + else if (objTypeKey == VDXF_Data.DataInt16Key.vdxfid) { + const oneShort = Buffer.alloc(2); + oneShort.writeInt16LE(oneValValues[k] as number); + ss = Buffer.concat([ss, oneShort]); + } + else if (objTypeKey == VDXF_Data.DataUint16Key.vdxfid) { + const oneUShort = Buffer.alloc(2); + oneUShort.writeUInt16LE(oneValValues[k] as number); + ss = Buffer.concat([ss, oneUShort]); + } + else if (objTypeKey == VDXF_Data.DataInt32Key.vdxfid) { + const oneInt = Buffer.alloc(4); + oneInt.writeInt32LE(oneValValues[k] as number); + ss = Buffer.concat([ss, oneInt]); + + } + else if (objTypeKey == VDXF_Data.DataUint32Key.vdxfid) { + const oneUInt = Buffer.alloc(4); + oneUInt.writeUInt32LE(oneValValues[k] as number); + ss = Buffer.concat([ss, oneUInt]); + } + else if (objTypeKey == VDXF_Data.DataInt64Key.vdxfid) { + const oneInt64 = Buffer.alloc(8); + oneInt64.writeIntLE(oneValValues[k] as number, 0, 8); + ss = Buffer.concat([ss, oneInt64]); + } + else if (objTypeKey == VDXF_Data.DataUint160Key.vdxfid) { + const oneKey = fromBase58Check(oneValValues[k] as string).hash; + ss = Buffer.concat([ss, oneKey]); + } + else if (objTypeKey == VDXF_Data.DataUint256Key.vdxfid) { + const oneHash = Buffer.from(oneValValues[k] as string, "hex"); + if (oneHash.length != 32) { + throw new Error("contentmap: hash data must be exactly 32 bytes"); + } + ss = Buffer.concat([ss, oneHash.reverse()]); + } + else if (objTypeKey == VDXF_Data.DataStringKey.vdxfid) { + + let length = 20; + length += 1; + const encodedLength = varuint.encodingLength(Buffer.from(oneValValues[k] as string, "utf-8").length) + length += varuint.encodingLength(encodedLength + Buffer.from(oneValValues[k] as string, "utf-8").length); + length += encodedLength; + length += Buffer.from(oneValValues[k] as string, "utf-8").length; + + const writer = new BufferWriter(Buffer.alloc(length)); + + writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeVarInt(new BN(1)); + writer.writeCompactSize(encodedLength + Buffer.from(oneValValues[k] as string, "utf-8").length); + writer.writeVarSlice(Buffer.from(oneValValues[k] as string, "utf-8")); + + ss = Buffer.concat([ss, writer.buffer]); + } + else if (objTypeKey == VDXF_Data.DataByteVectorKey.vdxfid) { + + let length = 20; + length += 1; + const encodedLength = varuint.encodingLength(Buffer.from(oneValValues[k] as string, "hex").length) + length += varuint.encodingLength(encodedLength + Buffer.from(oneValValues[k] as string, "hex").length); + length += encodedLength; + length += Buffer.from(oneValValues[k] as string, "hex").length; + + const writer = new BufferWriter(Buffer.alloc(length)); + + writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeVarInt(new BN(1)); + writer.writeCompactSize(encodedLength + Buffer.from(oneValValues[k] as string, "hex").length); + writer.writeVarSlice(Buffer.from(oneValValues[k] as string, "hex")); + + ss = Buffer.concat([ss, writer.buffer]); + + } + else if (objTypeKey == VDXF_Data.DataCurrencyMapKey.vdxfid) { + + const destinations = Object.keys(oneValValues[k]); + const values = Object.values(oneValValues[k]); + + const oneCurMap = new CurrencyValueMap({ value_map: new Map(destinations.map((key, index) => [key, new BN(values[index])])), multivalue: true }); + + let length = 20; + length += 1; + length += varuint.encodingLength(oneCurMap.getByteLength()); + length += oneCurMap.getByteLength(); + + const writer = new BufferWriter(Buffer.alloc(length)); + + writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeVarInt(new BN(1)); + writer.writeCompactSize(oneCurMap.getByteLength()); + writer.writeSlice(oneCurMap.toBuffer()); + + ss = Buffer.concat([ss, writer.buffer]); + + } + else if (objTypeKey == VDXF_Data.DataRatingsKey.vdxfid) { + + const version = new BN((oneValValues[k] as { version: number }).version); + const trust_level = new BN((oneValValues[k] as { trust_level: number }).trust_level); + + const destinations = Object.keys((oneValValues[k] as { rating: BigNumber }).rating); + const values = Object.values(oneValValues[k]); + + const oneRatingMap = new Rating({ ratings: new Map(destinations.map((key, index) => [key, Buffer.from(values[index], 'hex')])), version, trust_level }); + + let length = 20; + length += varint.encodingLength(oneRatingMap.version); + length += varuint.encodingLength(oneRatingMap.getByteLength()); + length += oneRatingMap.getByteLength(); + + const writer = new BufferWriter(Buffer.alloc(length)); + + writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeVarInt(oneRatingMap.version); + writer.writeCompactSize(oneRatingMap.getByteLength()); + writer.writeSlice(oneRatingMap.toBuffer()); + + ss = Buffer.concat([ss, writer.buffer]); + + } + else if (objTypeKey == VDXF_Data.DataTransferDestinationKey.vdxfid) { + + const transferDest = new TransferDestination(oneValValues[k]); + + let length = 20; + length += varint.encodingLength(transferDest.typeNoFlags()); + length += varuint.encodingLength(transferDest.getByteLength()); + length += transferDest.getByteLength(); + + const writer = new BufferWriter(Buffer.alloc(length)); + + writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeVarInt(transferDest.typeNoFlags()); + writer.writeCompactSize(transferDest.getByteLength()); + writer.writeSlice(transferDest.toBuffer()); + + ss = Buffer.concat([ss, writer.buffer]); + + } + else if (objTypeKey == VDXF_Data.ContentMultiMapRemoveKey.vdxfid) { + + const transferDest = new ContentMultiMapRemove(oneValValues[k]); + + let length = 20; + length += varint.encodingLength(transferDest.version); + length += varuint.encodingLength(transferDest.getByteLength()); + length += transferDest.getByteLength(); + + const writer = new BufferWriter(Buffer.alloc(length)); + + writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeVarInt(transferDest.version); + writer.writeCompactSize(transferDest.getByteLength()); + writer.writeSlice(transferDest.toBuffer()); + + ss = Buffer.concat([ss, writer.buffer]); + + } + else if (objTypeKey == VDXF_Data.CrossChainDataRefKey.vdxfid) { + + const transferDest = new CrossChainDataRef(oneValValues[k]); + + let length = 20; + length += varint.encodingLength(VDXF_OBJECT_DEFAULT_VERSION); + length += varuint.encodingLength(transferDest.getByteLength()); + length += transferDest.getByteLength(); + + const writer = new BufferWriter(Buffer.alloc(length)); + + writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeVarInt(VDXF_OBJECT_DEFAULT_VERSION); + writer.writeCompactSize(transferDest.getByteLength()); + writer.writeSlice(transferDest.toBuffer()); + + ss = Buffer.concat([ss, writer.buffer]); + + } + else if (objTypeKey == VDXF_Data.DataDescriptorKey.vdxfid) { + + const descr = DataDescriptor.fromJson(oneValValues[k]); + + let length = 20; + length += varint.encodingLength(descr.version); + length += varuint.encodingLength(descr.getByteLength()); + length += descr.getByteLength(); + + const writer = new BufferWriter(Buffer.alloc(length)); + + writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeVarInt(descr.version); + writer.writeCompactSize(descr.getByteLength()); + writer.writeSlice(descr.toBuffer()); + + ss = Buffer.concat([ss, writer.buffer]); + + } + else if (objTypeKey == VDXF_Data.MMRDescriptorKey.vdxfid) { + + const descr = MMRDescriptor.fromJson(oneValValues[k]); + + let length = 20; + length += varint.encodingLength(descr.version); + length += varuint.encodingLength(descr.getByteLength()); + length += descr.getByteLength(); + + const writer = new BufferWriter(Buffer.alloc(length)); + + writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeVarInt(descr.version); + writer.writeCompactSize(descr.getByteLength()); + writer.writeSlice(descr.toBuffer()); + + ss = Buffer.concat([ss, writer.buffer]); + + } + else if (objTypeKey == VDXF_Data.SignatureDataKey.vdxfid) { + + const sigData = SignatureData.fromJson(oneValValues[k]); + + let length = 20; + length += varint.encodingLength(sigData.version); + length += varuint.encodingLength(sigData.getByteLength()); + length += sigData.getByteLength(); + + const writer = new BufferWriter(Buffer.alloc(length)); + writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeVarInt(sigData.version); + writer.writeCompactSize(sigData.getByteLength()); + writer.writeSlice(sigData.toBuffer()); + + ss = Buffer.concat([ss, writer.buffer]); + + } + else { + throw new Error("contentmap invalid or unrecognized vdxfkey for object type: " + oneValValues[k]); + } + } + return ss; + } + + + static VDXFDataToUniValue = (buffer: Buffer, offset: number = 0, pSuccess = null) => { + const reader = new BufferReader(buffer, offset); + let objectUni: any; + try { + let checkVal: string; + let version = new BN(0); + let objSize = 0; + checkVal = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + + if (checkVal == VDXF_Data.DataCurrencyMapKey.vdxfid) { + const oneCurrencyMap = new CurrencyValueMap(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = oneCurrencyMap.fromBuffer(reader.buffer, reader.offset); + if (oneCurrencyMap.isValid()) { + objectUni = { [checkVal]: oneCurrencyMap.toJson() }; + } + } + else if (checkVal == VDXF_Data.DataRatingsKey.vdxfid) { + const oneRatingObj = new Rating(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = oneRatingObj.fromBuffer(reader.buffer, reader.offset); + if (oneRatingObj.isValid()) { + objectUni = { [checkVal]: oneRatingObj.toJson() }; + } + } + else if (checkVal == VDXF_Data.DataTransferDestinationKey.vdxfid) { + const oneTransferDest = new TransferDestination(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = oneTransferDest.fromBuffer(reader.buffer, reader.offset); + if (oneTransferDest.isValid()) { + objectUni = { [checkVal]: oneTransferDest.toJson() }; + } + } + else if (checkVal == VDXF_Data.ContentMultiMapRemoveKey.vdxfid) { + throw new Error("ContentMultiMapRemoveKey not implemented"); + // TODO: Implement ContentMultiMapRemoveKey + + // CContentMultiMapRemove oneContentRemove; + // ss >> VARINT(version); + // ss >> COMPACTSIZE(objSize); + // ss >> oneContentRemove; + // if (oneContentRemove.isValid()) + // { + // objectUni = UniValue(UniValue::VOBJ); + // objectUni.pushKV(EncodeDestination(CIdentityID(checkVal)), oneContentRemove.ToUniValue()); + // } + } + else if (checkVal == VDXF_Data.DataStringKey.vdxfid) { + let stringVal: string; + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + stringVal = reader.readVarSlice.toString(); + objectUni = { [checkVal]: stringVal }; + } + else if (checkVal == VDXF_Data.DataByteVectorKey.vdxfid) { + let vecVal: Buffer; + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + vecVal = reader.readVarSlice(); + objectUni = { [checkVal]: vecVal.toString('hex') }; + } + else if (checkVal == VDXF_Data.CrossChainDataRefKey.vdxfid) { + const dataRef = new CrossChainDataRef(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = dataRef.fromBuffer(reader.buffer, reader.offset); + if (dataRef.isValid()) { + objectUni = { [checkVal]: dataRef.toJson() }; + } + } + else if (checkVal == VDXF_Data.DataDescriptorKey.vdxfid) { + const dataDescriptor = new DataDescriptor(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); + if (dataDescriptor.isValid()) { + objectUni = { [checkVal]: dataDescriptor.toJson() }; + } + } + else if (checkVal == VDXF_Data.MMRDescriptorKey.vdxfid) { + const mmrDescriptor = new MMRDescriptor(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = mmrDescriptor.fromBuffer(reader.buffer, reader.offset); + if (mmrDescriptor.isValid()) { + objectUni = { [checkVal]: mmrDescriptor.toJson() }; + } + } + else if (checkVal == VDXF_Data.SignatureDataKey.vdxfid) { + const sigData = new SignatureData(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = sigData.fromBuffer(reader.buffer, reader.offset); + if (sigData.isValid()) { + objectUni = { [checkVal]: sigData.toJson() }; + } + } + + // if we have an object that we recognized, encode it + if (objectUni) { + if (pSuccess != null) { + pSuccess.value = true; + } + } + else { + if (pSuccess != null) { + pSuccess.value = false; + } + } + } + catch (e) { + if (pSuccess != null) { + pSuccess.value = false; + } + } + return { objectUni, offset: reader.offset, pSuccess }; + } + + static VDXFDataToUniValueArray = (buffer: Buffer, offset: number = 0) => { + let entryArr = []; + const reader = new BufferReader(buffer, offset); + let bytesLeft = buffer.length; + + while (bytesLeft > 20) // size of uint160 + { + let objOut = { value: false }; + const { objectUni, offset } = VdxfUniValue.VDXFDataToUniValue(reader.buffer, reader.offset, objOut); + reader.offset = offset; + bytesLeft = buffer.length - reader.offset; + if (objOut.value) { + entryArr.push(objectUni); + } + else { + // add the remaining data as a hex string + reader.offset = reader.offset - 20; + entryArr.push(reader.readSlice(bytesLeft + 20).toString('hex')); + bytesLeft = 0; + break; + } + } + if (bytesLeft && bytesLeft <= 20) { + entryArr.push(reader.readSlice(bytesLeft).toString('hex')); + } + return entryArr.length == 0 ? null : (entryArr.length == 1 ? entryArr[0] : entryArr); + + } } \ No newline at end of file diff --git a/src/utils/IdentityData.ts b/src/utils/IdentityData.ts index 2b0ecc7..a006c5c 100644 --- a/src/utils/IdentityData.ts +++ b/src/utils/IdentityData.ts @@ -1,9 +1,9 @@ -import * as identitykeys from '../vdxf/identityDataKeys'; +import * as identitykeys from '../vdxf/identitydatakeys'; import * as keylist from '../vdxf/keys'; -import * as VDXF_Data from '../vdxf/vdxfDataKeys'; +import * as VDXF_Data from '../vdxf/vdxfdatakeys'; -export const friendlyName = (vdxfkey) => { +export const getFriendlyNameForVdxfKey = (vdxfkey) => { if (vdxfkey in IdentityVdxfidMap) { @@ -14,7 +14,7 @@ export const friendlyName = (vdxfkey) => { } } -export const getIdentityDataType = (vdxfkey) => { +export const getIdentityDataTypeForVdxfKey = (vdxfkey) => { if (vdxfkey in IdentityVdxfidMap) { @@ -26,148 +26,148 @@ export const getIdentityDataType = (vdxfkey) => { } export const IdentityVdxfidMap = { - [identitykeys.IDENTITY_FIRSTNAME.vdxfid]: { name: "First Name", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_LASTNAME.vdxfid]: { name: "Last Name", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_NATIONALITY.vdxfid]: { name: "Nationality", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_ATTESTOR.vdxfid]: { name: "Attestor ID", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_ATTESTATION_RECIPIENT.vdxfid]: { name: "Attestation Recipient", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_PHONENUMBER.vdxfid]: { name: "Phone Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_OVER18.vdxfid]: { name: "Over 18", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITY_OVER21.vdxfid]: { name: "Over 21", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITY_OVER25.vdxfid]: { name: "Over 25", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITY_EMAIL.vdxfid]: { name: "Email Address", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_HOMEADDRESS.vdxfid]: { name: "Home address", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITY_HOMEADDRESS_STREET1.vdxfid]: { name: "Street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_HOMEADDRESS_STREET2.vdxfid]: { name: "Street 2", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_HOMEADDRESS_CITY.vdxfid]: { name: "City", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_HOMEADDRESS_REGION.vdxfid]: { name: "Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_HOMEADDRESS_POSTCODE.vdxfid]: { name: "Post Code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_HOMEADDRESS_COUNTRY.vdxfid]: { name: "Country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_IDNUMBER_VALUE.vdxfid]: { name: "ID Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_IDNUMBER_TYPE.vdxfid]: { name: "ID Type", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_VERIFICATION_STATUS.vdxfid]: { name: "Verification Status", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_ACCEPTEDTOS.vdxfid]: { name: "Accepted Terms and Conditions", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_VERIFIEDSMS.vdxfid]: { name: "SMS Verified", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_KYCCHECKED.vdxfid]: { name: "KYC Checked ok", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_DOCUMENTSVERIFIED.vdxfid]: { name: "Documents Verified", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_SELFIECHECKED.vdxfid]: { name: "Selfie Checked", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_WATCHLISTOK.vdxfid]: { name: "Watchlist ok", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Riskcheck ok", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITY_DRIVINGLICENCE.vdxfid]: { name: "Driving Licence", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ORIGINALFRONT.vdxfid]: { name: "Driving Licence Front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ORIGINALBACK.vdxfid]: { name: "Driving Licence Back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_CROPPEDFRONT.vdxfid]: { name: "Driving Licence Front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_CROPPEDBACK.vdxfid]: { name: "Driving Licence Back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_FACE.vdxfid]: { name: "Driving Licence Face", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_IDNUMBER.vdxfid]: { name: "Driving Licence Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_CATEGORY.vdxfid]: { name: "Driving Licence Catagory", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_EXPIRATIONDATE.vdxfid]: { name: "Driving Licence expiry date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ISSUINGCOUNTRY.vdxfid]: { name: "Driving Licence issuing country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ISSUINGREGION.vdxfid]: { name: "Driving Licence issuing region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_DATEOFBIRTH.vdxfid]: { name: "Driving Licence Date of Birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_STREET1.vdxfid]: { name: "Driving Licence Street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_CITY.vdxfid]: { name: "Driving Licence City", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_REGION.vdxfid]: { name: "Driving Licence Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_POSTCODE.vdxfid]: { name: "Driving Licence ZIP/Post Code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_COUNTRY.vdxfid]: { name: "Driving Licence Country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_SELFIECHECK_IMAGE.vdxfid]: { name: "Selfie Check image", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_SELFIECHECK_VIDEO.vdxfid]: { name: "Selfie Check video", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Risk Check Ok", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_EMAIL_ISDELIVERABLE.vdxfid]: { name: "Email address is deliverable", type: VDXF_Data.DataByteKeyName() }, - [identitykeys.IDENTITY_EMAIL_BREACHCOUNT.vdxfid]: { name: "Email breach count", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_EMAIL_FIRSTBREACHEDAT.vdxfid]: { name: "Email first breach date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_EMAIL_LASTBREACHEDAT.vdxfid]: { name: "Email last breach date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_EMAIL_DOMAIN_REGISTEREDAT.vdxfid]: { name: "Email domain registered at", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_EMAIL_DOMAIN_FREEPROVIDER.vdxfid]: { name: "Email is free provider", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_EMAIL_DOMAIN_CUSTOM.vdxfid]: { name: "Email Domain is custom", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_EMAIL_DOMAIN_DISPOSABLE.vdxfid]: { name: "Email Domain Disposable", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS.vdxfid]: { name: "Email top level Domain Suspicious", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_IDCARD.vdxfid]: { name: "ID Card", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITY_IDCARD_ORIGINALFRONT.vdxfid]: { name: "ID Card Front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_IDCARD_ORIGINALBACK.vdxfid]: { name: "ID Card Back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_IDCARD_CROPPEDFRONT.vdxfid]: { name: "ID Card Front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_IDCARD_CROPPEDBACK.vdxfid]: { name: "ID Card Back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_IDCARD_FACE.vdxfid]: { name: "ID Card Face", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_IDCARD_IDNUMBER.vdxfid]: { name: "ID Card ID Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_IDCARD_CATEGORY.vdxfid]: { name: "ID Card Category", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_IDCARD_EXPIRATIONDATE.vdxfid]: { name: "ID Card Expiry date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_IDCARD_ISSUINGREGION.vdxfid]: { name: "ID Card Issuing Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_IDCARD_DATEOFBIRTH.vdxfid]: { name: "ID Card Date of Birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_IDCARD_ADDRESS_STREET1.vdxfid]: { name: "ID Card Street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_IDCARD_ADDRESS_CITY.vdxfid]: { name: "ID Card City", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_IDCARD_ADDRESS_REGION.vdxfid]: { name: "ID Card Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_IDCARD_ADDRESS_POSTCODE.vdxfid]: { name: "ID Card Zip/Post Code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_IDCARD_ADDRESS_COUNTRY.vdxfid]: { name: "ID Card Country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_PASSPORT.vdxfid]: { name: "Passport", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITY_PASSPORT_ORIGINALFRONT.vdxfid]: { name: "Passport front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_PASSPORT_ORIGINALBACK.vdxfid]: { name: "Passport back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_PASSPORT_CROPPEDFRONT.vdxfid]: { name: "Passport front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_PASSPORT_CROPPEDBACK.vdxfid]: { name: "Passport back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_PASSPORT_FACE.vdxfid]: { name: "Passport face", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_PASSPORT_IDNUMBER.vdxfid]: { name: "Passport ID Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_PASSPORT_CATEGORY.vdxfid]: { name: "Passport Category", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_PASSPORT_EXPIRATIONDATE.vdxfid]: { name: "Passport expiry date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_PASSPORT_DATEOFBIRTH.vdxfid]: { name: "Passport date of birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_PASSPORT_ADDRESS_STREET1.vdxfid]: { name: "Passport street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_PASSPORT_ADDRESS_CITY.vdxfid]: { name: "Passport city", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_PASSPORT_ADDRESS_REGION.vdxfid]: { name: "Passport region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_PASSPORT_ADDRESS_POSTCODE.vdxfid]: { name: "Passport zip/post code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_PASSPORT_ADDRESS_COUNTRY.vdxfid]: { name: "Passport country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT.vdxfid]: { name: "Residence Permit", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ORIGINALFRONT.vdxfid]: { name: "Residence Permit front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ORIGINALBACK.vdxfid]: { name: "Residence Permit back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_CROPPEDFRONT.vdxfid]: { name: "Residence Permit front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_CROPPEDBACK.vdxfid]: { name: "Residence Permit back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_FACE.vdxfid]: { name: "Residence Permit face", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_IDNUMBER.vdxfid]: { name: "Residence Permit ID Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_CATEGORY.vdxfid]: { name: "Residence Permit category", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_EXPIRATIONDATE.vdxfid]: { name: "Residence Permit expiry date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ISSUINGREGION.vdxfid]: { name: "Residence Permit issuing region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_DATEOFBIRTH.vdxfid]: { name: "Residence Permit date of birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS.vdxfid]: { name: "Residence Permit Address", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_STREET1.vdxfid]: { name: "Residence Permit Street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_CITY.vdxfid]: { name: "Residence Permit City", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_REGION.vdxfid]: { name: "Residence Permit Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_POSTCODE.vdxfid]: { name: "Residence Permit Zip/Post code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_COUNTRY.vdxfid]: { name: "Residence Permit Country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENTCARD.vdxfid]: { name: "Resident Card", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITY_RESIDENTCARD_ORIGINALFRONT.vdxfid]: { name: "Resident Card Front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_RESIDENTCARD_ORIGINALBACK.vdxfid]: { name: "Resident Card Back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_RESIDENTCARD_CROPPEDFRONT.vdxfid]: { name: "Resident Card Front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_RESIDENTCARD_CROPPEDBACK.vdxfid]: { name: "Resident Card Back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_RESIDENTCARD_FACE.vdxfid]: { name: "Resident Card Face", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_RESIDENTCARD_IDNUMBER.vdxfid]: { name: "Resident Card ID Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENTCARD_CATEGORY.vdxfid]: { name: "Resident Card Category", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENTCARD_EXPIRATIONDATE.vdxfid]: { name: "Resident Card Expiry Date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENTCARD_ISSUINGREGION.vdxfid]: { name: "Resident Card Issuing Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENTCARD_DATEOFBIRTH.vdxfid]: { name: "Resident Card date of birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_STREET1.vdxfid]: { name: "Resident Card Street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_CITY.vdxfid]: { name: "Resident Card City", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_REGION.vdxfid]: { name: "Resident Card Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_POSTCODE.vdxfid]: { name: "Resident Card Zip/Post Code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_COUNTRY.vdxfid]: { name: "Resident Card Country", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_VISA.vdxfid]: { name: "Visa", type: VDXF_Data.DataUint160Key() }, - [identitykeys.IDENTITY_VISA_ORIGINALFRONT.vdxfid]: { name: "Visa front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_VISA_ORIGINALBACK.vdxfid]: { name: "Visa back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_VISA_CROPPEDFRONT.vdxfid]: { name: "Visa front", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_VISA_CROPPEDBACK.vdxfid]: { name: "Visa back", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_VISA_FACE.vdxfid]: { name: "Visa face", type: VDXF_Data.DataURLKeyName() }, - [identitykeys.IDENTITY_VISA_IDNUMBER.vdxfid]: { name: "Visa ID Number", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_VISA_CATEGORY.vdxfid]: { name: "Visa Category", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_VISA_EXPIRATIONDATE.vdxfid]: { name: "Visa expiry date", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_VISA_ISSUINGREGION.vdxfid]: { name: "Visa issuing region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_VISA_DATEOFBIRTH.vdxfid]: { name: "Visa date of birth", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_VISA_ADDRESS_STREET1.vdxfid]: { name: "Visa Street 1", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_VISA_ADDRESS_CITY.vdxfid]: { name: "Visa City", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_VISA_ADDRESS_REGION.vdxfid]: { name: "Visa Region", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_VISA_ADDRESS_POSTCODE.vdxfid]: { name: "Visa Zip/Post Code", type: VDXF_Data.DataStringKey() }, - [identitykeys.IDENTITY_VISA_ADDRESS_COUNTRY.vdxfid]: { name: "Visa Country", type: VDXF_Data.DataStringKey() }, - [keylist.ATTESTATION_PROVISION_TYPE.vdxfid]: { name: "Attestation Type", type: VDXF_Data.DataStringKey() }, - [keylist.ATTESTATION_PROVISION_URL.vdxfid]: { name: "Attestation URL", type: VDXF_Data.DataURLKeyName() }, - [keylist.ATTESTATION_VIEW_RESPONSE.vdxfid]: { name: "Attestation View Response", type: VDXF_Data.DataStringKey()}, - [keylist.ATTESTATION_VIEW_REQUEST.vdxfid]: { name: "Attestation View Response", type: VDXF_Data.DataStringKey()}, - [keylist.PROFILE_DATA_VIEW_REQUEST.vdxfid]: { name: "Profile Data View Request", type: VDXF_Data.DataStringKey()}, - [keylist.IDENTITY_SIGNDATA_REQUEST.vdxfid]: { name: "Identity Sign Data Request", type: VDXF_Data.DataStringKey()}, + [identitykeys.IDENTITY_FIRSTNAME.vdxfid]: { name: "First Name", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_LASTNAME.vdxfid]: { name: "Last Name", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_NATIONALITY.vdxfid]: { name: "Nationality", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_ATTESTOR.vdxfid]: { name: "Attestor ID", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_ATTESTATION_RECIPIENT.vdxfid]: { name: "Attestation Recipient", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_PHONENUMBER.vdxfid]: { name: "Phone Number", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_OVER18.vdxfid]: { name: "Over 18", type: VDXF_Data.DataByteKeyName }, + [identitykeys.IDENTITY_OVER21.vdxfid]: { name: "Over 21", type: VDXF_Data.DataByteKeyName }, + [identitykeys.IDENTITY_OVER25.vdxfid]: { name: "Over 25", type: VDXF_Data.DataByteKeyName }, + [identitykeys.IDENTITY_EMAIL.vdxfid]: { name: "Email Address", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_HOMEADDRESS.vdxfid]: { name: "Home address", type: VDXF_Data.DataUint160Key }, + [identitykeys.IDENTITY_HOMEADDRESS_STREET1.vdxfid]: { name: "Street 1", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_HOMEADDRESS_STREET2.vdxfid]: { name: "Street 2", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_HOMEADDRESS_CITY.vdxfid]: { name: "City", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_HOMEADDRESS_REGION.vdxfid]: { name: "Region", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_HOMEADDRESS_POSTCODE.vdxfid]: { name: "Post Code", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_HOMEADDRESS_COUNTRY.vdxfid]: { name: "Country", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_IDNUMBER_VALUE.vdxfid]: { name: "ID Number", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_IDNUMBER_TYPE.vdxfid]: { name: "ID Type", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_VERIFICATION_STATUS.vdxfid]: { name: "Verification Status", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_ACCEPTEDTOS.vdxfid]: { name: "Accepted Terms and Conditions", type: VDXF_Data.DataByteKeyName }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_VERIFIEDSMS.vdxfid]: { name: "SMS Verified", type: VDXF_Data.DataByteKeyName }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_KYCCHECKED.vdxfid]: { name: "KYC Checked ok", type: VDXF_Data.DataByteKeyName }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_DOCUMENTSVERIFIED.vdxfid]: { name: "Documents Verified", type: VDXF_Data.DataByteKeyName }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_SELFIECHECKED.vdxfid]: { name: "Selfie Checked", type: VDXF_Data.DataByteKeyName }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_WATCHLISTOK.vdxfid]: { name: "Watchlist ok", type: VDXF_Data.DataByteKeyName }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Riskcheck ok", type: VDXF_Data.DataByteKeyName }, + [identitykeys.IDENTITY_DRIVINGLICENCE.vdxfid]: { name: "Driving Licence", type: VDXF_Data.DataUint160Key }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ORIGINALFRONT.vdxfid]: { name: "Driving Licence Front", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ORIGINALBACK.vdxfid]: { name: "Driving Licence Back", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_DRIVINGLICENCE_CROPPEDFRONT.vdxfid]: { name: "Driving Licence Front", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_DRIVINGLICENCE_CROPPEDBACK.vdxfid]: { name: "Driving Licence Back", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_DRIVINGLICENCE_FACE.vdxfid]: { name: "Driving Licence Face", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_DRIVINGLICENCE_IDNUMBER.vdxfid]: { name: "Driving Licence Number", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_DRIVINGLICENCE_CATEGORY.vdxfid]: { name: "Driving Licence Catagory", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_DRIVINGLICENCE_EXPIRATIONDATE.vdxfid]: { name: "Driving Licence expiry date", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ISSUINGCOUNTRY.vdxfid]: { name: "Driving Licence issuing country", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ISSUINGREGION.vdxfid]: { name: "Driving Licence issuing region", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_DRIVINGLICENCE_DATEOFBIRTH.vdxfid]: { name: "Driving Licence Date of Birth", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_STREET1.vdxfid]: { name: "Driving Licence Street 1", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_CITY.vdxfid]: { name: "Driving Licence City", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_REGION.vdxfid]: { name: "Driving Licence Region", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_POSTCODE.vdxfid]: { name: "Driving Licence ZIP/Post Code", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_COUNTRY.vdxfid]: { name: "Driving Licence Country", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_SELFIECHECK_IMAGE.vdxfid]: { name: "Selfie Check image", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_SELFIECHECK_VIDEO.vdxfid]: { name: "Selfie Check video", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Risk Check Ok", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_EMAIL_ISDELIVERABLE.vdxfid]: { name: "Email address is deliverable", type: VDXF_Data.DataByteKeyName }, + [identitykeys.IDENTITY_EMAIL_BREACHCOUNT.vdxfid]: { name: "Email breach count", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_EMAIL_FIRSTBREACHEDAT.vdxfid]: { name: "Email first breach date", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_EMAIL_LASTBREACHEDAT.vdxfid]: { name: "Email last breach date", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_EMAIL_DOMAIN_REGISTEREDAT.vdxfid]: { name: "Email domain registered at", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_EMAIL_DOMAIN_FREEPROVIDER.vdxfid]: { name: "Email is free provider", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_EMAIL_DOMAIN_CUSTOM.vdxfid]: { name: "Email Domain is custom", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_EMAIL_DOMAIN_DISPOSABLE.vdxfid]: { name: "Email Domain Disposable", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS.vdxfid]: { name: "Email top level Domain Suspicious", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_IDCARD.vdxfid]: { name: "ID Card", type: VDXF_Data.DataUint160Key }, + [identitykeys.IDENTITY_IDCARD_ORIGINALFRONT.vdxfid]: { name: "ID Card Front", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_IDCARD_ORIGINALBACK.vdxfid]: { name: "ID Card Back", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_IDCARD_CROPPEDFRONT.vdxfid]: { name: "ID Card Front", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_IDCARD_CROPPEDBACK.vdxfid]: { name: "ID Card Back", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_IDCARD_FACE.vdxfid]: { name: "ID Card Face", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_IDCARD_IDNUMBER.vdxfid]: { name: "ID Card ID Number", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_IDCARD_CATEGORY.vdxfid]: { name: "ID Card Category", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_IDCARD_EXPIRATIONDATE.vdxfid]: { name: "ID Card Expiry date", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_IDCARD_ISSUINGREGION.vdxfid]: { name: "ID Card Issuing Region", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_IDCARD_DATEOFBIRTH.vdxfid]: { name: "ID Card Date of Birth", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_IDCARD_ADDRESS_STREET1.vdxfid]: { name: "ID Card Street 1", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_IDCARD_ADDRESS_CITY.vdxfid]: { name: "ID Card City", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_IDCARD_ADDRESS_REGION.vdxfid]: { name: "ID Card Region", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_IDCARD_ADDRESS_POSTCODE.vdxfid]: { name: "ID Card Zip/Post Code", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_IDCARD_ADDRESS_COUNTRY.vdxfid]: { name: "ID Card Country", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_PASSPORT.vdxfid]: { name: "Passport", type: VDXF_Data.DataUint160Key }, + [identitykeys.IDENTITY_PASSPORT_ORIGINALFRONT.vdxfid]: { name: "Passport front", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_PASSPORT_ORIGINALBACK.vdxfid]: { name: "Passport back", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_PASSPORT_CROPPEDFRONT.vdxfid]: { name: "Passport front", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_PASSPORT_CROPPEDBACK.vdxfid]: { name: "Passport back", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_PASSPORT_FACE.vdxfid]: { name: "Passport face", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_PASSPORT_IDNUMBER.vdxfid]: { name: "Passport ID Number", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_PASSPORT_CATEGORY.vdxfid]: { name: "Passport Category", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_PASSPORT_EXPIRATIONDATE.vdxfid]: { name: "Passport expiry date", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_PASSPORT_DATEOFBIRTH.vdxfid]: { name: "Passport date of birth", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_STREET1.vdxfid]: { name: "Passport street 1", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_CITY.vdxfid]: { name: "Passport city", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_REGION.vdxfid]: { name: "Passport region", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_POSTCODE.vdxfid]: { name: "Passport zip/post code", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_COUNTRY.vdxfid]: { name: "Passport country", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENCEPERMIT.vdxfid]: { name: "Residence Permit", type: VDXF_Data.DataUint160Key }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ORIGINALFRONT.vdxfid]: { name: "Residence Permit front", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ORIGINALBACK.vdxfid]: { name: "Residence Permit back", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_CROPPEDFRONT.vdxfid]: { name: "Residence Permit front", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_CROPPEDBACK.vdxfid]: { name: "Residence Permit back", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_FACE.vdxfid]: { name: "Residence Permit face", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_IDNUMBER.vdxfid]: { name: "Residence Permit ID Number", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_CATEGORY.vdxfid]: { name: "Residence Permit category", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_EXPIRATIONDATE.vdxfid]: { name: "Residence Permit expiry date", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ISSUINGREGION.vdxfid]: { name: "Residence Permit issuing region", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_DATEOFBIRTH.vdxfid]: { name: "Residence Permit date of birth", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS.vdxfid]: { name: "Residence Permit Address", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_STREET1.vdxfid]: { name: "Residence Permit Street 1", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_CITY.vdxfid]: { name: "Residence Permit City", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_REGION.vdxfid]: { name: "Residence Permit Region", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_POSTCODE.vdxfid]: { name: "Residence Permit Zip/Post code", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_COUNTRY.vdxfid]: { name: "Residence Permit Country", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENTCARD.vdxfid]: { name: "Resident Card", type: VDXF_Data.DataUint160Key }, + [identitykeys.IDENTITY_RESIDENTCARD_ORIGINALFRONT.vdxfid]: { name: "Resident Card Front", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_RESIDENTCARD_ORIGINALBACK.vdxfid]: { name: "Resident Card Back", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_RESIDENTCARD_CROPPEDFRONT.vdxfid]: { name: "Resident Card Front", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_RESIDENTCARD_CROPPEDBACK.vdxfid]: { name: "Resident Card Back", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_RESIDENTCARD_FACE.vdxfid]: { name: "Resident Card Face", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_RESIDENTCARD_IDNUMBER.vdxfid]: { name: "Resident Card ID Number", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENTCARD_CATEGORY.vdxfid]: { name: "Resident Card Category", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENTCARD_EXPIRATIONDATE.vdxfid]: { name: "Resident Card Expiry Date", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENTCARD_ISSUINGREGION.vdxfid]: { name: "Resident Card Issuing Region", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENTCARD_DATEOFBIRTH.vdxfid]: { name: "Resident Card date of birth", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_STREET1.vdxfid]: { name: "Resident Card Street 1", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_CITY.vdxfid]: { name: "Resident Card City", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_REGION.vdxfid]: { name: "Resident Card Region", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_POSTCODE.vdxfid]: { name: "Resident Card Zip/Post Code", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_COUNTRY.vdxfid]: { name: "Resident Card Country", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_VISA.vdxfid]: { name: "Visa", type: VDXF_Data.DataUint160Key }, + [identitykeys.IDENTITY_VISA_ORIGINALFRONT.vdxfid]: { name: "Visa front", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_VISA_ORIGINALBACK.vdxfid]: { name: "Visa back", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_VISA_CROPPEDFRONT.vdxfid]: { name: "Visa front", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_VISA_CROPPEDBACK.vdxfid]: { name: "Visa back", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_VISA_FACE.vdxfid]: { name: "Visa face", type: VDXF_Data.DataURLKeyName }, + [identitykeys.IDENTITY_VISA_IDNUMBER.vdxfid]: { name: "Visa ID Number", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_VISA_CATEGORY.vdxfid]: { name: "Visa Category", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_VISA_EXPIRATIONDATE.vdxfid]: { name: "Visa expiry date", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_VISA_ISSUINGREGION.vdxfid]: { name: "Visa issuing region", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_VISA_DATEOFBIRTH.vdxfid]: { name: "Visa date of birth", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_VISA_ADDRESS_STREET1.vdxfid]: { name: "Visa Street 1", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_VISA_ADDRESS_CITY.vdxfid]: { name: "Visa City", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_VISA_ADDRESS_REGION.vdxfid]: { name: "Visa Region", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_VISA_ADDRESS_POSTCODE.vdxfid]: { name: "Visa Zip/Post Code", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_VISA_ADDRESS_COUNTRY.vdxfid]: { name: "Visa Country", type: VDXF_Data.DataStringKey }, + [keylist.ATTESTATION_PROVISION_TYPE.vdxfid]: { name: "Attestation Type", type: VDXF_Data.DataStringKey }, + [keylist.ATTESTATION_PROVISION_URL.vdxfid]: { name: "Attestation URL", type: VDXF_Data.DataURLKeyName }, + [keylist.ATTESTATION_VIEW_RESPONSE.vdxfid]: { name: "Attestation View Response", type: VDXF_Data.DataStringKey}, + [keylist.ATTESTATION_VIEW_REQUEST.vdxfid]: { name: "Attestation View Response", type: VDXF_Data.DataStringKey}, + [keylist.PROFILE_DATA_VIEW_REQUEST.vdxfid]: { name: "Profile Data View Request", type: VDXF_Data.DataStringKey}, + [keylist.IDENTITY_SIGNDATA_REQUEST.vdxfid]: { name: "Identity Sign Data Request", type: VDXF_Data.DataStringKey}, }; diff --git a/src/utils/mmr.ts b/src/utils/mmr.ts new file mode 100644 index 0000000..e69abfb --- /dev/null +++ b/src/utils/mmr.ts @@ -0,0 +1,105 @@ +import { BN } from 'bn.js'; + +export const GetMMRProofIndex = (pos: number, mmvSize: number, extraHashes: number): InstanceType => { + let index = new BN(0); + let layerSizes = []; + let merkleSizes = []; + let peakIndexes = []; + let bitPos = 0; + + //start at the beginning + //create a simulation of a mmr based on size + if (!(pos > 0 && pos < mmvSize)) return new BN(0); + + //create an array of all the sizes + while (mmvSize) { + layerSizes.push(mmvSize); + mmvSize = mmvSize >> 1 + } + + for (let height = 0; height < layerSizes.length; height++) { + if (height == layerSizes.length - 1 || layerSizes[height] & 1) { + peakIndexes.push(height); + } + } + + //array flip peak indexes + peakIndexes.reverse(); + + let layerNum = 0; + let layerSize = peakIndexes.length; + + for (let passThrough = (layerSize & 1); layerNum == 0 || layerSize > 1; passThrough = (layerSize & 1), layerNum++) { + layerSize = (layerSize >> 1) + passThrough; + if (layerSize) { + merkleSizes.push(layerSize); + } + } + //flip the merklesizes + + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } + + let p = pos; + for (let l = 0; l < layerSizes.length; l++) { + if (p & 1) { + index = index.or(new BN(1).shln(bitPos++)); + + p >>= 1; + + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } + + } else { + if (layerSizes[l] > (p + 1)) { + + bitPos++; + p >>= 1; + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } + } else { + + for (p = 0; p < peakIndexes.length; p++) { + + if (peakIndexes[p] == l) { + break; + } + } + + for (let layerNum = -1, layerSize = peakIndexes.length; layerNum == -1 || layerSize > 1; layerSize = merkleSizes[++layerNum]) { + + if (p < (layerSize - 1) || (p & 1)) { + + + if (p & 1) { + // hash with the one before us + index = index.or(new BN(1).shln(bitPos++)); + + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } + } else { + // hash with the one in front of us + bitPos++; + + for (let i = 0; i < extraHashes; i++) { + bitPos++; + } + } + } + p >>= 1; + } + + break; + } + + } + } + return index; + } + + + \ No newline at end of file diff --git a/src/vdxf/classes/Attestation.ts b/src/vdxf/classes/Attestation.ts index e9dcffd..d638a4b 100644 --- a/src/vdxf/classes/Attestation.ts +++ b/src/vdxf/classes/Attestation.ts @@ -1,7 +1,7 @@ import bufferutils from '../../utils/bufferutils' import { toBase58Check, fromBase58Check } from '../../utils/address'; import { I_ADDR_VERSION } from '../../constants/vdxf'; -import { DataDescriptor } from './DataDescriptor'; +import { DataDescriptor } from '../../pbaas/DataDescriptor'; import { ATTESTATION_VIEW_REQUEST, ATTESTATION_PROVISION_TYPE } from '../'; import varuint from '../../utils/varuint'; import { BufferDataVdxfObject } from '../index'; diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index 7746bc3..f58b5e9 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -325,10 +325,7 @@ export class Challenge extends VDXFObject implements ChallengeInterface { for (let i = 0; i < requestedAccessLength; i++) { - const _vdxfkey = toBase58Check(reader.buffer.slice(reader.offset, - reader.offset + HASH160_BYTE_LENGTH), - I_ADDR_VERSION); - const _perm = new RequestedPermission(_vdxfkey); + const _perm = new RequestedPermission(); reader.offset = _perm.fromBuffer(reader.buffer, reader.offset); this.requested_access.push(_perm); } diff --git a/src/vdxf/classes/CrossChainDataRef.ts b/src/vdxf/classes/CrossChainDataRef.ts deleted file mode 100644 index 7e76bbb..0000000 --- a/src/vdxf/classes/CrossChainDataRef.ts +++ /dev/null @@ -1,312 +0,0 @@ -import varint from '../../utils/varint' -import varuint from '../../utils/varuint' -import { fromBase58Check, toBase58Check } from "../../utils/address"; -import bufferutils from '../../utils/bufferutils' -import { BN } from 'bn.js'; -import { BigNumber } from '../../utils/types/BigNumber'; -import { I_ADDR_VERSION } from '../../constants/vdxf'; -import { SerializableEntity } from '../../utils/types/SerializableEntity'; - -const { BufferReader, BufferWriter } = bufferutils - -export class CUTXORef implements SerializableEntity { - hash: Buffer; - n: BigNumber; - - constructor(data?: { hash?: Buffer, n?: BigNumber }) { - this.hash = data.hash || Buffer.alloc(0); - this.n = data.n || new BN(0); - } - - getByteLength() { - let byteLength = 0; - - byteLength += 32; // hash uint256 - byteLength += 4; // n uint32 - - return byteLength - } - - toBuffer() { - const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) - - bufferWriter.writeSlice(this.hash); - bufferWriter.writeUInt32(this.n.toNumber()); - - return bufferWriter.buffer - } - - fromBuffer(buffer: Buffer, offset: number = 0) { - const reader = new BufferReader(buffer, offset); - - this.hash = reader.readSlice(32); - this.n = new BN(reader.readUInt32()); - - return reader.offset; - } -} - - -export class PBaaSEvidenceRef implements SerializableEntity { - version: BigNumber; - flags: BigNumber; - output: CUTXORef; - objectNum: BigNumber; - subObject: BigNumber; - systemID: string; - - static FLAG_ISEVIDENCE = new BN(1) - static FLAG_HAS_SYSTEM = new BN(2) - - constructor(data?) { - - if (data) { - Object.assign(this, data) - } - } - - SetFlags() { - this.flags = this.flags.and(PBaaSEvidenceRef.FLAG_ISEVIDENCE); - if (this.systemID && this.systemID.length > 0) { - this.flags = this.flags.or(PBaaSEvidenceRef.FLAG_HAS_SYSTEM); - } - - } - - getByteLength() { - let byteLength = 0; - this.SetFlags(); - - byteLength += varint.encodingLength(this.version); - byteLength += varint.encodingLength(this.flags); - byteLength += this.output.getByteLength(); - byteLength += varint.encodingLength(this.objectNum); - byteLength += varint.encodingLength(this.subObject); - - if (this.flags.and(PBaaSEvidenceRef.FLAG_HAS_SYSTEM).gt(new BN(0))) { - byteLength += 20; - } - - return byteLength - } - - toBuffer() { - const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) - - bufferWriter.writeVarInt(this.version); - bufferWriter.writeVarInt(this.flags); - bufferWriter.writeSlice(this.output.toBuffer()); - bufferWriter.writeVarInt(this.objectNum); - bufferWriter.writeVarInt(this.subObject); - - if (this.flags.and(PBaaSEvidenceRef.FLAG_HAS_SYSTEM).gt(new BN(0))) { - bufferWriter.writeSlice(fromBase58Check(this.systemID).hash); - } - - return bufferWriter.buffer - } - - fromBuffer(buffer: Buffer, offset: number = 0) { - const reader = new BufferReader(buffer, offset); - - this.version = reader.readVarInt(); - this.flags = reader.readVarInt(); - this.output = new CUTXORef(); - offset = this.output.fromBuffer(reader.buffer, reader.offset); - this.objectNum = reader.readVarInt(); - this.subObject = reader.readVarInt(); - - if (this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH).gt(new BN(0))) { - this.systemID = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); - } - - return reader.offset; - } -} - -export class IdentityMultimapRef implements SerializableEntity { - version: BigNumber; - flags: BigNumber; - idID: string; - key: string; - heightStart: BigNumber; - heightEnd: BigNumber; - dataHash: Buffer; - systemID: string; - - static FLAG_NO_DELETION = new BN(1) - static FLAG_HAS_DATAHASH = new BN(2) - static FLAG_HAS_SYSTEM = new BN(4) - - constructor(data?) { - - if (data) { - Object.assign(this, data) - } - } - - SetFlags() { - this.flags = this.flags.and(IdentityMultimapRef.FLAG_NO_DELETION); - if (this.dataHash && this.dataHash.length > 0) { - this.flags = this.flags.or(IdentityMultimapRef.FLAG_HAS_DATAHASH); - } - if (this.systemID && this.systemID.length > 0) { - this.flags = this.flags.or(IdentityMultimapRef.FLAG_HAS_SYSTEM); - } - } - - getByteLength() { - let byteLength = 0; - this.SetFlags(); - - byteLength += varint.encodingLength(this.version); - byteLength += varint.encodingLength(this.flags); - byteLength += 20; // idID uint160 - byteLength += 20; // key uint160 - byteLength += varint.encodingLength(this.heightStart); // heightStart uint32 - byteLength += varint.encodingLength(this.heightEnd); // heightEnd uint32 - byteLength += 32; // dataHash uint25 - - if (this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH).gt(new BN(0))) { - byteLength += 32; - } - - if (this.flags.and(IdentityMultimapRef.FLAG_HAS_SYSTEM).gt(new BN(0))) { - byteLength += 20 - } - return byteLength - } - - toBuffer() { - const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) - - bufferWriter.writeVarInt(this.version); - bufferWriter.writeVarInt(this.flags); - bufferWriter.writeSlice(fromBase58Check(this.idID).hash); - bufferWriter.writeSlice(fromBase58Check(this.key).hash); - bufferWriter.writeVarInt(this.heightStart); - bufferWriter.writeVarInt(this.heightEnd); - - if (this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH).gt(new BN(0))) { - bufferWriter.writeSlice(this.dataHash); - } - if (this.flags.and(IdentityMultimapRef.FLAG_HAS_SYSTEM).gt(new BN(0))) { - bufferWriter.writeSlice(fromBase58Check(this.systemID).hash); - } - - return bufferWriter.buffer - } - - fromBuffer(buffer: Buffer, offset: number = 0) { - const reader = new BufferReader(buffer, offset); - - this.version = reader.readVarInt(); - this.flags = reader.readVarInt(); - this.idID = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); - this.key = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); - this.heightStart = reader.readVarInt(); - this.heightEnd = reader.readVarInt(); - - if (this.flags.and(IdentityMultimapRef.FLAG_HAS_DATAHASH).gt(new BN(0))) { - this.dataHash = reader.readSlice(32); - } - - if (this.flags.and(IdentityMultimapRef.FLAG_HAS_SYSTEM).gt(new BN(0))) { - this.systemID = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); - } - return reader.offset; - } -} - -export class URLRef implements SerializableEntity { - version: BigNumber; - url: string; - constructor(data?: { version?: BigNumber, url?: string }) { - - if (data) { - this.version = data.version || new BN(1, 10); - this.url = data.url || ""; - } - } - - getByteLength() { - let byteLength = 0; - - byteLength += varint.encodingLength(this.version); - byteLength += varuint.encodingLength(Buffer.from(this.url, 'utf8').length); - byteLength += Buffer.from(this.url, 'utf8').length; - if (byteLength > 4096) - throw new Error("URLRef exceeds maximum length of 4096 bytes") - return byteLength - } - - toBuffer() { - const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) - - bufferWriter.writeVarInt(this.version); - bufferWriter.writeVarSlice(Buffer.from(this.url, 'utf8')); - - return bufferWriter.buffer - } - - fromBuffer(buffer: Buffer, offset: number = 0) { - const reader = new BufferReader(buffer, offset); - - this.version = reader.readVarInt(); - this.url = reader.readVarSlice().toString('utf8'); - - return reader.offset; - } -} - -export class CrossChainDataRef implements SerializableEntity { - ref: PBaaSEvidenceRef | IdentityMultimapRef | URLRef; - - static TYPE_CROSSCHAIN_DATAREF = 0; - static TYPE_IDENTITY_DATAREF = 1; - static TYPE_URL_REF = 2; - - constructor(data: PBaaSEvidenceRef | IdentityMultimapRef | URLRef | any) { - this.ref = data || null; - } - - which(): number { - if (this.ref instanceof PBaaSEvidenceRef) { - return CrossChainDataRef.TYPE_CROSSCHAIN_DATAREF; - } else if (this.ref instanceof IdentityMultimapRef) { - return CrossChainDataRef.TYPE_IDENTITY_DATAREF; - } else if (this.ref instanceof URLRef) { - return CrossChainDataRef.TYPE_URL_REF; - } - } - - getByteLength() { - let byteLength = 1; //type uint8 - byteLength += this.ref.getByteLength(); - return byteLength - } - - toBuffer() { - const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) - bufferWriter.writeUInt8(this.which()); - bufferWriter.writeSlice(this.ref.toBuffer()); - return bufferWriter.buffer - } - - fromBuffer(buffer: Buffer, offset: number = 0) { - const reader = new BufferReader(buffer, offset); - - const type = reader.readUInt8(); - - if (type == CrossChainDataRef.TYPE_CROSSCHAIN_DATAREF) { - this.ref = new PBaaSEvidenceRef(); - } else if (type == CrossChainDataRef.TYPE_IDENTITY_DATAREF) { - this.ref = new IdentityMultimapRef(); - } else if (type == CrossChainDataRef.TYPE_URL_REF) { - this.ref = new URLRef(); - } - - offset = this.ref.fromBuffer(buffer, reader.offset); - return reader.offset; - } -} \ No newline at end of file diff --git a/src/vdxf/classes/DataDescriptor.ts b/src/vdxf/classes/DataDescriptor.ts deleted file mode 100644 index 9427436..0000000 --- a/src/vdxf/classes/DataDescriptor.ts +++ /dev/null @@ -1,1020 +0,0 @@ -import { BigNumber } from '../../utils/types/BigNumber'; -import { BN } from 'bn.js'; -import varint from '../../utils/varint' -import varuint from '../../utils/varuint' -import bufferutils from '../../utils/bufferutils' -const { BufferReader, BufferWriter } = bufferutils -import { isHexString } from '../../utils/string'; -import { fromBase58Check, toBase58Check } from '../../utils/address'; -import { CurrencyValueMap } from '../../pbaas/CurrencyValueMap'; -import { Rating } from '../../pbaas/Rating'; -import { TransferDestination } from '../../pbaas/TransferDestination'; -import { ContentMultiMapRemove } from '../../pbaas/ContentMultiMapRemove'; -import { CrossChainDataRef } from './CrossChainDataRef'; -import { VDXF_OBJECT_DEFAULT_VERSION, HASH160_BYTE_LENGTH, I_ADDR_VERSION } from '../../constants/vdxf'; -import { SignatureData } from './SignatureData'; -import { BufferDataVdxfObject } from '../index'; -import * as VDXF_Data from '../vdxfDataKeys'; - -export class DataDescriptor { - - static VERSION_INVALID = new BN(0); - static VERSION_FIRST = new BN(1); - static FIRST_VERSION = new BN(1); - static LAST_VERSION = new BN(1); - static DEFAULT_VERSION = new BN(1); - - static FLAG_ENCRYPTED_DATA = new BN(1); - static FLAG_SALT_PRESENT = new BN(2); - static FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT = new BN(4); - static FLAG_INCOMING_VIEWING_KEY_PRESENT = new BN(8); - static FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT = new BN(0x10); - static FLAG_LABEL_PRESENT = new BN(0x20); - static FLAG_MIME_TYPE_PRESENT = new BN(0x40); - static FLAG_MASK = (DataDescriptor.FLAG_ENCRYPTED_DATA.add( - DataDescriptor.FLAG_SALT_PRESENT).add( - DataDescriptor.FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT).add( - DataDescriptor.FLAG_INCOMING_VIEWING_KEY_PRESENT).add( - DataDescriptor.FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT).add( - DataDescriptor.FLAG_LABEL_PRESENT).add( - DataDescriptor.FLAG_MIME_TYPE_PRESENT)); - - version: BigNumber; - flags: BigNumber; // Flags indicating what items are present in the object - objectdata: Buffer; // either direct data or serialized UTXORef +offset, length, and/or other type of info for different links - label: string; // label associated with this data - mimeType: string; // optional mime type - salt: Buffer; // encryption public key, data only present if encrypted or data referenced by unencrypted link is encrypted - epk: Buffer; // encryption public key, data only present if encrypted or data referenced by unencrypted link is encrypted - ivk: Buffer; // incoming viewing key, optional and contains data only if full viewing key is published at this encryption level - ssk: Buffer; // specific symmetric key, optional and only to decrypt this linked sub-object - - constructor(data?: { - version?: BigNumber, - flags?: BigNumber, - objectdata?: Buffer, - label?: string, - mimeType?: string, - salt?: Buffer, - epk?: Buffer, - ivk?: Buffer, - ssk?: Buffer - }) { - this.flags = new BN(0); - this.version = DataDescriptor.DEFAULT_VERSION; - - if (data != null) { - if (data.flags != null) this.flags = data.flags - if (data.version != null) this.version = data.version - if (data.objectdata != null) this.objectdata = data.objectdata - if (data.label != null) this.label = data.label; - if (data.mimeType != null) this.mimeType = data.mimeType; - if (data.salt != null) this.salt = data.salt; - - if (data.epk != null) this.epk = data.epk; - if (data.ivk != null) this.ivk = data.ivk; - if (data.ssk != null) this.ssk = data.ssk; - - if (this.label && this.label.length > 64) { - this.label = this.label.slice(0, 64); - } - if (this.mimeType && this.mimeType.length > 128) { - this.mimeType = this.mimeType.slice(0, 128); - } - - this.SetFlags(); - - } - } - - static fromJson(data: any): DataDescriptor { - - const newDataDescriptor = new DataDescriptor(); - - if (data != null) { - if (data.flags != null) newDataDescriptor.flags = new BN(data.flags) - if (data.version != null) newDataDescriptor.version = new BN(data.version) - if (data.objectdata != null) newDataDescriptor.objectdata = VectorEncodeVDXFUni(data.objectdata) - if (data.label != null) newDataDescriptor.label = data.label; - if (data.mimetype != null) newDataDescriptor.mimeType = data.mimetype; - if (data.salt != null) newDataDescriptor.salt = Buffer.from(data.salt, 'hex'); - if (data.epk != null) newDataDescriptor.epk = Buffer.from(data.epk, 'hex'); - if (data.ivk != null) newDataDescriptor.ivk = Buffer.from(data.ivk, 'hex'); - if (data.ssk != null) newDataDescriptor.ssk = Buffer.from(data.ssk, 'hex'); - - if (newDataDescriptor.label && newDataDescriptor.label.length > 64) { - newDataDescriptor.label = newDataDescriptor.label.slice(0, 64); - } - if (newDataDescriptor.mimeType && newDataDescriptor.mimeType.length > 128) { - newDataDescriptor.mimeType = newDataDescriptor.mimeType.slice(0, 128); - } - }; - - newDataDescriptor.SetFlags(); - - return newDataDescriptor; - - } - - DecodeHashVector(): Array { - - const vdxfData = new BufferDataVdxfObject(); - vdxfData.fromBuffer(this.objectdata); - const hashes = []; - - if (vdxfData.vdxfkey == VDXF_Data.VectorUint256Key().vdxfid) { - const reader = new BufferReader(Buffer.from(vdxfData.data, 'hex')); - const count = reader.readVarInt(); - for (let i = 0; i < count.toNumber(); i++) { - hashes.push(reader.readSlice(32)); - } - } - return hashes; - - } - - byteLength(): number { - - let length = 0; - - length += varint.encodingLength(this.version); - length += varint.encodingLength(this.flags); - length += varuint.encodingLength(this.objectdata.length); - length += this.objectdata.length; - - if (this.HasLabel()) { - if (this.label.length > 64) { - throw new Error("Label too long"); - } - length += varuint.encodingLength(this.label.length); - length += this.label.length; - } - - if (this.HasMIME()) { - if (this.mimeType.length > 128) { - throw new Error("MIME type too long"); - } - length += varuint.encodingLength(this.mimeType.length); - length += this.mimeType.length; - } - - if (this.HasSalt()) { - length += varuint.encodingLength(this.salt.length); - length += this.salt.length; - } - - if (this.HasEPK()) { - length += varuint.encodingLength(this.epk.length); - length += this.epk.length; - } - - if (this.HasIVK()) { - length += varuint.encodingLength(this.ivk.length); - length += this.ivk.length; - } - - if (this.HasSSK()) { - length += varuint.encodingLength(this.ssk.length); - length += this.ssk.length; - } - return length; - } - - toBuffer(): Buffer { - const writer = new BufferWriter(Buffer.alloc(this.byteLength())); - - writer.writeVarInt(this.version); - writer.writeVarInt(this.flags); - writer.writeVarSlice(this.objectdata); - - if (this.HasLabel()) { - writer.writeVarSlice(Buffer.from(this.label)); - } - - if (this.HasMIME()) { - writer.writeVarSlice(Buffer.from(this.mimeType)); - } - - if (this.HasSalt()) { - writer.writeVarSlice(this.salt); - } - - if (this.HasEPK()) { - writer.writeVarSlice(this.epk); - } - - if (this.HasIVK()) { - writer.writeVarSlice(this.ivk); - } - - if (this.HasSSK()) { - writer.writeVarSlice(this.ssk); - } - - return writer.buffer; - } - - fromBuffer(buffer: Buffer, offset: number = 0): number { - const reader = new BufferReader(buffer, offset); - this.version = reader.readVarInt(); - this.flags = reader.readVarInt(); - this.objectdata = reader.readVarSlice(); - - if (this.HasLabel()) { - this.label = reader.readVarSlice().toString(); - } - - if (this.HasMIME()) { - this.mimeType = reader.readVarSlice().toString(); - } - - if (this.HasSalt()) { - this.salt = reader.readVarSlice(); - } - - if (this.HasEPK()) { - this.epk = reader.readVarSlice(); - } - - if (this.HasIVK()) { - this.ivk = reader.readVarSlice(); - } - - if (this.HasSSK()) { - this.ssk = reader.readVarSlice(); - } - return reader.offset; - - } - - HasEncryptedData(): boolean { - return this.flags.and(DataDescriptor.FLAG_ENCRYPTED_DATA).gt(new BN(0)); - } - - HasSalt(): boolean { - return this.flags.and(DataDescriptor.FLAG_SALT_PRESENT).gt(new BN(0)); - } - - HasEPK(): boolean { - return this.flags.and(DataDescriptor.FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT).gt(new BN(0)); - } - - HasMIME(): boolean { - return this.flags.and(DataDescriptor.FLAG_MIME_TYPE_PRESENT).gt(new BN(0)); - } - - HasIVK(): boolean { - return this.flags.and(DataDescriptor.FLAG_INCOMING_VIEWING_KEY_PRESENT).gt(new BN(0)); - } - - HasSSK(): boolean { - return this.flags.and(DataDescriptor.FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT).gt(new BN(0)); - } - - HasLabel(): boolean { - return this.flags.and(DataDescriptor.FLAG_LABEL_PRESENT).gt(new BN(0)); - } - - CalcFlags(): BigNumber { - return this.flags.and(DataDescriptor.FLAG_ENCRYPTED_DATA).add - (this.label ? DataDescriptor.FLAG_LABEL_PRESENT : new BN(0)).add - (this.mimeType ? DataDescriptor.FLAG_MIME_TYPE_PRESENT : new BN(0)).add - (this.salt ? DataDescriptor.FLAG_SALT_PRESENT : new BN(0)).add - (this.epk ? DataDescriptor.FLAG_ENCRYPTION_PUBLIC_KEY_PRESENT : new BN(0)).add - (this.ivk ? DataDescriptor.FLAG_INCOMING_VIEWING_KEY_PRESENT : new BN(0)).add - (this.ssk ? DataDescriptor.FLAG_SYMMETRIC_ENCRYPTION_KEY_PRESENT : new BN(0)); - } - - SetFlags() { - this.flags = this.CalcFlags(); - } - - isValid(): boolean { - return !!(this.version.gte(DataDescriptor.FIRST_VERSION) && this.version.lte(DataDescriptor.LAST_VERSION) && this.flags.and(DataDescriptor.FLAG_MASK.notn(DataDescriptor.FLAG_MASK.bitLength()))); - } - - toJson() { - - const retval = { - version: this.version.toString(), - flags: this.flags.toString() - }; - - let isText = false; - if (this.mimeType) { - retval['mimetype'] = this.mimeType; - if(this.mimeType.startsWith("text/")) isText = true; - } - - let processedObject = VDXFDataToUniValueArray(this.objectdata) - - if (isText && typeof processedObject === 'string' || processedObject instanceof String) { - - let objectDataUni = {message: Buffer.from(processedObject, 'hex').toString('utf-8')}; - retval['objectdata'] = objectDataUni; - - } else { - retval['objectdata'] = processedObject; - } - - if (this.label) retval['label'] = this.label; - if (this.salt) retval['salt'] = this.salt.toString('hex'); - if (this.epk) retval['epk'] = this.epk.toString('hex'); - if (this.ivk) retval['ivk'] = this.ivk.toString('hex'); - if (this.ssk) retval['ssk'] = this.ssk.toString('hex'); - - return retval; - } - -}; - - -export class VDXFDataDescriptor extends BufferDataVdxfObject { - dataDescriptor: DataDescriptor; - - constructor( dataDescriptor?: DataDescriptor, - vdxfkey: string = "", - version: BigNumber = new BN(1)) { - super("", vdxfkey); - this.version = version; - if (dataDescriptor) { - this.dataDescriptor = dataDescriptor; - } - } - - static fromDataVdfxObject(data: BufferDataVdxfObject): VDXFDataDescriptor { - - const retval = new VDXFDataDescriptor(); - retval.version = data.version; - retval.data = data.data; - retval.fromBuffer(Buffer.from(retval.data, 'hex')); - delete retval.data; - return retval; - - } - dataByteLength(): number { - - let length = 0; - - length += this.dataDescriptor.byteLength(); - - return length; - } - - toDataBuffer(): Buffer { - - return this.dataDescriptor.toBuffer(); - } - - fromDataBuffer(buffer: Buffer, offset?: number): number { - const reader = new bufferutils.BufferReader(buffer, offset); - - this.data = reader.readVarSlice().toString('hex'); - - this.dataDescriptor = new DataDescriptor(); - this.dataDescriptor.fromBuffer(Buffer.from(this.data, 'hex'), reader.offset); - delete this.data; - - return reader.offset; - } - - HasEncryptedData(): boolean { - return this.dataDescriptor.HasEncryptedData(); - } - - HasLabel(): boolean { - return this.dataDescriptor.HasLabel(); - } - - HasSalt(): boolean { - return this.dataDescriptor.HasSalt(); - } - - HasEPK(): boolean { - return this.dataDescriptor.HasEPK(); - } - - HasIVK(): boolean { - return this.dataDescriptor.HasIVK(); - } - - HasSSK(): boolean { - return this.dataDescriptor.HasSSK(); - } - - CalcFlags(): BigNumber { - return this.dataDescriptor.CalcFlags(); - } - - SetFlags() { - return this.dataDescriptor.SetFlags(); - } - -}; - -export enum EHashTypes { - HASH_INVALID = 0, - HASH_BLAKE2BMMR = 1, - HASH_BLAKE2BMMR2 = 2, - HASH_KECCAK = 3, - HASH_SHA256D = 4, - HASH_SHA256 = 5, - HASH_LASTTYPE = 5 -}; - -export class MMRDescriptor { - static VERSION_INVALID = new BN(0); - static FIRST_VERSION = new BN(1); - static LAST_VERSION = new BN(1); - static DEFAULT_VERSION = new BN(1); - - version: BigNumber; - objectHashType: EHashTypes; - mmrHashType: EHashTypes; - mmrRoot: DataDescriptor; - mmrHashes: DataDescriptor; - dataDescriptors: DataDescriptor[]; - - constructor(data?: { - version?: BigNumber, - objectHashType?: EHashTypes, - mmrHashType?: EHashTypes, - mmrRoot?: DataDescriptor, - mmrHashes?: DataDescriptor, - dataDescriptors?: DataDescriptor[] - }) { - - if (data) { - if (data.version) this.version = data.version; - if (data.objectHashType) this.objectHashType = data.objectHashType; - if (data.mmrHashType) this.mmrHashType = data.mmrHashType; - if (data.mmrRoot) this.mmrRoot = data.mmrRoot; - if (data.mmrHashes) this.mmrHashes = data.mmrHashes; - if (data.dataDescriptors) this.dataDescriptors = data.dataDescriptors; - - } else { - this.version = MMRDescriptor.DEFAULT_VERSION; - } - } - - static fromJson(data: any): MMRDescriptor { - - const newMMRDescriptor = new MMRDescriptor(); - - if (data) { - if (data.version) newMMRDescriptor.version = new BN(data.version); - if (data.objecthashtype) newMMRDescriptor.objectHashType = data.objecthashtype; - if (data.mmrhashtype) newMMRDescriptor.mmrHashType = data.mmrhashtype; - if (data.mmrroot) newMMRDescriptor.mmrRoot = DataDescriptor.fromJson(data.mmrroot); - if (data.mmrhashes) newMMRDescriptor.mmrHashes = DataDescriptor.fromJson(data.mmrhashes); - if (data.datadescriptors) { - newMMRDescriptor.dataDescriptors = []; - - data.datadescriptors.forEach((data) => { - newMMRDescriptor.dataDescriptors.push(DataDescriptor.fromJson(data)); - }); - - }; - } - return newMMRDescriptor; - } - - byteLength(): number { - let length = 0; - - length += varint.encodingLength(this.version); - length += varint.encodingLength(new BN(this.objectHashType)); - length += varint.encodingLength(new BN(this.mmrHashType)); - length += this.mmrRoot.byteLength(); - length += this.mmrHashes.byteLength(); - length += varuint.encodingLength(this.dataDescriptors.length); - this.dataDescriptors.forEach((dataDescriptor) => { - length += dataDescriptor.byteLength(); - }); - - return length; - } - - toBuffer(): Buffer { - - const writer = new BufferWriter(Buffer.alloc(this.byteLength())); - - writer.writeVarInt(this.version); - writer.writeVarInt(new BN(this.objectHashType)); - writer.writeVarInt(new BN(this.mmrHashType)); - writer.writeSlice(this.mmrRoot.toBuffer()); - writer.writeSlice(this.mmrHashes.toBuffer()); - writer.writeCompactSize(this.dataDescriptors.length); - - this.dataDescriptors.forEach((dataDescriptor) => { - writer.writeSlice(dataDescriptor.toBuffer()); - }); - return writer.buffer; - } - - fromBuffer(buffer: Buffer, offset?: number): number { - const reader = new BufferReader(buffer, offset); - this.version = reader.readVarInt(); - this.objectHashType = reader.readVarInt().toNumber(); - this.mmrHashType = reader.readVarInt().toNumber(); - this.mmrRoot = new DataDescriptor(); - reader.offset = this.mmrRoot.fromBuffer(reader.buffer, reader.offset); - this.mmrHashes = new DataDescriptor(); - reader.offset = this.mmrHashes.fromBuffer(reader.buffer, reader.offset); - const dataDescriptorsLength = reader.readCompactSize(); - this.dataDescriptors = []; - for (let i = 0; i < dataDescriptorsLength; i++) { - const dataDescriptor = new DataDescriptor(); - reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); - this.dataDescriptors.push(dataDescriptor); - } - return reader.offset; - } - - HasData(): boolean { - return !!(this.mmrHashes.objectdata && this.dataDescriptors); - } - - isValid(): boolean { - return this.version >= MMRDescriptor.FIRST_VERSION && this.version <= MMRDescriptor.LAST_VERSION; - } - - toJson() { - - const retval = { - version: this.version.toString(), - objecthashtype: this.objectHashType, - mmrhashtype: this.mmrHashType, - mmrroot: this.mmrRoot.toJson(), - mmrhashes: this.mmrHashes.toJson(), - datadescriptors: this.dataDescriptors.map((dataDescriptor) => dataDescriptor.toJson()) - }; - - return retval; - } -}; - -export const VectorEncodeVDXFUni = (obj): Buffer => { - let ss = Buffer.from(''); - - if (typeof (obj) != 'object') { - if (typeof (obj) != 'string') throw new Error('VectorEncodeVDXFUni: not JSON string as expected'); - if (isHexString(obj)) { - return Buffer.from(obj, "hex"); - } - return Buffer.from(obj, "utf-8"); - } - - if (obj.serializedHex) { - if (!isHexString(obj.serializedHex)) { - throw new Error("contentmap: If the \"serializedhex\" key is present, it's data must be only valid hex and complete"); - } - return Buffer.from(obj.serializedHex); - } - - if (obj.serializedBase64) { - try { - return Buffer.from(obj.serializedBase64, 'base64'); - } catch (e) { - throw new Error("contentmap: If the \"serializedBase64\" key is present, it's data must be only valid base64 and complete"); - } - } - - if (obj.message) { - return Buffer.from(obj.message, "utf-8"); - } - - // this should be an object with "vdxfkey" as the key and {object} as the json object to serialize - const oneValKeys = Object.keys(obj); - const oneValValues = Object.values(obj); - - for (let k = 0; k < oneValKeys.length; k++) { - const objTypeKey = oneValKeys[k]; - if (objTypeKey == VDXF_Data.DataByteKey().vdxfid) { - const oneByte = Buffer.from(oneValValues[k] as string, "hex"); - if (oneByte.length != 1) { - throw new Error("contentmap: byte data must be exactly one byte"); - } - ss = Buffer.concat([ss, oneByte]); - } - else if (objTypeKey == VDXF_Data.DataInt16Key().vdxfid) { - const oneShort = Buffer.alloc(2); - oneShort.writeInt16LE(oneValValues[k] as number); - ss = Buffer.concat([ss, oneShort]); - } - else if (objTypeKey == VDXF_Data.DataUint16Key().vdxfid) { - const oneUShort = Buffer.alloc(2); - oneUShort.writeUInt16LE(oneValValues[k] as number); - ss = Buffer.concat([ss, oneUShort]); - } - else if (objTypeKey == VDXF_Data.DataInt32Key().vdxfid) { - const oneInt = Buffer.alloc(4); - oneInt.writeInt32LE(oneValValues[k] as number); - ss = Buffer.concat([ss, oneInt]); - - } - else if (objTypeKey == VDXF_Data.DataUint32Key().vdxfid) { - const oneUInt = Buffer.alloc(4); - oneUInt.writeUInt32LE(oneValValues[k] as number); - ss = Buffer.concat([ss, oneUInt]); - } - else if (objTypeKey == VDXF_Data.DataInt64Key().vdxfid) { - const oneInt64 = Buffer.alloc(8); - oneInt64.writeIntLE(oneValValues[k] as number, 0, 8); - ss = Buffer.concat([ss, oneInt64]); - } - else if (objTypeKey == VDXF_Data.DataUint160Key().vdxfid) { - const oneKey = fromBase58Check(oneValValues[k] as string).hash; - ss = Buffer.concat([ss, oneKey]); - } - else if (objTypeKey == VDXF_Data.DataUint256Key().vdxfid) { - const oneHash = Buffer.from(oneValValues[k] as string, "hex"); - if (oneHash.length != 32) { - throw new Error("contentmap: hash data must be exactly 32 bytes"); - } - ss = Buffer.concat([ss, oneHash.reverse()]); - } - else if (objTypeKey == VDXF_Data.DataStringKey().vdxfid) { - - let length = 20; - length += 1; - const encodedLength = varuint.encodingLength(Buffer.from(oneValValues[k] as string, "utf-8").length) - length += varuint.encodingLength(encodedLength + Buffer.from(oneValValues[k] as string, "utf-8").length); - length += encodedLength; - length += Buffer.from(oneValValues[k] as string, "utf-8").length; - - const writer = new BufferWriter(Buffer.alloc(length)); - - writer.writeSlice(fromBase58Check(objTypeKey).hash); - writer.writeVarInt(new BN(1)); - writer.writeCompactSize(encodedLength + Buffer.from(oneValValues[k] as string, "utf-8").length); - writer.writeVarSlice(Buffer.from(oneValValues[k] as string, "utf-8")); - - ss = Buffer.concat([ss, writer.buffer]); - } - else if (objTypeKey == VDXF_Data.DataByteVectorKey().vdxfid) { - - let length = 20; - length += 1; - const encodedLength = varuint.encodingLength(Buffer.from(oneValValues[k] as string, "hex").length) - length += varuint.encodingLength(encodedLength + Buffer.from(oneValValues[k] as string, "hex").length); - length += encodedLength; - length += Buffer.from(oneValValues[k] as string, "hex").length; - - const writer = new BufferWriter(Buffer.alloc(length)); - - writer.writeSlice(fromBase58Check(objTypeKey).hash); - writer.writeVarInt(new BN(1)); - writer.writeCompactSize(encodedLength + Buffer.from(oneValValues[k] as string, "hex").length); - writer.writeVarSlice(Buffer.from(oneValValues[k] as string, "hex")); - - ss = Buffer.concat([ss, writer.buffer]); - - } - else if (objTypeKey == VDXF_Data.DataCurrencyMapKey().vdxfid) { - - const destinations = Object.keys(oneValValues[k]); - const values = Object.values(oneValValues[k]); - - const oneCurMap = new CurrencyValueMap({ value_map: new Map(destinations.map((key, index) => [key, new BN(values[index])])), multivalue: true }); - - let length = 20; - length += 1; - length += varuint.encodingLength(oneCurMap.getByteLength()); - length += oneCurMap.getByteLength(); - - const writer = new BufferWriter(Buffer.alloc(length)); - - writer.writeSlice(fromBase58Check(objTypeKey).hash); - writer.writeVarInt(new BN(1)); - writer.writeCompactSize(oneCurMap.getByteLength()); - writer.writeSlice(oneCurMap.toBuffer()); - - ss = Buffer.concat([ss, writer.buffer]); - - } - else if (objTypeKey == VDXF_Data.DataRatingsKey().vdxfid) { - - const version = new BN((oneValValues[k] as { version: number }).version); - const trust_level = new BN((oneValValues[k] as { trust_level: number }).trust_level); - - const destinations = Object.keys((oneValValues[k] as { rating: BigNumber }).rating); - const values = Object.values(oneValValues[k]); - - const oneRatingMap = new Rating({ ratings: new Map(destinations.map((key, index) => [key, Buffer.from(values[index], 'hex')])), version, trust_level }); - - let length = 20; - length += varint.encodingLength(oneRatingMap.version); - length += varuint.encodingLength(oneRatingMap.getByteLength()); - length += oneRatingMap.getByteLength(); - - const writer = new BufferWriter(Buffer.alloc(length)); - - writer.writeSlice(fromBase58Check(objTypeKey).hash); - writer.writeVarInt(oneRatingMap.version); - writer.writeCompactSize(oneRatingMap.getByteLength()); - writer.writeSlice(oneRatingMap.toBuffer()); - - ss = Buffer.concat([ss, writer.buffer]); - - } - else if (objTypeKey == VDXF_Data.DataTransferDestinationKey().vdxfid) { - - const transferDest = new TransferDestination(oneValValues[k]); - - let length = 20; - length += varint.encodingLength(transferDest.typeNoFlags()); - length += varuint.encodingLength(transferDest.getByteLength()); - length += transferDest.getByteLength(); - - const writer = new BufferWriter(Buffer.alloc(length)); - - writer.writeSlice(fromBase58Check(objTypeKey).hash); - writer.writeVarInt(transferDest.typeNoFlags()); - writer.writeCompactSize(transferDest.getByteLength()); - writer.writeSlice(transferDest.toBuffer()); - - ss = Buffer.concat([ss, writer.buffer]); - - } - else if (objTypeKey == VDXF_Data.ContentMultiMapRemoveKey().vdxfid) { - - const transferDest = new ContentMultiMapRemove(oneValValues[k]); - - let length = 20; - length += varint.encodingLength(transferDest.version); - length += varuint.encodingLength(transferDest.getByteLength()); - length += transferDest.getByteLength(); - - const writer = new BufferWriter(Buffer.alloc(length)); - - writer.writeSlice(fromBase58Check(objTypeKey).hash); - writer.writeVarInt(transferDest.version); - writer.writeCompactSize(transferDest.getByteLength()); - writer.writeSlice(transferDest.toBuffer()); - - ss = Buffer.concat([ss, writer.buffer]); - - } - else if (objTypeKey == VDXF_Data.CrossChainDataRefKey().vdxfid) { - - const transferDest = new CrossChainDataRef(oneValValues[k]); - - let length = 20; - length += varint.encodingLength(VDXF_OBJECT_DEFAULT_VERSION); - length += varuint.encodingLength(transferDest.getByteLength()); - length += transferDest.getByteLength(); - - const writer = new BufferWriter(Buffer.alloc(length)); - - writer.writeSlice(fromBase58Check(objTypeKey).hash); - writer.writeVarInt(VDXF_OBJECT_DEFAULT_VERSION); - writer.writeCompactSize(transferDest.getByteLength()); - writer.writeSlice(transferDest.toBuffer()); - - ss = Buffer.concat([ss, writer.buffer]); - - } - else if (objTypeKey == VDXF_Data.DataDescriptorKey().vdxfid) { - - const descr = DataDescriptor.fromJson(oneValValues[k]); - - let length = 20; - length += varint.encodingLength(descr.version); - length += varuint.encodingLength(descr.byteLength()); - length += descr.byteLength(); - - const writer = new BufferWriter(Buffer.alloc(length)); - - writer.writeSlice(fromBase58Check(objTypeKey).hash); - writer.writeVarInt(descr.version); - writer.writeCompactSize(descr.byteLength()); - writer.writeSlice(descr.toBuffer()); - - ss = Buffer.concat([ss, writer.buffer]); - - } - else if (objTypeKey == VDXF_Data.MMRDescriptorKey().vdxfid) { - - const descr = MMRDescriptor.fromJson(oneValValues[k]); - - let length = 20; - length += varint.encodingLength(descr.version); - length += varuint.encodingLength(descr.byteLength()); - length += descr.byteLength(); - - const writer = new BufferWriter(Buffer.alloc(length)); - - writer.writeSlice(fromBase58Check(objTypeKey).hash); - writer.writeVarInt(descr.version); - writer.writeCompactSize(descr.byteLength()); - writer.writeSlice(descr.toBuffer()); - - ss = Buffer.concat([ss, writer.buffer]); - - } - else if (objTypeKey == VDXF_Data.SignatureDataKey().vdxfid) { - - const sigData = SignatureData.fromJson(oneValValues[k]); - - let length = 20; - length += varint.encodingLength(sigData.version); - length += varuint.encodingLength(sigData.getByteLength()); - length += sigData.getByteLength(); - - const writer = new BufferWriter(Buffer.alloc(length)); - writer.writeSlice(fromBase58Check(objTypeKey).hash); - writer.writeVarInt(sigData.version); - writer.writeCompactSize(sigData.getByteLength()); - writer.writeSlice(sigData.toBuffer()); - - ss = Buffer.concat([ss, writer.buffer]); - - } - else { - throw new Error("contentmap invalid or unrecognized vdxfkey for object type: " + oneValValues[k]); - } - } - return ss; -} - - -export const VDXFDataToUniValue = (buffer: Buffer, offset: number = 0, pSuccess = null) => { - const reader = new BufferReader(buffer, offset); - let objectUni: any; - try - { - let checkVal: string; - let version = new BN(0); - let objSize = 0; - checkVal = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); - - if (checkVal == VDXF_Data.DataCurrencyMapKey().vdxfid) - { - const oneCurrencyMap = new CurrencyValueMap(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = oneCurrencyMap.fromBuffer(reader.buffer, reader.offset); - if (oneCurrencyMap.isValid()) - { - objectUni = {[checkVal]: oneCurrencyMap.toJson()}; - } - } - else if (checkVal == VDXF_Data.DataRatingsKey().vdxfid) - { - const oneRatingObj = new Rating(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = oneRatingObj.fromBuffer(reader.buffer, reader.offset); - if (oneRatingObj.isValid()) - { - objectUni = {[checkVal]: oneRatingObj.toJson()}; - } - } - else if (checkVal == VDXF_Data.DataTransferDestinationKey().vdxfid) - { - const oneTransferDest = new TransferDestination(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = oneTransferDest.fromBuffer(reader.buffer, reader.offset); - if (oneTransferDest.isValid()) - { - objectUni = {[checkVal]: oneTransferDest.toJson()}; - } - } - else if (checkVal == VDXF_Data.ContentMultiMapRemoveKey().vdxfid) - { - throw new Error("ContentMultiMapRemoveKey not implemented"); - // TODO: Implement ContentMultiMapRemoveKey - - // CContentMultiMapRemove oneContentRemove; - // ss >> VARINT(version); - // ss >> COMPACTSIZE(objSize); - // ss >> oneContentRemove; - // if (oneContentRemove.isValid()) - // { - // objectUni = UniValue(UniValue::VOBJ); - // objectUni.pushKV(EncodeDestination(CIdentityID(checkVal)), oneContentRemove.ToUniValue()); - // } - } - else if (checkVal == VDXF_Data.DataStringKey().vdxfid) - { - let stringVal:string; - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - stringVal = reader.readVarSlice().toString('utf-8'); - objectUni = {[checkVal]: stringVal}; - } - else if (checkVal == VDXF_Data.DataByteVectorKey().vdxfid) - { - let vecVal: Buffer; - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - vecVal = reader.readVarSlice(); - objectUni = {[checkVal]: vecVal.toString('hex')}; - } - else if (checkVal == VDXF_Data.CrossChainDataRefKey().vdxfid) - { - throw new Error("CrossChainDataRefKey not implemented"); - // TODO: Implement CrossChainDataRefKey - // CCrossChainDataRef dataRef; - // ss >> VARINT(version); - // ss >> COMPACTSIZE(objSize); - // ss >> dataRef; - // if (dataRef.isValid()) - // { - // objectUni = UniValue(UniValue::VOBJ); - // objectUni.pushKV(EncodeDestination(CIdentityID(checkVal)), dataRef.ToUniValue()); - // } - } - else if (checkVal == VDXF_Data.DataDescriptorKey().vdxfid) - { - const dataDescriptor = new DataDescriptor(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); - if (dataDescriptor.isValid()) - { - objectUni = {[checkVal]: dataDescriptor.toJson()}; - } - } - else if (checkVal == VDXF_Data.MMRDescriptorKey().vdxfid) - { - const mmrDescriptor = new MMRDescriptor(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = mmrDescriptor.fromBuffer(reader.buffer, reader.offset); - if (mmrDescriptor.isValid()) - { - objectUni = {[checkVal]: mmrDescriptor.toJson()}; - } - } - else if (checkVal == VDXF_Data.SignatureDataKey().vdxfid) - { - const sigData = new SignatureData(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = sigData.fromBuffer(reader.buffer, reader.offset); - if (sigData.isValid()) - { - objectUni = {[checkVal]: sigData.toJson()}; - } - } - - // if we have an object that we recognized, encode it - if (objectUni) - { - if (pSuccess != null) - { - pSuccess.value = true; - } - } - else - { - if (pSuccess != null) - { - pSuccess.value = false; - } - } - } - catch (e) - { - if (pSuccess != null) - { - pSuccess.value = false; - } - } - return { objectUni, offset: reader.offset, pSuccess }; -} - -export const VDXFDataToUniValueArray = (buffer: Buffer, offset: number = 0) => { - let entryArr = []; - const reader = new BufferReader(buffer, offset); - let bytesLeft = buffer.length; - - while (bytesLeft > 20) // size of uint160 - { - let objOut = { value: false}; - const { objectUni, offset} = VDXFDataToUniValue(reader.buffer, reader.offset, objOut); - reader.offset = offset; - bytesLeft = buffer.length - reader.offset; - if (objOut.value) - { - entryArr.push(objectUni); - } - else - { - // add the remaining data as a hex string - reader.offset = reader.offset - 20; - entryArr.push(reader.readSlice(bytesLeft + 20).toString('hex')); - bytesLeft = 0; - break; - } - } - if (bytesLeft && bytesLeft <= 20) - { - entryArr.push(reader.readSlice(bytesLeft).toString('hex')); - } - return entryArr.length == 0 ? null : (entryArr.length == 1 ? entryArr[0] : entryArr); - -} \ No newline at end of file diff --git a/src/vdxf/classes/SaltedData.ts b/src/vdxf/classes/SaltedData.ts index a2d283f..ff60484 100644 --- a/src/vdxf/classes/SaltedData.ts +++ b/src/vdxf/classes/SaltedData.ts @@ -6,11 +6,11 @@ import { BN } from 'bn.js'; import { BigNumber } from '../../utils/types/BigNumber'; import { I_ADDR_VERSION } from '../../constants/vdxf'; import { VDXFData } from '../../'; -import { EHashTypes } from './DataDescriptor'; +import { EHashTypes } from '../../pbaas/DataDescriptor'; const { BufferReader, BufferWriter } = bufferutils const createHash = require("create-hash"); import { VERUS_DATA_SIGNATURE_PREFIX } from "../../constants/vdxf"; -import { SaltedDataKey } from '../vdxfDataKeys'; +import { SaltedDataKey } from '../vdxfdatakeys'; export class SaltedData extends VDXFData { @@ -27,7 +27,7 @@ export class SaltedData extends VDXFData { if (salt.length != 0) { this.salt = salt; } - this.vdxfkey = SaltedDataKey().vdxfid; + this.vdxfkey = SaltedDataKey.vdxfid; } diff --git a/src/vdxf/classes/SignatureData.ts b/src/vdxf/classes/SignatureData.ts deleted file mode 100644 index 2be597c..0000000 --- a/src/vdxf/classes/SignatureData.ts +++ /dev/null @@ -1,233 +0,0 @@ -import varint from '../../utils/varint' -import varuint from '../../utils/varuint' -import { fromBase58Check, toBase58Check } from "../../utils/address"; -import bufferutils from '../../utils/bufferutils' -import { BN } from 'bn.js'; -import { BigNumber } from '../../utils/types/BigNumber'; -import { I_ADDR_VERSION } from '../../constants/vdxf'; -import { SerializableEntity } from '../../utils/types/SerializableEntity'; -import { EHashTypes } from './DataDescriptor'; -const { BufferReader, BufferWriter } = bufferutils -const createHash = require("create-hash"); -import { VERUS_DATA_SIGNATURE_PREFIX } from "../../constants/vdxf"; - -export class SignatureData implements SerializableEntity { - version: BigNumber; - systemID: string; - hashType: BigNumber; - signatureHash: Buffer; - identityID: string; - sigType: BigNumber; - vdxfKeys: Array; - vdxfKeyNames: Array; - boundHashes: Array; - signatureAsVch: Buffer; - - static VERSION_INVALID = new BN(0); - static FIRST_VERSION = new BN(1); - static LAST_VERSION = new BN(1); - static DEFAULT_VERSION = new BN(1); - static TYPE_VERUSID_DEFAULT = new BN(1); - - constructor(data?) { - - if (data) { - Object.assign(this, data) - } - } - - static fromJson(data: any) { - - const signatureData = new SignatureData(); - - if (data) { - if (data.version) signatureData.version = new BN(data.version); - if (data.systemid) signatureData.systemID = data.systemid; - if (data.hashtype) signatureData.hashType = new BN(data.hashtype); - - let hashType = SignatureData.getSignatureHashType(Buffer.from(data.signaturehash, 'hex')); - - if (hashType == EHashTypes.HASH_SHA256) { - signatureData.signatureHash = Buffer.from(data.signaturehash, 'hex').reverse(); - } else { - signatureData.signatureHash = Buffer.from(data.signaturehash, 'hex'); - } - - if (data.identityid) signatureData.identityID = data.identityid; - if (data.signaturetype) signatureData.sigType = new BN(data.signaturetype); - signatureData.vdxfKeys = data.vdxfkeys || []; - signatureData.vdxfKeyNames = data.vdxfkeynames || []; - signatureData.boundHashes = data.boundhashes || []; - signatureData.signatureAsVch = Buffer.from(data.signature, 'base64'); - - } - - return signatureData; - } - - static getSignatureHashType(buffer) { - - var bufferReader = new bufferutils.BufferReader(buffer, 0); - let version = bufferReader.readUInt8(); - if (version === 2) - return bufferReader.readUInt8(); - else - return EHashTypes.HASH_SHA256; - } - - getByteLength() { - let byteLength = 0; - - byteLength += varint.encodingLength(this.version); - byteLength += 20; // systemID uint160 - byteLength += varint.encodingLength(this.hashType); - byteLength += varuint.encodingLength(this.signatureHash.length); - byteLength += this.signatureHash.length; - byteLength += 20; // identityID uint160 - byteLength += varint.encodingLength(this.sigType); - byteLength += varuint.encodingLength(this.vdxfKeys.length); - byteLength += this.vdxfKeys.length * 20; - byteLength += varuint.encodingLength(this.vdxfKeyNames.length); - - for (const keyName of this.vdxfKeyNames) { - byteLength += varuint.encodingLength(Buffer.from(keyName, 'utf8').length); - byteLength += Buffer.from(keyName, 'utf8').length; - } - - byteLength += varuint.encodingLength(this.boundHashes.length); - byteLength += this.boundHashes.length * 32; - byteLength += varuint.encodingLength(this.signatureAsVch.length); - byteLength += this.signatureAsVch.length; - - return byteLength - } - - toBuffer() { - const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) - - bufferWriter.writeVarInt(this.version); - bufferWriter.writeSlice(fromBase58Check(this.systemID).hash); - bufferWriter.writeVarInt(this.hashType); - bufferWriter.writeVarSlice(this.signatureHash); - bufferWriter.writeSlice(fromBase58Check(this.identityID).hash); - bufferWriter.writeVarInt(this.sigType); - bufferWriter.writeCompactSize(this.vdxfKeys.length); - - for (const key of this.vdxfKeys) { - bufferWriter.writeSlice(fromBase58Check(key).hash); - } - - bufferWriter.writeCompactSize(this.vdxfKeyNames.length); - for (const keyName of this.vdxfKeyNames) { - bufferWriter.writeVarSlice(Buffer.from(keyName, 'utf8')); - } - bufferWriter.writeCompactSize(this.boundHashes.length); - for (const boundHash of this.boundHashes) { - bufferWriter.writeSlice(boundHash); - } - bufferWriter.writeVarSlice(this.signatureAsVch); - - return bufferWriter.buffer - } - - fromBuffer(buffer: Buffer, offset: number = 0) { - const reader = new BufferReader(buffer, offset); - - this.version = reader.readVarInt(); - this.systemID = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); - this.hashType = reader.readVarInt(); - this.signatureHash = reader.readVarSlice(); - this.identityID = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); - this.sigType = reader.readVarInt(); - const vdxfKeysLength = reader.readCompactSize(); - this.vdxfKeys = []; - - for (let i = 0; i < vdxfKeysLength; i++) { - this.vdxfKeys.push(toBase58Check(reader.readSlice(20), I_ADDR_VERSION)); - } - - const vdxfKeyNamesLength = reader.readCompactSize(); - this.vdxfKeyNames = []; - - for (let i = 0; i < vdxfKeyNamesLength; i++) { - this.vdxfKeyNames.push(reader.readVarSlice().toString('utf8')); - } - - const boundHashesLength = reader.readCompactSize(); - this.boundHashes = []; - - for (let i = 0; i < boundHashesLength; i++) { - this.boundHashes.push(reader.readSlice(32)); - } - - this.signatureAsVch = reader.readVarSlice(); - - return reader.offset; - } - - isValid() { - return !!(this.version.gte(SignatureData.FIRST_VERSION) && - this.version.lte(SignatureData.LAST_VERSION) && - this.systemID); - } - - toJson() { - - const returnObj = { version: this.version.toString(), - systemid: this.systemID, - hashtype: this.hashType.toString()} - - if (this.hashType == new BN(EHashTypes.HASH_SHA256)) { - returnObj['signaturehash'] = this.signatureHash.reverse().toString('hex'); - } else { - returnObj['signaturehash'] = this.signatureHash.toString('hex'); - } - - returnObj['identityid'] = this.identityID; - returnObj['signaturetype'] = this.sigType.toString(); - returnObj['signature'] = this.signatureAsVch.toString('base64'); - - if (this.vdxfKeys) { - returnObj['vdxfkeys'] = this.vdxfKeys; - } - - if (this.vdxfKeyNames) { - returnObj['vdxfkeynames'] = this.vdxfKeyNames; - } - - if (this.boundHashes) { - returnObj['boundhashes'] = this.boundHashes; - } - - return returnObj - } - - getIdentityHash(sigObject:{version: number, hashtype: number, height: number}) { - var heightBuffer = Buffer.allocUnsafe(4) - heightBuffer.writeUInt32LE(sigObject.height); - - if (sigObject.hashtype != Number(EHashTypes.HASH_SHA256)) { - throw new Error("Invalid signature type for identity hash"); - } - - if (sigObject.version == 1) { - return createHash("sha256") - .update(VERUS_DATA_SIGNATURE_PREFIX) - .update(fromBase58Check(this.systemID).hash) - .update(heightBuffer) - .update(fromBase58Check(this.identityID).hash) - .update(this.signatureHash) - .digest(); - } else { - return createHash("sha256") - .update(fromBase58Check(this.systemID).hash) - .update(heightBuffer) - .update(fromBase58Check(this.identityID).hash) - .update(VERUS_DATA_SIGNATURE_PREFIX) - .update(this.signatureHash) - .digest(); - } - - - } -} \ No newline at end of file diff --git a/src/vdxf/index.ts b/src/vdxf/index.ts index e981afb..1fcafa4 100644 --- a/src/vdxf/index.ts +++ b/src/vdxf/index.ts @@ -12,8 +12,8 @@ import { BigNumber } from "../utils/types/BigNumber"; export * from './keys' export * from './scopes' export * from './keymap' -export * from './identityDataKeys' -export * from './vdxfDataKeys' +export * from './identitydatakeys' +export * from './vdxfdatakeys' export interface VDXFObjectInterface { vdxfkey: string; toString: () => string; diff --git a/src/vdxf/keymap.ts b/src/vdxf/keymap.ts index f32e73b..c18d618 100644 --- a/src/vdxf/keymap.ts +++ b/src/vdxf/keymap.ts @@ -1,6 +1,13 @@ import * as keylist from './keys'; -import * as AttestationData from '../utils/IdentityData'; +import * as attestationData from '../utils/IdentityData'; import { VDXFKeyInterface } from './keys'; -export const keymap = Object.keys(keylist).reduce((obj: { [key: string]: VDXFKeyInterface }, item) => { obj[keylist[item].vdxfid] = keylist[item]; return obj }, {}); -export const attestationDataKeys = Object.keys(AttestationData).reduce((obj: { [key: string]: VDXFKeyInterface }, item) => { obj[AttestationData[item].vdxfid] = AttestationData[item]; return obj }, {}); -export const IdentityVdxfidMap = AttestationData.IdentityVdxfidMap; \ No newline at end of file + +export const keymap = Object.keys(keylist) + .reduce((obj: { [key: string]: VDXFKeyInterface }, item) => + { obj[keylist[item].vdxfid] = keylist[item]; return obj }, {}); + +export const attestationDataKeys = Object.keys(attestationData) + .reduce((obj: { [key: string]: VDXFKeyInterface }, item) => + { obj[attestationData[item].vdxfid] = attestationData[item]; return obj }, {}); + +export const IdentityVdxfidMap = attestationData.IdentityVdxfidMap; \ No newline at end of file diff --git a/src/vdxf/vdxfDataKeys.ts b/src/vdxf/vdxfDataKeys.ts index facbc6f..f73ca5a 100644 --- a/src/vdxf/vdxfDataKeys.ts +++ b/src/vdxf/vdxfDataKeys.ts @@ -1,497 +1,438 @@ import { VDXFKeyInterface } from "./keys" -export function DataByteKeyName(): string { - return "vrsc::data.type.byte"; - } -export function DataByteKey(): VDXFKeyInterface { - return { - "vdxfid": "iBXUHbh4iacbeZnzDRxishvBSrYk2S2k7t", - "indexid": "xGMakQ89ZtqGGjg257csr6SiUWZksGmjWp", - "hash160result": "2e97a8bba443773812341e1d761530d3bba04f58", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.byte" - } - } - } -export function DataInt16KeyName(): string { - return "vrsc::data.type.int16"; - } -export function DataInt16Key(): VDXFKeyInterface { - return { - "vdxfid": "iDtTv3wf1Vk3M2Y46RjLPKtttx5hydwtY1", - "indexid": "xJiaNrNjroxhyCR5x7PVMiRRvc6ipg6N9g", - "hash160result": "ee334ebd432db0b24cc2702eda61c28ff44d3872", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int16" - } - } - } -export function DataUint16KeyName(): string { - return "vrsc::data.type.uint16"; - } -export function DataUint16Key(): VDXFKeyInterface { - return { - "vdxfid": "iHn7urT2yVfS7pQn6WGAmCVWh4HBLV24n3", - "indexid": "xNcENet7pot6jzHoxBvKjb23iiJCGpekDk", - "hash160result": "5cfc322d2a216145f7b82714115e7953269de59c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint16" - } - } - } -export function DataInt32KeyName(): string { - return "vrsc::data.type.int32"; - } -export function DataInt32Key(): VDXFKeyInterface { - return { - "vdxfid": "iHpLPprRDv3H5H3ZMaJ9nyHFzkG9xJWZDb", - "indexid": "xNeSrdHW5EFwhSvbDFxJmMoo2QHAtoEaEM", - "hash160result": "3e9ba478b23b13232f28d21051d907ce8fdd509d", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int32" - } - } - } -export function DataUint32KeyName(): string { - return "vrsc::data.type.uint32"; - } -export function DataUint32Key(): VDXFKeyInterface { - return { - "vdxfid": "iKSj5zhd6cSsLudaGhtfmisRNgEM7SPFWY", - "indexid": "xQGqYo8hwvfXy5Wc8PYpk7PxQLFMwfP7Fp", - "hash160result": "f279818aeb4fe768956b350d1fc7216ca0e82aaf", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint32" - } - } - } -export function DataInt64KeyName(): string { - return "vrsc::data.type.int64"; - } -export function DataInt64Key(): VDXFKeyInterface { - return { - "vdxfid": "iKB3TGi9Dg5HZ4nQAgLQAgp3tuXBaRKHpC", - "indexid": "xQ19v59E4zHxBEfS2MzZ95LavZYCTTeuyg", - "hash160result": "ab3705f8a7fae59786ef897b014df85fcd9533ac", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int64" - } - } - - } -export function DataUint64KeyName(): string { - return "vrsc::data.type.uint64"; - } -export function DataUint64Key(): VDXFKeyInterface { - return { - "vdxfid": "iPamkQf38AeGQ8z4zSsZL7t9kXMeUkYLJL", - "indexid": "xUQtDD67yUrw2Js6r8XiJWQgnBNfNeeoUq", - "hash160result": "bb2ae9ed3e9f400def0724937fbf65f23ef690dc", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint64" - } - } - - } -export function DataUint160KeyName(): string { - return "vrsc::data.type.uint160"; - } -export function DataUint160Key(): VDXFKeyInterface { - return { - "vdxfid": "iAAwdbLyKYL39nJ1eQHaHtb75krg4mV1Lq", - "indexid": "xF146Pn4ArYhmxB3W5wjGH7e7Qsgx9bkpj", - "hash160result": "d97d2295d4c73f6f6f0697c8086bd822d6977549", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint160" - } - } - - } -export function DataUint256KeyName(): string { - return "vrsc::data.type.uint256"; - } -export function DataUint256Key(): VDXFKeyInterface { - return { - "vdxfid": "i8k7g7z6grtGYrNZmZr5TQ872aHssXuuua", - "indexid": "xDaE8vRBYB6wB2FbdFWERnee4EJtjbCtMM", - "hash160result": "939b27bea698d180237c40b2194025acc673cb39", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint256" - } - } - - } -export function DataStringKeyName(): string { - return "vrsc::data.type.string"; - } -export function DataStringKey(): VDXFKeyInterface { - return { - "vdxfid": "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c", - "indexid": "xPwgY6oPdusaAgNK3u5yHCQG5NsHEcBpi5", - "hash160result": "e5c061641228a399169211e666de18448b7b8bab", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.string" - } - } - - } - // this is a key for a typed vector, which will have the object type key following the vector key -export function DataVectorKeyName(): string { - return "vrsc::data.type.vector"; - } -export function DataVectorKey(): VDXFKeyInterface { - return { - "vdxfid": "iAEShwk1xjdGhaUSz3Maa2XR32o3vRuHq7", - "indexid": "xF4ZAkB6p3qwKkMUqj1jYR3x4gp4mGz657", - "hash160result": "503875b0dc301189a98927d3ece56c5f921c1f4a", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.vector" - } - } - } -export function DataByteVectorKeyName(): string { - return "vrsc::data.type.bytevector"; - } -export function DataByteVectorKey(): VDXFKeyInterface { - return { - "vdxfid": "iKMhRLX1JHQihVZx2t2pAWW2uzmK6AzwW3", - "indexid": "xQBot8x69bdPKfSytZgy8u2ZwenKzVjR4X", - "hash160result": "cc3ae6466006629f5105f71325bb2a19107037ae", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.bytevector" - } - } - - } -export function DataInt32VectorKeyName(): string { - return "vrsc::data.type.int32vector"; - } -export function DataInt32VectorKey(): VDXFKeyInterface { - return { - "vdxfid": "iJZt2fcUv1iivbfC3tuPuefabcTppQEoVq", - "indexid": "xPPzVU3ZmKwPYmYDuaZYt3C7dGUqk939N7", - "hash160result": "c0847f3025c408059b5a8f6a9e414a8ed8288da5", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int32vector" - } - } - } -export function DataInt64VectorKeyName(): string { - return "vrsc::data.type.int64vector"; - } -export function DataInt64VectorKey(): VDXFKeyInterface { - return { - "vdxfid": "i4qtYkFS9iNyu2AkqwoSn1xyCdfH9PUvak", - "indexid": "x9g11YgX12beXC3nhdTbkQVWEHgJ2jqfz1", - "hash160result": "c6219ea13884987453692cb14c72d5f6a47c020f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int64vector" - } - } - - } -export function DataCurrencyMapKeyName(): string { - return "vrsc::data.type.object.currencymap"; - } -export function DataCurrencyMapKey(): VDXFKeyInterface { - return { - "vdxfid": "iMrGhzkZq5fpWWSa1RambRySFPb7CuvKuX", - "indexid": "xSgPAoBegPtV8gKbs7EvZpVyH3c858ZUvL", - "hash160result": "25db70c2fcae2571f89201181bec04587e1f8fc9", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.currencymap" - } - } - - } -export function DataRatingsKeyName(): string { - return "vrsc::data.type.object.ratings"; - } -export function DataRatingsKey(): VDXFKeyInterface { - return { - "vdxfid": "iHJComZUXXGniLkDhjYprWYEN8qvQGDoam", - "indexid": "xN8KGZzZNqVTLWdFZRCypu4mPnrwHFKbCK", - "hash160result": "32cad57ff1dc5db4b5ba573ce01bc9c89b0d9e97", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.ratings" - } - } - } -export function DataURLKeyName(): string { - return "vrsc::data.type.object.url"; - } -export function DataURLKey(): VDXFKeyInterface { - return { - "vdxfid": "iJ7xdhJTJAvJubNnSJFXyA3jujzqGxjLuZ", - "indexid": "xNx56VjY9V8yXmFpHyugwYaGwQ1rCt6J9W", - "hash160result": "7748bfaf53dd2ff63ed5f73a41174c360f30a6a0", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.url" - } - } - } -export function DataTransferDestinationKeyName(): string { - return "vrsc::data.type.object.transferdestination"; - } -export function DataTransferDestinationKey(): VDXFKeyInterface { - return { - "vdxfid": "i91L6zwZQrkbNVMB1AZ1Z671qybexRmeVK", - "indexid": "xDqSZoNeGAyFzfECrrDAXUdYsdcfs3Zuku", - "hash160result": "92f38773849383146037b16a48ea350c1c11ac3c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.transferdestination" - } - } - } -export function UTXORefKeyName(): string { - return "vrsc::data.type.object.utxoref"; - } -export function UTXORefKey(): VDXFKeyInterface { - return { - "vdxfid": "iNcKvh7mazaXptzHf85q6EtpFYFE7asKC1", - "indexid": "xTSSPVYrSJoCT4sKWojz4dRMHCGF3h9tM4", - "hash160result": "013e760f7451c289672993ea391ae643c21ce4d1", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.utxoref" - } - } - } -export function CrossChainDataRefKeyName(): string { - return "vrsc::data.type.object.crosschaindataref"; - } -export function CrossChainDataRefKey(): VDXFKeyInterface { - return { - "vdxfid": "iP3euVSzNcXUrLNHnQnR9G6q8jeYuGSxgw", - "indexid": "xTsmNHt5Dvk9UWFKe6Sa7edNAPfZmJVgLc", - "hash160result": "4d33e0aee0f648c7871b2661d1221b57c05aaed6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.crosschaindataref" - } - } - - } -export function EncryptionDescriptorKeyName(): string { - return "vrsc::data.type.encryptiondescriptor"; - } -export function EncryptionDescriptorKey(): VDXFKeyInterface { - return { - "vdxfid": "iHEEK8ipj58BeKZNWuaaR2tDR5RK2kmf9A", - "indexid": "xN4Lmw9uaPLrGVSQNbEjPRQkSjSKxsHUQu", - "hash160result": "8d021acc1b68335bd7d37b28ff773c138ea5dd96", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.encryptiondescriptor" - } - } - } -export function SaltedDataKeyName(): string { - return "vrsc::data.type.salteddata"; - } -export function SaltedDataKey(): VDXFKeyInterface { - return { - "vdxfid": "i92U1nLuLJkC44FZZ4Lq9zk4qW3HrWAWNo", - "indexid": "xDraUamzBcxrgE8bQjzz8PGbsA4JiFskTD", - "hash160result": "9e13510e01d0d03a7bc90d7a2ef32824f515e33c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.salteddata" - } - } - } -export function DataDescriptorKeyName(): string { - return "vrsc::data.type.object.datadescriptor"; - } -export function DataDescriptorKey(): VDXFKeyInterface { - return { - "vdxfid": "i4GC1YGEVD21afWudGoFJVdnfjJ5XWnCQv", - "indexid": "x96JULhKLXEgCqPwUxTQGtAKhPK6Qh1iaW", - "hash160result": "4d4f12424ded2033a526a4e2a8835fc5b2eba208", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.datadescriptor" - } - } - } -export function SignatureDataKeyName(): string { - return "vrsc::data.signaturedata"; - } -export function SignatureDataKey(): VDXFKeyInterface { - return { - "vdxfid": "i7PcVF9wwPtQ6p6jDtCVpohX65pTZuP2ah", - "indexid": "xCDix3b2ni74iyym5ZreoCE47jqUTBFRAb", - "hash160result": "b48b359e9a00042cec64f7f66ac717d388a4f22a", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.signaturedata" - } - } - } -export function VectorUint256KeyName(): string { - return "vrsc::data.mmrhashes"; - } -export function VectorUint256Key(): VDXFKeyInterface { - return { - "vdxfid": "i9UgJ2WxGw95PKdoCXjpfnBShtP5gi9fxS", - "indexid": "xEJnkpx38FMk1VWq4DPyeAhyjYQ6X5Gsti", - "hash160result": "8c1afd59e904f6d2702699963abccbc6d326d841", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.mmrhashes" - } - } - } -export function MMRLinksKeyName(): string { - return "vrsc::data.mmrlinks"; - } -export function MMRLinksKey(): VDXFKeyInterface { - return { - "vdxfid": "iPQsnA1R8UjHNddZKZ3FxsuKQ5WzKqSC7w", - "indexid": "xUEzExSVynwwzoWbBEhQwGRrRjY1Bc2MYc", - "hash160result": "f535a4e9ac0f94eda01695d16489a4a102d6b1da", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.mmrlinks" - } - } - - } -export function MMRDescriptorKeyName(): string { - return "vrsc::data.mmrdescriptor"; - } -export function MMRDescriptorKey(): VDXFKeyInterface { - return { - "vdxfid": "i9dVDb4LgfMYrZD1JBNP2uaso4bNAkT4Jr", - "indexid": "xETbgPVRXyaDUj639s2Y1J7QpicP4DvZMt", - "hash160result": "97273a4c02d6be002f8d69c3979616732ba68243", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.mmrdescriptor" - } - } - } -export function TypeDefinitionKeyName(): string { - return "vrsc::data.type.typedefinition"; - } -export function TypeDefinitionKey(): VDXFKeyInterface { - return { - "vdxfid": "iL5MPPHWXQEY3p2Q1UsmGDvXsgPiqd1W1S", - "indexid": "xQuTrBibNiTCfyuRsAXvEcT4uLQjhxrpyL", - "hash160result": "ae8d805d9650c0512a6b6ec33e963386542f18b6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.typedefinition" - } - } - } -export function MultiMapKeyName(): string { - return "vrsc::identity.multimapkey"; - } -export function MultiMapKey(): VDXFKeyInterface { - return { - "vdxfid": "i3mbggp3NBR77C5JeFQJTpAxmgMidayLLE", - "indexid": "x8bi9VF8DVdmjMxLVw4TSChVoLNjUyapgs", - "hash160result": "6920bb81b420bc95e29a10ed677379b1e39e3a03", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.multimapkey" - } - } - } -export function ContentMultiMapRemoveKeyName(): string { - return "vrsc::identity.multimapremove"; - } -export function ContentMultiMapRemoveKey(): VDXFKeyInterface { - return { - "vdxfid": "i5Zkx5Z7tEfh42xtKfwbJ5LgEWE9rEgpFY", - "indexid": "xAPsQszCjYtMgCqvBMbkGTsDGAFAmrN33A", - "hash160result": "d393b986e4f82db7bec82d97b186882d739ded16", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.multimapremove" - } - } - } - - // for any ID, this key indexes content that applies to representing the profile of - // that ID. there may be many mime-type instances of a particular piece of profile media -export function ProfileMediaKeyName(): string { - return "vrsc::identity.profile.media"; - } -export function ProfileMediaKey(): VDXFKeyInterface { - return { - "vdxfid": "iEYsp2njSt1M4EVYi9uuAPBU2wpKmThkkr", - "indexid": "xKNzGqDpJCE1gQNaZqa48mi14bqLaG669g", - "hash160result": "e95b2ee1abb130a93900ddaef2d8e528010f7c79", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.profile.media" - } - } - - } - -export function ZMemoMessageKeyName(): string { - return "vrsc::system.zmemo.message"; - } -export function ZMemoMessageKey(): VDXFKeyInterface { - return { - "vdxfid": "iNHg1n828PUxktkYeNxC6sdVmuKTipn3L3", - "indexid": "xT7nUaZ6yhhdP4daW4cM5GA2oZLUaNVaBD", - "hash160result": "4a8f418203621f10d1a61701be8dbbbb38fa5cce", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::system.zmemo.message" - } - } - - } - -export function ZMemoSignatureKeyName(): string { - return "vrsc::system.zmemo.signature"; - } -export function ZMemoSignatureKey(): VDXFKeyInterface { - return { - "vdxfid": "i7mrLLjUfGYuHJwnsxFvd282hsdn4staJG", - "indexid": "xCbxo9AZWamZuUppjdv5bQeZjXeo1vbaCc", - "hash160result": "7b47c8cd90c4c3ddc542f37ca77473b7325a272f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::system.zmemo.signature" - } - } - } - -export function CurrencyStartNotarizationKeyName(): string { - return "vrsc::system.currency.startnotarization"; - } -export function CurrencyStartNotarizationKey(): VDXFKeyInterface { - return { - "vdxfid": "iRvxVcGLaCXcDiAfnQ5FfeBCo2AiBibAft", - "indexid": "xWm4xQhRRWkGqt3he5jQe2hjpgBj5C7Tj3", - "hash160result": "b537201ca6465976bea7bdb03119644a858052f6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::system.currency.startnotarization" - } - } - } \ No newline at end of file +export const DataByteKeyName = "vrsc::data.type.byte"; +export const DataByteKey: VDXFKeyInterface = { + "vdxfid": "iBXUHbh4iacbeZnzDRxishvBSrYk2S2k7t", + "indexid": "xGMakQ89ZtqGGjg257csr6SiUWZksGmjWp", + "hash160result": "2e97a8bba443773812341e1d761530d3bba04f58", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.byte" + } +} +export const DataInt16KeyName = "vrsc::data.type.int16"; +export const DataInt16Key: VDXFKeyInterface = { + "vdxfid": "iDtTv3wf1Vk3M2Y46RjLPKtttx5hydwtY1", + "indexid": "xJiaNrNjroxhyCR5x7PVMiRRvc6ipg6N9g", + "hash160result": "ee334ebd432db0b24cc2702eda61c28ff44d3872", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int16" + } +} +export const DataUint16KeyName = "vrsc::data.type.uint16"; +export const DataUint16Key: VDXFKeyInterface = { + + "vdxfid": "iHn7urT2yVfS7pQn6WGAmCVWh4HBLV24n3", + "indexid": "xNcENet7pot6jzHoxBvKjb23iiJCGpekDk", + "hash160result": "5cfc322d2a216145f7b82714115e7953269de59c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint16" + } +} + +export const DataInt32KeyName = "vrsc::data.type.int32"; +export const DataInt32Key: VDXFKeyInterface = { + + "vdxfid": "iHpLPprRDv3H5H3ZMaJ9nyHFzkG9xJWZDb", + "indexid": "xNeSrdHW5EFwhSvbDFxJmMoo2QHAtoEaEM", + "hash160result": "3e9ba478b23b13232f28d21051d907ce8fdd509d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int32" + } +} + +export const DataUint32KeyName = "vrsc::data.type.uint32"; + +export const DataUint32Key: VDXFKeyInterface = { + + "vdxfid": "iKSj5zhd6cSsLudaGhtfmisRNgEM7SPFWY", + "indexid": "xQGqYo8hwvfXy5Wc8PYpk7PxQLFMwfP7Fp", + "hash160result": "f279818aeb4fe768956b350d1fc7216ca0e82aaf", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint32" + } +} + +export const DataInt64KeyName = "vrsc::data.type.int64"; + +export const DataInt64Key: VDXFKeyInterface = { + + "vdxfid": "iKB3TGi9Dg5HZ4nQAgLQAgp3tuXBaRKHpC", + "indexid": "xQ19v59E4zHxBEfS2MzZ95LavZYCTTeuyg", + "hash160result": "ab3705f8a7fae59786ef897b014df85fcd9533ac", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int64" + } +} + +export const DataUint64KeyName = "vrsc::data.type.uint64"; + +export const DataUint64Key: VDXFKeyInterface = { + + "vdxfid": "iPamkQf38AeGQ8z4zSsZL7t9kXMeUkYLJL", + "indexid": "xUQtDD67yUrw2Js6r8XiJWQgnBNfNeeoUq", + "hash160result": "bb2ae9ed3e9f400def0724937fbf65f23ef690dc", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint64" + } +} + +export const DataUint160KeyName = "vrsc::data.type.uint160"; + +export const DataUint160Key: VDXFKeyInterface = { + + "vdxfid": "iAAwdbLyKYL39nJ1eQHaHtb75krg4mV1Lq", + "indexid": "xF146Pn4ArYhmxB3W5wjGH7e7Qsgx9bkpj", + "hash160result": "d97d2295d4c73f6f6f0697c8086bd822d6977549", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint160" + } +} + +export const DataUint256KeyName = "vrsc::data.type.uint256"; + +export const DataUint256Key: VDXFKeyInterface = { + + "vdxfid": "i8k7g7z6grtGYrNZmZr5TQ872aHssXuuua", + "indexid": "xDaE8vRBYB6wB2FbdFWERnee4EJtjbCtMM", + "hash160result": "939b27bea698d180237c40b2194025acc673cb39", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint256" + } +} + +export const DataStringKeyName = "vrsc::data.type.string"; + +export const DataStringKey: VDXFKeyInterface = { + + "vdxfid": "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c", + "indexid": "xPwgY6oPdusaAgNK3u5yHCQG5NsHEcBpi5", + "hash160result": "e5c061641228a399169211e666de18448b7b8bab", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.string" + } +} + +// this is a key for a typed vector, which will have the object type key following the vector key +export const DataVectorKeyName = "vrsc::data.type.vector"; +export const DataVectorKey: VDXFKeyInterface = { + + "vdxfid": "iAEShwk1xjdGhaUSz3Maa2XR32o3vRuHq7", + "indexid": "xF4ZAkB6p3qwKkMUqj1jYR3x4gp4mGz657", + "hash160result": "503875b0dc301189a98927d3ece56c5f921c1f4a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.vector" + } +} + +export const DataByteVectorKeyName = "vrsc::data.type.bytevector"; + +export const DataByteVectorKey: VDXFKeyInterface = { + + "vdxfid": "iKMhRLX1JHQihVZx2t2pAWW2uzmK6AzwW3", + "indexid": "xQBot8x69bdPKfSytZgy8u2ZwenKzVjR4X", + "hash160result": "cc3ae6466006629f5105f71325bb2a19107037ae", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.bytevector" + } +} + +export const DataInt32VectorKeyName = "vrsc::data.type.int32vector"; + +export const DataInt32VectorKey: VDXFKeyInterface = { + + "vdxfid": "iJZt2fcUv1iivbfC3tuPuefabcTppQEoVq", + "indexid": "xPPzVU3ZmKwPYmYDuaZYt3C7dGUqk939N7", + "hash160result": "c0847f3025c408059b5a8f6a9e414a8ed8288da5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int32vector" + } +} + +export const DataInt64VectorKeyName = "vrsc::data.type.int64vector"; + +export const DataInt64VectorKey: VDXFKeyInterface = { + + "vdxfid": "i4qtYkFS9iNyu2AkqwoSn1xyCdfH9PUvak", + "indexid": "x9g11YgX12beXC3nhdTbkQVWEHgJ2jqfz1", + "hash160result": "c6219ea13884987453692cb14c72d5f6a47c020f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int64vector" + } +} + +export const DataCurrencyMapKeyName = "vrsc::data.type.object.currencymap"; + +export const DataCurrencyMapKey: VDXFKeyInterface = { + + "vdxfid": "iMrGhzkZq5fpWWSa1RambRySFPb7CuvKuX", + "indexid": "xSgPAoBegPtV8gKbs7EvZpVyH3c858ZUvL", + "hash160result": "25db70c2fcae2571f89201181bec04587e1f8fc9", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.currencymap" + } +} + +export const DataRatingsKeyName = "vrsc::data.type.object.ratings"; + +export const DataRatingsKey: VDXFKeyInterface = { + + "vdxfid": "iHJComZUXXGniLkDhjYprWYEN8qvQGDoam", + "indexid": "xN8KGZzZNqVTLWdFZRCypu4mPnrwHFKbCK", + "hash160result": "32cad57ff1dc5db4b5ba573ce01bc9c89b0d9e97", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.ratings" + } +} + +export const DataURLKeyName = "vrsc::data.type.object.url"; + +export const DataURLKey: VDXFKeyInterface = { + + "vdxfid": "iJ7xdhJTJAvJubNnSJFXyA3jujzqGxjLuZ", + "indexid": "xNx56VjY9V8yXmFpHyugwYaGwQ1rCt6J9W", + "hash160result": "7748bfaf53dd2ff63ed5f73a41174c360f30a6a0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.url" + } +} + +export const DataTransferDestinationKeyName = "vrsc::data.type.object.transferdestination"; + +export const DataTransferDestinationKey: VDXFKeyInterface = { + + "vdxfid": "i91L6zwZQrkbNVMB1AZ1Z671qybexRmeVK", + "indexid": "xDqSZoNeGAyFzfECrrDAXUdYsdcfs3Zuku", + "hash160result": "92f38773849383146037b16a48ea350c1c11ac3c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.transferdestination" + } +} + +export const UTXORefKeyName = "vrsc::data.type.object.utxoref"; + +export const UTXORefKey: VDXFKeyInterface = { + + "vdxfid": "iNcKvh7mazaXptzHf85q6EtpFYFE7asKC1", + "indexid": "xTSSPVYrSJoCT4sKWojz4dRMHCGF3h9tM4", + "hash160result": "013e760f7451c289672993ea391ae643c21ce4d1", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.utxoref" + } +} + +export const CrossChainDataRefKeyName = "vrsc::data.type.object.crosschaindataref"; + +export const CrossChainDataRefKey: VDXFKeyInterface = { + + "vdxfid": "iP3euVSzNcXUrLNHnQnR9G6q8jeYuGSxgw", + "indexid": "xTsmNHt5Dvk9UWFKe6Sa7edNAPfZmJVgLc", + "hash160result": "4d33e0aee0f648c7871b2661d1221b57c05aaed6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.crosschaindataref" + } +} + +export const EncryptionDescriptorKeyName = "vrsc::data.type.encryptiondescriptor"; + +export const EncryptionDescriptorKey: VDXFKeyInterface = { + + "vdxfid": "iHEEK8ipj58BeKZNWuaaR2tDR5RK2kmf9A", + "indexid": "xN4Lmw9uaPLrGVSQNbEjPRQkSjSKxsHUQu", + "hash160result": "8d021acc1b68335bd7d37b28ff773c138ea5dd96", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.encryptiondescriptor" + } +} + +export const SaltedDataKeyName = "vrsc::data.type.salteddata"; + +export const SaltedDataKey: VDXFKeyInterface = { + + "vdxfid": "i92U1nLuLJkC44FZZ4Lq9zk4qW3HrWAWNo", + "indexid": "xDraUamzBcxrgE8bQjzz8PGbsA4JiFskTD", + "hash160result": "9e13510e01d0d03a7bc90d7a2ef32824f515e33c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.salteddata" + } +} + +export const DataDescriptorKeyName = "vrsc::data.type.object.datadescriptor"; + +export const DataDescriptorKey: VDXFKeyInterface = { + + "vdxfid": "i4GC1YGEVD21afWudGoFJVdnfjJ5XWnCQv", + "indexid": "x96JULhKLXEgCqPwUxTQGtAKhPK6Qh1iaW", + "hash160result": "4d4f12424ded2033a526a4e2a8835fc5b2eba208", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.datadescriptor" + } +} + +export const SignatureDataKeyName = "vrsc::data.signaturedata"; + +export const SignatureDataKey: VDXFKeyInterface = { + + "vdxfid": "i7PcVF9wwPtQ6p6jDtCVpohX65pTZuP2ah", + "indexid": "xCDix3b2ni74iyym5ZreoCE47jqUTBFRAb", + "hash160result": "b48b359e9a00042cec64f7f66ac717d388a4f22a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.signaturedata" + } +} + +export const VectorUint256KeyName = "vrsc::data.mmrhashes"; + +export const VectorUint256Key: VDXFKeyInterface = { + + "vdxfid": "i9UgJ2WxGw95PKdoCXjpfnBShtP5gi9fxS", + "indexid": "xEJnkpx38FMk1VWq4DPyeAhyjYQ6X5Gsti", + "hash160result": "8c1afd59e904f6d2702699963abccbc6d326d841", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.mmrhashes" + } +} + +export const MMRLinksKeyName = "vrsc::data.mmrlinks"; + +export const MMRLinksKey: VDXFKeyInterface = { + + "vdxfid": "iPQsnA1R8UjHNddZKZ3FxsuKQ5WzKqSC7w", + "indexid": "xUEzExSVynwwzoWbBEhQwGRrRjY1Bc2MYc", + "hash160result": "f535a4e9ac0f94eda01695d16489a4a102d6b1da", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.mmrlinks" + } +} + +export const MMRDescriptorKeyName = "vrsc::data.mmrdescriptor"; + +export const MMRDescriptorKey: VDXFKeyInterface = { + + "vdxfid": "i9dVDb4LgfMYrZD1JBNP2uaso4bNAkT4Jr", + "indexid": "xETbgPVRXyaDUj639s2Y1J7QpicP4DvZMt", + "hash160result": "97273a4c02d6be002f8d69c3979616732ba68243", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.mmrdescriptor" + } +} + +export const TypeDefinitionKeyName = "vrsc::data.type.typedefinition"; + +export const TypeDefinitionKey: VDXFKeyInterface = { + + "vdxfid": "iL5MPPHWXQEY3p2Q1UsmGDvXsgPiqd1W1S", + "indexid": "xQuTrBibNiTCfyuRsAXvEcT4uLQjhxrpyL", + "hash160result": "ae8d805d9650c0512a6b6ec33e963386542f18b6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.typedefinition" + } +} + +export const MultiMapKeyName = "vrsc::identity.multimapkey"; + +export const MultiMapKey: VDXFKeyInterface = { + + "vdxfid": "i3mbggp3NBR77C5JeFQJTpAxmgMidayLLE", + "indexid": "x8bi9VF8DVdmjMxLVw4TSChVoLNjUyapgs", + "hash160result": "6920bb81b420bc95e29a10ed677379b1e39e3a03", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.multimapkey" + } +} + +export const ContentMultiMapRemoveKeyName = "vrsc::identity.multimapremove"; + +export const ContentMultiMapRemoveKey: VDXFKeyInterface = { + + "vdxfid": "i5Zkx5Z7tEfh42xtKfwbJ5LgEWE9rEgpFY", + "indexid": "xAPsQszCjYtMgCqvBMbkGTsDGAFAmrN33A", + "hash160result": "d393b986e4f82db7bec82d97b186882d739ded16", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.multimapremove" + } +} + + +// for any ID, this key indexes content that applies to representing the profile of +// that ID. there may be many mime-type instances of a particular piece of profile media +export const ProfileMediaKeyName = "vrsc::identity.profile.media"; + +export const ProfileMediaKey: VDXFKeyInterface = { + + "vdxfid": "iEYsp2njSt1M4EVYi9uuAPBU2wpKmThkkr", + "indexid": "xKNzGqDpJCE1gQNaZqa48mi14bqLaG669g", + "hash160result": "e95b2ee1abb130a93900ddaef2d8e528010f7c79", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.profile.media" + } +} + +export const ZMemoMessageKeyName = "vrsc::system.zmemo.message"; + +export const ZMemoMessageKey: VDXFKeyInterface = { + + "vdxfid": "iNHg1n828PUxktkYeNxC6sdVmuKTipn3L3", + "indexid": "xT7nUaZ6yhhdP4daW4cM5GA2oZLUaNVaBD", + "hash160result": "4a8f418203621f10d1a61701be8dbbbb38fa5cce", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::system.zmemo.message" + } +} + +export const ZMemoSignatureKeyName = "vrsc::system.zmemo.signature"; + +export const ZMemoSignatureKey: VDXFKeyInterface = { + + "vdxfid": "i7mrLLjUfGYuHJwnsxFvd282hsdn4staJG", + "indexid": "xCbxo9AZWamZuUppjdv5bQeZjXeo1vbaCc", + "hash160result": "7b47c8cd90c4c3ddc542f37ca77473b7325a272f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::system.zmemo.signature" + } +} + +export const CurrencyStartNotarizationKeyName = "vrsc::system.currency.startnotarization"; + +export const CurrencyStartNotarizationKey: VDXFKeyInterface = { + + "vdxfid": "iRvxVcGLaCXcDiAfnQ5FfeBCo2AiBibAft", + "indexid": "xWm4xQhRRWkGqt3he5jQe2hjpgBj5C7Tj3", + "hash160result": "b537201ca6465976bea7bdb03119644a858052f6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::system.currency.startnotarization" + } +} From d6dc753b3cc18a4df9cbf199e8a2016bbc436d1b Mon Sep 17 00:00:00 2001 From: Monkins1010 Date: Wed, 2 Oct 2024 16:28:45 +0100 Subject: [PATCH 108/120] Build dist Update --- dist/api/classes/index.d.ts | 6 +++--- dist/api/classes/index.js | 2 +- dist/constants/cmds.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/api/classes/index.d.ts b/dist/api/classes/index.d.ts index d42bb69..31b7f1a 100644 --- a/dist/api/classes/index.d.ts +++ b/dist/api/classes/index.d.ts @@ -43,6 +43,6 @@ import { EstimateConversionRequest } from './EstimateConversion/EstimateConversi import { EstimateConversionResponse } from './EstimateConversion/EstimateConversionResponse'; import { ZGetOperationStatusRequest } from './ZGetOperationStatus/ZGetOperationStatusRequest'; import { ZGetOperationStatusResponse } from './ZGetOperationStatus/ZGetOperationStatusResponse'; -export { GetAddressBalanceRequest, GetAddressBalanceResponse, GetAddressDeltasRequest, GetAddressDeltasResponse, GetAddressMempoolRequest, GetAddressMempoolResponse, GetAddressUtxosRequest, GetAddressUtxosResponse, GetBlockRequest, GetBlockResponse, GetVdxfIdRequest, GetVdxfIdResponse, GetIdentityRequest, GetIdentityContentRequest, GetIdentityResponse, GetCurrencyRequest, GetCurrencyResponse, GetOffersRequest, GetOffersResponse, GetRawTransactionRequest, GetRawTransactionResponse, MakeOfferRequest, MakeOfferResponse, SendRawTransactionRequest, SendRawTransactionResponse, GetInfoRequest, GetInfoResponse, VerifyMessageRequest, VerifyMessageResponse, SignMessageRequest, SignMessageResponse, SendCurrencyRequest, SendCurrencyResponse, FundRawTransactionRequest, FundRawTransactionResponse, GetCurrencyConvertersRequest, GetCurrencyConvertersResponse, ListCurrenciesRequest, ListCurrenciesResponse, EstimateConversionRequest, EstimateConversionResponse, ZGetOperationStatusRequest, ZGetOperationStatusResponse }; -export declare type RpcRequest = typeof MakeOfferRequest | typeof GetOffersRequest | typeof GetAddressBalanceRequest | typeof GetAddressDeltasRequest | typeof GetAddressMempoolRequest | typeof GetAddressUtxosRequest | typeof GetBlockRequest | typeof GetVdxfIdRequest | typeof GetInfoRequest | typeof GetIdentityRequest | typeof GetIdentityContentRequest | typeof GetCurrencyRequest | typeof SendRawTransactionRequest | typeof GetRawTransactionRequest | typeof VerifyMessageRequest | typeof SignMessageRequest | typeof SendCurrencyRequest | typeof FundRawTransactionRequest | typeof GetCurrencyConvertersRequest | typeof ListCurrenciesRequest | typeof EstimateConversionRequest | typeof ZGetOperationStatusRequest; -export declare type RpcResponse = typeof MakeOfferResponse | typeof GetOffersResponse | typeof GetAddressBalanceResponse | typeof GetAddressDeltasResponse | typeof GetAddressMempoolResponse | typeof GetAddressUtxosResponse | typeof GetBlockResponse | typeof GetVdxfIdResponse | typeof GetInfoResponse | typeof GetIdentityResponse | typeof GetCurrencyResponse | typeof SendRawTransactionResponse | typeof GetRawTransactionResponse | typeof VerifyMessageResponse | typeof SignMessageResponse | typeof SendCurrencyResponse | typeof FundRawTransactionResponse | typeof GetCurrencyConvertersResponse | typeof ListCurrenciesResponse | typeof EstimateConversionResponse | typeof ZGetOperationStatusResponse; +export { GetAddressBalanceRequest, GetAddressBalanceResponse, GetAddressDeltasRequest, GetAddressDeltasResponse, GetAddressMempoolRequest, GetAddressMempoolResponse, GetAddressUtxosRequest, GetAddressUtxosResponse, GetBlockRequest, GetBlockResponse, GetVdxfIdRequest, GetVdxfIdResponse, GetIdentityRequest, GetIdentityContentRequest, GetIdentityResponse, GetCurrencyRequest, GetCurrencyResponse, GetOffersRequest, GetOffersResponse, GetRawTransactionRequest, GetRawTransactionResponse, MakeOfferRequest, MakeOfferResponse, SendRawTransactionRequest, SendRawTransactionResponse, GetInfoRequest, GetInfoResponse, VerifyMessageRequest, VerifyMessageResponse, SignMessageRequest, SignMessageResponse, SignDataRequest, SignDataResponse, SendCurrencyRequest, SendCurrencyResponse, FundRawTransactionRequest, FundRawTransactionResponse, GetCurrencyConvertersRequest, GetCurrencyConvertersResponse, ListCurrenciesRequest, ListCurrenciesResponse, EstimateConversionRequest, EstimateConversionResponse, ZGetOperationStatusRequest, ZGetOperationStatusResponse }; +export declare type RpcRequest = typeof MakeOfferRequest | typeof GetOffersRequest | typeof GetAddressBalanceRequest | typeof GetAddressDeltasRequest | typeof GetAddressMempoolRequest | typeof GetAddressUtxosRequest | typeof GetBlockRequest | typeof GetVdxfIdRequest | typeof GetInfoRequest | typeof GetIdentityRequest | typeof GetIdentityContentRequest | typeof GetCurrencyRequest | typeof SendRawTransactionRequest | typeof GetRawTransactionRequest | typeof VerifyMessageRequest | typeof SignMessageRequest | typeof SignDataRequest | typeof SendCurrencyRequest | typeof FundRawTransactionRequest | typeof GetCurrencyConvertersRequest | typeof ListCurrenciesRequest | typeof EstimateConversionRequest | typeof ZGetOperationStatusRequest; +export declare type RpcResponse = typeof MakeOfferResponse | typeof GetOffersResponse | typeof GetAddressBalanceResponse | typeof GetAddressDeltasResponse | typeof GetAddressMempoolResponse | typeof GetAddressUtxosResponse | typeof GetBlockResponse | typeof GetVdxfIdResponse | typeof GetInfoResponse | typeof GetIdentityResponse | typeof GetCurrencyResponse | typeof SendRawTransactionResponse | typeof GetRawTransactionResponse | typeof VerifyMessageResponse | typeof SignMessageResponse | typeof SignDataResponse | typeof SendCurrencyResponse | typeof FundRawTransactionResponse | typeof GetCurrencyConvertersResponse | typeof ListCurrenciesResponse | typeof EstimateConversionResponse | typeof ZGetOperationStatusResponse; diff --git a/dist/api/classes/index.js b/dist/api/classes/index.js index bb1d4c7..f63b412 100644 --- a/dist/api/classes/index.js +++ b/dist/api/classes/index.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.ZGetOperationStatusResponse = exports.ZGetOperationStatusRequest = exports.EstimateConversionResponse = exports.EstimateConversionRequest = exports.ListCurrenciesResponse = exports.ListCurrenciesRequest = exports.GetCurrencyConvertersResponse = exports.GetCurrencyConvertersRequest = exports.FundRawTransactionResponse = exports.FundRawTransactionRequest = exports.SendCurrencyResponse = exports.SendCurrencyRequest = exports.SignMessageResponse = exports.SignMessageRequest = exports.VerifyMessageResponse = exports.VerifyMessageRequest = exports.GetInfoResponse = exports.GetInfoRequest = exports.SendRawTransactionResponse = exports.SendRawTransactionRequest = exports.MakeOfferResponse = exports.MakeOfferRequest = exports.GetRawTransactionResponse = exports.GetRawTransactionRequest = exports.GetOffersResponse = exports.GetOffersRequest = exports.GetCurrencyResponse = exports.GetCurrencyRequest = exports.GetIdentityResponse = exports.GetIdentityContentRequest = exports.GetIdentityRequest = exports.GetVdxfIdResponse = exports.GetVdxfIdRequest = exports.GetBlockResponse = exports.GetBlockRequest = exports.GetAddressUtxosResponse = exports.GetAddressUtxosRequest = exports.GetAddressMempoolResponse = exports.GetAddressMempoolRequest = exports.GetAddressDeltasResponse = exports.GetAddressDeltasRequest = exports.GetAddressBalanceResponse = exports.GetAddressBalanceRequest = void 0; +exports.ZGetOperationStatusResponse = exports.ZGetOperationStatusRequest = exports.EstimateConversionResponse = exports.EstimateConversionRequest = exports.ListCurrenciesResponse = exports.ListCurrenciesRequest = exports.GetCurrencyConvertersResponse = exports.GetCurrencyConvertersRequest = exports.FundRawTransactionResponse = exports.FundRawTransactionRequest = exports.SendCurrencyResponse = exports.SendCurrencyRequest = exports.SignDataResponse = exports.SignDataRequest = exports.SignMessageResponse = exports.SignMessageRequest = exports.VerifyMessageResponse = exports.VerifyMessageRequest = exports.GetInfoResponse = exports.GetInfoRequest = exports.SendRawTransactionResponse = exports.SendRawTransactionRequest = exports.MakeOfferResponse = exports.MakeOfferRequest = exports.GetRawTransactionResponse = exports.GetRawTransactionRequest = exports.GetOffersResponse = exports.GetOffersRequest = exports.GetCurrencyResponse = exports.GetCurrencyRequest = exports.GetIdentityResponse = exports.GetIdentityContentRequest = exports.GetIdentityRequest = exports.GetVdxfIdResponse = exports.GetVdxfIdRequest = exports.GetBlockResponse = exports.GetBlockRequest = exports.GetAddressUtxosResponse = exports.GetAddressUtxosRequest = exports.GetAddressMempoolResponse = exports.GetAddressMempoolRequest = exports.GetAddressDeltasResponse = exports.GetAddressDeltasRequest = exports.GetAddressBalanceResponse = exports.GetAddressBalanceRequest = void 0; const GetAddressBalanceRequest_1 = require("./GetAddressBalance/GetAddressBalanceRequest"); Object.defineProperty(exports, "GetAddressBalanceRequest", { enumerable: true, get: function () { return GetAddressBalanceRequest_1.GetAddressBalanceRequest; } }); const GetAddressBalanceResponse_1 = require("./GetAddressBalance/GetAddressBalanceResponse"); diff --git a/dist/constants/cmds.js b/dist/constants/cmds.js index 687b6cd..4fd7e0f 100644 --- a/dist/constants/cmds.js +++ b/dist/constants/cmds.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.Z_GET_OPERATION_STATUS = exports.ESTIMATE_CONVERSION = exports.LIST_CURRENCIES = exports.GET_CURRENCY_CONVERTERS = exports.SEND_CURRENCY = exports.FUND_RAW_TRANSACTION = exports.VERIFY_MESSAGE = exports.SIGN_MESSAGE = exports.GET_ADDRESS_UTXOS = exports.SEND_RAW_TRANSACTION = exports.GET_ADDRESS_MEMPOOL = exports.GET_ADDRESS_DELTAS = exports.GET_RAW_TRANSACTION = exports.GET_VDXF_ID = exports.GET_BLOCK = exports.GET_INFO = exports.GET_ADDRESS_BALANCE = exports.GET_CURRENCY = exports.GET_IDENTITY_CONTENT = exports.GET_IDENTITY = exports.GET_OFFERS = exports.MAKE_OFFER = void 0; +exports.Z_GET_OPERATION_STATUS = exports.ESTIMATE_CONVERSION = exports.LIST_CURRENCIES = exports.GET_CURRENCY_CONVERTERS = exports.SEND_CURRENCY = exports.FUND_RAW_TRANSACTION = exports.VERIFY_MESSAGE = exports.SIGN_DATA = exports.SIGN_MESSAGE = exports.GET_ADDRESS_UTXOS = exports.SEND_RAW_TRANSACTION = exports.GET_ADDRESS_MEMPOOL = exports.GET_ADDRESS_DELTAS = exports.GET_RAW_TRANSACTION = exports.GET_VDXF_ID = exports.GET_BLOCK = exports.GET_INFO = exports.GET_ADDRESS_BALANCE = exports.GET_CURRENCY = exports.GET_IDENTITY_CONTENT = exports.GET_IDENTITY = exports.GET_OFFERS = exports.MAKE_OFFER = void 0; exports.MAKE_OFFER = 'makeoffer'; exports.GET_OFFERS = 'getoffers'; exports.GET_IDENTITY = 'getidentity'; From 32464f44357f187bac4209194088843fb27ceef2 Mon Sep 17 00:00:00 2001 From: Monkins1010 Date: Wed, 2 Oct 2024 21:51:25 +0100 Subject: [PATCH 109/120] update json key names and make consistent json functions --- dist/pbaas/ContentMultiMapRemove.d.ts | 7 ++++ dist/pbaas/ContentMultiMapRemove.js | 8 ++++ dist/pbaas/CrossChainDataRef.d.ts | 20 +++++++++- dist/pbaas/CrossChainDataRef.js | 15 ++++++- dist/pbaas/DataDescriptor.d.ts | 18 +++++++-- dist/pbaas/DataDescriptor.js | 4 +- dist/pbaas/IdentityMultimapRef.d.ts | 10 +++++ dist/pbaas/IdentityMultimapRef.js | 11 ++++++ dist/pbaas/MMRDescriptor.d.ts | 30 ++++++-------- dist/pbaas/MMRDescriptor.js | 4 +- dist/pbaas/PBaaSEvidenceRef.d.ts | 11 +++++- dist/pbaas/PBaaSEvidenceRef.js | 27 ++++++++----- dist/pbaas/Rating.d.ts | 10 ++++- dist/pbaas/Rating.js | 17 +++++++- dist/pbaas/SignatureData.js | 2 +- dist/pbaas/URLRef.d.ts | 4 ++ dist/pbaas/URLRef.js | 6 +++ dist/pbaas/UTXORef.d.ts | 6 ++- dist/pbaas/UTXORef.js | 8 +++- dist/pbaas/VdxfUniValue.js | 12 ++---- .../attestation/personalInfo.test.ts | 4 +- src/__tests__/pbaas/dataDescriptor.test.ts | 17 ++++---- src/pbaas/ContentMultiMapRemove.ts | 16 ++++++++ src/pbaas/CrossChainDataRef.ts | 17 +++++++- src/pbaas/DataDescriptor.ts | 21 +++++++--- src/pbaas/IdentityMultimapRef.ts | 22 +++++++++++ src/pbaas/MMRDescriptor.ts | 19 ++++++--- src/pbaas/PBaaSEvidenceRef.ts | 39 +++++++++++++------ src/pbaas/Rating.ts | 29 +++++++++++++- src/pbaas/SignatureData.ts | 2 +- src/pbaas/URLRef.ts | 7 ++++ src/pbaas/UTXORef.ts | 9 ++++- src/pbaas/VdxfUniValue.ts | 24 +++++------- 33 files changed, 354 insertions(+), 102 deletions(-) diff --git a/dist/pbaas/ContentMultiMapRemove.d.ts b/dist/pbaas/ContentMultiMapRemove.d.ts index 2a73625..758a44d 100644 --- a/dist/pbaas/ContentMultiMapRemove.d.ts +++ b/dist/pbaas/ContentMultiMapRemove.d.ts @@ -2,6 +2,12 @@ /// import { BigNumber } from '../utils/types/BigNumber'; import { SerializableEntity } from '../utils/types/SerializableEntity'; +export interface ContentMultiMapRemoveJson { + version: number; + action: number; + entrykey: string; + valuehash: string; +} export declare class ContentMultiMapRemove implements SerializableEntity { version: BigNumber; action: BigNumber; @@ -26,4 +32,5 @@ export declare class ContentMultiMapRemove implements SerializableEntity { getByteLength(): number; toBuffer(): Buffer; fromBuffer(buffer: Buffer, offset?: number): number; + static fromJson(data: ContentMultiMapRemoveJson): ContentMultiMapRemove; } diff --git a/dist/pbaas/ContentMultiMapRemove.js b/dist/pbaas/ContentMultiMapRemove.js index 04e77e2..78fb0b5 100644 --- a/dist/pbaas/ContentMultiMapRemove.js +++ b/dist/pbaas/ContentMultiMapRemove.js @@ -49,6 +49,14 @@ class ContentMultiMapRemove { } return reader.offset; } + static fromJson(data) { + return new ContentMultiMapRemove({ + version: new bn_js_1.BN(data.version), + action: new bn_js_1.BN(data.action), + entry_key: data.entrykey, + value_hash: Buffer.from(data.valuehash, 'hex') + }); + } } exports.ContentMultiMapRemove = ContentMultiMapRemove; ContentMultiMapRemove.VERSION_INVALID = new bn_js_1.BN(0); diff --git a/dist/pbaas/CrossChainDataRef.d.ts b/dist/pbaas/CrossChainDataRef.d.ts index e919fe4..b80b16e 100644 --- a/dist/pbaas/CrossChainDataRef.d.ts +++ b/dist/pbaas/CrossChainDataRef.d.ts @@ -3,6 +3,9 @@ import { SerializableEntity } from '../utils/types/SerializableEntity'; import { PBaaSEvidenceRef } from './PBaaSEvidenceRef'; import { IdentityMultimapRef } from './IdentityMultimapRef'; import { URLRef } from './URLRef'; +export interface CrossChainDataRefJson { + ref: PBaaSEvidenceRef | IdentityMultimapRef | URLRef; +} export declare class CrossChainDataRef implements SerializableEntity { ref: PBaaSEvidenceRef | IdentityMultimapRef | URLRef; static TYPE_CROSSCHAIN_DATAREF: number; @@ -14,5 +17,20 @@ export declare class CrossChainDataRef implements SerializableEntity { toBuffer(): Buffer; fromBuffer(buffer: Buffer, offset?: number): number; isValid(): boolean; - toJson(): any; + toJson(): { + type: number; + } | { + type: number; + version: number; + flags: number; + output: any; + objectnum: number; + subobject: number; + systemid: string; + } | { + type: number; + version: string; + url: string; + }; + static fromJson(data: any): CrossChainDataRef; } diff --git a/dist/pbaas/CrossChainDataRef.js b/dist/pbaas/CrossChainDataRef.js index 37ca0d3..a0424b1 100644 --- a/dist/pbaas/CrossChainDataRef.js +++ b/dist/pbaas/CrossChainDataRef.js @@ -53,7 +53,20 @@ class CrossChainDataRef { (typeof (this.ref) == typeof (URLRef_1.URLRef) && this.ref.isValid()); } toJson() { - return this.ref.toJson(); + return Object.assign(Object.assign({}, this.ref.toJson()), { type: this.which() }); + } + static fromJson(data) { + if (data.type == CrossChainDataRef.TYPE_CROSSCHAIN_DATAREF) { + return new CrossChainDataRef(PBaaSEvidenceRef_1.PBaaSEvidenceRef.fromJson(data)); + } + else if (data.type == CrossChainDataRef.TYPE_IDENTITY_DATAREF) { + return new CrossChainDataRef(IdentityMultimapRef_1.IdentityMultimapRef.fromJson(data)); + } + else if (data.type == CrossChainDataRef.TYPE_URL_REF) { + return new CrossChainDataRef(URLRef_1.URLRef.fromJson(data)); + } + else + throw new Error("Invalid CrossChainDataRef type"); } } exports.CrossChainDataRef = CrossChainDataRef; diff --git a/dist/pbaas/DataDescriptor.d.ts b/dist/pbaas/DataDescriptor.d.ts index fc4cda8..8f02d48 100644 --- a/dist/pbaas/DataDescriptor.d.ts +++ b/dist/pbaas/DataDescriptor.d.ts @@ -3,6 +3,19 @@ import { BigNumber } from '../utils/types/BigNumber'; import { BufferDataVdxfObject } from '../vdxf/index'; import { SerializableEntity } from '../utils/types/SerializableEntity'; +export interface DataDescriptorJson { + version: number; + flags?: number; + objectdata?: string | { + ['message']: string; + } | object; + label?: string; + mimetype?: string; + salt?: string; + epk?: string; + ivk?: string; + ssk?: string; +} export declare class DataDescriptor implements SerializableEntity { static VERSION_INVALID: import("bn.js"); static VERSION_FIRST: import("bn.js"); @@ -52,10 +65,7 @@ export declare class DataDescriptor implements SerializableEntity { CalcFlags(): BigNumber; SetFlags(): void; isValid(): boolean; - toJson(): { - version: string; - flags: string; - }; + toJson(): DataDescriptorJson; } export declare class VDXFDataDescriptor extends BufferDataVdxfObject { dataDescriptor: DataDescriptor; diff --git a/dist/pbaas/DataDescriptor.js b/dist/pbaas/DataDescriptor.js index d1780e7..85a8b41 100644 --- a/dist/pbaas/DataDescriptor.js +++ b/dist/pbaas/DataDescriptor.js @@ -206,8 +206,8 @@ class DataDescriptor { } toJson() { const retval = { - version: this.version.toString(), - flags: this.flags.toString() + version: this.version.toNumber(), + flags: this.flags.toNumber() }; let isText = false; if (this.mimeType) { diff --git a/dist/pbaas/IdentityMultimapRef.d.ts b/dist/pbaas/IdentityMultimapRef.d.ts index 437007a..39921f7 100644 --- a/dist/pbaas/IdentityMultimapRef.d.ts +++ b/dist/pbaas/IdentityMultimapRef.d.ts @@ -2,6 +2,15 @@ /// import { BigNumber } from '../utils/types/BigNumber'; import { SerializableEntity } from '../utils/types/SerializableEntity'; +export interface IdentityMultimapRefJson { + version: number; + flags: number; + vdxfkey: string; + startheight: number; + endheight: number; + datahash: string; + systemid: string; +} export declare class IdentityMultimapRef implements SerializableEntity { version: BigNumber; flags: BigNumber; @@ -26,4 +35,5 @@ export declare class IdentityMultimapRef implements SerializableEntity { hasDataHash(): boolean; hasSystemID(): boolean; toJson(): void; + static fromJson(data: IdentityMultimapRefJson): IdentityMultimapRef; } diff --git a/dist/pbaas/IdentityMultimapRef.js b/dist/pbaas/IdentityMultimapRef.js index 72edc89..98b0f49 100644 --- a/dist/pbaas/IdentityMultimapRef.js +++ b/dist/pbaas/IdentityMultimapRef.js @@ -105,6 +105,17 @@ class IdentityMultimapRef { retval.startheight = this.height_start.toString(10); retval.endheight = this.height_end.toString(10); } + static fromJson(data) { + return new IdentityMultimapRef({ + version: new bn_js_1.BN(data.version), + flags: new bn_js_1.BN(data.flags), + key: data.vdxfkey, + height_start: new bn_js_1.BN(data.startheight), + height_end: new bn_js_1.BN(data.endheight), + data_hash: Buffer.from(data.datahash, 'hex'), + system_id: data.systemid + }); + } } exports.IdentityMultimapRef = IdentityMultimapRef; IdentityMultimapRef.FLAG_NO_DELETION = new bn_js_1.BN(1); diff --git a/dist/pbaas/MMRDescriptor.d.ts b/dist/pbaas/MMRDescriptor.d.ts index 5ee4902..69d0ff5 100644 --- a/dist/pbaas/MMRDescriptor.d.ts +++ b/dist/pbaas/MMRDescriptor.d.ts @@ -1,9 +1,17 @@ /// /// import { BigNumber } from '../utils/types/BigNumber'; -import { DataDescriptor } from './DataDescriptor'; +import { DataDescriptor, DataDescriptorJson } from './DataDescriptor'; import { EHashTypes } from './DataDescriptor'; import { SerializableEntity } from '../utils/types/SerializableEntity'; +export interface MMRDescriptorJson { + version: number; + objecthashtype?: number; + mmrhashtype?: number; + mmrroot?: DataDescriptorJson; + mmrhashes?: DataDescriptorJson; + datadescriptors?: DataDescriptorJson[]; +} export declare class MMRDescriptor implements SerializableEntity { static VERSION_INVALID: import("bn.js"); static FIRST_VERSION: import("bn.js"); @@ -23,27 +31,11 @@ export declare class MMRDescriptor implements SerializableEntity { mmrHashes?: DataDescriptor; dataDescriptors?: DataDescriptor[]; }); - static fromJson(data: any): MMRDescriptor; + static fromJson(data: MMRDescriptorJson): MMRDescriptor; getByteLength(): number; toBuffer(): Buffer; fromBuffer(buffer: Buffer, offset?: number): number; HasData(): boolean; isValid(): boolean; - toJson(): { - version: string; - objecthashtype: EHashTypes; - mmrhashtype: EHashTypes; - mmrroot: { - version: string; - flags: string; - }; - mmrhashes: { - version: string; - flags: string; - }; - datadescriptors: { - version: string; - flags: string; - }[]; - }; + toJson(): MMRDescriptorJson; } diff --git a/dist/pbaas/MMRDescriptor.js b/dist/pbaas/MMRDescriptor.js index 2a58919..70ece58 100644 --- a/dist/pbaas/MMRDescriptor.js +++ b/dist/pbaas/MMRDescriptor.js @@ -102,8 +102,8 @@ class MMRDescriptor { } toJson() { const retval = { - version: this.version.toString(), - objecthashtype: this.objectHashType, + version: this.version.toNumber(), + objecthashtype: this.objectHashType.valueOf(), mmrhashtype: this.mmrHashType, mmrroot: this.mmrRoot.toJson(), mmrhashes: this.mmrHashes.toJson(), diff --git a/dist/pbaas/PBaaSEvidenceRef.d.ts b/dist/pbaas/PBaaSEvidenceRef.d.ts index 44de737..8961c7a 100644 --- a/dist/pbaas/PBaaSEvidenceRef.d.ts +++ b/dist/pbaas/PBaaSEvidenceRef.d.ts @@ -3,6 +3,14 @@ import { BigNumber } from '../utils/types/BigNumber'; import { SerializableEntity } from '../utils/types/SerializableEntity'; import { UTXORef } from './UTXORef'; +export interface PBaaSEvidenceRefJson { + version: number; + flags: number; + output: any; + objectnum: number; + subobject: number; + systemid: string; +} export declare class PBaaSEvidenceRef implements SerializableEntity { version: BigNumber; flags: BigNumber; @@ -27,5 +35,6 @@ export declare class PBaaSEvidenceRef implements SerializableEntity { toBuffer(): Buffer; fromBuffer(buffer: Buffer, offset?: number): number; isValid(): boolean; - toJson(): any; + toJson(): PBaaSEvidenceRefJson; + static fromJson(json: PBaaSEvidenceRefJson): PBaaSEvidenceRef; } diff --git a/dist/pbaas/PBaaSEvidenceRef.js b/dist/pbaas/PBaaSEvidenceRef.js index 1f5b439..ac727f2 100644 --- a/dist/pbaas/PBaaSEvidenceRef.js +++ b/dist/pbaas/PBaaSEvidenceRef.js @@ -70,17 +70,26 @@ class PBaaSEvidenceRef { (this.flags.and(PBaaSEvidenceRef.FLAG_ISEVIDENCE).gt(new bn_js_1.BN(0))); } toJson() { - let retval; - retval.version = this.version.toString(10); - retval.flags = this.flags.toString(10); - retval.output = this.output.toJson(); - if (this.flags.and(PBaaSEvidenceRef.FLAG_HAS_SYSTEM).gt(new bn_js_1.BN(0))) { - retval.systemid = this.system_id; - } - retval.objectnum = this.object_num.toString(10); - retval.subobject = this.sub_object.toString(10); + let retval = { + version: this.version.toNumber(), + flags: this.flags.toNumber(), + output: this.output.toJson(), + objectnum: this.object_num.toNumber(), + subobject: this.sub_object.toNumber(), + systemid: this.system_id || "" + }; return retval; } + static fromJson(json) { + return new PBaaSEvidenceRef({ + version: new bn_js_1.BN(json.version), + flags: new bn_js_1.BN(json.flags), + output: UTXORef_1.UTXORef.fromJson(json.output), + object_num: new bn_js_1.BN(json.objectnum), + sub_object: new bn_js_1.BN(json.subobject), + system_id: json.systemid + }); + } } exports.PBaaSEvidenceRef = PBaaSEvidenceRef; PBaaSEvidenceRef.FLAG_ISEVIDENCE = new bn_js_1.BN(1); diff --git a/dist/pbaas/Rating.d.ts b/dist/pbaas/Rating.d.ts index 996f82c..ec6429c 100644 --- a/dist/pbaas/Rating.d.ts +++ b/dist/pbaas/Rating.d.ts @@ -2,6 +2,11 @@ /// import { BigNumber } from '../utils/types/BigNumber'; import { SerializableEntity } from '../utils/types/SerializableEntity'; +export interface RatingJson { + version: number; + trustlevel: number; + ratings: Map; +} export declare class Rating implements SerializableEntity { static VERSION_INVALID: import("bn.js"); static VERSION_FIRST: import("bn.js"); @@ -27,6 +32,9 @@ export declare class Rating implements SerializableEntity { toJson(): { version: string; trust_level: string; - ratings: Map; + ratings: { + [key: string]: string; + }; }; + static fromJson(json: RatingJson): Rating; } diff --git a/dist/pbaas/Rating.js b/dist/pbaas/Rating.js index 744e92b..a96dc12 100644 --- a/dist/pbaas/Rating.js +++ b/dist/pbaas/Rating.js @@ -55,12 +55,27 @@ class Rating { this.trust_level.gte(Rating.TRUST_FIRST) && this.trust_level.lte(Rating.TRUST_LAST); } toJson() { + const ratings = {}; + this.ratings.forEach((value, key) => { + ratings[key] = value.toString('hex'); + }); return { version: this.version.toString(), trust_level: this.trust_level.toString(), - ratings: this.ratings + ratings: ratings }; } + static fromJson(json) { + const ratings = new Map(); + for (const key in json.ratings) { + ratings.set(key, Buffer.from(json.ratings[key], 'hex')); + } + return new Rating({ + version: new bn_js_1.BN(json.version), + trust_level: new bn_js_1.BN(json.trustlevel), + ratings: ratings + }); + } } exports.Rating = Rating; Rating.VERSION_INVALID = new bn_js_1.BN(0, 10); diff --git a/dist/pbaas/SignatureData.js b/dist/pbaas/SignatureData.js index c1ddc77..81114da 100644 --- a/dist/pbaas/SignatureData.js +++ b/dist/pbaas/SignatureData.js @@ -154,7 +154,7 @@ class SignatureData { returnObj['vdxfkeynames'] = this.vdxf_key_names; } if (this.bound_hashes) { - returnObj['boundhashes'] = this.bound_hashes; + returnObj['boundhashes'] = this.bound_hashes.map((hash) => hash.toString('hex')); } return returnObj; } diff --git a/dist/pbaas/URLRef.d.ts b/dist/pbaas/URLRef.d.ts index 1165fdd..68daff1 100644 --- a/dist/pbaas/URLRef.d.ts +++ b/dist/pbaas/URLRef.d.ts @@ -19,4 +19,8 @@ export declare class URLRef implements SerializableEntity { version: string; url: string; }; + static fromJson(data: { + version: string; + url: string; + }): URLRef; } diff --git a/dist/pbaas/URLRef.js b/dist/pbaas/URLRef.js index b3b0526..bf2d5bc 100644 --- a/dist/pbaas/URLRef.js +++ b/dist/pbaas/URLRef.js @@ -45,6 +45,12 @@ class URLRef { url: this.url }; } + static fromJson(data) { + return new URLRef({ + version: new bn_js_1.BN(data.version, 10), + url: data.url + }); + } } exports.URLRef = URLRef; URLRef.FIRST_VERSION = new bn_js_1.BN(1); diff --git a/dist/pbaas/UTXORef.d.ts b/dist/pbaas/UTXORef.d.ts index 2c6cca9..38f1d18 100644 --- a/dist/pbaas/UTXORef.d.ts +++ b/dist/pbaas/UTXORef.d.ts @@ -14,6 +14,10 @@ export declare class UTXORef implements SerializableEntity { isValid(): boolean; toJson(): { hash: string; - n: string; + n: number; }; + static fromJson(data: { + hash: string; + n: string; + }): UTXORef; } diff --git a/dist/pbaas/UTXORef.js b/dist/pbaas/UTXORef.js index 6bcec58..07727ad 100644 --- a/dist/pbaas/UTXORef.js +++ b/dist/pbaas/UTXORef.js @@ -33,8 +33,14 @@ class UTXORef { toJson() { return { hash: this.hash.toString('hex'), - n: this.n.toString(10) + n: this.n.toNumber() }; } + static fromJson(data) { + return new UTXORef({ + hash: Buffer.from(data.hash, 'hex'), + n: new bn_js_1.BN(data.n, 10) + }); + } } exports.UTXORef = UTXORef; diff --git a/dist/pbaas/VdxfUniValue.js b/dist/pbaas/VdxfUniValue.js index c3edc8a..d9fd8ae 100644 --- a/dist/pbaas/VdxfUniValue.js +++ b/dist/pbaas/VdxfUniValue.js @@ -235,11 +235,7 @@ VdxfUniValue.vectorEncodeVDXFUni = (obj) => { ss = Buffer.concat([ss, writer.buffer]); } else if (objTypeKey == VDXF_Data.DataRatingsKey.vdxfid) { - const version = new bn_js_1.BN(oneValValues[k].version); - const trust_level = new bn_js_1.BN(oneValValues[k].trust_level); - const destinations = Object.keys(oneValValues[k].rating); - const values = Object.values(oneValValues[k]); - const oneRatingMap = new Rating_1.Rating({ ratings: new Map(destinations.map((key, index) => [key, Buffer.from(values[index], 'hex')])), version, trust_level }); + const oneRatingMap = Rating_1.Rating.fromJson(oneValValues[k]); let length = 20; length += varint_1.default.encodingLength(oneRatingMap.version); length += varuint_1.default.encodingLength(oneRatingMap.getByteLength()); @@ -252,7 +248,7 @@ VdxfUniValue.vectorEncodeVDXFUni = (obj) => { ss = Buffer.concat([ss, writer.buffer]); } else if (objTypeKey == VDXF_Data.DataTransferDestinationKey.vdxfid) { - const transferDest = new TransferDestination_1.TransferDestination(oneValValues[k]); + const transferDest = TransferDestination_1.TransferDestination.fromJson(oneValValues[k]); let length = 20; length += varint_1.default.encodingLength(transferDest.typeNoFlags()); length += varuint_1.default.encodingLength(transferDest.getByteLength()); @@ -265,7 +261,7 @@ VdxfUniValue.vectorEncodeVDXFUni = (obj) => { ss = Buffer.concat([ss, writer.buffer]); } else if (objTypeKey == VDXF_Data.ContentMultiMapRemoveKey.vdxfid) { - const transferDest = new ContentMultiMapRemove_1.ContentMultiMapRemove(oneValValues[k]); + const transferDest = ContentMultiMapRemove_1.ContentMultiMapRemove.fromJson(oneValValues[k]); let length = 20; length += varint_1.default.encodingLength(transferDest.version); length += varuint_1.default.encodingLength(transferDest.getByteLength()); @@ -278,7 +274,7 @@ VdxfUniValue.vectorEncodeVDXFUni = (obj) => { ss = Buffer.concat([ss, writer.buffer]); } else if (objTypeKey == VDXF_Data.CrossChainDataRefKey.vdxfid) { - const transferDest = new CrossChainDataRef_1.CrossChainDataRef(oneValValues[k]); + const transferDest = CrossChainDataRef_1.CrossChainDataRef.fromJson(oneValValues[k]); let length = 20; length += varint_1.default.encodingLength(vdxf_1.VDXF_OBJECT_DEFAULT_VERSION); length += varuint_1.default.encodingLength(transferDest.getByteLength()); diff --git a/src/__tests__/attestation/personalInfo.test.ts b/src/__tests__/attestation/personalInfo.test.ts index 6b8875c..e8eb9b6 100644 --- a/src/__tests__/attestation/personalInfo.test.ts +++ b/src/__tests__/attestation/personalInfo.test.ts @@ -1,5 +1,5 @@ import { DataDescriptor } from "../../pbaas/DataDescriptor"; -import { MMRDescriptor } from "../../pbaas/MMRDescriptor"; +import { MMRDescriptor, MMRDescriptorJson } from "../../pbaas/MMRDescriptor"; import { SignatureData } from "../../pbaas/SignatureData"; describe('Create a personal info request', () => { @@ -33,7 +33,7 @@ describe('Create a personal info request', () => { test('serialize and deserialize a mmrdescriptor', async () => { - const mmrdescriptor = { + const mmrdescriptor: MMRDescriptorJson = { "version": 1, "objecthashtype": 5, "mmrhashtype": 1, diff --git a/src/__tests__/pbaas/dataDescriptor.test.ts b/src/__tests__/pbaas/dataDescriptor.test.ts index 29ccb9b..69ea47e 100644 --- a/src/__tests__/pbaas/dataDescriptor.test.ts +++ b/src/__tests__/pbaas/dataDescriptor.test.ts @@ -50,7 +50,7 @@ describe('Serializes and deserializes dataDescriptors', () => { evid.system_id = "i5v3h9FWVdRFbNHU7DfcpGykQjRaHtMqu7"; const crossChainRef = new CrossChainDataRef(evid); - const crossChainVector = VdxfUniValue.vectorEncodeVDXFUni({[VDXF_Data.CrossChainDataRefKey.vdxfid]: crossChainRef}); + const crossChainVector = VdxfUniValue.vectorEncodeVDXFUni({[VDXF_Data.CrossChainDataRefKey.vdxfid]: crossChainRef.toJson()}); const nestedDescriptor = DataDescriptor.fromJson({ version: 1, @@ -92,14 +92,17 @@ describe('Serializes and deserializes dataDescriptors', () => { }); test('Datadescriptor with SignatureData', async () => { - const destid = "iCtawpxUiCc2sEupt7Z4u8SDAncGZpgSKm"; - - const txDest = new SignatureData({ - type: DEST_ID, - destination_bytes: fromBase58Check(destid).hash + const sigData = SignatureData.fromJson({ + "version": 1, + "systemid": "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq", + "hashtype": 1, + "signaturehash": "dfd3e3d82783360dfc675a09e6a226fd43119ef4e8d7cf553af96ea5883b51da", + "identityid": "iKjrTCwoPFRk44fAi2nYNbPG16ZUQjv1NB", + "signaturetype": 1, + "signature": "AgXOCgAAAUEfCiSukK9tg46cYOpHmxzKjNquWDyNc8H58+uLSOYmqlUcNUxWB8j3nzT1RHKeJGygdAwrUj5iZ/A9H3+qYV9H9g==" }); - const txDestVector = VdxfUniValue.vectorEncodeVDXFUni({[VDXF_Data.DataTransferDestinationKey.vdxfid]: txDest}); + const txDestVector = VdxfUniValue.vectorEncodeVDXFUni({[VDXF_Data.SignatureDataKey.vdxfid]: sigData.toJson()}); const nestedDescriptor = DataDescriptor.fromJson({ version: 1, diff --git a/src/pbaas/ContentMultiMapRemove.ts b/src/pbaas/ContentMultiMapRemove.ts index 0f359ff..52cb6cc 100644 --- a/src/pbaas/ContentMultiMapRemove.ts +++ b/src/pbaas/ContentMultiMapRemove.ts @@ -8,6 +8,13 @@ import { I_ADDR_VERSION } from '../constants/vdxf'; import { SerializableEntity } from '../utils/types/SerializableEntity'; const { BufferReader, BufferWriter } = bufferutils +export interface ContentMultiMapRemoveJson { + version: number; + action: number; + entrykey: string; + valuehash: string; +} + export class ContentMultiMapRemove implements SerializableEntity { version: BigNumber; action: BigNumber; @@ -76,4 +83,13 @@ export class ContentMultiMapRemove implements SerializableEntity { } return reader.offset; } + + static fromJson(data: ContentMultiMapRemoveJson): ContentMultiMapRemove { + return new ContentMultiMapRemove({ + version: new BN(data.version), + action: new BN(data.action), + entry_key: data.entrykey, + value_hash: Buffer.from(data.valuehash, 'hex') + }) + } } \ No newline at end of file diff --git a/src/pbaas/CrossChainDataRef.ts b/src/pbaas/CrossChainDataRef.ts index aa6fd05..ba7aae9 100644 --- a/src/pbaas/CrossChainDataRef.ts +++ b/src/pbaas/CrossChainDataRef.ts @@ -11,6 +11,10 @@ import { IdentityMultimapRef } from './IdentityMultimapRef'; import { URLRef } from './URLRef'; const { BufferReader, BufferWriter } = bufferutils + +export interface CrossChainDataRefJson { + ref: PBaaSEvidenceRef | IdentityMultimapRef | URLRef; +} export class CrossChainDataRef implements SerializableEntity { ref: PBaaSEvidenceRef | IdentityMultimapRef | URLRef; @@ -69,6 +73,17 @@ export class CrossChainDataRef implements SerializableEntity { } toJson() { - return this.ref.toJson(); + return {...this.ref.toJson(), type: this.which()}; + } + + static fromJson(data: any) { + if (data.type == CrossChainDataRef.TYPE_CROSSCHAIN_DATAREF) { + return new CrossChainDataRef(PBaaSEvidenceRef.fromJson(data)); + } else if (data.type == CrossChainDataRef.TYPE_IDENTITY_DATAREF) { + return new CrossChainDataRef(IdentityMultimapRef.fromJson(data)); + } else if (data.type == CrossChainDataRef.TYPE_URL_REF) { + return new CrossChainDataRef(URLRef.fromJson(data)); + } + else throw new Error("Invalid CrossChainDataRef type"); } } \ No newline at end of file diff --git a/src/pbaas/DataDescriptor.ts b/src/pbaas/DataDescriptor.ts index 4ae5449..8ab7acb 100644 --- a/src/pbaas/DataDescriptor.ts +++ b/src/pbaas/DataDescriptor.ts @@ -9,6 +9,17 @@ import { BufferDataVdxfObject } from '../vdxf/index'; import * as VDXF_Data from '../vdxf/vdxfdatakeys'; import { SerializableEntity } from '../utils/types/SerializableEntity'; +export interface DataDescriptorJson { + version: number; + flags?: number; + objectdata?: string | {['message']: string} | object; + label?: string; + mimetype?: string; + salt?: string; + epk?: string; + ivk?: string; + ssk?: string; +} export class DataDescriptor implements SerializableEntity { static VERSION_INVALID = new BN(0); @@ -286,11 +297,11 @@ export class DataDescriptor implements SerializableEntity { return !!(this.version.gte(DataDescriptor.FIRST_VERSION) && this.version.lte(DataDescriptor.LAST_VERSION) && this.flags.and(DataDescriptor.FLAG_MASK.notn(DataDescriptor.FLAG_MASK.bitLength()))); } - toJson() { + toJson():DataDescriptorJson { - const retval = { - version: this.version.toString(), - flags: this.flags.toString() + const retval: DataDescriptorJson = { + version: this.version.toNumber(), + flags: this.flags.toNumber() }; let isText = false; @@ -318,10 +329,8 @@ export class DataDescriptor implements SerializableEntity { return retval; } - }; - export class VDXFDataDescriptor extends BufferDataVdxfObject { dataDescriptor: DataDescriptor; diff --git a/src/pbaas/IdentityMultimapRef.ts b/src/pbaas/IdentityMultimapRef.ts index 83bc1b0..41b9539 100644 --- a/src/pbaas/IdentityMultimapRef.ts +++ b/src/pbaas/IdentityMultimapRef.ts @@ -8,6 +8,16 @@ import { I_ADDR_VERSION } from '../constants/vdxf'; import { SerializableEntity } from '../utils/types/SerializableEntity'; const { BufferReader, BufferWriter } = bufferutils + +export interface IdentityMultimapRefJson { + version: number; + flags: number; + vdxfkey: string; + startheight: number; + endheight: number; + datahash: string; + systemid: string; +} export class IdentityMultimapRef implements SerializableEntity { version: BigNumber; flags: BigNumber; @@ -143,4 +153,16 @@ export class IdentityMultimapRef implements SerializableEntity { retval.startheight = this.height_start.toString(10); retval.endheight = this.height_end.toString(10); } + + static fromJson(data: IdentityMultimapRefJson): IdentityMultimapRef { + return new IdentityMultimapRef({ + version: new BN(data.version), + flags: new BN(data.flags), + key: data.vdxfkey, + height_start: new BN(data.startheight), + height_end: new BN(data.endheight), + data_hash: Buffer.from(data.datahash, 'hex'), + system_id: data.systemid + }) + } } \ No newline at end of file diff --git a/src/pbaas/MMRDescriptor.ts b/src/pbaas/MMRDescriptor.ts index 3ab8fc2..c4adffe 100644 --- a/src/pbaas/MMRDescriptor.ts +++ b/src/pbaas/MMRDescriptor.ts @@ -4,13 +4,22 @@ import varint from '../utils/varint' import varuint from '../utils/varuint' import bufferutils from '../utils/bufferutils' const { BufferReader, BufferWriter } = bufferutils -import { DataDescriptor } from './DataDescriptor'; +import { DataDescriptor, DataDescriptorJson } from './DataDescriptor'; import { EHashTypes } from './DataDescriptor'; import { VdxfUniValue } from '.'; import { BufferDataVdxfObject } from '../vdxf/index'; import * as VDXF_Data from '../vdxf/vdxfdatakeys'; import { SerializableEntity } from '../utils/types/SerializableEntity'; +export interface MMRDescriptorJson { + version: number; + objecthashtype?: number; + mmrhashtype?: number; + mmrroot?: DataDescriptorJson; + mmrhashes?: DataDescriptorJson; + datadescriptors?: DataDescriptorJson[]; +} + export class MMRDescriptor implements SerializableEntity { static VERSION_INVALID = new BN(0); static FIRST_VERSION = new BN(1); @@ -46,7 +55,7 @@ export class MMRDescriptor implements SerializableEntity { } } - static fromJson(data: any): MMRDescriptor { + static fromJson(data: MMRDescriptorJson): MMRDescriptor { const newMMRDescriptor = new MMRDescriptor(); @@ -128,11 +137,11 @@ export class MMRDescriptor implements SerializableEntity { return this.version >= MMRDescriptor.FIRST_VERSION && this.version <= MMRDescriptor.LAST_VERSION; } - toJson() { + toJson():MMRDescriptorJson { const retval = { - version: this.version.toString(), - objecthashtype: this.objectHashType, + version: this.version.toNumber(), + objecthashtype: this.objectHashType.valueOf(), mmrhashtype: this.mmrHashType, mmrroot: this.mmrRoot.toJson(), mmrhashes: this.mmrHashes.toJson(), diff --git a/src/pbaas/PBaaSEvidenceRef.ts b/src/pbaas/PBaaSEvidenceRef.ts index 614ff93..c68f979 100644 --- a/src/pbaas/PBaaSEvidenceRef.ts +++ b/src/pbaas/PBaaSEvidenceRef.ts @@ -11,6 +11,15 @@ import { IdentityMultimapRef } from './IdentityMultimapRef'; const { BufferReader, BufferWriter } = bufferutils +export interface PBaaSEvidenceRefJson { + version: number; + flags: number; + output: any; + objectnum: number; + subobject: number; + systemid: string; +} + export class PBaaSEvidenceRef implements SerializableEntity { version: BigNumber; flags: BigNumber; @@ -100,20 +109,28 @@ export class PBaaSEvidenceRef implements SerializableEntity { (this.flags.and(PBaaSEvidenceRef.FLAG_ISEVIDENCE).gt(new BN(0))); } - toJson() { - - let retval; - - retval.version = this.version.toString(10); - retval.flags = this.flags.toString(10); - retval.output = this.output.toJson(); + toJson(): PBaaSEvidenceRefJson { - if (this.flags.and(PBaaSEvidenceRef.FLAG_HAS_SYSTEM).gt(new BN(0))) { - retval.systemid = this.system_id; + let retval: PBaaSEvidenceRefJson = { + version: this.version.toNumber(), + flags: this.flags.toNumber(), + output: this.output.toJson(), + objectnum: this.object_num.toNumber(), + subobject: this.sub_object.toNumber(), + systemid: this.system_id || "" } - retval.objectnum = this.object_num.toString(10); - retval.subobject = this.sub_object.toString(10); return retval; } + + static fromJson(json: PBaaSEvidenceRefJson): PBaaSEvidenceRef { + return new PBaaSEvidenceRef({ + version: new BN(json.version), + flags: new BN(json.flags), + output: UTXORef.fromJson(json.output), + object_num: new BN(json.objectnum), + sub_object: new BN(json.subobject), + system_id: json.systemid + }); + } } \ No newline at end of file diff --git a/src/pbaas/Rating.ts b/src/pbaas/Rating.ts index 9520eab..27f980b 100644 --- a/src/pbaas/Rating.ts +++ b/src/pbaas/Rating.ts @@ -7,6 +7,11 @@ import { I_ADDR_VERSION } from '../constants/vdxf'; import { SerializableEntity } from '../utils/types/SerializableEntity'; const { BufferReader, BufferWriter } = bufferutils +export interface RatingJson { + version: number; + trustlevel: number; + ratings: Map; +} export class Rating implements SerializableEntity { static VERSION_INVALID = new BN(0, 10) @@ -89,12 +94,34 @@ export class Rating implements SerializableEntity { this.trust_level.gte(Rating.TRUST_FIRST) && this.trust_level.lte(Rating.TRUST_LAST); } toJson() { + + const ratings: { [key: string]: string } = {}; + + this.ratings.forEach((value, key) => { + ratings[key] = value.toString('hex'); + }); + return { version: this.version.toString(), trust_level: this.trust_level.toString(), - ratings: this.ratings + ratings: ratings } } + static fromJson(json: RatingJson) { + + const ratings = new Map(); + + for (const key in json.ratings) { + ratings.set(key, Buffer.from(json.ratings[key], 'hex')); + } + + return new Rating({ + version: new BN(json.version), + trust_level: new BN(json.trustlevel), + ratings: ratings + }) + } + //TODO: implment ratings values } \ No newline at end of file diff --git a/src/pbaas/SignatureData.ts b/src/pbaas/SignatureData.ts index f39d21f..712415a 100644 --- a/src/pbaas/SignatureData.ts +++ b/src/pbaas/SignatureData.ts @@ -218,7 +218,7 @@ export class SignatureData implements SerializableEntity { } if (this.bound_hashes) { - returnObj['boundhashes'] = this.bound_hashes; + returnObj['boundhashes'] = this.bound_hashes.map((hash) => hash.toString('hex')); } return returnObj diff --git a/src/pbaas/URLRef.ts b/src/pbaas/URLRef.ts index b10dc6b..f96243c 100644 --- a/src/pbaas/URLRef.ts +++ b/src/pbaas/URLRef.ts @@ -65,4 +65,11 @@ export class URLRef implements SerializableEntity { url: this.url } } + + static fromJson(data: { version: string, url: string }): URLRef { + return new URLRef({ + version: new BN(data.version, 10), + url: data.url + }); + } } \ No newline at end of file diff --git a/src/pbaas/UTXORef.ts b/src/pbaas/UTXORef.ts index 81dde5d..61ae98c 100644 --- a/src/pbaas/UTXORef.ts +++ b/src/pbaas/UTXORef.ts @@ -52,7 +52,14 @@ export class UTXORef implements SerializableEntity { toJson() { return { hash: this.hash.toString('hex'), - n: this.n.toString(10) + n: this.n.toNumber() } } + + static fromJson(data: { hash: string, n: string }): UTXORef { + return new UTXORef({ + hash: Buffer.from(data.hash, 'hex'), + n: new BN(data.n, 10) + }); + } } \ No newline at end of file diff --git a/src/pbaas/VdxfUniValue.ts b/src/pbaas/VdxfUniValue.ts index a78978c..11a81e0 100644 --- a/src/pbaas/VdxfUniValue.ts +++ b/src/pbaas/VdxfUniValue.ts @@ -9,13 +9,13 @@ import { SerializableEntity } from '../utils/types/SerializableEntity'; import varint from '../utils/varint'; import { isHexString } from '../utils/string'; import { CurrencyValueMap } from './CurrencyValueMap'; -import { Rating } from './Rating'; -import { TransferDestination } from './TransferDestination'; -import { ContentMultiMapRemove } from './ContentMultiMapRemove'; +import { Rating, RatingJson } from './Rating'; +import { TransferDestination, TransferDestinationJson } from './TransferDestination'; +import { ContentMultiMapRemove, ContentMultiMapRemoveJson } from './ContentMultiMapRemove'; import { CrossChainDataRef } from './CrossChainDataRef'; import { SignatureData } from './SignatureData'; import { DataDescriptor } from './DataDescriptor'; -import { MMRDescriptor } from './MMRDescriptor'; +import { MMRDescriptor, MMRDescriptorJson } from './MMRDescriptor'; import { BufferDataVdxfObject } from '../index'; import * as VDXF_Data from '../vdxf/vdxfdatakeys'; @@ -284,13 +284,7 @@ export class VdxfUniValue implements SerializableEntity { } else if (objTypeKey == VDXF_Data.DataRatingsKey.vdxfid) { - const version = new BN((oneValValues[k] as { version: number }).version); - const trust_level = new BN((oneValValues[k] as { trust_level: number }).trust_level); - - const destinations = Object.keys((oneValValues[k] as { rating: BigNumber }).rating); - const values = Object.values(oneValValues[k]); - - const oneRatingMap = new Rating({ ratings: new Map(destinations.map((key, index) => [key, Buffer.from(values[index], 'hex')])), version, trust_level }); + const oneRatingMap = Rating.fromJson(oneValValues[k] as RatingJson); let length = 20; length += varint.encodingLength(oneRatingMap.version); @@ -309,7 +303,7 @@ export class VdxfUniValue implements SerializableEntity { } else if (objTypeKey == VDXF_Data.DataTransferDestinationKey.vdxfid) { - const transferDest = new TransferDestination(oneValValues[k]); + const transferDest = TransferDestination.fromJson(oneValValues[k] as TransferDestinationJson); let length = 20; length += varint.encodingLength(transferDest.typeNoFlags()); @@ -328,7 +322,7 @@ export class VdxfUniValue implements SerializableEntity { } else if (objTypeKey == VDXF_Data.ContentMultiMapRemoveKey.vdxfid) { - const transferDest = new ContentMultiMapRemove(oneValValues[k]); + const transferDest = ContentMultiMapRemove.fromJson(oneValValues[k] as ContentMultiMapRemoveJson); let length = 20; length += varint.encodingLength(transferDest.version); @@ -347,7 +341,7 @@ export class VdxfUniValue implements SerializableEntity { } else if (objTypeKey == VDXF_Data.CrossChainDataRefKey.vdxfid) { - const transferDest = new CrossChainDataRef(oneValValues[k]); + const transferDest = CrossChainDataRef.fromJson(oneValValues[k]); let length = 20; length += varint.encodingLength(VDXF_OBJECT_DEFAULT_VERSION); @@ -385,7 +379,7 @@ export class VdxfUniValue implements SerializableEntity { } else if (objTypeKey == VDXF_Data.MMRDescriptorKey.vdxfid) { - const descr = MMRDescriptor.fromJson(oneValValues[k]); + const descr = MMRDescriptor.fromJson(oneValValues[k] as MMRDescriptorJson); let length = 20; length += varint.encodingLength(descr.version); From 4491a5a7d9f93baf6a101984485f3ce21b0759e2 Mon Sep 17 00:00:00 2001 From: Monkins1010 Date: Tue, 8 Oct 2024 16:32:47 +0100 Subject: [PATCH 110/120] Updates to VdxfUniValue --- src/__tests__/attestation/attestation.test.ts | 31 ++-------- src/pbaas/VdxfUniValue.ts | 2 +- src/vdxf/classes/Challenge.ts | 59 +++++++++++++++++-- src/vdxf/index.ts | 2 +- 4 files changed, 62 insertions(+), 32 deletions(-) diff --git a/src/__tests__/attestation/attestation.test.ts b/src/__tests__/attestation/attestation.test.ts index 4025798..7d5cbfe 100644 --- a/src/__tests__/attestation/attestation.test.ts +++ b/src/__tests__/attestation/attestation.test.ts @@ -34,37 +34,18 @@ describe('Serializes and deserializes attestation request', () => { challenge: { challenge_id: "iMqzCkWdebC19xbjkLfVdDkkGP9Ni1oxoN", requested_access: [ - new RequestedPermission(IDENTITY_VIEW.vdxfid, ""), - new RequestedPermission(PROFILE_DATA_VIEW_REQUEST.vdxfid, ""), + new RequestedPermission(IDENTITY_VIEW.vdxfid, [IDENTITY_PERSONALDETAILS.vdxfid, IDENTITY_CONTACTDETAILS.vdxfid, IDENTITY_LOCATION.vdxfid, IDENTITY_BANKINGDETAILS.vdxfid, IDENTITY_DOCUMENTS.vdxfid]), + new RequestedPermission(PROFILE_DATA_VIEW_REQUEST.vdxfid, ""), // change to array new RequestedPermission(LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY.vdxfid, ""), + new RequestedPermission(LOGIN_CONSENT_REDIRECT_VDXF_KEY.vdxfid, ""), ], - redirect_uris: [], + redirect_uris: [], // this contains the webhook subject: [new Subject( - IDENTITY_PERSONALDETAILS.vdxfid, - PROFILE_DATA_VIEW_REQUEST.vdxfid - ), - new Subject( - IDENTITY_CONTACTDETAILS.vdxfid, - PROFILE_DATA_VIEW_REQUEST.vdxfid - ), - new Subject( - IDENTITY_LOCATION.vdxfid, - PROFILE_DATA_VIEW_REQUEST.vdxfid - ), - new Subject( - IDENTITY_BANKINGDETAILS.vdxfid, - PROFILE_DATA_VIEW_REQUEST.vdxfid - ), - new Subject( - IDENTITY_DOCUMENTS.vdxfid, - PROFILE_DATA_VIEW_REQUEST.vdxfid - ), - new Subject( - "https://example.com/sendpersonaldata", + "https://example.com/sendpersonaldata", //this doesnt need to be in subject put in redirect_uris LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY.vdxfid ), ], - provisioning_info: [], + provisioning_info: [], // created_at: Number((Date.now() / 1000).toFixed(0)), } }); diff --git a/src/pbaas/VdxfUniValue.ts b/src/pbaas/VdxfUniValue.ts index 11a81e0..860ad09 100644 --- a/src/pbaas/VdxfUniValue.ts +++ b/src/pbaas/VdxfUniValue.ts @@ -107,7 +107,7 @@ export class VdxfUniValue implements SerializableEntity { if (this.version.gt(VDXF_UNI_VALUE_VERSION_CURRENT)) throw new Error("Unknown VDXFUniValue version"); - if (dataTypeKey == DATA_TYPE_STRING.vdxfid) { + if (dataTypeKey == DATA_TYPE_STRING.vdxfid) { // change to const buf = VdxfUniValue.fromJson(json).toBuffer() reader.readVarInt(); const slice = reader.readVarSlice(); diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index f58b5e9..569ed76 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -14,7 +14,8 @@ import { Hash160 } from "./Hash160"; import { Attestation } from "./Attestation"; import { fromBase58Check, toBase58Check } from '../../utils/address'; import { HASH160_BYTE_LENGTH, I_ADDR_VERSION } from '../../constants/vdxf'; -import { BufferDataVdxfObject } from '../index' +import { BufferDataVdxfObject, VDXFData } from '../index' + export class RedirectUri extends VDXFObject { uri: string; @@ -139,7 +140,7 @@ export class Challenge extends VDXFObject implements ChallengeInterface { super(vdxfkey); this.challenge_id = challenge.challenge_id; - this.requested_access = challenge.requested_access ? challenge.requested_access.map((x) => new RequestedPermission(x.vdxfkey, x.data)) : challenge.requested_access; + this.requested_access = challenge.requested_access ? challenge.requested_access.map((x) => new RequestedPermission(x.vdxfkey, x.dataAsArray)) : challenge.requested_access; this.requested_access_audience = challenge.requested_access_audience; this.subject = challenge.subject ? challenge.subject.map((x) => new Subject(x.data, x.vdxfkey)) @@ -414,8 +415,56 @@ export class Challenge extends VDXFObject implements ChallengeInterface { } } -export class RequestedPermission extends Utf8DataVdxfObject { - constructor(vdxfkey: string = "", data: string = "") { - super(data, vdxfkey); +export class RequestedPermission extends VDXFObject { + + dataAsArray: Array; + + constructor(vdxfkey?: string, data?: Array) { + super(vdxfkey); + + if (data && data.length > 0) { + this.dataAsArray = data; + } + } + + dataByteLength(): number { + + let length = 0; + + length += varuint.encodingLength(this.dataAsArray.length); + + for (let i = 0; i < this.dataAsArray.length; i++) { + length += this.dataAsArray[i].hash.length; + } + + return length; + } + + toDataBuffer(): Buffer { + const buffer = Buffer.alloc(this.dataByteLength()); + const writer = new bufferutils.BufferWriter(buffer); + + writer.writeCompactSize(this.dataAsArray.length); + + for (let i = 0; i < this.dataAsArray.length; i++) { + writer.writeSlice(this.dataAsArray[i].toBuffer()); + } + + return writer.buffer; + } + + + fromDataBuffer(buffer: Buffer, offset?: number): number { + const reader = new bufferutils.BufferReader(buffer, offset); + const numKeys = reader.readCompactSize(); + + this.dataAsArray = []; + + for (let i = 0; i < numKeys; i++) { + this.dataAsArray.push(new Hash160(reader.readSlice(20))); + } + + return reader.offset; } + } \ No newline at end of file diff --git a/src/vdxf/index.ts b/src/vdxf/index.ts index 1fcafa4..92953fe 100644 --- a/src/vdxf/index.ts +++ b/src/vdxf/index.ts @@ -196,7 +196,7 @@ export class VDXFData extends VDXFObject { toJson() { return { - data: this.data, + data: this.data.toString("hex"), vdxfkey: this.vdxfkey, }; } From 981885042d95306550cbca44845211e1fb92dad2 Mon Sep 17 00:00:00 2001 From: Monkins1010 Date: Tue, 8 Oct 2024 16:33:01 +0100 Subject: [PATCH 111/120] More updates to VdxfUniValue --- dist/api/ApiPrimitive.d.ts | 4 +- .../api/classes/SignData/SignDataRequest.d.ts | 6 +- .../classes/SignData/SignDataResponse.d.ts | 30 +- dist/constants/vdxf.d.ts | 1 + dist/constants/vdxf.js | 3 +- dist/pbaas/ContentMultiMap.d.ts | 2 +- dist/pbaas/ContentMultiMap.js | 11 +- dist/pbaas/ContentMultiMapRemove.d.ts | 4 +- dist/pbaas/ContentMultiMapRemove.js | 19 + dist/pbaas/CrossChainDataRef.d.ts | 18 +- dist/pbaas/DataDescriptor.js | 11 +- dist/pbaas/Identity.d.ts | 2 +- dist/pbaas/Identity.js | 4 +- dist/pbaas/SignatureData.d.ts | 13 +- dist/pbaas/URLRef.d.ts | 9 +- dist/pbaas/VdxfUniValue.d.ts | 39 +- dist/pbaas/VdxfUniValue.js | 894 ++++++++++-------- dist/pbaas/transaction/IdentityScript.d.ts | 2 +- dist/pbaas/transaction/IdentityScript.js | 4 +- dist/vdxf/classes/Challenge.d.ts | 9 +- dist/vdxf/classes/Challenge.js | 40 +- dist/vdxf/index.d.ts | 2 +- dist/vdxf/index.js | 2 +- src/__tests__/attestation/attestation.test.ts | 25 +- src/api/ApiPrimitive.ts | 4 +- src/api/classes/SignData/SignDataRequest.ts | 8 +- src/api/classes/SignData/SignDataResponse.ts | 30 +- src/constants/vdxf.ts | 1 + src/pbaas/ContentMultiMap.ts | 13 +- src/pbaas/ContentMultiMapRemove.ts | 43 +- src/pbaas/CrossChainDataRef.ts | 22 +- src/pbaas/DataDescriptor.ts | 12 +- src/pbaas/Identity.ts | 4 +- src/pbaas/SignatureData.ts | 4 +- src/pbaas/URLRef.ts | 7 +- src/pbaas/VdxfUniValue.ts | 727 ++++++++------ src/pbaas/transaction/IdentityScript.ts | 4 +- src/vdxf/classes/Challenge.ts | 28 +- 38 files changed, 1193 insertions(+), 868 deletions(-) diff --git a/dist/api/ApiPrimitive.d.ts b/dist/api/ApiPrimitive.d.ts index ca78fa7..0ec967d 100644 --- a/dist/api/ApiPrimitive.d.ts +++ b/dist/api/ApiPrimitive.d.ts @@ -3,8 +3,8 @@ import { IdentityDefinition } from "../identity/IdentityDefinition"; import { OfferForMaking } from "../offers/OfferForMaking"; import { ListedOffer } from "../offers/OfferList"; import { RawTransaction } from "../transaction/RawTransaction"; -import { signDataArgs } from "./classes/SignData/SignDataRequest"; -export declare type ApiPrimitive = string | number | boolean | null | OfferForMaking | ApiPrimitiveJson | ListedOffer | Array | IdentityDefinition | BlockInfo | RawTransaction | signDataArgs; +import { SignDataArgs } from "./classes/SignData/SignDataRequest"; +export declare type ApiPrimitive = string | number | boolean | null | OfferForMaking | ApiPrimitiveJson | ListedOffer | Array | IdentityDefinition | BlockInfo | RawTransaction | SignDataArgs; export declare type ApiPrimitiveJson = { [key: string]: ApiPrimitive | undefined; }; diff --git a/dist/api/classes/SignData/SignDataRequest.d.ts b/dist/api/classes/SignData/SignDataRequest.d.ts index 8c83ef3..f3f2f44 100644 --- a/dist/api/classes/SignData/SignDataRequest.d.ts +++ b/dist/api/classes/SignData/SignDataRequest.d.ts @@ -2,7 +2,7 @@ import { ApiRequest } from "../../ApiRequest"; import { ApiPrimitiveJson, RequestParams } from "../../ApiPrimitive"; import { DataDescriptor } from "../../../utils/types/DataDescriptor"; import { SignData } from "../../../utils/types/SignData"; -export declare type signDataArgs = { +export declare type SignDataArgs = { address?: string; filename?: string; message?: string; @@ -23,8 +23,8 @@ export declare type signDataArgs = { createmmr?: boolean; }; export declare class SignDataRequest extends ApiRequest { - data: signDataArgs; - constructor(chain: string, signableItems: signDataArgs); + data: SignDataArgs; + constructor(chain: string, signableItems: SignDataArgs); getParams(): RequestParams; static fromJson(object: ApiPrimitiveJson): SignDataRequest; toJson(): ApiPrimitiveJson; diff --git a/dist/api/classes/SignData/SignDataResponse.d.ts b/dist/api/classes/SignData/SignDataResponse.d.ts index 866d41d..5745b6c 100644 --- a/dist/api/classes/SignData/SignDataResponse.d.ts +++ b/dist/api/classes/SignData/SignDataResponse.d.ts @@ -4,20 +4,20 @@ import { mmrDescriptorParameters } from "../../../utils/types/MmrDescriptor"; import { DataDescriptor } from "../../../utils/types/DataDescriptor"; export declare class SignDataResponse extends ApiResponse { result: { - mmrdescriptor_encrypted: mmrDescriptorParameters; - mmrdescriptor: mmrDescriptorParameters; - signature: string; - signaturedata_encrypted: DataDescriptor; - signaturedata_ssk: string; - signaturedata: Signature; - system: string; - systemid: string; - hashtype: string; - mmrhashtype: string; - hash: string; - identity: string; - canonicalname: string; - address: string; - signatureheight: number; + mmrdescriptor_encrypted?: mmrDescriptorParameters; + mmrdescriptor?: mmrDescriptorParameters; + signature?: string; + signaturedata_encrypted?: DataDescriptor; + signaturedata_ssk?: string; + signaturedata?: Signature; + system?: string; + systemid?: string; + hashtype?: string; + mmrhashtype?: string; + hash?: string; + identity?: string; + canonicalname?: string; + address?: string; + signatureheight?: number; }; } diff --git a/dist/constants/vdxf.d.ts b/dist/constants/vdxf.d.ts index b9ae15e..a6b14af 100644 --- a/dist/constants/vdxf.d.ts +++ b/dist/constants/vdxf.d.ts @@ -2,6 +2,7 @@ /// export declare const VDXF_OBJECT_DEFAULT_VERSION: import("bn.js"); export declare const HASH160_BYTE_LENGTH = 20; +export declare const HASH256_BYTE_LENGTH = 32; export declare const I_ADDR_VERSION = 102; export declare const R_ADDR_VERSION = 60; export declare const VERUS_DATA_SIGNATURE_PREFIX: Buffer; diff --git a/dist/constants/vdxf.js b/dist/constants/vdxf.js index 5db3955..2ffea88 100644 --- a/dist/constants/vdxf.js +++ b/dist/constants/vdxf.js @@ -1,10 +1,11 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.VERUS_DATA_SIGNATURE_PREFIX = exports.R_ADDR_VERSION = exports.I_ADDR_VERSION = exports.HASH160_BYTE_LENGTH = exports.VDXF_OBJECT_DEFAULT_VERSION = void 0; +exports.VERUS_DATA_SIGNATURE_PREFIX = exports.R_ADDR_VERSION = exports.I_ADDR_VERSION = exports.HASH256_BYTE_LENGTH = exports.HASH160_BYTE_LENGTH = exports.VDXF_OBJECT_DEFAULT_VERSION = void 0; const bn_js_1 = require("bn.js"); const bufferutils_1 = require("../utils/bufferutils"); exports.VDXF_OBJECT_DEFAULT_VERSION = new bn_js_1.BN(1, 10); exports.HASH160_BYTE_LENGTH = 20; +exports.HASH256_BYTE_LENGTH = 32; exports.I_ADDR_VERSION = 102; exports.R_ADDR_VERSION = 60; const VERUS_DATA_SIGNATURE_PREFIX_STRING = "Verus signed data:\n"; diff --git a/dist/pbaas/ContentMultiMap.d.ts b/dist/pbaas/ContentMultiMap.d.ts index 621afb1..fc85620 100644 --- a/dist/pbaas/ContentMultiMap.d.ts +++ b/dist/pbaas/ContentMultiMap.d.ts @@ -17,7 +17,7 @@ export declare class ContentMultiMap implements SerializableEntity { }); getByteLength(): number; toBuffer(): Buffer; - fromBuffer(buffer: Buffer, offset?: number, keylists?: Array | null>): number; + fromBuffer(buffer: Buffer, offset?: number, parseVdxfObjects?: boolean): number; static fromJson(obj: { [key: string]: ContentMultiMapJsonValue; }): ContentMultiMap; diff --git a/dist/pbaas/ContentMultiMap.js b/dist/pbaas/ContentMultiMap.js index ea17dae..1402fee 100644 --- a/dist/pbaas/ContentMultiMap.js +++ b/dist/pbaas/ContentMultiMap.js @@ -79,19 +79,18 @@ class ContentMultiMap { } return writer.buffer; } - fromBuffer(buffer, offset = 0, keylists = []) { + fromBuffer(buffer, offset = 0, parseVdxfObjects = false) { const reader = new BufferReader(buffer, offset); - const contentMultiMapSize = reader.readVarInt(); + const contentMultiMapSize = reader.readCompactSize(); this.kv_content = new Map(); - for (var i = 0; i < contentMultiMapSize.toNumber(); i++) { - const keylist = i < keylists.length ? keylists[i] : null; + for (var i = 0; i < contentMultiMapSize; i++) { const contentMapKey = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); const vector = []; const count = reader.readCompactSize(); for (let j = 0; j < count; j++) { - if (keylist) { + if (parseVdxfObjects) { const unival = new VdxfUniValue_1.VdxfUniValue(); - unival.fromBuffer(reader.readVarSlice(), 0, keylist); + unival.fromBuffer(reader.readVarSlice(), 0); vector.push(unival); } else diff --git a/dist/pbaas/ContentMultiMapRemove.d.ts b/dist/pbaas/ContentMultiMapRemove.d.ts index 758a44d..6da36cc 100644 --- a/dist/pbaas/ContentMultiMapRemove.d.ts +++ b/dist/pbaas/ContentMultiMapRemove.d.ts @@ -23,7 +23,7 @@ export declare class ContentMultiMapRemove implements SerializableEntity { static ACTION_REMOVE_ALL_KEY: import("bn.js"); static ACTION_CLEAR_MAP: import("bn.js"); static ACTION_LAST: import("bn.js"); - constructor(data: { + constructor(data?: { version?: BigNumber; action?: BigNumber; entry_key?: string; @@ -33,4 +33,6 @@ export declare class ContentMultiMapRemove implements SerializableEntity { toBuffer(): Buffer; fromBuffer(buffer: Buffer, offset?: number): number; static fromJson(data: ContentMultiMapRemoveJson): ContentMultiMapRemove; + toJson(): ContentMultiMapRemoveJson; + isValid(): boolean; } diff --git a/dist/pbaas/ContentMultiMapRemove.js b/dist/pbaas/ContentMultiMapRemove.js index 78fb0b5..9260653 100644 --- a/dist/pbaas/ContentMultiMapRemove.js +++ b/dist/pbaas/ContentMultiMapRemove.js @@ -57,6 +57,25 @@ class ContentMultiMapRemove { value_hash: Buffer.from(data.valuehash, 'hex') }); } + toJson() { + return { + version: this.version.toNumber(), + action: this.action.toNumber(), + entrykey: this.entry_key, + valuehash: this.value_hash.toString('hex') + }; + } + isValid() { + if (this.version.gte(ContentMultiMapRemove.VERSION_FIRST) && + this.version.lte(ContentMultiMapRemove.VERSION_LAST) && + this.action.gte(ContentMultiMapRemove.ACTION_FIRST) && + this.action.lte(ContentMultiMapRemove.ACTION_LAST)) { + return (this.action.eq(ContentMultiMapRemove.ACTION_CLEAR_MAP) || + (this.entry_key && (this.entry_key.length > 0) && + (this.action.eq(ContentMultiMapRemove.ACTION_REMOVE_ALL_KEY) || this.value_hash.length > 0))); + } + return false; + } } exports.ContentMultiMapRemove = ContentMultiMapRemove; ContentMultiMapRemove.VERSION_INVALID = new bn_js_1.BN(0); diff --git a/dist/pbaas/CrossChainDataRef.d.ts b/dist/pbaas/CrossChainDataRef.d.ts index b80b16e..e0eac02 100644 --- a/dist/pbaas/CrossChainDataRef.d.ts +++ b/dist/pbaas/CrossChainDataRef.d.ts @@ -1,11 +1,15 @@ /// import { SerializableEntity } from '../utils/types/SerializableEntity'; -import { PBaaSEvidenceRef } from './PBaaSEvidenceRef'; -import { IdentityMultimapRef } from './IdentityMultimapRef'; -import { URLRef } from './URLRef'; -export interface CrossChainDataRefJson { - ref: PBaaSEvidenceRef | IdentityMultimapRef | URLRef; -} +import { PBaaSEvidenceRef, PBaaSEvidenceRefJson } from './PBaaSEvidenceRef'; +import { IdentityMultimapRef, IdentityMultimapRefJson } from './IdentityMultimapRef'; +import { URLRef, URLRefJson } from './URLRef'; +export declare type CrossChainDataRefJson = (PBaaSEvidenceRefJson & { + type: number; +}) | (IdentityMultimapRefJson & { + type: number; +}) | (URLRefJson & { + type: number; +}); export declare class CrossChainDataRef implements SerializableEntity { ref: PBaaSEvidenceRef | IdentityMultimapRef | URLRef; static TYPE_CROSSCHAIN_DATAREF: number; @@ -32,5 +36,5 @@ export declare class CrossChainDataRef implements SerializableEntity { version: string; url: string; }; - static fromJson(data: any): CrossChainDataRef; + static fromJson(data: CrossChainDataRefJson): CrossChainDataRef; } diff --git a/dist/pbaas/DataDescriptor.js b/dist/pbaas/DataDescriptor.js index 85a8b41..cf622f0 100644 --- a/dist/pbaas/DataDescriptor.js +++ b/dist/pbaas/DataDescriptor.js @@ -49,7 +49,7 @@ class DataDescriptor { if (data.version != null) newDataDescriptor.version = new bn_js_1.BN(data.version); if (data.objectdata != null) - newDataDescriptor.objectdata = _1.VdxfUniValue.vectorEncodeVDXFUni(data.objectdata); + newDataDescriptor.objectdata = _1.VdxfUniValue.fromJson(data.objectdata).toBuffer(); if (data.label != null) newDataDescriptor.label = data.label; if (data.mimetype != null) @@ -215,13 +215,14 @@ class DataDescriptor { if (this.mimeType.startsWith("text/")) isText = true; } - let processedObject = _1.VdxfUniValue.VDXFDataToUniValueArray(this.objectdata); - if (isText && typeof processedObject === 'string' || processedObject instanceof String) { - let objectDataUni = { message: Buffer.from(processedObject, 'hex').toString('utf-8') }; + let processedObject = new _1.VdxfUniValue(); + processedObject.fromBuffer(this.objectdata); + if (isText && typeof processedObject.values.get("") === 'string') { + let objectDataUni = { message: Buffer.from(processedObject.values.get(""), 'hex').toString('utf-8') }; retval['objectdata'] = objectDataUni; } else { - retval['objectdata'] = processedObject; + retval['objectdata'] = processedObject.toJson(); } if (this.label) retval['label'] = this.label; diff --git a/dist/pbaas/Identity.d.ts b/dist/pbaas/Identity.d.ts index fb3e3c5..59c96f0 100644 --- a/dist/pbaas/Identity.d.ts +++ b/dist/pbaas/Identity.d.ts @@ -69,7 +69,7 @@ export declare class Identity extends Principal implements SerializableEntity { }); getByteLength(): number; toBuffer(): Buffer; - fromBuffer(buffer: Buffer, offset?: number, multimapKeylists?: Array | null>): number; + fromBuffer(buffer: Buffer, offset?: number, parseVdxfObjects?: boolean): number; toJson(): VerusCLIVerusIDJson; getIdentityAddress(): string; isRevoked(): boolean; diff --git a/dist/pbaas/Identity.js b/dist/pbaas/Identity.js index 4d20c59..3cc2d26 100644 --- a/dist/pbaas/Identity.js +++ b/dist/pbaas/Identity.js @@ -124,7 +124,7 @@ class Identity extends Principal_1.Principal { } return writer.buffer; } - fromBuffer(buffer, offset = 0, multimapKeylists = []) { + fromBuffer(buffer, offset = 0, parseVdxfObjects = false) { const reader = new BufferReader(buffer, offset); reader.offset = super.fromBuffer(reader.buffer, reader.offset); const _parent = new IdentityID_1.IdentityID(); @@ -134,7 +134,7 @@ class Identity extends Principal_1.Principal { //contentmultimap if (this.version.gte(exports.IDENTITY_VERSION_PBAAS)) { const multimap = new ContentMultiMap_1.ContentMultiMap(); - reader.offset = multimap.fromBuffer(reader.buffer, reader.offset, multimapKeylists); + reader.offset = multimap.fromBuffer(reader.buffer, reader.offset, parseVdxfObjects); this.content_multimap = multimap; } // contentmap diff --git a/dist/pbaas/SignatureData.d.ts b/dist/pbaas/SignatureData.d.ts index 2ad2a5f..7165093 100644 --- a/dist/pbaas/SignatureData.d.ts +++ b/dist/pbaas/SignatureData.d.ts @@ -30,7 +30,18 @@ export declare class SignatureData implements SerializableEntity { static LAST_VERSION: import("bn.js"); static DEFAULT_VERSION: import("bn.js"); static TYPE_VERUSID_DEFAULT: import("bn.js"); - constructor(data?: any); + constructor(data?: { + version?: BigNumber; + system_ID?: string; + hash_type?: BigNumber; + signature_hash?: Buffer; + identity_ID?: string; + sig_type?: BigNumber; + vdxf_keys?: Array; + vdxf_key_names?: Array; + bound_hashes?: Array; + signature_as_vch?: Buffer; + }); static fromJson(data: SignatureJsonDataInterface | any): SignatureData; static getSignatureHashType(input: Buffer): number; getByteLength(): number; diff --git a/dist/pbaas/URLRef.d.ts b/dist/pbaas/URLRef.d.ts index 68daff1..6db5302 100644 --- a/dist/pbaas/URLRef.d.ts +++ b/dist/pbaas/URLRef.d.ts @@ -2,6 +2,10 @@ /// import { BigNumber } from '../utils/types/BigNumber'; import { SerializableEntity } from '../utils/types/SerializableEntity'; +export interface URLRefJson { + version: string; + url: string; +} export declare class URLRef implements SerializableEntity { static FIRST_VERSION: import("bn.js"); static LAST_VERSION: import("bn.js"); @@ -19,8 +23,5 @@ export declare class URLRef implements SerializableEntity { version: string; url: string; }; - static fromJson(data: { - version: string; - url: string; - }): URLRef; + static fromJson(data: URLRefJson): URLRef; } diff --git a/dist/pbaas/VdxfUniValue.d.ts b/dist/pbaas/VdxfUniValue.d.ts index 9046846..26b1ae6 100644 --- a/dist/pbaas/VdxfUniValue.d.ts +++ b/dist/pbaas/VdxfUniValue.d.ts @@ -2,12 +2,24 @@ /// import { BigNumber } from '../utils/types/BigNumber'; import { SerializableEntity } from '../utils/types/SerializableEntity'; +import { CurrencyValueMap } from './CurrencyValueMap'; +import { Rating, RatingJson } from './Rating'; +import { TransferDestination, TransferDestinationJson } from './TransferDestination'; +import { ContentMultiMapRemove, ContentMultiMapRemoveJson } from './ContentMultiMapRemove'; +import { CrossChainDataRef, CrossChainDataRefJson } from './CrossChainDataRef'; +import { SignatureData, SignatureJsonDataInterface } from './SignatureData'; +import { DataDescriptor, DataDescriptorJson } from './DataDescriptor'; +import { MMRDescriptor, MMRDescriptorJson } from './MMRDescriptor'; export declare const VDXF_UNI_VALUE_VERSION_INVALID: import("bn.js"); export declare const VDXF_UNI_VALUE_VERSION_CURRENT: import("bn.js"); -export declare type VdxfUniType = string | Buffer; -export declare type VdxfUniValueJson = { - [key: string]: string; -}; +export declare type VdxfUniType = string | Buffer | BigNumber | CurrencyValueMap | Rating | TransferDestination | ContentMultiMapRemove | CrossChainDataRef | SignatureData | DataDescriptor | MMRDescriptor; +export interface VdxfUniValueJson { + [key: string]: string | number | RatingJson | TransferDestinationJson | ContentMultiMapRemoveJson | CrossChainDataRefJson | SignatureJsonDataInterface | DataDescriptorJson | MMRDescriptorJson; + serializedHex?: string; + serializedBase64?: string; + message?: string; +} +export declare type JsonSerializableObject = CurrencyValueMap | Rating | TransferDestination | ContentMultiMapRemove | CrossChainDataRef | SignatureData | DataDescriptor | MMRDescriptor; export declare class VdxfUniValue implements SerializableEntity { values: Map; version: BigNumber; @@ -17,14 +29,17 @@ export declare class VdxfUniValue implements SerializableEntity { }); getByteLength(): number; toBuffer(): Buffer; - fromBuffer(buffer: Buffer, offset?: number, keylist?: Array): number; - static fromJson(obj: VdxfUniValueJson): VdxfUniValue; - toJson(): VdxfUniValueJson; - static vectorEncodeVDXFUni: (obj: any) => Buffer; - static VDXFDataToUniValue: (buffer: Buffer, offset?: number, pSuccess?: any) => { - objectUni: any; + fromBuffer(buffer: Buffer, offset?: number): number; + VDXFDataToUniValue(buffer: Buffer, offset?: number, pSuccess?: any): { + objectUni: { + key: string; + value: VdxfUniType; + }; offset: number; - pSuccess: any; + pSuccess: { + value: boolean; + }; }; - static VDXFDataToUniValueArray: (buffer: Buffer, offset?: number) => any; + static fromJson(obj: VdxfUniValueJson): VdxfUniValue; + toJson(): VdxfUniValueJson; } diff --git a/dist/pbaas/VdxfUniValue.js b/dist/pbaas/VdxfUniValue.js index d9fd8ae..3627b60 100644 --- a/dist/pbaas/VdxfUniValue.js +++ b/dist/pbaas/VdxfUniValue.js @@ -6,7 +6,6 @@ const bufferutils_1 = require("../utils/bufferutils"); const address_1 = require("../utils/address"); const vdxf_1 = require("../constants/vdxf"); const bn_js_1 = require("bn.js"); -const vdxf_2 = require("../vdxf"); const varint_1 = require("../utils/varint"); const string_1 = require("../utils/string"); const CurrencyValueMap_1 = require("./CurrencyValueMap"); @@ -21,6 +20,7 @@ const VDXF_Data = require("../vdxf/vdxfdatakeys"); exports.VDXF_UNI_VALUE_VERSION_INVALID = new bn_js_1.BN(0, 10); exports.VDXF_UNI_VALUE_VERSION_CURRENT = new bn_js_1.BN(1, 10); const { BufferWriter, BufferReader } = bufferutils_1.default; +; // This UniValue class was adapted from C++ code for encoding JSON objects into bytes. It is not serialization and // therefore doesn't have a fromBuffer function, as you can't reliably decode it, only encode. class VdxfUniValue { @@ -36,441 +36,539 @@ class VdxfUniValue { let length = 0; for (const key of this.values.keys()) { const value = this.values.get(key); + // if we just have serialized data + if (key === "") { + length += varuint_1.default.encodingLength(Buffer.from(value, "hex").length); + length += Buffer.from(value, "hex").length; + continue; + } + if (key == VDXF_Data.DataByteKey.vdxfid) { + length += 1; + continue; + } + else if ((key == VDXF_Data.DataUint16Key.vdxfid) || (key == VDXF_Data.DataInt16Key.vdxfid)) { + length += 2; + continue; + } + else if ((key == VDXF_Data.DataInt32Key.vdxfid) || (key == VDXF_Data.DataUint32Key.vdxfid)) { + length += 4; + continue; + } + else if (key == VDXF_Data.DataInt64Key.vdxfid) { + length += 8; + continue; + } + else if (key == VDXF_Data.DataUint160Key.vdxfid) { + length += vdxf_1.HASH160_BYTE_LENGTH; + continue; + } + else if (key == VDXF_Data.DataUint256Key.vdxfid) { + length += vdxf_1.HASH256_BYTE_LENGTH; + continue; + } length += vdxf_1.HASH160_BYTE_LENGTH; - length += varint_1.default.encodingLength(this.version); - if (key == vdxf_2.DATA_TYPE_STRING.vdxfid) { - const valueString = value; - const valBuf = Buffer.from(valueString, 'utf8'); - //NOTE 3 is from ss type + ver + vdxfidver - length += varint_1.default.encodingLength(new bn_js_1.BN(valBuf.length + 3)); - length += varuint_1.default.encodingLength(valBuf.length); - length += valBuf.length; - } - else - throw new Error("Invalid or unrecognized vdxf key for object type"); + if (key == VDXF_Data.DataStringKey.vdxfid) { + const encodedLength = varuint_1.default.encodingLength(Buffer.from(value, "utf-8").length); + length += varuint_1.default.encodingLength(1); + length += varuint_1.default.encodingLength(encodedLength + Buffer.from(value, "utf-8").length); + length += encodedLength; + length += Buffer.from(value, "utf-8").length; + } + else if (key == VDXF_Data.DataByteVectorKey.vdxfid) { + const encodedLength = varuint_1.default.encodingLength(Buffer.from(value, "hex").length); + length += varuint_1.default.encodingLength(1); + length += varuint_1.default.encodingLength(encodedLength + Buffer.from(value, "hex").length); + length += encodedLength; + length += Buffer.from(value, "hex").length; + } + else if (key == VDXF_Data.DataCurrencyMapKey.vdxfid) { + const destinations = Object.keys(value); + const values = Object.values(value); + const oneCurMap = new CurrencyValueMap_1.CurrencyValueMap({ value_map: new Map(destinations.map((key, index) => [key, new bn_js_1.BN(values[index])])), multivalue: true }); + length += varuint_1.default.encodingLength(1); + length += varuint_1.default.encodingLength(oneCurMap.getByteLength()); + length += oneCurMap.getByteLength(); + } + else if (key == VDXF_Data.DataRatingsKey.vdxfid) { + const oneRatingMap = new Rating_1.Rating(value); + length += varint_1.default.encodingLength(oneRatingMap.version); + length += varuint_1.default.encodingLength(oneRatingMap.getByteLength()); + length += oneRatingMap.getByteLength(); + } + else if (key == VDXF_Data.DataTransferDestinationKey.vdxfid) { + const transferDest = new TransferDestination_1.TransferDestination(value); + length += varint_1.default.encodingLength(transferDest.typeNoFlags()); + length += varuint_1.default.encodingLength(transferDest.getByteLength()); + length += transferDest.getByteLength(); + } + else if (key == VDXF_Data.ContentMultiMapRemoveKey.vdxfid) { + const transferDest = new ContentMultiMapRemove_1.ContentMultiMapRemove(value); + length += varint_1.default.encodingLength(transferDest.version); + length += varuint_1.default.encodingLength(transferDest.getByteLength()); + length += transferDest.getByteLength(); + } + else if (key == VDXF_Data.CrossChainDataRefKey.vdxfid) { + const transferDest = new CrossChainDataRef_1.CrossChainDataRef(value); + length += varint_1.default.encodingLength(vdxf_1.VDXF_OBJECT_DEFAULT_VERSION); + length += varuint_1.default.encodingLength(transferDest.getByteLength()); + length += transferDest.getByteLength(); + } + else if (key == VDXF_Data.DataDescriptorKey.vdxfid) { + const descr = new DataDescriptor_1.DataDescriptor(value); + length += varint_1.default.encodingLength(descr.version); + length += varuint_1.default.encodingLength(descr.getByteLength()); + length += descr.getByteLength(); + } + else if (key == VDXF_Data.MMRDescriptorKey.vdxfid) { + const descr = new MMRDescriptor_1.MMRDescriptor(value); + length += varint_1.default.encodingLength(descr.version); + length += varuint_1.default.encodingLength(descr.getByteLength()); + length += descr.getByteLength(); + } + else if (key == VDXF_Data.SignatureDataKey.vdxfid) { + const sigData = new SignatureData_1.SignatureData(value); + length += varint_1.default.encodingLength(sigData.version); + length += varuint_1.default.encodingLength(sigData.getByteLength()); + length += sigData.getByteLength(); + } + else { + throw new Error("contentmap invalid or unrecognized vdxfkey for object type: " + key); + } + return length; } - return length; } toBuffer() { const writer = new BufferWriter(Buffer.alloc(this.getByteLength())); for (const key of this.values.keys()) { const value = this.values.get(key); + if (key === "") { + writer.writeVarSlice(value); + continue; + } writer.writeSlice((0, address_1.fromBase58Check)(key).hash); writer.writeVarInt(this.version); - if (key == vdxf_2.DATA_TYPE_STRING.vdxfid) { - const valueString = value; - const valBuf = Buffer.from(valueString, 'utf8'); - //NOTE 3 is from ss type + ver + vdxfidver - writer.writeVarInt(new bn_js_1.BN(valBuf.length + 3)); - writer.writeVarSlice(valBuf); - } - else - throw new Error("Invalid or unrecognized vdxf key for object type"); + if (key == VDXF_Data.DataByteKey.vdxfid) { + const oneByte = Buffer.from(value, "hex"); + if (oneByte.length != 1) { + throw new Error("contentmap: byte data must be exactly one byte"); + } + writer.writeSlice(oneByte); + } + else if (key == VDXF_Data.DataInt16Key.vdxfid) { + const oneShort = Buffer.alloc(2); + oneShort.writeInt16LE(value.toNumber()); + writer.writeSlice(oneShort); + } + else if (key == VDXF_Data.DataUint16Key.vdxfid) { + const oneUShort = Buffer.alloc(2); + oneUShort.writeUInt16LE(value.toNumber()); + writer.writeSlice(oneUShort); + } + else if (key == VDXF_Data.DataInt32Key.vdxfid) { + const oneInt = Buffer.alloc(4); + oneInt.writeInt32LE(value.toNumber()); + writer.writeSlice(oneInt); + } + else if (key == VDXF_Data.DataUint32Key.vdxfid) { + const oneUInt = Buffer.alloc(4); + oneUInt.writeUInt32LE(value.toNumber()); + writer.writeSlice(oneUInt); + } + else if (key == VDXF_Data.DataInt64Key.vdxfid) { + const oneInt64 = Buffer.alloc(8); + oneInt64.writeBigInt64LE(BigInt(value.toString())); + writer.writeSlice(oneInt64); + } + else if (key == VDXF_Data.DataUint160Key.vdxfid) { + const oneKey = (0, address_1.fromBase58Check)(value).hash; + writer.writeSlice(oneKey); + } + else if (key == VDXF_Data.DataUint256Key.vdxfid) { + const oneHash = Buffer.from(value, "hex"); + if (oneHash.length != vdxf_1.HASH256_BYTE_LENGTH) { + throw new Error("contentmap: hash data must be exactly 32 bytes"); + } + writer.writeVarSlice(oneHash.reverse()); + } + else if (key == VDXF_Data.DataStringKey.vdxfid) { + const encodedLength = varuint_1.default.encodingLength(Buffer.from(value, "utf-8").length); + writer.writeSlice((0, address_1.fromBase58Check)(key).hash); + writer.writeVarInt(new bn_js_1.BN(1)); + writer.writeCompactSize(encodedLength + Buffer.from(value, "utf-8").length); + writer.writeVarSlice(Buffer.from(value, "utf-8")); + } + else if (key == VDXF_Data.DataByteVectorKey.vdxfid) { + const encodedLength = varuint_1.default.encodingLength(Buffer.from(value, "hex").length); + writer.writeSlice((0, address_1.fromBase58Check)(key).hash); + writer.writeVarInt(new bn_js_1.BN(1)); + writer.writeCompactSize(encodedLength + Buffer.from(value, "hex").length); + writer.writeVarSlice(Buffer.from(value, "hex")); + } + else if (key == VDXF_Data.DataCurrencyMapKey.vdxfid) { + const destinations = Object.keys(value); + const values = Object.values(value); + const oneCurMap = new CurrencyValueMap_1.CurrencyValueMap({ value_map: new Map(destinations.map((key, index) => [key, new bn_js_1.BN(values[index])])), multivalue: true }); + writer.writeSlice((0, address_1.fromBase58Check)(key).hash); + writer.writeVarInt(new bn_js_1.BN(1)); + writer.writeCompactSize(oneCurMap.getByteLength()); + writer.writeSlice(oneCurMap.toBuffer()); + } + else if (key == VDXF_Data.DataRatingsKey.vdxfid) { + const oneRatingMap = new Rating_1.Rating(value); + writer.writeSlice((0, address_1.fromBase58Check)(key).hash); + writer.writeVarInt(oneRatingMap.version); + writer.writeCompactSize(oneRatingMap.getByteLength()); + writer.writeSlice(oneRatingMap.toBuffer()); + } + else if (key == VDXF_Data.DataTransferDestinationKey.vdxfid) { + const transferDest = new TransferDestination_1.TransferDestination(value); + const writer = new BufferWriter(Buffer.alloc(length)); + writer.writeSlice((0, address_1.fromBase58Check)(key).hash); + writer.writeVarInt(transferDest.typeNoFlags()); + writer.writeCompactSize(transferDest.getByteLength()); + writer.writeSlice(transferDest.toBuffer()); + } + else if (key == VDXF_Data.ContentMultiMapRemoveKey.vdxfid) { + const transferDest = new ContentMultiMapRemove_1.ContentMultiMapRemove(value); + writer.writeSlice((0, address_1.fromBase58Check)(key).hash); + writer.writeVarInt(transferDest.version); + writer.writeCompactSize(transferDest.getByteLength()); + writer.writeSlice(transferDest.toBuffer()); + } + else if (key == VDXF_Data.CrossChainDataRefKey.vdxfid) { + const transferDest = new CrossChainDataRef_1.CrossChainDataRef(value); + writer.writeSlice((0, address_1.fromBase58Check)(key).hash); + writer.writeVarInt(vdxf_1.VDXF_OBJECT_DEFAULT_VERSION); + writer.writeCompactSize(transferDest.getByteLength()); + writer.writeSlice(transferDest.toBuffer()); + } + else if (key == VDXF_Data.DataDescriptorKey.vdxfid) { + const descr = new DataDescriptor_1.DataDescriptor(value); + writer.writeSlice((0, address_1.fromBase58Check)(key).hash); + writer.writeVarInt(descr.version); + writer.writeCompactSize(descr.getByteLength()); + writer.writeSlice(descr.toBuffer()); + } + else if (key == VDXF_Data.MMRDescriptorKey.vdxfid) { + const descr = new MMRDescriptor_1.MMRDescriptor(value); + writer.writeSlice((0, address_1.fromBase58Check)(key).hash); + writer.writeVarInt(descr.version); + writer.writeCompactSize(descr.getByteLength()); + writer.writeSlice(descr.toBuffer()); + } + else if (key == VDXF_Data.SignatureDataKey.vdxfid) { + const sigData = new SignatureData_1.SignatureData(value); + writer.writeSlice((0, address_1.fromBase58Check)(key).hash); + writer.writeVarInt(sigData.version); + writer.writeCompactSize(sigData.getByteLength()); + writer.writeSlice(sigData.toBuffer()); + } + else { + throw new Error("contentmap invalid or unrecognized vdxfkey for object type: " + key); + } } return writer.buffer; } - fromBuffer(buffer, offset = 0, keylist = []) { + fromBuffer(buffer, offset = 0) { const reader = new BufferReader(buffer, offset); - let lastPrereadOffset = reader.offset; - function readNextKey() { - lastPrereadOffset = reader.offset; - try { - return (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); - } - catch (e) { - return null; - } - } this.values = new Map(); - for (const key of keylist) { - const dataTypeKey = readNextKey(); - this.version = reader.readVarInt(); - if (this.version.gt(exports.VDXF_UNI_VALUE_VERSION_CURRENT)) - throw new Error("Unknown VDXFUniValue version"); - if (dataTypeKey == vdxf_2.DATA_TYPE_STRING.vdxfid) { - reader.readVarInt(); - const slice = reader.readVarSlice(); - this.values.set(dataTypeKey, slice.toString('utf8')); + let bytesLeft = reader.buffer.length - reader.offset; + while (bytesLeft > vdxf_1.HASH160_BYTE_LENGTH) // size of uint160 + { + let objOut = { value: false }; + const { objectUni, offset } = this.VDXFDataToUniValue(reader.buffer, reader.offset, objOut); + reader.offset = offset; + bytesLeft = buffer.length - reader.offset; + if (objOut.value) { + this.values.set(objectUni.key, objectUni.value); } else { - throw new Error("Invalid or unrecognized vdxf key for object type"); + // add the remaining data as a hex string + reader.offset = reader.offset - vdxf_1.HASH160_BYTE_LENGTH; + this.values.set("", reader.readSlice(bytesLeft + vdxf_1.HASH160_BYTE_LENGTH).toString('hex')); + bytesLeft = 0; + break; } } - return reader.offset; - } - static fromJson(obj) { - const map = new Map(); - for (const key in obj) { - map.set(key, obj[key]); - } - return new VdxfUniValue({ - values: map - }); - } - toJson() { - const ret = {}; - for (const key of this.values.keys()) { - ret[key] = this.values.get(key); - } - return ret; - } -} -exports.VdxfUniValue = VdxfUniValue; -VdxfUniValue.vectorEncodeVDXFUni = (obj) => { - let ss = Buffer.from(''); - if (typeof (obj) != 'object') { - if (typeof (obj) != 'string') - throw new Error('VectorEncodeVDXFUni: not JSON string as expected'); - if ((0, string_1.isHexString)(obj)) { - return Buffer.from(obj, "hex"); - } - return Buffer.from(obj, "utf-8"); - } - if (obj.serializedHex) { - if (!(0, string_1.isHexString)(obj.serializedHex)) { - throw new Error("contentmap: If the \"serializedhex\" key is present, it's data must be only valid hex and complete"); + if (bytesLeft && bytesLeft <= vdxf_1.HASH160_BYTE_LENGTH) { + this.values.set("", reader.readSlice(bytesLeft).toString('hex')); } - return Buffer.from(obj.serializedHex); + return reader.offset; } - if (obj.serializedBase64) { + VDXFDataToUniValue(buffer, offset = 0, pSuccess = null) { + const reader = new BufferReader(buffer, offset); + let objectUni; try { - return Buffer.from(obj.serializedBase64, 'base64'); - } - catch (e) { - throw new Error("contentmap: If the \"serializedBase64\" key is present, it's data must be only valid base64 and complete"); - } - } - if (obj.message) { - return Buffer.from(obj.message, "utf-8"); - } - // this should be an object with "vdxfkey" as the key and {object} as the json object to serialize - const oneValKeys = Object.keys(obj); - const oneValValues = Object.values(obj); - for (let k = 0; k < oneValKeys.length; k++) { - const objTypeKey = oneValKeys[k]; - if (objTypeKey == VDXF_Data.DataByteKey.vdxfid) { - const oneByte = Buffer.from(oneValValues[k], "hex"); - if (oneByte.length != 1) { - throw new Error("contentmap: byte data must be exactly one byte"); - } - ss = Buffer.concat([ss, oneByte]); - } - else if (objTypeKey == VDXF_Data.DataInt16Key.vdxfid) { - const oneShort = Buffer.alloc(2); - oneShort.writeInt16LE(oneValValues[k]); - ss = Buffer.concat([ss, oneShort]); - } - else if (objTypeKey == VDXF_Data.DataUint16Key.vdxfid) { - const oneUShort = Buffer.alloc(2); - oneUShort.writeUInt16LE(oneValValues[k]); - ss = Buffer.concat([ss, oneUShort]); - } - else if (objTypeKey == VDXF_Data.DataInt32Key.vdxfid) { - const oneInt = Buffer.alloc(4); - oneInt.writeInt32LE(oneValValues[k]); - ss = Buffer.concat([ss, oneInt]); - } - else if (objTypeKey == VDXF_Data.DataUint32Key.vdxfid) { - const oneUInt = Buffer.alloc(4); - oneUInt.writeUInt32LE(oneValValues[k]); - ss = Buffer.concat([ss, oneUInt]); - } - else if (objTypeKey == VDXF_Data.DataInt64Key.vdxfid) { - const oneInt64 = Buffer.alloc(8); - oneInt64.writeIntLE(oneValValues[k], 0, 8); - ss = Buffer.concat([ss, oneInt64]); - } - else if (objTypeKey == VDXF_Data.DataUint160Key.vdxfid) { - const oneKey = (0, address_1.fromBase58Check)(oneValValues[k]).hash; - ss = Buffer.concat([ss, oneKey]); - } - else if (objTypeKey == VDXF_Data.DataUint256Key.vdxfid) { - const oneHash = Buffer.from(oneValValues[k], "hex"); - if (oneHash.length != 32) { - throw new Error("contentmap: hash data must be exactly 32 bytes"); + let checkVal; + let version = new bn_js_1.BN(0); + let objSize = 0; + checkVal = (0, address_1.toBase58Check)(reader.readSlice(vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION); + if (checkVal == VDXF_Data.DataCurrencyMapKey.vdxfid) { + const oneCurrencyMap = new CurrencyValueMap_1.CurrencyValueMap(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = oneCurrencyMap.fromBuffer(reader.buffer, reader.offset); + if (oneCurrencyMap.isValid()) { + objectUni = { [checkVal]: oneCurrencyMap }; + } } - ss = Buffer.concat([ss, oneHash.reverse()]); - } - else if (objTypeKey == VDXF_Data.DataStringKey.vdxfid) { - let length = 20; - length += 1; - const encodedLength = varuint_1.default.encodingLength(Buffer.from(oneValValues[k], "utf-8").length); - length += varuint_1.default.encodingLength(encodedLength + Buffer.from(oneValValues[k], "utf-8").length); - length += encodedLength; - length += Buffer.from(oneValValues[k], "utf-8").length; - const writer = new BufferWriter(Buffer.alloc(length)); - writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); - writer.writeVarInt(new bn_js_1.BN(1)); - writer.writeCompactSize(encodedLength + Buffer.from(oneValValues[k], "utf-8").length); - writer.writeVarSlice(Buffer.from(oneValValues[k], "utf-8")); - ss = Buffer.concat([ss, writer.buffer]); - } - else if (objTypeKey == VDXF_Data.DataByteVectorKey.vdxfid) { - let length = 20; - length += 1; - const encodedLength = varuint_1.default.encodingLength(Buffer.from(oneValValues[k], "hex").length); - length += varuint_1.default.encodingLength(encodedLength + Buffer.from(oneValValues[k], "hex").length); - length += encodedLength; - length += Buffer.from(oneValValues[k], "hex").length; - const writer = new BufferWriter(Buffer.alloc(length)); - writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); - writer.writeVarInt(new bn_js_1.BN(1)); - writer.writeCompactSize(encodedLength + Buffer.from(oneValValues[k], "hex").length); - writer.writeVarSlice(Buffer.from(oneValValues[k], "hex")); - ss = Buffer.concat([ss, writer.buffer]); - } - else if (objTypeKey == VDXF_Data.DataCurrencyMapKey.vdxfid) { - const destinations = Object.keys(oneValValues[k]); - const values = Object.values(oneValValues[k]); - const oneCurMap = new CurrencyValueMap_1.CurrencyValueMap({ value_map: new Map(destinations.map((key, index) => [key, new bn_js_1.BN(values[index])])), multivalue: true }); - let length = 20; - length += 1; - length += varuint_1.default.encodingLength(oneCurMap.getByteLength()); - length += oneCurMap.getByteLength(); - const writer = new BufferWriter(Buffer.alloc(length)); - writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); - writer.writeVarInt(new bn_js_1.BN(1)); - writer.writeCompactSize(oneCurMap.getByteLength()); - writer.writeSlice(oneCurMap.toBuffer()); - ss = Buffer.concat([ss, writer.buffer]); - } - else if (objTypeKey == VDXF_Data.DataRatingsKey.vdxfid) { - const oneRatingMap = Rating_1.Rating.fromJson(oneValValues[k]); - let length = 20; - length += varint_1.default.encodingLength(oneRatingMap.version); - length += varuint_1.default.encodingLength(oneRatingMap.getByteLength()); - length += oneRatingMap.getByteLength(); - const writer = new BufferWriter(Buffer.alloc(length)); - writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); - writer.writeVarInt(oneRatingMap.version); - writer.writeCompactSize(oneRatingMap.getByteLength()); - writer.writeSlice(oneRatingMap.toBuffer()); - ss = Buffer.concat([ss, writer.buffer]); - } - else if (objTypeKey == VDXF_Data.DataTransferDestinationKey.vdxfid) { - const transferDest = TransferDestination_1.TransferDestination.fromJson(oneValValues[k]); - let length = 20; - length += varint_1.default.encodingLength(transferDest.typeNoFlags()); - length += varuint_1.default.encodingLength(transferDest.getByteLength()); - length += transferDest.getByteLength(); - const writer = new BufferWriter(Buffer.alloc(length)); - writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); - writer.writeVarInt(transferDest.typeNoFlags()); - writer.writeCompactSize(transferDest.getByteLength()); - writer.writeSlice(transferDest.toBuffer()); - ss = Buffer.concat([ss, writer.buffer]); - } - else if (objTypeKey == VDXF_Data.ContentMultiMapRemoveKey.vdxfid) { - const transferDest = ContentMultiMapRemove_1.ContentMultiMapRemove.fromJson(oneValValues[k]); - let length = 20; - length += varint_1.default.encodingLength(transferDest.version); - length += varuint_1.default.encodingLength(transferDest.getByteLength()); - length += transferDest.getByteLength(); - const writer = new BufferWriter(Buffer.alloc(length)); - writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); - writer.writeVarInt(transferDest.version); - writer.writeCompactSize(transferDest.getByteLength()); - writer.writeSlice(transferDest.toBuffer()); - ss = Buffer.concat([ss, writer.buffer]); - } - else if (objTypeKey == VDXF_Data.CrossChainDataRefKey.vdxfid) { - const transferDest = CrossChainDataRef_1.CrossChainDataRef.fromJson(oneValValues[k]); - let length = 20; - length += varint_1.default.encodingLength(vdxf_1.VDXF_OBJECT_DEFAULT_VERSION); - length += varuint_1.default.encodingLength(transferDest.getByteLength()); - length += transferDest.getByteLength(); - const writer = new BufferWriter(Buffer.alloc(length)); - writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); - writer.writeVarInt(vdxf_1.VDXF_OBJECT_DEFAULT_VERSION); - writer.writeCompactSize(transferDest.getByteLength()); - writer.writeSlice(transferDest.toBuffer()); - ss = Buffer.concat([ss, writer.buffer]); - } - else if (objTypeKey == VDXF_Data.DataDescriptorKey.vdxfid) { - const descr = DataDescriptor_1.DataDescriptor.fromJson(oneValValues[k]); - let length = 20; - length += varint_1.default.encodingLength(descr.version); - length += varuint_1.default.encodingLength(descr.getByteLength()); - length += descr.getByteLength(); - const writer = new BufferWriter(Buffer.alloc(length)); - writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); - writer.writeVarInt(descr.version); - writer.writeCompactSize(descr.getByteLength()); - writer.writeSlice(descr.toBuffer()); - ss = Buffer.concat([ss, writer.buffer]); - } - else if (objTypeKey == VDXF_Data.MMRDescriptorKey.vdxfid) { - const descr = MMRDescriptor_1.MMRDescriptor.fromJson(oneValValues[k]); - let length = 20; - length += varint_1.default.encodingLength(descr.version); - length += varuint_1.default.encodingLength(descr.getByteLength()); - length += descr.getByteLength(); - const writer = new BufferWriter(Buffer.alloc(length)); - writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); - writer.writeVarInt(descr.version); - writer.writeCompactSize(descr.getByteLength()); - writer.writeSlice(descr.toBuffer()); - ss = Buffer.concat([ss, writer.buffer]); - } - else if (objTypeKey == VDXF_Data.SignatureDataKey.vdxfid) { - const sigData = SignatureData_1.SignatureData.fromJson(oneValValues[k]); - let length = 20; - length += varint_1.default.encodingLength(sigData.version); - length += varuint_1.default.encodingLength(sigData.getByteLength()); - length += sigData.getByteLength(); - const writer = new BufferWriter(Buffer.alloc(length)); - writer.writeSlice((0, address_1.fromBase58Check)(objTypeKey).hash); - writer.writeVarInt(sigData.version); - writer.writeCompactSize(sigData.getByteLength()); - writer.writeSlice(sigData.toBuffer()); - ss = Buffer.concat([ss, writer.buffer]); - } - else { - throw new Error("contentmap invalid or unrecognized vdxfkey for object type: " + oneValValues[k]); - } - } - return ss; -}; -VdxfUniValue.VDXFDataToUniValue = (buffer, offset = 0, pSuccess = null) => { - const reader = new BufferReader(buffer, offset); - let objectUni; - try { - let checkVal; - let version = new bn_js_1.BN(0); - let objSize = 0; - checkVal = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); - if (checkVal == VDXF_Data.DataCurrencyMapKey.vdxfid) { - const oneCurrencyMap = new CurrencyValueMap_1.CurrencyValueMap(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = oneCurrencyMap.fromBuffer(reader.buffer, reader.offset); - if (oneCurrencyMap.isValid()) { - objectUni = { [checkVal]: oneCurrencyMap.toJson() }; + else if (checkVal == VDXF_Data.DataRatingsKey.vdxfid) { + const oneRatingObj = new Rating_1.Rating(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = oneRatingObj.fromBuffer(reader.buffer, reader.offset); + if (oneRatingObj.isValid()) { + objectUni = { [checkVal]: oneRatingObj }; + } } - } - else if (checkVal == VDXF_Data.DataRatingsKey.vdxfid) { - const oneRatingObj = new Rating_1.Rating(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = oneRatingObj.fromBuffer(reader.buffer, reader.offset); - if (oneRatingObj.isValid()) { - objectUni = { [checkVal]: oneRatingObj.toJson() }; + else if (checkVal == VDXF_Data.DataTransferDestinationKey.vdxfid) { + const oneTransferDest = new TransferDestination_1.TransferDestination(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = oneTransferDest.fromBuffer(reader.buffer, reader.offset); + if (oneTransferDest.isValid()) { + objectUni = { [checkVal]: oneTransferDest }; + } } - } - else if (checkVal == VDXF_Data.DataTransferDestinationKey.vdxfid) { - const oneTransferDest = new TransferDestination_1.TransferDestination(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = oneTransferDest.fromBuffer(reader.buffer, reader.offset); - if (oneTransferDest.isValid()) { - objectUni = { [checkVal]: oneTransferDest.toJson() }; + else if (checkVal == VDXF_Data.ContentMultiMapRemoveKey.vdxfid) { + const contentMap = new ContentMultiMapRemove_1.ContentMultiMapRemove(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = contentMap.fromBuffer(reader.buffer, reader.offset); + if (contentMap.isValid()) { + objectUni = { [checkVal]: contentMap }; + } } - } - else if (checkVal == VDXF_Data.ContentMultiMapRemoveKey.vdxfid) { - throw new Error("ContentMultiMapRemoveKey not implemented"); - // TODO: Implement ContentMultiMapRemoveKey - // CContentMultiMapRemove oneContentRemove; - // ss >> VARINT(version); - // ss >> COMPACTSIZE(objSize); - // ss >> oneContentRemove; - // if (oneContentRemove.isValid()) - // { - // objectUni = UniValue(UniValue::VOBJ); - // objectUni.pushKV(EncodeDestination(CIdentityID(checkVal)), oneContentRemove.ToUniValue()); - // } - } - else if (checkVal == VDXF_Data.DataStringKey.vdxfid) { - let stringVal; - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - stringVal = reader.readVarSlice.toString(); - objectUni = { [checkVal]: stringVal }; - } - else if (checkVal == VDXF_Data.DataByteVectorKey.vdxfid) { - let vecVal; - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - vecVal = reader.readVarSlice(); - objectUni = { [checkVal]: vecVal.toString('hex') }; - } - else if (checkVal == VDXF_Data.CrossChainDataRefKey.vdxfid) { - const dataRef = new CrossChainDataRef_1.CrossChainDataRef(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = dataRef.fromBuffer(reader.buffer, reader.offset); - if (dataRef.isValid()) { - objectUni = { [checkVal]: dataRef.toJson() }; + else if (checkVal == VDXF_Data.DataStringKey.vdxfid) { + let stringVal; + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + stringVal = reader.readVarSlice.toString(); + objectUni = { [checkVal]: stringVal }; } - } - else if (checkVal == VDXF_Data.DataDescriptorKey.vdxfid) { - const dataDescriptor = new DataDescriptor_1.DataDescriptor(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); - if (dataDescriptor.isValid()) { - objectUni = { [checkVal]: dataDescriptor.toJson() }; + else if (checkVal == VDXF_Data.DataByteVectorKey.vdxfid) { + let vecVal; + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + vecVal = reader.readVarSlice(); + objectUni = { [checkVal]: vecVal.toString('hex') }; } - } - else if (checkVal == VDXF_Data.MMRDescriptorKey.vdxfid) { - const mmrDescriptor = new MMRDescriptor_1.MMRDescriptor(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = mmrDescriptor.fromBuffer(reader.buffer, reader.offset); - if (mmrDescriptor.isValid()) { - objectUni = { [checkVal]: mmrDescriptor.toJson() }; + else if (checkVal == VDXF_Data.CrossChainDataRefKey.vdxfid) { + const dataRef = new CrossChainDataRef_1.CrossChainDataRef(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = dataRef.fromBuffer(reader.buffer, reader.offset); + if (dataRef.isValid()) { + objectUni = { [checkVal]: dataRef }; + } } - } - else if (checkVal == VDXF_Data.SignatureDataKey.vdxfid) { - const sigData = new SignatureData_1.SignatureData(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = sigData.fromBuffer(reader.buffer, reader.offset); - if (sigData.isValid()) { - objectUni = { [checkVal]: sigData.toJson() }; + else if (checkVal == VDXF_Data.DataDescriptorKey.vdxfid) { + const dataDescriptor = new DataDescriptor_1.DataDescriptor(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); + if (dataDescriptor.isValid()) { + objectUni = { [checkVal]: dataDescriptor }; + } } - } - // if we have an object that we recognized, encode it - if (objectUni) { - if (pSuccess != null) { - pSuccess.value = true; + else if (checkVal == VDXF_Data.MMRDescriptorKey.vdxfid) { + const mmrDescriptor = new MMRDescriptor_1.MMRDescriptor(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = mmrDescriptor.fromBuffer(reader.buffer, reader.offset); + if (mmrDescriptor.isValid()) { + objectUni = { [checkVal]: mmrDescriptor }; + } + } + else if (checkVal == VDXF_Data.SignatureDataKey.vdxfid) { + const sigData = new SignatureData_1.SignatureData(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = sigData.fromBuffer(reader.buffer, reader.offset); + if (sigData.isValid()) { + objectUni = { [checkVal]: sigData }; + } + } + // if we have an object that we recognized, encode it + if (objectUni) { + if (pSuccess != null) { + pSuccess.value = true; + } + } + else { + if (pSuccess != null) { + pSuccess.value = false; + } } } - else { + catch (e) { if (pSuccess != null) { pSuccess.value = false; } } + return { objectUni, offset: reader.offset, pSuccess }; } - catch (e) { - if (pSuccess != null) { - pSuccess.value = false; + static fromJson(obj) { + const map = new Map(); + if (typeof (obj) != 'object') { + if (typeof (obj) != 'string') + throw new Error('Not JSON string as expected'); + if ((0, string_1.isHexString)(obj)) { + map.set("", Buffer.from(obj, "hex")); + return new VdxfUniValue({ + values: map + }); + } + map.set("", Buffer.from(obj, "utf-8")); + return new VdxfUniValue({ + values: map + }); + } + if (obj.serializedHex) { + if (!(0, string_1.isHexString)(obj.serializedHex)) { + throw new Error("contentmap: If the \"serializedhex\" key is present, it's data must be only valid hex and complete"); + } + map.set("", Buffer.from(obj.serializedHex, "hex")); + return new VdxfUniValue({ + values: map + }); } - } - return { objectUni, offset: reader.offset, pSuccess }; -}; -VdxfUniValue.VDXFDataToUniValueArray = (buffer, offset = 0) => { - let entryArr = []; - const reader = new BufferReader(buffer, offset); - let bytesLeft = buffer.length; - while (bytesLeft > 20) // size of uint160 - { - let objOut = { value: false }; - const { objectUni, offset } = VdxfUniValue.VDXFDataToUniValue(reader.buffer, reader.offset, objOut); - reader.offset = offset; - bytesLeft = buffer.length - reader.offset; - if (objOut.value) { - entryArr.push(objectUni); + if (obj.serializedBase64) { + try { + map.set("", Buffer.from(obj.serializedHex, "base64")); + return new VdxfUniValue({ + values: map + }); + } + catch (e) { + throw new Error("contentmap: If the \"serializedBase64\" key is present, it's data must be only valid base64 and complete"); + } } - else { - // add the remaining data as a hex string - reader.offset = reader.offset - 20; - entryArr.push(reader.readSlice(bytesLeft + 20).toString('hex')); - bytesLeft = 0; - break; + if (obj.message) { + map.set("", Buffer.from(obj.serializedHex, "utf-8")); + return new VdxfUniValue({ + values: map + }); + } + // this should be an object with "vdxfkey" as the key and {object} as the json object to serialize + const oneValKeys = Object.keys(obj); + const oneValValues = Object.values(obj); + for (let k = 0; k < oneValKeys.length; k++) { + const objTypeKey = oneValKeys[k]; + if (objTypeKey == VDXF_Data.DataByteKey.vdxfid) { + const oneByte = Buffer.from(oneValValues[k], "hex"); + if (oneByte.length != 1) { + throw new Error("contentmap: byte data must be exactly one byte"); + } + map.set(objTypeKey, oneByte); + } + else if (objTypeKey == VDXF_Data.DataInt16Key.vdxfid) { + const oneShort = Buffer.alloc(2); + oneShort.writeInt16LE(oneValValues[k]); + map.set(objTypeKey, oneShort); + } + else if (objTypeKey == VDXF_Data.DataUint16Key.vdxfid) { + const oneUShort = Buffer.alloc(2); + oneUShort.writeUInt16LE(oneValValues[k]); + map.set(objTypeKey, oneUShort); + } + else if (objTypeKey == VDXF_Data.DataInt32Key.vdxfid) { + const oneInt = Buffer.alloc(4); + oneInt.writeInt32LE(oneValValues[k]); + map.set(objTypeKey, oneInt); + } + else if (objTypeKey == VDXF_Data.DataUint32Key.vdxfid) { + const oneUInt = Buffer.alloc(4); + oneUInt.writeUInt32LE(oneValValues[k]); + map.set(objTypeKey, oneUInt); + } + else if (objTypeKey == VDXF_Data.DataInt64Key.vdxfid) { + const oneInt64 = Buffer.alloc(8); + oneInt64.writeIntLE(oneValValues[k], 0, 8); + map.set(objTypeKey, oneInt64); + } + else if (objTypeKey == VDXF_Data.DataUint160Key.vdxfid) { + (0, address_1.fromBase58Check)(oneValValues[k]).hash; + map.set(objTypeKey, oneValValues[k]); + } + else if (objTypeKey == VDXF_Data.DataUint256Key.vdxfid) { + const oneHash = Buffer.from(oneValValues[k], "hex"); + if (oneHash.length != vdxf_1.HASH256_BYTE_LENGTH) { + throw new Error("contentmap: hash data must be exactly 32 bytes"); + } + map.set(objTypeKey, oneHash); + } + else if (objTypeKey == VDXF_Data.DataStringKey.vdxfid) { + map.set(objTypeKey, oneValValues[k]); + } + else if (objTypeKey == VDXF_Data.DataByteVectorKey.vdxfid) { + if (!(0, string_1.isHexString)(oneValValues[k])) { + throw new Error("contentmap: bytevector data must be valid hex"); + } + map.set(objTypeKey, Buffer.from(oneValValues[k], "hex")); + } + else if (objTypeKey == VDXF_Data.DataCurrencyMapKey.vdxfid) { + const destinations = Object.keys(oneValValues[k]); + const values = Object.values(oneValValues[k]); + const oneCurMap = new CurrencyValueMap_1.CurrencyValueMap({ value_map: new Map(destinations.map((key, index) => [key, new bn_js_1.BN(values[index])])), multivalue: true }); + map.set(objTypeKey, oneCurMap); + } + else if (objTypeKey == VDXF_Data.DataRatingsKey.vdxfid) { + const oneRatingMap = Rating_1.Rating.fromJson(oneValValues[k]); + map.set(objTypeKey, oneRatingMap); + } + else if (objTypeKey == VDXF_Data.DataTransferDestinationKey.vdxfid) { + const transferDest = TransferDestination_1.TransferDestination.fromJson(oneValValues[k]); + map.set(objTypeKey, transferDest); + } + else if (objTypeKey == VDXF_Data.ContentMultiMapRemoveKey.vdxfid) { + const content = ContentMultiMapRemove_1.ContentMultiMapRemove.fromJson(oneValValues[k]); + map.set(objTypeKey, content); + } + else if (objTypeKey == VDXF_Data.CrossChainDataRefKey.vdxfid) { + const crossChainRefKey = CrossChainDataRef_1.CrossChainDataRef.fromJson(oneValValues[k]); + map.set(objTypeKey, crossChainRefKey); + } + else if (objTypeKey == VDXF_Data.DataDescriptorKey.vdxfid) { + const descriptor = DataDescriptor_1.DataDescriptor.fromJson(oneValValues[k]); + map.set(objTypeKey, descriptor); + } + else if (objTypeKey == VDXF_Data.MMRDescriptorKey.vdxfid) { + const mmrDescriptor = MMRDescriptor_1.MMRDescriptor.fromJson(oneValValues[k]); + map.set(objTypeKey, mmrDescriptor); + } + else if (objTypeKey == VDXF_Data.SignatureDataKey.vdxfid) { + const sigData = SignatureData_1.SignatureData.fromJson(oneValValues[k]); + map.set(objTypeKey, sigData); + } + else { + throw new Error("Unkknow vdxfkey: " + oneValValues[k]); + } } + return new VdxfUniValue({ + values: map + }); } - if (bytesLeft && bytesLeft <= 20) { - entryArr.push(reader.readSlice(bytesLeft).toString('hex')); + toJson() { + const ret = {}; + for (const key of this.values.keys()) { + if (key === "") { + ret[key] = this.values.get(key).toString('hex'); + } + else if (typeof (this.values.get(key)) == 'string') { + ret[key] = this.values.get(key); + } + else if (Buffer.isBuffer(this.values.get(key))) { + ret[key] = this.values.get(key).toString('hex'); + } + else if (this.values.get(key) instanceof bn_js_1.BN) { + ret[key] = this.values.get(key).toString(10); + } + else { + ret[key] = this.values.get(key).toJson(); + } + } + return ret; } - return entryArr.length == 0 ? null : (entryArr.length == 1 ? entryArr[0] : entryArr); -}; +} +exports.VdxfUniValue = VdxfUniValue; diff --git a/dist/pbaas/transaction/IdentityScript.d.ts b/dist/pbaas/transaction/IdentityScript.d.ts index ddeff07..b7ffb10 100644 --- a/dist/pbaas/transaction/IdentityScript.d.ts +++ b/dist/pbaas/transaction/IdentityScript.d.ts @@ -5,5 +5,5 @@ import { SmartTransactionScript } from "./SmartTransactionScript"; export declare class IdentityScript extends SmartTransactionScript implements SerializableEntity { constructor(master?: OptCCParams, params?: OptCCParams); static fromIdentity(identity: Identity): IdentityScript; - getIdentity(multimapKeylists?: Array | null>): Identity; + getIdentity(parseVdxfObjects?: boolean): Identity; } diff --git a/dist/pbaas/transaction/IdentityScript.js b/dist/pbaas/transaction/IdentityScript.js index e9da65d..c40c693 100644 --- a/dist/pbaas/transaction/IdentityScript.js +++ b/dist/pbaas/transaction/IdentityScript.js @@ -63,9 +63,9 @@ class IdentityScript extends SmartTransactionScript_1.SmartTransactionScript { }); return new IdentityScript(master, params); } - getIdentity(multimapKeylists) { + getIdentity(parseVdxfObjects = false) { const identity = new Identity_1.Identity(); - identity.fromBuffer(this.params.getParamObject(), 0, multimapKeylists); + identity.fromBuffer(this.params.getParamObject(), 0, parseVdxfObjects); return identity; } } diff --git a/dist/vdxf/classes/Challenge.d.ts b/dist/vdxf/classes/Challenge.d.ts index 7b295b0..56202d6 100644 --- a/dist/vdxf/classes/Challenge.d.ts +++ b/dist/vdxf/classes/Challenge.d.ts @@ -1,6 +1,7 @@ /// import { Utf8DataVdxfObject, VDXFObject, Utf8OrBase58Object } from "../"; import { Context } from "./Context"; +import { Hash160 } from "./Hash160"; import { Attestation } from "./Attestation"; export declare class RedirectUri extends VDXFObject { uri: string; @@ -76,6 +77,10 @@ export declare class Challenge extends VDXFObject implements ChallengeInterface skip: boolean; }; } -export declare class RequestedPermission extends Utf8DataVdxfObject { - constructor(vdxfkey?: string, data?: string); +export declare class RequestedPermission extends VDXFObject { + data: Array; + constructor(vdxfkey?: string, data?: Array | Array); + dataByteLength(): number; + toDataBuffer(): Buffer; + fromDataBuffer(buffer: Buffer, offset?: number): number; } diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index 1c3fd67..9cc89d0 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -255,9 +255,43 @@ class Challenge extends __1.VDXFObject { } } exports.Challenge = Challenge; -class RequestedPermission extends __1.Utf8DataVdxfObject { - constructor(vdxfkey = "", data = "") { - super(data, vdxfkey); +class RequestedPermission extends __1.VDXFObject { + constructor(vdxfkey, data) { + super(vdxfkey); + if (data && data.length > 0) { + if (data[0] instanceof Hash160_1.Hash160) { + this.data = data; + } + else { + this.data = data.map((x) => new Hash160_1.Hash160(x)); + } + } + } + dataByteLength() { + let length = 0; + length += varuint_1.default.encodingLength(this.data.length); + for (let i = 0; i < this.data.length; i++) { + length += this.data[i].hash.length; + } + return length; + } + toDataBuffer() { + const buffer = Buffer.alloc(this.dataByteLength()); + const writer = new bufferutils_1.default.BufferWriter(buffer); + writer.writeCompactSize(this.data.length); + for (let i = 0; i < this.data.length; i++) { + writer.writeSlice(this.data[i].toBuffer()); + } + return writer.buffer; + } + fromDataBuffer(buffer, offset) { + const reader = new bufferutils_1.default.BufferReader(buffer, offset); + const numKeys = reader.readCompactSize(); + this.data = []; + for (let i = 0; i < numKeys; i++) { + this.data.push(new Hash160_1.Hash160(reader.readSlice(20))); + } + return reader.offset; } } exports.RequestedPermission = RequestedPermission; diff --git a/dist/vdxf/index.d.ts b/dist/vdxf/index.d.ts index db5ed09..f385f35 100644 --- a/dist/vdxf/index.d.ts +++ b/dist/vdxf/index.d.ts @@ -65,7 +65,7 @@ export declare class VDXFData extends VDXFObject { toDataBuffer(): Buffer; fromDataBuffer(buffer: Buffer, offset?: number): number; toJson(): { - data: Buffer; + data: string; vdxfkey: string; }; } diff --git a/dist/vdxf/index.js b/dist/vdxf/index.js index c247140..30d632c 100644 --- a/dist/vdxf/index.js +++ b/dist/vdxf/index.js @@ -141,7 +141,7 @@ class VDXFData extends VDXFObject { } toJson() { return { - data: this.data, + data: this.data.toString("hex"), vdxfkey: this.vdxfkey, }; } diff --git a/src/__tests__/attestation/attestation.test.ts b/src/__tests__/attestation/attestation.test.ts index 7d5cbfe..34877b4 100644 --- a/src/__tests__/attestation/attestation.test.ts +++ b/src/__tests__/attestation/attestation.test.ts @@ -35,16 +35,15 @@ describe('Serializes and deserializes attestation request', () => { challenge_id: "iMqzCkWdebC19xbjkLfVdDkkGP9Ni1oxoN", requested_access: [ new RequestedPermission(IDENTITY_VIEW.vdxfid, [IDENTITY_PERSONALDETAILS.vdxfid, IDENTITY_CONTACTDETAILS.vdxfid, IDENTITY_LOCATION.vdxfid, IDENTITY_BANKINGDETAILS.vdxfid, IDENTITY_DOCUMENTS.vdxfid]), - new RequestedPermission(PROFILE_DATA_VIEW_REQUEST.vdxfid, ""), // change to array - new RequestedPermission(LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY.vdxfid, ""), - new RequestedPermission(LOGIN_CONSENT_REDIRECT_VDXF_KEY.vdxfid, ""), + new RequestedPermission(PROFILE_DATA_VIEW_REQUEST.vdxfid), // change to array + new RequestedPermission(LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY.vdxfid), + new RequestedPermission(LOGIN_CONSENT_REDIRECT_VDXF_KEY.vdxfid), ], - redirect_uris: [], // this contains the webhook - subject: [new Subject( - "https://example.com/sendpersonaldata", //this doesnt need to be in subject put in redirect_uris - LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY.vdxfid - ), + redirect_uris: [new RedirectUri( + "https://example.com/sendpersonaldata", + LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY.vdxfid) ], + subject: [], provisioning_info: [], // created_at: Number((Date.now() / 1000).toFixed(0)), } @@ -67,7 +66,7 @@ describe('Serializes and deserializes attestation request', () => { }, challenge: { challenge_id: "iKNufKJdLX3Xg8qFru9AuLBvivAEJ88PW4", - requested_access: [new RequestedPermission(IDENTITY_VIEW.vdxfid, "")], + requested_access: [new RequestedPermission(IDENTITY_VIEW.vdxfid)], session_id: "iRQZGW36o3RcVR1xyVT1qWdAKdxp3wUyrh", redirect_uris: [ new RedirectUri( @@ -111,8 +110,8 @@ describe('Serializes and deserializes attestation request', () => { }); const attestationitem = Buffer.concat([fromBase58Check(ATTESTATION_PROVISION_TYPE.vdxfid).hash, - Buffer.from([0x01]), - attestationDataDescriptor.toBuffer()]); + Buffer.from([0x01]), + attestationDataDescriptor.toBuffer()]); const attestationObject = new Attestation(attestationitem.toString('hex'), ATTESTATION_PROVISION_OBJECT.vdxfid); @@ -125,7 +124,7 @@ describe('Serializes and deserializes attestation request', () => { }, challenge: { challenge_id: "iKNufKJdLX3Xg8qFru9AuLBvivAEJ88PW4", - requested_access: [new RequestedPermission(IDENTITY_VIEW.vdxfid, "")], + requested_access: [new RequestedPermission(IDENTITY_VIEW.vdxfid)], session_id: "iRQZGW36o3RcVR1xyVT1qWdAKdxp3wUyrh", redirect_uris: [ new RedirectUri( @@ -138,7 +137,7 @@ describe('Serializes and deserializes attestation request', () => { context: new Context({ ["i4KyLCxWZXeSkw15dF95CUKytEK3HU7em9"]: "test", }), - attestations: [ attestationObject] + attestations: [attestationObject] }, }); diff --git a/src/api/ApiPrimitive.ts b/src/api/ApiPrimitive.ts index 0fce8b0..b9e1144 100644 --- a/src/api/ApiPrimitive.ts +++ b/src/api/ApiPrimitive.ts @@ -3,7 +3,7 @@ import { IdentityDefinition } from "../identity/IdentityDefinition"; import { OfferForMaking } from "../offers/OfferForMaking"; import { ListedOffer } from "../offers/OfferList"; import { RawTransaction } from "../transaction/RawTransaction"; -import { signDataArgs } from "./classes/SignData/SignDataRequest"; +import { SignDataArgs } from "./classes/SignData/SignDataRequest"; export type ApiPrimitive = | string @@ -17,7 +17,7 @@ export type ApiPrimitive = | IdentityDefinition | BlockInfo | RawTransaction - | signDataArgs; + | SignDataArgs; export type ApiPrimitiveJson = { [key: string]: ApiPrimitive | undefined }; diff --git a/src/api/classes/SignData/SignDataRequest.ts b/src/api/classes/SignData/SignDataRequest.ts index 4853626..e3e9d92 100644 --- a/src/api/classes/SignData/SignDataRequest.ts +++ b/src/api/classes/SignData/SignDataRequest.ts @@ -4,7 +4,7 @@ import { SIGN_DATA } from "../../../constants/cmds"; import { DataDescriptor } from "../../../utils/types/DataDescriptor"; import { SignData } from "../../../utils/types/SignData"; -export type signDataArgs = { +export type SignDataArgs = { address?: string; filename?: string; message?: string; @@ -26,9 +26,9 @@ export type signDataArgs = { } export class SignDataRequest extends ApiRequest { - data: signDataArgs; + data: SignDataArgs; - constructor(chain: string, signableItems: signDataArgs) { + constructor(chain: string, signableItems: SignDataArgs) { super(chain, SIGN_DATA); this.data = signableItems; } @@ -42,7 +42,7 @@ export class SignDataRequest extends ApiRequest { static fromJson(object: ApiPrimitiveJson): SignDataRequest { return new SignDataRequest( object.chain as string, - object.data as signDataArgs + object.data as SignDataArgs ); } diff --git a/src/api/classes/SignData/SignDataResponse.ts b/src/api/classes/SignData/SignDataResponse.ts index 18cc4db..4e0a6a6 100644 --- a/src/api/classes/SignData/SignDataResponse.ts +++ b/src/api/classes/SignData/SignDataResponse.ts @@ -5,20 +5,20 @@ import { DataDescriptor } from "../../../utils/types/DataDescriptor"; export class SignDataResponse extends ApiResponse { result: { - mmrdescriptor_encrypted: mmrDescriptorParameters; - mmrdescriptor: mmrDescriptorParameters; - signature: string; - signaturedata_encrypted: DataDescriptor; - signaturedata_ssk: string; - signaturedata: Signature; - system: string; - systemid: string; - hashtype: string; - mmrhashtype: string; - hash: string; - identity: string; - canonicalname: string; - address: string; - signatureheight: number; + mmrdescriptor_encrypted?: mmrDescriptorParameters; + mmrdescriptor?: mmrDescriptorParameters; + signature?: string; + signaturedata_encrypted?: DataDescriptor; + signaturedata_ssk?: string; + signaturedata?: Signature; + system?: string; + systemid?: string; + hashtype?: string; + mmrhashtype?: string; + hash?: string; + identity?: string; + canonicalname?: string; + address?: string; + signatureheight?: number; }; } \ No newline at end of file diff --git a/src/constants/vdxf.ts b/src/constants/vdxf.ts index 3f88638..423cf19 100644 --- a/src/constants/vdxf.ts +++ b/src/constants/vdxf.ts @@ -3,6 +3,7 @@ import bufferutils from "../utils/bufferutils"; export const VDXF_OBJECT_DEFAULT_VERSION = new BN(1, 10) export const HASH160_BYTE_LENGTH = 20 +export const HASH256_BYTE_LENGTH = 32 export const I_ADDR_VERSION = 102 export const R_ADDR_VERSION = 60 diff --git a/src/pbaas/ContentMultiMap.ts b/src/pbaas/ContentMultiMap.ts index 786bcac..b5368eb 100644 --- a/src/pbaas/ContentMultiMap.ts +++ b/src/pbaas/ContentMultiMap.ts @@ -97,24 +97,23 @@ export class ContentMultiMap implements SerializableEntity { return writer.buffer } - fromBuffer(buffer: Buffer, offset: number = 0, keylists: Array | null> = []) { + fromBuffer(buffer: Buffer, offset: number = 0, parseVdxfObjects: boolean = false) { const reader = new BufferReader(buffer, offset); - const contentMultiMapSize = reader.readVarInt(); + const contentMultiMapSize = reader.readCompactSize(); this.kv_content = new Map(); - for (var i = 0; i < contentMultiMapSize.toNumber(); i++) { - const keylist = i < keylists.length ? keylists[i] : null; - + for (var i = 0; i < contentMultiMapSize; i++) { + const contentMapKey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); const vector: Array = []; const count = reader.readCompactSize(); for (let j = 0; j < count; j++) { - if (keylist) { + if (parseVdxfObjects) { const unival = new VdxfUniValue(); - unival.fromBuffer(reader.readVarSlice(), 0, keylist); + unival.fromBuffer(reader.readVarSlice(), 0); vector.push(unival); } else vector.push(reader.readVarSlice()); diff --git a/src/pbaas/ContentMultiMapRemove.ts b/src/pbaas/ContentMultiMapRemove.ts index 52cb6cc..fef60e8 100644 --- a/src/pbaas/ContentMultiMapRemove.ts +++ b/src/pbaas/ContentMultiMapRemove.ts @@ -32,7 +32,7 @@ export class ContentMultiMapRemove implements SerializableEntity { static ACTION_CLEAR_MAP = new BN(4); static ACTION_LAST = new BN(4); - constructor (data: { version?: BigNumber, action?: BigNumber, entry_key?: string, value_hash?: Buffer}) { + constructor(data?: { version?: BigNumber, action?: BigNumber, entry_key?: string, value_hash?: Buffer }) { this.version = data.version || new BN(1, 10); this.action = data.action || new BN(0, 10); this.entry_key = data.entry_key || ""; @@ -44,24 +44,24 @@ export class ContentMultiMapRemove implements SerializableEntity { byteLength += 4; // version uint32 byteLength + 4; // action uint32 - if (this.action != ContentMultiMapRemove.ACTION_CLEAR_MAP){ + if (this.action != ContentMultiMapRemove.ACTION_CLEAR_MAP) { byteLength += 20 - if (this.action != ContentMultiMapRemove.ACTION_REMOVE_ALL_KEY){ + if (this.action != ContentMultiMapRemove.ACTION_REMOVE_ALL_KEY) { byteLength += 32 } } return byteLength } - toBuffer () { + toBuffer() { const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) bufferWriter.writeUInt32(this.version.toNumber()); bufferWriter.writeUInt32(this.action.toNumber()); - - if (this.action != ContentMultiMapRemove.ACTION_CLEAR_MAP){ + + if (this.action != ContentMultiMapRemove.ACTION_CLEAR_MAP) { bufferWriter.writeSlice(fromBase58Check(this.entry_key).hash); - if (this.action != ContentMultiMapRemove.ACTION_REMOVE_ALL_KEY){ + if (this.action != ContentMultiMapRemove.ACTION_REMOVE_ALL_KEY) { bufferWriter.writeSlice(this.value_hash); } } @@ -69,15 +69,15 @@ export class ContentMultiMapRemove implements SerializableEntity { return bufferWriter.buffer } - fromBuffer (buffer: Buffer, offset: number = 0) { + fromBuffer(buffer: Buffer, offset: number = 0) { const reader = new BufferReader(buffer, offset); - + this.version = new BN(reader.readUInt32()); this.action = new BN(reader.readUInt32()); - if (this.action != ContentMultiMapRemove.ACTION_CLEAR_MAP){ + if (this.action != ContentMultiMapRemove.ACTION_CLEAR_MAP) { this.entry_key = toBase58Check(reader.readSlice(20), I_ADDR_VERSION) - if (this.action != ContentMultiMapRemove.ACTION_REMOVE_ALL_KEY){ + if (this.action != ContentMultiMapRemove.ACTION_REMOVE_ALL_KEY) { this.value_hash = reader.readSlice(32) } } @@ -92,4 +92,25 @@ export class ContentMultiMapRemove implements SerializableEntity { value_hash: Buffer.from(data.valuehash, 'hex') }) } + + toJson(): ContentMultiMapRemoveJson { + return { + version: this.version.toNumber(), + action: this.action.toNumber(), + entrykey: this.entry_key, + valuehash: this.value_hash.toString('hex') + } + } + + isValid() { + + if (this.version.gte(ContentMultiMapRemove.VERSION_FIRST) && + this.version.lte(ContentMultiMapRemove.VERSION_LAST)) { + return (this.action.eq(ContentMultiMapRemove.ACTION_CLEAR_MAP) || + (this.entry_key && (this.entry_key.length > 0) && + (this.action.eq(ContentMultiMapRemove.ACTION_REMOVE_ALL_KEY) || this.value_hash.length > 0) + )); + } + return false; + } } \ No newline at end of file diff --git a/src/pbaas/CrossChainDataRef.ts b/src/pbaas/CrossChainDataRef.ts index ba7aae9..8941cc2 100644 --- a/src/pbaas/CrossChainDataRef.ts +++ b/src/pbaas/CrossChainDataRef.ts @@ -6,15 +6,17 @@ import { BN } from 'bn.js'; import { BigNumber } from '../utils/types/BigNumber'; import { I_ADDR_VERSION } from '../constants/vdxf'; import { SerializableEntity } from '../utils/types/SerializableEntity'; -import { PBaaSEvidenceRef } from './PBaaSEvidenceRef'; -import { IdentityMultimapRef } from './IdentityMultimapRef'; -import { URLRef } from './URLRef'; +import { PBaaSEvidenceRef, PBaaSEvidenceRefJson } from './PBaaSEvidenceRef'; +import { IdentityMultimapRef, IdentityMultimapRefJson } from './IdentityMultimapRef'; +import { URLRef, URLRefJson } from './URLRef'; const { BufferReader, BufferWriter } = bufferutils -export interface CrossChainDataRefJson { - ref: PBaaSEvidenceRef | IdentityMultimapRef | URLRef; -} +export type CrossChainDataRefJson = + | (PBaaSEvidenceRefJson & { type: number }) + | (IdentityMultimapRefJson & { type: number }) + | (URLRefJson & { type: number }); + export class CrossChainDataRef implements SerializableEntity { ref: PBaaSEvidenceRef | IdentityMultimapRef | URLRef; @@ -76,13 +78,13 @@ export class CrossChainDataRef implements SerializableEntity { return {...this.ref.toJson(), type: this.which()}; } - static fromJson(data: any) { + static fromJson(data: CrossChainDataRefJson) { if (data.type == CrossChainDataRef.TYPE_CROSSCHAIN_DATAREF) { - return new CrossChainDataRef(PBaaSEvidenceRef.fromJson(data)); + return new CrossChainDataRef(PBaaSEvidenceRef.fromJson(data as PBaaSEvidenceRefJson)); } else if (data.type == CrossChainDataRef.TYPE_IDENTITY_DATAREF) { - return new CrossChainDataRef(IdentityMultimapRef.fromJson(data)); + return new CrossChainDataRef(IdentityMultimapRef.fromJson(data as IdentityMultimapRefJson)); } else if (data.type == CrossChainDataRef.TYPE_URL_REF) { - return new CrossChainDataRef(URLRef.fromJson(data)); + return new CrossChainDataRef(URLRef.fromJson(data as URLRefJson)); } else throw new Error("Invalid CrossChainDataRef type"); } diff --git a/src/pbaas/DataDescriptor.ts b/src/pbaas/DataDescriptor.ts index 8ab7acb..8d8d12f 100644 --- a/src/pbaas/DataDescriptor.ts +++ b/src/pbaas/DataDescriptor.ts @@ -98,7 +98,7 @@ export class DataDescriptor implements SerializableEntity { if (data != null) { if (data.flags != null) newDataDescriptor.flags = new BN(data.flags) if (data.version != null) newDataDescriptor.version = new BN(data.version) - if (data.objectdata != null) newDataDescriptor.objectdata = VdxfUniValue.vectorEncodeVDXFUni(data.objectdata) + if (data.objectdata != null) newDataDescriptor.objectdata = VdxfUniValue.fromJson(data.objectdata).toBuffer(); if (data.label != null) newDataDescriptor.label = data.label; if (data.mimetype != null) newDataDescriptor.mimeType = data.mimetype; if (data.salt != null) newDataDescriptor.salt = Buffer.from(data.salt, 'hex'); @@ -310,15 +310,17 @@ export class DataDescriptor implements SerializableEntity { if (this.mimeType.startsWith("text/")) isText = true; } - let processedObject = VdxfUniValue.VDXFDataToUniValueArray(this.objectdata) + let processedObject = new VdxfUniValue(); + + processedObject.fromBuffer(this.objectdata) - if (isText && typeof processedObject === 'string' || processedObject instanceof String) { + if (isText && typeof processedObject.values.get("") === 'string') { - let objectDataUni = { message: Buffer.from(processedObject, 'hex').toString('utf-8') }; + let objectDataUni = { message: Buffer.from(processedObject.values.get("") as string, 'hex').toString('utf-8') }; retval['objectdata'] = objectDataUni; } else { - retval['objectdata'] = processedObject; + retval['objectdata'] = processedObject.toJson(); } if (this.label) retval['label'] = this.label; diff --git a/src/pbaas/Identity.ts b/src/pbaas/Identity.ts index f880784..6bf3d5c 100644 --- a/src/pbaas/Identity.ts +++ b/src/pbaas/Identity.ts @@ -197,7 +197,7 @@ export class Identity extends Principal implements SerializableEntity { return writer.buffer } - fromBuffer(buffer: Buffer, offset: number = 0, multimapKeylists: Array | null> = []) { + fromBuffer(buffer: Buffer, offset: number = 0, parseVdxfObjects: boolean = false) { const reader = new BufferReader(buffer, offset); reader.offset = super.fromBuffer(reader.buffer, reader.offset); @@ -215,7 +215,7 @@ export class Identity extends Principal implements SerializableEntity { if (this.version.gte(IDENTITY_VERSION_PBAAS)) { const multimap = new ContentMultiMap(); - reader.offset = multimap.fromBuffer(reader.buffer, reader.offset, multimapKeylists); + reader.offset = multimap.fromBuffer(reader.buffer, reader.offset, parseVdxfObjects); this.content_multimap = multimap; } diff --git a/src/pbaas/SignatureData.ts b/src/pbaas/SignatureData.ts index 712415a..8f60874 100644 --- a/src/pbaas/SignatureData.ts +++ b/src/pbaas/SignatureData.ts @@ -42,7 +42,9 @@ export class SignatureData implements SerializableEntity { static DEFAULT_VERSION = new BN(1); static TYPE_VERUSID_DEFAULT = new BN(1); - constructor(data?) { + constructor(data?: { version?: BigNumber, system_ID?: string, hash_type?: BigNumber, signature_hash?: Buffer, + identity_ID?: string, sig_type?: BigNumber, vdxf_keys?: Array, vdxf_key_names?: Array, + bound_hashes?: Array, signature_as_vch?: Buffer }) { if (data) { this.version = data.version || new BN(1, 10); diff --git a/src/pbaas/URLRef.ts b/src/pbaas/URLRef.ts index f96243c..7ddf82d 100644 --- a/src/pbaas/URLRef.ts +++ b/src/pbaas/URLRef.ts @@ -9,6 +9,11 @@ import { SerializableEntity } from '../utils/types/SerializableEntity'; const { BufferReader, BufferWriter } = bufferutils +export interface URLRefJson { + version: string; + url: string; +} + export class URLRef implements SerializableEntity { static FIRST_VERSION = new BN(1); @@ -66,7 +71,7 @@ export class URLRef implements SerializableEntity { } } - static fromJson(data: { version: string, url: string }): URLRef { + static fromJson(data: URLRefJson): URLRef { return new URLRef({ version: new BN(data.version, 10), url: data.url diff --git a/src/pbaas/VdxfUniValue.ts b/src/pbaas/VdxfUniValue.ts index 860ad09..9b6394a 100644 --- a/src/pbaas/VdxfUniValue.ts +++ b/src/pbaas/VdxfUniValue.ts @@ -2,9 +2,8 @@ import varuint from '../utils/varuint' import bufferutils from '../utils/bufferutils' import { BigNumber } from '../utils/types/BigNumber'; import { fromBase58Check, toBase58Check } from '../utils/address'; -import { HASH160_BYTE_LENGTH, I_ADDR_VERSION, VDXF_OBJECT_DEFAULT_VERSION } from '../constants/vdxf'; +import { HASH160_BYTE_LENGTH, HASH256_BYTE_LENGTH, I_ADDR_VERSION, VDXF_OBJECT_DEFAULT_VERSION } from '../constants/vdxf'; import { BN } from 'bn.js'; -import { DATA_TYPE_STRING } from '../vdxf'; import { SerializableEntity } from '../utils/types/SerializableEntity'; import varint from '../utils/varint'; import { isHexString } from '../utils/string'; @@ -12,11 +11,10 @@ import { CurrencyValueMap } from './CurrencyValueMap'; import { Rating, RatingJson } from './Rating'; import { TransferDestination, TransferDestinationJson } from './TransferDestination'; import { ContentMultiMapRemove, ContentMultiMapRemoveJson } from './ContentMultiMapRemove'; -import { CrossChainDataRef } from './CrossChainDataRef'; -import { SignatureData } from './SignatureData'; -import { DataDescriptor } from './DataDescriptor'; +import { CrossChainDataRef, CrossChainDataRefJson } from './CrossChainDataRef'; +import { SignatureData, SignatureJsonDataInterface } from './SignatureData'; +import { DataDescriptor, DataDescriptorJson } from './DataDescriptor'; import { MMRDescriptor, MMRDescriptorJson } from './MMRDescriptor'; -import { BufferDataVdxfObject } from '../index'; import * as VDXF_Data from '../vdxf/vdxfdatakeys'; export const VDXF_UNI_VALUE_VERSION_INVALID = new BN(0, 10); @@ -25,9 +23,21 @@ export const VDXF_UNI_VALUE_VERSION_CURRENT = new BN(1, 10); const { BufferWriter, BufferReader } = bufferutils // TODO: Add other type definitions -export type VdxfUniType = string | Buffer; -export type VdxfUniValueJson = { [key: string]: string }; - +export type VdxfUniType = string | Buffer | BigNumber | CurrencyValueMap | Rating | + TransferDestination | ContentMultiMapRemove | CrossChainDataRef | SignatureData | + DataDescriptor | MMRDescriptor; + +export interface VdxfUniValueJson { + [key: string]: string | number | RatingJson | TransferDestinationJson | + ContentMultiMapRemoveJson | CrossChainDataRefJson | SignatureJsonDataInterface | DataDescriptorJson | MMRDescriptorJson; + serializedHex?: string; + serializedBase64?: string; + message?: string; +}; + +export type JsonSerializableObject = CurrencyValueMap | Rating | + TransferDestination | ContentMultiMapRemove | CrossChainDataRef | SignatureData | + DataDescriptor | MMRDescriptor; // This UniValue class was adapted from C++ code for encoding JSON objects into bytes. It is not serialization and // therefore doesn't have a fromBuffer function, as you can't reliably decode it, only encode. export class VdxfUniValue implements SerializableEntity { @@ -45,391 +55,325 @@ export class VdxfUniValue implements SerializableEntity { for (const key of this.values.keys()) { const value = this.values.get(key); - length += HASH160_BYTE_LENGTH; - length += varint.encodingLength(this.version); - if (key == DATA_TYPE_STRING.vdxfid) { - const valueString = (value as string); - const valBuf = Buffer.from(valueString, 'utf8'); + // if we just have serialized data + if (key === "") { + length += varuint.encodingLength(Buffer.from(value as string, "hex").length) + length += Buffer.from(value as string, "hex").length; + continue; + } - //NOTE 3 is from ss type + ver + vdxfidver - length += varint.encodingLength(new BN(valBuf.length + 3)); + if (key == VDXF_Data.DataByteKey.vdxfid) { + length += 1; + continue; + } + else if ((key == VDXF_Data.DataUint16Key.vdxfid) || (key == VDXF_Data.DataInt16Key.vdxfid)) { + length += 2; + continue; + } + else if ((key == VDXF_Data.DataInt32Key.vdxfid) || (key == VDXF_Data.DataUint32Key.vdxfid)) { + length += 4; + continue; + } + else if (key == VDXF_Data.DataInt64Key.vdxfid) { + length += 8; + continue; + } + else if (key == VDXF_Data.DataUint160Key.vdxfid) { + length += HASH160_BYTE_LENGTH; + continue; + } + else if (key == VDXF_Data.DataUint256Key.vdxfid) { + length += HASH256_BYTE_LENGTH; + continue; + } - length += varuint.encodingLength(valBuf.length); - length += valBuf.length; - } else throw new Error("Invalid or unrecognized vdxf key for object type") - } + length += HASH160_BYTE_LENGTH; - return length; - } + if (key == VDXF_Data.DataStringKey.vdxfid) { + const encodedLength = varuint.encodingLength(Buffer.from(value as string, "utf-8").length) + length += varuint.encodingLength(1); + length += varuint.encodingLength(encodedLength + Buffer.from(value as string, "utf-8").length); + length += encodedLength; + length += Buffer.from(value as string, "utf-8").length; + } + else if (key == VDXF_Data.DataByteVectorKey.vdxfid) { + const encodedLength = varuint.encodingLength(Buffer.from(value as string, "hex").length) + length += varuint.encodingLength(1); + length += varuint.encodingLength(encodedLength + Buffer.from(value as string, "hex").length); + length += encodedLength; + length += Buffer.from(value as string, "hex").length; + } + else if (key == VDXF_Data.DataCurrencyMapKey.vdxfid) { - toBuffer() { - const writer = new BufferWriter(Buffer.alloc(this.getByteLength())); + const destinations = Object.keys(value); + const values = Object.values(value); + const oneCurMap = new CurrencyValueMap({ value_map: new Map(destinations.map((key, index) => [key, new BN(values[index])])), multivalue: true }); + length += varuint.encodingLength(1); + length += varuint.encodingLength(oneCurMap.getByteLength()); + length += oneCurMap.getByteLength(); + } + else if (key == VDXF_Data.DataRatingsKey.vdxfid) { - for (const key of this.values.keys()) { - const value = this.values.get(key); - writer.writeSlice(fromBase58Check(key).hash) - writer.writeVarInt(this.version); + const oneRatingMap = new Rating(value as Rating); - if (key == DATA_TYPE_STRING.vdxfid) { - const valueString = value as string; - const valBuf = Buffer.from(valueString, 'utf8'); + length += varint.encodingLength(oneRatingMap.version); + length += varuint.encodingLength(oneRatingMap.getByteLength()); + length += oneRatingMap.getByteLength(); + } + else if (key == VDXF_Data.DataTransferDestinationKey.vdxfid) { - //NOTE 3 is from ss type + ver + vdxfidver - writer.writeVarInt(new BN(valBuf.length + 3)); + const transferDest = new TransferDestination(value as TransferDestination); - writer.writeVarSlice(valBuf); - } else throw new Error("Invalid or unrecognized vdxf key for object type") - } + length += varint.encodingLength(transferDest.typeNoFlags()); + length += varuint.encodingLength(transferDest.getByteLength()); + length += transferDest.getByteLength(); + } + else if (key == VDXF_Data.ContentMultiMapRemoveKey.vdxfid) { - return writer.buffer; - } + const transferDest = new ContentMultiMapRemove(value as ContentMultiMapRemove); - fromBuffer(buffer: Buffer, offset: number = 0, keylist: Array = []): number { - const reader = new BufferReader(buffer, offset); - let lastPrereadOffset = reader.offset; + length += varint.encodingLength(transferDest.version); + length += varuint.encodingLength(transferDest.getByteLength()); + length += transferDest.getByteLength(); + } + else if (key == VDXF_Data.CrossChainDataRefKey.vdxfid) { - function readNextKey() { - lastPrereadOffset = reader.offset; + const transferDest = new CrossChainDataRef(value); - try { - return toBase58Check(reader.readSlice(20), I_ADDR_VERSION); - } catch (e) { - return null; + length += varint.encodingLength(VDXF_OBJECT_DEFAULT_VERSION); + length += varuint.encodingLength(transferDest.getByteLength()); + length += transferDest.getByteLength(); } - } + else if (key == VDXF_Data.DataDescriptorKey.vdxfid) { - this.values = new Map(); + const descr = new DataDescriptor(value as DataDescriptor); - for (const key of keylist) { - const dataTypeKey = readNextKey(); - this.version = reader.readVarInt(); + length += varint.encodingLength(descr.version); + length += varuint.encodingLength(descr.getByteLength()); + length += descr.getByteLength(); + } + else if (key == VDXF_Data.MMRDescriptorKey.vdxfid) { - if (this.version.gt(VDXF_UNI_VALUE_VERSION_CURRENT)) throw new Error("Unknown VDXFUniValue version"); + const descr = new MMRDescriptor(value as MMRDescriptor); - if (dataTypeKey == DATA_TYPE_STRING.vdxfid) { // change to const buf = VdxfUniValue.fromJson(json).toBuffer() - reader.readVarInt(); + length += varint.encodingLength(descr.version); + length += varuint.encodingLength(descr.getByteLength()); + length += descr.getByteLength(); + } + else if (key == VDXF_Data.SignatureDataKey.vdxfid) { - const slice = reader.readVarSlice(); + const sigData = new SignatureData(value as SignatureData); - this.values.set(dataTypeKey, slice.toString('utf8')); + length += varint.encodingLength(sigData.version); + length += varuint.encodingLength(sigData.getByteLength()); + length += sigData.getByteLength(); } else { - throw new Error("Invalid or unrecognized vdxf key for object type") + throw new Error("contentmap invalid or unrecognized vdxfkey for object type: " + key); } - } - - return reader.offset; - } - static fromJson(obj: VdxfUniValueJson) { - const map = new Map() - - for (const key in obj) { - map.set(key, obj[key]); + return length; } - - return new VdxfUniValue({ - values: map - }) } - toJson(): VdxfUniValueJson { - const ret = {}; + toBuffer() { + const writer = new BufferWriter(Buffer.alloc(this.getByteLength())); for (const key of this.values.keys()) { - ret[key] = this.values.get(key) as string; - } - - return ret; - } - - static vectorEncodeVDXFUni = (obj): Buffer => { - let ss = Buffer.from(''); - - if (typeof (obj) != 'object') { - if (typeof (obj) != 'string') throw new Error('VectorEncodeVDXFUni: not JSON string as expected'); - if (isHexString(obj)) { - return Buffer.from(obj, "hex"); - } - return Buffer.from(obj, "utf-8"); - } - - if (obj.serializedHex) { - if (!isHexString(obj.serializedHex)) { - throw new Error("contentmap: If the \"serializedhex\" key is present, it's data must be only valid hex and complete"); - } - return Buffer.from(obj.serializedHex); - } - - if (obj.serializedBase64) { - try { - return Buffer.from(obj.serializedBase64, 'base64'); - } catch (e) { - throw new Error("contentmap: If the \"serializedBase64\" key is present, it's data must be only valid base64 and complete"); + const value = this.values.get(key); + if (key === "") { + writer.writeVarSlice(value as Buffer); + continue; } - } - - if (obj.message) { - return Buffer.from(obj.message, "utf-8"); - } - - // this should be an object with "vdxfkey" as the key and {object} as the json object to serialize - const oneValKeys = Object.keys(obj); - const oneValValues = Object.values(obj); + writer.writeSlice(fromBase58Check(key).hash) + writer.writeVarInt(this.version); - for (let k = 0; k < oneValKeys.length; k++) { - const objTypeKey = oneValKeys[k]; - if (objTypeKey == VDXF_Data.DataByteKey.vdxfid) { - const oneByte = Buffer.from(oneValValues[k] as string, "hex"); + if (key == VDXF_Data.DataByteKey.vdxfid) { + const oneByte = Buffer.from(value as string, "hex"); if (oneByte.length != 1) { throw new Error("contentmap: byte data must be exactly one byte"); } - ss = Buffer.concat([ss, oneByte]); + writer.writeSlice(oneByte); } - else if (objTypeKey == VDXF_Data.DataInt16Key.vdxfid) { + else if (key == VDXF_Data.DataInt16Key.vdxfid) { const oneShort = Buffer.alloc(2); - oneShort.writeInt16LE(oneValValues[k] as number); - ss = Buffer.concat([ss, oneShort]); + oneShort.writeInt16LE((value as BigNumber).toNumber()); + writer.writeSlice(oneShort); } - else if (objTypeKey == VDXF_Data.DataUint16Key.vdxfid) { + else if (key == VDXF_Data.DataUint16Key.vdxfid) { const oneUShort = Buffer.alloc(2); - oneUShort.writeUInt16LE(oneValValues[k] as number); - ss = Buffer.concat([ss, oneUShort]); + oneUShort.writeUInt16LE((value as BigNumber).toNumber()); + writer.writeSlice(oneUShort); } - else if (objTypeKey == VDXF_Data.DataInt32Key.vdxfid) { + else if (key == VDXF_Data.DataInt32Key.vdxfid) { const oneInt = Buffer.alloc(4); - oneInt.writeInt32LE(oneValValues[k] as number); - ss = Buffer.concat([ss, oneInt]); - + oneInt.writeInt32LE((value as BigNumber).toNumber()); + writer.writeSlice(oneInt); } - else if (objTypeKey == VDXF_Data.DataUint32Key.vdxfid) { + else if (key == VDXF_Data.DataUint32Key.vdxfid) { const oneUInt = Buffer.alloc(4); - oneUInt.writeUInt32LE(oneValValues[k] as number); - ss = Buffer.concat([ss, oneUInt]); + oneUInt.writeUInt32LE((value as BigNumber).toNumber()); + writer.writeSlice(oneUInt); } - else if (objTypeKey == VDXF_Data.DataInt64Key.vdxfid) { + else if (key == VDXF_Data.DataInt64Key.vdxfid) { const oneInt64 = Buffer.alloc(8); - oneInt64.writeIntLE(oneValValues[k] as number, 0, 8); - ss = Buffer.concat([ss, oneInt64]); + oneInt64.writeBigInt64LE(BigInt((value as BigNumber).toString())); + writer.writeSlice(oneInt64); } - else if (objTypeKey == VDXF_Data.DataUint160Key.vdxfid) { - const oneKey = fromBase58Check(oneValValues[k] as string).hash; - ss = Buffer.concat([ss, oneKey]); + else if (key == VDXF_Data.DataUint160Key.vdxfid) { + const oneKey = fromBase58Check(value as string).hash; + writer.writeSlice(oneKey); } - else if (objTypeKey == VDXF_Data.DataUint256Key.vdxfid) { - const oneHash = Buffer.from(oneValValues[k] as string, "hex"); - if (oneHash.length != 32) { + else if (key == VDXF_Data.DataUint256Key.vdxfid) { + const oneHash = Buffer.from(value as string, "hex"); + if (oneHash.length != HASH256_BYTE_LENGTH) { throw new Error("contentmap: hash data must be exactly 32 bytes"); } - ss = Buffer.concat([ss, oneHash.reverse()]); + writer.writeVarSlice(oneHash.reverse()); } - else if (objTypeKey == VDXF_Data.DataStringKey.vdxfid) { + else if (key == VDXF_Data.DataStringKey.vdxfid) { - let length = 20; - length += 1; - const encodedLength = varuint.encodingLength(Buffer.from(oneValValues[k] as string, "utf-8").length) - length += varuint.encodingLength(encodedLength + Buffer.from(oneValValues[k] as string, "utf-8").length); - length += encodedLength; - length += Buffer.from(oneValValues[k] as string, "utf-8").length; + const encodedLength = varuint.encodingLength(Buffer.from(value as string, "utf-8").length) - const writer = new BufferWriter(Buffer.alloc(length)); - - writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeSlice(fromBase58Check(key).hash); writer.writeVarInt(new BN(1)); - writer.writeCompactSize(encodedLength + Buffer.from(oneValValues[k] as string, "utf-8").length); - writer.writeVarSlice(Buffer.from(oneValValues[k] as string, "utf-8")); - - ss = Buffer.concat([ss, writer.buffer]); + writer.writeCompactSize(encodedLength + Buffer.from(value as string, "utf-8").length); + writer.writeVarSlice(Buffer.from(value as string, "utf-8")); } - else if (objTypeKey == VDXF_Data.DataByteVectorKey.vdxfid) { + else if (key == VDXF_Data.DataByteVectorKey.vdxfid) { - let length = 20; - length += 1; - const encodedLength = varuint.encodingLength(Buffer.from(oneValValues[k] as string, "hex").length) - length += varuint.encodingLength(encodedLength + Buffer.from(oneValValues[k] as string, "hex").length); - length += encodedLength; - length += Buffer.from(oneValValues[k] as string, "hex").length; + const encodedLength = varuint.encodingLength(Buffer.from(value as string, "hex").length) - const writer = new BufferWriter(Buffer.alloc(length)); - - writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeSlice(fromBase58Check(key).hash); writer.writeVarInt(new BN(1)); - writer.writeCompactSize(encodedLength + Buffer.from(oneValValues[k] as string, "hex").length); - writer.writeVarSlice(Buffer.from(oneValValues[k] as string, "hex")); - - ss = Buffer.concat([ss, writer.buffer]); - + writer.writeCompactSize(encodedLength + Buffer.from(value as string, "hex").length); + writer.writeVarSlice(Buffer.from(value as string, "hex")); } - else if (objTypeKey == VDXF_Data.DataCurrencyMapKey.vdxfid) { - - const destinations = Object.keys(oneValValues[k]); - const values = Object.values(oneValValues[k]); + else if (key == VDXF_Data.DataCurrencyMapKey.vdxfid) { + const destinations = Object.keys(value); + const values = Object.values(value); const oneCurMap = new CurrencyValueMap({ value_map: new Map(destinations.map((key, index) => [key, new BN(values[index])])), multivalue: true }); - let length = 20; - length += 1; - length += varuint.encodingLength(oneCurMap.getByteLength()); - length += oneCurMap.getByteLength(); - - const writer = new BufferWriter(Buffer.alloc(length)); - - writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeSlice(fromBase58Check(key).hash); writer.writeVarInt(new BN(1)); writer.writeCompactSize(oneCurMap.getByteLength()); writer.writeSlice(oneCurMap.toBuffer()); - - ss = Buffer.concat([ss, writer.buffer]); - } - else if (objTypeKey == VDXF_Data.DataRatingsKey.vdxfid) { + else if (key == VDXF_Data.DataRatingsKey.vdxfid) { - const oneRatingMap = Rating.fromJson(oneValValues[k] as RatingJson); - - let length = 20; - length += varint.encodingLength(oneRatingMap.version); - length += varuint.encodingLength(oneRatingMap.getByteLength()); - length += oneRatingMap.getByteLength(); + const oneRatingMap = new Rating(value as Rating); - const writer = new BufferWriter(Buffer.alloc(length)); - - writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeSlice(fromBase58Check(key).hash); writer.writeVarInt(oneRatingMap.version); writer.writeCompactSize(oneRatingMap.getByteLength()); writer.writeSlice(oneRatingMap.toBuffer()); - - ss = Buffer.concat([ss, writer.buffer]); - } - else if (objTypeKey == VDXF_Data.DataTransferDestinationKey.vdxfid) { - - const transferDest = TransferDestination.fromJson(oneValValues[k] as TransferDestinationJson); - - let length = 20; - length += varint.encodingLength(transferDest.typeNoFlags()); - length += varuint.encodingLength(transferDest.getByteLength()); - length += transferDest.getByteLength(); + else if (key == VDXF_Data.DataTransferDestinationKey.vdxfid) { + const transferDest = new TransferDestination(value as TransferDestination); const writer = new BufferWriter(Buffer.alloc(length)); - writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeSlice(fromBase58Check(key).hash); writer.writeVarInt(transferDest.typeNoFlags()); writer.writeCompactSize(transferDest.getByteLength()); writer.writeSlice(transferDest.toBuffer()); - - ss = Buffer.concat([ss, writer.buffer]); - } - else if (objTypeKey == VDXF_Data.ContentMultiMapRemoveKey.vdxfid) { - - const transferDest = ContentMultiMapRemove.fromJson(oneValValues[k] as ContentMultiMapRemoveJson); + else if (key == VDXF_Data.ContentMultiMapRemoveKey.vdxfid) { - let length = 20; - length += varint.encodingLength(transferDest.version); - length += varuint.encodingLength(transferDest.getByteLength()); - length += transferDest.getByteLength(); + const transferDest = new ContentMultiMapRemove(value as ContentMultiMapRemove); - const writer = new BufferWriter(Buffer.alloc(length)); - - writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeSlice(fromBase58Check(key).hash); writer.writeVarInt(transferDest.version); writer.writeCompactSize(transferDest.getByteLength()); writer.writeSlice(transferDest.toBuffer()); - - ss = Buffer.concat([ss, writer.buffer]); - } - else if (objTypeKey == VDXF_Data.CrossChainDataRefKey.vdxfid) { - - const transferDest = CrossChainDataRef.fromJson(oneValValues[k]); + else if (key == VDXF_Data.CrossChainDataRefKey.vdxfid) { - let length = 20; - length += varint.encodingLength(VDXF_OBJECT_DEFAULT_VERSION); - length += varuint.encodingLength(transferDest.getByteLength()); - length += transferDest.getByteLength(); - - const writer = new BufferWriter(Buffer.alloc(length)); + const transferDest = new CrossChainDataRef(value as CrossChainDataRef); - writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeSlice(fromBase58Check(key).hash); writer.writeVarInt(VDXF_OBJECT_DEFAULT_VERSION); writer.writeCompactSize(transferDest.getByteLength()); writer.writeSlice(transferDest.toBuffer()); - - ss = Buffer.concat([ss, writer.buffer]); - } - else if (objTypeKey == VDXF_Data.DataDescriptorKey.vdxfid) { - - const descr = DataDescriptor.fromJson(oneValValues[k]); - - let length = 20; - length += varint.encodingLength(descr.version); - length += varuint.encodingLength(descr.getByteLength()); - length += descr.getByteLength(); + else if (key == VDXF_Data.DataDescriptorKey.vdxfid) { - const writer = new BufferWriter(Buffer.alloc(length)); + const descr = new DataDescriptor(value as DataDescriptor); - writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeSlice(fromBase58Check(key).hash); writer.writeVarInt(descr.version); writer.writeCompactSize(descr.getByteLength()); writer.writeSlice(descr.toBuffer()); - - ss = Buffer.concat([ss, writer.buffer]); - } - else if (objTypeKey == VDXF_Data.MMRDescriptorKey.vdxfid) { + else if (key == VDXF_Data.MMRDescriptorKey.vdxfid) { - const descr = MMRDescriptor.fromJson(oneValValues[k] as MMRDescriptorJson); + const descr = new MMRDescriptor(value as MMRDescriptor); - let length = 20; - length += varint.encodingLength(descr.version); - length += varuint.encodingLength(descr.getByteLength()); - length += descr.getByteLength(); - - const writer = new BufferWriter(Buffer.alloc(length)); - - writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeSlice(fromBase58Check(key).hash); writer.writeVarInt(descr.version); writer.writeCompactSize(descr.getByteLength()); writer.writeSlice(descr.toBuffer()); - - ss = Buffer.concat([ss, writer.buffer]); - } - else if (objTypeKey == VDXF_Data.SignatureDataKey.vdxfid) { - - const sigData = SignatureData.fromJson(oneValValues[k]); + else if (key == VDXF_Data.SignatureDataKey.vdxfid) { - let length = 20; - length += varint.encodingLength(sigData.version); - length += varuint.encodingLength(sigData.getByteLength()); - length += sigData.getByteLength(); + const sigData = new SignatureData(value as SignatureData); - const writer = new BufferWriter(Buffer.alloc(length)); - writer.writeSlice(fromBase58Check(objTypeKey).hash); + writer.writeSlice(fromBase58Check(key).hash); writer.writeVarInt(sigData.version); writer.writeCompactSize(sigData.getByteLength()); writer.writeSlice(sigData.toBuffer()); + } else { + throw new Error("contentmap invalid or unrecognized vdxfkey for object type: " + key); + } - ss = Buffer.concat([ss, writer.buffer]); + } + + return writer.buffer; + } + + fromBuffer(buffer: Buffer, offset: number = 0): number { + const reader = new BufferReader(buffer, offset); + this.values = new Map(); + + let bytesLeft = reader.buffer.length - reader.offset; + + while (bytesLeft > HASH160_BYTE_LENGTH) // size of uint160 + { + let objOut = { value: false }; + const { objectUni, offset } = this.VDXFDataToUniValue(reader.buffer, reader.offset, objOut); + reader.offset = offset; + bytesLeft = buffer.length - reader.offset; + if (objOut.value) { + this.values.set(objectUni.key, objectUni.value); } else { - throw new Error("contentmap invalid or unrecognized vdxfkey for object type: " + oneValValues[k]); + // add the remaining data as a hex string + reader.offset = reader.offset - HASH160_BYTE_LENGTH; + this.values.set("", reader.readSlice(bytesLeft + HASH160_BYTE_LENGTH).toString('hex')); + bytesLeft = 0; + break; } } - return ss; + if (bytesLeft && bytesLeft <= HASH160_BYTE_LENGTH) { + this.values.set("", reader.readSlice(bytesLeft).toString('hex')); + } + return reader.offset; } - - static VDXFDataToUniValue = (buffer: Buffer, offset: number = 0, pSuccess = null) => { + VDXFDataToUniValue(buffer: Buffer, offset: number = 0, pSuccess = null): { + objectUni: { key: string, value: VdxfUniType }, offset: number, pSuccess: { value: boolean } + } { const reader = new BufferReader(buffer, offset); let objectUni: any; + try { + let checkVal: string; let version = new BN(0); let objSize = 0; - checkVal = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + checkVal = toBase58Check(reader.readSlice(HASH160_BYTE_LENGTH), I_ADDR_VERSION); if (checkVal == VDXF_Data.DataCurrencyMapKey.vdxfid) { const oneCurrencyMap = new CurrencyValueMap(); @@ -437,7 +381,7 @@ export class VdxfUniValue implements SerializableEntity { objSize = reader.readCompactSize(); reader.offset = oneCurrencyMap.fromBuffer(reader.buffer, reader.offset); if (oneCurrencyMap.isValid()) { - objectUni = { [checkVal]: oneCurrencyMap.toJson() }; + objectUni = { [checkVal]: oneCurrencyMap }; } } else if (checkVal == VDXF_Data.DataRatingsKey.vdxfid) { @@ -446,7 +390,7 @@ export class VdxfUniValue implements SerializableEntity { objSize = reader.readCompactSize(); reader.offset = oneRatingObj.fromBuffer(reader.buffer, reader.offset); if (oneRatingObj.isValid()) { - objectUni = { [checkVal]: oneRatingObj.toJson() }; + objectUni = { [checkVal]: oneRatingObj }; } } else if (checkVal == VDXF_Data.DataTransferDestinationKey.vdxfid) { @@ -455,22 +399,17 @@ export class VdxfUniValue implements SerializableEntity { objSize = reader.readCompactSize(); reader.offset = oneTransferDest.fromBuffer(reader.buffer, reader.offset); if (oneTransferDest.isValid()) { - objectUni = { [checkVal]: oneTransferDest.toJson() }; + objectUni = { [checkVal]: oneTransferDest }; } } else if (checkVal == VDXF_Data.ContentMultiMapRemoveKey.vdxfid) { - throw new Error("ContentMultiMapRemoveKey not implemented"); - // TODO: Implement ContentMultiMapRemoveKey - - // CContentMultiMapRemove oneContentRemove; - // ss >> VARINT(version); - // ss >> COMPACTSIZE(objSize); - // ss >> oneContentRemove; - // if (oneContentRemove.isValid()) - // { - // objectUni = UniValue(UniValue::VOBJ); - // objectUni.pushKV(EncodeDestination(CIdentityID(checkVal)), oneContentRemove.ToUniValue()); - // } + const contentMap = new ContentMultiMapRemove(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = contentMap.fromBuffer(reader.buffer, reader.offset); + if (contentMap.isValid()) { + objectUni = { [checkVal]: contentMap }; + } } else if (checkVal == VDXF_Data.DataStringKey.vdxfid) { let stringVal: string; @@ -492,7 +431,7 @@ export class VdxfUniValue implements SerializableEntity { objSize = reader.readCompactSize(); reader.offset = dataRef.fromBuffer(reader.buffer, reader.offset); if (dataRef.isValid()) { - objectUni = { [checkVal]: dataRef.toJson() }; + objectUni = { [checkVal]: dataRef }; } } else if (checkVal == VDXF_Data.DataDescriptorKey.vdxfid) { @@ -501,7 +440,7 @@ export class VdxfUniValue implements SerializableEntity { objSize = reader.readCompactSize(); reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); if (dataDescriptor.isValid()) { - objectUni = { [checkVal]: dataDescriptor.toJson() }; + objectUni = { [checkVal]: dataDescriptor }; } } else if (checkVal == VDXF_Data.MMRDescriptorKey.vdxfid) { @@ -510,7 +449,7 @@ export class VdxfUniValue implements SerializableEntity { objSize = reader.readCompactSize(); reader.offset = mmrDescriptor.fromBuffer(reader.buffer, reader.offset); if (mmrDescriptor.isValid()) { - objectUni = { [checkVal]: mmrDescriptor.toJson() }; + objectUni = { [checkVal]: mmrDescriptor }; } } else if (checkVal == VDXF_Data.SignatureDataKey.vdxfid) { @@ -519,7 +458,7 @@ export class VdxfUniValue implements SerializableEntity { objSize = reader.readCompactSize(); reader.offset = sigData.fromBuffer(reader.buffer, reader.offset); if (sigData.isValid()) { - objectUni = { [checkVal]: sigData.toJson() }; + objectUni = { [checkVal]: sigData }; } } @@ -543,32 +482,192 @@ export class VdxfUniValue implements SerializableEntity { return { objectUni, offset: reader.offset, pSuccess }; } - static VDXFDataToUniValueArray = (buffer: Buffer, offset: number = 0) => { - let entryArr = []; - const reader = new BufferReader(buffer, offset); - let bytesLeft = buffer.length; + static fromJson(obj: VdxfUniValueJson) { + const map = new Map(); + + if (typeof (obj) != 'object') { + if (typeof (obj) != 'string') throw new Error('Not JSON string as expected'); + if (isHexString(obj)) { + map.set("", Buffer.from(obj, "hex")) + return new VdxfUniValue({ + values: map + }); + } + map.set("", Buffer.from(obj, "utf-8")) + return new VdxfUniValue({ + values: map + }); + } + + if (obj.serializedHex) { + if (!isHexString(obj.serializedHex)) { + throw new Error("contentmap: If the \"serializedhex\" key is present, it's data must be only valid hex and complete"); + } + map.set("", Buffer.from(obj.serializedHex, "hex")) + return new VdxfUniValue({ + values: map + }); + } + + if (obj.serializedBase64) { + try { + map.set("", Buffer.from(obj.serializedHex, "base64")) + return new VdxfUniValue({ + values: map + }); + } catch (e) { + throw new Error("contentmap: If the \"serializedBase64\" key is present, it's data must be only valid base64 and complete"); + } + } + + if (obj.message) { + map.set("", Buffer.from(obj.serializedHex, "utf-8")) + return new VdxfUniValue({ + values: map + }); + } + + // this should be an object with "vdxfkey" as the key and {object} as the json object to serialize + const oneValKeys = Object.keys(obj); + const oneValValues = Object.values(obj); + + for (let k = 0; k < oneValKeys.length; k++) { + const objTypeKey = oneValKeys[k]; + if (objTypeKey == VDXF_Data.DataByteKey.vdxfid) { + + const oneByte = Buffer.from(oneValValues[k] as string, "hex"); + if (oneByte.length != 1) { + throw new Error("contentmap: byte data must be exactly one byte"); + } + map.set(objTypeKey, oneByte); + } + else if (objTypeKey == VDXF_Data.DataInt16Key.vdxfid) { + const oneShort = Buffer.alloc(2); + oneShort.writeInt16LE(oneValValues[k] as number); + map.set(objTypeKey, oneShort); + } + else if (objTypeKey == VDXF_Data.DataUint16Key.vdxfid) { + const oneUShort = Buffer.alloc(2); + oneUShort.writeUInt16LE(oneValValues[k] as number); + map.set(objTypeKey, oneUShort); + } + else if (objTypeKey == VDXF_Data.DataInt32Key.vdxfid) { + const oneInt = Buffer.alloc(4); + oneInt.writeInt32LE(oneValValues[k] as number); + map.set(objTypeKey, oneInt); + + } + else if (objTypeKey == VDXF_Data.DataUint32Key.vdxfid) { + const oneUInt = Buffer.alloc(4); + oneUInt.writeUInt32LE(oneValValues[k] as number); + map.set(objTypeKey, oneUInt); + } + else if (objTypeKey == VDXF_Data.DataInt64Key.vdxfid) { + const oneInt64 = Buffer.alloc(8); + oneInt64.writeIntLE(oneValValues[k] as number, 0, 8); + map.set(objTypeKey, oneInt64); + } + else if (objTypeKey == VDXF_Data.DataUint160Key.vdxfid) { + fromBase58Check(oneValValues[k] as string).hash; + map.set(objTypeKey, oneValValues[k]); + } + else if (objTypeKey == VDXF_Data.DataUint256Key.vdxfid) { + const oneHash = Buffer.from(oneValValues[k] as string, "hex"); + if (oneHash.length != HASH256_BYTE_LENGTH) { + throw new Error("contentmap: hash data must be exactly 32 bytes"); + } + map.set(objTypeKey, oneHash); + } + else if (objTypeKey == VDXF_Data.DataStringKey.vdxfid) { + map.set(objTypeKey, oneValValues[k]); + } + else if (objTypeKey == VDXF_Data.DataByteVectorKey.vdxfid) { + + if (!isHexString(oneValValues[k] as string)) { + throw new Error("contentmap: bytevector data must be valid hex"); + } + + map.set(objTypeKey, Buffer.from(oneValValues[k] as string, "hex")); + + } + else if (objTypeKey == VDXF_Data.DataCurrencyMapKey.vdxfid) { + + const destinations = Object.keys(oneValValues[k]); + const values = Object.values(oneValValues[k]); + + const oneCurMap = new CurrencyValueMap({ value_map: new Map(destinations.map((key, index) => [key, new BN(values[index])])), multivalue: true }); + map.set(objTypeKey, oneCurMap); + + } + else if (objTypeKey == VDXF_Data.DataRatingsKey.vdxfid) { + + const oneRatingMap = Rating.fromJson(oneValValues[k] as RatingJson); + map.set(objTypeKey, oneRatingMap); + + } + else if (objTypeKey == VDXF_Data.DataTransferDestinationKey.vdxfid) { + + const transferDest = TransferDestination.fromJson(oneValValues[k] as TransferDestinationJson); + map.set(objTypeKey, transferDest); + + } + else if (objTypeKey == VDXF_Data.ContentMultiMapRemoveKey.vdxfid) { + + const content = ContentMultiMapRemove.fromJson(oneValValues[k] as ContentMultiMapRemoveJson); + map.set(objTypeKey, content); + + } + else if (objTypeKey == VDXF_Data.CrossChainDataRefKey.vdxfid) { + + const crossChainRefKey = CrossChainDataRef.fromJson(oneValValues[k] as CrossChainDataRefJson); + map.set(objTypeKey, crossChainRefKey); + + } + else if (objTypeKey == VDXF_Data.DataDescriptorKey.vdxfid) { + + const descriptor = DataDescriptor.fromJson(oneValValues[k]); + map.set(objTypeKey, descriptor); + + } + else if (objTypeKey == VDXF_Data.MMRDescriptorKey.vdxfid) { + + const mmrDescriptor = MMRDescriptor.fromJson(oneValValues[k] as MMRDescriptorJson); + map.set(objTypeKey, mmrDescriptor); + + } + else if (objTypeKey == VDXF_Data.SignatureDataKey.vdxfid) { + + const sigData = SignatureData.fromJson(oneValValues[k]); + map.set(objTypeKey, sigData); - while (bytesLeft > 20) // size of uint160 - { - let objOut = { value: false }; - const { objectUni, offset } = VdxfUniValue.VDXFDataToUniValue(reader.buffer, reader.offset, objOut); - reader.offset = offset; - bytesLeft = buffer.length - reader.offset; - if (objOut.value) { - entryArr.push(objectUni); } else { - // add the remaining data as a hex string - reader.offset = reader.offset - 20; - entryArr.push(reader.readSlice(bytesLeft + 20).toString('hex')); - bytesLeft = 0; - break; + throw new Error("Unkknow vdxfkey: " + oneValValues[k]); } } - if (bytesLeft && bytesLeft <= 20) { - entryArr.push(reader.readSlice(bytesLeft).toString('hex')); + return new VdxfUniValue({ + values: map + }) + } + + toJson(): VdxfUniValueJson { + const ret = {}; + + for (const key of this.values.keys()) { + if (key === "") { + ret[key] = (this.values.get(key) as Buffer).toString('hex'); + } else if (typeof (this.values.get(key)) == 'string') { + ret[key] = this.values.get(key) as string; + } else if (Buffer.isBuffer(this.values.get(key))) { + ret[key] = (this.values.get(key) as Buffer).toString('hex'); + } else if (this.values.get(key) instanceof BN) { + ret[key] = (this.values.get(key) as BigNumber).toString(10); + } else { + ret[key] = (this.values.get(key) as JsonSerializableObject).toJson(); + } } - return entryArr.length == 0 ? null : (entryArr.length == 1 ? entryArr[0] : entryArr); + return ret; } + } \ No newline at end of file diff --git a/src/pbaas/transaction/IdentityScript.ts b/src/pbaas/transaction/IdentityScript.ts index 146f521..c7f41c5 100644 --- a/src/pbaas/transaction/IdentityScript.ts +++ b/src/pbaas/transaction/IdentityScript.ts @@ -68,9 +68,9 @@ export class IdentityScript extends SmartTransactionScript implements Serializab return new IdentityScript(master, params); } - getIdentity(multimapKeylists?: Array | null>): Identity { + getIdentity(parseVdxfObjects: boolean = false): Identity { const identity = new Identity(); - identity.fromBuffer(this.params.getParamObject()!, 0, multimapKeylists); + identity.fromBuffer(this.params.getParamObject()!, 0, parseVdxfObjects); return identity; } diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index 569ed76..3751552 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -140,7 +140,7 @@ export class Challenge extends VDXFObject implements ChallengeInterface { super(vdxfkey); this.challenge_id = challenge.challenge_id; - this.requested_access = challenge.requested_access ? challenge.requested_access.map((x) => new RequestedPermission(x.vdxfkey, x.dataAsArray)) : challenge.requested_access; + this.requested_access = challenge.requested_access ? challenge.requested_access.map((x) => new RequestedPermission(x.vdxfkey, x.data)) : challenge.requested_access; this.requested_access_audience = challenge.requested_access_audience; this.subject = challenge.subject ? challenge.subject.map((x) => new Subject(x.data, x.vdxfkey)) @@ -417,13 +417,17 @@ export class Challenge extends VDXFObject implements ChallengeInterface { export class RequestedPermission extends VDXFObject { - dataAsArray: Array; + data: Array; - constructor(vdxfkey?: string, data?: Array) { + constructor(vdxfkey?: string, data?: Array | Array) { super(vdxfkey); if (data && data.length > 0) { - this.dataAsArray = data; + if (data[0] instanceof Hash160) { + this.data = data as Array; + } else { + this.data = data.map((x) => new Hash160(x)); + } } } @@ -431,10 +435,10 @@ export class RequestedPermission extends VDXFObject { let length = 0; - length += varuint.encodingLength(this.dataAsArray.length); + length += varuint.encodingLength(this.data.length); - for (let i = 0; i < this.dataAsArray.length; i++) { - length += this.dataAsArray[i].hash.length; + for (let i = 0; i < this.data.length; i++) { + length += this.data[i].hash.length; } return length; @@ -444,10 +448,10 @@ export class RequestedPermission extends VDXFObject { const buffer = Buffer.alloc(this.dataByteLength()); const writer = new bufferutils.BufferWriter(buffer); - writer.writeCompactSize(this.dataAsArray.length); + writer.writeCompactSize(this.data.length); - for (let i = 0; i < this.dataAsArray.length; i++) { - writer.writeSlice(this.dataAsArray[i].toBuffer()); + for (let i = 0; i < this.data.length; i++) { + writer.writeSlice(this.data[i].toBuffer()); } return writer.buffer; @@ -458,10 +462,10 @@ export class RequestedPermission extends VDXFObject { const reader = new bufferutils.BufferReader(buffer, offset); const numKeys = reader.readCompactSize(); - this.dataAsArray = []; + this.data = []; for (let i = 0; i < numKeys; i++) { - this.dataAsArray.push(new Hash160(reader.readSlice(20))); + this.data.push(new Hash160(reader.readSlice(20))); } return reader.offset; From da760f4eba88644eb542834fdd031712a2b9c8c1 Mon Sep 17 00:00:00 2001 From: Monkins1010 Date: Tue, 8 Oct 2024 22:28:54 +0100 Subject: [PATCH 112/120] Update identity tests with new contentmap style --- dist/pbaas/ContentMultiMapRemove.js | 4 +- dist/pbaas/VdxfUniValue.js | 80 ++++---- dist/vdxf/classes/Challenge.js | 9 +- src/__tests__/pbaas/dataDescriptor.test.ts | 188 +++++++++--------- src/__tests__/pbaas/identity.test.ts | 51 ++--- .../pbaas/transaction/identityscript.test.ts | 33 ++- src/__tests__/pbaas/vdxfunivalue.test.ts | 4 +- src/__tests__/vdxf/loginconsent.test.ts | 2 +- src/__tests__/vdxf/parser.test.ts | 2 +- src/pbaas/VdxfUniValue.ts | 82 ++++---- src/vdxf/classes/Challenge.ts | 7 +- 11 files changed, 226 insertions(+), 236 deletions(-) diff --git a/dist/pbaas/ContentMultiMapRemove.js b/dist/pbaas/ContentMultiMapRemove.js index 9260653..4beb433 100644 --- a/dist/pbaas/ContentMultiMapRemove.js +++ b/dist/pbaas/ContentMultiMapRemove.js @@ -67,9 +67,7 @@ class ContentMultiMapRemove { } isValid() { if (this.version.gte(ContentMultiMapRemove.VERSION_FIRST) && - this.version.lte(ContentMultiMapRemove.VERSION_LAST) && - this.action.gte(ContentMultiMapRemove.ACTION_FIRST) && - this.action.lte(ContentMultiMapRemove.ACTION_LAST)) { + this.version.lte(ContentMultiMapRemove.VERSION_LAST)) { return (this.action.eq(ContentMultiMapRemove.ACTION_CLEAR_MAP) || (this.entry_key && (this.entry_key.length > 0) && (this.action.eq(ContentMultiMapRemove.ACTION_REMOVE_ALL_KEY) || this.value_hash.length > 0))); diff --git a/dist/pbaas/VdxfUniValue.js b/dist/pbaas/VdxfUniValue.js index 3627b60..b8cfc3d 100644 --- a/dist/pbaas/VdxfUniValue.js +++ b/dist/pbaas/VdxfUniValue.js @@ -38,7 +38,6 @@ class VdxfUniValue { const value = this.values.get(key); // if we just have serialized data if (key === "") { - length += varuint_1.default.encodingLength(Buffer.from(value, "hex").length); length += Buffer.from(value, "hex").length; continue; } @@ -68,85 +67,84 @@ class VdxfUniValue { } length += vdxf_1.HASH160_BYTE_LENGTH; if (key == VDXF_Data.DataStringKey.vdxfid) { - const encodedLength = varuint_1.default.encodingLength(Buffer.from(value, "utf-8").length); - length += varuint_1.default.encodingLength(1); - length += varuint_1.default.encodingLength(encodedLength + Buffer.from(value, "utf-8").length); - length += encodedLength; - length += Buffer.from(value, "utf-8").length; + const valBuf = Buffer.from(value, "utf-8"); + length += varint_1.default.encodingLength(new bn_js_1.BN(1)); + // NOTE: 3 is from ss type + ver + vdxfIdVersion + length += varuint_1.default.encodingLength(valBuf.length + 3); + length += varuint_1.default.encodingLength(valBuf.length); + length += valBuf.length; } else if (key == VDXF_Data.DataByteVectorKey.vdxfid) { - const encodedLength = varuint_1.default.encodingLength(Buffer.from(value, "hex").length); - length += varuint_1.default.encodingLength(1); - length += varuint_1.default.encodingLength(encodedLength + Buffer.from(value, "hex").length); - length += encodedLength; - length += Buffer.from(value, "hex").length; + const valBuf = Buffer.from(value, "hex"); + length += varint_1.default.encodingLength(new bn_js_1.BN(1)); + length += varuint_1.default.encodingLength(valBuf.length + 3); + length += varuint_1.default.encodingLength(valBuf.length); + length += valBuf.length; } else if (key == VDXF_Data.DataCurrencyMapKey.vdxfid) { const destinations = Object.keys(value); const values = Object.values(value); const oneCurMap = new CurrencyValueMap_1.CurrencyValueMap({ value_map: new Map(destinations.map((key, index) => [key, new bn_js_1.BN(values[index])])), multivalue: true }); - length += varuint_1.default.encodingLength(1); + length += varint_1.default.encodingLength(new bn_js_1.BN(1)); length += varuint_1.default.encodingLength(oneCurMap.getByteLength()); length += oneCurMap.getByteLength(); } else if (key == VDXF_Data.DataRatingsKey.vdxfid) { const oneRatingMap = new Rating_1.Rating(value); length += varint_1.default.encodingLength(oneRatingMap.version); - length += varuint_1.default.encodingLength(oneRatingMap.getByteLength()); + length += varuint_1.default.encodingLength(oneRatingMap.getByteLength() + 3); length += oneRatingMap.getByteLength(); } else if (key == VDXF_Data.DataTransferDestinationKey.vdxfid) { const transferDest = new TransferDestination_1.TransferDestination(value); length += varint_1.default.encodingLength(transferDest.typeNoFlags()); - length += varuint_1.default.encodingLength(transferDest.getByteLength()); + length += varuint_1.default.encodingLength(transferDest.getByteLength() + 3); length += transferDest.getByteLength(); } else if (key == VDXF_Data.ContentMultiMapRemoveKey.vdxfid) { const transferDest = new ContentMultiMapRemove_1.ContentMultiMapRemove(value); length += varint_1.default.encodingLength(transferDest.version); - length += varuint_1.default.encodingLength(transferDest.getByteLength()); + length += varuint_1.default.encodingLength(transferDest.getByteLength() + 3); length += transferDest.getByteLength(); } else if (key == VDXF_Data.CrossChainDataRefKey.vdxfid) { const transferDest = new CrossChainDataRef_1.CrossChainDataRef(value); length += varint_1.default.encodingLength(vdxf_1.VDXF_OBJECT_DEFAULT_VERSION); - length += varuint_1.default.encodingLength(transferDest.getByteLength()); + length += varuint_1.default.encodingLength(transferDest.getByteLength() + 3); length += transferDest.getByteLength(); } else if (key == VDXF_Data.DataDescriptorKey.vdxfid) { const descr = new DataDescriptor_1.DataDescriptor(value); length += varint_1.default.encodingLength(descr.version); - length += varuint_1.default.encodingLength(descr.getByteLength()); + length += varuint_1.default.encodingLength(descr.getByteLength() + 3); length += descr.getByteLength(); } else if (key == VDXF_Data.MMRDescriptorKey.vdxfid) { const descr = new MMRDescriptor_1.MMRDescriptor(value); length += varint_1.default.encodingLength(descr.version); - length += varuint_1.default.encodingLength(descr.getByteLength()); + length += varuint_1.default.encodingLength(descr.getByteLength() + 3); length += descr.getByteLength(); } else if (key == VDXF_Data.SignatureDataKey.vdxfid) { const sigData = new SignatureData_1.SignatureData(value); length += varint_1.default.encodingLength(sigData.version); - length += varuint_1.default.encodingLength(sigData.getByteLength()); + length += varuint_1.default.encodingLength(sigData.getByteLength() + 3); length += sigData.getByteLength(); } else { throw new Error("contentmap invalid or unrecognized vdxfkey for object type: " + key); } - return length; } + return length; } toBuffer() { const writer = new BufferWriter(Buffer.alloc(this.getByteLength())); for (const key of this.values.keys()) { const value = this.values.get(key); if (key === "") { - writer.writeVarSlice(value); + writer.writeSlice(value); continue; } - writer.writeSlice((0, address_1.fromBase58Check)(key).hash); - writer.writeVarInt(this.version); if (key == VDXF_Data.DataByteKey.vdxfid) { const oneByte = Buffer.from(value, "hex"); if (oneByte.length != 1) { @@ -191,11 +189,11 @@ class VdxfUniValue { writer.writeVarSlice(oneHash.reverse()); } else if (key == VDXF_Data.DataStringKey.vdxfid) { - const encodedLength = varuint_1.default.encodingLength(Buffer.from(value, "utf-8").length); + const valBuf = Buffer.from(value, "utf-8"); writer.writeSlice((0, address_1.fromBase58Check)(key).hash); writer.writeVarInt(new bn_js_1.BN(1)); - writer.writeCompactSize(encodedLength + Buffer.from(value, "utf-8").length); - writer.writeVarSlice(Buffer.from(value, "utf-8")); + writer.writeCompactSize(valBuf.length + 3); + writer.writeVarSlice(valBuf); } else if (key == VDXF_Data.DataByteVectorKey.vdxfid) { const encodedLength = varuint_1.default.encodingLength(Buffer.from(value, "hex").length); @@ -285,13 +283,13 @@ class VdxfUniValue { else { // add the remaining data as a hex string reader.offset = reader.offset - vdxf_1.HASH160_BYTE_LENGTH; - this.values.set("", reader.readSlice(bytesLeft + vdxf_1.HASH160_BYTE_LENGTH).toString('hex')); + this.values.set("", reader.readSlice(bytesLeft + vdxf_1.HASH160_BYTE_LENGTH)); bytesLeft = 0; break; } } if (bytesLeft && bytesLeft <= vdxf_1.HASH160_BYTE_LENGTH) { - this.values.set("", reader.readSlice(bytesLeft).toString('hex')); + this.values.set("", reader.readSlice(bytesLeft)); } return reader.offset; } @@ -309,7 +307,7 @@ class VdxfUniValue { objSize = reader.readCompactSize(); reader.offset = oneCurrencyMap.fromBuffer(reader.buffer, reader.offset); if (oneCurrencyMap.isValid()) { - objectUni = { [checkVal]: oneCurrencyMap }; + objectUni = { key: checkVal, value: oneCurrencyMap }; } } else if (checkVal == VDXF_Data.DataRatingsKey.vdxfid) { @@ -318,7 +316,7 @@ class VdxfUniValue { objSize = reader.readCompactSize(); reader.offset = oneRatingObj.fromBuffer(reader.buffer, reader.offset); if (oneRatingObj.isValid()) { - objectUni = { [checkVal]: oneRatingObj }; + objectUni = { key: checkVal, oneRatingObj }; } } else if (checkVal == VDXF_Data.DataTransferDestinationKey.vdxfid) { @@ -327,7 +325,7 @@ class VdxfUniValue { objSize = reader.readCompactSize(); reader.offset = oneTransferDest.fromBuffer(reader.buffer, reader.offset); if (oneTransferDest.isValid()) { - objectUni = { [checkVal]: oneTransferDest }; + objectUni = { key: checkVal, value: oneTransferDest }; } } else if (checkVal == VDXF_Data.ContentMultiMapRemoveKey.vdxfid) { @@ -336,22 +334,22 @@ class VdxfUniValue { objSize = reader.readCompactSize(); reader.offset = contentMap.fromBuffer(reader.buffer, reader.offset); if (contentMap.isValid()) { - objectUni = { [checkVal]: contentMap }; + objectUni = { key: checkVal, value: contentMap }; } } else if (checkVal == VDXF_Data.DataStringKey.vdxfid) { let stringVal; version = reader.readVarInt(); objSize = reader.readCompactSize(); - stringVal = reader.readVarSlice.toString(); - objectUni = { [checkVal]: stringVal }; + stringVal = reader.readVarSlice().toString('utf8'); + objectUni = { key: checkVal, value: stringVal }; } else if (checkVal == VDXF_Data.DataByteVectorKey.vdxfid) { let vecVal; version = reader.readVarInt(); objSize = reader.readCompactSize(); vecVal = reader.readVarSlice(); - objectUni = { [checkVal]: vecVal.toString('hex') }; + objectUni = { key: checkVal, value: vecVal.toString('hex') }; } else if (checkVal == VDXF_Data.CrossChainDataRefKey.vdxfid) { const dataRef = new CrossChainDataRef_1.CrossChainDataRef(); @@ -359,7 +357,7 @@ class VdxfUniValue { objSize = reader.readCompactSize(); reader.offset = dataRef.fromBuffer(reader.buffer, reader.offset); if (dataRef.isValid()) { - objectUni = { [checkVal]: dataRef }; + objectUni = { key: checkVal, value: dataRef }; } } else if (checkVal == VDXF_Data.DataDescriptorKey.vdxfid) { @@ -368,7 +366,7 @@ class VdxfUniValue { objSize = reader.readCompactSize(); reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); if (dataDescriptor.isValid()) { - objectUni = { [checkVal]: dataDescriptor }; + objectUni = { key: checkVal, value: dataDescriptor }; } } else if (checkVal == VDXF_Data.MMRDescriptorKey.vdxfid) { @@ -377,7 +375,7 @@ class VdxfUniValue { objSize = reader.readCompactSize(); reader.offset = mmrDescriptor.fromBuffer(reader.buffer, reader.offset); if (mmrDescriptor.isValid()) { - objectUni = { [checkVal]: mmrDescriptor }; + objectUni = { key: checkVal, value: mmrDescriptor }; } } else if (checkVal == VDXF_Data.SignatureDataKey.vdxfid) { @@ -386,7 +384,7 @@ class VdxfUniValue { objSize = reader.readCompactSize(); reader.offset = sigData.fromBuffer(reader.buffer, reader.offset); if (sigData.isValid()) { - objectUni = { [checkVal]: sigData }; + objectUni = { key: checkVal, value: sigData }; } } // if we have an object that we recognized, encode it @@ -435,7 +433,7 @@ class VdxfUniValue { } if (obj.serializedBase64) { try { - map.set("", Buffer.from(obj.serializedHex, "base64")); + map.set("", Buffer.from(obj.serializedBase64, "base64")); return new VdxfUniValue({ values: map }); @@ -445,7 +443,7 @@ class VdxfUniValue { } } if (obj.message) { - map.set("", Buffer.from(obj.serializedHex, "utf-8")); + map.set("", Buffer.from(obj.message, "utf-8")); return new VdxfUniValue({ values: map }); diff --git a/dist/vdxf/classes/Challenge.js b/dist/vdxf/classes/Challenge.js index 9cc89d0..d91e246 100644 --- a/dist/vdxf/classes/Challenge.js +++ b/dist/vdxf/classes/Challenge.js @@ -7,6 +7,7 @@ const varuint_1 = require("../../utils/varuint"); const Context_1 = require("./Context"); const Hash160_1 = require("./Hash160"); const Attestation_1 = require("./Attestation"); +const address_1 = require("../../utils/address"); class RedirectUri extends __1.VDXFObject { constructor(uri = "", vdxfkey = "") { super(vdxfkey); @@ -263,15 +264,18 @@ class RequestedPermission extends __1.VDXFObject { this.data = data; } else { - this.data = data.map((x) => new Hash160_1.Hash160(x)); + this.data = data.map((x) => new Hash160_1.Hash160((0, address_1.fromBase58Check)(x).hash)); } } + else { + this.data = []; + } } dataByteLength() { let length = 0; length += varuint_1.default.encodingLength(this.data.length); for (let i = 0; i < this.data.length; i++) { - length += this.data[i].hash.length; + length += 20; } return length; } @@ -286,6 +290,7 @@ class RequestedPermission extends __1.VDXFObject { } fromDataBuffer(buffer, offset) { const reader = new bufferutils_1.default.BufferReader(buffer, offset); + const contextLength = reader.readCompactSize(); const numKeys = reader.readCompactSize(); this.data = []; for (let i = 0; i < numKeys; i++) { diff --git a/src/__tests__/pbaas/dataDescriptor.test.ts b/src/__tests__/pbaas/dataDescriptor.test.ts index 69ea47e..8758ef6 100644 --- a/src/__tests__/pbaas/dataDescriptor.test.ts +++ b/src/__tests__/pbaas/dataDescriptor.test.ts @@ -1,4 +1,4 @@ -import { DataDescriptor, } from "../../pbaas/DataDescriptor"; +import { DataDescriptor, } from "../../pbaas/DataDescriptor"; import { PBaaSEvidenceRef } from "../../pbaas/PBaaSEvidenceRef"; import { UTXORef } from "../../pbaas/UTXORef"; import { CrossChainDataRef } from "../../pbaas/CrossChainDataRef"; @@ -11,111 +11,119 @@ import { BN } from "bn.js"; describe('Serializes and deserializes dataDescriptors', () => { - test('Nested datadescriptor with dataDescriptor in it', async () => { - - const nestedDescriptor = DataDescriptor.fromJson({ - version: 1, - "flags": 2, - "objectdata": { - "i4GC1YGEVD21afWudGoFJVdnfjJ5XWnCQv": { - "version": 1, - "flags": 96, - "mimetype": "text/plain", - "objectdata": { - "message": "Something 1" - }, - "label": "label 1" - } - }, - "salt": "4f66603f256d3f757b6dc3ea44802d4041d2a1901e06005028fd60b85a5878a2" - }); - - const serializedDesc = nestedDescriptor.toBuffer().toString('hex'); // Serialize the request to a hex string - const newDescriptor = new DataDescriptor(); - - newDescriptor.fromBuffer(Buffer.from(serializedDesc, 'hex')); // Deserialize the request from the hex string - expect(serializedDesc).toStrictEqual(newDescriptor.toBuffer().toString('hex')) // Compare the original serialized request to the new serialized request - + test('Nested datadescriptor with dataDescriptor in it', async () => { + + const nestedDescriptor = DataDescriptor.fromJson({ + version: 1, + "flags": 2, + "objectdata": { + "i4GC1YGEVD21afWudGoFJVdnfjJ5XWnCQv": { + "version": 1, + "flags": 96, + "mimetype": "text/plain", + "objectdata": { + "message": "Something 1" + }, + "label": "label 1" + } + }, + "salt": "4f66603f256d3f757b6dc3ea44802d4041d2a1901e06005028fd60b85a5878a2" }); - test('Datadescriptor with CrossChainDataRef', async () => { + const serializedDesc = nestedDescriptor.toBuffer().toString('hex'); // Serialize the request to a hex string + const newDescriptor = new DataDescriptor(); + + newDescriptor.fromBuffer(Buffer.from(serializedDesc, 'hex')); // Deserialize the request from the hex string + expect(serializedDesc).toStrictEqual(newDescriptor.toBuffer().toString('hex')) // Compare the original serialized request to the new serialized request - const evid = new PBaaSEvidenceRef(); + }); - evid.version = new BN(1); - evid.flags = new BN(1); //type IS_EVIDENCE = 1 - evid.output = new UTXORef({ hash: Buffer.from('30395e0868b1953477e14bb5c16349622239a94115a4d1f02b72b6ecf8b1c79c', 'hex'), n: new BN(0) }); - evid.object_num = new BN(0); - evid.sub_object = new BN(0); - evid.system_id = "i5v3h9FWVdRFbNHU7DfcpGykQjRaHtMqu7"; + test('Datadescriptor with CrossChainDataRef', async () => { - const crossChainRef = new CrossChainDataRef(evid); - const crossChainVector = VdxfUniValue.vectorEncodeVDXFUni({[VDXF_Data.CrossChainDataRefKey.vdxfid]: crossChainRef.toJson()}); + const evid = new PBaaSEvidenceRef(); - const nestedDescriptor = DataDescriptor.fromJson({ - version: 1, - "flags": 2, //FLAG_SALT_PRESENT = 2 - "objectdata": crossChainVector.toString('hex'), - "salt": "4f66603f256d3f757b6dc3ea44802d4041d2a1901e06005028fd60b85a5878a2" - }); + evid.version = new BN(1); + evid.flags = new BN(1); //type IS_EVIDENCE = 1 + evid.output = new UTXORef({ hash: Buffer.from('30395e0868b1953477e14bb5c16349622239a94115a4d1f02b72b6ecf8b1c79c', 'hex'), n: new BN(0) }); + evid.object_num = new BN(0); + evid.sub_object = new BN(0); + evid.system_id = "i5v3h9FWVdRFbNHU7DfcpGykQjRaHtMqu7"; - const serializedDesc = nestedDescriptor.toBuffer().toString('hex'); // Serialize the request to a hex string - const newDescriptor = new DataDescriptor(); + const crossChainRef = new CrossChainDataRef(evid); + const dataKeyMap = new Map(); + dataKeyMap.set(VDXF_Data.CrossChainDataRefKey.vdxfid, crossChainRef); + const crossChainVector = new VdxfUniValue({ values: dataKeyMap }); - newDescriptor.fromBuffer(Buffer.from(serializedDesc, 'hex')); // Deserialize the request from the hex string - expect(serializedDesc).toStrictEqual(newDescriptor.toBuffer().toString('hex')) // Compare the original serialized request to the new serialized request - expect(newDescriptor.objectdata) + const nestedDescriptor = DataDescriptor.fromJson({ + version: 1, + "flags": 2, //FLAG_SALT_PRESENT = 2 + "objectdata": crossChainVector.toBuffer().toString('hex'), + "salt": "4f66603f256d3f757b6dc3ea44802d4041d2a1901e06005028fd60b85a5878a2" }); - test('Datadescriptor with TransferDestination', async () => { - const destid = "iCtawpxUiCc2sEupt7Z4u8SDAncGZpgSKm"; + const serializedDesc = nestedDescriptor.toBuffer().toString('hex'); // Serialize the request to a hex string + const newDescriptor = new DataDescriptor(); + + newDescriptor.fromBuffer(Buffer.from(serializedDesc, 'hex')); // Deserialize the request from the hex string + expect(serializedDesc).toStrictEqual(newDescriptor.toBuffer().toString('hex')) // Compare the original serialized request to the new serialized request + expect(newDescriptor.objectdata) + }); + test('Datadescriptor with TransferDestination', async () => { - const txDest = new TransferDestination({ - type: DEST_ID, - destination_bytes: fromBase58Check(destid).hash - }); + const destid = "iCtawpxUiCc2sEupt7Z4u8SDAncGZpgSKm"; - const txDestVector = VdxfUniValue.vectorEncodeVDXFUni({[VDXF_Data.DataTransferDestinationKey.vdxfid]: txDest}); + const txDest = new TransferDestination({ + type: DEST_ID, + destination_bytes: fromBase58Check(destid).hash + }); - const nestedDescriptor = DataDescriptor.fromJson({ - version: 1, - "flags": 2, //FLAG_SALT_PRESENT = 2 - "objectdata": txDestVector.toString('hex'), - "salt": "4f66603f256d3f757b6dc3ea44802d4041d2a1901e06005028fd60b85a5878a2" - }); + const destinationKeyMap = new Map(); + destinationKeyMap.set(VDXF_Data.CrossChainDataRefKey.vdxfid, txDest); - const serializedDesc = nestedDescriptor.toBuffer().toString('hex'); // Serialize the request to a hex string - const newDescriptor = new DataDescriptor(); + const txDestVector = new VdxfUniValue({ values: destinationKeyMap }); - newDescriptor.fromBuffer(Buffer.from(serializedDesc, 'hex')); // Deserialize the request from the hex string - expect(serializedDesc).toStrictEqual(newDescriptor.toBuffer().toString('hex')) // Compare the original serialized request to the new serialized request + const nestedDescriptor = DataDescriptor.fromJson({ + version: 1, + "flags": 2, //FLAG_SALT_PRESENT = 2 + "objectdata": txDestVector.toBuffer().toString('hex'), + "salt": "4f66603f256d3f757b6dc3ea44802d4041d2a1901e06005028fd60b85a5878a2" }); - test('Datadescriptor with SignatureData', async () => { - - const sigData = SignatureData.fromJson({ - "version": 1, - "systemid": "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq", - "hashtype": 1, - "signaturehash": "dfd3e3d82783360dfc675a09e6a226fd43119ef4e8d7cf553af96ea5883b51da", - "identityid": "iKjrTCwoPFRk44fAi2nYNbPG16ZUQjv1NB", - "signaturetype": 1, - "signature": "AgXOCgAAAUEfCiSukK9tg46cYOpHmxzKjNquWDyNc8H58+uLSOYmqlUcNUxWB8j3nzT1RHKeJGygdAwrUj5iZ/A9H3+qYV9H9g==" - }); - - const txDestVector = VdxfUniValue.vectorEncodeVDXFUni({[VDXF_Data.SignatureDataKey.vdxfid]: sigData.toJson()}); - - const nestedDescriptor = DataDescriptor.fromJson({ - version: 1, - "flags": 2, //FLAG_SALT_PRESENT = 2 - "objectdata": txDestVector.toString('hex'), - "salt": "4f66603f256d3f757b6dc3ea44802d4041d2a1901e06005028fd60b85a5878a2" - }); - - const serializedDesc = nestedDescriptor.toBuffer().toString('hex'); // Serialize the request to a hex string - const newDescriptor = new DataDescriptor(); - - newDescriptor.fromBuffer(Buffer.from(serializedDesc, 'hex')); // Deserialize the request from the hex string - expect(serializedDesc).toStrictEqual(newDescriptor.toBuffer().toString('hex')) // Compare the original serialized request to the new serialized request + + const serializedDesc = nestedDescriptor.toBuffer().toString('hex'); // Serialize the request to a hex string + const newDescriptor = new DataDescriptor(); + + newDescriptor.fromBuffer(Buffer.from(serializedDesc, 'hex')); // Deserialize the request from the hex string + expect(serializedDesc).toStrictEqual(newDescriptor.toBuffer().toString('hex')) // Compare the original serialized request to the new serialized request + }); + test('Datadescriptor with SignatureData', async () => { + + const sigData = SignatureData.fromJson({ + "version": 1, + "systemid": "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq", + "hashtype": 1, + "signaturehash": "dfd3e3d82783360dfc675a09e6a226fd43119ef4e8d7cf553af96ea5883b51da", + "identityid": "iKjrTCwoPFRk44fAi2nYNbPG16ZUQjv1NB", + "signaturetype": 1, + "signature": "AgXOCgAAAUEfCiSukK9tg46cYOpHmxzKjNquWDyNc8H58+uLSOYmqlUcNUxWB8j3nzT1RHKeJGygdAwrUj5iZ/A9H3+qYV9H9g==" }); + const sigDataMap = new Map(); + sigDataMap.set(VDXF_Data.CrossChainDataRefKey.vdxfid, sigData); + + const sigUniValue = new VdxfUniValue({ values: sigDataMap }); + + const nestedDescriptor = DataDescriptor.fromJson({ + version: 1, + "flags": 2, //FLAG_SALT_PRESENT = 2 + "objectdata": sigUniValue.toBuffer().toString('hex'), + "salt": "4f66603f256d3f757b6dc3ea44802d4041d2a1901e06005028fd60b85a5878a2" + }); + + const serializedDesc = nestedDescriptor.toBuffer().toString('hex'); // Serialize the request to a hex string + const newDescriptor = new DataDescriptor(); + + newDescriptor.fromBuffer(Buffer.from(serializedDesc, 'hex')); // Deserialize the request from the hex string + expect(serializedDesc).toStrictEqual(newDescriptor.toBuffer().toString('hex')) // Compare the original serialized request to the new serialized request + }); + }); diff --git a/src/__tests__/pbaas/identity.test.ts b/src/__tests__/pbaas/identity.test.ts index 09ef963..56663d6 100644 --- a/src/__tests__/pbaas/identity.test.ts +++ b/src/__tests__/pbaas/identity.test.ts @@ -132,35 +132,29 @@ describe('Serializes and deserializes identity properly', () => { }) test('deserialize a daemon generated VerusID with a contentmultimap without private addr', async () => { - const serializedIdentity = "0300000000000000011472aa70e6a4c0d0ff07541c5fbe4f08cacd89d35b01000000a6ef9ea235635e328124ff3429db9f9e91b64e2d0543687269730250d65f0c3aea3fd55eadf3b6f31f123fe8f9dbe001fdda02ab8b7b8b4418de66e611921699a328126461c0e5018443fdc0027b226172746973744e616d65223a20226976616e40222c2022616c62756d4e616d65223a202274657374416c62756d222c202267656e7265223a2022726f636b222c202275726c223a202268747470733a2f2f2f6a756b65626f78222c20226e6574776f726b4964223a2022726f6f6d66756c222c20227369676e6174757265223a20224167586d4567414141554567774c45516a534f4d44477651394f715859433654706d766c536a2b6c596731374d57336161494d3538634539756657376746344a7966364d2f6e4a4a564d3377466f64496d344972622f545565466a654b43616e35673d3d222c2022747261636b73223a205b7b227265736f757263654964223a20223139343564633964717472673231222c20226e616d65223a20225c75303431325c75303433655c75303433665c75303433625c7530343536205c75303431325c75303435365c75303433345c75303433655c75303433665c75303433625c75303434665c75303434315c75303433655c75303433325c7530343330202d205c75303431325c75303433355c75303434315c75303433645c75303433302028436f766572206279204772616e646d615c7320536d757a6929222c20226475726174696f6e223a203234302e3433327d5d2c2022616c62756d436f766572223a207b227265736f757263654964223a20223931647370387471367273713176227d2c20226172746973744c6f676f223a207b227265736f757263654964223a202272326630366267747a6872386276227d2c2022736c65657665446f63756d656e74223a207b227265736f757263654964223a202235706336307773713335337a736d227d2c2022636f70696573536f6c64223a20302c202272656c6561736554696d657374616d70223a202231363832353539323132222c20227072696365223a207b2256414c55223a20312c202255534443223a203230307d7d652741687b7ab1473754858d7b8b10886945eaf801fddc02ab8b7b8b4418de66e611921699a328126461c0e5018445fdc2027b22616c62756d436f766572223a207b227265736f757263654964223a20223931647370387471367273713176227d2c2022616c62756d4e616d65223a202274657374416c62756d3131222c20226172746973744c6f676f223a207b227265736f757263654964223a202272326630366267747a6872386276227d2c20226172746973744e616d65223a20226976616e40222c202267656e7265223a2022726f636b222c20226e6574776f726b4964223a2022726f6f6d66756c222c20227369676e6174757265223a20224167586d4567414141554567774c45516a534f4d44477651394f715859433654706d766c536a2b6c596731374d57336161494d3538634539756657376746344a7966364d2f6e4a4a564d3377466f64496d344972622f545565466a654b43616e35673d3d222c2022736c65657665446f63756d656e74223a207b227265736f757263654964223a202235706336307773713335337a736d227d2c2022747261636b73223a205b7b226475726174696f6e223a203234302e3433322c20226e616d65223a20225c75303431325c75303433655c75303433665c75303433625c7530343536205c75303431325c75303435365c75303433345c75303433655c75303433665c75303433625c75303434665c75303434315c75303433655c75303433325c7530343330202d205c75303431325c75303433355c75303434315c75303433645c75303433302028436f766572206279204772616e646d615c7320536d757a6929222c20227265736f757263654964223a20223139343564633964717472673231227d5d2c202275726c223a202268747470733a2f2f2f6a756b65626f78222c2022636f70696573536f6c64223a20302c202272656c6561736554696d657374616d70223a202231363832353336313730222c20227072696365223a207b2256414c55223a20312c202255534443223a203230307d7d00dfae84e93ab133b739076354e9fbb2de42887212dfae84e93ab133b739076354e9fbb2de4288721200a6ef9ea235635e328124ff3429db9f9e91b64e2d00000000"; + const serializedIdentity = "0300000000000000021455f51a22c79018a00ced41e758560f5df7d4d35d143e3c1a4f0dc6852eff0b312bec2e4dd382d2939701000000a6ef9ea235635e328124ff3429db9f9e91b64e2d076d6f6e6b696e7301797c0f0128e5d8f2aedd0039a930b1abe12e5be90102040d00f478f668655e60f6b49e2424053166ba2cf24139f478f668655e60f6b49e2424053166ba2cf2413900a6ef9ea235635e328124ff3429db9f9e91b64e2d00000000"; const identity_frombuf = new Identity(); - identity_frombuf.fromBuffer(Buffer.from(serializedIdentity, 'hex'), 0, [[DATA_TYPE_STRING.vdxfid], [DATA_TYPE_STRING.vdxfid]]); + identity_frombuf.fromBuffer(Buffer.from(serializedIdentity, 'hex'), 0, true); expect(identity_frombuf.toBuffer().toString('hex')).toBe(serializedIdentity); const identity_tobuf = new Identity({ version: IDENTITY_VERSION_PBAAS, primary_addresses: [ - KeyID.fromAddress("RKjVHqM4VF2pCfVcwGzKH7CxvfMUE4H6o8") + KeyID.fromAddress("RH7h8p9LN2Yb48SkxzNQ29c1Ltfju8Cd5i"), + KeyID.fromAddress("RExFyRVftxbW8w9e5Xkcixu3YtYjE2kCKX") ], min_sigs: new BN(1), - name: "Chris", + name: "monkins", parent: IdentityID.fromAddress("iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq"), system_id: IdentityID.fromAddress("iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq"), content_multimap: ContentMultiMap.fromJson({ - "iAqxJCbv2veLLHGdantvrzJRupyh3dkT6B": [ - { - "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c": "{\"artistName\": \"ivan@\", \"albumName\": \"testAlbum\", \"genre\": \"rock\", \"url\": \"https:///jukebox\", \"networkId\": \"roomful\", \"signature\": \"AgXmEgAAAUEgwLEQjSOMDGvQ9OqXYC6TpmvlSj+lYg17MW3aaIM58cE9ufW7gF4Jyf6M/nJJVM3wFodIm4Irb/TUeFjeKCan5g==\", \"tracks\": [{\"resourceId\": \"1945dc9dqtrg21\", \"name\": \"\\u0412\\u043e\\u043f\\u043b\\u0456 \\u0412\\u0456\\u0434\\u043e\\u043f\\u043b\\u044f\\u0441\\u043e\\u0432\\u0430 - \\u0412\\u0435\\u0441\\u043d\\u0430 (Cover by Grandma\\s Smuzi)\", \"duration\": 240.432}], \"albumCover\": {\"resourceId\": \"91dsp8tq6rsq1v\"}, \"artistLogo\": {\"resourceId\": \"r2f06bgtzhr8bv\"}, \"sleeveDocument\": {\"resourceId\": \"5pc60wsq353zsm\"}, \"copiesSold\": 0, \"releaseTimestamp\": \"1682559212\", \"price\": {\"VALU\": 1, \"USDC\": 200}}" - } - ], - "iChNhyJiQSZ3HumofCBhuASjgupq1m1NgP": [ - { - "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c": "{\"albumCover\": {\"resourceId\": \"91dsp8tq6rsq1v\"}, \"albumName\": \"testAlbum11\", \"artistLogo\": {\"resourceId\": \"r2f06bgtzhr8bv\"}, \"artistName\": \"ivan@\", \"genre\": \"rock\", \"networkId\": \"roomful\", \"signature\": \"AgXmEgAAAUEgwLEQjSOMDGvQ9OqXYC6TpmvlSj+lYg17MW3aaIM58cE9ufW7gF4Jyf6M/nJJVM3wFodIm4Irb/TUeFjeKCan5g==\", \"sleeveDocument\": {\"resourceId\": \"5pc60wsq353zsm\"}, \"tracks\": [{\"duration\": 240.432, \"name\": \"\\u0412\\u043e\\u043f\\u043b\\u0456 \\u0412\\u0456\\u0434\\u043e\\u043f\\u043b\\u044f\\u0441\\u043e\\u0432\\u0430 - \\u0412\\u0435\\u0441\\u043d\\u0430 (Cover by Grandma\\s Smuzi)\", \"resourceId\": \"1945dc9dqtrg21\"}], \"url\": \"https:///jukebox\", \"copiesSold\": 0, \"releaseTimestamp\": \"1682536170\", \"price\": {\"VALU\": 1, \"USDC\": 200}}" - } + "iEYsp2njSt1M4EVYi9uuAPBU2wpKmThkkr": [ + "040d" ] }), - revocation_authority: IdentityID.fromAddress("iPsFBfFoCcxtuZNzE8yxPQhXVn4dmytf8j"), - recovery_authority: IdentityID.fromAddress("iPsFBfFoCcxtuZNzE8yxPQhXVn4dmytf8j"), + revocation_authority: IdentityID.fromAddress("iRmBDWNs2WahXDAvS2TEsJyJwwHXhwcs7w"), + recovery_authority: IdentityID.fromAddress("iRmBDWNs2WahXDAvS2TEsJyJwwHXhwcs7w"), unlock_after: new BN(0) }) @@ -168,7 +162,7 @@ describe('Serializes and deserializes identity properly', () => { }); test('deserialize a daemon generated VerusID with a contentmultimap with private addr', async () => { - const serializedIdentity = "03000000000000000114437d73cd0d5b0993b5ada74f7efc1528dc1cbeb201000000a6ef9ea235635e328124ff3429db9f9e91b64e2d0474657374000039a34181d4d91a55d7bd8100580e5eca59265ca439a34181d4d91a55d7bd8100580e5eca59265ca401842ea69656125c777ef462b64990072ff02d1a0199fa5a40a313d4b6a4e77da85a610286f8df1b142fef80a6ef9ea235635e328124ff3429db9f9e91b64e2d00000000"; + const serializedIdentity = "0300000000000000021455f51a22c79018a00ced41e758560f5df7d4d35d143e3c1a4f0dc6852eff0b312bec2e4dd382d2939701000000a6ef9ea235635e328124ff3429db9f9e91b64e2d076d6f6e6b696e7301797c0f0128e5d8f2aedd0039a930b1abe12e5be90102040d00f478f668655e60f6b49e2424053166ba2cf24139f478f668655e60f6b49e2424053166ba2cf2413900a6ef9ea235635e328124ff3429db9f9e91b64e2d00000000"; const identity_frombuf = new Identity(); identity_frombuf.fromBuffer(Buffer.from(serializedIdentity, 'hex')); @@ -180,31 +174,24 @@ describe('Serializes and deserializes identity properly', () => { const identityJson = { "contentmap": {}, "contentmultimap": { - "iAqxJCbv2veLLHGdantvrzJRupyh3dkT6B": [ - { - "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c": "{\"artistName\": \"ivan@\", \"albumName\": \"testAlbum\", \"genre\": \"rock\", \"url\": \"https:///jukebox\", \"networkId\": \"roomful\", \"signature\": \"AgXmEgAAAUEgwLEQjSOMDGvQ9OqXYC6TpmvlSj+lYg17MW3aaIM58cE9ufW7gF4Jyf6M/nJJVM3wFodIm4Irb/TUeFjeKCan5g==\", \"tracks\": [{\"resourceId\": \"1945dc9dqtrg21\", \"name\": \"\В\о\п\л\і \В\і\д\о\п\л\я\с\о\в\а - \В\е\с\н\а (Cover by Grandma\\s Smuzi)\", \"duration\": 240.432}], \"albumCover\": {\"resourceId\": \"91dsp8tq6rsq1v\"}, \"artistLogo\": {\"resourceId\": \"r2f06bgtzhr8bv\"}, \"sleeveDocument\": {\"resourceId\": \"5pc60wsq353zsm\"}, \"copiesSold\": 0, \"releaseTimestamp\": \"1682559212\", \"price\": {\"VALU\": 1, \"USDC\": 200}}" - } - ], - "iChNhyJiQSZ3HumofCBhuASjgupq1m1NgP": [ - { - "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c": "{\"albumCover\": {\"resourceId\": \"91dsp8tq6rsq1v\"}, \"albumName\": \"testAlbum11\", \"artistLogo\": {\"resourceId\": \"r2f06bgtzhr8bv\"}, \"artistName\": \"ivan@\", \"genre\": \"rock\", \"networkId\": \"roomful\", \"signature\": \"AgXmEgAAAUEgwLEQjSOMDGvQ9OqXYC6TpmvlSj+lYg17MW3aaIM58cE9ufW7gF4Jyf6M/nJJVM3wFodIm4Irb/TUeFjeKCan5g==\", \"sleeveDocument\": {\"resourceId\": \"5pc60wsq353zsm\"}, \"tracks\": [{\"duration\": 240.432, \"name\": \"\В\о\п\л\і \В\і\д\о\п\л\я\с\о\в\а - \В\е\с\н\а (Cover by Grandma\\s Smuzi)\", \"resourceId\": \"1945dc9dqtrg21\"}], \"url\": \"https:///jukebox\", \"copiesSold\": 0, \"releaseTimestamp\": \"1682536170\", \"price\": {\"VALU\": 1, \"USDC\": 200}}" - } + "iEYsp2njSt1M4EVYi9uuAPBU2wpKmThkkr": [ + "040d" ] }, "flags": 0, - "identityaddress": "iPsFBfFoCcxtuZNzE8yxPQhXVn4dmytf8j", + "identityaddress": "iRmBDWNs2WahXDAvS2TEsJyJwwHXhwcs7w", "minimumsignatures": 1, - "name": "Chris", + "name": "monkins", "parent": "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq", "primaryaddresses": [ - "RKjVHqM4VF2pCfVcwGzKH7CxvfMUE4H6o8" + "RH7h8p9LN2Yb48SkxzNQ29c1Ltfju8Cd5i", + "RExFyRVftxbW8w9e5Xkcixu3YtYjE2kCKX" ], - "recoveryauthority": "iPsFBfFoCcxtuZNzE8yxPQhXVn4dmytf8j", - "revocationauthority": "iPsFBfFoCcxtuZNzE8yxPQhXVn4dmytf8j", + "recoveryauthority": "iRmBDWNs2WahXDAvS2TEsJyJwwHXhwcs7w", + "revocationauthority": "iRmBDWNs2WahXDAvS2TEsJyJwwHXhwcs7w", "systemid": "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq", "timelock": 0, - "version": 3, - "privateaddress": "zs1wczplx4kegw32h8g0f7xwl57p5tvnprwdmnzmdnsw50chcl26f7tws92wk2ap03ykaq6jyyztfa" + "version": 3 }; const identity_frombuf = Identity.fromJson(identityJson); diff --git a/src/__tests__/pbaas/transaction/identityscript.test.ts b/src/__tests__/pbaas/transaction/identityscript.test.ts index 99c008c..2d26609 100644 --- a/src/__tests__/pbaas/transaction/identityscript.test.ts +++ b/src/__tests__/pbaas/transaction/identityscript.test.ts @@ -4,7 +4,7 @@ import { IdentityScript } from "../../../pbaas/transaction/IdentityScript"; describe('Serializes and deserializes SmartTransactionScripts', () => { test('(de)serialize a basic identity registration outscript (v1) from daemon', () => { const scriptString = "46040300010314a484f66e98c3d787b2ff8854d3ceeb5b61446978150476a348fd730beb2694f54a7114dbf14aa699f9fa150476a348fd730beb2694f54a7114dbf14aa699f9facc4ce304030e0101150476a348fd730beb2694f54a7114dbf14aa699f9fa4c8e010000000000000001143cdad2d09cbc6e164804af104b1f3f56f0d10d78010000001af5b8015c64d39ab44c60ead8317f9f5a9b6c4c0161000076a348fd730beb2694f54a7114dbf14aa699f9fa76a348fd730beb2694f54a7114dbf14aa699f9fa016931943a1979b5e0308a4da1cb62688e6d6433e4501d2c5a474987deee3137144a48978919d7e6a47670501b04030f0101150476a348fd730beb2694f54a7114dbf14aa699f9fa1b0403100101150476a348fd730beb2694f54a7114dbf14aa699f9fa75"; - + const script = new IdentityScript(); script.fromBuffer(Buffer.from(scriptString, 'hex')); @@ -16,7 +16,7 @@ describe('Serializes and deserializes SmartTransactionScripts', () => { minimumsignatures: 1, name: 'a', parent: 'i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV', - primaryaddresses: [ 'REpxm9bCLMiHRNVPA9unPBWixie7uHFA5C' ], + primaryaddresses: ['REpxm9bCLMiHRNVPA9unPBWixie7uHFA5C'], privateaddress: 'zs1dycegwse0x67qvy2fksukcng3ekkgvly2qwjckj8fxraam33xu2y5jyh3yva0e4ywec9quedcud', recoveryauthority: 'iEHpmxiynXmwZKNgMm7BpXWP3EqCJt663q', revocationauthority: 'iEHpmxiynXmwZKNgMm7BpXWP3EqCJt663q', @@ -62,7 +62,7 @@ describe('Serializes and deserializes SmartTransactionScripts', () => { }); test('(de)serialize a basic identity registration outscript (v3) from daemon with contentmultimap', () => { - const scriptString = "4704030001031504dfae84e93ab133b739076354e9fbb2de428872121504dfae84e93ab133b739076354e9fbb2de428872121504dfae84e93ab133b739076354e9fbb2de42887212cc4dbb0604030e01011504dfae84e93ab133b739076354e9fbb2de428872124d65060300000000000000011472aa70e6a4c0d0ff07541c5fbe4f08cacd89d35b01000000a6ef9ea235635e328124ff3429db9f9e91b64e2d0543687269730250d65f0c3aea3fd55eadf3b6f31f123fe8f9dbe001fdda02ab8b7b8b4418de66e611921699a328126461c0e5018443fdc0027b226172746973744e616d65223a20226976616e40222c2022616c62756d4e616d65223a202274657374416c62756d222c202267656e7265223a2022726f636b222c202275726c223a202268747470733a2f2f2f6a756b65626f78222c20226e6574776f726b4964223a2022726f6f6d66756c222c20227369676e6174757265223a20224167586d4567414141554567774c45516a534f4d44477651394f715859433654706d766c536a2b6c596731374d57336161494d3538634539756657376746344a7966364d2f6e4a4a564d3377466f64496d344972622f545565466a654b43616e35673d3d222c2022747261636b73223a205b7b227265736f757263654964223a20223139343564633964717472673231222c20226e616d65223a20225c75303431325c75303433655c75303433665c75303433625c7530343536205c75303431325c75303435365c75303433345c75303433655c75303433665c75303433625c75303434665c75303434315c75303433655c75303433325c7530343330202d205c75303431325c75303433355c75303434315c75303433645c75303433302028436f766572206279204772616e646d615c7320536d757a6929222c20226475726174696f6e223a203234302e3433327d5d2c2022616c62756d436f766572223a207b227265736f757263654964223a20223931647370387471367273713176227d2c20226172746973744c6f676f223a207b227265736f757263654964223a202272326630366267747a6872386276227d2c2022736c65657665446f63756d656e74223a207b227265736f757263654964223a202235706336307773713335337a736d227d2c2022636f70696573536f6c64223a20302c202272656c6561736554696d657374616d70223a202231363832353539323132222c20227072696365223a207b2256414c55223a20312c202255534443223a203230307d7d652741687b7ab1473754858d7b8b10886945eaf801fddc02ab8b7b8b4418de66e611921699a328126461c0e5018445fdc2027b22616c62756d436f766572223a207b227265736f757263654964223a20223931647370387471367273713176227d2c2022616c62756d4e616d65223a202274657374416c62756d3131222c20226172746973744c6f676f223a207b227265736f757263654964223a202272326630366267747a6872386276227d2c20226172746973744e616d65223a20226976616e40222c202267656e7265223a2022726f636b222c20226e6574776f726b4964223a2022726f6f6d66756c222c20227369676e6174757265223a20224167586d4567414141554567774c45516a534f4d44477651394f715859433654706d766c536a2b6c596731374d57336161494d3538634539756657376746344a7966364d2f6e4a4a564d3377466f64496d344972622f545565466a654b43616e35673d3d222c2022736c65657665446f63756d656e74223a207b227265736f757263654964223a202235706336307773713335337a736d227d2c2022747261636b73223a205b7b226475726174696f6e223a203234302e3433322c20226e616d65223a20225c75303431325c75303433655c75303433665c75303433625c7530343536205c75303431325c75303435365c75303433345c75303433655c75303433665c75303433625c75303434665c75303434315c75303433655c75303433325c7530343330202d205c75303431325c75303433355c75303434315c75303433645c75303433302028436f766572206279204772616e646d615c7320536d757a6929222c20227265736f757263654964223a20223139343564633964717472673231227d5d2c202275726c223a202268747470733a2f2f2f6a756b65626f78222c2022636f70696573536f6c64223a20302c202272656c6561736554696d657374616d70223a202231363832353336313730222c20227072696365223a207b2256414c55223a20312c202255534443223a203230307d7d00dfae84e93ab133b739076354e9fbb2de42887212dfae84e93ab133b739076354e9fbb2de4288721200a6ef9ea235635e328124ff3429db9f9e91b64e2d000000001b04030f01011504dfae84e93ab133b739076354e9fbb2de428872121b04031001011504dfae84e93ab133b739076354e9fbb2de4288721275"; + const scriptString = "4704030001031504f478f668655e60f6b49e2424053166ba2cf241391504f478f668655e60f6b49e2424053166ba2cf241391504f478f668655e60f6b49e2424053166ba2cf24139cc4d030104030e01011504f478f668655e60f6b49e2424053166ba2cf241394cae0300000000000000021455f51a22c79018a00ced41e758560f5df7d4d35d143e3c1a4f0dc6852eff0b312bec2e4dd382d2939701000000a6ef9ea235635e328124ff3429db9f9e91b64e2d076d6f6e6b696e7301797c0f0128e5d8f2aedd0039a930b1abe12e5be90102040d00f478f668655e60f6b49e2424053166ba2cf24139f478f668655e60f6b49e2424053166ba2cf2413900a6ef9ea235635e328124ff3429db9f9e91b64e2d000000001b04030f01011504f478f668655e60f6b49e2424053166ba2cf241391b04031001011504f478f668655e60f6b49e2424053166ba2cf2413975"; const script = new IdentityScript(); script.fromBuffer(Buffer.from(scriptString, 'hex')); @@ -71,33 +71,26 @@ describe('Serializes and deserializes SmartTransactionScripts', () => { "version": 3, "flags": 0, "primaryaddresses": [ - "RKjVHqM4VF2pCfVcwGzKH7CxvfMUE4H6o8" + "RH7h8p9LN2Yb48SkxzNQ29c1Ltfju8Cd5i", + "RExFyRVftxbW8w9e5Xkcixu3YtYjE2kCKX" ], "minimumsignatures": 1, - "name": "Chris", - "identityaddress": "iPsFBfFoCcxtuZNzE8yxPQhXVn4dmytf8j", + "name": "monkins", + "identityaddress": "iRmBDWNs2WahXDAvS2TEsJyJwwHXhwcs7w", "parent": "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq", "systemid": "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq", - "contentmap": { - }, + "contentmap": {}, "contentmultimap": { - "iAqxJCbv2veLLHGdantvrzJRupyh3dkT6B": [ - { - "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c": "{\"artistName\": \"ivan@\", \"albumName\": \"testAlbum\", \"genre\": \"rock\", \"url\": \"https:///jukebox\", \"networkId\": \"roomful\", \"signature\": \"AgXmEgAAAUEgwLEQjSOMDGvQ9OqXYC6TpmvlSj+lYg17MW3aaIM58cE9ufW7gF4Jyf6M/nJJVM3wFodIm4Irb/TUeFjeKCan5g==\", \"tracks\": [{\"resourceId\": \"1945dc9dqtrg21\", \"name\": \"\\u0412\\u043e\\u043f\\u043b\\u0456 \\u0412\\u0456\\u0434\\u043e\\u043f\\u043b\\u044f\\u0441\\u043e\\u0432\\u0430 - \\u0412\\u0435\\u0441\\u043d\\u0430 (Cover by Grandma\\s Smuzi)\", \"duration\": 240.432}], \"albumCover\": {\"resourceId\": \"91dsp8tq6rsq1v\"}, \"artistLogo\": {\"resourceId\": \"r2f06bgtzhr8bv\"}, \"sleeveDocument\": {\"resourceId\": \"5pc60wsq353zsm\"}, \"copiesSold\": 0, \"releaseTimestamp\": \"1682559212\", \"price\": {\"VALU\": 1, \"USDC\": 200}}" - } - ], - "iChNhyJiQSZ3HumofCBhuASjgupq1m1NgP": [ - { - "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c": "{\"albumCover\": {\"resourceId\": \"91dsp8tq6rsq1v\"}, \"albumName\": \"testAlbum11\", \"artistLogo\": {\"resourceId\": \"r2f06bgtzhr8bv\"}, \"artistName\": \"ivan@\", \"genre\": \"rock\", \"networkId\": \"roomful\", \"signature\": \"AgXmEgAAAUEgwLEQjSOMDGvQ9OqXYC6TpmvlSj+lYg17MW3aaIM58cE9ufW7gF4Jyf6M/nJJVM3wFodIm4Irb/TUeFjeKCan5g==\", \"sleeveDocument\": {\"resourceId\": \"5pc60wsq353zsm\"}, \"tracks\": [{\"duration\": 240.432, \"name\": \"\\u0412\\u043e\\u043f\\u043b\\u0456 \\u0412\\u0456\\u0434\\u043e\\u043f\\u043b\\u044f\\u0441\\u043e\\u0432\\u0430 - \\u0412\\u0435\\u0441\\u043d\\u0430 (Cover by Grandma\\s Smuzi)\", \"resourceId\": \"1945dc9dqtrg21\"}], \"url\": \"https:///jukebox\", \"copiesSold\": 0, \"releaseTimestamp\": \"1682536170\", \"price\": {\"VALU\": 1, \"USDC\": 200}}" - } + "iEYsp2njSt1M4EVYi9uuAPBU2wpKmThkkr": [ + "040d" ] }, - "revocationauthority": "iPsFBfFoCcxtuZNzE8yxPQhXVn4dmytf8j", - "recoveryauthority": "iPsFBfFoCcxtuZNzE8yxPQhXVn4dmytf8j", + "revocationauthority": "iRmBDWNs2WahXDAvS2TEsJyJwwHXhwcs7w", + "recoveryauthority": "iRmBDWNs2WahXDAvS2TEsJyJwwHXhwcs7w", "timelock": 0 } - const scriptId = script.getIdentity([["iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c"], ["iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c"]]); + const scriptId = script.getIdentity(false); const scriptJson = scriptId.toJson(); expect(script.toBuffer().toString('hex')).toBe(scriptString); diff --git a/src/__tests__/pbaas/vdxfunivalue.test.ts b/src/__tests__/pbaas/vdxfunivalue.test.ts index a0bd374..f550251 100644 --- a/src/__tests__/pbaas/vdxfunivalue.test.ts +++ b/src/__tests__/pbaas/vdxfunivalue.test.ts @@ -17,7 +17,7 @@ describe('Encodes and decodes VdxfUniValue', () => { const vFromBuf = new VdxfUniValue(); - vFromBuf.fromBuffer(v.toBuffer(), 0, [DATA_TYPE_STRING.vdxfid]); + vFromBuf.fromBuffer(v.toBuffer(), 0); expect(vFromBuf.toBuffer().toString('hex')).toBe(v.toBuffer().toString('hex')); expect(VdxfUniValue.fromJson(v.toJson()).toBuffer().toString('hex')).toBe(vFromBuf.toBuffer().toString('hex')); @@ -34,6 +34,6 @@ describe('Encodes and decodes VdxfUniValue', () => { const vFromBuf = new VdxfUniValue(); - expect(() => vFromBuf.fromBuffer(v.toBuffer(), 0, [VERUSPAY_INVOICE_VDXF_KEY.vdxfid])).toThrowError(); + expect(() => vFromBuf.fromBuffer(v.toBuffer(), 0)).toThrowError(); }); }); \ No newline at end of file diff --git a/src/__tests__/vdxf/loginconsent.test.ts b/src/__tests__/vdxf/loginconsent.test.ts index f5d2168..82a9be0 100644 --- a/src/__tests__/vdxf/loginconsent.test.ts +++ b/src/__tests__/vdxf/loginconsent.test.ts @@ -18,7 +18,7 @@ describe('Serializes and deserializes signature objects properly', () => { }, challenge: { challenge_id: "iKNufKJdLX3Xg8qFru9AuLBvivAEJ88PW4", - requested_access: [new RequestedPermission(IDENTITY_VIEW.vdxfid, "")], + requested_access: [new RequestedPermission(IDENTITY_VIEW.vdxfid)], subject: [ new Subject( "fully.qualified.name", diff --git a/src/__tests__/vdxf/parser.test.ts b/src/__tests__/vdxf/parser.test.ts index 2a173e4..5f714bb 100644 --- a/src/__tests__/vdxf/parser.test.ts +++ b/src/__tests__/vdxf/parser.test.ts @@ -57,7 +57,7 @@ describe('Parses VDXF objects correctly', () => { }, challenge: { challenge_id: "iKNufKJdLX3Xg8qFru9AuLBvivAEJ88PW4", - requested_access: [new RequestedPermission(IDENTITY_VIEW.vdxfid, "")], + requested_access: [new RequestedPermission(IDENTITY_VIEW.vdxfid)], subject: [ new Subject( "fully.qualified.name", diff --git a/src/pbaas/VdxfUniValue.ts b/src/pbaas/VdxfUniValue.ts index 9b6394a..647561d 100644 --- a/src/pbaas/VdxfUniValue.ts +++ b/src/pbaas/VdxfUniValue.ts @@ -58,7 +58,6 @@ export class VdxfUniValue implements SerializableEntity { // if we just have serialized data if (key === "") { - length += varuint.encodingLength(Buffer.from(value as string, "hex").length) length += Buffer.from(value as string, "hex").length; continue; } @@ -91,25 +90,26 @@ export class VdxfUniValue implements SerializableEntity { length += HASH160_BYTE_LENGTH; if (key == VDXF_Data.DataStringKey.vdxfid) { - const encodedLength = varuint.encodingLength(Buffer.from(value as string, "utf-8").length) - length += varuint.encodingLength(1); - length += varuint.encodingLength(encodedLength + Buffer.from(value as string, "utf-8").length); - length += encodedLength; - length += Buffer.from(value as string, "utf-8").length; + const valBuf = Buffer.from(value as string, "utf-8"); + length += varint.encodingLength(new BN(1)); + // NOTE: 3 is from ss type + ver + vdxfIdVersion + length += varuint.encodingLength(valBuf.length + 3); + length += varuint.encodingLength(valBuf.length); + length += valBuf.length; } else if (key == VDXF_Data.DataByteVectorKey.vdxfid) { - const encodedLength = varuint.encodingLength(Buffer.from(value as string, "hex").length) - length += varuint.encodingLength(1); - length += varuint.encodingLength(encodedLength + Buffer.from(value as string, "hex").length); - length += encodedLength; - length += Buffer.from(value as string, "hex").length; + const valBuf = Buffer.from(value as string, "hex"); + length += varint.encodingLength(new BN(1)); + length += varuint.encodingLength(valBuf.length + 3); + length += varuint.encodingLength(valBuf.length) + length += valBuf.length; } else if (key == VDXF_Data.DataCurrencyMapKey.vdxfid) { const destinations = Object.keys(value); const values = Object.values(value); const oneCurMap = new CurrencyValueMap({ value_map: new Map(destinations.map((key, index) => [key, new BN(values[index])])), multivalue: true }); - length += varuint.encodingLength(1); + length += varint.encodingLength(new BN(1)); length += varuint.encodingLength(oneCurMap.getByteLength()); length += oneCurMap.getByteLength(); } @@ -118,7 +118,7 @@ export class VdxfUniValue implements SerializableEntity { const oneRatingMap = new Rating(value as Rating); length += varint.encodingLength(oneRatingMap.version); - length += varuint.encodingLength(oneRatingMap.getByteLength()); + length += varuint.encodingLength(oneRatingMap.getByteLength() + 3); length += oneRatingMap.getByteLength(); } else if (key == VDXF_Data.DataTransferDestinationKey.vdxfid) { @@ -126,7 +126,7 @@ export class VdxfUniValue implements SerializableEntity { const transferDest = new TransferDestination(value as TransferDestination); length += varint.encodingLength(transferDest.typeNoFlags()); - length += varuint.encodingLength(transferDest.getByteLength()); + length += varuint.encodingLength(transferDest.getByteLength() + 3); length += transferDest.getByteLength(); } else if (key == VDXF_Data.ContentMultiMapRemoveKey.vdxfid) { @@ -134,7 +134,7 @@ export class VdxfUniValue implements SerializableEntity { const transferDest = new ContentMultiMapRemove(value as ContentMultiMapRemove); length += varint.encodingLength(transferDest.version); - length += varuint.encodingLength(transferDest.getByteLength()); + length += varuint.encodingLength(transferDest.getByteLength() + 3); length += transferDest.getByteLength(); } else if (key == VDXF_Data.CrossChainDataRefKey.vdxfid) { @@ -142,7 +142,7 @@ export class VdxfUniValue implements SerializableEntity { const transferDest = new CrossChainDataRef(value); length += varint.encodingLength(VDXF_OBJECT_DEFAULT_VERSION); - length += varuint.encodingLength(transferDest.getByteLength()); + length += varuint.encodingLength(transferDest.getByteLength() + 3); length += transferDest.getByteLength(); } else if (key == VDXF_Data.DataDescriptorKey.vdxfid) { @@ -150,7 +150,7 @@ export class VdxfUniValue implements SerializableEntity { const descr = new DataDescriptor(value as DataDescriptor); length += varint.encodingLength(descr.version); - length += varuint.encodingLength(descr.getByteLength()); + length += varuint.encodingLength(descr.getByteLength() + 3); length += descr.getByteLength(); } else if (key == VDXF_Data.MMRDescriptorKey.vdxfid) { @@ -158,7 +158,7 @@ export class VdxfUniValue implements SerializableEntity { const descr = new MMRDescriptor(value as MMRDescriptor); length += varint.encodingLength(descr.version); - length += varuint.encodingLength(descr.getByteLength()); + length += varuint.encodingLength(descr.getByteLength() + 3); length += descr.getByteLength(); } else if (key == VDXF_Data.SignatureDataKey.vdxfid) { @@ -166,27 +166,25 @@ export class VdxfUniValue implements SerializableEntity { const sigData = new SignatureData(value as SignatureData); length += varint.encodingLength(sigData.version); - length += varuint.encodingLength(sigData.getByteLength()); + length += varuint.encodingLength(sigData.getByteLength() + 3); length += sigData.getByteLength(); } else { throw new Error("contentmap invalid or unrecognized vdxfkey for object type: " + key); } - return length; } + return length; } - toBuffer() { + toBuffer(): Buffer { const writer = new BufferWriter(Buffer.alloc(this.getByteLength())); for (const key of this.values.keys()) { const value = this.values.get(key); if (key === "") { - writer.writeVarSlice(value as Buffer); + writer.writeSlice(value as Buffer); continue; } - writer.writeSlice(fromBase58Check(key).hash) - writer.writeVarInt(this.version); if (key == VDXF_Data.DataByteKey.vdxfid) { const oneByte = Buffer.from(value as string, "hex"); @@ -233,12 +231,12 @@ export class VdxfUniValue implements SerializableEntity { } else if (key == VDXF_Data.DataStringKey.vdxfid) { - const encodedLength = varuint.encodingLength(Buffer.from(value as string, "utf-8").length) + const valBuf = Buffer.from(value as string, "utf-8"); writer.writeSlice(fromBase58Check(key).hash); writer.writeVarInt(new BN(1)); - writer.writeCompactSize(encodedLength + Buffer.from(value as string, "utf-8").length); - writer.writeVarSlice(Buffer.from(value as string, "utf-8")); + writer.writeCompactSize(valBuf.length + 3); + writer.writeVarSlice(valBuf); } else if (key == VDXF_Data.DataByteVectorKey.vdxfid) { @@ -351,13 +349,13 @@ export class VdxfUniValue implements SerializableEntity { else { // add the remaining data as a hex string reader.offset = reader.offset - HASH160_BYTE_LENGTH; - this.values.set("", reader.readSlice(bytesLeft + HASH160_BYTE_LENGTH).toString('hex')); + this.values.set("", reader.readSlice(bytesLeft + HASH160_BYTE_LENGTH)); bytesLeft = 0; break; } } if (bytesLeft && bytesLeft <= HASH160_BYTE_LENGTH) { - this.values.set("", reader.readSlice(bytesLeft).toString('hex')); + this.values.set("", reader.readSlice(bytesLeft)); } return reader.offset; } @@ -381,7 +379,7 @@ export class VdxfUniValue implements SerializableEntity { objSize = reader.readCompactSize(); reader.offset = oneCurrencyMap.fromBuffer(reader.buffer, reader.offset); if (oneCurrencyMap.isValid()) { - objectUni = { [checkVal]: oneCurrencyMap }; + objectUni = { key: checkVal, value: oneCurrencyMap }; } } else if (checkVal == VDXF_Data.DataRatingsKey.vdxfid) { @@ -390,7 +388,7 @@ export class VdxfUniValue implements SerializableEntity { objSize = reader.readCompactSize(); reader.offset = oneRatingObj.fromBuffer(reader.buffer, reader.offset); if (oneRatingObj.isValid()) { - objectUni = { [checkVal]: oneRatingObj }; + objectUni = { key: checkVal, oneRatingObj }; } } else if (checkVal == VDXF_Data.DataTransferDestinationKey.vdxfid) { @@ -399,7 +397,7 @@ export class VdxfUniValue implements SerializableEntity { objSize = reader.readCompactSize(); reader.offset = oneTransferDest.fromBuffer(reader.buffer, reader.offset); if (oneTransferDest.isValid()) { - objectUni = { [checkVal]: oneTransferDest }; + objectUni = { key: checkVal, value: oneTransferDest }; } } else if (checkVal == VDXF_Data.ContentMultiMapRemoveKey.vdxfid) { @@ -408,22 +406,22 @@ export class VdxfUniValue implements SerializableEntity { objSize = reader.readCompactSize(); reader.offset = contentMap.fromBuffer(reader.buffer, reader.offset); if (contentMap.isValid()) { - objectUni = { [checkVal]: contentMap }; + objectUni = { key: checkVal, value: contentMap }; } } else if (checkVal == VDXF_Data.DataStringKey.vdxfid) { let stringVal: string; version = reader.readVarInt(); objSize = reader.readCompactSize(); - stringVal = reader.readVarSlice.toString(); - objectUni = { [checkVal]: stringVal }; + stringVal = reader.readVarSlice().toString('utf8'); + objectUni = { key: checkVal, value: stringVal }; } else if (checkVal == VDXF_Data.DataByteVectorKey.vdxfid) { let vecVal: Buffer; version = reader.readVarInt(); objSize = reader.readCompactSize(); vecVal = reader.readVarSlice(); - objectUni = { [checkVal]: vecVal.toString('hex') }; + objectUni = { key: checkVal, value: vecVal.toString('hex') }; } else if (checkVal == VDXF_Data.CrossChainDataRefKey.vdxfid) { const dataRef = new CrossChainDataRef(); @@ -431,7 +429,7 @@ export class VdxfUniValue implements SerializableEntity { objSize = reader.readCompactSize(); reader.offset = dataRef.fromBuffer(reader.buffer, reader.offset); if (dataRef.isValid()) { - objectUni = { [checkVal]: dataRef }; + objectUni = { key: checkVal, value: dataRef }; } } else if (checkVal == VDXF_Data.DataDescriptorKey.vdxfid) { @@ -440,7 +438,7 @@ export class VdxfUniValue implements SerializableEntity { objSize = reader.readCompactSize(); reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); if (dataDescriptor.isValid()) { - objectUni = { [checkVal]: dataDescriptor }; + objectUni = { key: checkVal, value: dataDescriptor }; } } else if (checkVal == VDXF_Data.MMRDescriptorKey.vdxfid) { @@ -449,7 +447,7 @@ export class VdxfUniValue implements SerializableEntity { objSize = reader.readCompactSize(); reader.offset = mmrDescriptor.fromBuffer(reader.buffer, reader.offset); if (mmrDescriptor.isValid()) { - objectUni = { [checkVal]: mmrDescriptor }; + objectUni = { key: checkVal, value: mmrDescriptor }; } } else if (checkVal == VDXF_Data.SignatureDataKey.vdxfid) { @@ -458,7 +456,7 @@ export class VdxfUniValue implements SerializableEntity { objSize = reader.readCompactSize(); reader.offset = sigData.fromBuffer(reader.buffer, reader.offset); if (sigData.isValid()) { - objectUni = { [checkVal]: sigData }; + objectUni = { key: checkVal, value: sigData }; } } @@ -511,7 +509,7 @@ export class VdxfUniValue implements SerializableEntity { if (obj.serializedBase64) { try { - map.set("", Buffer.from(obj.serializedHex, "base64")) + map.set("", Buffer.from(obj.serializedBase64, "base64")) return new VdxfUniValue({ values: map }); @@ -521,7 +519,7 @@ export class VdxfUniValue implements SerializableEntity { } if (obj.message) { - map.set("", Buffer.from(obj.serializedHex, "utf-8")) + map.set("", Buffer.from(obj.message, "utf-8")) return new VdxfUniValue({ values: map }); diff --git a/src/vdxf/classes/Challenge.ts b/src/vdxf/classes/Challenge.ts index 3751552..44157b6 100644 --- a/src/vdxf/classes/Challenge.ts +++ b/src/vdxf/classes/Challenge.ts @@ -426,8 +426,10 @@ export class RequestedPermission extends VDXFObject { if (data[0] instanceof Hash160) { this.data = data as Array; } else { - this.data = data.map((x) => new Hash160(x)); + this.data = data.map((x) => new Hash160(fromBase58Check(x).hash)); } + } else { + this.data = []; } } @@ -438,7 +440,7 @@ export class RequestedPermission extends VDXFObject { length += varuint.encodingLength(this.data.length); for (let i = 0; i < this.data.length; i++) { - length += this.data[i].hash.length; + length += 20; } return length; @@ -460,6 +462,7 @@ export class RequestedPermission extends VDXFObject { fromDataBuffer(buffer: Buffer, offset?: number): number { const reader = new bufferutils.BufferReader(buffer, offset); + const contextLength = reader.readCompactSize(); const numKeys = reader.readCompactSize(); this.data = []; From c1c385669c1fa69845626aca18514e5b0aa3a141 Mon Sep 17 00:00:00 2001 From: Monkins1010 Date: Wed, 9 Oct 2024 19:59:48 +0100 Subject: [PATCH 113/120] Updates for tests #1 --- .../api/classes/SignData/SignDataRequest.d.ts | 6 +- .../classes/SignData/SignDataResponse.d.ts | 14 +- dist/pbaas/CurrencyValueMap.js | 2 +- dist/pbaas/DataDescriptor.js | 10 +- dist/pbaas/MMR.js | 25 -- dist/pbaas/MMRDescriptor.d.ts | 2 +- dist/pbaas/MMRDescriptor.js | 2 +- dist/pbaas/VdxfUniValue.js | 5 +- dist/utils/IdentityData.d.ts | 10 +- dist/utils/IdentityData.js | 308 +++++++++-------- dist/utils/types/DataDescriptor.d.ts | 2 +- dist/utils/types/MmrDescriptor.d.ts | 10 +- dist/utils/types/SignData.d.ts | 2 +- dist/utils/types/Signature.d.ts | 2 +- dist/vdxf/keymap.d.ts | 6 +- src/__tests__/attestation/attestation.test.ts | 34 ++ src/__tests__/pbaas/mmrdescriptor.test.ts | 186 +++++++++++ src/api/classes/SignData/SignDataRequest.ts | 6 +- src/api/classes/SignData/SignDataResponse.ts | 14 +- src/pbaas/CurrencyValueMap.ts | 2 +- src/pbaas/DataDescriptor.ts | 10 +- src/pbaas/MMR.ts | 32 -- src/pbaas/MMRDescriptor.ts | 2 +- src/pbaas/VdxfUniValue.ts | 6 +- src/utils/IdentityData.ts | 310 +++++++++--------- src/utils/types/DataDescriptor.ts | 2 +- src/utils/types/MmrDescriptor.ts | 10 +- src/utils/types/SignData.ts | 2 +- src/utils/types/Signature.ts | 2 +- 29 files changed, 591 insertions(+), 433 deletions(-) create mode 100644 src/__tests__/pbaas/mmrdescriptor.test.ts diff --git a/dist/api/classes/SignData/SignDataRequest.d.ts b/dist/api/classes/SignData/SignDataRequest.d.ts index f3f2f44..d0f83ca 100644 --- a/dist/api/classes/SignData/SignDataRequest.d.ts +++ b/dist/api/classes/SignData/SignDataRequest.d.ts @@ -1,7 +1,7 @@ import { ApiRequest } from "../../ApiRequest"; import { ApiPrimitiveJson, RequestParams } from "../../ApiPrimitive"; -import { DataDescriptor } from "../../../utils/types/DataDescriptor"; -import { SignData } from "../../../utils/types/SignData"; +import { DataDescriptorInfo } from "../../../utils/types/DataDescriptor"; +import { SignDataParameters } from "../../../utils/types/SignData"; export declare type SignDataArgs = { address?: string; filename?: string; @@ -10,7 +10,7 @@ export declare type SignDataArgs = { messsagebase64?: string; datahash?: string; vdxfdata?: string; - mmrdata?: Array; + mmrdata?: Array; mmrsalt?: Array; mmrhashtype?: string; priormmr?: Array; diff --git a/dist/api/classes/SignData/SignDataResponse.d.ts b/dist/api/classes/SignData/SignDataResponse.d.ts index 5745b6c..df9019c 100644 --- a/dist/api/classes/SignData/SignDataResponse.d.ts +++ b/dist/api/classes/SignData/SignDataResponse.d.ts @@ -1,15 +1,15 @@ import { ApiResponse } from "../../ApiResponse"; -import { Signature } from "../../../utils/types/Signature"; -import { mmrDescriptorParameters } from "../../../utils/types/MmrDescriptor"; -import { DataDescriptor } from "../../../utils/types/DataDescriptor"; +import { SignatureDataInfo } from "../../../utils/types/Signature"; +import { MmrDescriptorParameters } from "../../../utils/types/MmrDescriptor"; +import { DataDescriptorInfo } from "../../../utils/types/DataDescriptor"; export declare class SignDataResponse extends ApiResponse { result: { - mmrdescriptor_encrypted?: mmrDescriptorParameters; - mmrdescriptor?: mmrDescriptorParameters; + mmrdescriptor_encrypted?: MmrDescriptorParameters; + mmrdescriptor?: MmrDescriptorParameters; signature?: string; - signaturedata_encrypted?: DataDescriptor; + signaturedata_encrypted?: DataDescriptorInfo; signaturedata_ssk?: string; - signaturedata?: Signature; + signaturedata?: SignatureDataInfo; system?: string; systemid?: string; hashtype?: string; diff --git a/dist/pbaas/CurrencyValueMap.js b/dist/pbaas/CurrencyValueMap.js index 2307058..9a26d01 100644 --- a/dist/pbaas/CurrencyValueMap.js +++ b/dist/pbaas/CurrencyValueMap.js @@ -61,7 +61,7 @@ class CurrencyValueMap { } isValid() { for (let [key, value] of this.value_map) { - if (!key) { + if (!key || (typeof (key) == 'string' && key.length == 0)) { return false; } } diff --git a/dist/pbaas/DataDescriptor.js b/dist/pbaas/DataDescriptor.js index cf622f0..2eb9e49 100644 --- a/dist/pbaas/DataDescriptor.js +++ b/dist/pbaas/DataDescriptor.js @@ -217,8 +217,14 @@ class DataDescriptor { } let processedObject = new _1.VdxfUniValue(); processedObject.fromBuffer(this.objectdata); - if (isText && typeof processedObject.values.get("") === 'string') { - let objectDataUni = { message: Buffer.from(processedObject.values.get(""), 'hex').toString('utf-8') }; + if (isText && ((processedObject.values.get("") === "string") || Buffer.isBuffer(processedObject.values.get("")))) { + const objectDataUni = { message: '' }; + if (processedObject.values.get("") === "string") { + objectDataUni.message = processedObject.values.get(""); + } + else { + objectDataUni.message = processedObject.values.get("").toString('utf-8'); + } retval['objectdata'] = objectDataUni; } else { diff --git a/dist/pbaas/MMR.js b/dist/pbaas/MMR.js index a0fc004..21212ab 100644 --- a/dist/pbaas/MMR.js +++ b/dist/pbaas/MMR.js @@ -37,31 +37,6 @@ class MMRLayer { } exports.MMRLayer = MMRLayer; ; -//template -class OverlayNodeLayer { - constructor(NodeSource) { - this.nodeSource = NodeSource; - this.vSize = 0; - } - size() { - return this.vSize; - } - getIndex(idx) { - if (idx < this.vSize) { - let retval; - return retval; - } - else { - throw new Error("COverlayNodeLayer [] index out of range"); - } - } - // node type must be moveable just to be passed here, but the default overlay has no control over the underlying storage - // and only tracks size changes - push_back(node) { this.vSize++; } - clear() { this.vSize = 0; } - resize(newSize) { this.vSize = newSize; } -} -; class MMRNode { constructor(Hash) { if (Hash) { diff --git a/dist/pbaas/MMRDescriptor.d.ts b/dist/pbaas/MMRDescriptor.d.ts index 69d0ff5..2b1a99d 100644 --- a/dist/pbaas/MMRDescriptor.d.ts +++ b/dist/pbaas/MMRDescriptor.d.ts @@ -35,7 +35,7 @@ export declare class MMRDescriptor implements SerializableEntity { getByteLength(): number; toBuffer(): Buffer; fromBuffer(buffer: Buffer, offset?: number): number; - HasData(): boolean; + hasData(): boolean; isValid(): boolean; toJson(): MMRDescriptorJson; } diff --git a/dist/pbaas/MMRDescriptor.js b/dist/pbaas/MMRDescriptor.js index 70ece58..a0f0188 100644 --- a/dist/pbaas/MMRDescriptor.js +++ b/dist/pbaas/MMRDescriptor.js @@ -94,7 +94,7 @@ class MMRDescriptor { } return reader.offset; } - HasData() { + hasData() { return !!(this.mmrHashes.objectdata && this.dataDescriptors); } isValid() { diff --git a/dist/pbaas/VdxfUniValue.js b/dist/pbaas/VdxfUniValue.js index b8cfc3d..3cd3db8 100644 --- a/dist/pbaas/VdxfUniValue.js +++ b/dist/pbaas/VdxfUniValue.js @@ -548,7 +548,7 @@ class VdxfUniValue { }); } toJson() { - const ret = {}; + let ret = {}; for (const key of this.values.keys()) { if (key === "") { ret[key] = this.values.get(key).toString('hex'); @@ -566,6 +566,9 @@ class VdxfUniValue { ret[key] = this.values.get(key).toJson(); } } + if (ret && ret[""] && Object.keys(ret).length == 1) { + ret = ret[""]; + } return ret; } } diff --git a/dist/utils/IdentityData.d.ts b/dist/utils/IdentityData.d.ts index fc2a41d..b99b85f 100644 --- a/dist/utils/IdentityData.d.ts +++ b/dist/utils/IdentityData.d.ts @@ -1,12 +1,6 @@ -import * as keylist from '../vdxf/keys'; -export declare const getFriendlyNameForVdxfKey: (vdxfkey: any) => string; -export declare const getIdentityDataTypeForVdxfKey: (vdxfkey: any) => string | keylist.VDXFKeyInterface; +export declare const getFriendlyNameForVdxfKey: (vdxfkey: string, locale?: string) => any; export declare const IdentityVdxfidMap: { [x: string]: { - name: string; - type: keylist.VDXFKeyInterface; - } | { - name: string; - type: string; + EN: string; }; }; diff --git a/dist/utils/IdentityData.js b/dist/utils/IdentityData.js index 19afd51..7e637ca 100644 --- a/dist/utils/IdentityData.js +++ b/dist/utils/IdentityData.js @@ -1,169 +1,163 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.IdentityVdxfidMap = exports.getIdentityDataTypeForVdxfKey = exports.getFriendlyNameForVdxfKey = void 0; +exports.IdentityVdxfidMap = exports.getFriendlyNameForVdxfKey = void 0; const identitykeys = require("../vdxf/identitydatakeys"); const keylist = require("../vdxf/keys"); -const VDXF_Data = require("../vdxf/vdxfdatakeys"); -const getFriendlyNameForVdxfKey = (vdxfkey) => { - if (vdxfkey in exports.IdentityVdxfidMap) { - return exports.IdentityVdxfidMap[vdxfkey].name; +const IMPLEMENTED_LOCALES = ['EN']; +const getFriendlyNameForVdxfKey = (vdxfkey, locale = 'EN') => { + if (!IMPLEMENTED_LOCALES.includes(locale)) { + throw new Error(locale + " is not implemented"); } - else { - throw new Error("Unknown VDXF key"); - } -}; -exports.getFriendlyNameForVdxfKey = getFriendlyNameForVdxfKey; -const getIdentityDataTypeForVdxfKey = (vdxfkey) => { - if (vdxfkey in exports.IdentityVdxfidMap) { - return exports.IdentityVdxfidMap[vdxfkey].type; + if (vdxfkey in exports.IdentityVdxfidMap[locale]) { + return exports.IdentityVdxfidMap[vdxfkey][locale]; } else { throw new Error("Unknown VDXF key"); } }; -exports.getIdentityDataTypeForVdxfKey = getIdentityDataTypeForVdxfKey; +exports.getFriendlyNameForVdxfKey = getFriendlyNameForVdxfKey; exports.IdentityVdxfidMap = { - [identitykeys.IDENTITY_FIRSTNAME.vdxfid]: { name: "First Name", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_LASTNAME.vdxfid]: { name: "Last Name", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_NATIONALITY.vdxfid]: { name: "Nationality", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_ATTESTOR.vdxfid]: { name: "Attestor ID", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_ATTESTATION_RECIPIENT.vdxfid]: { name: "Attestation Recipient", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_PHONENUMBER.vdxfid]: { name: "Phone Number", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_OVER18.vdxfid]: { name: "Over 18", type: VDXF_Data.DataByteKeyName }, - [identitykeys.IDENTITY_OVER21.vdxfid]: { name: "Over 21", type: VDXF_Data.DataByteKeyName }, - [identitykeys.IDENTITY_OVER25.vdxfid]: { name: "Over 25", type: VDXF_Data.DataByteKeyName }, - [identitykeys.IDENTITY_EMAIL.vdxfid]: { name: "Email Address", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_HOMEADDRESS.vdxfid]: { name: "Home address", type: VDXF_Data.DataUint160Key }, - [identitykeys.IDENTITY_HOMEADDRESS_STREET1.vdxfid]: { name: "Street 1", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_HOMEADDRESS_STREET2.vdxfid]: { name: "Street 2", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_HOMEADDRESS_CITY.vdxfid]: { name: "City", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_HOMEADDRESS_REGION.vdxfid]: { name: "Region", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_HOMEADDRESS_POSTCODE.vdxfid]: { name: "Post Code", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_HOMEADDRESS_COUNTRY.vdxfid]: { name: "Country", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_IDNUMBER_VALUE.vdxfid]: { name: "ID Number", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_IDNUMBER_TYPE.vdxfid]: { name: "ID Type", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_VERIFICATION_STATUS.vdxfid]: { name: "Verification Status", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_ACCEPTEDTOS.vdxfid]: { name: "Accepted Terms and Conditions", type: VDXF_Data.DataByteKeyName }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_VERIFIEDSMS.vdxfid]: { name: "SMS Verified", type: VDXF_Data.DataByteKeyName }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_KYCCHECKED.vdxfid]: { name: "KYC Checked ok", type: VDXF_Data.DataByteKeyName }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_DOCUMENTSVERIFIED.vdxfid]: { name: "Documents Verified", type: VDXF_Data.DataByteKeyName }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_SELFIECHECKED.vdxfid]: { name: "Selfie Checked", type: VDXF_Data.DataByteKeyName }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_WATCHLISTOK.vdxfid]: { name: "Watchlist ok", type: VDXF_Data.DataByteKeyName }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Riskcheck ok", type: VDXF_Data.DataByteKeyName }, - [identitykeys.IDENTITY_DRIVINGLICENCE.vdxfid]: { name: "Driving Licence", type: VDXF_Data.DataUint160Key }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ORIGINALFRONT.vdxfid]: { name: "Driving Licence Front", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ORIGINALBACK.vdxfid]: { name: "Driving Licence Back", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_DRIVINGLICENCE_CROPPEDFRONT.vdxfid]: { name: "Driving Licence Front", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_DRIVINGLICENCE_CROPPEDBACK.vdxfid]: { name: "Driving Licence Back", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_DRIVINGLICENCE_FACE.vdxfid]: { name: "Driving Licence Face", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_DRIVINGLICENCE_IDNUMBER.vdxfid]: { name: "Driving Licence Number", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_DRIVINGLICENCE_CATEGORY.vdxfid]: { name: "Driving Licence Catagory", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_DRIVINGLICENCE_EXPIRATIONDATE.vdxfid]: { name: "Driving Licence expiry date", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ISSUINGCOUNTRY.vdxfid]: { name: "Driving Licence issuing country", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ISSUINGREGION.vdxfid]: { name: "Driving Licence issuing region", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_DRIVINGLICENCE_DATEOFBIRTH.vdxfid]: { name: "Driving Licence Date of Birth", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_STREET1.vdxfid]: { name: "Driving Licence Street 1", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_CITY.vdxfid]: { name: "Driving Licence City", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_REGION.vdxfid]: { name: "Driving Licence Region", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_POSTCODE.vdxfid]: { name: "Driving Licence ZIP/Post Code", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_COUNTRY.vdxfid]: { name: "Driving Licence Country", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_SELFIECHECK_IMAGE.vdxfid]: { name: "Selfie Check image", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_SELFIECHECK_VIDEO.vdxfid]: { name: "Selfie Check video", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Risk Check Ok", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_EMAIL_ISDELIVERABLE.vdxfid]: { name: "Email address is deliverable", type: VDXF_Data.DataByteKeyName }, - [identitykeys.IDENTITY_EMAIL_BREACHCOUNT.vdxfid]: { name: "Email breach count", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_EMAIL_FIRSTBREACHEDAT.vdxfid]: { name: "Email first breach date", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_EMAIL_LASTBREACHEDAT.vdxfid]: { name: "Email last breach date", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_EMAIL_DOMAIN_REGISTEREDAT.vdxfid]: { name: "Email domain registered at", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_EMAIL_DOMAIN_FREEPROVIDER.vdxfid]: { name: "Email is free provider", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_EMAIL_DOMAIN_CUSTOM.vdxfid]: { name: "Email Domain is custom", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_EMAIL_DOMAIN_DISPOSABLE.vdxfid]: { name: "Email Domain Disposable", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS.vdxfid]: { name: "Email top level Domain Suspicious", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_IDCARD.vdxfid]: { name: "ID Card", type: VDXF_Data.DataUint160Key }, - [identitykeys.IDENTITY_IDCARD_ORIGINALFRONT.vdxfid]: { name: "ID Card Front", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_IDCARD_ORIGINALBACK.vdxfid]: { name: "ID Card Back", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_IDCARD_CROPPEDFRONT.vdxfid]: { name: "ID Card Front", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_IDCARD_CROPPEDBACK.vdxfid]: { name: "ID Card Back", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_IDCARD_FACE.vdxfid]: { name: "ID Card Face", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_IDCARD_IDNUMBER.vdxfid]: { name: "ID Card ID Number", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_IDCARD_CATEGORY.vdxfid]: { name: "ID Card Category", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_IDCARD_EXPIRATIONDATE.vdxfid]: { name: "ID Card Expiry date", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_IDCARD_ISSUINGREGION.vdxfid]: { name: "ID Card Issuing Region", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_IDCARD_DATEOFBIRTH.vdxfid]: { name: "ID Card Date of Birth", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_IDCARD_ADDRESS_STREET1.vdxfid]: { name: "ID Card Street 1", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_IDCARD_ADDRESS_CITY.vdxfid]: { name: "ID Card City", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_IDCARD_ADDRESS_REGION.vdxfid]: { name: "ID Card Region", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_IDCARD_ADDRESS_POSTCODE.vdxfid]: { name: "ID Card Zip/Post Code", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_IDCARD_ADDRESS_COUNTRY.vdxfid]: { name: "ID Card Country", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_PASSPORT.vdxfid]: { name: "Passport", type: VDXF_Data.DataUint160Key }, - [identitykeys.IDENTITY_PASSPORT_ORIGINALFRONT.vdxfid]: { name: "Passport front", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_PASSPORT_ORIGINALBACK.vdxfid]: { name: "Passport back", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_PASSPORT_CROPPEDFRONT.vdxfid]: { name: "Passport front", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_PASSPORT_CROPPEDBACK.vdxfid]: { name: "Passport back", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_PASSPORT_FACE.vdxfid]: { name: "Passport face", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_PASSPORT_IDNUMBER.vdxfid]: { name: "Passport ID Number", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_PASSPORT_CATEGORY.vdxfid]: { name: "Passport Category", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_PASSPORT_EXPIRATIONDATE.vdxfid]: { name: "Passport expiry date", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_PASSPORT_DATEOFBIRTH.vdxfid]: { name: "Passport date of birth", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_PASSPORT_ADDRESS_STREET1.vdxfid]: { name: "Passport street 1", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_PASSPORT_ADDRESS_CITY.vdxfid]: { name: "Passport city", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_PASSPORT_ADDRESS_REGION.vdxfid]: { name: "Passport region", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_PASSPORT_ADDRESS_POSTCODE.vdxfid]: { name: "Passport zip/post code", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_PASSPORT_ADDRESS_COUNTRY.vdxfid]: { name: "Passport country", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENCEPERMIT.vdxfid]: { name: "Residence Permit", type: VDXF_Data.DataUint160Key }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ORIGINALFRONT.vdxfid]: { name: "Residence Permit front", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ORIGINALBACK.vdxfid]: { name: "Residence Permit back", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_CROPPEDFRONT.vdxfid]: { name: "Residence Permit front", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_CROPPEDBACK.vdxfid]: { name: "Residence Permit back", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_FACE.vdxfid]: { name: "Residence Permit face", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_IDNUMBER.vdxfid]: { name: "Residence Permit ID Number", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_CATEGORY.vdxfid]: { name: "Residence Permit category", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_EXPIRATIONDATE.vdxfid]: { name: "Residence Permit expiry date", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ISSUINGREGION.vdxfid]: { name: "Residence Permit issuing region", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_DATEOFBIRTH.vdxfid]: { name: "Residence Permit date of birth", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS.vdxfid]: { name: "Residence Permit Address", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_STREET1.vdxfid]: { name: "Residence Permit Street 1", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_CITY.vdxfid]: { name: "Residence Permit City", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_REGION.vdxfid]: { name: "Residence Permit Region", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_POSTCODE.vdxfid]: { name: "Residence Permit Zip/Post code", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_COUNTRY.vdxfid]: { name: "Residence Permit Country", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENTCARD.vdxfid]: { name: "Resident Card", type: VDXF_Data.DataUint160Key }, - [identitykeys.IDENTITY_RESIDENTCARD_ORIGINALFRONT.vdxfid]: { name: "Resident Card Front", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_RESIDENTCARD_ORIGINALBACK.vdxfid]: { name: "Resident Card Back", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_RESIDENTCARD_CROPPEDFRONT.vdxfid]: { name: "Resident Card Front", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_RESIDENTCARD_CROPPEDBACK.vdxfid]: { name: "Resident Card Back", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_RESIDENTCARD_FACE.vdxfid]: { name: "Resident Card Face", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_RESIDENTCARD_IDNUMBER.vdxfid]: { name: "Resident Card ID Number", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENTCARD_CATEGORY.vdxfid]: { name: "Resident Card Category", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENTCARD_EXPIRATIONDATE.vdxfid]: { name: "Resident Card Expiry Date", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENTCARD_ISSUINGREGION.vdxfid]: { name: "Resident Card Issuing Region", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENTCARD_DATEOFBIRTH.vdxfid]: { name: "Resident Card date of birth", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_STREET1.vdxfid]: { name: "Resident Card Street 1", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_CITY.vdxfid]: { name: "Resident Card City", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_REGION.vdxfid]: { name: "Resident Card Region", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_POSTCODE.vdxfid]: { name: "Resident Card Zip/Post Code", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_COUNTRY.vdxfid]: { name: "Resident Card Country", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_VISA.vdxfid]: { name: "Visa", type: VDXF_Data.DataUint160Key }, - [identitykeys.IDENTITY_VISA_ORIGINALFRONT.vdxfid]: { name: "Visa front", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_VISA_ORIGINALBACK.vdxfid]: { name: "Visa back", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_VISA_CROPPEDFRONT.vdxfid]: { name: "Visa front", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_VISA_CROPPEDBACK.vdxfid]: { name: "Visa back", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_VISA_FACE.vdxfid]: { name: "Visa face", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_VISA_IDNUMBER.vdxfid]: { name: "Visa ID Number", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_VISA_CATEGORY.vdxfid]: { name: "Visa Category", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_VISA_EXPIRATIONDATE.vdxfid]: { name: "Visa expiry date", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_VISA_ISSUINGREGION.vdxfid]: { name: "Visa issuing region", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_VISA_DATEOFBIRTH.vdxfid]: { name: "Visa date of birth", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_VISA_ADDRESS_STREET1.vdxfid]: { name: "Visa Street 1", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_VISA_ADDRESS_CITY.vdxfid]: { name: "Visa City", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_VISA_ADDRESS_REGION.vdxfid]: { name: "Visa Region", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_VISA_ADDRESS_POSTCODE.vdxfid]: { name: "Visa Zip/Post Code", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_VISA_ADDRESS_COUNTRY.vdxfid]: { name: "Visa Country", type: VDXF_Data.DataStringKey }, - [keylist.ATTESTATION_PROVISION_TYPE.vdxfid]: { name: "Attestation Type", type: VDXF_Data.DataStringKey }, - [keylist.ATTESTATION_PROVISION_URL.vdxfid]: { name: "Attestation URL", type: VDXF_Data.DataURLKeyName }, - [keylist.ATTESTATION_VIEW_RESPONSE.vdxfid]: { name: "Attestation View Response", type: VDXF_Data.DataStringKey }, - [keylist.ATTESTATION_VIEW_REQUEST.vdxfid]: { name: "Attestation View Response", type: VDXF_Data.DataStringKey }, - [keylist.PROFILE_DATA_VIEW_REQUEST.vdxfid]: { name: "Profile Data View Request", type: VDXF_Data.DataStringKey }, - [keylist.IDENTITY_SIGNDATA_REQUEST.vdxfid]: { name: "Identity Sign Data Request", type: VDXF_Data.DataStringKey }, + [identitykeys.IDENTITY_FIRSTNAME.vdxfid]: { EN: "First Name" }, + [identitykeys.IDENTITY_LASTNAME.vdxfid]: { EN: "Last Name" }, + [identitykeys.IDENTITY_NATIONALITY.vdxfid]: { EN: "Nationality" }, + [identitykeys.IDENTITY_ATTESTOR.vdxfid]: { EN: "Attestor ID" }, + [identitykeys.IDENTITY_ATTESTATION_RECIPIENT.vdxfid]: { EN: "Attestation Recipient" }, + [identitykeys.IDENTITY_PHONENUMBER.vdxfid]: { EN: "Phone Number" }, + [identitykeys.IDENTITY_DATEOFBIRTH.vdxfid]: { EN: "Date of Birth" }, + [identitykeys.IDENTITY_OVER18.vdxfid]: { EN: "Over 18" }, + [identitykeys.IDENTITY_OVER21.vdxfid]: { EN: "Over 21" }, + [identitykeys.IDENTITY_OVER25.vdxfid]: { EN: "Over 25" }, + [identitykeys.IDENTITY_EMAIL.vdxfid]: { EN: "Email Address" }, + [identitykeys.IDENTITY_HOMEADDRESS.vdxfid]: { EN: "Home address" }, + [identitykeys.IDENTITY_HOMEADDRESS_STREET1.vdxfid]: { EN: "Street 1" }, + [identitykeys.IDENTITY_HOMEADDRESS_STREET2.vdxfid]: { EN: "Street 2" }, + [identitykeys.IDENTITY_HOMEADDRESS_CITY.vdxfid]: { EN: "City" }, + [identitykeys.IDENTITY_HOMEADDRESS_REGION.vdxfid]: { EN: "Region" }, + [identitykeys.IDENTITY_HOMEADDRESS_POSTCODE.vdxfid]: { EN: "Post Code" }, + [identitykeys.IDENTITY_HOMEADDRESS_COUNTRY.vdxfid]: { EN: "Country" }, + [identitykeys.IDENTITY_IDNUMBER_VALUE.vdxfid]: { EN: "ID Number" }, + [identitykeys.IDENTITY_IDNUMBER_TYPE.vdxfid]: { EN: "ID Type" }, + [identitykeys.IDENTITY_VERIFICATION_STATUS.vdxfid]: { EN: "Verification Status" }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_ACCEPTEDTOS.vdxfid]: { EN: "Accepted Terms and Conditions" }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_VERIFIEDSMS.vdxfid]: { EN: "SMS Verified" }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_KYCCHECKED.vdxfid]: { EN: "KYC Checked ok" }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_DOCUMENTSVERIFIED.vdxfid]: { EN: "Documents Verified" }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_SELFIECHECKED.vdxfid]: { EN: "Selfie Checked" }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_WATCHLISTOK.vdxfid]: { EN: "Watchlist ok" }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK.vdxfid]: { EN: "Riskcheck ok" }, + [identitykeys.IDENTITY_DRIVINGLICENCE.vdxfid]: { EN: "Driving Licence" }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ORIGINALFRONT.vdxfid]: { EN: "Driving Licence Front" }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ORIGINALBACK.vdxfid]: { EN: "Driving Licence Back" }, + [identitykeys.IDENTITY_DRIVINGLICENCE_CROPPEDFRONT.vdxfid]: { EN: "Driving Licence Front" }, + [identitykeys.IDENTITY_DRIVINGLICENCE_CROPPEDBACK.vdxfid]: { EN: "Driving Licence Back" }, + [identitykeys.IDENTITY_DRIVINGLICENCE_FACE.vdxfid]: { EN: "Driving Licence Face" }, + [identitykeys.IDENTITY_DRIVINGLICENCE_IDNUMBER.vdxfid]: { EN: "Driving Licence Number" }, + [identitykeys.IDENTITY_DRIVINGLICENCE_CATEGORY.vdxfid]: { EN: "Driving Licence Catagory" }, + [identitykeys.IDENTITY_DRIVINGLICENCE_EXPIRATIONDATE.vdxfid]: { EN: "Driving Licence expiry date" }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ISSUINGCOUNTRY.vdxfid]: { EN: "Driving Licence issuing country" }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ISSUINGREGION.vdxfid]: { EN: "Driving Licence issuing region" }, + [identitykeys.IDENTITY_DRIVINGLICENCE_DATEOFBIRTH.vdxfid]: { EN: "Driving Licence Date of Birth" }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_STREET1.vdxfid]: { EN: "Driving Licence Street 1" }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_CITY.vdxfid]: { EN: "Driving Licence City" }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_REGION.vdxfid]: { EN: "Driving Licence Region" }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_POSTCODE.vdxfid]: { EN: "Driving Licence ZIP/Post Code" }, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_COUNTRY.vdxfid]: { EN: "Driving Licence Country" }, + [identitykeys.IDENTITY_SELFIECHECK_IMAGE.vdxfid]: { EN: "Selfie Check image" }, + [identitykeys.IDENTITY_SELFIECHECK_VIDEO.vdxfid]: { EN: "Selfie Check video" }, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK.vdxfid]: { EN: "Risk Check Ok" }, + [identitykeys.IDENTITY_EMAIL_ISDELIVERABLE.vdxfid]: { EN: "Email address is deliverable" }, + [identitykeys.IDENTITY_EMAIL_BREACHCOUNT.vdxfid]: { EN: "Email breach count" }, + [identitykeys.IDENTITY_EMAIL_FIRSTBREACHEDAT.vdxfid]: { EN: "Email first breach date" }, + [identitykeys.IDENTITY_EMAIL_LASTBREACHEDAT.vdxfid]: { EN: "Email last breach date" }, + [identitykeys.IDENTITY_EMAIL_DOMAIN_REGISTEREDAT.vdxfid]: { EN: "Email domain registered at" }, + [identitykeys.IDENTITY_EMAIL_DOMAIN_FREEPROVIDER.vdxfid]: { EN: "Email is free provider" }, + [identitykeys.IDENTITY_EMAIL_DOMAIN_CUSTOM.vdxfid]: { EN: "Email Domain is custom" }, + [identitykeys.IDENTITY_EMAIL_DOMAIN_DISPOSABLE.vdxfid]: { EN: "Email Domain Disposable" }, + [identitykeys.IDENTITY_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS.vdxfid]: { EN: "Email top level Domain Suspicious" }, + [identitykeys.IDENTITY_IDCARD.vdxfid]: { EN: "ID Card" }, + [identitykeys.IDENTITY_IDCARD_ORIGINALFRONT.vdxfid]: { EN: "ID Card Front" }, + [identitykeys.IDENTITY_IDCARD_ORIGINALBACK.vdxfid]: { EN: "ID Card Back" }, + [identitykeys.IDENTITY_IDCARD_CROPPEDFRONT.vdxfid]: { EN: "ID Card Front" }, + [identitykeys.IDENTITY_IDCARD_CROPPEDBACK.vdxfid]: { EN: "ID Card Back" }, + [identitykeys.IDENTITY_IDCARD_FACE.vdxfid]: { EN: "ID Card Face" }, + [identitykeys.IDENTITY_IDCARD_IDNUMBER.vdxfid]: { EN: "ID Card ID Number" }, + [identitykeys.IDENTITY_IDCARD_CATEGORY.vdxfid]: { EN: "ID Card Category" }, + [identitykeys.IDENTITY_IDCARD_EXPIRATIONDATE.vdxfid]: { EN: "ID Card Expiry date" }, + [identitykeys.IDENTITY_IDCARD_ISSUINGREGION.vdxfid]: { EN: "ID Card Issuing Region" }, + [identitykeys.IDENTITY_IDCARD_DATEOFBIRTH.vdxfid]: { EN: "ID Card Date of Birth" }, + [identitykeys.IDENTITY_IDCARD_ADDRESS_STREET1.vdxfid]: { EN: "ID Card Street 1" }, + [identitykeys.IDENTITY_IDCARD_ADDRESS_CITY.vdxfid]: { EN: "ID Card City" }, + [identitykeys.IDENTITY_IDCARD_ADDRESS_REGION.vdxfid]: { EN: "ID Card Region" }, + [identitykeys.IDENTITY_IDCARD_ADDRESS_POSTCODE.vdxfid]: { EN: "ID Card Zip/Post Code" }, + [identitykeys.IDENTITY_IDCARD_ADDRESS_COUNTRY.vdxfid]: { EN: "ID Card Country" }, + [identitykeys.IDENTITY_PASSPORT.vdxfid]: { EN: "Passport" }, + [identitykeys.IDENTITY_PASSPORT_ORIGINALFRONT.vdxfid]: { EN: "Passport front" }, + [identitykeys.IDENTITY_PASSPORT_ORIGINALBACK.vdxfid]: { EN: "Passport back" }, + [identitykeys.IDENTITY_PASSPORT_CROPPEDFRONT.vdxfid]: { EN: "Passport front" }, + [identitykeys.IDENTITY_PASSPORT_CROPPEDBACK.vdxfid]: { EN: "Passport back" }, + [identitykeys.IDENTITY_PASSPORT_FACE.vdxfid]: { EN: "Passport face" }, + [identitykeys.IDENTITY_PASSPORT_IDNUMBER.vdxfid]: { EN: "Passport ID Number" }, + [identitykeys.IDENTITY_PASSPORT_CATEGORY.vdxfid]: { EN: "Passport Category" }, + [identitykeys.IDENTITY_PASSPORT_EXPIRATIONDATE.vdxfid]: { EN: "Passport expiry date" }, + [identitykeys.IDENTITY_PASSPORT_DATEOFBIRTH.vdxfid]: { EN: "Passport date of birth" }, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_STREET1.vdxfid]: { EN: "Passport street 1" }, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_CITY.vdxfid]: { EN: "Passport city" }, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_REGION.vdxfid]: { EN: "Passport region" }, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_POSTCODE.vdxfid]: { EN: "Passport zip/post code" }, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_COUNTRY.vdxfid]: { EN: "Passport country" }, + [identitykeys.IDENTITY_RESIDENCEPERMIT.vdxfid]: { EN: "Residence Permit" }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ORIGINALFRONT.vdxfid]: { EN: "Residence Permit front" }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ORIGINALBACK.vdxfid]: { EN: "Residence Permit back" }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_CROPPEDFRONT.vdxfid]: { EN: "Residence Permit front" }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_CROPPEDBACK.vdxfid]: { EN: "Residence Permit back" }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_FACE.vdxfid]: { EN: "Residence Permit face" }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_IDNUMBER.vdxfid]: { EN: "Residence Permit ID Number" }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_CATEGORY.vdxfid]: { EN: "Residence Permit category" }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_EXPIRATIONDATE.vdxfid]: { EN: "Residence Permit expiry date" }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ISSUINGREGION.vdxfid]: { EN: "Residence Permit issuing region" }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_DATEOFBIRTH.vdxfid]: { EN: "Residence Permit date of birth" }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS.vdxfid]: { EN: "Residence Permit Address" }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_STREET1.vdxfid]: { EN: "Residence Permit Street 1" }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_CITY.vdxfid]: { EN: "Residence Permit City" }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_REGION.vdxfid]: { EN: "Residence Permit Region" }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_POSTCODE.vdxfid]: { EN: "Residence Permit Zip/Post code" }, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_COUNTRY.vdxfid]: { EN: "Residence Permit Country" }, + [identitykeys.IDENTITY_RESIDENTCARD.vdxfid]: { EN: "Resident Card" }, + [identitykeys.IDENTITY_RESIDENTCARD_ORIGINALFRONT.vdxfid]: { EN: "Resident Card Front" }, + [identitykeys.IDENTITY_RESIDENTCARD_ORIGINALBACK.vdxfid]: { EN: "Resident Card Back" }, + [identitykeys.IDENTITY_RESIDENTCARD_CROPPEDFRONT.vdxfid]: { EN: "Resident Card Front" }, + [identitykeys.IDENTITY_RESIDENTCARD_CROPPEDBACK.vdxfid]: { EN: "Resident Card Back" }, + [identitykeys.IDENTITY_RESIDENTCARD_FACE.vdxfid]: { EN: "Resident Card Face" }, + [identitykeys.IDENTITY_RESIDENTCARD_IDNUMBER.vdxfid]: { EN: "Resident Card ID Number" }, + [identitykeys.IDENTITY_RESIDENTCARD_CATEGORY.vdxfid]: { EN: "Resident Card Category" }, + [identitykeys.IDENTITY_RESIDENTCARD_EXPIRATIONDATE.vdxfid]: { EN: "Resident Card Expiry Date" }, + [identitykeys.IDENTITY_RESIDENTCARD_ISSUINGREGION.vdxfid]: { EN: "Resident Card Issuing Region" }, + [identitykeys.IDENTITY_RESIDENTCARD_DATEOFBIRTH.vdxfid]: { EN: "Resident Card date of birth" }, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_STREET1.vdxfid]: { EN: "Resident Card Street 1" }, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_CITY.vdxfid]: { EN: "Resident Card City" }, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_REGION.vdxfid]: { EN: "Resident Card Region" }, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_POSTCODE.vdxfid]: { EN: "Resident Card Zip/Post Code" }, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_COUNTRY.vdxfid]: { EN: "Resident Card Country" }, + [identitykeys.IDENTITY_VISA.vdxfid]: { EN: "Visa" }, + [identitykeys.IDENTITY_VISA_ORIGINALFRONT.vdxfid]: { EN: "Visa front" }, + [identitykeys.IDENTITY_VISA_ORIGINALBACK.vdxfid]: { EN: "Visa back" }, + [identitykeys.IDENTITY_VISA_CROPPEDFRONT.vdxfid]: { EN: "Visa front" }, + [identitykeys.IDENTITY_VISA_CROPPEDBACK.vdxfid]: { EN: "Visa back" }, + [identitykeys.IDENTITY_VISA_FACE.vdxfid]: { EN: "Visa face" }, + [identitykeys.IDENTITY_VISA_IDNUMBER.vdxfid]: { EN: "Visa ID Number" }, + [identitykeys.IDENTITY_VISA_CATEGORY.vdxfid]: { EN: "Visa Category" }, + [identitykeys.IDENTITY_VISA_EXPIRATIONDATE.vdxfid]: { EN: "Visa expiry date" }, + [identitykeys.IDENTITY_VISA_ISSUINGREGION.vdxfid]: { EN: "Visa issuing region" }, + [identitykeys.IDENTITY_VISA_DATEOFBIRTH.vdxfid]: { EN: "Visa date of birth" }, + [identitykeys.IDENTITY_VISA_ADDRESS_STREET1.vdxfid]: { EN: "Visa Street 1" }, + [identitykeys.IDENTITY_VISA_ADDRESS_CITY.vdxfid]: { EN: "Visa City" }, + [identitykeys.IDENTITY_VISA_ADDRESS_REGION.vdxfid]: { EN: "Visa Region" }, + [identitykeys.IDENTITY_VISA_ADDRESS_POSTCODE.vdxfid]: { EN: "Visa Zip/Post Code" }, + [identitykeys.IDENTITY_VISA_ADDRESS_COUNTRY.vdxfid]: { EN: "Visa Country" }, + [keylist.ATTESTATION_PROVISION_TYPE.vdxfid]: { EN: "Attestation Type" }, + [keylist.ATTESTATION_PROVISION_URL.vdxfid]: { EN: "Attestation URL" }, + [keylist.ATTESTATION_VIEW_RESPONSE.vdxfid]: { EN: "Attestation View Response" }, + [keylist.ATTESTATION_VIEW_REQUEST.vdxfid]: { EN: "Attestation View Response" }, + [keylist.PROFILE_DATA_VIEW_REQUEST.vdxfid]: { EN: "Profile Data View Request" }, + [keylist.IDENTITY_SIGNDATA_REQUEST.vdxfid]: { EN: "Identity Sign Data Request" } }; diff --git a/dist/utils/types/DataDescriptor.d.ts b/dist/utils/types/DataDescriptor.d.ts index bf8cf61..6679e4a 100644 --- a/dist/utils/types/DataDescriptor.d.ts +++ b/dist/utils/types/DataDescriptor.d.ts @@ -1,4 +1,4 @@ -export declare type DataDescriptor = { +export declare type DataDescriptorInfo = { version?: number; flags?: number; objectdata?: string; diff --git a/dist/utils/types/MmrDescriptor.d.ts b/dist/utils/types/MmrDescriptor.d.ts index d203e65..e5a14de 100644 --- a/dist/utils/types/MmrDescriptor.d.ts +++ b/dist/utils/types/MmrDescriptor.d.ts @@ -1,9 +1,9 @@ -import { DataDescriptor } from './DataDescriptor'; -export declare type mmrDescriptorParameters = { +import { DataDescriptorInfo } from './DataDescriptor'; +export declare type MmrDescriptorParameters = { version?: number; objecthashtype?: number; mmrhashtype?: number; - mmrroot?: DataDescriptor; - mmrhashes?: DataDescriptor; - datadescriptors?: DataDescriptor[]; + mmrroot?: DataDescriptorInfo; + mmrhashes?: DataDescriptorInfo; + datadescriptors?: DataDescriptorInfo[]; }; diff --git a/dist/utils/types/SignData.d.ts b/dist/utils/types/SignData.d.ts index baad806..dd0cbb5 100644 --- a/dist/utils/types/SignData.d.ts +++ b/dist/utils/types/SignData.d.ts @@ -1,4 +1,4 @@ -export declare type SignData = { +export declare type SignDataParameters = { filename?: string; message?: string; messagehex?: string; diff --git a/dist/utils/types/Signature.d.ts b/dist/utils/types/Signature.d.ts index 064895a..0f57ddd 100644 --- a/dist/utils/types/Signature.d.ts +++ b/dist/utils/types/Signature.d.ts @@ -1,4 +1,4 @@ -export declare type Signature = { +export declare type SignatureDataInfo = { version: number; systemid: string; hashtype: number; diff --git a/dist/vdxf/keymap.d.ts b/dist/vdxf/keymap.d.ts index 8ede227..fcbcb5f 100644 --- a/dist/vdxf/keymap.d.ts +++ b/dist/vdxf/keymap.d.ts @@ -7,10 +7,6 @@ export declare const attestationDataKeys: { }; export declare const IdentityVdxfidMap: { [x: string]: { - name: string; - type: keylist.VDXFKeyInterface; - } | { - name: string; - type: string; + EN: string; }; }; diff --git a/src/__tests__/attestation/attestation.test.ts b/src/__tests__/attestation/attestation.test.ts index 34877b4..6864315 100644 --- a/src/__tests__/attestation/attestation.test.ts +++ b/src/__tests__/attestation/attestation.test.ts @@ -149,4 +149,38 @@ describe('Serializes and deserializes attestation request', () => { }); + test("request profile information to Create an Attestation", async () => { + + const profileInfoRequest = new LoginConsentRequest({ + system_id: "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + signing_id: "iB5PRXMHLYcNtM8dfLB6KwfJrHU2mKDYuU", + signature: { + signature: + "AYG2IQABQSAN1fp6A9NIVbxvKuOVLLU+0I+G3oQGbRtS6u4Eampfb217Cdf5FCMScQhV9kMxtjI9GWzpchmjuiTB2tctk6qT", + }, + challenge: { + challenge_id: "iMqzCkWdebC19xbjkLfVdDkkGP9Ni1oxoN", + requested_access: [ + new RequestedPermission(IDENTITY_VIEW.vdxfid, [IDENTITY_PERSONALDETAILS.vdxfid, IDENTITY_CONTACTDETAILS.vdxfid, IDENTITY_LOCATION.vdxfid, IDENTITY_BANKINGDETAILS.vdxfid, IDENTITY_DOCUMENTS.vdxfid]), + new RequestedPermission(PROFILE_DATA_VIEW_REQUEST.vdxfid), // change to array + new RequestedPermission(LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY.vdxfid), + new RequestedPermission(LOGIN_CONSENT_REDIRECT_VDXF_KEY.vdxfid), + ], + redirect_uris: [new RedirectUri( + "https://example.com/sendpersonaldata", + LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY.vdxfid) + ], + subject: [], + provisioning_info: [], // + created_at: Number((Date.now() / 1000).toFixed(0)), + } + }); + + const serializedRequest = profileInfoRequest.toBuffer().toString('hex'); // Serialize the request to a hex string + const newProfileInfoRequest = new LoginConsentRequest(); + + newProfileInfoRequest.fromBuffer(Buffer.from(serializedRequest, 'hex')); // Deserialize the request from the hex string + expect(serializedRequest).toStrictEqual(newProfileInfoRequest.toBuffer().toString('hex')) // Compare the original serialized request to the new serialized request + }); + }); diff --git a/src/__tests__/pbaas/mmrdescriptor.test.ts b/src/__tests__/pbaas/mmrdescriptor.test.ts new file mode 100644 index 0000000..d3ac17f --- /dev/null +++ b/src/__tests__/pbaas/mmrdescriptor.test.ts @@ -0,0 +1,186 @@ +import { DataDescriptor } from "../../pbaas/DataDescriptor"; +import { MMRDescriptor, MMRDescriptorJson } from "../../pbaas/MMRDescriptor"; +import { SignatureData } from "../../pbaas/SignatureData"; + +describe('Create a personal info request', () => { + test('serialize and deserialize a mmrdescriptor', async () => { + + const mmrdescriptor = { + "version": 1, + "objecthashtype": 5, + "mmrhashtype": 1, + "mmrroot": { + "version": 1, + "flags": 5, + "objectdata": "b00ad8606acbf5234700daa308a2c64c1f9466c11d47255a60f8ccf9c74ba82b994a03b9b0331bc6f1bf25bbc8b4453a130d65b6a9dc21f7589967e88e51d930682469b03873c54e77", + "epk": "d89d4a9333fe85519a447b886b6c6c8aabee6fb144e9742b76b745dbdfd83c9a" + }, + "mmrhashes": { + "version": 1, + "flags": 5, + "objectdata": "8207c6db9c149dcaff5f502baf891642e67e7e303c0ba8130f2bff76d8247929bc7ce55fdf66bac03ea808006dc5e71aa12deaff355985c7770ee7a534d9cea2bfc10851ed5c91467083ffb1f746161f5d567b4be5c98d72300e1762697d5f62067d819ac0b35ac2c712c6e8e04cefaecaf759f38f4fa3ff4d3fc4d1dccbb6b8", + "epk": "230df92c25958999741329ed3dafc7825900807cbf6b02becc236ce573158a4f" + }, + "datadescriptors": [ + { + "version": 1, + "flags": 5, + "objectdata": "97c0b93faab9462670a5a13da88d9ca796db968ae9c9f1b88df67c564b73cb63f752248402844522efaa62e5b42ce816d0a9f44ca14efaf6f7fe47d916e77b54266c5cac39c6771e899ebda093c566d33bbf60b4a598ea45bf2f5fb1f0cd782baaf092a880a799e0771144a9e9422eec107e43d23ba9386bb46dde09", + "epk": "d7a908ddf6f4d6261d25c62ca086bb3f570b07d74a59256feed13d64d6fbadd2" + }, + { + "version": 1, + "flags": 5, + "objectdata": "d1ce7cab498d9a87bbf3c8d5f255cf209e87adf01f407751959f2d49f23056597a51240e90d5f758adc92e819f77f698fe754c9ea350c213dbcbffdaeb6d9a55bbaf705af9a375c855e7a8ca486bc65b1bd24c35e13f437a7490ecaffeff0323e7508a6cc4e36c5414b4cd7d3125ffabfa3fe85a56e4f6e539925b", + "epk": "822d2b817613d5eb5daf4893afc57289d0081f8fe225c77e1e4839aa0822b9a5" + } + ] + } + + const mmrdescriptorBuffer = MMRDescriptor.fromJson(mmrdescriptor); + const initialDescriptor = mmrdescriptorBuffer.toBuffer().toString('hex'); + const newDescriptor = new MMRDescriptor(); + + newDescriptor.fromBuffer(Buffer.from(initialDescriptor, 'hex')); + + expect(initialDescriptor).toStrictEqual(newDescriptor.toBuffer().toString('hex')); + expect(mmrdescriptor).toStrictEqual(newDescriptor.toJson()); + + }); + + test('serialize and deserialize an encrypted mmrdescriptor', async () => { + + const serializedDatadescriptor = "010501010549b00ad8606acbf5234700daa308a2c64c1f9466c11d47255a60f8ccf9c74ba82b994a03b9b0331bc6f1bf25bbc8b4453a130d65b6a9dc21f7589967e88e51d930682469b03873c54e7720d89d4a9333fe85519a447b886b6c6c8aabee6fb144e9742b76b745dbdfd83c9a0105808207c6db9c149dcaff5f502baf891642e67e7e303c0ba8130f2bff76d8247929bc7ce55fdf66bac03ea808006dc5e71aa12deaff355985c7770ee7a534d9cea2bfc10851ed5c91467083ffb1f746161f5d567b4be5c98d72300e1762697d5f62067d819ac0b35ac2c712c6e8e04cefaecaf759f38f4fa3ff4d3fc4d1dccbb6b820230df92c25958999741329ed3dafc7825900807cbf6b02becc236ce573158a4f0201057c97c0b93faab9462670a5a13da88d9ca796db968ae9c9f1b88df67c564b73cb63f752248402844522efaa62e5b42ce816d0a9f44ca14efaf6f7fe47d916e77b54266c5cac39c6771e899ebda093c566d33bbf60b4a598ea45bf2f5fb1f0cd782baaf092a880a799e0771144a9e9422eec107e43d23ba9386bb46dde0920d7a908ddf6f4d6261d25c62ca086bb3f570b07d74a59256feed13d64d6fbadd201057bd1ce7cab498d9a87bbf3c8d5f255cf209e87adf01f407751959f2d49f23056597a51240e90d5f758adc92e819f77f698fe754c9ea350c213dbcbffdaeb6d9a55bbaf705af9a375c855e7a8ca486bc65b1bd24c35e13f437a7490ecaffeff0323e7508a6cc4e36c5414b4cd7d3125ffabfa3fe85a56e4f6e539925b20822d2b817613d5eb5daf4893afc57289d0081f8fe225c77e1e4839aa0822b9a5" + const mmrdescriptor = { + "version": 1, + "objecthashtype": 5, + "mmrhashtype": 1, + "mmrroot": { + "version": 1, + "flags": 5, + "objectdata": "b00ad8606acbf5234700daa308a2c64c1f9466c11d47255a60f8ccf9c74ba82b994a03b9b0331bc6f1bf25bbc8b4453a130d65b6a9dc21f7589967e88e51d930682469b03873c54e77", + "epk": "d89d4a9333fe85519a447b886b6c6c8aabee6fb144e9742b76b745dbdfd83c9a" + }, + "mmrhashes": { + "version": 1, + "flags": 5, + "objectdata": "8207c6db9c149dcaff5f502baf891642e67e7e303c0ba8130f2bff76d8247929bc7ce55fdf66bac03ea808006dc5e71aa12deaff355985c7770ee7a534d9cea2bfc10851ed5c91467083ffb1f746161f5d567b4be5c98d72300e1762697d5f62067d819ac0b35ac2c712c6e8e04cefaecaf759f38f4fa3ff4d3fc4d1dccbb6b8", + "epk": "230df92c25958999741329ed3dafc7825900807cbf6b02becc236ce573158a4f" + }, + "datadescriptors": [ + { + "version": 1, + "flags": 5, + "objectdata": "97c0b93faab9462670a5a13da88d9ca796db968ae9c9f1b88df67c564b73cb63f752248402844522efaa62e5b42ce816d0a9f44ca14efaf6f7fe47d916e77b54266c5cac39c6771e899ebda093c566d33bbf60b4a598ea45bf2f5fb1f0cd782baaf092a880a799e0771144a9e9422eec107e43d23ba9386bb46dde09", + "epk": "d7a908ddf6f4d6261d25c62ca086bb3f570b07d74a59256feed13d64d6fbadd2" + }, + { + "version": 1, + "flags": 5, + "objectdata": "d1ce7cab498d9a87bbf3c8d5f255cf209e87adf01f407751959f2d49f23056597a51240e90d5f758adc92e819f77f698fe754c9ea350c213dbcbffdaeb6d9a55bbaf705af9a375c855e7a8ca486bc65b1bd24c35e13f437a7490ecaffeff0323e7508a6cc4e36c5414b4cd7d3125ffabfa3fe85a56e4f6e539925b", + "epk": "822d2b817613d5eb5daf4893afc57289d0081f8fe225c77e1e4839aa0822b9a5" + } + ] + } + const mmrdescriptorFromSerialized = new MMRDescriptor(); + const mmrdescriptorFromJson = MMRDescriptor.fromJson(mmrdescriptor); + + mmrdescriptorFromSerialized.fromBuffer(Buffer.from(serializedDatadescriptor, "hex")); + + const initialDescriptor = mmrdescriptorFromSerialized.toBuffer().toString('hex'); + const newDescriptor = mmrdescriptorFromJson.toBuffer().toString('hex'); + + expect(initialDescriptor).toStrictEqual(newDescriptor); + expect(mmrdescriptorFromJson.toJson()).toStrictEqual(mmrdescriptorFromSerialized.toJson()); + + + }); + + test('serialize and deserialize an encrypted mmrdescriptor', async () => { + + const mmrdescriptor = { + "version": 1, + "objecthashtype": 5, + "mmrhashtype": 1, + "mmrroot": { + "version": 1, + "flags": 5, + "objectdata": "b00ad8606acbf5234700daa308a2c64c1f9466c11d47255a60f8ccf9c74ba82b994a03b9b0331bc6f1bf25bbc8b4453a130d65b6a9dc21f7589967e88e51d930682469b03873c54e77", + "epk": "d89d4a9333fe85519a447b886b6c6c8aabee6fb144e9742b76b745dbdfd83c9a" + }, + "mmrhashes": { + "version": 1, + "flags": 5, + "objectdata": "8207c6db9c149dcaff5f502baf891642e67e7e303c0ba8130f2bff76d8247929bc7ce55fdf66bac03ea808006dc5e71aa12deaff355985c7770ee7a534d9cea2bfc10851ed5c91467083ffb1f746161f5d567b4be5c98d72300e1762697d5f62067d819ac0b35ac2c712c6e8e04cefaecaf759f38f4fa3ff4d3fc4d1dccbb6b8", + "epk": "230df92c25958999741329ed3dafc7825900807cbf6b02becc236ce573158a4f" + }, + "datadescriptors": [ + { + "version": 1, + "flags": 5, + "objectdata": "97c0b93faab9462670a5a13da88d9ca796db968ae9c9f1b88df67c564b73cb63f752248402844522efaa62e5b42ce816d0a9f44ca14efaf6f7fe47d916e77b54266c5cac39c6771e899ebda093c566d33bbf60b4a598ea45bf2f5fb1f0cd782baaf092a880a799e0771144a9e9422eec107e43d23ba9386bb46dde09", + "epk": "d7a908ddf6f4d6261d25c62ca086bb3f570b07d74a59256feed13d64d6fbadd2" + }, + { + "version": 1, + "flags": 5, + "objectdata": "d1ce7cab498d9a87bbf3c8d5f255cf209e87adf01f407751959f2d49f23056597a51240e90d5f758adc92e819f77f698fe754c9ea350c213dbcbffdaeb6d9a55bbaf705af9a375c855e7a8ca486bc65b1bd24c35e13f437a7490ecaffeff0323e7508a6cc4e36c5414b4cd7d3125ffabfa3fe85a56e4f6e539925b", + "epk": "822d2b817613d5eb5daf4893afc57289d0081f8fe225c77e1e4839aa0822b9a5" + } + ] + } + + const mmrdescriptorBuffer = MMRDescriptor.fromJson(mmrdescriptor); + const initialDescriptor = mmrdescriptorBuffer.toBuffer().toString('hex'); + const newDescriptor = new MMRDescriptor(); + + newDescriptor.fromBuffer(Buffer.from(initialDescriptor, 'hex')); + + expect(initialDescriptor).toStrictEqual(newDescriptor.toBuffer().toString('hex')); + expect(mmrdescriptor).toStrictEqual(newDescriptor.toJson()); + + }); + + test('serialize and deserialize an encrypted mmrdescriptor', async () => { + + const encryptedmmrdescriptor = { + "version": 1, + "objecthashtype": 5, + "mmrhashtype": 1, + "mmrroot": { + "version": 1, + "flags": 5, + "objectdata": "dec21b940a475989ac9220081ec3816a0026921594462841d2155a3d8462bdd8ada9f02cb7b795a01b842dce0a3c5bfe83e57fd46f34b19a67ee716a1e771264db1b7831cd2341a515", + "epk": "bdea4d6f2a88a954bed38de4ed6e7f6ff7d483fc799f1428be2ccfe6f27c87c9" + }, + "mmrhashes": { + "version": 1, + "flags": 5, + "objectdata": "8ad904b879fc67d7f0ceee8accd593549af8225d03772153465c666bb552eff607883d3d07f154a5515e167d9952feb7e3c121033e18ae855cdad782bc7ccbeb8e4737e9fdfcad31dc066695014e8aec572d4de728b8a1dedd740891ee848f85cc5eb16959761d89feafd78ac1e93494d08ea50311fa424c436bdb24b47ff369", + "epk": "7939e04d89b5713ad3a809ba4cedb4b320df8f380a8b5999e24ce4465fe43b18" + }, + "datadescriptors": [ + { + "version": 1, + "flags": 5, + "objectdata": "0e953a1bb2c81f2c101d9439736e9f614e1c289621dedfd4a0ff8455a36473c8023f4c8a35bdc546e8e48e17030cb7bc418ef248705f0873f3a1ce5674b800030294cace9b26d8d5cf06ac5a7a379be8c2a1d3e6643249312cfa83fbfe9f882a8f5cde0ddb4b940a53e5d4e69bacffa571b6e8eca218ee9d02b751c71426e8433aeabe6cf79e54495510626b5c43c690c47ca8770835", + "epk": "c7f2304a170a54dbb97951a93f7444cf689d487e46172f2f5e54923aefe8865e" + }, + { + "version": 1, + "flags": 5, + "objectdata": "05615e1c62f2a0b5311ec1d4e78d7709f3e29ac52e98a87c4222796ee532f457d0f68a4759464d0d7ea72c90177752d7ee179cfcb25d42ff4d19755650443c1f26490d80db903d28423fb38bd32f19f855f50e52b1e53529da16da8755cfc9857a4a4af1bc4327caa691633a79ef718bcf4547abf5d4cc1f26f5f6919711fc99f6de8e351726d828b534aa090bdcdc5987b117fe0c0b2e06", + "epk": "cf066d1ca66ea90a7a3de353e4a7db6fd4f88c7ae2eb47bcef9a78a0c8be6010" + } + ] + } + const mmrdescriptorBuffer = MMRDescriptor.fromJson(encryptedmmrdescriptor); + const initialDescriptor = mmrdescriptorBuffer.toBuffer().toString('hex'); + const newDescriptor = new MMRDescriptor(); + + newDescriptor.fromBuffer(Buffer.from(initialDescriptor, 'hex')); + + expect(initialDescriptor).toStrictEqual(newDescriptor.toBuffer().toString('hex')); + + }); +}); \ No newline at end of file diff --git a/src/api/classes/SignData/SignDataRequest.ts b/src/api/classes/SignData/SignDataRequest.ts index e3e9d92..2001812 100644 --- a/src/api/classes/SignData/SignDataRequest.ts +++ b/src/api/classes/SignData/SignDataRequest.ts @@ -1,8 +1,8 @@ import { ApiRequest } from "../../ApiRequest"; import { ApiPrimitiveJson, RequestParams } from "../../ApiPrimitive"; import { SIGN_DATA } from "../../../constants/cmds"; -import { DataDescriptor } from "../../../utils/types/DataDescriptor"; -import { SignData } from "../../../utils/types/SignData"; +import { DataDescriptorInfo } from "../../../utils/types/DataDescriptor"; +import { SignDataParameters } from "../../../utils/types/SignData"; export type SignDataArgs = { address?: string; @@ -12,7 +12,7 @@ export type SignDataArgs = { messsagebase64?: string; datahash?: string; vdxfdata?: string; - mmrdata?: Array; + mmrdata?: Array; mmrsalt?: Array; mmrhashtype?: string; priormmr?: Array; diff --git a/src/api/classes/SignData/SignDataResponse.ts b/src/api/classes/SignData/SignDataResponse.ts index 4e0a6a6..2e7b15f 100644 --- a/src/api/classes/SignData/SignDataResponse.ts +++ b/src/api/classes/SignData/SignDataResponse.ts @@ -1,16 +1,16 @@ import { ApiResponse } from "../../ApiResponse"; -import { Signature } from "../../../utils/types/Signature"; -import { mmrDescriptorParameters } from "../../../utils/types/MmrDescriptor"; -import { DataDescriptor } from "../../../utils/types/DataDescriptor"; +import { SignatureDataInfo } from "../../../utils/types/Signature"; +import { MmrDescriptorParameters } from "../../../utils/types/MmrDescriptor"; +import { DataDescriptorInfo } from "../../../utils/types/DataDescriptor"; export class SignDataResponse extends ApiResponse { result: { - mmrdescriptor_encrypted?: mmrDescriptorParameters; - mmrdescriptor?: mmrDescriptorParameters; + mmrdescriptor_encrypted?: MmrDescriptorParameters; + mmrdescriptor?: MmrDescriptorParameters; signature?: string; - signaturedata_encrypted?: DataDescriptor; + signaturedata_encrypted?: DataDescriptorInfo; signaturedata_ssk?: string; - signaturedata?: Signature; + signaturedata?: SignatureDataInfo; system?: string; systemid?: string; hashtype?: string; diff --git a/src/pbaas/CurrencyValueMap.ts b/src/pbaas/CurrencyValueMap.ts index 4b46bc5..494ea1c 100644 --- a/src/pbaas/CurrencyValueMap.ts +++ b/src/pbaas/CurrencyValueMap.ts @@ -81,7 +81,7 @@ export class CurrencyValueMap implements SerializableEntity { { for (let [key, value] of this.value_map) { - if (!key) + if (!key || (typeof(key) == 'string' && key.length == 0)) { return false; } diff --git a/src/pbaas/DataDescriptor.ts b/src/pbaas/DataDescriptor.ts index 8d8d12f..3dae895 100644 --- a/src/pbaas/DataDescriptor.ts +++ b/src/pbaas/DataDescriptor.ts @@ -314,9 +314,13 @@ export class DataDescriptor implements SerializableEntity { processedObject.fromBuffer(this.objectdata) - if (isText && typeof processedObject.values.get("") === 'string') { - - let objectDataUni = { message: Buffer.from(processedObject.values.get("") as string, 'hex').toString('utf-8') }; + if (isText && ((processedObject.values.get("") === "string") || Buffer.isBuffer(processedObject.values.get("")))) { + const objectDataUni = { message: ''}; + if(processedObject.values.get("") === "string") { + objectDataUni.message = processedObject.values.get("") as string; + } else { + objectDataUni.message = (processedObject.values.get("") as Buffer).toString('utf-8'); + } retval['objectdata'] = objectDataUni; } else { diff --git a/src/pbaas/MMR.ts b/src/pbaas/MMR.ts index f25b35c..4532883 100644 --- a/src/pbaas/MMR.ts +++ b/src/pbaas/MMR.ts @@ -47,38 +47,6 @@ export class MMRLayer { }; -//template -class OverlayNodeLayer { - - private nodeSource: UNDERLYING; - private vSize: number; - - constructor(NodeSource: UNDERLYING) { - this.nodeSource = NodeSource; - this.vSize = 0; - } - - size(): number { - return this.vSize; - } - - getIndex(idx: number): NODE_TYPE { - if (idx < this.vSize) { - let retval: NODE_TYPE; - return retval; - } - else { - throw new Error("COverlayNodeLayer [] index out of range"); - - } - } - - // node type must be moveable just to be passed here, but the default overlay has no control over the underlying storage - // and only tracks size changes - push_back(node: NODE_TYPE) { this.vSize++; } - clear() { this.vSize = 0; } - resize(newSize: number) { this.vSize = newSize; } -}; export class MMRNode { hash: Buffer; diff --git a/src/pbaas/MMRDescriptor.ts b/src/pbaas/MMRDescriptor.ts index c4adffe..a000bd1 100644 --- a/src/pbaas/MMRDescriptor.ts +++ b/src/pbaas/MMRDescriptor.ts @@ -129,7 +129,7 @@ export class MMRDescriptor implements SerializableEntity { return reader.offset; } - HasData(): boolean { + hasData(): boolean { return !!(this.mmrHashes.objectdata && this.dataDescriptors); } diff --git a/src/pbaas/VdxfUniValue.ts b/src/pbaas/VdxfUniValue.ts index 647561d..d3d92fc 100644 --- a/src/pbaas/VdxfUniValue.ts +++ b/src/pbaas/VdxfUniValue.ts @@ -649,7 +649,7 @@ export class VdxfUniValue implements SerializableEntity { } toJson(): VdxfUniValueJson { - const ret = {}; + let ret = {}; for (const key of this.values.keys()) { if (key === "") { @@ -665,6 +665,10 @@ export class VdxfUniValue implements SerializableEntity { } } + if (ret && ret[""] && Object.keys(ret).length == 1) { + ret = ret[""]; + } + return ret; } diff --git a/src/utils/IdentityData.ts b/src/utils/IdentityData.ts index a006c5c..9c8d2b5 100644 --- a/src/utils/IdentityData.ts +++ b/src/utils/IdentityData.ts @@ -1,173 +1,167 @@ import * as identitykeys from '../vdxf/identitydatakeys'; import * as keylist from '../vdxf/keys'; -import * as VDXF_Data from '../vdxf/vdxfdatakeys'; -export const getFriendlyNameForVdxfKey = (vdxfkey) => { +const IMPLEMENTED_LOCALES = ['EN']; - if (vdxfkey in IdentityVdxfidMap) { +export const getFriendlyNameForVdxfKey = (vdxfkey: string, locale = 'EN') => { - return IdentityVdxfidMap[vdxfkey].name; + if (!IMPLEMENTED_LOCALES.includes(locale)) { + throw new Error(locale + " is not implemented"); + } + + if (vdxfkey in IdentityVdxfidMap[locale]) { + + return IdentityVdxfidMap[vdxfkey][locale]; } else { throw new Error("Unknown VDXF key"); } } -export const getIdentityDataTypeForVdxfKey = (vdxfkey) => { - - if (vdxfkey in IdentityVdxfidMap) { - - return IdentityVdxfidMap[vdxfkey].type; - - } else { - throw new Error("Unknown VDXF key"); - } - } - export const IdentityVdxfidMap = { - [identitykeys.IDENTITY_FIRSTNAME.vdxfid]: { name: "First Name", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_LASTNAME.vdxfid]: { name: "Last Name", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_NATIONALITY.vdxfid]: { name: "Nationality", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_ATTESTOR.vdxfid]: { name: "Attestor ID", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_ATTESTATION_RECIPIENT.vdxfid]: { name: "Attestation Recipient", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_PHONENUMBER.vdxfid]: { name: "Phone Number", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_DATEOFBIRTH.vdxfid]: { name: "Date of Birth", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_OVER18.vdxfid]: { name: "Over 18", type: VDXF_Data.DataByteKeyName }, - [identitykeys.IDENTITY_OVER21.vdxfid]: { name: "Over 21", type: VDXF_Data.DataByteKeyName }, - [identitykeys.IDENTITY_OVER25.vdxfid]: { name: "Over 25", type: VDXF_Data.DataByteKeyName }, - [identitykeys.IDENTITY_EMAIL.vdxfid]: { name: "Email Address", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_HOMEADDRESS.vdxfid]: { name: "Home address", type: VDXF_Data.DataUint160Key }, - [identitykeys.IDENTITY_HOMEADDRESS_STREET1.vdxfid]: { name: "Street 1", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_HOMEADDRESS_STREET2.vdxfid]: { name: "Street 2", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_HOMEADDRESS_CITY.vdxfid]: { name: "City", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_HOMEADDRESS_REGION.vdxfid]: { name: "Region", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_HOMEADDRESS_POSTCODE.vdxfid]: { name: "Post Code", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_HOMEADDRESS_COUNTRY.vdxfid]: { name: "Country", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_IDNUMBER_VALUE.vdxfid]: { name: "ID Number", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_IDNUMBER_TYPE.vdxfid]: { name: "ID Type", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_VERIFICATION_STATUS.vdxfid]: { name: "Verification Status", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_ACCEPTEDTOS.vdxfid]: { name: "Accepted Terms and Conditions", type: VDXF_Data.DataByteKeyName }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_VERIFIEDSMS.vdxfid]: { name: "SMS Verified", type: VDXF_Data.DataByteKeyName }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_KYCCHECKED.vdxfid]: { name: "KYC Checked ok", type: VDXF_Data.DataByteKeyName }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_DOCUMENTSVERIFIED.vdxfid]: { name: "Documents Verified", type: VDXF_Data.DataByteKeyName }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_SELFIECHECKED.vdxfid]: { name: "Selfie Checked", type: VDXF_Data.DataByteKeyName }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_WATCHLISTOK.vdxfid]: { name: "Watchlist ok", type: VDXF_Data.DataByteKeyName }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Riskcheck ok", type: VDXF_Data.DataByteKeyName }, - [identitykeys.IDENTITY_DRIVINGLICENCE.vdxfid]: { name: "Driving Licence", type: VDXF_Data.DataUint160Key }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ORIGINALFRONT.vdxfid]: { name: "Driving Licence Front", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ORIGINALBACK.vdxfid]: { name: "Driving Licence Back", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_DRIVINGLICENCE_CROPPEDFRONT.vdxfid]: { name: "Driving Licence Front", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_DRIVINGLICENCE_CROPPEDBACK.vdxfid]: { name: "Driving Licence Back", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_DRIVINGLICENCE_FACE.vdxfid]: { name: "Driving Licence Face", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_DRIVINGLICENCE_IDNUMBER.vdxfid]: { name: "Driving Licence Number", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_DRIVINGLICENCE_CATEGORY.vdxfid]: { name: "Driving Licence Catagory", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_DRIVINGLICENCE_EXPIRATIONDATE.vdxfid]: { name: "Driving Licence expiry date", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ISSUINGCOUNTRY.vdxfid]: { name: "Driving Licence issuing country", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ISSUINGREGION.vdxfid]: { name: "Driving Licence issuing region", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_DRIVINGLICENCE_DATEOFBIRTH.vdxfid]: { name: "Driving Licence Date of Birth", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_STREET1.vdxfid]: { name: "Driving Licence Street 1", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_CITY.vdxfid]: { name: "Driving Licence City", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_REGION.vdxfid]: { name: "Driving Licence Region", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_POSTCODE.vdxfid]: { name: "Driving Licence ZIP/Post Code", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_COUNTRY.vdxfid]: { name: "Driving Licence Country", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_SELFIECHECK_IMAGE.vdxfid]: { name: "Selfie Check image", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_SELFIECHECK_VIDEO.vdxfid]: { name: "Selfie Check video", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK.vdxfid]: { name: "Risk Check Ok", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_EMAIL_ISDELIVERABLE.vdxfid]: { name: "Email address is deliverable", type: VDXF_Data.DataByteKeyName }, - [identitykeys.IDENTITY_EMAIL_BREACHCOUNT.vdxfid]: { name: "Email breach count", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_EMAIL_FIRSTBREACHEDAT.vdxfid]: { name: "Email first breach date", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_EMAIL_LASTBREACHEDAT.vdxfid]: { name: "Email last breach date", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_EMAIL_DOMAIN_REGISTEREDAT.vdxfid]: { name: "Email domain registered at", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_EMAIL_DOMAIN_FREEPROVIDER.vdxfid]: { name: "Email is free provider", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_EMAIL_DOMAIN_CUSTOM.vdxfid]: { name: "Email Domain is custom", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_EMAIL_DOMAIN_DISPOSABLE.vdxfid]: { name: "Email Domain Disposable", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS.vdxfid]: { name: "Email top level Domain Suspicious", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_IDCARD.vdxfid]: { name: "ID Card", type: VDXF_Data.DataUint160Key }, - [identitykeys.IDENTITY_IDCARD_ORIGINALFRONT.vdxfid]: { name: "ID Card Front", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_IDCARD_ORIGINALBACK.vdxfid]: { name: "ID Card Back", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_IDCARD_CROPPEDFRONT.vdxfid]: { name: "ID Card Front", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_IDCARD_CROPPEDBACK.vdxfid]: { name: "ID Card Back", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_IDCARD_FACE.vdxfid]: { name: "ID Card Face", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_IDCARD_IDNUMBER.vdxfid]: { name: "ID Card ID Number", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_IDCARD_CATEGORY.vdxfid]: { name: "ID Card Category", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_IDCARD_EXPIRATIONDATE.vdxfid]: { name: "ID Card Expiry date", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_IDCARD_ISSUINGREGION.vdxfid]: { name: "ID Card Issuing Region", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_IDCARD_DATEOFBIRTH.vdxfid]: { name: "ID Card Date of Birth", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_IDCARD_ADDRESS_STREET1.vdxfid]: { name: "ID Card Street 1", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_IDCARD_ADDRESS_CITY.vdxfid]: { name: "ID Card City", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_IDCARD_ADDRESS_REGION.vdxfid]: { name: "ID Card Region", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_IDCARD_ADDRESS_POSTCODE.vdxfid]: { name: "ID Card Zip/Post Code", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_IDCARD_ADDRESS_COUNTRY.vdxfid]: { name: "ID Card Country", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_PASSPORT.vdxfid]: { name: "Passport", type: VDXF_Data.DataUint160Key }, - [identitykeys.IDENTITY_PASSPORT_ORIGINALFRONT.vdxfid]: { name: "Passport front", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_PASSPORT_ORIGINALBACK.vdxfid]: { name: "Passport back", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_PASSPORT_CROPPEDFRONT.vdxfid]: { name: "Passport front", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_PASSPORT_CROPPEDBACK.vdxfid]: { name: "Passport back", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_PASSPORT_FACE.vdxfid]: { name: "Passport face", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_PASSPORT_IDNUMBER.vdxfid]: { name: "Passport ID Number", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_PASSPORT_CATEGORY.vdxfid]: { name: "Passport Category", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_PASSPORT_EXPIRATIONDATE.vdxfid]: { name: "Passport expiry date", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_PASSPORT_DATEOFBIRTH.vdxfid]: { name: "Passport date of birth", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_PASSPORT_ADDRESS_STREET1.vdxfid]: { name: "Passport street 1", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_PASSPORT_ADDRESS_CITY.vdxfid]: { name: "Passport city", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_PASSPORT_ADDRESS_REGION.vdxfid]: { name: "Passport region", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_PASSPORT_ADDRESS_POSTCODE.vdxfid]: { name: "Passport zip/post code", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_PASSPORT_ADDRESS_COUNTRY.vdxfid]: { name: "Passport country", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENCEPERMIT.vdxfid]: { name: "Residence Permit", type: VDXF_Data.DataUint160Key }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ORIGINALFRONT.vdxfid]: { name: "Residence Permit front", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ORIGINALBACK.vdxfid]: { name: "Residence Permit back", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_CROPPEDFRONT.vdxfid]: { name: "Residence Permit front", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_CROPPEDBACK.vdxfid]: { name: "Residence Permit back", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_FACE.vdxfid]: { name: "Residence Permit face", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_IDNUMBER.vdxfid]: { name: "Residence Permit ID Number", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_CATEGORY.vdxfid]: { name: "Residence Permit category", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_EXPIRATIONDATE.vdxfid]: { name: "Residence Permit expiry date", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ISSUINGREGION.vdxfid]: { name: "Residence Permit issuing region", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_DATEOFBIRTH.vdxfid]: { name: "Residence Permit date of birth", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS.vdxfid]: { name: "Residence Permit Address", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_STREET1.vdxfid]: { name: "Residence Permit Street 1", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_CITY.vdxfid]: { name: "Residence Permit City", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_REGION.vdxfid]: { name: "Residence Permit Region", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_POSTCODE.vdxfid]: { name: "Residence Permit Zip/Post code", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_COUNTRY.vdxfid]: { name: "Residence Permit Country", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENTCARD.vdxfid]: { name: "Resident Card", type: VDXF_Data.DataUint160Key }, - [identitykeys.IDENTITY_RESIDENTCARD_ORIGINALFRONT.vdxfid]: { name: "Resident Card Front", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_RESIDENTCARD_ORIGINALBACK.vdxfid]: { name: "Resident Card Back", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_RESIDENTCARD_CROPPEDFRONT.vdxfid]: { name: "Resident Card Front", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_RESIDENTCARD_CROPPEDBACK.vdxfid]: { name: "Resident Card Back", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_RESIDENTCARD_FACE.vdxfid]: { name: "Resident Card Face", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_RESIDENTCARD_IDNUMBER.vdxfid]: { name: "Resident Card ID Number", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENTCARD_CATEGORY.vdxfid]: { name: "Resident Card Category", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENTCARD_EXPIRATIONDATE.vdxfid]: { name: "Resident Card Expiry Date", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENTCARD_ISSUINGREGION.vdxfid]: { name: "Resident Card Issuing Region", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENTCARD_DATEOFBIRTH.vdxfid]: { name: "Resident Card date of birth", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_STREET1.vdxfid]: { name: "Resident Card Street 1", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_CITY.vdxfid]: { name: "Resident Card City", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_REGION.vdxfid]: { name: "Resident Card Region", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_POSTCODE.vdxfid]: { name: "Resident Card Zip/Post Code", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_COUNTRY.vdxfid]: { name: "Resident Card Country", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_VISA.vdxfid]: { name: "Visa", type: VDXF_Data.DataUint160Key }, - [identitykeys.IDENTITY_VISA_ORIGINALFRONT.vdxfid]: { name: "Visa front", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_VISA_ORIGINALBACK.vdxfid]: { name: "Visa back", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_VISA_CROPPEDFRONT.vdxfid]: { name: "Visa front", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_VISA_CROPPEDBACK.vdxfid]: { name: "Visa back", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_VISA_FACE.vdxfid]: { name: "Visa face", type: VDXF_Data.DataURLKeyName }, - [identitykeys.IDENTITY_VISA_IDNUMBER.vdxfid]: { name: "Visa ID Number", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_VISA_CATEGORY.vdxfid]: { name: "Visa Category", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_VISA_EXPIRATIONDATE.vdxfid]: { name: "Visa expiry date", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_VISA_ISSUINGREGION.vdxfid]: { name: "Visa issuing region", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_VISA_DATEOFBIRTH.vdxfid]: { name: "Visa date of birth", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_VISA_ADDRESS_STREET1.vdxfid]: { name: "Visa Street 1", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_VISA_ADDRESS_CITY.vdxfid]: { name: "Visa City", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_VISA_ADDRESS_REGION.vdxfid]: { name: "Visa Region", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_VISA_ADDRESS_POSTCODE.vdxfid]: { name: "Visa Zip/Post Code", type: VDXF_Data.DataStringKey }, - [identitykeys.IDENTITY_VISA_ADDRESS_COUNTRY.vdxfid]: { name: "Visa Country", type: VDXF_Data.DataStringKey }, - [keylist.ATTESTATION_PROVISION_TYPE.vdxfid]: { name: "Attestation Type", type: VDXF_Data.DataStringKey }, - [keylist.ATTESTATION_PROVISION_URL.vdxfid]: { name: "Attestation URL", type: VDXF_Data.DataURLKeyName }, - [keylist.ATTESTATION_VIEW_RESPONSE.vdxfid]: { name: "Attestation View Response", type: VDXF_Data.DataStringKey}, - [keylist.ATTESTATION_VIEW_REQUEST.vdxfid]: { name: "Attestation View Response", type: VDXF_Data.DataStringKey}, - [keylist.PROFILE_DATA_VIEW_REQUEST.vdxfid]: { name: "Profile Data View Request", type: VDXF_Data.DataStringKey}, - [keylist.IDENTITY_SIGNDATA_REQUEST.vdxfid]: { name: "Identity Sign Data Request", type: VDXF_Data.DataStringKey}, + [identitykeys.IDENTITY_FIRSTNAME.vdxfid]: { EN: "First Name"}, + [identitykeys.IDENTITY_LASTNAME.vdxfid]: { EN: "Last Name"}, + [identitykeys.IDENTITY_NATIONALITY.vdxfid]: { EN: "Nationality"}, + [identitykeys.IDENTITY_ATTESTOR.vdxfid]: { EN: "Attestor ID"}, + [identitykeys.IDENTITY_ATTESTATION_RECIPIENT.vdxfid]: { EN: "Attestation Recipient"}, + [identitykeys.IDENTITY_PHONENUMBER.vdxfid]: { EN: "Phone Number"}, + [identitykeys.IDENTITY_DATEOFBIRTH.vdxfid]: { EN: "Date of Birth"}, + [identitykeys.IDENTITY_OVER18.vdxfid]: { EN: "Over 18"}, + [identitykeys.IDENTITY_OVER21.vdxfid]: { EN: "Over 21"}, + [identitykeys.IDENTITY_OVER25.vdxfid]: { EN: "Over 25"}, + [identitykeys.IDENTITY_EMAIL.vdxfid]: { EN: "Email Address"}, + [identitykeys.IDENTITY_HOMEADDRESS.vdxfid]: { EN: "Home address"}, + [identitykeys.IDENTITY_HOMEADDRESS_STREET1.vdxfid]: { EN: "Street 1"}, + [identitykeys.IDENTITY_HOMEADDRESS_STREET2.vdxfid]: { EN: "Street 2"}, + [identitykeys.IDENTITY_HOMEADDRESS_CITY.vdxfid]: { EN: "City"}, + [identitykeys.IDENTITY_HOMEADDRESS_REGION.vdxfid]: { EN: "Region"}, + [identitykeys.IDENTITY_HOMEADDRESS_POSTCODE.vdxfid]: { EN: "Post Code"}, + [identitykeys.IDENTITY_HOMEADDRESS_COUNTRY.vdxfid]: { EN: "Country"}, + [identitykeys.IDENTITY_IDNUMBER_VALUE.vdxfid]: { EN: "ID Number"}, + [identitykeys.IDENTITY_IDNUMBER_TYPE.vdxfid]: { EN: "ID Type"}, + [identitykeys.IDENTITY_VERIFICATION_STATUS.vdxfid]: { EN: "Verification Status"}, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_ACCEPTEDTOS.vdxfid]: { EN: "Accepted Terms and Conditions"}, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_VERIFIEDSMS.vdxfid]: { EN: "SMS Verified"}, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_KYCCHECKED.vdxfid]: { EN: "KYC Checked ok"}, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_DOCUMENTSVERIFIED.vdxfid]: { EN: "Documents Verified"}, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_SELFIECHECKED.vdxfid]: { EN: "Selfie Checked"}, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_WATCHLISTOK.vdxfid]: { EN: "Watchlist ok"}, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK.vdxfid]: { EN: "Riskcheck ok"}, + [identitykeys.IDENTITY_DRIVINGLICENCE.vdxfid]: { EN: "Driving Licence"}, + [identitykeys.IDENTITY_DRIVINGLICENCE_ORIGINALFRONT.vdxfid]: { EN: "Driving Licence Front"}, + [identitykeys.IDENTITY_DRIVINGLICENCE_ORIGINALBACK.vdxfid]: { EN: "Driving Licence Back"}, + [identitykeys.IDENTITY_DRIVINGLICENCE_CROPPEDFRONT.vdxfid]: { EN: "Driving Licence Front"}, + [identitykeys.IDENTITY_DRIVINGLICENCE_CROPPEDBACK.vdxfid]: { EN: "Driving Licence Back"}, + [identitykeys.IDENTITY_DRIVINGLICENCE_FACE.vdxfid]: { EN: "Driving Licence Face"}, + [identitykeys.IDENTITY_DRIVINGLICENCE_IDNUMBER.vdxfid]: { EN: "Driving Licence Number"}, + [identitykeys.IDENTITY_DRIVINGLICENCE_CATEGORY.vdxfid]: { EN: "Driving Licence Catagory"}, + [identitykeys.IDENTITY_DRIVINGLICENCE_EXPIRATIONDATE.vdxfid]: { EN: "Driving Licence expiry date"}, + [identitykeys.IDENTITY_DRIVINGLICENCE_ISSUINGCOUNTRY.vdxfid]: { EN: "Driving Licence issuing country"}, + [identitykeys.IDENTITY_DRIVINGLICENCE_ISSUINGREGION.vdxfid]: { EN: "Driving Licence issuing region"}, + [identitykeys.IDENTITY_DRIVINGLICENCE_DATEOFBIRTH.vdxfid]: { EN: "Driving Licence Date of Birth"}, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_STREET1.vdxfid]: { EN: "Driving Licence Street 1"}, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_CITY.vdxfid]: { EN: "Driving Licence City"}, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_REGION.vdxfid]: { EN: "Driving Licence Region"}, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_POSTCODE.vdxfid]: { EN: "Driving Licence ZIP/Post Code"}, + [identitykeys.IDENTITY_DRIVINGLICENCE_ADDRESS_COUNTRY.vdxfid]: { EN: "Driving Licence Country"}, + [identitykeys.IDENTITY_SELFIECHECK_IMAGE.vdxfid]: { EN: "Selfie Check image"}, + [identitykeys.IDENTITY_SELFIECHECK_VIDEO.vdxfid]: { EN: "Selfie Check video"}, + [identitykeys.IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK.vdxfid]: { EN: "Risk Check Ok"}, + [identitykeys.IDENTITY_EMAIL_ISDELIVERABLE.vdxfid]: { EN: "Email address is deliverable"}, + [identitykeys.IDENTITY_EMAIL_BREACHCOUNT.vdxfid]: { EN: "Email breach count"}, + [identitykeys.IDENTITY_EMAIL_FIRSTBREACHEDAT.vdxfid]: { EN: "Email first breach date"}, + [identitykeys.IDENTITY_EMAIL_LASTBREACHEDAT.vdxfid]: { EN: "Email last breach date"}, + [identitykeys.IDENTITY_EMAIL_DOMAIN_REGISTEREDAT.vdxfid]: { EN: "Email domain registered at"}, + [identitykeys.IDENTITY_EMAIL_DOMAIN_FREEPROVIDER.vdxfid]: { EN: "Email is free provider"}, + [identitykeys.IDENTITY_EMAIL_DOMAIN_CUSTOM.vdxfid]: { EN: "Email Domain is custom"}, + [identitykeys.IDENTITY_EMAIL_DOMAIN_DISPOSABLE.vdxfid]: { EN: "Email Domain Disposable"}, + [identitykeys.IDENTITY_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS.vdxfid]: { EN: "Email top level Domain Suspicious"}, + [identitykeys.IDENTITY_IDCARD.vdxfid]: { EN: "ID Card"}, + [identitykeys.IDENTITY_IDCARD_ORIGINALFRONT.vdxfid]: { EN: "ID Card Front"}, + [identitykeys.IDENTITY_IDCARD_ORIGINALBACK.vdxfid]: { EN: "ID Card Back"}, + [identitykeys.IDENTITY_IDCARD_CROPPEDFRONT.vdxfid]: { EN: "ID Card Front"}, + [identitykeys.IDENTITY_IDCARD_CROPPEDBACK.vdxfid]: { EN: "ID Card Back"}, + [identitykeys.IDENTITY_IDCARD_FACE.vdxfid]: { EN: "ID Card Face"}, + [identitykeys.IDENTITY_IDCARD_IDNUMBER.vdxfid]: { EN: "ID Card ID Number"}, + [identitykeys.IDENTITY_IDCARD_CATEGORY.vdxfid]: { EN: "ID Card Category"}, + [identitykeys.IDENTITY_IDCARD_EXPIRATIONDATE.vdxfid]: { EN: "ID Card Expiry date"}, + [identitykeys.IDENTITY_IDCARD_ISSUINGREGION.vdxfid]: { EN: "ID Card Issuing Region"}, + [identitykeys.IDENTITY_IDCARD_DATEOFBIRTH.vdxfid]: { EN: "ID Card Date of Birth"}, + [identitykeys.IDENTITY_IDCARD_ADDRESS_STREET1.vdxfid]: { EN: "ID Card Street 1"}, + [identitykeys.IDENTITY_IDCARD_ADDRESS_CITY.vdxfid]: { EN: "ID Card City"}, + [identitykeys.IDENTITY_IDCARD_ADDRESS_REGION.vdxfid]: { EN: "ID Card Region"}, + [identitykeys.IDENTITY_IDCARD_ADDRESS_POSTCODE.vdxfid]: { EN: "ID Card Zip/Post Code"}, + [identitykeys.IDENTITY_IDCARD_ADDRESS_COUNTRY.vdxfid]: { EN: "ID Card Country"}, + [identitykeys.IDENTITY_PASSPORT.vdxfid]: { EN: "Passport"}, + [identitykeys.IDENTITY_PASSPORT_ORIGINALFRONT.vdxfid]: { EN: "Passport front"}, + [identitykeys.IDENTITY_PASSPORT_ORIGINALBACK.vdxfid]: { EN: "Passport back"}, + [identitykeys.IDENTITY_PASSPORT_CROPPEDFRONT.vdxfid]: { EN: "Passport front"}, + [identitykeys.IDENTITY_PASSPORT_CROPPEDBACK.vdxfid]: { EN: "Passport back"}, + [identitykeys.IDENTITY_PASSPORT_FACE.vdxfid]: { EN: "Passport face"}, + [identitykeys.IDENTITY_PASSPORT_IDNUMBER.vdxfid]: { EN: "Passport ID Number"}, + [identitykeys.IDENTITY_PASSPORT_CATEGORY.vdxfid]: { EN: "Passport Category"}, + [identitykeys.IDENTITY_PASSPORT_EXPIRATIONDATE.vdxfid]: { EN: "Passport expiry date"}, + [identitykeys.IDENTITY_PASSPORT_DATEOFBIRTH.vdxfid]: { EN: "Passport date of birth"}, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_STREET1.vdxfid]: { EN: "Passport street 1"}, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_CITY.vdxfid]: { EN: "Passport city"}, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_REGION.vdxfid]: { EN: "Passport region"}, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_POSTCODE.vdxfid]: { EN: "Passport zip/post code"}, + [identitykeys.IDENTITY_PASSPORT_ADDRESS_COUNTRY.vdxfid]: { EN: "Passport country"}, + [identitykeys.IDENTITY_RESIDENCEPERMIT.vdxfid]: { EN: "Residence Permit"}, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ORIGINALFRONT.vdxfid]: { EN: "Residence Permit front"}, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ORIGINALBACK.vdxfid]: { EN: "Residence Permit back"}, + [identitykeys.IDENTITY_RESIDENCEPERMIT_CROPPEDFRONT.vdxfid]: { EN: "Residence Permit front"}, + [identitykeys.IDENTITY_RESIDENCEPERMIT_CROPPEDBACK.vdxfid]: { EN: "Residence Permit back"}, + [identitykeys.IDENTITY_RESIDENCEPERMIT_FACE.vdxfid]: { EN: "Residence Permit face"}, + [identitykeys.IDENTITY_RESIDENCEPERMIT_IDNUMBER.vdxfid]: { EN: "Residence Permit ID Number"}, + [identitykeys.IDENTITY_RESIDENCEPERMIT_CATEGORY.vdxfid]: { EN: "Residence Permit category"}, + [identitykeys.IDENTITY_RESIDENCEPERMIT_EXPIRATIONDATE.vdxfid]: { EN: "Residence Permit expiry date"}, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ISSUINGREGION.vdxfid]: { EN: "Residence Permit issuing region"}, + [identitykeys.IDENTITY_RESIDENCEPERMIT_DATEOFBIRTH.vdxfid]: { EN: "Residence Permit date of birth"}, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS.vdxfid]: { EN: "Residence Permit Address"}, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_STREET1.vdxfid]: { EN: "Residence Permit Street 1"}, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_CITY.vdxfid]: { EN: "Residence Permit City"}, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_REGION.vdxfid]: { EN: "Residence Permit Region"}, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_POSTCODE.vdxfid]: { EN: "Residence Permit Zip/Post code"}, + [identitykeys.IDENTITY_RESIDENCEPERMIT_ADDRESS_COUNTRY.vdxfid]: { EN: "Residence Permit Country"}, + [identitykeys.IDENTITY_RESIDENTCARD.vdxfid]: { EN: "Resident Card"}, + [identitykeys.IDENTITY_RESIDENTCARD_ORIGINALFRONT.vdxfid]: { EN: "Resident Card Front"}, + [identitykeys.IDENTITY_RESIDENTCARD_ORIGINALBACK.vdxfid]: { EN: "Resident Card Back"}, + [identitykeys.IDENTITY_RESIDENTCARD_CROPPEDFRONT.vdxfid]: { EN: "Resident Card Front"}, + [identitykeys.IDENTITY_RESIDENTCARD_CROPPEDBACK.vdxfid]: { EN: "Resident Card Back"}, + [identitykeys.IDENTITY_RESIDENTCARD_FACE.vdxfid]: { EN: "Resident Card Face"}, + [identitykeys.IDENTITY_RESIDENTCARD_IDNUMBER.vdxfid]: { EN: "Resident Card ID Number"}, + [identitykeys.IDENTITY_RESIDENTCARD_CATEGORY.vdxfid]: { EN: "Resident Card Category"}, + [identitykeys.IDENTITY_RESIDENTCARD_EXPIRATIONDATE.vdxfid]: { EN: "Resident Card Expiry Date"}, + [identitykeys.IDENTITY_RESIDENTCARD_ISSUINGREGION.vdxfid]: { EN: "Resident Card Issuing Region"}, + [identitykeys.IDENTITY_RESIDENTCARD_DATEOFBIRTH.vdxfid]: { EN: "Resident Card date of birth"}, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_STREET1.vdxfid]: { EN: "Resident Card Street 1"}, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_CITY.vdxfid]: { EN: "Resident Card City"}, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_REGION.vdxfid]: { EN: "Resident Card Region"}, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_POSTCODE.vdxfid]: { EN: "Resident Card Zip/Post Code"}, + [identitykeys.IDENTITY_RESIDENTCARD_ADDRESS_COUNTRY.vdxfid]: { EN: "Resident Card Country"}, + [identitykeys.IDENTITY_VISA.vdxfid]: { EN: "Visa"}, + [identitykeys.IDENTITY_VISA_ORIGINALFRONT.vdxfid]: { EN: "Visa front"}, + [identitykeys.IDENTITY_VISA_ORIGINALBACK.vdxfid]: { EN: "Visa back"}, + [identitykeys.IDENTITY_VISA_CROPPEDFRONT.vdxfid]: { EN: "Visa front"}, + [identitykeys.IDENTITY_VISA_CROPPEDBACK.vdxfid]: { EN: "Visa back"}, + [identitykeys.IDENTITY_VISA_FACE.vdxfid]: { EN: "Visa face"}, + [identitykeys.IDENTITY_VISA_IDNUMBER.vdxfid]: { EN: "Visa ID Number"}, + [identitykeys.IDENTITY_VISA_CATEGORY.vdxfid]: { EN: "Visa Category"}, + [identitykeys.IDENTITY_VISA_EXPIRATIONDATE.vdxfid]: { EN: "Visa expiry date"}, + [identitykeys.IDENTITY_VISA_ISSUINGREGION.vdxfid]: { EN: "Visa issuing region"}, + [identitykeys.IDENTITY_VISA_DATEOFBIRTH.vdxfid]: { EN: "Visa date of birth"}, + [identitykeys.IDENTITY_VISA_ADDRESS_STREET1.vdxfid]: { EN: "Visa Street 1"}, + [identitykeys.IDENTITY_VISA_ADDRESS_CITY.vdxfid]: { EN: "Visa City"}, + [identitykeys.IDENTITY_VISA_ADDRESS_REGION.vdxfid]: { EN: "Visa Region"}, + [identitykeys.IDENTITY_VISA_ADDRESS_POSTCODE.vdxfid]: { EN: "Visa Zip/Post Code"}, + [identitykeys.IDENTITY_VISA_ADDRESS_COUNTRY.vdxfid]: { EN: "Visa Country"}, + [keylist.ATTESTATION_PROVISION_TYPE.vdxfid]: { EN: "Attestation Type"}, + [keylist.ATTESTATION_PROVISION_URL.vdxfid]: { EN: "Attestation URL"}, + [keylist.ATTESTATION_VIEW_RESPONSE.vdxfid]: { EN: "Attestation View Response"}, + [keylist.ATTESTATION_VIEW_REQUEST.vdxfid]: { EN: "Attestation View Response"}, + [keylist.PROFILE_DATA_VIEW_REQUEST.vdxfid]: { EN: "Profile Data View Request"}, + [keylist.IDENTITY_SIGNDATA_REQUEST.vdxfid]: { EN: "Identity Sign Data Request"} }; diff --git a/src/utils/types/DataDescriptor.ts b/src/utils/types/DataDescriptor.ts index 729767f..2e71cff 100644 --- a/src/utils/types/DataDescriptor.ts +++ b/src/utils/types/DataDescriptor.ts @@ -1,5 +1,5 @@ -export type DataDescriptor = { +export type DataDescriptorInfo = { version?: number, flags?: number, objectdata?: string, diff --git a/src/utils/types/MmrDescriptor.ts b/src/utils/types/MmrDescriptor.ts index 284292b..72ba1cb 100644 --- a/src/utils/types/MmrDescriptor.ts +++ b/src/utils/types/MmrDescriptor.ts @@ -1,10 +1,10 @@ -import { DataDescriptor } from './DataDescriptor'; +import { DataDescriptorInfo } from './DataDescriptor'; -export type mmrDescriptorParameters = { +export type MmrDescriptorParameters = { version?: number; objecthashtype?: number; mmrhashtype?: number; - mmrroot?: DataDescriptor; - mmrhashes?: DataDescriptor; - datadescriptors?: DataDescriptor[]; + mmrroot?: DataDescriptorInfo; + mmrhashes?: DataDescriptorInfo; + datadescriptors?: DataDescriptorInfo[]; } diff --git a/src/utils/types/SignData.ts b/src/utils/types/SignData.ts index d6cdcea..a3870aa 100644 --- a/src/utils/types/SignData.ts +++ b/src/utils/types/SignData.ts @@ -1,4 +1,4 @@ -export type SignData = { +export type SignDataParameters = { filename?: string; message?: string; messagehex?: string; diff --git a/src/utils/types/Signature.ts b/src/utils/types/Signature.ts index 22b3e67..9e4ba5c 100644 --- a/src/utils/types/Signature.ts +++ b/src/utils/types/Signature.ts @@ -1,4 +1,4 @@ -export type Signature = { +export type SignatureDataInfo = { version: number; systemid: string; hashtype: number; From b6c596d4f035c833f2551472e5eda22524d42223 Mon Sep 17 00:00:00 2001 From: Monkins1010 Date: Thu, 10 Oct 2024 09:28:58 +0100 Subject: [PATCH 114/120] Tests updates --- src/__tests__/attestation/attestation.test.ts | 4 ++-- .../attestation/personalInfo.test.ts | 22 ----------------- src/__tests__/pbaas/dataDescriptor.test.ts | 24 +++++++++++++++++++ 3 files changed, 26 insertions(+), 24 deletions(-) diff --git a/src/__tests__/attestation/attestation.test.ts b/src/__tests__/attestation/attestation.test.ts index 6864315..c7f730a 100644 --- a/src/__tests__/attestation/attestation.test.ts +++ b/src/__tests__/attestation/attestation.test.ts @@ -34,8 +34,8 @@ describe('Serializes and deserializes attestation request', () => { challenge: { challenge_id: "iMqzCkWdebC19xbjkLfVdDkkGP9Ni1oxoN", requested_access: [ - new RequestedPermission(IDENTITY_VIEW.vdxfid, [IDENTITY_PERSONALDETAILS.vdxfid, IDENTITY_CONTACTDETAILS.vdxfid, IDENTITY_LOCATION.vdxfid, IDENTITY_BANKINGDETAILS.vdxfid, IDENTITY_DOCUMENTS.vdxfid]), - new RequestedPermission(PROFILE_DATA_VIEW_REQUEST.vdxfid), // change to array + new RequestedPermission(IDENTITY_VIEW.vdxfid), + new RequestedPermission(PROFILE_DATA_VIEW_REQUEST.vdxfid, [IDENTITY_PERSONALDETAILS.vdxfid, IDENTITY_CONTACTDETAILS.vdxfid, IDENTITY_LOCATION.vdxfid, IDENTITY_BANKINGDETAILS.vdxfid, IDENTITY_DOCUMENTS.vdxfid]), new RequestedPermission(LOGIN_CONSENT_PERSONALINFO_WEBHOOK_VDXF_KEY.vdxfid), new RequestedPermission(LOGIN_CONSENT_REDIRECT_VDXF_KEY.vdxfid), ], diff --git a/src/__tests__/attestation/personalInfo.test.ts b/src/__tests__/attestation/personalInfo.test.ts index e8eb9b6..6d71fac 100644 --- a/src/__tests__/attestation/personalInfo.test.ts +++ b/src/__tests__/attestation/personalInfo.test.ts @@ -221,28 +221,6 @@ describe('Create a personal info request', () => { }); - test('deserialize and desserialize mmrhashes', async () => { - const mmrhashes = DataDescriptor.fromJson({ - "version": 1, - "flags": 0, - "objectdata": "41d826d3c6cbbc3a96992670d2f604e959fd1a8c014102c78ee8fa7c01db81cbf60181fc9baa101aa8c07d40c324d771145699168d3b18867a587f139173cf8b961d581fe15bbf15f5d02813a615e54c050d2b6b1cd4ee" - }) - - const initialDescriptor = mmrhashes.toBuffer().toString('hex'); - const newDescriptor = new DataDescriptor(); - - newDescriptor.fromBuffer(Buffer.from(initialDescriptor, 'hex')); - - expect(initialDescriptor).toStrictEqual(newDescriptor.toBuffer().toString('hex')); - - // test to see if the hashed object is the correct size - const hashes = mmrhashes.DecodeHashVector(); - expect(typeof hashes).toStrictEqual('object') - expect(hashes.length).toStrictEqual(2); - expect(hashes[0].length).toStrictEqual(32); - expect(hashes[1].length).toStrictEqual(32); - - }); }); diff --git a/src/__tests__/pbaas/dataDescriptor.test.ts b/src/__tests__/pbaas/dataDescriptor.test.ts index 8758ef6..cf5e261 100644 --- a/src/__tests__/pbaas/dataDescriptor.test.ts +++ b/src/__tests__/pbaas/dataDescriptor.test.ts @@ -126,4 +126,28 @@ describe('Serializes and deserializes dataDescriptors', () => { expect(serializedDesc).toStrictEqual(newDescriptor.toBuffer().toString('hex')) // Compare the original serialized request to the new serialized request }); + test('deserialize and desserialize mmrhashes', async () => { + + const mmrhashes = DataDescriptor.fromJson({ + "version": 1, + "flags": 0, + "objectdata": "41d826d3c6cbbc3a96992670d2f604e959fd1a8c014102c78ee8fa7c01db81cbf60181fc9baa101aa8c07d40c324d771145699168d3b18867a587f139173cf8b961d581fe15bbf15f5d02813a615e54c050d2b6b1cd4ee" + }) + + const initialDescriptor = mmrhashes.toBuffer().toString('hex'); + const newDescriptor = new DataDescriptor(); + + newDescriptor.fromBuffer(Buffer.from(initialDescriptor, 'hex')); + + expect(initialDescriptor).toStrictEqual(newDescriptor.toBuffer().toString('hex')); + + // test to see if the hashed object is the correct size + const hashes = mmrhashes.DecodeHashVector(); + expect(typeof hashes).toStrictEqual('object') + expect(hashes.length).toStrictEqual(2); + expect(hashes[0].length).toStrictEqual(32); + expect(hashes[1].length).toStrictEqual(32); + + }); + }); From 6e13097c5bcb96d7a8de062072895f7103c2390c Mon Sep 17 00:00:00 2001 From: Monkins1010 Date: Tue, 15 Oct 2024 13:23:08 +0100 Subject: [PATCH 115/120] Remove Helper function and combine into fromBuffer --- dist/pbaas/VdxfUniValue.d.ts | 10 -- dist/pbaas/VdxfUniValue.js | 227 +++++++++++++++++---------------- src/pbaas/VdxfUniValue.ts | 235 +++++++++++++++++------------------ 3 files changed, 225 insertions(+), 247 deletions(-) diff --git a/dist/pbaas/VdxfUniValue.d.ts b/dist/pbaas/VdxfUniValue.d.ts index 26b1ae6..d5ad578 100644 --- a/dist/pbaas/VdxfUniValue.d.ts +++ b/dist/pbaas/VdxfUniValue.d.ts @@ -30,16 +30,6 @@ export declare class VdxfUniValue implements SerializableEntity { getByteLength(): number; toBuffer(): Buffer; fromBuffer(buffer: Buffer, offset?: number): number; - VDXFDataToUniValue(buffer: Buffer, offset?: number, pSuccess?: any): { - objectUni: { - key: string; - value: VdxfUniType; - }; - offset: number; - pSuccess: { - value: boolean; - }; - }; static fromJson(obj: VdxfUniValueJson): VdxfUniValue; toJson(): VdxfUniValueJson; } diff --git a/dist/pbaas/VdxfUniValue.js b/dist/pbaas/VdxfUniValue.js index 3cd3db8..0a97e84 100644 --- a/dist/pbaas/VdxfUniValue.js +++ b/dist/pbaas/VdxfUniValue.js @@ -273,138 +273,133 @@ class VdxfUniValue { let bytesLeft = reader.buffer.length - reader.offset; while (bytesLeft > vdxf_1.HASH160_BYTE_LENGTH) // size of uint160 { - let objOut = { value: false }; - const { objectUni, offset } = this.VDXFDataToUniValue(reader.buffer, reader.offset, objOut); - reader.offset = offset; - bytesLeft = buffer.length - reader.offset; - if (objOut.value) { - this.values.set(objectUni.key, objectUni.value); - } - else { - // add the remaining data as a hex string - reader.offset = reader.offset - vdxf_1.HASH160_BYTE_LENGTH; - this.values.set("", reader.readSlice(bytesLeft + vdxf_1.HASH160_BYTE_LENGTH)); - bytesLeft = 0; - break; - } - } - if (bytesLeft && bytesLeft <= vdxf_1.HASH160_BYTE_LENGTH) { - this.values.set("", reader.readSlice(bytesLeft)); - } - return reader.offset; - } - VDXFDataToUniValue(buffer, offset = 0, pSuccess = null) { - const reader = new BufferReader(buffer, offset); - let objectUni; - try { - let checkVal; - let version = new bn_js_1.BN(0); - let objSize = 0; - checkVal = (0, address_1.toBase58Check)(reader.readSlice(vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION); - if (checkVal == VDXF_Data.DataCurrencyMapKey.vdxfid) { - const oneCurrencyMap = new CurrencyValueMap_1.CurrencyValueMap(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = oneCurrencyMap.fromBuffer(reader.buffer, reader.offset); - if (oneCurrencyMap.isValid()) { - objectUni = { key: checkVal, value: oneCurrencyMap }; + let pSuccess = { value: false }; + let objectUni; + const initialOffset = reader.offset; + try { + let checkVal; + let version = new bn_js_1.BN(0); + let objSize = 0; + checkVal = (0, address_1.toBase58Check)(reader.readSlice(vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION); + if (checkVal == VDXF_Data.DataCurrencyMapKey.vdxfid) { + const oneCurrencyMap = new CurrencyValueMap_1.CurrencyValueMap(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = oneCurrencyMap.fromBuffer(reader.buffer, reader.offset); + if (oneCurrencyMap.isValid()) { + objectUni = { key: checkVal, value: oneCurrencyMap }; + } } - } - else if (checkVal == VDXF_Data.DataRatingsKey.vdxfid) { - const oneRatingObj = new Rating_1.Rating(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = oneRatingObj.fromBuffer(reader.buffer, reader.offset); - if (oneRatingObj.isValid()) { - objectUni = { key: checkVal, oneRatingObj }; + else if (checkVal == VDXF_Data.DataRatingsKey.vdxfid) { + const oneRatingObj = new Rating_1.Rating(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = oneRatingObj.fromBuffer(reader.buffer, reader.offset); + if (oneRatingObj.isValid()) { + objectUni = { key: checkVal, value: oneRatingObj }; + } } - } - else if (checkVal == VDXF_Data.DataTransferDestinationKey.vdxfid) { - const oneTransferDest = new TransferDestination_1.TransferDestination(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = oneTransferDest.fromBuffer(reader.buffer, reader.offset); - if (oneTransferDest.isValid()) { - objectUni = { key: checkVal, value: oneTransferDest }; + else if (checkVal == VDXF_Data.DataTransferDestinationKey.vdxfid) { + const oneTransferDest = new TransferDestination_1.TransferDestination(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = oneTransferDest.fromBuffer(reader.buffer, reader.offset); + if (oneTransferDest.isValid()) { + objectUni = { key: checkVal, value: oneTransferDest }; + } } - } - else if (checkVal == VDXF_Data.ContentMultiMapRemoveKey.vdxfid) { - const contentMap = new ContentMultiMapRemove_1.ContentMultiMapRemove(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = contentMap.fromBuffer(reader.buffer, reader.offset); - if (contentMap.isValid()) { - objectUni = { key: checkVal, value: contentMap }; + else if (checkVal == VDXF_Data.ContentMultiMapRemoveKey.vdxfid) { + const contentMap = new ContentMultiMapRemove_1.ContentMultiMapRemove(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = contentMap.fromBuffer(reader.buffer, reader.offset); + if (contentMap.isValid()) { + objectUni = { key: checkVal, value: contentMap }; + } } - } - else if (checkVal == VDXF_Data.DataStringKey.vdxfid) { - let stringVal; - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - stringVal = reader.readVarSlice().toString('utf8'); - objectUni = { key: checkVal, value: stringVal }; - } - else if (checkVal == VDXF_Data.DataByteVectorKey.vdxfid) { - let vecVal; - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - vecVal = reader.readVarSlice(); - objectUni = { key: checkVal, value: vecVal.toString('hex') }; - } - else if (checkVal == VDXF_Data.CrossChainDataRefKey.vdxfid) { - const dataRef = new CrossChainDataRef_1.CrossChainDataRef(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = dataRef.fromBuffer(reader.buffer, reader.offset); - if (dataRef.isValid()) { - objectUni = { key: checkVal, value: dataRef }; + else if (checkVal == VDXF_Data.DataStringKey.vdxfid) { + let stringVal; + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + stringVal = reader.readVarSlice().toString('utf8'); + objectUni = { key: checkVal, value: stringVal }; } - } - else if (checkVal == VDXF_Data.DataDescriptorKey.vdxfid) { - const dataDescriptor = new DataDescriptor_1.DataDescriptor(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); - if (dataDescriptor.isValid()) { - objectUni = { key: checkVal, value: dataDescriptor }; + else if (checkVal == VDXF_Data.DataByteVectorKey.vdxfid) { + let vecVal; + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + vecVal = reader.readVarSlice(); + objectUni = { key: checkVal, value: vecVal.toString('hex') }; } - } - else if (checkVal == VDXF_Data.MMRDescriptorKey.vdxfid) { - const mmrDescriptor = new MMRDescriptor_1.MMRDescriptor(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = mmrDescriptor.fromBuffer(reader.buffer, reader.offset); - if (mmrDescriptor.isValid()) { - objectUni = { key: checkVal, value: mmrDescriptor }; + else if (checkVal == VDXF_Data.CrossChainDataRefKey.vdxfid) { + const dataRef = new CrossChainDataRef_1.CrossChainDataRef(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = dataRef.fromBuffer(reader.buffer, reader.offset); + if (dataRef.isValid()) { + objectUni = { key: checkVal, value: dataRef }; + } } - } - else if (checkVal == VDXF_Data.SignatureDataKey.vdxfid) { - const sigData = new SignatureData_1.SignatureData(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = sigData.fromBuffer(reader.buffer, reader.offset); - if (sigData.isValid()) { - objectUni = { key: checkVal, value: sigData }; + else if (checkVal == VDXF_Data.DataDescriptorKey.vdxfid) { + const dataDescriptor = new DataDescriptor_1.DataDescriptor(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); + if (dataDescriptor.isValid()) { + objectUni = { key: checkVal, value: dataDescriptor }; + } } - } - // if we have an object that we recognized, encode it - if (objectUni) { - if (pSuccess != null) { - pSuccess.value = true; + else if (checkVal == VDXF_Data.MMRDescriptorKey.vdxfid) { + const mmrDescriptor = new MMRDescriptor_1.MMRDescriptor(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = mmrDescriptor.fromBuffer(reader.buffer, reader.offset); + if (mmrDescriptor.isValid()) { + objectUni = { key: checkVal, value: mmrDescriptor }; + } + } + else if (checkVal == VDXF_Data.SignatureDataKey.vdxfid) { + const sigData = new SignatureData_1.SignatureData(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = sigData.fromBuffer(reader.buffer, reader.offset); + if (sigData.isValid()) { + objectUni = { key: checkVal, value: sigData }; + } + } + // if we have an object that we recognized, encode it + if (objectUni && objectUni.key && objectUni.value) { + if (pSuccess != null) { + pSuccess.value = true; + } + } + else { + if (pSuccess != null) { + pSuccess.value = false; + } } } - else { + catch (e) { if (pSuccess != null) { pSuccess.value = false; } } - } - catch (e) { - if (pSuccess != null) { - pSuccess.value = false; + bytesLeft = reader.buffer.length - reader.offset; + if ((pSuccess === null || pSuccess === void 0 ? void 0 : pSuccess.value) && (pSuccess === null || pSuccess === void 0 ? void 0 : pSuccess.value)) { + this.values.set(objectUni.key, objectUni.value); + } + else { + // add the remaining data as a hex string + reader.offset = initialOffset; + this.values.set("", reader.readSlice(reader.buffer.length - reader.offset)); + bytesLeft = 0; + break; } } - return { objectUni, offset: reader.offset, pSuccess }; + if (bytesLeft && bytesLeft <= vdxf_1.HASH160_BYTE_LENGTH) { + this.values.set("", reader.readSlice(bytesLeft)); + } + return reader.offset; } static fromJson(obj) { const map = new Map(); diff --git a/src/pbaas/VdxfUniValue.ts b/src/pbaas/VdxfUniValue.ts index d3d92fc..4bc8c82 100644 --- a/src/pbaas/VdxfUniValue.ts +++ b/src/pbaas/VdxfUniValue.ts @@ -339,145 +339,138 @@ export class VdxfUniValue implements SerializableEntity { while (bytesLeft > HASH160_BYTE_LENGTH) // size of uint160 { - let objOut = { value: false }; - const { objectUni, offset } = this.VDXFDataToUniValue(reader.buffer, reader.offset, objOut); - reader.offset = offset; - bytesLeft = buffer.length - reader.offset; - if (objOut.value) { - this.values.set(objectUni.key, objectUni.value); - } - else { - // add the remaining data as a hex string - reader.offset = reader.offset - HASH160_BYTE_LENGTH; - this.values.set("", reader.readSlice(bytesLeft + HASH160_BYTE_LENGTH)); - bytesLeft = 0; - break; - } - } - if (bytesLeft && bytesLeft <= HASH160_BYTE_LENGTH) { - this.values.set("", reader.readSlice(bytesLeft)); - } - return reader.offset; - } + let pSuccess = { value: false }; + let objectUni: { key: string, value: VdxfUniType }; + const initialOffset = reader.offset; - VDXFDataToUniValue(buffer: Buffer, offset: number = 0, pSuccess = null): { - objectUni: { key: string, value: VdxfUniType }, offset: number, pSuccess: { value: boolean } - } { - const reader = new BufferReader(buffer, offset); - let objectUni: any; - - try { - - let checkVal: string; - let version = new BN(0); - let objSize = 0; - checkVal = toBase58Check(reader.readSlice(HASH160_BYTE_LENGTH), I_ADDR_VERSION); - - if (checkVal == VDXF_Data.DataCurrencyMapKey.vdxfid) { - const oneCurrencyMap = new CurrencyValueMap(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = oneCurrencyMap.fromBuffer(reader.buffer, reader.offset); - if (oneCurrencyMap.isValid()) { - objectUni = { key: checkVal, value: oneCurrencyMap }; + try { + let checkVal: string; + let version = new BN(0); + let objSize = 0; + checkVal = toBase58Check(reader.readSlice(HASH160_BYTE_LENGTH), I_ADDR_VERSION); + + if (checkVal == VDXF_Data.DataCurrencyMapKey.vdxfid) { + const oneCurrencyMap = new CurrencyValueMap(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = oneCurrencyMap.fromBuffer(reader.buffer, reader.offset); + if (oneCurrencyMap.isValid()) { + objectUni = { key: checkVal, value: oneCurrencyMap }; + } } - } - else if (checkVal == VDXF_Data.DataRatingsKey.vdxfid) { - const oneRatingObj = new Rating(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = oneRatingObj.fromBuffer(reader.buffer, reader.offset); - if (oneRatingObj.isValid()) { - objectUni = { key: checkVal, oneRatingObj }; + else if (checkVal == VDXF_Data.DataRatingsKey.vdxfid) { + const oneRatingObj = new Rating(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = oneRatingObj.fromBuffer(reader.buffer, reader.offset); + if (oneRatingObj.isValid()) { + objectUni = { key: checkVal, value: oneRatingObj }; + } } - } - else if (checkVal == VDXF_Data.DataTransferDestinationKey.vdxfid) { - const oneTransferDest = new TransferDestination(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = oneTransferDest.fromBuffer(reader.buffer, reader.offset); - if (oneTransferDest.isValid()) { - objectUni = { key: checkVal, value: oneTransferDest }; + else if (checkVal == VDXF_Data.DataTransferDestinationKey.vdxfid) { + const oneTransferDest = new TransferDestination(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = oneTransferDest.fromBuffer(reader.buffer, reader.offset); + if (oneTransferDest.isValid()) { + objectUni = { key: checkVal, value: oneTransferDest }; + } } - } - else if (checkVal == VDXF_Data.ContentMultiMapRemoveKey.vdxfid) { - const contentMap = new ContentMultiMapRemove(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = contentMap.fromBuffer(reader.buffer, reader.offset); - if (contentMap.isValid()) { - objectUni = { key: checkVal, value: contentMap }; + else if (checkVal == VDXF_Data.ContentMultiMapRemoveKey.vdxfid) { + const contentMap = new ContentMultiMapRemove(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = contentMap.fromBuffer(reader.buffer, reader.offset); + if (contentMap.isValid()) { + objectUni = { key: checkVal, value: contentMap }; + } } - } - else if (checkVal == VDXF_Data.DataStringKey.vdxfid) { - let stringVal: string; - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - stringVal = reader.readVarSlice().toString('utf8'); - objectUni = { key: checkVal, value: stringVal }; - } - else if (checkVal == VDXF_Data.DataByteVectorKey.vdxfid) { - let vecVal: Buffer; - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - vecVal = reader.readVarSlice(); - objectUni = { key: checkVal, value: vecVal.toString('hex') }; - } - else if (checkVal == VDXF_Data.CrossChainDataRefKey.vdxfid) { - const dataRef = new CrossChainDataRef(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = dataRef.fromBuffer(reader.buffer, reader.offset); - if (dataRef.isValid()) { - objectUni = { key: checkVal, value: dataRef }; + else if (checkVal == VDXF_Data.DataStringKey.vdxfid) { + let stringVal: string; + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + stringVal = reader.readVarSlice().toString('utf8'); + objectUni = { key: checkVal, value: stringVal }; } - } - else if (checkVal == VDXF_Data.DataDescriptorKey.vdxfid) { - const dataDescriptor = new DataDescriptor(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); - if (dataDescriptor.isValid()) { - objectUni = { key: checkVal, value: dataDescriptor }; + else if (checkVal == VDXF_Data.DataByteVectorKey.vdxfid) { + let vecVal: Buffer; + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + vecVal = reader.readVarSlice(); + objectUni = { key: checkVal, value: vecVal.toString('hex') }; } - } - else if (checkVal == VDXF_Data.MMRDescriptorKey.vdxfid) { - const mmrDescriptor = new MMRDescriptor(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = mmrDescriptor.fromBuffer(reader.buffer, reader.offset); - if (mmrDescriptor.isValid()) { - objectUni = { key: checkVal, value: mmrDescriptor }; + else if (checkVal == VDXF_Data.CrossChainDataRefKey.vdxfid) { + const dataRef = new CrossChainDataRef(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = dataRef.fromBuffer(reader.buffer, reader.offset); + if (dataRef.isValid()) { + objectUni = { key: checkVal, value: dataRef }; + } } - } - else if (checkVal == VDXF_Data.SignatureDataKey.vdxfid) { - const sigData = new SignatureData(); - version = reader.readVarInt(); - objSize = reader.readCompactSize(); - reader.offset = sigData.fromBuffer(reader.buffer, reader.offset); - if (sigData.isValid()) { - objectUni = { key: checkVal, value: sigData }; + else if (checkVal == VDXF_Data.DataDescriptorKey.vdxfid) { + const dataDescriptor = new DataDescriptor(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = dataDescriptor.fromBuffer(reader.buffer, reader.offset); + if (dataDescriptor.isValid()) { + objectUni = { key: checkVal, value: dataDescriptor }; + } + } + else if (checkVal == VDXF_Data.MMRDescriptorKey.vdxfid) { + const mmrDescriptor = new MMRDescriptor(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = mmrDescriptor.fromBuffer(reader.buffer, reader.offset); + if (mmrDescriptor.isValid()) { + objectUni = { key: checkVal, value: mmrDescriptor }; + } + } + else if (checkVal == VDXF_Data.SignatureDataKey.vdxfid) { + const sigData = new SignatureData(); + version = reader.readVarInt(); + objSize = reader.readCompactSize(); + reader.offset = sigData.fromBuffer(reader.buffer, reader.offset); + if (sigData.isValid()) { + objectUni = { key: checkVal, value: sigData }; + } } - } - // if we have an object that we recognized, encode it - if (objectUni) { - if (pSuccess != null) { - pSuccess.value = true; + // if we have an object that we recognized, encode it + if (objectUni && objectUni.key && objectUni.value) { + if (pSuccess != null) { + pSuccess.value = true; + } + } + else { + if (pSuccess != null) { + pSuccess.value = false; + } } } - else { + catch (e) { if (pSuccess != null) { pSuccess.value = false; } } - } - catch (e) { - if (pSuccess != null) { - pSuccess.value = false; + + bytesLeft = reader.buffer.length - reader.offset; + + if (pSuccess?.value && pSuccess?.value) { + this.values.set(objectUni.key, objectUni.value); + } + else { + // add the remaining data as a hex string + reader.offset = initialOffset; + this.values.set("", reader.readSlice(reader.buffer.length - reader.offset)); + bytesLeft = 0; + break; } } - return { objectUni, offset: reader.offset, pSuccess }; + if (bytesLeft && bytesLeft <= HASH160_BYTE_LENGTH) { + this.values.set("", reader.readSlice(bytesLeft)); + } + return reader.offset; } static fromJson(obj: VdxfUniValueJson) { From cfceb6cfdd8cf1d13aab20cd8f1093d57fe263a1 Mon Sep 17 00:00:00 2001 From: Monkins1010 Date: Mon, 11 Nov 2024 09:58:04 +0000 Subject: [PATCH 116/120] Fix capitals commit 1 --- dist/vdxf/identityDataKeys.d.ts | 184 ---- dist/vdxf/identityDataKeys.js | 1653 ---------------------------- dist/vdxf/vdxfDataKeys.d.ts | 69 -- dist/vdxf/vdxfDataKeys.js | 347 ------ src/vdxf/identityDataKeys.ts | 1832 ------------------------------- src/vdxf/vdxfDataKeys.ts | 438 -------- 6 files changed, 4523 deletions(-) delete mode 100644 dist/vdxf/identityDataKeys.d.ts delete mode 100644 dist/vdxf/identityDataKeys.js delete mode 100644 dist/vdxf/vdxfDataKeys.d.ts delete mode 100644 dist/vdxf/vdxfDataKeys.js delete mode 100644 src/vdxf/identityDataKeys.ts delete mode 100644 src/vdxf/vdxfDataKeys.ts diff --git a/dist/vdxf/identityDataKeys.d.ts b/dist/vdxf/identityDataKeys.d.ts deleted file mode 100644 index 7c9f451..0000000 --- a/dist/vdxf/identityDataKeys.d.ts +++ /dev/null @@ -1,184 +0,0 @@ -import { VDXFKeyInterface } from "./keys"; -export declare const IDENTITY_ACCOUNT_ID: VDXFKeyInterface; -export declare const IDENTITY_ACCOUNT_USERID: VDXFKeyInterface; -export declare const IDENTITY_ACCOUNT_CREATEDAT: VDXFKeyInterface; -export declare const IDENTITY_ACCOUNT_COMPLETEDAT: VDXFKeyInterface; -export declare const IDENTITY_ACCOUNT_PREVIOUSATTEMPTID: VDXFKeyInterface; -export declare const IDENTITY_ACCOUNT_SHAREABLEURL: VDXFKeyInterface; -export declare const IDENTITY_ACCOUNT_TEMPLATEID: VDXFKeyInterface; -export declare const IDENTITY_ACCOUNT_TEMPLATEVERSION: VDXFKeyInterface; -export declare const IDENTITY_ACCOUNT_STATUS: VDXFKeyInterface; -export declare const IDENTITY_PHONENUMBER: VDXFKeyInterface; -export declare const IDENTITY_DATEOFBIRTH: VDXFKeyInterface; -export declare const IDENTITY_OVER18: VDXFKeyInterface; -export declare const IDENTITY_OVER21: VDXFKeyInterface; -export declare const IDENTITY_OVER25: VDXFKeyInterface; -export declare const IDENTITY_ACCOUNT_REQUESTING_IPADDRESS: VDXFKeyInterface; -export declare const IDENTITY_EMAIL: VDXFKeyInterface; -export declare const IDENTITY_NATIONALITY: VDXFKeyInterface; -export declare const IDENTITY_FIRSTNAME: VDXFKeyInterface; -export declare const IDENTITY_MIDDLENAME: VDXFKeyInterface; -export declare const IDENTITY_LASTNAME: VDXFKeyInterface; -export declare const IDENTITY_GENDER: VDXFKeyInterface; -export declare const IDENTITY_HEIGHT: VDXFKeyInterface; -export declare const IDENTITY_EYECOLOR: VDXFKeyInterface; -export declare const IDENTITY_ETHNICITY: VDXFKeyInterface; -export declare const IDENTITY_WEIGHT: VDXFKeyInterface; -export declare const IDENTITY_HOMEADDRESS: VDXFKeyInterface; -export declare const IDENTITY_HOMEADDRESS_STREET1: VDXFKeyInterface; -export declare const IDENTITY_HOMEADDRESS_STREET2: VDXFKeyInterface; -export declare const IDENTITY_HOMEADDRESS_CITY: VDXFKeyInterface; -export declare const IDENTITY_HOMEADDRESS_REGION: VDXFKeyInterface; -export declare const IDENTITY_HOMEADDRESS_POSTCODE: VDXFKeyInterface; -export declare const IDENTITY_HOMEADDRESS_COUNTRY: VDXFKeyInterface; -export declare const IDENTITY_IDNUMBER_VALUE: VDXFKeyInterface; -export declare const IDENTITY_IDNUMBER_TYPE: VDXFKeyInterface; -export declare const IDENTITY_VERIFICATION_STATUS: VDXFKeyInterface; -export declare const IDENTITY_VERIFICATION_APPROVALS: VDXFKeyInterface; -export declare const IDENTITY_VERIFICATION_APPROVALS_ACCEPTEDTOS: VDXFKeyInterface; -export declare const IDENTITY_VERIFICATION_APPROVALS_VERIFIEDSMS: VDXFKeyInterface; -export declare const IDENTITY_VERIFICATION_APPROVALS_KYCCHECKED: VDXFKeyInterface; -export declare const IDENTITY_VERIFICATION_APPROVALS_DOCUMENTSVERIFIED: VDXFKeyInterface; -export declare const IDENTITY_VERIFICATION_APPROVALS_SELFIECHECKED: VDXFKeyInterface; -export declare const IDENTITY_VERIFICATION_APPROVALS_WATCHLISTOK: VDXFKeyInterface; -export declare const IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK: VDXFKeyInterface; -export declare const IDENTITY_VERIFICATION_APPROVALS_STATUS: VDXFKeyInterface; -export declare const IDENTITY_DRIVINGLICENCE: VDXFKeyInterface; -export declare const IDENTITY_DRIVINGLICENCE_ORIGINALFRONT: VDXFKeyInterface; -export declare const IDENTITY_DRIVINGLICENCE_ORIGINALBACK: VDXFKeyInterface; -export declare const IDENTITY_DRIVINGLICENCE_CROPPEDFRONT: VDXFKeyInterface; -export declare const IDENTITY_DRIVINGLICENCE_CROPPEDBACK: VDXFKeyInterface; -export declare const IDENTITY_DRIVINGLICENCE_FACE: VDXFKeyInterface; -export declare const IDENTITY_DRIVINGLICENCE_IDNUMBER: VDXFKeyInterface; -export declare const IDENTITY_DRIVINGLICENCE_CATEGORY: VDXFKeyInterface; -export declare const IDENTITY_DRIVINGLICENCE_EXPIRATIONDATE: VDXFKeyInterface; -export declare const IDENTITY_DRIVINGLICENCE_ISSUINGCOUNTRY: VDXFKeyInterface; -export declare const IDENTITY_DRIVINGLICENCE_ISSUINGREGION: VDXFKeyInterface; -export declare const IDENTITY_DRIVINGLICENCE_DATEOFBIRTH: VDXFKeyInterface; -export declare const IDENTITY_DRIVINGLICENCE_ADDRESS_STREET1: VDXFKeyInterface; -export declare const IDENTITY_DRIVINGLICENCE_ADDRESS_CITY: VDXFKeyInterface; -export declare const IDENTITY_DRIVINGLICENCE_ADDRESS_REGION: VDXFKeyInterface; -export declare const IDENTITY_DRIVINGLICENCE_ADDRESS_POSTCODE: VDXFKeyInterface; -export declare const IDENTITY_DRIVINGLICENCE_ADDRESS_COUNTRY: VDXFKeyInterface; -export declare const IDENTITY_SELFIECHECK_IMAGE: VDXFKeyInterface; -export declare const IDENTITY_SELFIECHECK_VIDEO: VDXFKeyInterface; -export declare const IDENTITY_EMAIL_ISDELIVERABLE: VDXFKeyInterface; -export declare const IDENTITY_EMAIL_BREACHCOUNT: VDXFKeyInterface; -export declare const IDENTITY_EMAIL_FIRSTBREACHEDAT: VDXFKeyInterface; -export declare const IDENTITY_EMAIL_LASTBREACHEDAT: VDXFKeyInterface; -export declare const IDENTITY_EMAIL_DOMAIN_REGISTEREDAT: VDXFKeyInterface; -export declare const IDENTITY_EMAIL_DOMAIN_FREEPROVIDER: VDXFKeyInterface; -export declare const IDENTITY_EMAIL_DOMAIN_CUSTOM: VDXFKeyInterface; -export declare const IDENTITY_EMAIL_DOMAIN_DISPOSABLE: VDXFKeyInterface; -export declare const IDENTITY_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS: VDXFKeyInterface; -export declare const IDENTITY_PASSPORT: VDXFKeyInterface; -export declare const IDENTITY_PASSPORT_ORIGINALFRONT: VDXFKeyInterface; -export declare const IDENTITY_PASSPORT_ORIGINALBACK: VDXFKeyInterface; -export declare const IDENTITY_PASSPORT_CROPPEDFRONT: VDXFKeyInterface; -export declare const IDENTITY_PASSPORT_CROPPEDBACK: VDXFKeyInterface; -export declare const IDENTITY_PASSPORT_FACE: VDXFKeyInterface; -export declare const IDENTITY_PASSPORT_IDNUMBER: VDXFKeyInterface; -export declare const IDENTITY_PASSPORT_CATEGORY: VDXFKeyInterface; -export declare const IDENTITY_PASSPORT_EXPIRATIONDATE: VDXFKeyInterface; -export declare const IDENTITY_PASSPORT_ISSUINGCOUNTRY: VDXFKeyInterface; -export declare const IDENTITY_PASSPORT_ISSUINGREGION: VDXFKeyInterface; -export declare const IDENTITY_PASSPORT_DATEOFBIRTH: VDXFKeyInterface; -export declare const IDENTITY_PASSPORT_ADDRESS_STREET1: VDXFKeyInterface; -export declare const IDENTITY_PASSPORT_ADDRESS_CITY: VDXFKeyInterface; -export declare const IDENTITY_PASSPORT_ADDRESS_REGION: VDXFKeyInterface; -export declare const IDENTITY_PASSPORT_ADDRESS_POSTCODE: VDXFKeyInterface; -export declare const IDENTITY_PASSPORT_ADDRESS_COUNTRY: VDXFKeyInterface; -export declare const IDENTITY_RESIDENCEPERMIT: VDXFKeyInterface; -export declare const IDENTITY_RESIDENCEPERMIT_ORIGINALFRONT: VDXFKeyInterface; -export declare const IDENTITY_RESIDENCEPERMIT_ORIGINALBACK: VDXFKeyInterface; -export declare const IDENTITY_RESIDENCEPERMIT_CROPPEDFRONT: VDXFKeyInterface; -export declare const IDENTITY_RESIDENCEPERMIT_CROPPEDBACK: VDXFKeyInterface; -export declare const IDENTITY_RESIDENCEPERMIT_FACE: VDXFKeyInterface; -export declare const IDENTITY_RESIDENCEPERMIT_IDNUMBER: VDXFKeyInterface; -export declare const IDENTITY_RESIDENCEPERMIT_CATEGORY: VDXFKeyInterface; -export declare const IDENTITY_RESIDENCEPERMIT_EXPIRATIONDATE: VDXFKeyInterface; -export declare const IDENTITY_RESIDENCEPERMIT_ISSUINGCOUNTRY: VDXFKeyInterface; -export declare const IDENTITY_RESIDENCEPERMIT_ISSUINGREGION: VDXFKeyInterface; -export declare const IDENTITY_RESIDENCEPERMIT_DATEOFBIRTH: VDXFKeyInterface; -export declare const IDENTITY_RESIDENCEPERMIT_ADDRESS: VDXFKeyInterface; -export declare const IDENTITY_RESIDENCEPERMIT_ADDRESS_STREET1: VDXFKeyInterface; -export declare const IDENTITY_RESIDENCEPERMIT_ADDRESS_CITY: VDXFKeyInterface; -export declare const IDENTITY_RESIDENCEPERMIT_ADDRESS_REGION: VDXFKeyInterface; -export declare const IDENTITY_RESIDENCEPERMIT_ADDRESS_POSTCODE: VDXFKeyInterface; -export declare const IDENTITY_RESIDENCEPERMIT_ADDRESS_COUNTRY: VDXFKeyInterface; -export declare const IDENTITY_RESIDENTCARD: VDXFKeyInterface; -export declare const IDENTITY_RESIDENTCARD_ORIGINALFRONT: VDXFKeyInterface; -export declare const IDENTITY_RESIDENTCARD_ORIGINALBACK: VDXFKeyInterface; -export declare const IDENTITY_RESIDENTCARD_CROPPEDFRONT: VDXFKeyInterface; -export declare const IDENTITY_RESIDENTCARD_CROPPEDBACK: VDXFKeyInterface; -export declare const IDENTITY_RESIDENTCARD_FACE: VDXFKeyInterface; -export declare const IDENTITY_RESIDENTCARD_IDNUMBER: VDXFKeyInterface; -export declare const IDENTITY_RESIDENTCARD_CATEGORY: VDXFKeyInterface; -export declare const IDENTITY_RESIDENTCARD_EXPIRATIONDATE: VDXFKeyInterface; -export declare const IDENTITY_RESIDENTCARD_ISSUINGCOUNTRY: VDXFKeyInterface; -export declare const IDENTITY_RESIDENTCARD_ISSUINGREGION: VDXFKeyInterface; -export declare const IDENTITY_RESIDENTCARD_DATEOFBIRTH: VDXFKeyInterface; -export declare const IDENTITY_RESIDENTCARD_ADDRESS_STREET1: VDXFKeyInterface; -export declare const IDENTITY_RESIDENTCARD_ADDRESS_CITY: VDXFKeyInterface; -export declare const IDENTITY_RESIDENTCARD_ADDRESS_REGION: VDXFKeyInterface; -export declare const IDENTITY_RESIDENTCARD_ADDRESS_POSTCODE: VDXFKeyInterface; -export declare const IDENTITY_RESIDENTCARD_ADDRESS_COUNTRY: VDXFKeyInterface; -export declare const IDENTITY_IDCARD: VDXFKeyInterface; -export declare const IDENTITY_IDCARD_ORIGINALFRONT: VDXFKeyInterface; -export declare const IDENTITY_IDCARD_ORIGINALBACK: VDXFKeyInterface; -export declare const IDENTITY_IDCARD_CROPPEDFRONT: VDXFKeyInterface; -export declare const IDENTITY_IDCARD_CROPPEDBACK: VDXFKeyInterface; -export declare const IDENTITY_IDCARD_FACE: VDXFKeyInterface; -export declare const IDENTITY_IDCARD_IDNUMBER: VDXFKeyInterface; -export declare const IDENTITY_IDCARD_CATEGORY: VDXFKeyInterface; -export declare const IDENTITY_IDCARD_EXPIRATIONDATE: VDXFKeyInterface; -export declare const IDENTITY_IDCARD_ISSUINGCOUNTRY: VDXFKeyInterface; -export declare const IDENTITY_IDCARD_ISSUINGREGION: VDXFKeyInterface; -export declare const IDENTITY_IDCARD_DATEOFBIRTH: VDXFKeyInterface; -export declare const IDENTITY_IDCARD_ADDRESS_STREET1: VDXFKeyInterface; -export declare const IDENTITY_IDCARD_ADDRESS_CITY: VDXFKeyInterface; -export declare const IDENTITY_IDCARD_ADDRESS_REGION: VDXFKeyInterface; -export declare const IDENTITY_IDCARD_ADDRESS_POSTCODE: VDXFKeyInterface; -export declare const IDENTITY_IDCARD_ADDRESS_COUNTRY: VDXFKeyInterface; -export declare const IDENTITY_VISA: VDXFKeyInterface; -export declare const IDENTITY_VISA_ORIGINALFRONT: VDXFKeyInterface; -export declare const IDENTITY_VISA_ORIGINALBACK: VDXFKeyInterface; -export declare const IDENTITY_VISA_CROPPEDFRONT: VDXFKeyInterface; -export declare const IDENTITY_VISA_CROPPEDBACK: VDXFKeyInterface; -export declare const IDENTITY_VISA_FACE: VDXFKeyInterface; -export declare const IDENTITY_VISA_IDNUMBER: VDXFKeyInterface; -export declare const IDENTITY_VISA_CATEGORY: VDXFKeyInterface; -export declare const IDENTITY_VISA_EXPIRATIONDATE: VDXFKeyInterface; -export declare const IDENTITY_VISA_ISSUINGCOUNTRY: VDXFKeyInterface; -export declare const IDENTITY_VISA_ISSUINGREGION: VDXFKeyInterface; -export declare const IDENTITY_VISA_DATEOFBIRTH: VDXFKeyInterface; -export declare const IDENTITY_VISA_ADDRESS_STREET1: VDXFKeyInterface; -export declare const IDENTITY_VISA_ADDRESS_CITY: VDXFKeyInterface; -export declare const IDENTITY_VISA_ADDRESS_REGION: VDXFKeyInterface; -export declare const IDENTITY_VISA_ADDRESS_POSTCODE: VDXFKeyInterface; -export declare const IDENTITY_VISA_ADDRESS_COUNTRY: VDXFKeyInterface; -export declare const IDENTITY_PERSONALDETAILS: VDXFKeyInterface; -export declare const IDENTITY_CONTACTDETAILS: VDXFKeyInterface; -export declare const IDENTITY_LOCATION: VDXFKeyInterface; -export declare const IDENTITY_BANKINGDETAILS: VDXFKeyInterface; -export declare const IDENTITY_DOCUMENTS: VDXFKeyInterface; -export declare const IDENTITY_BANKACCOUNT: VDXFKeyInterface; -export declare const IDENTITY_BANKINGDETAILS_CURRENCY: VDXFKeyInterface; -export declare const IDENTITY_BANKINGDETAILS_COUNTRY: VDXFKeyInterface; -export declare const IDENTITY_BANKINGDETAILS_STREET1: VDXFKeyInterface; -export declare const IDENTITY_BANKINGDETAILS_STREET2: VDXFKeyInterface; -export declare const IDENTITY_BANKINGDETAILS_CITY: VDXFKeyInterface; -export declare const IDENTITY_BANKINGDETAILS_REGION: VDXFKeyInterface; -export declare const IDENTITY_BANKINGDETAILS_POSTALCODE: VDXFKeyInterface; -export declare const IDENTITY_BANKINGDETAILS_TAXNUMBER: VDXFKeyInterface; -export declare const IDENTITY_BANKINGDETAILS_TAXCOUNTRY: VDXFKeyInterface; -export declare const IDENTITY_BANKINGDETAILS_FIRSTNAME: VDXFKeyInterface; -export declare const IDENTITY_BANKINGDETAILS_LASTNAME: VDXFKeyInterface; -export declare const IDENTITY_BANKINGDETAILS_PHONENUMBER: VDXFKeyInterface; -export declare const IDENTITY_BANKINGDETAILS_NUMBER: VDXFKeyInterface; -export declare const IDENTITY_BANKINGDETAILS_TYPE: VDXFKeyInterface; -export declare const IDENTITY_BANKINGDETAILS_SORTCODE: VDXFKeyInterface; -export declare const IDENTITY_DOCUMENTS_PASSPORT: VDXFKeyInterface; -export declare const IDENTITY_RESIDENCECARD: VDXFKeyInterface; -export declare const IDENTITY_ATTESTOR: VDXFKeyInterface; -export declare const IDENTITY_ATTESTATION_RECIPIENT: VDXFKeyInterface; diff --git a/dist/vdxf/identityDataKeys.js b/dist/vdxf/identityDataKeys.js deleted file mode 100644 index 5039ee4..0000000 --- a/dist/vdxf/identityDataKeys.js +++ /dev/null @@ -1,1653 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.IDENTITY_DRIVINGLICENCE_FACE = exports.IDENTITY_DRIVINGLICENCE_CROPPEDBACK = exports.IDENTITY_DRIVINGLICENCE_CROPPEDFRONT = exports.IDENTITY_DRIVINGLICENCE_ORIGINALBACK = exports.IDENTITY_DRIVINGLICENCE_ORIGINALFRONT = exports.IDENTITY_DRIVINGLICENCE = exports.IDENTITY_VERIFICATION_APPROVALS_STATUS = exports.IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK = exports.IDENTITY_VERIFICATION_APPROVALS_WATCHLISTOK = exports.IDENTITY_VERIFICATION_APPROVALS_SELFIECHECKED = exports.IDENTITY_VERIFICATION_APPROVALS_DOCUMENTSVERIFIED = exports.IDENTITY_VERIFICATION_APPROVALS_KYCCHECKED = exports.IDENTITY_VERIFICATION_APPROVALS_VERIFIEDSMS = exports.IDENTITY_VERIFICATION_APPROVALS_ACCEPTEDTOS = exports.IDENTITY_VERIFICATION_APPROVALS = exports.IDENTITY_VERIFICATION_STATUS = exports.IDENTITY_IDNUMBER_TYPE = exports.IDENTITY_IDNUMBER_VALUE = exports.IDENTITY_HOMEADDRESS_COUNTRY = exports.IDENTITY_HOMEADDRESS_POSTCODE = exports.IDENTITY_HOMEADDRESS_REGION = exports.IDENTITY_HOMEADDRESS_CITY = exports.IDENTITY_HOMEADDRESS_STREET2 = exports.IDENTITY_HOMEADDRESS_STREET1 = exports.IDENTITY_HOMEADDRESS = exports.IDENTITY_WEIGHT = exports.IDENTITY_ETHNICITY = exports.IDENTITY_EYECOLOR = exports.IDENTITY_HEIGHT = exports.IDENTITY_GENDER = exports.IDENTITY_LASTNAME = exports.IDENTITY_MIDDLENAME = exports.IDENTITY_FIRSTNAME = exports.IDENTITY_NATIONALITY = exports.IDENTITY_EMAIL = exports.IDENTITY_ACCOUNT_REQUESTING_IPADDRESS = exports.IDENTITY_OVER25 = exports.IDENTITY_OVER21 = exports.IDENTITY_OVER18 = exports.IDENTITY_DATEOFBIRTH = exports.IDENTITY_PHONENUMBER = exports.IDENTITY_ACCOUNT_STATUS = exports.IDENTITY_ACCOUNT_TEMPLATEVERSION = exports.IDENTITY_ACCOUNT_TEMPLATEID = exports.IDENTITY_ACCOUNT_SHAREABLEURL = exports.IDENTITY_ACCOUNT_PREVIOUSATTEMPTID = exports.IDENTITY_ACCOUNT_COMPLETEDAT = exports.IDENTITY_ACCOUNT_CREATEDAT = exports.IDENTITY_ACCOUNT_USERID = exports.IDENTITY_ACCOUNT_ID = void 0; -exports.IDENTITY_RESIDENCEPERMIT_ISSUINGREGION = exports.IDENTITY_RESIDENCEPERMIT_ISSUINGCOUNTRY = exports.IDENTITY_RESIDENCEPERMIT_EXPIRATIONDATE = exports.IDENTITY_RESIDENCEPERMIT_CATEGORY = exports.IDENTITY_RESIDENCEPERMIT_IDNUMBER = exports.IDENTITY_RESIDENCEPERMIT_FACE = exports.IDENTITY_RESIDENCEPERMIT_CROPPEDBACK = exports.IDENTITY_RESIDENCEPERMIT_CROPPEDFRONT = exports.IDENTITY_RESIDENCEPERMIT_ORIGINALBACK = exports.IDENTITY_RESIDENCEPERMIT_ORIGINALFRONT = exports.IDENTITY_RESIDENCEPERMIT = exports.IDENTITY_PASSPORT_ADDRESS_COUNTRY = exports.IDENTITY_PASSPORT_ADDRESS_POSTCODE = exports.IDENTITY_PASSPORT_ADDRESS_REGION = exports.IDENTITY_PASSPORT_ADDRESS_CITY = exports.IDENTITY_PASSPORT_ADDRESS_STREET1 = exports.IDENTITY_PASSPORT_DATEOFBIRTH = exports.IDENTITY_PASSPORT_ISSUINGREGION = exports.IDENTITY_PASSPORT_ISSUINGCOUNTRY = exports.IDENTITY_PASSPORT_EXPIRATIONDATE = exports.IDENTITY_PASSPORT_CATEGORY = exports.IDENTITY_PASSPORT_IDNUMBER = exports.IDENTITY_PASSPORT_FACE = exports.IDENTITY_PASSPORT_CROPPEDBACK = exports.IDENTITY_PASSPORT_CROPPEDFRONT = exports.IDENTITY_PASSPORT_ORIGINALBACK = exports.IDENTITY_PASSPORT_ORIGINALFRONT = exports.IDENTITY_PASSPORT = exports.IDENTITY_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS = exports.IDENTITY_EMAIL_DOMAIN_DISPOSABLE = exports.IDENTITY_EMAIL_DOMAIN_CUSTOM = exports.IDENTITY_EMAIL_DOMAIN_FREEPROVIDER = exports.IDENTITY_EMAIL_DOMAIN_REGISTEREDAT = exports.IDENTITY_EMAIL_LASTBREACHEDAT = exports.IDENTITY_EMAIL_FIRSTBREACHEDAT = exports.IDENTITY_EMAIL_BREACHCOUNT = exports.IDENTITY_EMAIL_ISDELIVERABLE = exports.IDENTITY_SELFIECHECK_VIDEO = exports.IDENTITY_SELFIECHECK_IMAGE = exports.IDENTITY_DRIVINGLICENCE_ADDRESS_COUNTRY = exports.IDENTITY_DRIVINGLICENCE_ADDRESS_POSTCODE = exports.IDENTITY_DRIVINGLICENCE_ADDRESS_REGION = exports.IDENTITY_DRIVINGLICENCE_ADDRESS_CITY = exports.IDENTITY_DRIVINGLICENCE_ADDRESS_STREET1 = exports.IDENTITY_DRIVINGLICENCE_DATEOFBIRTH = exports.IDENTITY_DRIVINGLICENCE_ISSUINGREGION = exports.IDENTITY_DRIVINGLICENCE_ISSUINGCOUNTRY = exports.IDENTITY_DRIVINGLICENCE_EXPIRATIONDATE = exports.IDENTITY_DRIVINGLICENCE_CATEGORY = exports.IDENTITY_DRIVINGLICENCE_IDNUMBER = void 0; -exports.IDENTITY_VISA_EXPIRATIONDATE = exports.IDENTITY_VISA_CATEGORY = exports.IDENTITY_VISA_IDNUMBER = exports.IDENTITY_VISA_FACE = exports.IDENTITY_VISA_CROPPEDBACK = exports.IDENTITY_VISA_CROPPEDFRONT = exports.IDENTITY_VISA_ORIGINALBACK = exports.IDENTITY_VISA_ORIGINALFRONT = exports.IDENTITY_VISA = exports.IDENTITY_IDCARD_ADDRESS_COUNTRY = exports.IDENTITY_IDCARD_ADDRESS_POSTCODE = exports.IDENTITY_IDCARD_ADDRESS_REGION = exports.IDENTITY_IDCARD_ADDRESS_CITY = exports.IDENTITY_IDCARD_ADDRESS_STREET1 = exports.IDENTITY_IDCARD_DATEOFBIRTH = exports.IDENTITY_IDCARD_ISSUINGREGION = exports.IDENTITY_IDCARD_ISSUINGCOUNTRY = exports.IDENTITY_IDCARD_EXPIRATIONDATE = exports.IDENTITY_IDCARD_CATEGORY = exports.IDENTITY_IDCARD_IDNUMBER = exports.IDENTITY_IDCARD_FACE = exports.IDENTITY_IDCARD_CROPPEDBACK = exports.IDENTITY_IDCARD_CROPPEDFRONT = exports.IDENTITY_IDCARD_ORIGINALBACK = exports.IDENTITY_IDCARD_ORIGINALFRONT = exports.IDENTITY_IDCARD = exports.IDENTITY_RESIDENTCARD_ADDRESS_COUNTRY = exports.IDENTITY_RESIDENTCARD_ADDRESS_POSTCODE = exports.IDENTITY_RESIDENTCARD_ADDRESS_REGION = exports.IDENTITY_RESIDENTCARD_ADDRESS_CITY = exports.IDENTITY_RESIDENTCARD_ADDRESS_STREET1 = exports.IDENTITY_RESIDENTCARD_DATEOFBIRTH = exports.IDENTITY_RESIDENTCARD_ISSUINGREGION = exports.IDENTITY_RESIDENTCARD_ISSUINGCOUNTRY = exports.IDENTITY_RESIDENTCARD_EXPIRATIONDATE = exports.IDENTITY_RESIDENTCARD_CATEGORY = exports.IDENTITY_RESIDENTCARD_IDNUMBER = exports.IDENTITY_RESIDENTCARD_FACE = exports.IDENTITY_RESIDENTCARD_CROPPEDBACK = exports.IDENTITY_RESIDENTCARD_CROPPEDFRONT = exports.IDENTITY_RESIDENTCARD_ORIGINALBACK = exports.IDENTITY_RESIDENTCARD_ORIGINALFRONT = exports.IDENTITY_RESIDENTCARD = exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_COUNTRY = exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_POSTCODE = exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_REGION = exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_CITY = exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_STREET1 = exports.IDENTITY_RESIDENCEPERMIT_ADDRESS = exports.IDENTITY_RESIDENCEPERMIT_DATEOFBIRTH = void 0; -exports.IDENTITY_ATTESTATION_RECIPIENT = exports.IDENTITY_ATTESTOR = exports.IDENTITY_RESIDENCECARD = exports.IDENTITY_DOCUMENTS_PASSPORT = exports.IDENTITY_BANKINGDETAILS_SORTCODE = exports.IDENTITY_BANKINGDETAILS_TYPE = exports.IDENTITY_BANKINGDETAILS_NUMBER = exports.IDENTITY_BANKINGDETAILS_PHONENUMBER = exports.IDENTITY_BANKINGDETAILS_LASTNAME = exports.IDENTITY_BANKINGDETAILS_FIRSTNAME = exports.IDENTITY_BANKINGDETAILS_TAXCOUNTRY = exports.IDENTITY_BANKINGDETAILS_TAXNUMBER = exports.IDENTITY_BANKINGDETAILS_POSTALCODE = exports.IDENTITY_BANKINGDETAILS_REGION = exports.IDENTITY_BANKINGDETAILS_CITY = exports.IDENTITY_BANKINGDETAILS_STREET2 = exports.IDENTITY_BANKINGDETAILS_STREET1 = exports.IDENTITY_BANKINGDETAILS_COUNTRY = exports.IDENTITY_BANKINGDETAILS_CURRENCY = exports.IDENTITY_BANKACCOUNT = exports.IDENTITY_DOCUMENTS = exports.IDENTITY_BANKINGDETAILS = exports.IDENTITY_LOCATION = exports.IDENTITY_CONTACTDETAILS = exports.IDENTITY_PERSONALDETAILS = exports.IDENTITY_VISA_ADDRESS_COUNTRY = exports.IDENTITY_VISA_ADDRESS_POSTCODE = exports.IDENTITY_VISA_ADDRESS_REGION = exports.IDENTITY_VISA_ADDRESS_CITY = exports.IDENTITY_VISA_ADDRESS_STREET1 = exports.IDENTITY_VISA_DATEOFBIRTH = exports.IDENTITY_VISA_ISSUINGREGION = exports.IDENTITY_VISA_ISSUINGCOUNTRY = void 0; -exports.IDENTITY_ACCOUNT_ID = { - "vdxfid": "i5Xgd7Aqds922eE8FDBUsKHSgiig39AnfS", - "indexid": "xAMo5ubvVBMgep7A6tqdqhoyiNjgq3j1ci", - "hash160result": "4c5e79bf46593fe959cb1918422eaa8fc82b8916", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.account.id" - } -}; -exports.IDENTITY_ACCOUNT_USERID = { - "vdxfid": "iNKVUvr5GzdCHgybMauK11DdZZUyWE3pe3", - "indexid": "xT9bwjHA8JqrurrdDGZTyPkAbDVzR53C2o", - "hash160result": "93b62bfd8c861ac7a5aa3d3d9f618ccd8c04b5ce", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.account.userid" - } -}; -exports.IDENTITY_ACCOUNT_CREATEDAT = { - "vdxfid": "i42uTbJmVBcPacY3Ak1g95LBg5rBBntQby", - "indexid": "x8s1vPjrLVq4CnR52Rfq7TrihjsBzxAEic", - "hash160result": "c40b12b14582c976e67a2e5992b0fdf67fb21f06", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.account.createdat" - } -}; -exports.IDENTITY_ACCOUNT_COMPLETEDAT = { - "vdxfid": "iRJTZj7osY5EYA7pd7K3UcJVAApkvodDjZ", - "indexid": "xW8a2XYtirHuAKzrUnyCSzq2BpqmpCnnHQ", - "hash160result": "c568b6e1f734f5dc9b754e5932ebdb63f2606bef", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.account.completedat" - } -}; -exports.IDENTITY_ACCOUNT_PREVIOUSATTEMPTID = { - "vdxfid": "iGU6RCWyjU1sscCPLN77XhTESJ21JCTNxF", - "indexid": "xMJCszx4anEYVn5RC3mGW5ymTx32EBfaqs", - "hash160result": "50c2b12bb483802d14beae3c6b7454c6ecc0848e", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.account.previousattemptid" - } -}; -exports.IDENTITY_ACCOUNT_SHAREABLEURL = { - "vdxfid": "i92YkV3FVGZfp5Ep3j1sfQUgqUS37M9v82", - "indexid": "xDrfDHULLanLSF7quQg2do1Ds8T3yGCRw3", - "hash160result": "52e9f990e5e89cc1088acd29a2fda0ef140ae73c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.account.shareableurl" - } -}; -exports.IDENTITY_ACCOUNT_TEMPLATEID = { - "vdxfid": "iL5diuVsHAG5DLVeyc8XYdEXR6fFro5G7s", - "indexid": "xQukBhvx8UUjqWNgqHngX1m4SkgGhnybh1", - "hash160result": "37ef653fe6685fca132d77834384702f6cd225b6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.account.templateid" - } -}; -exports.IDENTITY_ACCOUNT_TEMPLATEVERSION = { - "vdxfid": "i7eBZNzKrgFov6c2Sx2QecyEmPq2Mc4BGe", - "indexid": "xCUJ2BRQhzUUYGV4JdgZd1Vmo3r39BsUym", - "hash160result": "e6e490ce8bfde333ab0374880ea0efbb9c12b42d", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.account.templateversion" - } -}; -exports.IDENTITY_ACCOUNT_STATUS = { - "vdxfid": "iJf3EbihEtdEpJjbQ6PgUaL3GxDgZRzSWk", - "indexid": "xPV9hQ9n6CquSUcdFn3qSxraJcEhVfWa72", - "hash160result": "d6fc5578c2fbed3251f3aa250c73b58386ec86a6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.account.status" - } -}; -exports.IDENTITY_PHONENUMBER = { - "vdxfid": "iAQY8o4HwupzcJAw9aBtFwgrvWZGQStkge", - "indexid": "xFEebbVNoE3fEU3y1Fr3ELDPxAaHE7V2kN", - "hash160result": "32bc2c7919f626c39679630ee4d6d6d07bcd074c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.phonenumber" - } -}; -exports.IDENTITY_DATEOFBIRTH = { - "vdxfid": "iSZsa7C4esogN3W6fBngUHR6GvSmt7We4j", - "indexid": "xXPz2ud9WC2LzDP8WsSqSfwdJaTnqpHdND", - "hash160result": "ab74371e952a27f615b079d3c084b38b98c84dfd", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.dateofbirth" - } -}; -exports.IDENTITY_OVER18 = { - "vdxfid": "iHPD8vB7jhtbuqPkUqzheqcZdfAfHUFVzM", - "indexid": "xNDKbicCb27GY1GnLXerdE96fKBg9tLUDT", - "hash160result": "28139ce1eae370e76f749066f778466597689098", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.over18" - } -}; -exports.IDENTITY_OVER21 = { - "vdxfid": "iAXYYrZaipc4DAmAKXUFYZxavsf6uBJqaj", - "indexid": "xFMf1ezfa8piqLeCBD8QWxV7xXg7mxMc1Z", - "hash160result": "7a1fee70ace1c048c0a93c120a8a4c5f890f5b4d", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.over21" - } -}; -exports.IDENTITY_OVER25 = { - "vdxfid": "iDuForPTZFeFBAgDX1HyrP3d6of7wzrRaS", - "indexid": "xJjNGepYQZruoLZFNgx8pmaA8Tg8qSfnzM", - "hash160result": "2a1e6fa6913ea3659dcaf1c5bc20a96e399d5e72", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.over25" - } -}; -exports.IDENTITY_ACCOUNT_REQUESTING_IPADDRESS = { - "vdxfid": "i4uE1EvnDbq9WGhF5UbBr6fbxNLsgk1eZ3", - "indexid": "x9jLU3Ms4v3p8SaGwAFLpVC8z2MtYJTVwp", - "hash160result": "05a3aa58192812972a2c4e4184af7bb5fbf9a30f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.account.requesting.ipaddress" - } -}; -exports.IDENTITY_EMAIL = { - "vdxfid": "iJ4pq4DCymfbu8SAuXyNhasLeSHFNKPr23", - "indexid": "xNtwHreHq5tGXJKCmDdXfyPsg6JGHUY6X1", - "hash160result": "15a8095b6298bbff5147060d9a6363a9df6c0ea0", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.email" - } -}; -exports.IDENTITY_NATIONALITY = { - "vdxfid": "iEUYNTkw6kFhZWto7vyTpQqtdRL7eoKZY2", - "indexid": "xKJeqGC1x4UNBgmpycdcnoNRf5M8btexbt", - "hash160result": "db935713b90281d6aefe5e7b33e5b660962aaa78", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.nationality" - } -}; -exports.IDENTITY_FIRSTNAME = { - "vdxfid": "iLB8SG7ErJtTYcG1f4w9RLuMJPpAsjFkiL", - "indexid": "xR1Eu4YKhd78An93WkbJPjRtL3qBprmMno", - "hash160result": "0bab76359b70b37c858399c2a3776939c5de2fb7", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.firstname" - } -}; -exports.IDENTITY_MIDDLENAME = { - "vdxfid": "iHG6ALRUPyRcgJMsPqBmvUCZxe4PrMfgej", - "indexid": "xN6Cd8rZFHeHJUEuFWqvtrj6zJ5QjX94j5", - "hash160result": "b98bd82034ec86ae5538313c9f5501c086ac3797", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.middlename" - } -}; -exports.IDENTITY_LASTNAME = { - "vdxfid": "iKRmfy4xgjWQyPdXYie6dJezRXF4aKdbHB", - "indexid": "xQFt8mW3Y3j5bZWZQQJFbhBXTBG5S4vdaZ", - "hash160result": "6b597e0c05d1430566b7b17a59da683fb4a6fcae", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.lastname" - } -}; -exports.IDENTITY_GENDER = { - "vdxfid": "iShgSBdiYDQnVwgNcDnSbNYHGU6CTwBDb1", - "indexid": "xXXntz4oPXdT87ZQTuSbZm4pJ87DGEgHpG", - "hash160result": "3baee594e927d47b641c7cf3927ab3229dd0c7fe", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.gender" - } -}; -exports.IDENTITY_HEIGHT = { - "vdxfid": "iLmLmsFMTUm4dd2iMuMe4xaMC8VSZN9soP", - "indexid": "xRbTEfgSJnyjFnukDb1o3M6tDnWTSUiii7", - "hash160result": "e80652253fa52b95cd9ea5ff43d51642ea4fa8bd", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.height" - } -}; -exports.IDENTITY_EYECOLOR = { - "vdxfid": "iRo2XT8tcMtLTpuPJ6V5WxbnVWa2CrcdsJ", - "indexid": "xWd8zFZyTg715znR9n9EVM8KXAb328xGbZ", - "hash160result": "c60fdfcc04173f273aa92a3b1844964b368ad2f4", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.eyecolor" - } -}; -exports.IDENTITY_ETHNICITY = { - "vdxfid": "i9jHPJokwnLoCQ83P6jqezCcEZUD1g34B9", - "indexid": "xEZPr7Eqo6ZTpa15EnPzdNj9GDVDsfToki", - "hash160result": "0476d568a9cf949bc8b6d84dc73e38cf85449b44", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.ethnicity" - } -}; -exports.IDENTITY_WEIGHT = { - "vdxfid": "iMzGK44r6SNkzi3N3AmcZBtuysPvgYiRiT", - "indexid": "xSpNmrVvwkbRcsvPtrRmXaRT1XQwXFe2Ut", - "hash160result": "8abe0e94cb1ff345f1351720acc8eefed91e12cb", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.weight" - } -}; -exports.IDENTITY_HOMEADDRESS = { - "vdxfid": "i9A1fD5sVwFFXzEmCJWSRDqN94PXp9oNaS", - "indexid": "xDz881WxMFTvAA7o3zAbPcMuAiQYiT4Vnc", - "hash160result": "072a3abed3a353e001288074d9426285e569503e", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.homeaddress" - } -}; -exports.IDENTITY_HOMEADDRESS_STREET1 = { - "vdxfid": "i5BJAwQbrP4Bht8gUpoqSrovuBwfRc6jiv", - "indexid": "xA1QdjqghhGrL41iLWTzRFLTvqxgNsVzXY", - "hash160result": "ff22b196e64c9388daab76a57bcaea50491cae12", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.homeaddress.street1" - } -}; -exports.IDENTITY_HOMEADDRESS_STREET2 = { - "vdxfid": "iMx71C14hrBoWD3yyhYChmhJEw4Kqw1zj4", - "indexid": "xSnDTzS9ZAQU8Nw1qPCMgADqGb5Lgqb4zw", - "hash160result": "efdda473a6a9e98cd91b02d36bfeb5dec784a9ca", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.homeaddress.street2" - } -}; -exports.IDENTITY_HOMEADDRESS_CITY = { - "vdxfid": "i75ZpW5T6wgQEMVxyvqHT9ZaV4fjsQ7kws", - "indexid": "xBugHJWXxFu4rXNzqcVSRY67WigkoCUEUQ", - "hash160result": "fcae40d5d327f13dc0e0c1e80f3db212a4ed8827", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.homeaddress.city" - } -}; -exports.IDENTITY_HOMEADDRESS_REGION = { - "vdxfid": "iRkYck3JowdFWmrM6VUAS8Wtpmxds2fLXS", - "indexid": "xWaf5YUPfFqv8wjNxB8KQX3RrRyenbioh5", - "hash160result": "fa06b90a547658a3efc3cd1797d6b3cd30695af4", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.homeaddress.region" - } -}; -exports.IDENTITY_HOMEADDRESS_POSTCODE = { - "vdxfid": "iAL2FRG8PVi18fN8MatjXhV1YkuZr7PM4T", - "indexid": "xFA8iDhDEovfkqFADGYtW61YaQvahtrhJA", - "hash160result": "b4f4c3a08fdcf32209482fa3d8c7b01201312d4b", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.homeaddress.postcode" - } -}; -exports.IDENTITY_HOMEADDRESS_COUNTRY = { - "vdxfid": "iABYGvas6uUDk9ejCkfCVLvE9PPJXgyCKX", - "indexid": "xF1ejj1wxDgtNKXm4SKMTjSmB3QKL8LhQG", - "hash160result": "bafb2cb6d5cc86478622feb8a00097d71d839249", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.homeaddress.country" - } -}; -exports.IDENTITY_IDNUMBER_VALUE = { - "vdxfid": "iQrnvbCNWMaG6PjTmeXzrcuAXKsMzmNJWA", - "indexid": "xVguPPdTMfnviZcVdLC9q1RhYytNuZ3ToS", - "hash160result": "72cf52b2f6b4f68173c933fb046e892870b990ea", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idnumber.value" - } -}; -exports.IDENTITY_IDNUMBER_TYPE = { - "vdxfid": "iSSZX5yUdQh7zLf1gUewH5rVfbXtSq2c4s", - "indexid": "xXGfytQZUiuncWY3YAK6FUP2hFYuQ4yYwW", - "hash160result": "2807f356d687b4c6208ce0379b31043c7fcdebfb", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idnumber.type" - } -}; -exports.IDENTITY_VERIFICATION_STATUS = { - "vdxfid": "i8MhqW3ejupmV1M5UyhyhG13dkS8A7g7zg", - "indexid": "xDBpJJUjbE3S7BE7LfN8feXafQT92YQZPm", - "hash160result": "47f2864de74ffe01ccb7eeabf0f2d848e3668e35", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.verification.status" - } -}; -exports.IDENTITY_VERIFICATION_APPROVALS = { - "vdxfid": "iBMkZtqC9yqVrFL4GfYtXckFpYAhRkE2mj", - "indexid": "xGBs2hGH1J4AURD68MD3W1GnrCBiJ3nRgG", - "hash160result": "a98801de1ba5ff5e571dbdde50519483140f7956", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.verification.approvals" - } -}; -exports.IDENTITY_VERIFICATION_APPROVALS_ACCEPTEDTOS = { - "vdxfid": "iH32QkXBKyWEJD6kh9HJ4KMfeiWfPWoHEh", - "indexid": "xMs8sYxGBHitvNynYpwT2htCgNXgHt6VAW", - "hash160result": "bbe4c09ae069561d3c14b04e3b7b96c98622bf94", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.verification.approvals.acceptedtos" - } -}; -exports.IDENTITY_VERIFICATION_APPROVALS_VERIFIEDSMS = { - "vdxfid": "iPgyMDFQ9QMNrqc3ckEBEubDNwLnvubUdW", - "indexid": "xUX5p1gUzia3V1V5URtLDJ7kQbMosPsVj8", - "hash160result": "72853b66aa158531e1f15b9ff075199a1224bddd", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.verification.approvals.verifiedsms" - } -}; -exports.IDENTITY_VERIFICATION_APPROVALS_KYCCHECKED = { - "vdxfid": "iRnbiA4dAPbeuB6KQN2donBHP9mKUHHFZf", - "indexid": "xWciAxVi1hpKXLyMG3gnnAhpQonLQapWPv", - "hash160result": "c6114ffec250b746bde117903b930d9a34d3bdf4", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.verification.approvals.kycchecked" - } -}; -exports.IDENTITY_VERIFICATION_APPROVALS_DOCUMENTSVERIFIED = { - "vdxfid": "iBjML9DHV67MBQyMEHVTSoJPhU8DNeWRTE", - "indexid": "xGZTnweNLQL1oarP5y9cRBpvj89EGt5VSm", - "hash160result": "0a93883010769ff783be5ced074ecfa50dd08e5a", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.verification.approvals.documentsverified" - } -}; -exports.IDENTITY_VERIFICATION_APPROVALS_SELFIECHECKED = { - "vdxfid": "iKgeFKoy6WMx9MoEjig5vHoXbyxVFBPWDN", - "indexid": "xQWki8F3wpacmXgGbQLEtgL4ddyWC8UZLv", - "hash160result": "6a044306ef77ce9896ffcd26ee40174651b1ccb1", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.verification.approvals.selfiechecked" - } -}; -exports.IDENTITY_VERIFICATION_APPROVALS_WATCHLISTOK = { - "vdxfid": "iFDB1qKYSrWMRaMCWX6hNGE8HVXB1cNtJu", - "indexid": "xL3HUdkdJAj23kEENCkrLekfK9YBymnLrX", - "hash160result": "e691a2d2af30df6ee21f0eb805a98e11d539ba80", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.verification.approvals.watchlistok" - } -}; -exports.IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK = { - "vdxfid": "i9dva492S7vQphjLiK2UaS7JikZKs5TQsB", - "indexid": "xEU32ra7HS95SscNZzgdYpdqkQaLjnzcyC", - "hash160result": "6ffdbee07124450d29698724573bd6ab07d09743", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.verification.approvals.riskcheckok" - } -}; -exports.IDENTITY_VERIFICATION_APPROVALS_STATUS = { - "vdxfid": "iKhGUcTH4ZQ7uiy933m8f1GbwSLcwJW8ev", - "indexid": "xQXNwQtMuscnXtrAtjRHdPo8y6MdomjAXM", - "hash160result": "00612f17d9cedc346fcd139c0c5b56e666efeab1", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.verification.approvals.status" - } -}; -exports.IDENTITY_DRIVINGLICENCE = { - "vdxfid": "iMYQw33ryywcNyQDjFjiVvFm2kAwG85poV", - "indexid": "xSNXPqUwqJAH19HFawPsUJnJ4QBxCATPNx", - "hash160result": "e2857ddcc4f3301c354a00d1376558a75e802ec6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence" - } -}; -exports.IDENTITY_DRIVINGLICENCE_ORIGINALFRONT = { - "vdxfid": "i3fq6ET2dL8CxC3BJzdYTpUsjEsQaKP7bX", - "indexid": "x8VwZ2t7UeLsaMvDAgHhSD1QkttRPYndPW", - "hash160result": "26bab54e1f760b1abb888229a38a5179cc502302", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.originalfront" - } -}; -exports.IDENTITY_DRIVINGLICENCE_ORIGINALBACK = { - "vdxfid": "i7LTNZvJmm5LjAwMWuryb52yKt7txaV5FW", - "indexid": "xCAZqNMPd5J1MLpPNbX8ZTZWMY8unxdAfs", - "hash160result": "c7b3e9a70908fafc8de3e81f6ac2e0c131c9592a", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.originalback" - } -}; -exports.IDENTITY_DRIVINGLICENCE_CROPPEDFRONT = { - "vdxfid": "i8KsL3JJgbJyuqEyEbu5KZkDBFvHscLoM6", - "indexid": "xD9ynqjPXuXeY1816HZEHxGkCuwJoHBx54", - "hash160result": "7b28226a4f3eaae379cddbc84d037cfe587e3535", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.croppedfront" - } -}; -exports.IDENTITY_DRIVINGLICENCE_CROPPEDBACK = { - "vdxfid": "iRwumhx12vtT8CkspBLmKQY8WZywurxVXo", - "indexid": "xWn2EWP5tF77kNdufrzvHo4fYDzxhjXyZz", - "hash160result": "0b6edf21bfe119173b3fffab6118d79a39a580f6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.croppedback" - } -}; -exports.IDENTITY_DRIVINGLICENCE_FACE = { - "vdxfid": "i5i7U4EAbgPzhCRebtbmoZt6pTyqGqP8jj", - "indexid": "xAYDvrfFSzcfKNJgTaFvmxQdr7zr6oGgFh", - "hash160result": "1f47647bf3e71f0c1c2638c99e6a42e6bf118218", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.face" - } -}; -exports.IDENTITY_DRIVINGLICENCE_IDNUMBER = { - "vdxfid": "iBCA8b4zS5ygVgTFqxabke7BBFs92dhcXQ", - "indexid": "xG2GbPW5HQCM7rLHheEkj2diCut9vgFhM2", - "hash160result": "fcf0571278bd1afce6d93f0a99f41437bb91a854", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.idnumber" - } -}; -exports.IDENTITY_DRIVINGLICENCE_CATEGORY = { - "vdxfid": "i5Cm95DZa6FPP66bA6aFfoYL2jaojetHMp", - "indexid": "xA2sbseeRQU41Fyd1nEQeC4s4Pbpf63xB4", - "hash160result": "3b91fccdf59d99b21e442441b89abb31bf09f512", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.category" - } -}; -exports.IDENTITY_DRIVINGLICENCE_EXPIRATIONDATE = { - "vdxfid": "iJvGpPoP1uUkUqn9bAchLyfaGWyy8JGQoX", - "indexid": "xPkPHCETsDhR71fBSrGrKNC7JAzz17RsLk", - "hash160result": "96aee63b3c6094a4d9edbc04b63a8e45688068a9", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.expirationdate" - } -}; -exports.IDENTITY_DRIVINGLICENCE_ISSUINGCOUNTRY = { - "vdxfid": "iBsNEqysX64cQAjiRHHL1msd7LxroGM6Mb", - "indexid": "xGhUheQxNQHH2LckGxwUzAQA8zysfnKDSU", - "hash160result": "f2f24dd2383538493d21ff0aca77c7cd1fe6125c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.issuingcountry" - } -}; -exports.IDENTITY_DRIVINGLICENCE_ISSUINGREGION = { - "vdxfid": "i6gZSDYpK9inexaeFQDSk9GuAmew1ymMFo", - "indexid": "xBWfu1yuATwTH8Tg75sbiXoSCRfwsxQzeR", - "hash160result": "67f4fd5c49250912aecf1eb8ab17f29d590a2f23", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.issuingregion" - } -}; -exports.IDENTITY_DRIVINGLICENCE_DATEOFBIRTH = { - "vdxfid": "iChWUsL1NQwDqcwXbFGxHiCegfquGPyadv", - "indexid": "xHXcwfm6Dj9tTnpZSvw7G6jBiKrvBUhwaw", - "hash160result": "3c7bd13bcdb54368e7590a9f2da5b201b7be2d65", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.dateofbirth" - } -}; -exports.IDENTITY_DRIVINGLICENCE_ADDRESS_STREET1 = { - "vdxfid": "i9xaEvSQ537wuYgcVPRgG3zop9bVzeDTBw", - "indexid": "xEnghisUvMLcXiZeM55qESXLqocWsv6zmJ", - "hash160result": "48dd1caf84c1a49209ca44064846dc4ad0be1e47", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.address.street1" - } -}; -exports.IDENTITY_DRIVINGLICENCE_ADDRESS_CITY = { - "vdxfid": "i6XMEh3jrxzdyoVYoNWhRSncR9oWSnmikd", - "indexid": "xBMThVUpiHDJbyNaf4ArPqK9SopXGndEyv", - "hash160result": "c1f3612774870d1f12320bff317e7790211d7121", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.address.city" - } -}; -exports.IDENTITY_DRIVINGLICENCE_ADDRESS_REGION = { - "vdxfid": "i7sPBSqerD23RAqfN167aYePjfC8LL34UA", - "indexid": "xChVeFGjhXEi3LihDgkGYwAvmKD9CsNunu", - "hash160result": "991d24c053cb59a816e161fe3af2f40a7f2e3330", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.address.region" - } -}; -exports.IDENTITY_DRIVINGLICENCE_ADDRESS_POSTCODE = { - "vdxfid": "i9eHAmpeA3tmpsVeG5EkHuVfALFrmpzLqM", - "indexid": "xEUPdaFj1N7ST3Ng7ktuGJ2CBzGsZbja5V", - "hash160result": "f5905bbdf2eb60b24ccf6851716cc0efe801a943", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.address.postcode" - } -}; -exports.IDENTITY_DRIVINGLICENCE_ADDRESS_COUNTRY = { - "vdxfid": "i3xAMYBKLVdK89kuheXhTjuJTAxozmypj3", - "indexid": "x8nGpLcQBoqykKdwZLBrS8RqUpypqVUEV5", - "hash160result": "459844e00df4387514f31f182a88f7e13b0d3a05", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.address.country" - } -}; -exports.IDENTITY_SELFIECHECK_IMAGE = { - "vdxfid": "iC22PxGqY7Mx3YT9kNrW1d11JNyGL56N8e", - "indexid": "xGr8rkhvPRacfiLBc4Wez1XYL2zHDDbJgD", - "hash160result": "c52d0023cce8c847a5097b6898f867651914b65d", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.selfiecheck.image" - } -}; -exports.IDENTITY_SELFIECHECK_VIDEO = { - "vdxfid": "iLfnRYzcdQXR6am8rZk7xNtTUbLZo5NLG6", - "indexid": "xRVttMRhUik5ikeAiFQGvmQzWFMajwrVzX", - "hash160result": "ac0674f6d656d434e0b5b310daaaed554c3a9bbc", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.selfiecheck.video" - } -}; -exports.IDENTITY_EMAIL_ISDELIVERABLE = { - "vdxfid": "iN5Tdse8NSwuW6A4ZavHbHoDyD8aVjn1Ky", - "indexid": "xSua6g5DDmAa8G36RGaSZgKkzs9bSnFbCX", - "hash160result": "8194ee01a0bc66dca2af9ba7c3bba4a24da70dcc", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.email.isdeliverable" - } -}; -exports.IDENTITY_EMAIL_BREACHCOUNT = { - "vdxfid": "iDy1YKGhzVjAiMiuAvFDqxQbmLRhLEjwPo", - "indexid": "xJo817hnqowqLXbw2buNpLw8nzSiAygHhx", - "hash160result": "8144d2d8cafd733bb03847166be8493d275e1473", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.email.breachcount" - } -}; -exports.IDENTITY_EMAIL_FIRSTBREACHEDAT = { - "vdxfid": "i3eSGR4wrLk5djHsnT18dDHrJBFSBBxVST", - "indexid": "x8UYjDW2hexkFuAue8fHbbpPKqGT4mjAzH", - "hash160result": "df796054181f57d3b61d655d604d42d6c6d8df01", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.email.firstbreachedat" - } -}; -exports.IDENTITY_EMAIL_LASTBREACHEDAT = { - "vdxfid": "iCuZWBzmxCoFcRFjXYFgC6g4jT7kzxvhew", - "indexid": "xHjfxzRroX1vEb8mPDuqAVCbm78ms8Hkhd", - "hash160result": "d1b421db4c835cfa67b491342c31f89283427567", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.email.lastbreachedat" - } -}; -exports.IDENTITY_EMAIL_DOMAIN_REGISTEREDAT = { - "vdxfid": "iGxV4SBRZMk5qWrQEKgUS4RoqzpDmyBEpC", - "indexid": "xMnbXEcWQfxkTgjS61LdQSxLseqEcTADNA", - "hash160result": "e195ef220f8e71bfa7bef160291ecaa0164de393", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.email.domain.registeredat" - } -}; -exports.IDENTITY_EMAIL_DOMAIN_FREEPROVIDER = { - "vdxfid": "iLUfvKcg92CYo3BvCuRf5o844d44kGLhJL", - "indexid": "xRJnP83kzLRDRD4x4b5p4Beb6H55fetTy7", - "hash160result": "0b0f213c88a1b0df6cd01721955b1d0c103981ba", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.email.domain.freeprovider" - } -}; -exports.IDENTITY_EMAIL_DOMAIN_CUSTOM = { - "vdxfid": "i4FSBFpQ6Ccjiy2g61GrxhBppv1jDDh6on", - "indexid": "x95Ye4FUwWqQM8uhwgw1w5iMra2k7F1Lfz", - "hash160result": "bea1175185aeaf256aa7f04795b2c8d0c8547e08", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.email.domain.custom" - } -}; -exports.IDENTITY_EMAIL_DOMAIN_DISPOSABLE = { - "vdxfid": "i52PJxRyjKAEkmQFd2oGYgZV3pcsQUcD1T", - "indexid": "x9rVmks4adNuNwHHUiTRX5625UdtJPBQ1w", - "hash160result": "3adf98cb5cc90a074a52a651c50f67f5f0a7fe10", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.email.domain.disposable" - } -}; -exports.IDENTITY_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS = { - "vdxfid": "iCtAZWinafiyf4tmvPxFkKNn5KxayXTPSV", - "indexid": "xHiH2K9sRyweHEmon5cQihuK6yybre797b", - "hash160result": "85477eb8148562614c396ca64fc7563637b13167", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.email.domain.toplevel.suspicious" - } -}; -exports.IDENTITY_PASSPORT = { - "vdxfid": "iKgbqmZ4Ks9SPNQGj5PZ5TgXomYG4CtaXv", - "indexid": "xQWiJZz9BBN71YHJam3i3rD4qRZH1sbLHD", - "hash160result": "775f52820102c994e30a29b1828b064421afcab1", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport" - } -}; -exports.IDENTITY_PASSPORT_ORIGINALFRONT = { - "vdxfid": "iCwT1mHdci9wooC6Q8mtx8QssXzwiL4hxp", - "indexid": "xHmZUZiiU2NcRy58FpS3vWwQuC1xdM48mW", - "hash160result": "25023e23a25ba4daa7ac0a9c96180f5e90acd067", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.originalfront" - } -}; -exports.IDENTITY_PASSPORT_ORIGINALBACK = { - "vdxfid": "iDXKJaroNRKr9GZfLFvH7LttJQaXqGoSrc", - "indexid": "xJMRmPHtDjYWmSShBwaS5jRRL4bYmTdC9J", - "hash160result": "21734b0f37ec51dd77bdab8c10065cf67b61386e", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.originalback" - } -}; -exports.IDENTITY_PASSPORT_CROPPEDFRONT = { - "vdxfid": "i4cr6CxCYDHUDjc6UoMsDVAZoNep6Meuyi", - "indexid": "x9SxZ1PHPXW8quV8LV22Bsh6q2fpxtJ6Zd", - "hash160result": "274c241806d31576a57a074cc2f6b4c624078b0c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.croppedfront" - } -}; -exports.IDENTITY_PASSPORT_CROPPEDBACK = { - "vdxfid": "i6wA2ttX7vcxBXmrdmGEa44NZEFBZWoRYa", - "indexid": "xBmGVhKbyEqcohetVSvPYSauatGCUYDMs2", - "hash160result": "f56f1db46ddebc99f3c8954fc8bf1d26a9bef125", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.croppedback" - } -}; -exports.IDENTITY_PASSPORT_FACE = { - "vdxfid": "iLCbvnyU4V3XeMz18CXAG5MCtjb2FjpcZX", - "indexid": "xR2iPbQYuoGCGXs2ytBKETsjvPc35DNZDm", - "hash160result": "26f7dc9d524f84a21c8a9e3f2dc5149f3a3c77b7", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.face" - } -}; -exports.IDENTITY_PASSPORT_IDNUMBER = { - "vdxfid": "iDYih1jmCA1oexyxZ1PQFL5ewyciqoQ2rw", - "indexid": "xJNq9pAr3UEUH8rzQh3ZDicByddjgKM4vN", - "hash160result": "c8a25af227fc07e260119b370da0eae2a9517c6e", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.idnumber" - } -}; -exports.IDENTITY_PASSPORT_CATEGORY = { - "vdxfid": "iMtpUJYWZmnnSJyJcshHRdWJZMhZVZZifT", - "indexid": "xSivw6ybR61T4UrLUZMSQ22qb1iaQux7BU", - "hash160result": "84a9f125285d7e93a1e676ed48e3fbe459780aca", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.category" - } -}; -exports.IDENTITY_PASSPORT_EXPIRATIONDATE = { - "vdxfid": "i98TaZ3wTh3qRw2ufeunVY2MD5eKwoamGE", - "indexid": "xDxa3MV2K1GW46uwXLZwTvYtEjfLspcYEK", - "hash160result": "07727b480c654d59cb611ed01715e254eb37053e", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.expirationdate" - } -}; -exports.IDENTITY_PASSPORT_ISSUINGCOUNTRY = { - "vdxfid": "iRHGM2GEYeRUuHKSG1wENVA16bdyVRxchn", - "indexid": "xW7NophKPxe9XTCU7hbPLsgY8FezLKmJHi", - "hash160result": "4798dee337b16fc22d26748fb0803738f99831ef", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.issuingcountry" - } -}; -exports.IDENTITY_PASSPORT_ISSUINGREGION = { - "vdxfid": "i6Ay9VdcZjGrJur5SNyhBDZWzxGmo7qUmW", - "indexid": "xB15cJ4hR3VWw5j7J4dr9c642cHnbq2nm9", - "hash160result": "f3d9b605096f4c816de7d72c597fee07e75a961d", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.issuingregion" - } -}; -exports.IDENTITY_PASSPORT_DATEOFBIRTH = { - "vdxfid": "iAjG8DwYfKxt9affJy6CUBDDFK5jaeHRLJ", - "indexid": "xFZNb2NdWeBYmkYhAekMSZjkGy6kWqAqyd", - "hash160result": "73eb23619d178f495a24b41aaf6aac107357924f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.dateofbirth" - } -}; -exports.IDENTITY_PASSPORT_ADDRESS_STREET1 = { - "vdxfid": "i7HPJNB16V5pws8xSq4a8pHF29Mcg6sUyy", - "indexid": "xC7VmAc5woJVa31zJWij7Con3oNdXuBysY", - "hash160result": "c28625c4dfc12d3cdd85f8c7272e87a57523c529", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.address.street1" - } -}; -exports.IDENTITY_PASSPORT_ADDRESS_CITY = { - "vdxfid": "iFSLsk21VvWSWLg9a4XFTB3kEN8bLnTB7c", - "indexid": "xLGTLYT6MEj78WZBRkBQRZaHG29cBfjnYu", - "hash160result": "c06884e75232e86de75c6ccbd5605a3352dd3783", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.address.city" - } -}; -exports.IDENTITY_PASSPORT_ADDRESS_REGION = { - "vdxfid": "iFNoUQhExFEYTgrqgy7x22Q6URM7ek9L3J", - "indexid": "xLCuwD8KoZTD5rjsYen6zQvdW5N8Z4oGqf", - "hash160result": "7b7baa6d0d788f434536aa472c57d9de40678c82", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.address.region" - } -}; -exports.IDENTITY_PASSPORT_ADDRESS_POSTCODE = { - "vdxfid": "iS4SakGdB4ek1Q1QAitXUwFEk1RVyi3rLY", - "indexid": "xWtZ3Yhi2NsQdZtS2QYgTKmmmfSWrxdFKY", - "hash160result": "4457551bc48db37393f5ec3ec3d0cf6766dcbcf7", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.address.postcode" - } -}; -exports.IDENTITY_PASSPORT_ADDRESS_COUNTRY = { - "vdxfid": "iB9w9GgcJdGTt3ZuM2pm5qpDBA3UaJdcvj", - "indexid": "xFz3c57h9wV8WDSwCiUv4ELkCp4VNyPHLr", - "hash160result": "dd93bcbecc805e5b1606efafa1ecab6b33e53c54", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.address.country" - } -}; -exports.IDENTITY_RESIDENCEPERMIT = { - "vdxfid": "i8WZetqKFn98rHRZGvAvPuzPyrJeyUMjfb", - "indexid": "xDLg7hGQ76MoUTJb8bq5NJWw1WKftQg9VL", - "hash160result": "712ef00d9937eb4ade0fd3e627c2df1d99503b37", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit" - } -}; -exports.IDENTITY_RESIDENCEPERMIT_ORIGINALFRONT = { - "vdxfid": "iC5NrmPgKckxBjKv7v9HjUMytm4jRtEBgZ", - "indexid": "xGuVKZpmAvycouCwyboShrtWvR5kNYzWoH", - "hash160result": "639ed2ef9da2f5e75fe63e1ccf83d1b54e68585e", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.originalfront" - } -}; -exports.IDENTITY_RESIDENCEPERMIT_ORIGINALBACK = { - "vdxfid": "iLTPvrZi8HNALuVmYeAWnSnLdZ5GsAAUcx", - "indexid": "xRHWPeznybapy5NoQKpfkqJsfD6HmQW5eW", - "hash160result": "94d200a22dbdfa7ba47d1970c21eacb65f7543ba", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.originalback" - } -}; -exports.IDENTITY_RESIDENCEPERMIT_CROPPEDFRONT = { - "vdxfid": "i6T3rairykWA5vVEtQqptjp5RBRhTCmsBS", - "indexid": "xBHAKP9wq4ipi6NGk6Vys8LcSqSiKAMKZU", - "hash160result": "14136815f288a4b6426c7f4ab6b28221dcf0a020", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.croppedfront" - } -}; -exports.IDENTITY_RESIDENCEPERMIT_CROPPEDBACK = { - "vdxfid": "iHssgpjB2gsusjjLH36N3KqUQqz7JPXumA", - "indexid": "xNhz9dAFt16aVucN8ikX1iN1SW18D7SNDP", - "hash160result": "ce3cae77f2010009817f1e01de52ce8a493cfc9d", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.croppedback" - } -}; -exports.IDENTITY_RESIDENCEPERMIT_FACE = { - "vdxfid": "iNVvVYKcKuredXKvctn5uQxp3kNXoJrwNb", - "indexid": "xTL2xLkhBE5KFhCxUaSEsoVM5QPYfELeHf", - "hash160result": "4dd17db50d569a63cc892d78850ac9de1d0eaed0", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.face" - } -}; -exports.IDENTITY_RESIDENCEPERMIT_IDNUMBER = { - "vdxfid": "iMxygBvDFftAnmUCjVLh21etV5v4wt9zdk", - "indexid": "xSo68zMJ6z6qQwMEbAzqzQBRWjw5u6Tm63", - "hash160result": "ab544471e583d6a11245bb971e3ee1ef5ed1d3ca", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.idnumber" - } -}; -exports.IDENTITY_RESIDENCEPERMIT_CATEGORY = { - "vdxfid": "iGbMb21an69VE6iTH2iRtRFKCEUZPJHTwU", - "indexid": "xMRU3pSfdQN9rGbV8iNaromrDtVaCufAXu", - "hash160result": "ae9031bab1ee600e10aa16ec1d4c13def953e48f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.category" - } -}; -exports.IDENTITY_RESIDENCEPERMIT_EXPIRATIONDATE = { - "vdxfid": "iJ48ALemxyMV6DYzeuRMe8Fn78iMZdjSXZ", - "indexid": "xNtEd95rpHa9iPS2Wb5WcWnK8njNXD9HEH", - "hash160result": "d3083b08621d6ff5dc3f7f9cace34f944d7aec9f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.expirationdate" - } -}; -exports.IDENTITY_RESIDENCEPERMIT_ISSUINGCOUNTRY = { - "vdxfid": "i7UhTp4gruQwtkC1bi4RxE4wUAsro6n9Ym", - "indexid": "xCJovcVmiDdcWv53TPiavcbUVptsgMKzdL", - "hash160result": "75e37dc8957c8c6765c60962804d446b2de0e82b", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.issuingcountry" - } -}; -exports.IDENTITY_RESIDENCEPERMIT_ISSUINGREGION = { - "vdxfid": "iERBNWk2tyaGJ2w8P1kM88Mdj5WA9qFzbv", - "indexid": "xKFHqKB7kHnvvCpAEhQW6WtAkjXAymjqXM", - "hash160result": "788165581de37b5473c2f127d387f3d7a8630778", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.issuingregion" - } -}; -exports.IDENTITY_RESIDENCEPERMIT_DATEOFBIRTH = { - "vdxfid": "iM62dN7LSHWDuetPi6qAewG6bzYwFrcqBN", - "indexid": "xRv96AYRHbitXpmRZnVKdKnddeZxAivvFE", - "hash160result": "e2533190e4822ab51c5b2029039fbb0d431131c1", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.dateofbirth" - } -}; -exports.IDENTITY_RESIDENCEPERMIT_ADDRESS = { - "vdxfid": "iCA8P2rVs5DjtzQpXEnPJcG4KBs79C9EpL", - "indexid": "xGzEqqHaiPSQXAHrNvSYGznbLqt83gLGV5", - "hash160result": "2c7264a72e1d7937da951620039e48a0c8663e5f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.address" - } -}; -exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_STREET1 = { - "vdxfid": "iMuY2CbmQpCFzodGBtqxogmTb5dYfNbCJa", - "indexid": "xSjeV12rG8QvcyWJ3aW7n5HzcjeZaxtGwr", - "hash160result": "444cbb0dc6f471ecb2261dc7d6731cd97e272dca", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.address.street1" - } -}; -exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_CITY = { - "vdxfid": "iRckJ1VkfYazfVHWJuA9iXTth83ZYp8znz", - "indexid": "xWSrkovqWrofHfAYAapJguzRin4aPEqHJK", - "hash160result": "73e22f5d24515103052ab165736a0198a7d4e0f2", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.address.city" - } -}; -exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_REGION = { - "vdxfid": "iBpH337NTJSLjSxbBWuu2wBLu12k4JVGk4", - "indexid": "xGePVqYTJcf1Mcqd3Ca41Khsvf3kyxtNXH", - "hash160result": "2f7b3040cf60259ee4bf6dfc93a4de42ab4e7d5b", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.address.region" - } -}; -exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_POSTCODE = { - "vdxfid": "iGKi47jtg6CumKYSUBj57drgLNGzhJY3Gj", - "indexid": "xM9pWvAyXQRaPVRUKsPE62PDN2J1Zp4d6b", - "hash160result": "db85ea63848a6ad2c3a0e82bb29e215c00c2ee8c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.address.postcode" - } -}; -exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_COUNTRY = { - "vdxfid": "i8KD9CUn7Su4YT44WhbD8HYA1K425cFCqM", - "indexid": "xD9Kbzurxm7jAcw6NPFN6g4h2y531jRanx", - "hash160result": "75970ae74cd40419dc78ecef7be22c5ee09d1535", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.address.country" - } -}; -exports.IDENTITY_RESIDENTCARD = { - "vdxfid": "iKkJFFtbxRMJutjoruW47Mc1sCfdGYQrC9", - "indexid": "xQaQi4KgojZyY4cqibAD5k8Ytrge9jwt3u", - "hash160result": "2b737a5733b91d305dcf07d9e75797740da97db2", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard" - } -}; -exports.IDENTITY_RESIDENTCARD_ORIGINALFRONT = { - "vdxfid": "iNMJhZ3wie5U2SRF7WSFTpjJo6B6RSTR4t", - "indexid": "xTBRAMV2ZxJ8ecJGyC6QSDFqpkC7KTFMbW", - "hash160result": "e440d2d8bab46633691a12e7bed0ea785bd90ccf", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.originalfront" - } -}; -exports.IDENTITY_RESIDENTCARD_ORIGINALBACK = { - "vdxfid": "i4pAk8J5ec2wn55VattFRr7PyN4J2L13HJ", - "indexid": "x9eHCvjAVvFcQExXSaYQQEdw125Jz84d8u", - "hash160result": "9fa70ca8b49eab8c3e704f78f0e0ae1bc52caf0e", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.originalback" - } -}; -exports.IDENTITY_RESIDENTCARD_CROPPEDFRONT = { - "vdxfid": "iLnx7NDcAWtb9uWicdgSaiwco56TywMh5w", - "indexid": "xRd4aAeh1q7Fn5PkUKLbZ7U9pj7UvU8v2V", - "hash160result": "fa7347c3517552a028890dacaf889a6ead39f6bd", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.croppedfront" - } -}; -exports.IDENTITY_RESIDENTCARD_CROPPEDBACK = { - "vdxfid": "i8WjL22L4UeaCDKZuj8R4Uub6zurTPdaLv", - "indexid": "xDLqnpTQunsEpPCbmQna2sS88evsLJL51v", - "hash160result": "b5134fe72682aa4f0dc645ceb73421dc07644337", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.croppedback" - } -}; -exports.IDENTITY_RESIDENTCARD_FACE = { - "vdxfid": "i6dGShbLY2ppZnXSyfvdtdGFkCxBQd2r9Y", - "indexid": "xBTNuW2RPM3VBxQUqMans1nnmryCFH4rRD", - "hash160result": "25a41b37f64414a2477c5c0d1a139d64ce9b8f22", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.face" - } -}; -exports.IDENTITY_RESIDENTCARD_IDNUMBER = { - "vdxfid": "iKFkbwDcQRXjapZcZAXsaMXjgER9CZbwZx", - "indexid": "xQ5s4jehFjkQCzSeQrC2Yk4GhtSA2GbM4B", - "hash160result": "e30d9a01765325e02ca22f60335d4bdb499917ad", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.idnumber" - } -}; -exports.IDENTITY_RESIDENTCARD_CATEGORY = { - "vdxfid": "i46Fgc8ev9zAkjikjHWreqSXkMRpFr5Lsi", - "indexid": "x8vN9QZjmUCqNubnayB1dDy4n1SqAqg4vn", - "hash160result": "c0039a4929d081eec1d1f5ca3040e19bded3c106", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.category" - } -}; -exports.IDENTITY_RESIDENTCARD_EXPIRATIONDATE = { - "vdxfid": "iBA1oFvDABKqbu9i61AEGy1m5fFHdCWkpy", - "indexid": "xFz8G4MJ1VYWE52jwgpPFMYJ7KGJUd6Y4b", - "hash160result": "0866dd99514f509c9ad4584b3f570515f4c74054", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.expirationdate" - } -}; -exports.IDENTITY_RESIDENTCARD_ISSUINGCOUNTRY = { - "vdxfid": "iHBgD199BSEQWREtiW8dP259DX4qg6KjkM", - "indexid": "xN1nfoaE2kT58b7vaBnnMQbgFB5rWuKCtd", - "hash160result": "ef88ffb14a8b66dacc690351fa9c3d35a8036296", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.issuingcountry" - } -}; -exports.IDENTITY_RESIDENTCARD_ISSUINGREGION = { - "vdxfid": "i6jygVNjzZUFEXVgtzWxXpBYf5rwjXF92J", - "indexid": "xBa69HopqsgurhNikgB7WCi5gjsxbi12z3", - "hash160result": "dc31e031328cfe3697527e046a52cc372687d423", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.issuingregion" - } -}; -exports.IDENTITY_RESIDENTCARD_DATEOFBIRTH = { - "vdxfid": "iQfYTwmTxXzxxyFh6XbY2PQVLVwswRoJL1", - "indexid": "xVVevkCYorDdb98ixDFgzmw2N9xtnBn6M2", - "hash160result": "73e0e5f4af76255bc2a3583ad9a7b1d0241470e8", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.dateofbirth" - } -}; -exports.IDENTITY_RESIDENTCARD_ADDRESS_STREET1 = { - "vdxfid": "iJ67qMPN6tyrLXBhbJpKKBZYpkcBzZD8S4", - "indexid": "xNvEJ9pSxDCWxh4jSzUUHa65rQdCviMqur", - "hash160result": "8540d9cb71ca32f4c03caf26a4cffa4d51094da0", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.address.street1" - } -}; -exports.IDENTITY_RESIDENTCARD_ADDRESS_CITY = { - "vdxfid": "iLCQ2n5tKHzKcVBv8of1eYmdWEdEY5vTUN", - "indexid": "xR2WVaWyAcCzEf4wzVKAcwJAXteFUoFSux", - "hash160result": "7990100969a22f4b4ba35613b3994219e74d6db7", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.address.city" - } -}; -exports.IDENTITY_RESIDENTCARD_ADDRESS_REGION = { - "vdxfid": "iPWcAQ6zbC9rKaaWAgrpoHmKs5G5SQCprF", - "indexid": "xULidCY5SWNWwkTY2NWymgHrtjH6QfP6JL", - "hash160result": "ff3f1523bfb1fe501ef10f0036c9f059b64bc7db", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.address.region" - } -}; -exports.IDENTITY_RESIDENTCARD_ADDRESS_POSTCODE = { - "vdxfid": "iG1QGYyp4SkiP7b9ngPwkTGC3DxVG3hB16", - "indexid": "xLqWjMQtukyP1HUBeN46iqnj4syW4eat4U", - "hash160result": "f345aa72196b006e2200bd08ed0ea165806c7889", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.address.postcode" - } -}; -exports.IDENTITY_RESIDENTCARD_ADDRESS_COUNTRY = { - "vdxfid": "i4wzngZfZb2QBnjr2TjtoMoMF9roSqQkho", - "indexid": "x9n7FUzkQuF4oxcst9Q3mkKtGospNqDjEQ", - "hash160result": "dd2a94da0a94115ed04de616b7d0ea1b19312a10", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.address.country" - } -}; -exports.IDENTITY_IDCARD = { - "vdxfid": "iK7FrcxNvsej84qZjYR73iGgEV96sGKwTU", - "indexid": "xPwNKRPTnBsPkEibbE5G26oDG9A7j4JSm7", - "hash160result": "4f2b2c852e4cfa5a640988af78c4d02243467cab", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard" - } -}; -exports.IDENTITY_IDCARD_ORIGINALFRONT = { - "vdxfid": "iCnLNq42DxhuK84Nes4UGjFFUuNsGGpuBZ", - "indexid": "xHcSqdV75GvZwHwQWYidF7mnWZPtATN7Ky", - "hash160result": "9f5f63641e6e935628d7602e92814311ea631766", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.originalfront" - } -}; -exports.IDENTITY_IDCARD_ORIGINALBACK = { - "vdxfid": "iJyfvwrUeTRiGxiYw6oJZ3uALsuBt7QTyy", - "indexid": "xPonPkHZVmeNu8bannTTXSRhNXvCpAD3MB", - "hash160result": "df3a44e11ad54673eff910c1320d9f50100b0daa", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.originalback" - } -}; -exports.IDENTITY_IDCARD_CROPPEDFRONT = { - "vdxfid": "iFDp8jWwybweGStGQnYxwhbi8eiucZ29sr", - "indexid": "xL3vbXx2pvAJtcmJGUD7v68FAJjvZmrsga", - "hash160result": "b10845ae9b29f3ed25f33f091398fd0a1536d980", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.croppedfront" - } -}; -exports.IDENTITY_IDCARD_CROPPEDBACK = { - "vdxfid": "i8GpXrygUPpQYVwcoZ7JVRB1xB46xZsMuG", - "indexid": "xD6vzfQmKi35AfpefEmTTohYyq57sdLVxr", - "hash160result": "84c05d2d84ab69db2834df22602f34445ae9a134", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.croppedback" - } -}; -exports.IDENTITY_IDCARD_FACE = { - "vdxfid": "i8sfiwALhk4FtSaWSnBWYwKnWN3G7m3jyU", - "indexid": "xDhnBjbRZ4GvWcTYJTqfXKrKY24GxBC5cg", - "hash160result": "4afc5fda25a15a4627b8426f40594ff2e11d393b", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.face" - } -}; -exports.IDENTITY_IDCARD_IDNUMBER = { - "vdxfid": "iBEJB1xD1mpR4kYQbYieW3hNFpe5QmQ6qA", - "indexid": "xG4QdpPHs635gvRSTENoUSDuHUf6JB2izs", - "hash160result": "0af18c033e6ad395bdfb5fbdbf5144d63c1d1055", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.idnumber" - } -}; -exports.IDENTITY_IDCARD_CATEGORY = { - "vdxfid": "i4HCpvV1NJd4Ka8atCtDkXs4XLAkrmtKib", - "indexid": "x97KHiv6Dcqiwk1cjtYNivPbYzBmg48ama", - "hash160result": "68b49fa5bf2ed00672c881c15167fee2c304d408", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.category" - } -}; -exports.IDENTITY_IDCARD_EXPIRATIONDATE = { - "vdxfid": "iNTbsfTmeAm7KUFehtCq3RH1JgbUdTJwCt", - "indexid": "xTHiLTtrVUymwe8gZZrz1ooYLLcVZC5A4n", - "hash160result": "f4b807e32848d5a40815e2aa19cb219c64ae3dd0", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.expirationdate" - } -}; -exports.IDENTITY_IDCARD_ISSUINGCOUNTRY = { - "vdxfid": "iJ5qVRWTHerkVreE9UrSfKyphD3XB9s8FA", - "indexid": "xNuwxDwY8y5R82XG1AWbdiWMis4Y3BXDg7", - "hash160result": "2cc5492966de5135e638de253b497cccb8643fa0", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.issuingcountry" - } -}; -exports.IDENTITY_IDCARD_ISSUINGREGION = { - "vdxfid": "i8dHTbZ62Bth8NwkxasnKFpvX4EZYuBun4", - "indexid": "xDTPvPzAsW7MkYpnpGXwHeMTYiFaMyp6FD", - "hash160result": "f42f7b71bb43c590b9063755754bf2d534b58038", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.issuingregion" - } -}; -exports.IDENTITY_IDCARD_DATEOFBIRTH = { - "vdxfid": "iGcwhC6znG63pb6jqsRnrtDjXV4aXXsub2", - "indexid": "xMT49zY5daJiSkymhZ5wqGkGZ95bMGYJ9r", - "hash160result": "4d0c72c3369a0ac64711e58ae1b10785f1363190", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.dateofbirth" - } -}; -exports.IDENTITY_IDCARD_ADDRESS_STREET1 = { - "vdxfid": "i6jMXjNE9qioZ2dFricFnEBEQEWK5Kg3PS", - "indexid": "xBZTzXoK19wUBCWHiQGQkchmRtXKugcKWw", - "hash160result": "2cee0d13a2fdeaac83d052ad27610da8bf59b623", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.address.street1" - } -}; -exports.IDENTITY_IDCARD_ADDRESS_CITY = { - "vdxfid": "i3viAeqayk3KDk5tQpYcz6gFs1ayW5vBma", - "indexid": "x8kpdTGfq4FyquxvGWCmxVCntfbzM8iAVb", - "hash160result": "a10bfcd1cfd12d466a276339072d2f2a7ec6f304", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.address.city" - } -}; -exports.IDENTITY_IDCARD_ADDRESS_REGION = { - "vdxfid": "iEHvf3XCFacMihTQPVXxNeo6hBCqggDFie", - "indexid": "xK837qxH6tq2LsLSFBC7M3KdiqDrYBNMK7", - "hash160result": "55af249b3ceb591709c693017e5b7b1cb131a876", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.address.region" - } -}; -exports.IDENTITY_IDCARD_ADDRESS_POSTCODE = { - "vdxfid": "i3yAnt6zdceYxbCBnLwxn2tNdM4BnPkzhT", - "indexid": "x8oHFgY5UvsDam5De2c7kRQuf15ChzdWFA", - "hash160result": "acd086baf0863cff86fc56ec0fbb16dd18d56a05", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.address.postcode" - } -}; -exports.IDENTITY_IDCARD_ADDRESS_COUNTRY = { - "vdxfid": "iA6KVD2C4QJAyKfCS3XfQV8AxmpR9R3XG5", - "indexid": "xEvRx1TGuiWqbVYEHjBpNsehzRqS2fp4qg", - "hash160result": "bab14b514d91d7daa39175c90e29a956dec19548", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.address.country" - } -}; -exports.IDENTITY_VISA = { - "vdxfid": "iDCwZf84AhbJkm4zKZP7Le8h8ukJS9FySA", - "indexid": "xJ342TZ921oyNvx2BF3GK2fEAZmKGeUQUd", - "hash160result": "57faa6b546ac92c71022178b8c5e9fbae9bebe6a", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa" - } -}; -exports.IDENTITY_VISA_ORIGINALFRONT = { - "vdxfid": "iGAgzyLDVs5vYFLRgXVnkQpDRKy9Zh1TiV", - "indexid": "xLzoTmmJMBJbARDTYD9wioLkSyzARsVQWr", - "hash160result": "755da3361216260b786ba78fbe68800557223a8b", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.originalfront" - } -}; -exports.IDENTITY_VISA_ORIGINALBACK = { - "vdxfid": "i3becgcmf85RiY2PAxsp3fbuGKG8Qc73t1", - "indexid": "x8Rm5V3rWSJ6LhuR2eXy248SHyH9Jjue4S", - "hash160result": "e71909c77e2e0361764d22b81f4f53085fe85801", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.originalback" - } -}; -exports.IDENTITY_VISA_CROPPEDFRONT = { - "vdxfid": "iAapfFQMAQy7USdjRwqzAZ2nWhRMSiQMmV", - "indexid": "xFQw83qS1jBn6cWmHdW98wZKYMSNHsb2wy", - "hash160result": "56ed30f8daf83e3b09eee57517be45b6b8c1f94d", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.croppedfront" - } -}; -exports.IDENTITY_VISA_CROPPEDBACK = { - "vdxfid": "i3quMdmv3vAQDBA6nzM8fTiFtqJrw7tcnf", - "indexid": "x8g1pSCzuEP4qM38eg1HdrEnvVKsoXBZ7R", - "hash160result": "1d8106821498549cebc0af6f8d120b9933090b04", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.croppedback" - } -}; -exports.IDENTITY_VISA_FACE = { - "vdxfid": "iAqxnB58655ZcRLAUm2Utib2rguRXT9wZM", - "indexid": "xFg5EyWCwPJEEbDCLSgds77ZtLvSRpw2k9", - "hash160result": "59564e826c8342a2b721708f6a83c9761dc6d650", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.face" - } -}; -exports.IDENTITY_VISA_IDNUMBER = { - "vdxfid": "iQ5LfUtuggDyqbePUB9iWLgxYj7tvDm2VE", - "indexid": "xUuT8HKzXzSeTmXRKrosUjDVaP8upm7rqg", - "hash160result": "77ae761bf6bf7922ff8e47b53bd88107be15f8e1", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.idnumber" - } -}; -exports.IDENTITY_VISA_CATEGORY = { - "vdxfid": "iH4nhrNsZKK6bEkgLDu17fBPR5dnVgitiQ", - "indexid": "xMtuAeoxQdXmDQdiBuZA63hvSjeoT3wsnv", - "hash160result": "8052162609b4da20bb5932ead5b6deedbb861495", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.category" - } -}; -exports.IDENTITY_VISA_EXPIRATIONDATE = { - "vdxfid": "iNW2k7p7hVK2GCc7m1k4mihqh8jd94Dmnh", - "indexid": "xTL9CvFCYoXgtNV9chQDk7ENinkdzPUodD", - "hash160result": "5eaa0aef6ed6d27ee4909bc6ce8619c60346b3d0", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.expirationdate" - } -}; -exports.IDENTITY_VISA_ISSUINGCOUNTRY = { - "vdxfid": "i5vDfPKMfCRPXVRhfumjWPEvBFhNMVjtGK", - "indexid": "xAkL8BkSWWe49fJjXbRtUmmTCuiPJGBZ2c", - "hash160result": "ebf49255193b4ffbb3a0487106a4df98833bcc1a", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.issuingcountry" - } -}; -exports.IDENTITY_VISA_ISSUINGREGION = { - "vdxfid": "iPRc9Ns6LadQNYU7DqSNyx7LW8W9dPKDjC", - "indexid": "xUFicBJBBtr4ziM95X6XxLdsXnXAYQ1XFN", - "hash160result": "a1217c6e44b1f47faf9d59378206009d8433d5da", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.issuingregion" - } -}; -exports.IDENTITY_VISA_DATEOFBIRTH = { - "vdxfid": "i55bTsxLkCTmE6VvppvG8doYnmxuHhec65", - "indexid": "x9uhvgPRbWgRrGNxgWaR72L5pRyvA4vVWm", - "hash160result": "ed824bbfd195e63d6d5151a07eda49eba60c9a11", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.dateofbirth" - } -}; -exports.IDENTITY_VISA_ADDRESS_STREET1 = { - "vdxfid": "iMzWxFVzJHbQm5YWv9c1eujvrUrPHAGVAc", - "indexid": "xSpdR3w59bp5PFRYmqGAdJGTt8sQ8o4mpu", - "hash160result": "05992eb838a4f562b6b7e0ff84bb05cdac571ecb", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.address.street1" - } -}; -exports.IDENTITY_VISA_ADDRESS_CITY = { - "vdxfid": "i8YXgZ7doRhidT5phX6qyRnttV6hZiyWTm", - "indexid": "xDNe9MYiejvPFcxrZCkzwpKRv97iS3TQjA", - "hash160result": "04959daab853c797bbbcb9c5ead7376e4a809a37", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.address.city" - } -}; -exports.IDENTITY_VISA_ADDRESS_REGION = { - "vdxfid": "i6YkTDEi1M1mzuTyzww8hNoksJFpev17Fu", - "indexid": "xBNrv1fnrfESd5M1rdbHfmLHtxGqUoeALR", - "hash160result": "3a47a53e8717444b5d31e8618049daa8cde8b421", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.address.region" - } -}; -exports.IDENTITY_VISA_ADDRESS_POSTCODE = { - "vdxfid": "iBJDLHSLB4cHvaeXazFp25Be3V9yRWmcoK", - "indexid": "xG8Ko5sR2NpxYkXZSfuxzTiB59AzMUATiw", - "hash160result": "dd0d87e3163157402aa16d2017a3ea06d6bccd55", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.address.postcode" - } -}; -exports.IDENTITY_VISA_ADDRESS_COUNTRY = { - "vdxfid": "iQ9Z1PZMMp49rtDuGQSjfEZn3xACfxLAYa", - "indexid": "xUyfUBzSD8GpV46w866tdd6K5cBDbMPuNo", - "hash160result": "c45655a6924c0b377e9182869dc780df690dc4e2", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.address.country" - } -}; -exports.IDENTITY_PERSONALDETAILS = { - "vdxfid": "i8SSgM1z7XVoCtoP9CCsMms3zCndaNjtCe", - "indexid": "xDGZ99T4xqiTq4gQzss2LAPb1roeUyLwkU", - "hash160result": "a8fbe89451c1d0a77b336ccf6b0fb7601dd47336", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.personaldetails" - } -}; -exports.IDENTITY_CONTACTDETAILS = { - "vdxfid": "iRLT8V9NN178CvZQusJSHuyuFC2fD2QmE3", - "indexid": "xWAZbHaTDKKnq6SSmYxbGJWSGr3g1GRDYH", - "hash160result": "b9185ad980909708754a484bf11edc9febd8cbef", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.contactdetails" - } -}; -exports.IDENTITY_LOCATION = { - "vdxfid": "iGmiLZ7J6GjxjZ4rkSMsDzyyvWtmMBjnbo", - "indexid": "xMbpoMYNwaxdMiwtc822CPWWxAunLDE1BS", - "hash160result": "15ea60d9ddde976095b0c79ceecef7b034cfd991", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.location" - } -}; -exports.IDENTITY_BANKINGDETAILS = { - "vdxfid": "i8DUrZJJRjNQMJNeJ3Ti6pbpKPJ55LECyJ", - "indexid": "xD3bKMjPH3b4yUFg9j7s5D8MM3K612HEir", - "hash160result": "a7e5de6ac208f110d0509cffeb916b8dd03c0034", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails" - } -}; -exports.IDENTITY_DOCUMENTS = { - "vdxfid": "iCm3ERZoUw2ze1P11QyRUtvhKYovCWFXbT", - "indexid": "xHb9hDztLFFfGBG2s6daTHTEMCpw3tcbVJ", - "hash160result": "ee9f8d5ba7366983cf9b9d3e5e8ac50898a9d865", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.documents" - } -}; -exports.IDENTITY_BANKACCOUNT = { - "vdxfid": "iN4AgB4KEN1C3TfZnYDFUhxn37PdcrZvxT", - "indexid": "xStH8yVQ5gDrfdYbeDsQT6VK4mQeYDjcFm", - "hash160result": "122bf0739d7d1def003656a63c443efb6c14cfcb", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankaccount" - } -}; -exports.IDENTITY_BANKINGDETAILS_CURRENCY = { - "vdxfid": "i5k8pb9FHf5VZJKki6him1WMBkpyhe56BY", - "indexid": "xAaFHPaL8yJABUCnZnMsjQ2tDQqzfUkZRm", - "hash160result": "cc655f9f104ad6c25cc65407121fa7ac1208e418", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.currency" - } -}; -exports.IDENTITY_BANKINGDETAILS_COUNTRY = { - "vdxfid": "iHYqZF4Asa4erZR9kJ5G5nWRNGWdiS8vBh", - "indexid": "xNNx23VFitHKUjJBbyjR4B2xPvXebL5g4h", - "hash160result": "cf7870c11608bf6e58890fbfc18ffe0db98d629a", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.country" - } -}; -exports.IDENTITY_BANKINGDETAILS_STREET1 = { - "vdxfid": "iRhANjQk2G3aFXiaGtG68kZjdYr2iVXQJJ", - "indexid": "xWXGqXqpsaGEshbc8ZvF796GfCs3bDhrgC", - "hash160result": "bd420c73e6bba2e48542cddf188c23b8c098b6f3", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.street1" - } -}; -exports.IDENTITY_BANKINGDETAILS_STREET2 = { - "vdxfid": "iFWtcLUKAECLrREJr6mxtHM9xPUocxmTSY", - "indexid": "xLM158uQ1YR1Ub7LhnS7rfsgz3VpTpBcCu", - "hash160result": "7f1a53da2e265bab3230d9eec1ed0f36d7041484", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.street2" - } -}; -exports.IDENTITY_BANKINGDETAILS_CITY = { - "vdxfid": "iQxBEB8sXNez25HJCzvnTWtWqXUkEVAuo8", - "indexid": "xVnHgyZxNgseeFAL4gawRuR3sBVm7nyQqt", - "hash160result": "5878bb5b9371344acb1b679316e0e087046c95eb", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.city" - } -}; -exports.IDENTITY_BANKINGDETAILS_REGION = { - "vdxfid": "i4HJ5yrzBFEwjiYgzptMcrBsCeBjPYQJFX", - "indexid": "x97QYnJ52ZTcMtRirWYWbEiQEJCkKnxArM", - "hash160result": "7bf3a5ee05846c54bd19032e6ee9069cbc68d808", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.region" - } -}; -exports.IDENTITY_BANKINGDETAILS_POSTALCODE = { - "vdxfid": "iFVaE922Bzrro6rb87d9En2t2AAGx7EivG", - "indexid": "xLKggwT73K5XRGjcyoHJDAZR3pBHqz4Utt", - "hash160result": "ebd93a0f4fb8db6fb0cb8d397c45b41a0142d483", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.postalcode" - } -}; -exports.IDENTITY_BANKINGDETAILS_TAXNUMBER = { - "vdxfid": "i6Gbi3EkYrbREumkLmHUedbzrisXkRzwKY", - "indexid": "xB6iAqfqQAp5s5enCSwdd28XtNtYcHgrDb", - "hash160result": "bcc691f5d53f99e196b291ea2a00a9805ff4a61e", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.taxnumber" - } -}; -exports.IDENTITY_BANKINGDETAILS_TAXCOUNTRY = { - "vdxfid": "iMJzAfPjqvWJdYyoWTX79cSjd51HbVc7wC", - "indexid": "xS96dTpphEiyFirqN9BG7zyGej2JTACDB1", - "hash160result": "e19f920e684c7d906dd8c85d72a5d5f0cd6ba4c3", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.taxcountry" - } -}; -exports.IDENTITY_BANKINGDETAILS_FIRSTNAME = { - "vdxfid": "iGAomW7jtsy7zRaoMFU48KvrHahHwdjzi7", - "indexid": "xLzvEJYpkCBncbTqCw8D6iTPKEiJpW3beK", - "hash160result": "d33bd09ba3184bf0e3fa00ad62e92a7a99c83f8b", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.firstname" - } -}; -exports.IDENTITY_BANKINGDETAILS_LASTNAME = { - "vdxfid": "iMrvbLJnZawGsdFshtrHM3QKa4pDPbRk3L", - "indexid": "xSh348jsQu9wVo8uZaWSKRvrbiqED1eny3", - "hash160result": "4a0d68f2cafc3cbe827a91fd5038c65878bfaec9", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.lastname" - } -}; -exports.IDENTITY_BANKINGDETAILS_PHONENUMBER = { - "vdxfid": "i9jKPi8ubg5fx3BBmZdiyobJxNgzcmV9et", - "indexid": "xEZRrWZzSzJLaD4DdFHsxC7qz2i1YejHqk", - "hash160result": "b092c8f73031298d26b919f4b398fa9b66f19c44", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.phonenumber" - } -}; -exports.IDENTITY_BANKINGDETAILS_NUMBER = { - "vdxfid": "iKGaF7fZ6yAvwJyxcmpuas2Hn9PZPF99yf", - "indexid": "xQ6ghv6dxHPbZUrzUTV4ZFYpooQaFZG1aa", - "hash160result": "fcceea7c24223218bc9313e8176daea6155e3fad", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.number" - } -}; -exports.IDENTITY_BANKINGDETAILS_TYPE = { - "vdxfid": "iNkzXo7BBcUvCBH8somKyFtAFsR3mmmYuG", - "indexid": "xTb6zbYG2vhapMAAjVRUweQhHXS4csH9eB", - "hash160result": "26dcd354b4b2bd8b939af29fc5ea57a082aa87d3", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.type" - } -}; -exports.IDENTITY_BANKINGDETAILS_SORTCODE = { - "vdxfid": "i8v2y1beTivG8Nyi6Td3VFTc2ExFQJT8pC", - "indexid": "xDk9Rp2jK38vkYrjx9HCTdz93tyGLCaa3E", - "hash160result": "27df54160c8a8a962dd455004c8afac060aeab3b", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.sortcode" - } -}; -exports.IDENTITY_DOCUMENTS_PASSPORT = { - "vdxfid": "iJHkDyp8dPnNdrh7P9fzow4gTshpbznkSK", - "indexid": "xP7rgnFDUi13G2a9EqL9nKbDVXiqVHVtyg", - "hash160result": "456f1956c77f7ff59d98dd57030d7ed22afd7fa2", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.documents.passport" - } -}; -exports.IDENTITY_RESIDENCECARD = { - "vdxfid": "iQerHJHjqVT32hU1ZUyVYKQEkavs4xFtHo", - "indexid": "xVUxk6ipgofhesM3RAdeWhvmnEwsywApa2", - "hash160result": "0b2227f2bb574fe3cbcc683eecfc4d3bff884ee8", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencecard" - } -}; -exports.IDENTITY_ATTESTOR = { - "vdxfid": "iFNc5DG22Btm69wBDDXatvSPLxzJq53QBa", - "indexid": "xLCiY1h6sW7RiKpD4uBjsJxvNd1Kiej8tW", - "hash160result": "e5d18dab811f87643c1e7a63627172331be38282", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.attestor" - } -}; -exports.IDENTITY_ATTESTATION_RECIPIENT = { - "vdxfid": "iAkd3VBhYQ3MK6PUCtfhXrLVNbqSghxxpn", - "indexid": "xFajWHcnPiG1wGGW4aKrWEs2QFrTbwP7wd", - "hash160result": "71b7cbbfc8be868f6d9f6c481c420b002438d44f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.attestation.recipient" - } -}; diff --git a/dist/vdxf/vdxfDataKeys.d.ts b/dist/vdxf/vdxfDataKeys.d.ts deleted file mode 100644 index 2103be3..0000000 --- a/dist/vdxf/vdxfDataKeys.d.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { VDXFKeyInterface } from "./keys"; -export declare const DataByteKeyName = "vrsc::data.type.byte"; -export declare const DataByteKey: VDXFKeyInterface; -export declare const DataInt16KeyName = "vrsc::data.type.int16"; -export declare const DataInt16Key: VDXFKeyInterface; -export declare const DataUint16KeyName = "vrsc::data.type.uint16"; -export declare const DataUint16Key: VDXFKeyInterface; -export declare const DataInt32KeyName = "vrsc::data.type.int32"; -export declare const DataInt32Key: VDXFKeyInterface; -export declare const DataUint32KeyName = "vrsc::data.type.uint32"; -export declare const DataUint32Key: VDXFKeyInterface; -export declare const DataInt64KeyName = "vrsc::data.type.int64"; -export declare const DataInt64Key: VDXFKeyInterface; -export declare const DataUint64KeyName = "vrsc::data.type.uint64"; -export declare const DataUint64Key: VDXFKeyInterface; -export declare const DataUint160KeyName = "vrsc::data.type.uint160"; -export declare const DataUint160Key: VDXFKeyInterface; -export declare const DataUint256KeyName = "vrsc::data.type.uint256"; -export declare const DataUint256Key: VDXFKeyInterface; -export declare const DataStringKeyName = "vrsc::data.type.string"; -export declare const DataStringKey: VDXFKeyInterface; -export declare const DataVectorKeyName = "vrsc::data.type.vector"; -export declare const DataVectorKey: VDXFKeyInterface; -export declare const DataByteVectorKeyName = "vrsc::data.type.bytevector"; -export declare const DataByteVectorKey: VDXFKeyInterface; -export declare const DataInt32VectorKeyName = "vrsc::data.type.int32vector"; -export declare const DataInt32VectorKey: VDXFKeyInterface; -export declare const DataInt64VectorKeyName = "vrsc::data.type.int64vector"; -export declare const DataInt64VectorKey: VDXFKeyInterface; -export declare const DataCurrencyMapKeyName = "vrsc::data.type.object.currencymap"; -export declare const DataCurrencyMapKey: VDXFKeyInterface; -export declare const DataRatingsKeyName = "vrsc::data.type.object.ratings"; -export declare const DataRatingsKey: VDXFKeyInterface; -export declare const DataURLKeyName = "vrsc::data.type.object.url"; -export declare const DataURLKey: VDXFKeyInterface; -export declare const DataTransferDestinationKeyName = "vrsc::data.type.object.transferdestination"; -export declare const DataTransferDestinationKey: VDXFKeyInterface; -export declare const UTXORefKeyName = "vrsc::data.type.object.utxoref"; -export declare const UTXORefKey: VDXFKeyInterface; -export declare const CrossChainDataRefKeyName = "vrsc::data.type.object.crosschaindataref"; -export declare const CrossChainDataRefKey: VDXFKeyInterface; -export declare const EncryptionDescriptorKeyName = "vrsc::data.type.encryptiondescriptor"; -export declare const EncryptionDescriptorKey: VDXFKeyInterface; -export declare const SaltedDataKeyName = "vrsc::data.type.salteddata"; -export declare const SaltedDataKey: VDXFKeyInterface; -export declare const DataDescriptorKeyName = "vrsc::data.type.object.datadescriptor"; -export declare const DataDescriptorKey: VDXFKeyInterface; -export declare const SignatureDataKeyName = "vrsc::data.signaturedata"; -export declare const SignatureDataKey: VDXFKeyInterface; -export declare const VectorUint256KeyName = "vrsc::data.mmrhashes"; -export declare const VectorUint256Key: VDXFKeyInterface; -export declare const MMRLinksKeyName = "vrsc::data.mmrlinks"; -export declare const MMRLinksKey: VDXFKeyInterface; -export declare const MMRDescriptorKeyName = "vrsc::data.mmrdescriptor"; -export declare const MMRDescriptorKey: VDXFKeyInterface; -export declare const TypeDefinitionKeyName = "vrsc::data.type.typedefinition"; -export declare const TypeDefinitionKey: VDXFKeyInterface; -export declare const MultiMapKeyName = "vrsc::identity.multimapkey"; -export declare const MultiMapKey: VDXFKeyInterface; -export declare const ContentMultiMapRemoveKeyName = "vrsc::identity.multimapremove"; -export declare const ContentMultiMapRemoveKey: VDXFKeyInterface; -export declare const ProfileMediaKeyName = "vrsc::identity.profile.media"; -export declare const ProfileMediaKey: VDXFKeyInterface; -export declare const ZMemoMessageKeyName = "vrsc::system.zmemo.message"; -export declare const ZMemoMessageKey: VDXFKeyInterface; -export declare const ZMemoSignatureKeyName = "vrsc::system.zmemo.signature"; -export declare const ZMemoSignatureKey: VDXFKeyInterface; -export declare const CurrencyStartNotarizationKeyName = "vrsc::system.currency.startnotarization"; -export declare const CurrencyStartNotarizationKey: VDXFKeyInterface; diff --git a/dist/vdxf/vdxfDataKeys.js b/dist/vdxf/vdxfDataKeys.js deleted file mode 100644 index d70e41f..0000000 --- a/dist/vdxf/vdxfDataKeys.js +++ /dev/null @@ -1,347 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.VectorUint256Key = exports.VectorUint256KeyName = exports.SignatureDataKey = exports.SignatureDataKeyName = exports.DataDescriptorKey = exports.DataDescriptorKeyName = exports.SaltedDataKey = exports.SaltedDataKeyName = exports.EncryptionDescriptorKey = exports.EncryptionDescriptorKeyName = exports.CrossChainDataRefKey = exports.CrossChainDataRefKeyName = exports.UTXORefKey = exports.UTXORefKeyName = exports.DataTransferDestinationKey = exports.DataTransferDestinationKeyName = exports.DataURLKey = exports.DataURLKeyName = exports.DataRatingsKey = exports.DataRatingsKeyName = exports.DataCurrencyMapKey = exports.DataCurrencyMapKeyName = exports.DataInt64VectorKey = exports.DataInt64VectorKeyName = exports.DataInt32VectorKey = exports.DataInt32VectorKeyName = exports.DataByteVectorKey = exports.DataByteVectorKeyName = exports.DataVectorKey = exports.DataVectorKeyName = exports.DataStringKey = exports.DataStringKeyName = exports.DataUint256Key = exports.DataUint256KeyName = exports.DataUint160Key = exports.DataUint160KeyName = exports.DataUint64Key = exports.DataUint64KeyName = exports.DataInt64Key = exports.DataInt64KeyName = exports.DataUint32Key = exports.DataUint32KeyName = exports.DataInt32Key = exports.DataInt32KeyName = exports.DataUint16Key = exports.DataUint16KeyName = exports.DataInt16Key = exports.DataInt16KeyName = exports.DataByteKey = exports.DataByteKeyName = void 0; -exports.CurrencyStartNotarizationKey = exports.CurrencyStartNotarizationKeyName = exports.ZMemoSignatureKey = exports.ZMemoSignatureKeyName = exports.ZMemoMessageKey = exports.ZMemoMessageKeyName = exports.ProfileMediaKey = exports.ProfileMediaKeyName = exports.ContentMultiMapRemoveKey = exports.ContentMultiMapRemoveKeyName = exports.MultiMapKey = exports.MultiMapKeyName = exports.TypeDefinitionKey = exports.TypeDefinitionKeyName = exports.MMRDescriptorKey = exports.MMRDescriptorKeyName = exports.MMRLinksKey = exports.MMRLinksKeyName = void 0; -exports.DataByteKeyName = "vrsc::data.type.byte"; -exports.DataByteKey = { - "vdxfid": "iBXUHbh4iacbeZnzDRxishvBSrYk2S2k7t", - "indexid": "xGMakQ89ZtqGGjg257csr6SiUWZksGmjWp", - "hash160result": "2e97a8bba443773812341e1d761530d3bba04f58", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.byte" - } -}; -exports.DataInt16KeyName = "vrsc::data.type.int16"; -exports.DataInt16Key = { - "vdxfid": "iDtTv3wf1Vk3M2Y46RjLPKtttx5hydwtY1", - "indexid": "xJiaNrNjroxhyCR5x7PVMiRRvc6ipg6N9g", - "hash160result": "ee334ebd432db0b24cc2702eda61c28ff44d3872", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int16" - } -}; -exports.DataUint16KeyName = "vrsc::data.type.uint16"; -exports.DataUint16Key = { - "vdxfid": "iHn7urT2yVfS7pQn6WGAmCVWh4HBLV24n3", - "indexid": "xNcENet7pot6jzHoxBvKjb23iiJCGpekDk", - "hash160result": "5cfc322d2a216145f7b82714115e7953269de59c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint16" - } -}; -exports.DataInt32KeyName = "vrsc::data.type.int32"; -exports.DataInt32Key = { - "vdxfid": "iHpLPprRDv3H5H3ZMaJ9nyHFzkG9xJWZDb", - "indexid": "xNeSrdHW5EFwhSvbDFxJmMoo2QHAtoEaEM", - "hash160result": "3e9ba478b23b13232f28d21051d907ce8fdd509d", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int32" - } -}; -exports.DataUint32KeyName = "vrsc::data.type.uint32"; -exports.DataUint32Key = { - "vdxfid": "iKSj5zhd6cSsLudaGhtfmisRNgEM7SPFWY", - "indexid": "xQGqYo8hwvfXy5Wc8PYpk7PxQLFMwfP7Fp", - "hash160result": "f279818aeb4fe768956b350d1fc7216ca0e82aaf", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint32" - } -}; -exports.DataInt64KeyName = "vrsc::data.type.int64"; -exports.DataInt64Key = { - "vdxfid": "iKB3TGi9Dg5HZ4nQAgLQAgp3tuXBaRKHpC", - "indexid": "xQ19v59E4zHxBEfS2MzZ95LavZYCTTeuyg", - "hash160result": "ab3705f8a7fae59786ef897b014df85fcd9533ac", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int64" - } -}; -exports.DataUint64KeyName = "vrsc::data.type.uint64"; -exports.DataUint64Key = { - "vdxfid": "iPamkQf38AeGQ8z4zSsZL7t9kXMeUkYLJL", - "indexid": "xUQtDD67yUrw2Js6r8XiJWQgnBNfNeeoUq", - "hash160result": "bb2ae9ed3e9f400def0724937fbf65f23ef690dc", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint64" - } -}; -exports.DataUint160KeyName = "vrsc::data.type.uint160"; -exports.DataUint160Key = { - "vdxfid": "iAAwdbLyKYL39nJ1eQHaHtb75krg4mV1Lq", - "indexid": "xF146Pn4ArYhmxB3W5wjGH7e7Qsgx9bkpj", - "hash160result": "d97d2295d4c73f6f6f0697c8086bd822d6977549", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint160" - } -}; -exports.DataUint256KeyName = "vrsc::data.type.uint256"; -exports.DataUint256Key = { - "vdxfid": "i8k7g7z6grtGYrNZmZr5TQ872aHssXuuua", - "indexid": "xDaE8vRBYB6wB2FbdFWERnee4EJtjbCtMM", - "hash160result": "939b27bea698d180237c40b2194025acc673cb39", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint256" - } -}; -exports.DataStringKeyName = "vrsc::data.type.string"; -exports.DataStringKey = { - "vdxfid": "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c", - "indexid": "xPwgY6oPdusaAgNK3u5yHCQG5NsHEcBpi5", - "hash160result": "e5c061641228a399169211e666de18448b7b8bab", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.string" - } -}; -// this is a key for a typed vector, which will have the object type key following the vector key -exports.DataVectorKeyName = "vrsc::data.type.vector"; -exports.DataVectorKey = { - "vdxfid": "iAEShwk1xjdGhaUSz3Maa2XR32o3vRuHq7", - "indexid": "xF4ZAkB6p3qwKkMUqj1jYR3x4gp4mGz657", - "hash160result": "503875b0dc301189a98927d3ece56c5f921c1f4a", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.vector" - } -}; -exports.DataByteVectorKeyName = "vrsc::data.type.bytevector"; -exports.DataByteVectorKey = { - "vdxfid": "iKMhRLX1JHQihVZx2t2pAWW2uzmK6AzwW3", - "indexid": "xQBot8x69bdPKfSytZgy8u2ZwenKzVjR4X", - "hash160result": "cc3ae6466006629f5105f71325bb2a19107037ae", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.bytevector" - } -}; -exports.DataInt32VectorKeyName = "vrsc::data.type.int32vector"; -exports.DataInt32VectorKey = { - "vdxfid": "iJZt2fcUv1iivbfC3tuPuefabcTppQEoVq", - "indexid": "xPPzVU3ZmKwPYmYDuaZYt3C7dGUqk939N7", - "hash160result": "c0847f3025c408059b5a8f6a9e414a8ed8288da5", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int32vector" - } -}; -exports.DataInt64VectorKeyName = "vrsc::data.type.int64vector"; -exports.DataInt64VectorKey = { - "vdxfid": "i4qtYkFS9iNyu2AkqwoSn1xyCdfH9PUvak", - "indexid": "x9g11YgX12beXC3nhdTbkQVWEHgJ2jqfz1", - "hash160result": "c6219ea13884987453692cb14c72d5f6a47c020f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int64vector" - } -}; -exports.DataCurrencyMapKeyName = "vrsc::data.type.object.currencymap"; -exports.DataCurrencyMapKey = { - "vdxfid": "iMrGhzkZq5fpWWSa1RambRySFPb7CuvKuX", - "indexid": "xSgPAoBegPtV8gKbs7EvZpVyH3c858ZUvL", - "hash160result": "25db70c2fcae2571f89201181bec04587e1f8fc9", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.currencymap" - } -}; -exports.DataRatingsKeyName = "vrsc::data.type.object.ratings"; -exports.DataRatingsKey = { - "vdxfid": "iHJComZUXXGniLkDhjYprWYEN8qvQGDoam", - "indexid": "xN8KGZzZNqVTLWdFZRCypu4mPnrwHFKbCK", - "hash160result": "32cad57ff1dc5db4b5ba573ce01bc9c89b0d9e97", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.ratings" - } -}; -exports.DataURLKeyName = "vrsc::data.type.object.url"; -exports.DataURLKey = { - "vdxfid": "iJ7xdhJTJAvJubNnSJFXyA3jujzqGxjLuZ", - "indexid": "xNx56VjY9V8yXmFpHyugwYaGwQ1rCt6J9W", - "hash160result": "7748bfaf53dd2ff63ed5f73a41174c360f30a6a0", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.url" - } -}; -exports.DataTransferDestinationKeyName = "vrsc::data.type.object.transferdestination"; -exports.DataTransferDestinationKey = { - "vdxfid": "i91L6zwZQrkbNVMB1AZ1Z671qybexRmeVK", - "indexid": "xDqSZoNeGAyFzfECrrDAXUdYsdcfs3Zuku", - "hash160result": "92f38773849383146037b16a48ea350c1c11ac3c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.transferdestination" - } -}; -exports.UTXORefKeyName = "vrsc::data.type.object.utxoref"; -exports.UTXORefKey = { - "vdxfid": "iNcKvh7mazaXptzHf85q6EtpFYFE7asKC1", - "indexid": "xTSSPVYrSJoCT4sKWojz4dRMHCGF3h9tM4", - "hash160result": "013e760f7451c289672993ea391ae643c21ce4d1", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.utxoref" - } -}; -exports.CrossChainDataRefKeyName = "vrsc::data.type.object.crosschaindataref"; -exports.CrossChainDataRefKey = { - "vdxfid": "iP3euVSzNcXUrLNHnQnR9G6q8jeYuGSxgw", - "indexid": "xTsmNHt5Dvk9UWFKe6Sa7edNAPfZmJVgLc", - "hash160result": "4d33e0aee0f648c7871b2661d1221b57c05aaed6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.crosschaindataref" - } -}; -exports.EncryptionDescriptorKeyName = "vrsc::data.type.encryptiondescriptor"; -exports.EncryptionDescriptorKey = { - "vdxfid": "iHEEK8ipj58BeKZNWuaaR2tDR5RK2kmf9A", - "indexid": "xN4Lmw9uaPLrGVSQNbEjPRQkSjSKxsHUQu", - "hash160result": "8d021acc1b68335bd7d37b28ff773c138ea5dd96", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.encryptiondescriptor" - } -}; -exports.SaltedDataKeyName = "vrsc::data.type.salteddata"; -exports.SaltedDataKey = { - "vdxfid": "i92U1nLuLJkC44FZZ4Lq9zk4qW3HrWAWNo", - "indexid": "xDraUamzBcxrgE8bQjzz8PGbsA4JiFskTD", - "hash160result": "9e13510e01d0d03a7bc90d7a2ef32824f515e33c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.salteddata" - } -}; -exports.DataDescriptorKeyName = "vrsc::data.type.object.datadescriptor"; -exports.DataDescriptorKey = { - "vdxfid": "i4GC1YGEVD21afWudGoFJVdnfjJ5XWnCQv", - "indexid": "x96JULhKLXEgCqPwUxTQGtAKhPK6Qh1iaW", - "hash160result": "4d4f12424ded2033a526a4e2a8835fc5b2eba208", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.datadescriptor" - } -}; -exports.SignatureDataKeyName = "vrsc::data.signaturedata"; -exports.SignatureDataKey = { - "vdxfid": "i7PcVF9wwPtQ6p6jDtCVpohX65pTZuP2ah", - "indexid": "xCDix3b2ni74iyym5ZreoCE47jqUTBFRAb", - "hash160result": "b48b359e9a00042cec64f7f66ac717d388a4f22a", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.signaturedata" - } -}; -exports.VectorUint256KeyName = "vrsc::data.mmrhashes"; -exports.VectorUint256Key = { - "vdxfid": "i9UgJ2WxGw95PKdoCXjpfnBShtP5gi9fxS", - "indexid": "xEJnkpx38FMk1VWq4DPyeAhyjYQ6X5Gsti", - "hash160result": "8c1afd59e904f6d2702699963abccbc6d326d841", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.mmrhashes" - } -}; -exports.MMRLinksKeyName = "vrsc::data.mmrlinks"; -exports.MMRLinksKey = { - "vdxfid": "iPQsnA1R8UjHNddZKZ3FxsuKQ5WzKqSC7w", - "indexid": "xUEzExSVynwwzoWbBEhQwGRrRjY1Bc2MYc", - "hash160result": "f535a4e9ac0f94eda01695d16489a4a102d6b1da", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.mmrlinks" - } -}; -exports.MMRDescriptorKeyName = "vrsc::data.mmrdescriptor"; -exports.MMRDescriptorKey = { - "vdxfid": "i9dVDb4LgfMYrZD1JBNP2uaso4bNAkT4Jr", - "indexid": "xETbgPVRXyaDUj639s2Y1J7QpicP4DvZMt", - "hash160result": "97273a4c02d6be002f8d69c3979616732ba68243", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.mmrdescriptor" - } -}; -exports.TypeDefinitionKeyName = "vrsc::data.type.typedefinition"; -exports.TypeDefinitionKey = { - "vdxfid": "iL5MPPHWXQEY3p2Q1UsmGDvXsgPiqd1W1S", - "indexid": "xQuTrBibNiTCfyuRsAXvEcT4uLQjhxrpyL", - "hash160result": "ae8d805d9650c0512a6b6ec33e963386542f18b6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.typedefinition" - } -}; -exports.MultiMapKeyName = "vrsc::identity.multimapkey"; -exports.MultiMapKey = { - "vdxfid": "i3mbggp3NBR77C5JeFQJTpAxmgMidayLLE", - "indexid": "x8bi9VF8DVdmjMxLVw4TSChVoLNjUyapgs", - "hash160result": "6920bb81b420bc95e29a10ed677379b1e39e3a03", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.multimapkey" - } -}; -exports.ContentMultiMapRemoveKeyName = "vrsc::identity.multimapremove"; -exports.ContentMultiMapRemoveKey = { - "vdxfid": "i5Zkx5Z7tEfh42xtKfwbJ5LgEWE9rEgpFY", - "indexid": "xAPsQszCjYtMgCqvBMbkGTsDGAFAmrN33A", - "hash160result": "d393b986e4f82db7bec82d97b186882d739ded16", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.multimapremove" - } -}; -// for any ID, this key indexes content that applies to representing the profile of -// that ID. there may be many mime-type instances of a particular piece of profile media -exports.ProfileMediaKeyName = "vrsc::identity.profile.media"; -exports.ProfileMediaKey = { - "vdxfid": "iEYsp2njSt1M4EVYi9uuAPBU2wpKmThkkr", - "indexid": "xKNzGqDpJCE1gQNaZqa48mi14bqLaG669g", - "hash160result": "e95b2ee1abb130a93900ddaef2d8e528010f7c79", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.profile.media" - } -}; -exports.ZMemoMessageKeyName = "vrsc::system.zmemo.message"; -exports.ZMemoMessageKey = { - "vdxfid": "iNHg1n828PUxktkYeNxC6sdVmuKTipn3L3", - "indexid": "xT7nUaZ6yhhdP4daW4cM5GA2oZLUaNVaBD", - "hash160result": "4a8f418203621f10d1a61701be8dbbbb38fa5cce", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::system.zmemo.message" - } -}; -exports.ZMemoSignatureKeyName = "vrsc::system.zmemo.signature"; -exports.ZMemoSignatureKey = { - "vdxfid": "i7mrLLjUfGYuHJwnsxFvd282hsdn4staJG", - "indexid": "xCbxo9AZWamZuUppjdv5bQeZjXeo1vbaCc", - "hash160result": "7b47c8cd90c4c3ddc542f37ca77473b7325a272f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::system.zmemo.signature" - } -}; -exports.CurrencyStartNotarizationKeyName = "vrsc::system.currency.startnotarization"; -exports.CurrencyStartNotarizationKey = { - "vdxfid": "iRvxVcGLaCXcDiAfnQ5FfeBCo2AiBibAft", - "indexid": "xWm4xQhRRWkGqt3he5jQe2hjpgBj5C7Tj3", - "hash160result": "b537201ca6465976bea7bdb03119644a858052f6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::system.currency.startnotarization" - } -}; diff --git a/src/vdxf/identityDataKeys.ts b/src/vdxf/identityDataKeys.ts deleted file mode 100644 index 17868ab..0000000 --- a/src/vdxf/identityDataKeys.ts +++ /dev/null @@ -1,1832 +0,0 @@ -import { VDXFKeyInterface } from "./keys" - -export const IDENTITY_ACCOUNT_ID: VDXFKeyInterface = { - "vdxfid": "i5Xgd7Aqds922eE8FDBUsKHSgiig39AnfS", - "indexid": "xAMo5ubvVBMgep7A6tqdqhoyiNjgq3j1ci", - "hash160result": "4c5e79bf46593fe959cb1918422eaa8fc82b8916", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.account.id" - } -} - -export const IDENTITY_ACCOUNT_USERID: VDXFKeyInterface = { - "vdxfid": "iNKVUvr5GzdCHgybMauK11DdZZUyWE3pe3", - "indexid": "xT9bwjHA8JqrurrdDGZTyPkAbDVzR53C2o", - "hash160result": "93b62bfd8c861ac7a5aa3d3d9f618ccd8c04b5ce", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.account.userid" - } -} - -export const IDENTITY_ACCOUNT_CREATEDAT: VDXFKeyInterface = { - "vdxfid": "i42uTbJmVBcPacY3Ak1g95LBg5rBBntQby", - "indexid": "x8s1vPjrLVq4CnR52Rfq7TrihjsBzxAEic", - "hash160result": "c40b12b14582c976e67a2e5992b0fdf67fb21f06", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.account.createdat" - } -} - -export const IDENTITY_ACCOUNT_COMPLETEDAT: VDXFKeyInterface = { - "vdxfid": "iRJTZj7osY5EYA7pd7K3UcJVAApkvodDjZ", - "indexid": "xW8a2XYtirHuAKzrUnyCSzq2BpqmpCnnHQ", - "hash160result": "c568b6e1f734f5dc9b754e5932ebdb63f2606bef", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.account.completedat" - } -} - -export const IDENTITY_ACCOUNT_PREVIOUSATTEMPTID: VDXFKeyInterface = { - "vdxfid": "iGU6RCWyjU1sscCPLN77XhTESJ21JCTNxF", - "indexid": "xMJCszx4anEYVn5RC3mGW5ymTx32EBfaqs", - "hash160result": "50c2b12bb483802d14beae3c6b7454c6ecc0848e", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.account.previousattemptid" - } -} - -export const IDENTITY_ACCOUNT_SHAREABLEURL: VDXFKeyInterface = { - "vdxfid": "i92YkV3FVGZfp5Ep3j1sfQUgqUS37M9v82", - "indexid": "xDrfDHULLanLSF7quQg2do1Ds8T3yGCRw3", - "hash160result": "52e9f990e5e89cc1088acd29a2fda0ef140ae73c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.account.shareableurl" - } -} - -export const IDENTITY_ACCOUNT_TEMPLATEID: VDXFKeyInterface = { - "vdxfid": "iL5diuVsHAG5DLVeyc8XYdEXR6fFro5G7s", - "indexid": "xQukBhvx8UUjqWNgqHngX1m4SkgGhnybh1", - "hash160result": "37ef653fe6685fca132d77834384702f6cd225b6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.account.templateid" - } -} - -export const IDENTITY_ACCOUNT_TEMPLATEVERSION: VDXFKeyInterface = { - "vdxfid": "i7eBZNzKrgFov6c2Sx2QecyEmPq2Mc4BGe", - "indexid": "xCUJ2BRQhzUUYGV4JdgZd1Vmo3r39BsUym", - "hash160result": "e6e490ce8bfde333ab0374880ea0efbb9c12b42d", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.account.templateversion" - } -} - -export const IDENTITY_ACCOUNT_STATUS: VDXFKeyInterface = { - "vdxfid": "iJf3EbihEtdEpJjbQ6PgUaL3GxDgZRzSWk", - "indexid": "xPV9hQ9n6CquSUcdFn3qSxraJcEhVfWa72", - "hash160result": "d6fc5578c2fbed3251f3aa250c73b58386ec86a6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.account.status" - } -} - -export const IDENTITY_PHONENUMBER: VDXFKeyInterface = { - "vdxfid": "iAQY8o4HwupzcJAw9aBtFwgrvWZGQStkge", - "indexid": "xFEebbVNoE3fEU3y1Fr3ELDPxAaHE7V2kN", - "hash160result": "32bc2c7919f626c39679630ee4d6d6d07bcd074c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.phonenumber" - } -} - -export const IDENTITY_DATEOFBIRTH: VDXFKeyInterface = { - "vdxfid": "iSZsa7C4esogN3W6fBngUHR6GvSmt7We4j", - "indexid": "xXPz2ud9WC2LzDP8WsSqSfwdJaTnqpHdND", - "hash160result": "ab74371e952a27f615b079d3c084b38b98c84dfd", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.dateofbirth" - } -} - -export const IDENTITY_OVER18: VDXFKeyInterface = { - "vdxfid": "iHPD8vB7jhtbuqPkUqzheqcZdfAfHUFVzM", - "indexid": "xNDKbicCb27GY1GnLXerdE96fKBg9tLUDT", - "hash160result": "28139ce1eae370e76f749066f778466597689098", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.over18" - } -} - -export const IDENTITY_OVER21: VDXFKeyInterface = { - "vdxfid": "iAXYYrZaipc4DAmAKXUFYZxavsf6uBJqaj", - "indexid": "xFMf1ezfa8piqLeCBD8QWxV7xXg7mxMc1Z", - "hash160result": "7a1fee70ace1c048c0a93c120a8a4c5f890f5b4d", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.over21" - } -} - -export const IDENTITY_OVER25: VDXFKeyInterface = { - "vdxfid": "iDuForPTZFeFBAgDX1HyrP3d6of7wzrRaS", - "indexid": "xJjNGepYQZruoLZFNgx8pmaA8Tg8qSfnzM", - "hash160result": "2a1e6fa6913ea3659dcaf1c5bc20a96e399d5e72", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.over25" - } -} - -export const IDENTITY_ACCOUNT_REQUESTING_IPADDRESS: VDXFKeyInterface = { - "vdxfid": "i4uE1EvnDbq9WGhF5UbBr6fbxNLsgk1eZ3", - "indexid": "x9jLU3Ms4v3p8SaGwAFLpVC8z2MtYJTVwp", - "hash160result": "05a3aa58192812972a2c4e4184af7bb5fbf9a30f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.account.requesting.ipaddress" - } -} - -export const IDENTITY_EMAIL: VDXFKeyInterface = { - "vdxfid": "iJ4pq4DCymfbu8SAuXyNhasLeSHFNKPr23", - "indexid": "xNtwHreHq5tGXJKCmDdXfyPsg6JGHUY6X1", - "hash160result": "15a8095b6298bbff5147060d9a6363a9df6c0ea0", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.email" - } -} - -export const IDENTITY_NATIONALITY: VDXFKeyInterface = { - "vdxfid": "iEUYNTkw6kFhZWto7vyTpQqtdRL7eoKZY2", - "indexid": "xKJeqGC1x4UNBgmpycdcnoNRf5M8btexbt", - "hash160result": "db935713b90281d6aefe5e7b33e5b660962aaa78", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.nationality" - } -} - -export const IDENTITY_FIRSTNAME: VDXFKeyInterface = { - "vdxfid": "iLB8SG7ErJtTYcG1f4w9RLuMJPpAsjFkiL", - "indexid": "xR1Eu4YKhd78An93WkbJPjRtL3qBprmMno", - "hash160result": "0bab76359b70b37c858399c2a3776939c5de2fb7", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.firstname" - } -} - -export const IDENTITY_MIDDLENAME: VDXFKeyInterface = { - "vdxfid": "iHG6ALRUPyRcgJMsPqBmvUCZxe4PrMfgej", - "indexid": "xN6Cd8rZFHeHJUEuFWqvtrj6zJ5QjX94j5", - "hash160result": "b98bd82034ec86ae5538313c9f5501c086ac3797", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.middlename" - } -} - -export const IDENTITY_LASTNAME: VDXFKeyInterface = { - "vdxfid": "iKRmfy4xgjWQyPdXYie6dJezRXF4aKdbHB", - "indexid": "xQFt8mW3Y3j5bZWZQQJFbhBXTBG5S4vdaZ", - "hash160result": "6b597e0c05d1430566b7b17a59da683fb4a6fcae", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.lastname" - } -} - -export const IDENTITY_GENDER: VDXFKeyInterface = { - "vdxfid": "iShgSBdiYDQnVwgNcDnSbNYHGU6CTwBDb1", - "indexid": "xXXntz4oPXdT87ZQTuSbZm4pJ87DGEgHpG", - "hash160result": "3baee594e927d47b641c7cf3927ab3229dd0c7fe", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.gender" - } -} - -export const IDENTITY_HEIGHT: VDXFKeyInterface = { - "vdxfid": "iLmLmsFMTUm4dd2iMuMe4xaMC8VSZN9soP", - "indexid": "xRbTEfgSJnyjFnukDb1o3M6tDnWTSUiii7", - "hash160result": "e80652253fa52b95cd9ea5ff43d51642ea4fa8bd", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.height" - } -} - -export const IDENTITY_EYECOLOR: VDXFKeyInterface = { - "vdxfid": "iRo2XT8tcMtLTpuPJ6V5WxbnVWa2CrcdsJ", - "indexid": "xWd8zFZyTg715znR9n9EVM8KXAb328xGbZ", - "hash160result": "c60fdfcc04173f273aa92a3b1844964b368ad2f4", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.eyecolor" - } -} - -export const IDENTITY_ETHNICITY: VDXFKeyInterface = { - "vdxfid": "i9jHPJokwnLoCQ83P6jqezCcEZUD1g34B9", - "indexid": "xEZPr7Eqo6ZTpa15EnPzdNj9GDVDsfToki", - "hash160result": "0476d568a9cf949bc8b6d84dc73e38cf85449b44", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.ethnicity" - } -} - -export const IDENTITY_WEIGHT: VDXFKeyInterface = { - "vdxfid": "iMzGK44r6SNkzi3N3AmcZBtuysPvgYiRiT", - "indexid": "xSpNmrVvwkbRcsvPtrRmXaRT1XQwXFe2Ut", - "hash160result": "8abe0e94cb1ff345f1351720acc8eefed91e12cb", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.weight" - } -} - -export const IDENTITY_HOMEADDRESS: VDXFKeyInterface = { - "vdxfid": "i9A1fD5sVwFFXzEmCJWSRDqN94PXp9oNaS", - "indexid": "xDz881WxMFTvAA7o3zAbPcMuAiQYiT4Vnc", - "hash160result": "072a3abed3a353e001288074d9426285e569503e", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.homeaddress" - } -} - -export const IDENTITY_HOMEADDRESS_STREET1: VDXFKeyInterface = { - "vdxfid": "i5BJAwQbrP4Bht8gUpoqSrovuBwfRc6jiv", - "indexid": "xA1QdjqghhGrL41iLWTzRFLTvqxgNsVzXY", - "hash160result": "ff22b196e64c9388daab76a57bcaea50491cae12", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.homeaddress.street1" - } -} - -export const IDENTITY_HOMEADDRESS_STREET2: VDXFKeyInterface = { - "vdxfid": "iMx71C14hrBoWD3yyhYChmhJEw4Kqw1zj4", - "indexid": "xSnDTzS9ZAQU8Nw1qPCMgADqGb5Lgqb4zw", - "hash160result": "efdda473a6a9e98cd91b02d36bfeb5dec784a9ca", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.homeaddress.street2" - } -} - -export const IDENTITY_HOMEADDRESS_CITY: VDXFKeyInterface = { - "vdxfid": "i75ZpW5T6wgQEMVxyvqHT9ZaV4fjsQ7kws", - "indexid": "xBugHJWXxFu4rXNzqcVSRY67WigkoCUEUQ", - "hash160result": "fcae40d5d327f13dc0e0c1e80f3db212a4ed8827", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.homeaddress.city" - } -} - -export const IDENTITY_HOMEADDRESS_REGION: VDXFKeyInterface = { - "vdxfid": "iRkYck3JowdFWmrM6VUAS8Wtpmxds2fLXS", - "indexid": "xWaf5YUPfFqv8wjNxB8KQX3RrRyenbioh5", - "hash160result": "fa06b90a547658a3efc3cd1797d6b3cd30695af4", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.homeaddress.region" - } -} - -export const IDENTITY_HOMEADDRESS_POSTCODE: VDXFKeyInterface = { - "vdxfid": "iAL2FRG8PVi18fN8MatjXhV1YkuZr7PM4T", - "indexid": "xFA8iDhDEovfkqFADGYtW61YaQvahtrhJA", - "hash160result": "b4f4c3a08fdcf32209482fa3d8c7b01201312d4b", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.homeaddress.postcode" - } -} - -export const IDENTITY_HOMEADDRESS_COUNTRY: VDXFKeyInterface = { - "vdxfid": "iABYGvas6uUDk9ejCkfCVLvE9PPJXgyCKX", - "indexid": "xF1ejj1wxDgtNKXm4SKMTjSmB3QKL8LhQG", - "hash160result": "bafb2cb6d5cc86478622feb8a00097d71d839249", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.homeaddress.country" - } -} - -export const IDENTITY_IDNUMBER_VALUE: VDXFKeyInterface = { - "vdxfid": "iQrnvbCNWMaG6PjTmeXzrcuAXKsMzmNJWA", - "indexid": "xVguPPdTMfnviZcVdLC9q1RhYytNuZ3ToS", - "hash160result": "72cf52b2f6b4f68173c933fb046e892870b990ea", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idnumber.value" - } -} - -export const IDENTITY_IDNUMBER_TYPE: VDXFKeyInterface = { - "vdxfid": "iSSZX5yUdQh7zLf1gUewH5rVfbXtSq2c4s", - "indexid": "xXGfytQZUiuncWY3YAK6FUP2hFYuQ4yYwW", - "hash160result": "2807f356d687b4c6208ce0379b31043c7fcdebfb", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idnumber.type" - } -} - -export const IDENTITY_VERIFICATION_STATUS: VDXFKeyInterface = { - "vdxfid": "i8MhqW3ejupmV1M5UyhyhG13dkS8A7g7zg", - "indexid": "xDBpJJUjbE3S7BE7LfN8feXafQT92YQZPm", - "hash160result": "47f2864de74ffe01ccb7eeabf0f2d848e3668e35", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.verification.status" - } -} - -export const IDENTITY_VERIFICATION_APPROVALS: VDXFKeyInterface = { - "vdxfid": "iBMkZtqC9yqVrFL4GfYtXckFpYAhRkE2mj", - "indexid": "xGBs2hGH1J4AURD68MD3W1GnrCBiJ3nRgG", - "hash160result": "a98801de1ba5ff5e571dbdde50519483140f7956", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.verification.approvals" - } -} - -export const IDENTITY_VERIFICATION_APPROVALS_ACCEPTEDTOS: VDXFKeyInterface = { - "vdxfid": "iH32QkXBKyWEJD6kh9HJ4KMfeiWfPWoHEh", - "indexid": "xMs8sYxGBHitvNynYpwT2htCgNXgHt6VAW", - "hash160result": "bbe4c09ae069561d3c14b04e3b7b96c98622bf94", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.verification.approvals.acceptedtos" - } -} - -export const IDENTITY_VERIFICATION_APPROVALS_VERIFIEDSMS: VDXFKeyInterface = { - "vdxfid": "iPgyMDFQ9QMNrqc3ckEBEubDNwLnvubUdW", - "indexid": "xUX5p1gUzia3V1V5URtLDJ7kQbMosPsVj8", - "hash160result": "72853b66aa158531e1f15b9ff075199a1224bddd", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.verification.approvals.verifiedsms" - } -} - -export const IDENTITY_VERIFICATION_APPROVALS_KYCCHECKED: VDXFKeyInterface = { - "vdxfid": "iRnbiA4dAPbeuB6KQN2donBHP9mKUHHFZf", - "indexid": "xWciAxVi1hpKXLyMG3gnnAhpQonLQapWPv", - "hash160result": "c6114ffec250b746bde117903b930d9a34d3bdf4", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.verification.approvals.kycchecked" - } -} - -export const IDENTITY_VERIFICATION_APPROVALS_DOCUMENTSVERIFIED: VDXFKeyInterface = { - "vdxfid": "iBjML9DHV67MBQyMEHVTSoJPhU8DNeWRTE", - "indexid": "xGZTnweNLQL1oarP5y9cRBpvj89EGt5VSm", - "hash160result": "0a93883010769ff783be5ced074ecfa50dd08e5a", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.verification.approvals.documentsverified" - } -} - -export const IDENTITY_VERIFICATION_APPROVALS_SELFIECHECKED: VDXFKeyInterface = { - "vdxfid": "iKgeFKoy6WMx9MoEjig5vHoXbyxVFBPWDN", - "indexid": "xQWki8F3wpacmXgGbQLEtgL4ddyWC8UZLv", - "hash160result": "6a044306ef77ce9896ffcd26ee40174651b1ccb1", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.verification.approvals.selfiechecked" - } -} - -export const IDENTITY_VERIFICATION_APPROVALS_WATCHLISTOK: VDXFKeyInterface = { - "vdxfid": "iFDB1qKYSrWMRaMCWX6hNGE8HVXB1cNtJu", - "indexid": "xL3HUdkdJAj23kEENCkrLekfK9YBymnLrX", - "hash160result": "e691a2d2af30df6ee21f0eb805a98e11d539ba80", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.verification.approvals.watchlistok" - } -} - -export const IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK: VDXFKeyInterface = { - "vdxfid": "i9dva492S7vQphjLiK2UaS7JikZKs5TQsB", - "indexid": "xEU32ra7HS95SscNZzgdYpdqkQaLjnzcyC", - "hash160result": "6ffdbee07124450d29698724573bd6ab07d09743", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.verification.approvals.riskcheckok" - } -} - -export const IDENTITY_VERIFICATION_APPROVALS_STATUS: VDXFKeyInterface = { - "vdxfid": "iKhGUcTH4ZQ7uiy933m8f1GbwSLcwJW8ev", - "indexid": "xQXNwQtMuscnXtrAtjRHdPo8y6MdomjAXM", - "hash160result": "00612f17d9cedc346fcd139c0c5b56e666efeab1", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.verification.approvals.status" - } -} - -export const IDENTITY_DRIVINGLICENCE: VDXFKeyInterface = { - "vdxfid": "iMYQw33ryywcNyQDjFjiVvFm2kAwG85poV", - "indexid": "xSNXPqUwqJAH19HFawPsUJnJ4QBxCATPNx", - "hash160result": "e2857ddcc4f3301c354a00d1376558a75e802ec6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence" - } -} - -export const IDENTITY_DRIVINGLICENCE_ORIGINALFRONT: VDXFKeyInterface = { - "vdxfid": "i3fq6ET2dL8CxC3BJzdYTpUsjEsQaKP7bX", - "indexid": "x8VwZ2t7UeLsaMvDAgHhSD1QkttRPYndPW", - "hash160result": "26bab54e1f760b1abb888229a38a5179cc502302", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.originalfront" - } -} - -export const IDENTITY_DRIVINGLICENCE_ORIGINALBACK: VDXFKeyInterface = { - "vdxfid": "i7LTNZvJmm5LjAwMWuryb52yKt7txaV5FW", - "indexid": "xCAZqNMPd5J1MLpPNbX8ZTZWMY8unxdAfs", - "hash160result": "c7b3e9a70908fafc8de3e81f6ac2e0c131c9592a", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.originalback" - } -} - -export const IDENTITY_DRIVINGLICENCE_CROPPEDFRONT: VDXFKeyInterface = { - "vdxfid": "i8KsL3JJgbJyuqEyEbu5KZkDBFvHscLoM6", - "indexid": "xD9ynqjPXuXeY1816HZEHxGkCuwJoHBx54", - "hash160result": "7b28226a4f3eaae379cddbc84d037cfe587e3535", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.croppedfront" - } -} - -export const IDENTITY_DRIVINGLICENCE_CROPPEDBACK: VDXFKeyInterface = { - "vdxfid": "iRwumhx12vtT8CkspBLmKQY8WZywurxVXo", - "indexid": "xWn2EWP5tF77kNdufrzvHo4fYDzxhjXyZz", - "hash160result": "0b6edf21bfe119173b3fffab6118d79a39a580f6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.croppedback" - } -} - -export const IDENTITY_DRIVINGLICENCE_FACE: VDXFKeyInterface = { - "vdxfid": "i5i7U4EAbgPzhCRebtbmoZt6pTyqGqP8jj", - "indexid": "xAYDvrfFSzcfKNJgTaFvmxQdr7zr6oGgFh", - "hash160result": "1f47647bf3e71f0c1c2638c99e6a42e6bf118218", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.face" - } -} - -export const IDENTITY_DRIVINGLICENCE_IDNUMBER: VDXFKeyInterface = { - "vdxfid": "iBCA8b4zS5ygVgTFqxabke7BBFs92dhcXQ", - "indexid": "xG2GbPW5HQCM7rLHheEkj2diCut9vgFhM2", - "hash160result": "fcf0571278bd1afce6d93f0a99f41437bb91a854", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.idnumber" - } -} - -export const IDENTITY_DRIVINGLICENCE_CATEGORY: VDXFKeyInterface = { - "vdxfid": "i5Cm95DZa6FPP66bA6aFfoYL2jaojetHMp", - "indexid": "xA2sbseeRQU41Fyd1nEQeC4s4Pbpf63xB4", - "hash160result": "3b91fccdf59d99b21e442441b89abb31bf09f512", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.category" - } -} - -export const IDENTITY_DRIVINGLICENCE_EXPIRATIONDATE: VDXFKeyInterface = { - "vdxfid": "iJvGpPoP1uUkUqn9bAchLyfaGWyy8JGQoX", - "indexid": "xPkPHCETsDhR71fBSrGrKNC7JAzz17RsLk", - "hash160result": "96aee63b3c6094a4d9edbc04b63a8e45688068a9", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.expirationdate" - } -} - -export const IDENTITY_DRIVINGLICENCE_ISSUINGCOUNTRY: VDXFKeyInterface = { - "vdxfid": "iBsNEqysX64cQAjiRHHL1msd7LxroGM6Mb", - "indexid": "xGhUheQxNQHH2LckGxwUzAQA8zysfnKDSU", - "hash160result": "f2f24dd2383538493d21ff0aca77c7cd1fe6125c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.issuingcountry" - } -} - -export const IDENTITY_DRIVINGLICENCE_ISSUINGREGION: VDXFKeyInterface = { - "vdxfid": "i6gZSDYpK9inexaeFQDSk9GuAmew1ymMFo", - "indexid": "xBWfu1yuATwTH8Tg75sbiXoSCRfwsxQzeR", - "hash160result": "67f4fd5c49250912aecf1eb8ab17f29d590a2f23", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.issuingregion" - } -} - -export const IDENTITY_DRIVINGLICENCE_DATEOFBIRTH: VDXFKeyInterface = { - "vdxfid": "iChWUsL1NQwDqcwXbFGxHiCegfquGPyadv", - "indexid": "xHXcwfm6Dj9tTnpZSvw7G6jBiKrvBUhwaw", - "hash160result": "3c7bd13bcdb54368e7590a9f2da5b201b7be2d65", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.dateofbirth" - } -} - -export const IDENTITY_DRIVINGLICENCE_ADDRESS_STREET1: VDXFKeyInterface = { - "vdxfid": "i9xaEvSQ537wuYgcVPRgG3zop9bVzeDTBw", - "indexid": "xEnghisUvMLcXiZeM55qESXLqocWsv6zmJ", - "hash160result": "48dd1caf84c1a49209ca44064846dc4ad0be1e47", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.address.street1" - } -} - -export const IDENTITY_DRIVINGLICENCE_ADDRESS_CITY: VDXFKeyInterface = { - "vdxfid": "i6XMEh3jrxzdyoVYoNWhRSncR9oWSnmikd", - "indexid": "xBMThVUpiHDJbyNaf4ArPqK9SopXGndEyv", - "hash160result": "c1f3612774870d1f12320bff317e7790211d7121", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.address.city" - } -} - -export const IDENTITY_DRIVINGLICENCE_ADDRESS_REGION: VDXFKeyInterface = { - "vdxfid": "i7sPBSqerD23RAqfN167aYePjfC8LL34UA", - "indexid": "xChVeFGjhXEi3LihDgkGYwAvmKD9CsNunu", - "hash160result": "991d24c053cb59a816e161fe3af2f40a7f2e3330", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.address.region" - } -} - -export const IDENTITY_DRIVINGLICENCE_ADDRESS_POSTCODE: VDXFKeyInterface = { - "vdxfid": "i9eHAmpeA3tmpsVeG5EkHuVfALFrmpzLqM", - "indexid": "xEUPdaFj1N7ST3Ng7ktuGJ2CBzGsZbja5V", - "hash160result": "f5905bbdf2eb60b24ccf6851716cc0efe801a943", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.address.postcode" - } -} - -export const IDENTITY_DRIVINGLICENCE_ADDRESS_COUNTRY: VDXFKeyInterface = { - "vdxfid": "i3xAMYBKLVdK89kuheXhTjuJTAxozmypj3", - "indexid": "x8nGpLcQBoqykKdwZLBrS8RqUpypqVUEV5", - "hash160result": "459844e00df4387514f31f182a88f7e13b0d3a05", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.drivinglicence.address.country" - } -} - -export const IDENTITY_SELFIECHECK_IMAGE: VDXFKeyInterface = { - "vdxfid": "iC22PxGqY7Mx3YT9kNrW1d11JNyGL56N8e", - "indexid": "xGr8rkhvPRacfiLBc4Wez1XYL2zHDDbJgD", - "hash160result": "c52d0023cce8c847a5097b6898f867651914b65d", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.selfiecheck.image" - } -} - -export const IDENTITY_SELFIECHECK_VIDEO: VDXFKeyInterface = { - "vdxfid": "iLfnRYzcdQXR6am8rZk7xNtTUbLZo5NLG6", - "indexid": "xRVttMRhUik5ikeAiFQGvmQzWFMajwrVzX", - "hash160result": "ac0674f6d656d434e0b5b310daaaed554c3a9bbc", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.selfiecheck.video" - } -} - -export const IDENTITY_EMAIL_ISDELIVERABLE: VDXFKeyInterface = { - "vdxfid": "iN5Tdse8NSwuW6A4ZavHbHoDyD8aVjn1Ky", - "indexid": "xSua6g5DDmAa8G36RGaSZgKkzs9bSnFbCX", - "hash160result": "8194ee01a0bc66dca2af9ba7c3bba4a24da70dcc", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.email.isdeliverable" - } -} - -export const IDENTITY_EMAIL_BREACHCOUNT: VDXFKeyInterface = { - "vdxfid": "iDy1YKGhzVjAiMiuAvFDqxQbmLRhLEjwPo", - "indexid": "xJo817hnqowqLXbw2buNpLw8nzSiAygHhx", - "hash160result": "8144d2d8cafd733bb03847166be8493d275e1473", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.email.breachcount" - } -} - -export const IDENTITY_EMAIL_FIRSTBREACHEDAT: VDXFKeyInterface = { - "vdxfid": "i3eSGR4wrLk5djHsnT18dDHrJBFSBBxVST", - "indexid": "x8UYjDW2hexkFuAue8fHbbpPKqGT4mjAzH", - "hash160result": "df796054181f57d3b61d655d604d42d6c6d8df01", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.email.firstbreachedat" - } -} - -export const IDENTITY_EMAIL_LASTBREACHEDAT: VDXFKeyInterface = { - "vdxfid": "iCuZWBzmxCoFcRFjXYFgC6g4jT7kzxvhew", - "indexid": "xHjfxzRroX1vEb8mPDuqAVCbm78ms8Hkhd", - "hash160result": "d1b421db4c835cfa67b491342c31f89283427567", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.email.lastbreachedat" - } -} - -export const IDENTITY_EMAIL_DOMAIN_REGISTEREDAT: VDXFKeyInterface = { - "vdxfid": "iGxV4SBRZMk5qWrQEKgUS4RoqzpDmyBEpC", - "indexid": "xMnbXEcWQfxkTgjS61LdQSxLseqEcTADNA", - "hash160result": "e195ef220f8e71bfa7bef160291ecaa0164de393", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.email.domain.registeredat" - } -} - -export const IDENTITY_EMAIL_DOMAIN_FREEPROVIDER: VDXFKeyInterface = { - "vdxfid": "iLUfvKcg92CYo3BvCuRf5o844d44kGLhJL", - "indexid": "xRJnP83kzLRDRD4x4b5p4Beb6H55fetTy7", - "hash160result": "0b0f213c88a1b0df6cd01721955b1d0c103981ba", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.email.domain.freeprovider" - } -} - -export const IDENTITY_EMAIL_DOMAIN_CUSTOM: VDXFKeyInterface = { - "vdxfid": "i4FSBFpQ6Ccjiy2g61GrxhBppv1jDDh6on", - "indexid": "x95Ye4FUwWqQM8uhwgw1w5iMra2k7F1Lfz", - "hash160result": "bea1175185aeaf256aa7f04795b2c8d0c8547e08", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.email.domain.custom" - } -} - -export const IDENTITY_EMAIL_DOMAIN_DISPOSABLE: VDXFKeyInterface = { - "vdxfid": "i52PJxRyjKAEkmQFd2oGYgZV3pcsQUcD1T", - "indexid": "x9rVmks4adNuNwHHUiTRX5625UdtJPBQ1w", - "hash160result": "3adf98cb5cc90a074a52a651c50f67f5f0a7fe10", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.email.domain.disposable" - } -} - -export const IDENTITY_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS: VDXFKeyInterface = { - "vdxfid": "iCtAZWinafiyf4tmvPxFkKNn5KxayXTPSV", - "indexid": "xHiH2K9sRyweHEmon5cQihuK6yybre797b", - "hash160result": "85477eb8148562614c396ca64fc7563637b13167", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.email.domain.toplevel.suspicious" - } -} - -export const IDENTITY_PASSPORT: VDXFKeyInterface = { - "vdxfid": "iKgbqmZ4Ks9SPNQGj5PZ5TgXomYG4CtaXv", - "indexid": "xQWiJZz9BBN71YHJam3i3rD4qRZH1sbLHD", - "hash160result": "775f52820102c994e30a29b1828b064421afcab1", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport" - } -} - -export const IDENTITY_PASSPORT_ORIGINALFRONT: VDXFKeyInterface = { - "vdxfid": "iCwT1mHdci9wooC6Q8mtx8QssXzwiL4hxp", - "indexid": "xHmZUZiiU2NcRy58FpS3vWwQuC1xdM48mW", - "hash160result": "25023e23a25ba4daa7ac0a9c96180f5e90acd067", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.originalfront" - } -} - -export const IDENTITY_PASSPORT_ORIGINALBACK: VDXFKeyInterface = { - "vdxfid": "iDXKJaroNRKr9GZfLFvH7LttJQaXqGoSrc", - "indexid": "xJMRmPHtDjYWmSShBwaS5jRRL4bYmTdC9J", - "hash160result": "21734b0f37ec51dd77bdab8c10065cf67b61386e", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.originalback" - } -} - -export const IDENTITY_PASSPORT_CROPPEDFRONT: VDXFKeyInterface = { - "vdxfid": "i4cr6CxCYDHUDjc6UoMsDVAZoNep6Meuyi", - "indexid": "x9SxZ1PHPXW8quV8LV22Bsh6q2fpxtJ6Zd", - "hash160result": "274c241806d31576a57a074cc2f6b4c624078b0c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.croppedfront" - } -} - -export const IDENTITY_PASSPORT_CROPPEDBACK: VDXFKeyInterface = { - "vdxfid": "i6wA2ttX7vcxBXmrdmGEa44NZEFBZWoRYa", - "indexid": "xBmGVhKbyEqcohetVSvPYSauatGCUYDMs2", - "hash160result": "f56f1db46ddebc99f3c8954fc8bf1d26a9bef125", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.croppedback" - } -} - -export const IDENTITY_PASSPORT_FACE: VDXFKeyInterface = { - "vdxfid": "iLCbvnyU4V3XeMz18CXAG5MCtjb2FjpcZX", - "indexid": "xR2iPbQYuoGCGXs2ytBKETsjvPc35DNZDm", - "hash160result": "26f7dc9d524f84a21c8a9e3f2dc5149f3a3c77b7", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.face" - } -} - -export const IDENTITY_PASSPORT_IDNUMBER: VDXFKeyInterface = { - "vdxfid": "iDYih1jmCA1oexyxZ1PQFL5ewyciqoQ2rw", - "indexid": "xJNq9pAr3UEUH8rzQh3ZDicByddjgKM4vN", - "hash160result": "c8a25af227fc07e260119b370da0eae2a9517c6e", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.idnumber" - } -} - -export const IDENTITY_PASSPORT_CATEGORY: VDXFKeyInterface = { - "vdxfid": "iMtpUJYWZmnnSJyJcshHRdWJZMhZVZZifT", - "indexid": "xSivw6ybR61T4UrLUZMSQ22qb1iaQux7BU", - "hash160result": "84a9f125285d7e93a1e676ed48e3fbe459780aca", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.category" - } -} - -export const IDENTITY_PASSPORT_EXPIRATIONDATE: VDXFKeyInterface = { - "vdxfid": "i98TaZ3wTh3qRw2ufeunVY2MD5eKwoamGE", - "indexid": "xDxa3MV2K1GW46uwXLZwTvYtEjfLspcYEK", - "hash160result": "07727b480c654d59cb611ed01715e254eb37053e", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.expirationdate" - } -} - -export const IDENTITY_PASSPORT_ISSUINGCOUNTRY: VDXFKeyInterface = { - "vdxfid": "iRHGM2GEYeRUuHKSG1wENVA16bdyVRxchn", - "indexid": "xW7NophKPxe9XTCU7hbPLsgY8FezLKmJHi", - "hash160result": "4798dee337b16fc22d26748fb0803738f99831ef", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.issuingcountry" - } -} - -export const IDENTITY_PASSPORT_ISSUINGREGION: VDXFKeyInterface = { - "vdxfid": "i6Ay9VdcZjGrJur5SNyhBDZWzxGmo7qUmW", - "indexid": "xB15cJ4hR3VWw5j7J4dr9c642cHnbq2nm9", - "hash160result": "f3d9b605096f4c816de7d72c597fee07e75a961d", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.issuingregion" - } -} - -export const IDENTITY_PASSPORT_DATEOFBIRTH: VDXFKeyInterface = { - "vdxfid": "iAjG8DwYfKxt9affJy6CUBDDFK5jaeHRLJ", - "indexid": "xFZNb2NdWeBYmkYhAekMSZjkGy6kWqAqyd", - "hash160result": "73eb23619d178f495a24b41aaf6aac107357924f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.dateofbirth" - } -} - -export const IDENTITY_PASSPORT_ADDRESS_STREET1: VDXFKeyInterface = { - "vdxfid": "i7HPJNB16V5pws8xSq4a8pHF29Mcg6sUyy", - "indexid": "xC7VmAc5woJVa31zJWij7Con3oNdXuBysY", - "hash160result": "c28625c4dfc12d3cdd85f8c7272e87a57523c529", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.address.street1" - } -} - -export const IDENTITY_PASSPORT_ADDRESS_CITY: VDXFKeyInterface = { - "vdxfid": "iFSLsk21VvWSWLg9a4XFTB3kEN8bLnTB7c", - "indexid": "xLGTLYT6MEj78WZBRkBQRZaHG29cBfjnYu", - "hash160result": "c06884e75232e86de75c6ccbd5605a3352dd3783", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.address.city" - } -} - -export const IDENTITY_PASSPORT_ADDRESS_REGION: VDXFKeyInterface = { - "vdxfid": "iFNoUQhExFEYTgrqgy7x22Q6URM7ek9L3J", - "indexid": "xLCuwD8KoZTD5rjsYen6zQvdW5N8Z4oGqf", - "hash160result": "7b7baa6d0d788f434536aa472c57d9de40678c82", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.address.region" - } -} - -export const IDENTITY_PASSPORT_ADDRESS_POSTCODE: VDXFKeyInterface = { - "vdxfid": "iS4SakGdB4ek1Q1QAitXUwFEk1RVyi3rLY", - "indexid": "xWtZ3Yhi2NsQdZtS2QYgTKmmmfSWrxdFKY", - "hash160result": "4457551bc48db37393f5ec3ec3d0cf6766dcbcf7", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.address.postcode" - } -} - -export const IDENTITY_PASSPORT_ADDRESS_COUNTRY: VDXFKeyInterface = { - "vdxfid": "iB9w9GgcJdGTt3ZuM2pm5qpDBA3UaJdcvj", - "indexid": "xFz3c57h9wV8WDSwCiUv4ELkCp4VNyPHLr", - "hash160result": "dd93bcbecc805e5b1606efafa1ecab6b33e53c54", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.passport.address.country" - } -} - -export const IDENTITY_RESIDENCEPERMIT: VDXFKeyInterface = { - "vdxfid": "i8WZetqKFn98rHRZGvAvPuzPyrJeyUMjfb", - "indexid": "xDLg7hGQ76MoUTJb8bq5NJWw1WKftQg9VL", - "hash160result": "712ef00d9937eb4ade0fd3e627c2df1d99503b37", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit" - } -} - -export const IDENTITY_RESIDENCEPERMIT_ORIGINALFRONT: VDXFKeyInterface = { - "vdxfid": "iC5NrmPgKckxBjKv7v9HjUMytm4jRtEBgZ", - "indexid": "xGuVKZpmAvycouCwyboShrtWvR5kNYzWoH", - "hash160result": "639ed2ef9da2f5e75fe63e1ccf83d1b54e68585e", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.originalfront" - } -} - -export const IDENTITY_RESIDENCEPERMIT_ORIGINALBACK: VDXFKeyInterface = { - "vdxfid": "iLTPvrZi8HNALuVmYeAWnSnLdZ5GsAAUcx", - "indexid": "xRHWPeznybapy5NoQKpfkqJsfD6HmQW5eW", - "hash160result": "94d200a22dbdfa7ba47d1970c21eacb65f7543ba", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.originalback" - } -} - -export const IDENTITY_RESIDENCEPERMIT_CROPPEDFRONT: VDXFKeyInterface = { - "vdxfid": "i6T3rairykWA5vVEtQqptjp5RBRhTCmsBS", - "indexid": "xBHAKP9wq4ipi6NGk6Vys8LcSqSiKAMKZU", - "hash160result": "14136815f288a4b6426c7f4ab6b28221dcf0a020", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.croppedfront" - } -} - -export const IDENTITY_RESIDENCEPERMIT_CROPPEDBACK: VDXFKeyInterface = { - "vdxfid": "iHssgpjB2gsusjjLH36N3KqUQqz7JPXumA", - "indexid": "xNhz9dAFt16aVucN8ikX1iN1SW18D7SNDP", - "hash160result": "ce3cae77f2010009817f1e01de52ce8a493cfc9d", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.croppedback" - } -} - -export const IDENTITY_RESIDENCEPERMIT_FACE: VDXFKeyInterface = { - "vdxfid": "iNVvVYKcKuredXKvctn5uQxp3kNXoJrwNb", - "indexid": "xTL2xLkhBE5KFhCxUaSEsoVM5QPYfELeHf", - "hash160result": "4dd17db50d569a63cc892d78850ac9de1d0eaed0", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.face" - } -} - -export const IDENTITY_RESIDENCEPERMIT_IDNUMBER: VDXFKeyInterface = { - "vdxfid": "iMxygBvDFftAnmUCjVLh21etV5v4wt9zdk", - "indexid": "xSo68zMJ6z6qQwMEbAzqzQBRWjw5u6Tm63", - "hash160result": "ab544471e583d6a11245bb971e3ee1ef5ed1d3ca", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.idnumber" - } -} - -export const IDENTITY_RESIDENCEPERMIT_CATEGORY: VDXFKeyInterface = { - "vdxfid": "iGbMb21an69VE6iTH2iRtRFKCEUZPJHTwU", - "indexid": "xMRU3pSfdQN9rGbV8iNaromrDtVaCufAXu", - "hash160result": "ae9031bab1ee600e10aa16ec1d4c13def953e48f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.category" - } -} - -export const IDENTITY_RESIDENCEPERMIT_EXPIRATIONDATE: VDXFKeyInterface = { - "vdxfid": "iJ48ALemxyMV6DYzeuRMe8Fn78iMZdjSXZ", - "indexid": "xNtEd95rpHa9iPS2Wb5WcWnK8njNXD9HEH", - "hash160result": "d3083b08621d6ff5dc3f7f9cace34f944d7aec9f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.expirationdate" - } -} - -export const IDENTITY_RESIDENCEPERMIT_ISSUINGCOUNTRY: VDXFKeyInterface = { - "vdxfid": "i7UhTp4gruQwtkC1bi4RxE4wUAsro6n9Ym", - "indexid": "xCJovcVmiDdcWv53TPiavcbUVptsgMKzdL", - "hash160result": "75e37dc8957c8c6765c60962804d446b2de0e82b", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.issuingcountry" - } -} - -export const IDENTITY_RESIDENCEPERMIT_ISSUINGREGION: VDXFKeyInterface = { - "vdxfid": "iERBNWk2tyaGJ2w8P1kM88Mdj5WA9qFzbv", - "indexid": "xKFHqKB7kHnvvCpAEhQW6WtAkjXAymjqXM", - "hash160result": "788165581de37b5473c2f127d387f3d7a8630778", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.issuingregion" - } -} - -export const IDENTITY_RESIDENCEPERMIT_DATEOFBIRTH: VDXFKeyInterface = { - "vdxfid": "iM62dN7LSHWDuetPi6qAewG6bzYwFrcqBN", - "indexid": "xRv96AYRHbitXpmRZnVKdKnddeZxAivvFE", - "hash160result": "e2533190e4822ab51c5b2029039fbb0d431131c1", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.dateofbirth" - } -} - -export const IDENTITY_RESIDENCEPERMIT_ADDRESS: VDXFKeyInterface = { - "vdxfid": "iCA8P2rVs5DjtzQpXEnPJcG4KBs79C9EpL", - "indexid": "xGzEqqHaiPSQXAHrNvSYGznbLqt83gLGV5", - "hash160result": "2c7264a72e1d7937da951620039e48a0c8663e5f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.address" - } -} - -export const IDENTITY_RESIDENCEPERMIT_ADDRESS_STREET1: VDXFKeyInterface = { - "vdxfid": "iMuY2CbmQpCFzodGBtqxogmTb5dYfNbCJa", - "indexid": "xSjeV12rG8QvcyWJ3aW7n5HzcjeZaxtGwr", - "hash160result": "444cbb0dc6f471ecb2261dc7d6731cd97e272dca", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.address.street1" - } -} - -export const IDENTITY_RESIDENCEPERMIT_ADDRESS_CITY: VDXFKeyInterface = { - "vdxfid": "iRckJ1VkfYazfVHWJuA9iXTth83ZYp8znz", - "indexid": "xWSrkovqWrofHfAYAapJguzRin4aPEqHJK", - "hash160result": "73e22f5d24515103052ab165736a0198a7d4e0f2", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.address.city" - } -} - -export const IDENTITY_RESIDENCEPERMIT_ADDRESS_REGION: VDXFKeyInterface = { - "vdxfid": "iBpH337NTJSLjSxbBWuu2wBLu12k4JVGk4", - "indexid": "xGePVqYTJcf1Mcqd3Ca41Khsvf3kyxtNXH", - "hash160result": "2f7b3040cf60259ee4bf6dfc93a4de42ab4e7d5b", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.address.region" - } -} - -export const IDENTITY_RESIDENCEPERMIT_ADDRESS_POSTCODE: VDXFKeyInterface = { - "vdxfid": "iGKi47jtg6CumKYSUBj57drgLNGzhJY3Gj", - "indexid": "xM9pWvAyXQRaPVRUKsPE62PDN2J1Zp4d6b", - "hash160result": "db85ea63848a6ad2c3a0e82bb29e215c00c2ee8c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.address.postcode" - } -} - -export const IDENTITY_RESIDENCEPERMIT_ADDRESS_COUNTRY: VDXFKeyInterface = { - "vdxfid": "i8KD9CUn7Su4YT44WhbD8HYA1K425cFCqM", - "indexid": "xD9Kbzurxm7jAcw6NPFN6g4h2y531jRanx", - "hash160result": "75970ae74cd40419dc78ecef7be22c5ee09d1535", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencepermit.address.country" - } -} - -export const IDENTITY_RESIDENTCARD: VDXFKeyInterface = { - "vdxfid": "iKkJFFtbxRMJutjoruW47Mc1sCfdGYQrC9", - "indexid": "xQaQi4KgojZyY4cqibAD5k8Ytrge9jwt3u", - "hash160result": "2b737a5733b91d305dcf07d9e75797740da97db2", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard" - } -} - -export const IDENTITY_RESIDENTCARD_ORIGINALFRONT: VDXFKeyInterface = { - "vdxfid": "iNMJhZ3wie5U2SRF7WSFTpjJo6B6RSTR4t", - "indexid": "xTBRAMV2ZxJ8ecJGyC6QSDFqpkC7KTFMbW", - "hash160result": "e440d2d8bab46633691a12e7bed0ea785bd90ccf", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.originalfront" - } -} - -export const IDENTITY_RESIDENTCARD_ORIGINALBACK: VDXFKeyInterface = { - "vdxfid": "i4pAk8J5ec2wn55VattFRr7PyN4J2L13HJ", - "indexid": "x9eHCvjAVvFcQExXSaYQQEdw125Jz84d8u", - "hash160result": "9fa70ca8b49eab8c3e704f78f0e0ae1bc52caf0e", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.originalback" - } -} - -export const IDENTITY_RESIDENTCARD_CROPPEDFRONT: VDXFKeyInterface = { - "vdxfid": "iLnx7NDcAWtb9uWicdgSaiwco56TywMh5w", - "indexid": "xRd4aAeh1q7Fn5PkUKLbZ7U9pj7UvU8v2V", - "hash160result": "fa7347c3517552a028890dacaf889a6ead39f6bd", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.croppedfront" - } -} - -export const IDENTITY_RESIDENTCARD_CROPPEDBACK: VDXFKeyInterface = { - "vdxfid": "i8WjL22L4UeaCDKZuj8R4Uub6zurTPdaLv", - "indexid": "xDLqnpTQunsEpPCbmQna2sS88evsLJL51v", - "hash160result": "b5134fe72682aa4f0dc645ceb73421dc07644337", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.croppedback" - } -} - -export const IDENTITY_RESIDENTCARD_FACE: VDXFKeyInterface = { - "vdxfid": "i6dGShbLY2ppZnXSyfvdtdGFkCxBQd2r9Y", - "indexid": "xBTNuW2RPM3VBxQUqMans1nnmryCFH4rRD", - "hash160result": "25a41b37f64414a2477c5c0d1a139d64ce9b8f22", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.face" - } -} - -export const IDENTITY_RESIDENTCARD_IDNUMBER: VDXFKeyInterface = { - "vdxfid": "iKFkbwDcQRXjapZcZAXsaMXjgER9CZbwZx", - "indexid": "xQ5s4jehFjkQCzSeQrC2Yk4GhtSA2GbM4B", - "hash160result": "e30d9a01765325e02ca22f60335d4bdb499917ad", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.idnumber" - } -} - -export const IDENTITY_RESIDENTCARD_CATEGORY: VDXFKeyInterface = { - "vdxfid": "i46Fgc8ev9zAkjikjHWreqSXkMRpFr5Lsi", - "indexid": "x8vN9QZjmUCqNubnayB1dDy4n1SqAqg4vn", - "hash160result": "c0039a4929d081eec1d1f5ca3040e19bded3c106", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.category" - } -} - -export const IDENTITY_RESIDENTCARD_EXPIRATIONDATE: VDXFKeyInterface = { - "vdxfid": "iBA1oFvDABKqbu9i61AEGy1m5fFHdCWkpy", - "indexid": "xFz8G4MJ1VYWE52jwgpPFMYJ7KGJUd6Y4b", - "hash160result": "0866dd99514f509c9ad4584b3f570515f4c74054", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.expirationdate" - } -} - -export const IDENTITY_RESIDENTCARD_ISSUINGCOUNTRY: VDXFKeyInterface = { - "vdxfid": "iHBgD199BSEQWREtiW8dP259DX4qg6KjkM", - "indexid": "xN1nfoaE2kT58b7vaBnnMQbgFB5rWuKCtd", - "hash160result": "ef88ffb14a8b66dacc690351fa9c3d35a8036296", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.issuingcountry" - } -} - -export const IDENTITY_RESIDENTCARD_ISSUINGREGION: VDXFKeyInterface = { - "vdxfid": "i6jygVNjzZUFEXVgtzWxXpBYf5rwjXF92J", - "indexid": "xBa69HopqsgurhNikgB7WCi5gjsxbi12z3", - "hash160result": "dc31e031328cfe3697527e046a52cc372687d423", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.issuingregion" - } -} - -export const IDENTITY_RESIDENTCARD_DATEOFBIRTH: VDXFKeyInterface = { - "vdxfid": "iQfYTwmTxXzxxyFh6XbY2PQVLVwswRoJL1", - "indexid": "xVVevkCYorDdb98ixDFgzmw2N9xtnBn6M2", - "hash160result": "73e0e5f4af76255bc2a3583ad9a7b1d0241470e8", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.dateofbirth" - } -} - -export const IDENTITY_RESIDENTCARD_ADDRESS_STREET1: VDXFKeyInterface = { - "vdxfid": "iJ67qMPN6tyrLXBhbJpKKBZYpkcBzZD8S4", - "indexid": "xNvEJ9pSxDCWxh4jSzUUHa65rQdCviMqur", - "hash160result": "8540d9cb71ca32f4c03caf26a4cffa4d51094da0", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.address.street1" - } -} - -export const IDENTITY_RESIDENTCARD_ADDRESS_CITY: VDXFKeyInterface = { - "vdxfid": "iLCQ2n5tKHzKcVBv8of1eYmdWEdEY5vTUN", - "indexid": "xR2WVaWyAcCzEf4wzVKAcwJAXteFUoFSux", - "hash160result": "7990100969a22f4b4ba35613b3994219e74d6db7", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.address.city" - } -} - -export const IDENTITY_RESIDENTCARD_ADDRESS_REGION: VDXFKeyInterface = { - "vdxfid": "iPWcAQ6zbC9rKaaWAgrpoHmKs5G5SQCprF", - "indexid": "xULidCY5SWNWwkTY2NWymgHrtjH6QfP6JL", - "hash160result": "ff3f1523bfb1fe501ef10f0036c9f059b64bc7db", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.address.region" - } -} - -export const IDENTITY_RESIDENTCARD_ADDRESS_POSTCODE: VDXFKeyInterface = { - "vdxfid": "iG1QGYyp4SkiP7b9ngPwkTGC3DxVG3hB16", - "indexid": "xLqWjMQtukyP1HUBeN46iqnj4syW4eat4U", - "hash160result": "f345aa72196b006e2200bd08ed0ea165806c7889", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.address.postcode" - } -} - -export const IDENTITY_RESIDENTCARD_ADDRESS_COUNTRY: VDXFKeyInterface = { - "vdxfid": "i4wzngZfZb2QBnjr2TjtoMoMF9roSqQkho", - "indexid": "x9n7FUzkQuF4oxcst9Q3mkKtGospNqDjEQ", - "hash160result": "dd2a94da0a94115ed04de616b7d0ea1b19312a10", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residentcard.address.country" - } -} - -export const IDENTITY_IDCARD: VDXFKeyInterface = { - "vdxfid": "iK7FrcxNvsej84qZjYR73iGgEV96sGKwTU", - "indexid": "xPwNKRPTnBsPkEibbE5G26oDG9A7j4JSm7", - "hash160result": "4f2b2c852e4cfa5a640988af78c4d02243467cab", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard" - } -} - -export const IDENTITY_IDCARD_ORIGINALFRONT: VDXFKeyInterface = { - "vdxfid": "iCnLNq42DxhuK84Nes4UGjFFUuNsGGpuBZ", - "indexid": "xHcSqdV75GvZwHwQWYidF7mnWZPtATN7Ky", - "hash160result": "9f5f63641e6e935628d7602e92814311ea631766", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.originalfront" - } -} - -export const IDENTITY_IDCARD_ORIGINALBACK: VDXFKeyInterface = { - "vdxfid": "iJyfvwrUeTRiGxiYw6oJZ3uALsuBt7QTyy", - "indexid": "xPonPkHZVmeNu8bannTTXSRhNXvCpAD3MB", - "hash160result": "df3a44e11ad54673eff910c1320d9f50100b0daa", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.originalback" - } -} - -export const IDENTITY_IDCARD_CROPPEDFRONT: VDXFKeyInterface = { - "vdxfid": "iFDp8jWwybweGStGQnYxwhbi8eiucZ29sr", - "indexid": "xL3vbXx2pvAJtcmJGUD7v68FAJjvZmrsga", - "hash160result": "b10845ae9b29f3ed25f33f091398fd0a1536d980", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.croppedfront" - } -} - -export const IDENTITY_IDCARD_CROPPEDBACK: VDXFKeyInterface = { - "vdxfid": "i8GpXrygUPpQYVwcoZ7JVRB1xB46xZsMuG", - "indexid": "xD6vzfQmKi35AfpefEmTTohYyq57sdLVxr", - "hash160result": "84c05d2d84ab69db2834df22602f34445ae9a134", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.croppedback" - } -} - -export const IDENTITY_IDCARD_FACE: VDXFKeyInterface = { - "vdxfid": "i8sfiwALhk4FtSaWSnBWYwKnWN3G7m3jyU", - "indexid": "xDhnBjbRZ4GvWcTYJTqfXKrKY24GxBC5cg", - "hash160result": "4afc5fda25a15a4627b8426f40594ff2e11d393b", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.face" - } -} - -export const IDENTITY_IDCARD_IDNUMBER: VDXFKeyInterface = { - "vdxfid": "iBEJB1xD1mpR4kYQbYieW3hNFpe5QmQ6qA", - "indexid": "xG4QdpPHs635gvRSTENoUSDuHUf6JB2izs", - "hash160result": "0af18c033e6ad395bdfb5fbdbf5144d63c1d1055", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.idnumber" - } -} - -export const IDENTITY_IDCARD_CATEGORY: VDXFKeyInterface = { - "vdxfid": "i4HCpvV1NJd4Ka8atCtDkXs4XLAkrmtKib", - "indexid": "x97KHiv6Dcqiwk1cjtYNivPbYzBmg48ama", - "hash160result": "68b49fa5bf2ed00672c881c15167fee2c304d408", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.category" - } -} - -export const IDENTITY_IDCARD_EXPIRATIONDATE: VDXFKeyInterface = { - "vdxfid": "iNTbsfTmeAm7KUFehtCq3RH1JgbUdTJwCt", - "indexid": "xTHiLTtrVUymwe8gZZrz1ooYLLcVZC5A4n", - "hash160result": "f4b807e32848d5a40815e2aa19cb219c64ae3dd0", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.expirationdate" - } -} - -export const IDENTITY_IDCARD_ISSUINGCOUNTRY: VDXFKeyInterface = { - "vdxfid": "iJ5qVRWTHerkVreE9UrSfKyphD3XB9s8FA", - "indexid": "xNuwxDwY8y5R82XG1AWbdiWMis4Y3BXDg7", - "hash160result": "2cc5492966de5135e638de253b497cccb8643fa0", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.issuingcountry" - } -} - -export const IDENTITY_IDCARD_ISSUINGREGION: VDXFKeyInterface = { - "vdxfid": "i8dHTbZ62Bth8NwkxasnKFpvX4EZYuBun4", - "indexid": "xDTPvPzAsW7MkYpnpGXwHeMTYiFaMyp6FD", - "hash160result": "f42f7b71bb43c590b9063755754bf2d534b58038", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.issuingregion" - } -} - -export const IDENTITY_IDCARD_DATEOFBIRTH: VDXFKeyInterface = { - "vdxfid": "iGcwhC6znG63pb6jqsRnrtDjXV4aXXsub2", - "indexid": "xMT49zY5daJiSkymhZ5wqGkGZ95bMGYJ9r", - "hash160result": "4d0c72c3369a0ac64711e58ae1b10785f1363190", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.dateofbirth" - } -} - -export const IDENTITY_IDCARD_ADDRESS_STREET1: VDXFKeyInterface = { - "vdxfid": "i6jMXjNE9qioZ2dFricFnEBEQEWK5Kg3PS", - "indexid": "xBZTzXoK19wUBCWHiQGQkchmRtXKugcKWw", - "hash160result": "2cee0d13a2fdeaac83d052ad27610da8bf59b623", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.address.street1" - } -} - -export const IDENTITY_IDCARD_ADDRESS_CITY: VDXFKeyInterface = { - "vdxfid": "i3viAeqayk3KDk5tQpYcz6gFs1ayW5vBma", - "indexid": "x8kpdTGfq4FyquxvGWCmxVCntfbzM8iAVb", - "hash160result": "a10bfcd1cfd12d466a276339072d2f2a7ec6f304", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.address.city" - } -} - -export const IDENTITY_IDCARD_ADDRESS_REGION: VDXFKeyInterface = { - "vdxfid": "iEHvf3XCFacMihTQPVXxNeo6hBCqggDFie", - "indexid": "xK837qxH6tq2LsLSFBC7M3KdiqDrYBNMK7", - "hash160result": "55af249b3ceb591709c693017e5b7b1cb131a876", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.address.region" - } -} - -export const IDENTITY_IDCARD_ADDRESS_POSTCODE: VDXFKeyInterface = { - "vdxfid": "i3yAnt6zdceYxbCBnLwxn2tNdM4BnPkzhT", - "indexid": "x8oHFgY5UvsDam5De2c7kRQuf15ChzdWFA", - "hash160result": "acd086baf0863cff86fc56ec0fbb16dd18d56a05", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.address.postcode" - } -} - -export const IDENTITY_IDCARD_ADDRESS_COUNTRY: VDXFKeyInterface = { - "vdxfid": "iA6KVD2C4QJAyKfCS3XfQV8AxmpR9R3XG5", - "indexid": "xEvRx1TGuiWqbVYEHjBpNsehzRqS2fp4qg", - "hash160result": "bab14b514d91d7daa39175c90e29a956dec19548", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.idcard.address.country" - } -} - -export const IDENTITY_VISA: VDXFKeyInterface = { - "vdxfid": "iDCwZf84AhbJkm4zKZP7Le8h8ukJS9FySA", - "indexid": "xJ342TZ921oyNvx2BF3GK2fEAZmKGeUQUd", - "hash160result": "57faa6b546ac92c71022178b8c5e9fbae9bebe6a", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa" - } -} - -export const IDENTITY_VISA_ORIGINALFRONT: VDXFKeyInterface = { - "vdxfid": "iGAgzyLDVs5vYFLRgXVnkQpDRKy9Zh1TiV", - "indexid": "xLzoTmmJMBJbARDTYD9wioLkSyzARsVQWr", - "hash160result": "755da3361216260b786ba78fbe68800557223a8b", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.originalfront" - } -} - -export const IDENTITY_VISA_ORIGINALBACK: VDXFKeyInterface = { - "vdxfid": "i3becgcmf85RiY2PAxsp3fbuGKG8Qc73t1", - "indexid": "x8Rm5V3rWSJ6LhuR2eXy248SHyH9Jjue4S", - "hash160result": "e71909c77e2e0361764d22b81f4f53085fe85801", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.originalback" - } -} - -export const IDENTITY_VISA_CROPPEDFRONT: VDXFKeyInterface = { - "vdxfid": "iAapfFQMAQy7USdjRwqzAZ2nWhRMSiQMmV", - "indexid": "xFQw83qS1jBn6cWmHdW98wZKYMSNHsb2wy", - "hash160result": "56ed30f8daf83e3b09eee57517be45b6b8c1f94d", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.croppedfront" - } -} - -export const IDENTITY_VISA_CROPPEDBACK: VDXFKeyInterface = { - "vdxfid": "i3quMdmv3vAQDBA6nzM8fTiFtqJrw7tcnf", - "indexid": "x8g1pSCzuEP4qM38eg1HdrEnvVKsoXBZ7R", - "hash160result": "1d8106821498549cebc0af6f8d120b9933090b04", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.croppedback" - } -} - -export const IDENTITY_VISA_FACE: VDXFKeyInterface = { - "vdxfid": "iAqxnB58655ZcRLAUm2Utib2rguRXT9wZM", - "indexid": "xFg5EyWCwPJEEbDCLSgds77ZtLvSRpw2k9", - "hash160result": "59564e826c8342a2b721708f6a83c9761dc6d650", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.face" - } -} - -export const IDENTITY_VISA_IDNUMBER: VDXFKeyInterface = { - "vdxfid": "iQ5LfUtuggDyqbePUB9iWLgxYj7tvDm2VE", - "indexid": "xUuT8HKzXzSeTmXRKrosUjDVaP8upm7rqg", - "hash160result": "77ae761bf6bf7922ff8e47b53bd88107be15f8e1", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.idnumber" - } -} - -export const IDENTITY_VISA_CATEGORY: VDXFKeyInterface = { - "vdxfid": "iH4nhrNsZKK6bEkgLDu17fBPR5dnVgitiQ", - "indexid": "xMtuAeoxQdXmDQdiBuZA63hvSjeoT3wsnv", - "hash160result": "8052162609b4da20bb5932ead5b6deedbb861495", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.category" - } -} - -export const IDENTITY_VISA_EXPIRATIONDATE: VDXFKeyInterface = { - "vdxfid": "iNW2k7p7hVK2GCc7m1k4mihqh8jd94Dmnh", - "indexid": "xTL9CvFCYoXgtNV9chQDk7ENinkdzPUodD", - "hash160result": "5eaa0aef6ed6d27ee4909bc6ce8619c60346b3d0", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.expirationdate" - } -} - -export const IDENTITY_VISA_ISSUINGCOUNTRY: VDXFKeyInterface = { - "vdxfid": "i5vDfPKMfCRPXVRhfumjWPEvBFhNMVjtGK", - "indexid": "xAkL8BkSWWe49fJjXbRtUmmTCuiPJGBZ2c", - "hash160result": "ebf49255193b4ffbb3a0487106a4df98833bcc1a", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.issuingcountry" - } -} - -export const IDENTITY_VISA_ISSUINGREGION: VDXFKeyInterface = { - "vdxfid": "iPRc9Ns6LadQNYU7DqSNyx7LW8W9dPKDjC", - "indexid": "xUFicBJBBtr4ziM95X6XxLdsXnXAYQ1XFN", - "hash160result": "a1217c6e44b1f47faf9d59378206009d8433d5da", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.issuingregion" - } -} - -export const IDENTITY_VISA_DATEOFBIRTH: VDXFKeyInterface = { - "vdxfid": "i55bTsxLkCTmE6VvppvG8doYnmxuHhec65", - "indexid": "x9uhvgPRbWgRrGNxgWaR72L5pRyvA4vVWm", - "hash160result": "ed824bbfd195e63d6d5151a07eda49eba60c9a11", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.dateofbirth" - } -} - -export const IDENTITY_VISA_ADDRESS_STREET1: VDXFKeyInterface = { - "vdxfid": "iMzWxFVzJHbQm5YWv9c1eujvrUrPHAGVAc", - "indexid": "xSpdR3w59bp5PFRYmqGAdJGTt8sQ8o4mpu", - "hash160result": "05992eb838a4f562b6b7e0ff84bb05cdac571ecb", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.address.street1" - } -} - -export const IDENTITY_VISA_ADDRESS_CITY: VDXFKeyInterface = { - "vdxfid": "i8YXgZ7doRhidT5phX6qyRnttV6hZiyWTm", - "indexid": "xDNe9MYiejvPFcxrZCkzwpKRv97iS3TQjA", - "hash160result": "04959daab853c797bbbcb9c5ead7376e4a809a37", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.address.city" - } -} - -export const IDENTITY_VISA_ADDRESS_REGION: VDXFKeyInterface = { - "vdxfid": "i6YkTDEi1M1mzuTyzww8hNoksJFpev17Fu", - "indexid": "xBNrv1fnrfESd5M1rdbHfmLHtxGqUoeALR", - "hash160result": "3a47a53e8717444b5d31e8618049daa8cde8b421", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.address.region" - } -} - -export const IDENTITY_VISA_ADDRESS_POSTCODE: VDXFKeyInterface = { - "vdxfid": "iBJDLHSLB4cHvaeXazFp25Be3V9yRWmcoK", - "indexid": "xG8Ko5sR2NpxYkXZSfuxzTiB59AzMUATiw", - "hash160result": "dd0d87e3163157402aa16d2017a3ea06d6bccd55", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.address.postcode" - } -} - -export const IDENTITY_VISA_ADDRESS_COUNTRY: VDXFKeyInterface = { - "vdxfid": "iQ9Z1PZMMp49rtDuGQSjfEZn3xACfxLAYa", - "indexid": "xUyfUBzSD8GpV46w866tdd6K5cBDbMPuNo", - "hash160result": "c45655a6924c0b377e9182869dc780df690dc4e2", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.visa.address.country" - } -} - -export const IDENTITY_PERSONALDETAILS: VDXFKeyInterface = { - "vdxfid": "i8SSgM1z7XVoCtoP9CCsMms3zCndaNjtCe", - "indexid": "xDGZ99T4xqiTq4gQzss2LAPb1roeUyLwkU", - "hash160result": "a8fbe89451c1d0a77b336ccf6b0fb7601dd47336", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.personaldetails" - } -} - -export const IDENTITY_CONTACTDETAILS: VDXFKeyInterface = { - "vdxfid": "iRLT8V9NN178CvZQusJSHuyuFC2fD2QmE3", - "indexid": "xWAZbHaTDKKnq6SSmYxbGJWSGr3g1GRDYH", - "hash160result": "b9185ad980909708754a484bf11edc9febd8cbef", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.contactdetails" - } -} - -export const IDENTITY_LOCATION: VDXFKeyInterface = { - "vdxfid": "iGmiLZ7J6GjxjZ4rkSMsDzyyvWtmMBjnbo", - "indexid": "xMbpoMYNwaxdMiwtc822CPWWxAunLDE1BS", - "hash160result": "15ea60d9ddde976095b0c79ceecef7b034cfd991", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.location" - } -} - -export const IDENTITY_BANKINGDETAILS: VDXFKeyInterface = { - "vdxfid": "i8DUrZJJRjNQMJNeJ3Ti6pbpKPJ55LECyJ", - "indexid": "xD3bKMjPH3b4yUFg9j7s5D8MM3K612HEir", - "hash160result": "a7e5de6ac208f110d0509cffeb916b8dd03c0034", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails" - } -} - -export const IDENTITY_DOCUMENTS: VDXFKeyInterface = { - "vdxfid": "iCm3ERZoUw2ze1P11QyRUtvhKYovCWFXbT", - "indexid": "xHb9hDztLFFfGBG2s6daTHTEMCpw3tcbVJ", - "hash160result": "ee9f8d5ba7366983cf9b9d3e5e8ac50898a9d865", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.documents" - } -} - -export const IDENTITY_BANKACCOUNT: VDXFKeyInterface = { - "vdxfid": "iN4AgB4KEN1C3TfZnYDFUhxn37PdcrZvxT", - "indexid": "xStH8yVQ5gDrfdYbeDsQT6VK4mQeYDjcFm", - "hash160result": "122bf0739d7d1def003656a63c443efb6c14cfcb", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankaccount" - } -} - -export const IDENTITY_BANKINGDETAILS_CURRENCY: VDXFKeyInterface = { - "vdxfid": "i5k8pb9FHf5VZJKki6him1WMBkpyhe56BY", - "indexid": "xAaFHPaL8yJABUCnZnMsjQ2tDQqzfUkZRm", - "hash160result": "cc655f9f104ad6c25cc65407121fa7ac1208e418", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.currency" - } -} - -export const IDENTITY_BANKINGDETAILS_COUNTRY: VDXFKeyInterface = { - "vdxfid": "iHYqZF4Asa4erZR9kJ5G5nWRNGWdiS8vBh", - "indexid": "xNNx23VFitHKUjJBbyjR4B2xPvXebL5g4h", - "hash160result": "cf7870c11608bf6e58890fbfc18ffe0db98d629a", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.country" - } -} - -export const IDENTITY_BANKINGDETAILS_STREET1: VDXFKeyInterface = { - "vdxfid": "iRhANjQk2G3aFXiaGtG68kZjdYr2iVXQJJ", - "indexid": "xWXGqXqpsaGEshbc8ZvF796GfCs3bDhrgC", - "hash160result": "bd420c73e6bba2e48542cddf188c23b8c098b6f3", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.street1" - } -} - -export const IDENTITY_BANKINGDETAILS_STREET2: VDXFKeyInterface = { - "vdxfid": "iFWtcLUKAECLrREJr6mxtHM9xPUocxmTSY", - "indexid": "xLM158uQ1YR1Ub7LhnS7rfsgz3VpTpBcCu", - "hash160result": "7f1a53da2e265bab3230d9eec1ed0f36d7041484", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.street2" - } -} - -export const IDENTITY_BANKINGDETAILS_CITY: VDXFKeyInterface = { - "vdxfid": "iQxBEB8sXNez25HJCzvnTWtWqXUkEVAuo8", - "indexid": "xVnHgyZxNgseeFAL4gawRuR3sBVm7nyQqt", - "hash160result": "5878bb5b9371344acb1b679316e0e087046c95eb", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.city" - } -} - -export const IDENTITY_BANKINGDETAILS_REGION: VDXFKeyInterface = { - "vdxfid": "i4HJ5yrzBFEwjiYgzptMcrBsCeBjPYQJFX", - "indexid": "x97QYnJ52ZTcMtRirWYWbEiQEJCkKnxArM", - "hash160result": "7bf3a5ee05846c54bd19032e6ee9069cbc68d808", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.region" - } -} - -export const IDENTITY_BANKINGDETAILS_POSTALCODE: VDXFKeyInterface = { - "vdxfid": "iFVaE922Bzrro6rb87d9En2t2AAGx7EivG", - "indexid": "xLKggwT73K5XRGjcyoHJDAZR3pBHqz4Utt", - "hash160result": "ebd93a0f4fb8db6fb0cb8d397c45b41a0142d483", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.postalcode" - } -} - -export const IDENTITY_BANKINGDETAILS_TAXNUMBER: VDXFKeyInterface = { - "vdxfid": "i6Gbi3EkYrbREumkLmHUedbzrisXkRzwKY", - "indexid": "xB6iAqfqQAp5s5enCSwdd28XtNtYcHgrDb", - "hash160result": "bcc691f5d53f99e196b291ea2a00a9805ff4a61e", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.taxnumber" - } -} - -export const IDENTITY_BANKINGDETAILS_TAXCOUNTRY: VDXFKeyInterface = { - "vdxfid": "iMJzAfPjqvWJdYyoWTX79cSjd51HbVc7wC", - "indexid": "xS96dTpphEiyFirqN9BG7zyGej2JTACDB1", - "hash160result": "e19f920e684c7d906dd8c85d72a5d5f0cd6ba4c3", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.taxcountry" - } -} - -export const IDENTITY_BANKINGDETAILS_FIRSTNAME: VDXFKeyInterface = { - "vdxfid": "iGAomW7jtsy7zRaoMFU48KvrHahHwdjzi7", - "indexid": "xLzvEJYpkCBncbTqCw8D6iTPKEiJpW3beK", - "hash160result": "d33bd09ba3184bf0e3fa00ad62e92a7a99c83f8b", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.firstname" - } -} - -export const IDENTITY_BANKINGDETAILS_LASTNAME: VDXFKeyInterface = { - "vdxfid": "iMrvbLJnZawGsdFshtrHM3QKa4pDPbRk3L", - "indexid": "xSh348jsQu9wVo8uZaWSKRvrbiqED1eny3", - "hash160result": "4a0d68f2cafc3cbe827a91fd5038c65878bfaec9", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.lastname" - } -} - -export const IDENTITY_BANKINGDETAILS_PHONENUMBER: VDXFKeyInterface = { - "vdxfid": "i9jKPi8ubg5fx3BBmZdiyobJxNgzcmV9et", - "indexid": "xEZRrWZzSzJLaD4DdFHsxC7qz2i1YejHqk", - "hash160result": "b092c8f73031298d26b919f4b398fa9b66f19c44", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.phonenumber" - } -} - -export const IDENTITY_BANKINGDETAILS_NUMBER: VDXFKeyInterface = { - "vdxfid": "iKGaF7fZ6yAvwJyxcmpuas2Hn9PZPF99yf", - "indexid": "xQ6ghv6dxHPbZUrzUTV4ZFYpooQaFZG1aa", - "hash160result": "fcceea7c24223218bc9313e8176daea6155e3fad", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.number" - } -} - -export const IDENTITY_BANKINGDETAILS_TYPE: VDXFKeyInterface = { - "vdxfid": "iNkzXo7BBcUvCBH8somKyFtAFsR3mmmYuG", - "indexid": "xTb6zbYG2vhapMAAjVRUweQhHXS4csH9eB", - "hash160result": "26dcd354b4b2bd8b939af29fc5ea57a082aa87d3", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.type" - } -} - -export const IDENTITY_BANKINGDETAILS_SORTCODE: VDXFKeyInterface = { - "vdxfid": "i8v2y1beTivG8Nyi6Td3VFTc2ExFQJT8pC", - "indexid": "xDk9Rp2jK38vkYrjx9HCTdz93tyGLCaa3E", - "hash160result": "27df54160c8a8a962dd455004c8afac060aeab3b", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.bankingdetails.sortcode" - } -} - -export const IDENTITY_DOCUMENTS_PASSPORT: VDXFKeyInterface = { - "vdxfid": "iJHkDyp8dPnNdrh7P9fzow4gTshpbznkSK", - "indexid": "xP7rgnFDUi13G2a9EqL9nKbDVXiqVHVtyg", - "hash160result": "456f1956c77f7ff59d98dd57030d7ed22afd7fa2", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.documents.passport" - } -} - -export const IDENTITY_RESIDENCECARD: VDXFKeyInterface = { - "vdxfid": "iQerHJHjqVT32hU1ZUyVYKQEkavs4xFtHo", - "indexid": "xVUxk6ipgofhesM3RAdeWhvmnEwsywApa2", - "hash160result": "0b2227f2bb574fe3cbcc683eecfc4d3bff884ee8", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.residencecard" - } -} - -export const IDENTITY_ATTESTOR: VDXFKeyInterface = { - "vdxfid": "iFNc5DG22Btm69wBDDXatvSPLxzJq53QBa", - "indexid": "xLCiY1h6sW7RiKpD4uBjsJxvNd1Kiej8tW", - "hash160result": "e5d18dab811f87643c1e7a63627172331be38282", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.attestor" - } -} - -export const IDENTITY_ATTESTATION_RECIPIENT: VDXFKeyInterface = { - "vdxfid": "iAkd3VBhYQ3MK6PUCtfhXrLVNbqSghxxpn", - "indexid": "xFajWHcnPiG1wGGW4aKrWEs2QFrTbwP7wd", - "hash160result": "71b7cbbfc8be868f6d9f6c481c420b002438d44f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.attestation.recipient" - } -} - diff --git a/src/vdxf/vdxfDataKeys.ts b/src/vdxf/vdxfDataKeys.ts deleted file mode 100644 index f73ca5a..0000000 --- a/src/vdxf/vdxfDataKeys.ts +++ /dev/null @@ -1,438 +0,0 @@ -import { VDXFKeyInterface } from "./keys" - -export const DataByteKeyName = "vrsc::data.type.byte"; -export const DataByteKey: VDXFKeyInterface = { - "vdxfid": "iBXUHbh4iacbeZnzDRxishvBSrYk2S2k7t", - "indexid": "xGMakQ89ZtqGGjg257csr6SiUWZksGmjWp", - "hash160result": "2e97a8bba443773812341e1d761530d3bba04f58", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.byte" - } -} -export const DataInt16KeyName = "vrsc::data.type.int16"; -export const DataInt16Key: VDXFKeyInterface = { - "vdxfid": "iDtTv3wf1Vk3M2Y46RjLPKtttx5hydwtY1", - "indexid": "xJiaNrNjroxhyCR5x7PVMiRRvc6ipg6N9g", - "hash160result": "ee334ebd432db0b24cc2702eda61c28ff44d3872", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int16" - } -} -export const DataUint16KeyName = "vrsc::data.type.uint16"; -export const DataUint16Key: VDXFKeyInterface = { - - "vdxfid": "iHn7urT2yVfS7pQn6WGAmCVWh4HBLV24n3", - "indexid": "xNcENet7pot6jzHoxBvKjb23iiJCGpekDk", - "hash160result": "5cfc322d2a216145f7b82714115e7953269de59c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint16" - } -} - -export const DataInt32KeyName = "vrsc::data.type.int32"; -export const DataInt32Key: VDXFKeyInterface = { - - "vdxfid": "iHpLPprRDv3H5H3ZMaJ9nyHFzkG9xJWZDb", - "indexid": "xNeSrdHW5EFwhSvbDFxJmMoo2QHAtoEaEM", - "hash160result": "3e9ba478b23b13232f28d21051d907ce8fdd509d", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int32" - } -} - -export const DataUint32KeyName = "vrsc::data.type.uint32"; - -export const DataUint32Key: VDXFKeyInterface = { - - "vdxfid": "iKSj5zhd6cSsLudaGhtfmisRNgEM7SPFWY", - "indexid": "xQGqYo8hwvfXy5Wc8PYpk7PxQLFMwfP7Fp", - "hash160result": "f279818aeb4fe768956b350d1fc7216ca0e82aaf", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint32" - } -} - -export const DataInt64KeyName = "vrsc::data.type.int64"; - -export const DataInt64Key: VDXFKeyInterface = { - - "vdxfid": "iKB3TGi9Dg5HZ4nQAgLQAgp3tuXBaRKHpC", - "indexid": "xQ19v59E4zHxBEfS2MzZ95LavZYCTTeuyg", - "hash160result": "ab3705f8a7fae59786ef897b014df85fcd9533ac", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int64" - } -} - -export const DataUint64KeyName = "vrsc::data.type.uint64"; - -export const DataUint64Key: VDXFKeyInterface = { - - "vdxfid": "iPamkQf38AeGQ8z4zSsZL7t9kXMeUkYLJL", - "indexid": "xUQtDD67yUrw2Js6r8XiJWQgnBNfNeeoUq", - "hash160result": "bb2ae9ed3e9f400def0724937fbf65f23ef690dc", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint64" - } -} - -export const DataUint160KeyName = "vrsc::data.type.uint160"; - -export const DataUint160Key: VDXFKeyInterface = { - - "vdxfid": "iAAwdbLyKYL39nJ1eQHaHtb75krg4mV1Lq", - "indexid": "xF146Pn4ArYhmxB3W5wjGH7e7Qsgx9bkpj", - "hash160result": "d97d2295d4c73f6f6f0697c8086bd822d6977549", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint160" - } -} - -export const DataUint256KeyName = "vrsc::data.type.uint256"; - -export const DataUint256Key: VDXFKeyInterface = { - - "vdxfid": "i8k7g7z6grtGYrNZmZr5TQ872aHssXuuua", - "indexid": "xDaE8vRBYB6wB2FbdFWERnee4EJtjbCtMM", - "hash160result": "939b27bea698d180237c40b2194025acc673cb39", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.uint256" - } -} - -export const DataStringKeyName = "vrsc::data.type.string"; - -export const DataStringKey: VDXFKeyInterface = { - - "vdxfid": "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c", - "indexid": "xPwgY6oPdusaAgNK3u5yHCQG5NsHEcBpi5", - "hash160result": "e5c061641228a399169211e666de18448b7b8bab", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.string" - } -} - -// this is a key for a typed vector, which will have the object type key following the vector key -export const DataVectorKeyName = "vrsc::data.type.vector"; -export const DataVectorKey: VDXFKeyInterface = { - - "vdxfid": "iAEShwk1xjdGhaUSz3Maa2XR32o3vRuHq7", - "indexid": "xF4ZAkB6p3qwKkMUqj1jYR3x4gp4mGz657", - "hash160result": "503875b0dc301189a98927d3ece56c5f921c1f4a", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.vector" - } -} - -export const DataByteVectorKeyName = "vrsc::data.type.bytevector"; - -export const DataByteVectorKey: VDXFKeyInterface = { - - "vdxfid": "iKMhRLX1JHQihVZx2t2pAWW2uzmK6AzwW3", - "indexid": "xQBot8x69bdPKfSytZgy8u2ZwenKzVjR4X", - "hash160result": "cc3ae6466006629f5105f71325bb2a19107037ae", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.bytevector" - } -} - -export const DataInt32VectorKeyName = "vrsc::data.type.int32vector"; - -export const DataInt32VectorKey: VDXFKeyInterface = { - - "vdxfid": "iJZt2fcUv1iivbfC3tuPuefabcTppQEoVq", - "indexid": "xPPzVU3ZmKwPYmYDuaZYt3C7dGUqk939N7", - "hash160result": "c0847f3025c408059b5a8f6a9e414a8ed8288da5", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int32vector" - } -} - -export const DataInt64VectorKeyName = "vrsc::data.type.int64vector"; - -export const DataInt64VectorKey: VDXFKeyInterface = { - - "vdxfid": "i4qtYkFS9iNyu2AkqwoSn1xyCdfH9PUvak", - "indexid": "x9g11YgX12beXC3nhdTbkQVWEHgJ2jqfz1", - "hash160result": "c6219ea13884987453692cb14c72d5f6a47c020f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.int64vector" - } -} - -export const DataCurrencyMapKeyName = "vrsc::data.type.object.currencymap"; - -export const DataCurrencyMapKey: VDXFKeyInterface = { - - "vdxfid": "iMrGhzkZq5fpWWSa1RambRySFPb7CuvKuX", - "indexid": "xSgPAoBegPtV8gKbs7EvZpVyH3c858ZUvL", - "hash160result": "25db70c2fcae2571f89201181bec04587e1f8fc9", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.currencymap" - } -} - -export const DataRatingsKeyName = "vrsc::data.type.object.ratings"; - -export const DataRatingsKey: VDXFKeyInterface = { - - "vdxfid": "iHJComZUXXGniLkDhjYprWYEN8qvQGDoam", - "indexid": "xN8KGZzZNqVTLWdFZRCypu4mPnrwHFKbCK", - "hash160result": "32cad57ff1dc5db4b5ba573ce01bc9c89b0d9e97", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.ratings" - } -} - -export const DataURLKeyName = "vrsc::data.type.object.url"; - -export const DataURLKey: VDXFKeyInterface = { - - "vdxfid": "iJ7xdhJTJAvJubNnSJFXyA3jujzqGxjLuZ", - "indexid": "xNx56VjY9V8yXmFpHyugwYaGwQ1rCt6J9W", - "hash160result": "7748bfaf53dd2ff63ed5f73a41174c360f30a6a0", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.url" - } -} - -export const DataTransferDestinationKeyName = "vrsc::data.type.object.transferdestination"; - -export const DataTransferDestinationKey: VDXFKeyInterface = { - - "vdxfid": "i91L6zwZQrkbNVMB1AZ1Z671qybexRmeVK", - "indexid": "xDqSZoNeGAyFzfECrrDAXUdYsdcfs3Zuku", - "hash160result": "92f38773849383146037b16a48ea350c1c11ac3c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.transferdestination" - } -} - -export const UTXORefKeyName = "vrsc::data.type.object.utxoref"; - -export const UTXORefKey: VDXFKeyInterface = { - - "vdxfid": "iNcKvh7mazaXptzHf85q6EtpFYFE7asKC1", - "indexid": "xTSSPVYrSJoCT4sKWojz4dRMHCGF3h9tM4", - "hash160result": "013e760f7451c289672993ea391ae643c21ce4d1", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.utxoref" - } -} - -export const CrossChainDataRefKeyName = "vrsc::data.type.object.crosschaindataref"; - -export const CrossChainDataRefKey: VDXFKeyInterface = { - - "vdxfid": "iP3euVSzNcXUrLNHnQnR9G6q8jeYuGSxgw", - "indexid": "xTsmNHt5Dvk9UWFKe6Sa7edNAPfZmJVgLc", - "hash160result": "4d33e0aee0f648c7871b2661d1221b57c05aaed6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.crosschaindataref" - } -} - -export const EncryptionDescriptorKeyName = "vrsc::data.type.encryptiondescriptor"; - -export const EncryptionDescriptorKey: VDXFKeyInterface = { - - "vdxfid": "iHEEK8ipj58BeKZNWuaaR2tDR5RK2kmf9A", - "indexid": "xN4Lmw9uaPLrGVSQNbEjPRQkSjSKxsHUQu", - "hash160result": "8d021acc1b68335bd7d37b28ff773c138ea5dd96", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.encryptiondescriptor" - } -} - -export const SaltedDataKeyName = "vrsc::data.type.salteddata"; - -export const SaltedDataKey: VDXFKeyInterface = { - - "vdxfid": "i92U1nLuLJkC44FZZ4Lq9zk4qW3HrWAWNo", - "indexid": "xDraUamzBcxrgE8bQjzz8PGbsA4JiFskTD", - "hash160result": "9e13510e01d0d03a7bc90d7a2ef32824f515e33c", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.salteddata" - } -} - -export const DataDescriptorKeyName = "vrsc::data.type.object.datadescriptor"; - -export const DataDescriptorKey: VDXFKeyInterface = { - - "vdxfid": "i4GC1YGEVD21afWudGoFJVdnfjJ5XWnCQv", - "indexid": "x96JULhKLXEgCqPwUxTQGtAKhPK6Qh1iaW", - "hash160result": "4d4f12424ded2033a526a4e2a8835fc5b2eba208", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.object.datadescriptor" - } -} - -export const SignatureDataKeyName = "vrsc::data.signaturedata"; - -export const SignatureDataKey: VDXFKeyInterface = { - - "vdxfid": "i7PcVF9wwPtQ6p6jDtCVpohX65pTZuP2ah", - "indexid": "xCDix3b2ni74iyym5ZreoCE47jqUTBFRAb", - "hash160result": "b48b359e9a00042cec64f7f66ac717d388a4f22a", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.signaturedata" - } -} - -export const VectorUint256KeyName = "vrsc::data.mmrhashes"; - -export const VectorUint256Key: VDXFKeyInterface = { - - "vdxfid": "i9UgJ2WxGw95PKdoCXjpfnBShtP5gi9fxS", - "indexid": "xEJnkpx38FMk1VWq4DPyeAhyjYQ6X5Gsti", - "hash160result": "8c1afd59e904f6d2702699963abccbc6d326d841", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.mmrhashes" - } -} - -export const MMRLinksKeyName = "vrsc::data.mmrlinks"; - -export const MMRLinksKey: VDXFKeyInterface = { - - "vdxfid": "iPQsnA1R8UjHNddZKZ3FxsuKQ5WzKqSC7w", - "indexid": "xUEzExSVynwwzoWbBEhQwGRrRjY1Bc2MYc", - "hash160result": "f535a4e9ac0f94eda01695d16489a4a102d6b1da", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.mmrlinks" - } -} - -export const MMRDescriptorKeyName = "vrsc::data.mmrdescriptor"; - -export const MMRDescriptorKey: VDXFKeyInterface = { - - "vdxfid": "i9dVDb4LgfMYrZD1JBNP2uaso4bNAkT4Jr", - "indexid": "xETbgPVRXyaDUj639s2Y1J7QpicP4DvZMt", - "hash160result": "97273a4c02d6be002f8d69c3979616732ba68243", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.mmrdescriptor" - } -} - -export const TypeDefinitionKeyName = "vrsc::data.type.typedefinition"; - -export const TypeDefinitionKey: VDXFKeyInterface = { - - "vdxfid": "iL5MPPHWXQEY3p2Q1UsmGDvXsgPiqd1W1S", - "indexid": "xQuTrBibNiTCfyuRsAXvEcT4uLQjhxrpyL", - "hash160result": "ae8d805d9650c0512a6b6ec33e963386542f18b6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::data.type.typedefinition" - } -} - -export const MultiMapKeyName = "vrsc::identity.multimapkey"; - -export const MultiMapKey: VDXFKeyInterface = { - - "vdxfid": "i3mbggp3NBR77C5JeFQJTpAxmgMidayLLE", - "indexid": "x8bi9VF8DVdmjMxLVw4TSChVoLNjUyapgs", - "hash160result": "6920bb81b420bc95e29a10ed677379b1e39e3a03", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.multimapkey" - } -} - -export const ContentMultiMapRemoveKeyName = "vrsc::identity.multimapremove"; - -export const ContentMultiMapRemoveKey: VDXFKeyInterface = { - - "vdxfid": "i5Zkx5Z7tEfh42xtKfwbJ5LgEWE9rEgpFY", - "indexid": "xAPsQszCjYtMgCqvBMbkGTsDGAFAmrN33A", - "hash160result": "d393b986e4f82db7bec82d97b186882d739ded16", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.multimapremove" - } -} - - -// for any ID, this key indexes content that applies to representing the profile of -// that ID. there may be many mime-type instances of a particular piece of profile media -export const ProfileMediaKeyName = "vrsc::identity.profile.media"; - -export const ProfileMediaKey: VDXFKeyInterface = { - - "vdxfid": "iEYsp2njSt1M4EVYi9uuAPBU2wpKmThkkr", - "indexid": "xKNzGqDpJCE1gQNaZqa48mi14bqLaG669g", - "hash160result": "e95b2ee1abb130a93900ddaef2d8e528010f7c79", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::identity.profile.media" - } -} - -export const ZMemoMessageKeyName = "vrsc::system.zmemo.message"; - -export const ZMemoMessageKey: VDXFKeyInterface = { - - "vdxfid": "iNHg1n828PUxktkYeNxC6sdVmuKTipn3L3", - "indexid": "xT7nUaZ6yhhdP4daW4cM5GA2oZLUaNVaBD", - "hash160result": "4a8f418203621f10d1a61701be8dbbbb38fa5cce", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::system.zmemo.message" - } -} - -export const ZMemoSignatureKeyName = "vrsc::system.zmemo.signature"; - -export const ZMemoSignatureKey: VDXFKeyInterface = { - - "vdxfid": "i7mrLLjUfGYuHJwnsxFvd282hsdn4staJG", - "indexid": "xCbxo9AZWamZuUppjdv5bQeZjXeo1vbaCc", - "hash160result": "7b47c8cd90c4c3ddc542f37ca77473b7325a272f", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::system.zmemo.signature" - } -} - -export const CurrencyStartNotarizationKeyName = "vrsc::system.currency.startnotarization"; - -export const CurrencyStartNotarizationKey: VDXFKeyInterface = { - - "vdxfid": "iRvxVcGLaCXcDiAfnQ5FfeBCo2AiBibAft", - "indexid": "xWm4xQhRRWkGqt3he5jQe2hjpgBj5C7Tj3", - "hash160result": "b537201ca6465976bea7bdb03119644a858052f6", - "qualifiedname": { - "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", - "name": "vrsc::system.currency.startnotarization" - } -} From ec2919f545e23602aa861417615daca38478188e Mon Sep 17 00:00:00 2001 From: Monkins1010 Date: Mon, 11 Nov 2024 09:58:56 +0000 Subject: [PATCH 117/120] Fix Capitals complete. --- dist/vdxf/identitydatakeys.d.ts | 184 ++++ dist/vdxf/identitydatakeys.js | 1653 ++++++++++++++++++++++++++++ dist/vdxf/vdxfdatakeys.d.ts | 69 ++ dist/vdxf/vdxfdatakeys.js | 347 ++++++ src/vdxf/identitydatakeys.ts | 1832 +++++++++++++++++++++++++++++++ src/vdxf/vdxfdatakeys.ts | 438 ++++++++ 6 files changed, 4523 insertions(+) create mode 100644 dist/vdxf/identitydatakeys.d.ts create mode 100644 dist/vdxf/identitydatakeys.js create mode 100644 dist/vdxf/vdxfdatakeys.d.ts create mode 100644 dist/vdxf/vdxfdatakeys.js create mode 100644 src/vdxf/identitydatakeys.ts create mode 100644 src/vdxf/vdxfdatakeys.ts diff --git a/dist/vdxf/identitydatakeys.d.ts b/dist/vdxf/identitydatakeys.d.ts new file mode 100644 index 0000000..7c9f451 --- /dev/null +++ b/dist/vdxf/identitydatakeys.d.ts @@ -0,0 +1,184 @@ +import { VDXFKeyInterface } from "./keys"; +export declare const IDENTITY_ACCOUNT_ID: VDXFKeyInterface; +export declare const IDENTITY_ACCOUNT_USERID: VDXFKeyInterface; +export declare const IDENTITY_ACCOUNT_CREATEDAT: VDXFKeyInterface; +export declare const IDENTITY_ACCOUNT_COMPLETEDAT: VDXFKeyInterface; +export declare const IDENTITY_ACCOUNT_PREVIOUSATTEMPTID: VDXFKeyInterface; +export declare const IDENTITY_ACCOUNT_SHAREABLEURL: VDXFKeyInterface; +export declare const IDENTITY_ACCOUNT_TEMPLATEID: VDXFKeyInterface; +export declare const IDENTITY_ACCOUNT_TEMPLATEVERSION: VDXFKeyInterface; +export declare const IDENTITY_ACCOUNT_STATUS: VDXFKeyInterface; +export declare const IDENTITY_PHONENUMBER: VDXFKeyInterface; +export declare const IDENTITY_DATEOFBIRTH: VDXFKeyInterface; +export declare const IDENTITY_OVER18: VDXFKeyInterface; +export declare const IDENTITY_OVER21: VDXFKeyInterface; +export declare const IDENTITY_OVER25: VDXFKeyInterface; +export declare const IDENTITY_ACCOUNT_REQUESTING_IPADDRESS: VDXFKeyInterface; +export declare const IDENTITY_EMAIL: VDXFKeyInterface; +export declare const IDENTITY_NATIONALITY: VDXFKeyInterface; +export declare const IDENTITY_FIRSTNAME: VDXFKeyInterface; +export declare const IDENTITY_MIDDLENAME: VDXFKeyInterface; +export declare const IDENTITY_LASTNAME: VDXFKeyInterface; +export declare const IDENTITY_GENDER: VDXFKeyInterface; +export declare const IDENTITY_HEIGHT: VDXFKeyInterface; +export declare const IDENTITY_EYECOLOR: VDXFKeyInterface; +export declare const IDENTITY_ETHNICITY: VDXFKeyInterface; +export declare const IDENTITY_WEIGHT: VDXFKeyInterface; +export declare const IDENTITY_HOMEADDRESS: VDXFKeyInterface; +export declare const IDENTITY_HOMEADDRESS_STREET1: VDXFKeyInterface; +export declare const IDENTITY_HOMEADDRESS_STREET2: VDXFKeyInterface; +export declare const IDENTITY_HOMEADDRESS_CITY: VDXFKeyInterface; +export declare const IDENTITY_HOMEADDRESS_REGION: VDXFKeyInterface; +export declare const IDENTITY_HOMEADDRESS_POSTCODE: VDXFKeyInterface; +export declare const IDENTITY_HOMEADDRESS_COUNTRY: VDXFKeyInterface; +export declare const IDENTITY_IDNUMBER_VALUE: VDXFKeyInterface; +export declare const IDENTITY_IDNUMBER_TYPE: VDXFKeyInterface; +export declare const IDENTITY_VERIFICATION_STATUS: VDXFKeyInterface; +export declare const IDENTITY_VERIFICATION_APPROVALS: VDXFKeyInterface; +export declare const IDENTITY_VERIFICATION_APPROVALS_ACCEPTEDTOS: VDXFKeyInterface; +export declare const IDENTITY_VERIFICATION_APPROVALS_VERIFIEDSMS: VDXFKeyInterface; +export declare const IDENTITY_VERIFICATION_APPROVALS_KYCCHECKED: VDXFKeyInterface; +export declare const IDENTITY_VERIFICATION_APPROVALS_DOCUMENTSVERIFIED: VDXFKeyInterface; +export declare const IDENTITY_VERIFICATION_APPROVALS_SELFIECHECKED: VDXFKeyInterface; +export declare const IDENTITY_VERIFICATION_APPROVALS_WATCHLISTOK: VDXFKeyInterface; +export declare const IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK: VDXFKeyInterface; +export declare const IDENTITY_VERIFICATION_APPROVALS_STATUS: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_ORIGINALFRONT: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_ORIGINALBACK: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_CROPPEDFRONT: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_CROPPEDBACK: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_FACE: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_IDNUMBER: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_CATEGORY: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_EXPIRATIONDATE: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_ISSUINGCOUNTRY: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_ISSUINGREGION: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_DATEOFBIRTH: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_ADDRESS_STREET1: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_ADDRESS_CITY: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_ADDRESS_REGION: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_ADDRESS_POSTCODE: VDXFKeyInterface; +export declare const IDENTITY_DRIVINGLICENCE_ADDRESS_COUNTRY: VDXFKeyInterface; +export declare const IDENTITY_SELFIECHECK_IMAGE: VDXFKeyInterface; +export declare const IDENTITY_SELFIECHECK_VIDEO: VDXFKeyInterface; +export declare const IDENTITY_EMAIL_ISDELIVERABLE: VDXFKeyInterface; +export declare const IDENTITY_EMAIL_BREACHCOUNT: VDXFKeyInterface; +export declare const IDENTITY_EMAIL_FIRSTBREACHEDAT: VDXFKeyInterface; +export declare const IDENTITY_EMAIL_LASTBREACHEDAT: VDXFKeyInterface; +export declare const IDENTITY_EMAIL_DOMAIN_REGISTEREDAT: VDXFKeyInterface; +export declare const IDENTITY_EMAIL_DOMAIN_FREEPROVIDER: VDXFKeyInterface; +export declare const IDENTITY_EMAIL_DOMAIN_CUSTOM: VDXFKeyInterface; +export declare const IDENTITY_EMAIL_DOMAIN_DISPOSABLE: VDXFKeyInterface; +export declare const IDENTITY_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_ORIGINALFRONT: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_ORIGINALBACK: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_CROPPEDFRONT: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_CROPPEDBACK: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_FACE: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_IDNUMBER: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_CATEGORY: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_EXPIRATIONDATE: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_ISSUINGCOUNTRY: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_ISSUINGREGION: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_DATEOFBIRTH: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_ADDRESS_STREET1: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_ADDRESS_CITY: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_ADDRESS_REGION: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_ADDRESS_POSTCODE: VDXFKeyInterface; +export declare const IDENTITY_PASSPORT_ADDRESS_COUNTRY: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_ORIGINALFRONT: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_ORIGINALBACK: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_CROPPEDFRONT: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_CROPPEDBACK: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_FACE: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_IDNUMBER: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_CATEGORY: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_EXPIRATIONDATE: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_ISSUINGCOUNTRY: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_ISSUINGREGION: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_DATEOFBIRTH: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_ADDRESS: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_ADDRESS_STREET1: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_ADDRESS_CITY: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_ADDRESS_REGION: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_ADDRESS_POSTCODE: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCEPERMIT_ADDRESS_COUNTRY: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_ORIGINALFRONT: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_ORIGINALBACK: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_CROPPEDFRONT: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_CROPPEDBACK: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_FACE: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_IDNUMBER: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_CATEGORY: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_EXPIRATIONDATE: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_ISSUINGCOUNTRY: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_ISSUINGREGION: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_DATEOFBIRTH: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_ADDRESS_STREET1: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_ADDRESS_CITY: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_ADDRESS_REGION: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_ADDRESS_POSTCODE: VDXFKeyInterface; +export declare const IDENTITY_RESIDENTCARD_ADDRESS_COUNTRY: VDXFKeyInterface; +export declare const IDENTITY_IDCARD: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_ORIGINALFRONT: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_ORIGINALBACK: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_CROPPEDFRONT: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_CROPPEDBACK: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_FACE: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_IDNUMBER: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_CATEGORY: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_EXPIRATIONDATE: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_ISSUINGCOUNTRY: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_ISSUINGREGION: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_DATEOFBIRTH: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_ADDRESS_STREET1: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_ADDRESS_CITY: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_ADDRESS_REGION: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_ADDRESS_POSTCODE: VDXFKeyInterface; +export declare const IDENTITY_IDCARD_ADDRESS_COUNTRY: VDXFKeyInterface; +export declare const IDENTITY_VISA: VDXFKeyInterface; +export declare const IDENTITY_VISA_ORIGINALFRONT: VDXFKeyInterface; +export declare const IDENTITY_VISA_ORIGINALBACK: VDXFKeyInterface; +export declare const IDENTITY_VISA_CROPPEDFRONT: VDXFKeyInterface; +export declare const IDENTITY_VISA_CROPPEDBACK: VDXFKeyInterface; +export declare const IDENTITY_VISA_FACE: VDXFKeyInterface; +export declare const IDENTITY_VISA_IDNUMBER: VDXFKeyInterface; +export declare const IDENTITY_VISA_CATEGORY: VDXFKeyInterface; +export declare const IDENTITY_VISA_EXPIRATIONDATE: VDXFKeyInterface; +export declare const IDENTITY_VISA_ISSUINGCOUNTRY: VDXFKeyInterface; +export declare const IDENTITY_VISA_ISSUINGREGION: VDXFKeyInterface; +export declare const IDENTITY_VISA_DATEOFBIRTH: VDXFKeyInterface; +export declare const IDENTITY_VISA_ADDRESS_STREET1: VDXFKeyInterface; +export declare const IDENTITY_VISA_ADDRESS_CITY: VDXFKeyInterface; +export declare const IDENTITY_VISA_ADDRESS_REGION: VDXFKeyInterface; +export declare const IDENTITY_VISA_ADDRESS_POSTCODE: VDXFKeyInterface; +export declare const IDENTITY_VISA_ADDRESS_COUNTRY: VDXFKeyInterface; +export declare const IDENTITY_PERSONALDETAILS: VDXFKeyInterface; +export declare const IDENTITY_CONTACTDETAILS: VDXFKeyInterface; +export declare const IDENTITY_LOCATION: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS: VDXFKeyInterface; +export declare const IDENTITY_DOCUMENTS: VDXFKeyInterface; +export declare const IDENTITY_BANKACCOUNT: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_CURRENCY: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_COUNTRY: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_STREET1: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_STREET2: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_CITY: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_REGION: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_POSTALCODE: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_TAXNUMBER: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_TAXCOUNTRY: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_FIRSTNAME: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_LASTNAME: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_PHONENUMBER: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_NUMBER: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_TYPE: VDXFKeyInterface; +export declare const IDENTITY_BANKINGDETAILS_SORTCODE: VDXFKeyInterface; +export declare const IDENTITY_DOCUMENTS_PASSPORT: VDXFKeyInterface; +export declare const IDENTITY_RESIDENCECARD: VDXFKeyInterface; +export declare const IDENTITY_ATTESTOR: VDXFKeyInterface; +export declare const IDENTITY_ATTESTATION_RECIPIENT: VDXFKeyInterface; diff --git a/dist/vdxf/identitydatakeys.js b/dist/vdxf/identitydatakeys.js new file mode 100644 index 0000000..5039ee4 --- /dev/null +++ b/dist/vdxf/identitydatakeys.js @@ -0,0 +1,1653 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.IDENTITY_DRIVINGLICENCE_FACE = exports.IDENTITY_DRIVINGLICENCE_CROPPEDBACK = exports.IDENTITY_DRIVINGLICENCE_CROPPEDFRONT = exports.IDENTITY_DRIVINGLICENCE_ORIGINALBACK = exports.IDENTITY_DRIVINGLICENCE_ORIGINALFRONT = exports.IDENTITY_DRIVINGLICENCE = exports.IDENTITY_VERIFICATION_APPROVALS_STATUS = exports.IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK = exports.IDENTITY_VERIFICATION_APPROVALS_WATCHLISTOK = exports.IDENTITY_VERIFICATION_APPROVALS_SELFIECHECKED = exports.IDENTITY_VERIFICATION_APPROVALS_DOCUMENTSVERIFIED = exports.IDENTITY_VERIFICATION_APPROVALS_KYCCHECKED = exports.IDENTITY_VERIFICATION_APPROVALS_VERIFIEDSMS = exports.IDENTITY_VERIFICATION_APPROVALS_ACCEPTEDTOS = exports.IDENTITY_VERIFICATION_APPROVALS = exports.IDENTITY_VERIFICATION_STATUS = exports.IDENTITY_IDNUMBER_TYPE = exports.IDENTITY_IDNUMBER_VALUE = exports.IDENTITY_HOMEADDRESS_COUNTRY = exports.IDENTITY_HOMEADDRESS_POSTCODE = exports.IDENTITY_HOMEADDRESS_REGION = exports.IDENTITY_HOMEADDRESS_CITY = exports.IDENTITY_HOMEADDRESS_STREET2 = exports.IDENTITY_HOMEADDRESS_STREET1 = exports.IDENTITY_HOMEADDRESS = exports.IDENTITY_WEIGHT = exports.IDENTITY_ETHNICITY = exports.IDENTITY_EYECOLOR = exports.IDENTITY_HEIGHT = exports.IDENTITY_GENDER = exports.IDENTITY_LASTNAME = exports.IDENTITY_MIDDLENAME = exports.IDENTITY_FIRSTNAME = exports.IDENTITY_NATIONALITY = exports.IDENTITY_EMAIL = exports.IDENTITY_ACCOUNT_REQUESTING_IPADDRESS = exports.IDENTITY_OVER25 = exports.IDENTITY_OVER21 = exports.IDENTITY_OVER18 = exports.IDENTITY_DATEOFBIRTH = exports.IDENTITY_PHONENUMBER = exports.IDENTITY_ACCOUNT_STATUS = exports.IDENTITY_ACCOUNT_TEMPLATEVERSION = exports.IDENTITY_ACCOUNT_TEMPLATEID = exports.IDENTITY_ACCOUNT_SHAREABLEURL = exports.IDENTITY_ACCOUNT_PREVIOUSATTEMPTID = exports.IDENTITY_ACCOUNT_COMPLETEDAT = exports.IDENTITY_ACCOUNT_CREATEDAT = exports.IDENTITY_ACCOUNT_USERID = exports.IDENTITY_ACCOUNT_ID = void 0; +exports.IDENTITY_RESIDENCEPERMIT_ISSUINGREGION = exports.IDENTITY_RESIDENCEPERMIT_ISSUINGCOUNTRY = exports.IDENTITY_RESIDENCEPERMIT_EXPIRATIONDATE = exports.IDENTITY_RESIDENCEPERMIT_CATEGORY = exports.IDENTITY_RESIDENCEPERMIT_IDNUMBER = exports.IDENTITY_RESIDENCEPERMIT_FACE = exports.IDENTITY_RESIDENCEPERMIT_CROPPEDBACK = exports.IDENTITY_RESIDENCEPERMIT_CROPPEDFRONT = exports.IDENTITY_RESIDENCEPERMIT_ORIGINALBACK = exports.IDENTITY_RESIDENCEPERMIT_ORIGINALFRONT = exports.IDENTITY_RESIDENCEPERMIT = exports.IDENTITY_PASSPORT_ADDRESS_COUNTRY = exports.IDENTITY_PASSPORT_ADDRESS_POSTCODE = exports.IDENTITY_PASSPORT_ADDRESS_REGION = exports.IDENTITY_PASSPORT_ADDRESS_CITY = exports.IDENTITY_PASSPORT_ADDRESS_STREET1 = exports.IDENTITY_PASSPORT_DATEOFBIRTH = exports.IDENTITY_PASSPORT_ISSUINGREGION = exports.IDENTITY_PASSPORT_ISSUINGCOUNTRY = exports.IDENTITY_PASSPORT_EXPIRATIONDATE = exports.IDENTITY_PASSPORT_CATEGORY = exports.IDENTITY_PASSPORT_IDNUMBER = exports.IDENTITY_PASSPORT_FACE = exports.IDENTITY_PASSPORT_CROPPEDBACK = exports.IDENTITY_PASSPORT_CROPPEDFRONT = exports.IDENTITY_PASSPORT_ORIGINALBACK = exports.IDENTITY_PASSPORT_ORIGINALFRONT = exports.IDENTITY_PASSPORT = exports.IDENTITY_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS = exports.IDENTITY_EMAIL_DOMAIN_DISPOSABLE = exports.IDENTITY_EMAIL_DOMAIN_CUSTOM = exports.IDENTITY_EMAIL_DOMAIN_FREEPROVIDER = exports.IDENTITY_EMAIL_DOMAIN_REGISTEREDAT = exports.IDENTITY_EMAIL_LASTBREACHEDAT = exports.IDENTITY_EMAIL_FIRSTBREACHEDAT = exports.IDENTITY_EMAIL_BREACHCOUNT = exports.IDENTITY_EMAIL_ISDELIVERABLE = exports.IDENTITY_SELFIECHECK_VIDEO = exports.IDENTITY_SELFIECHECK_IMAGE = exports.IDENTITY_DRIVINGLICENCE_ADDRESS_COUNTRY = exports.IDENTITY_DRIVINGLICENCE_ADDRESS_POSTCODE = exports.IDENTITY_DRIVINGLICENCE_ADDRESS_REGION = exports.IDENTITY_DRIVINGLICENCE_ADDRESS_CITY = exports.IDENTITY_DRIVINGLICENCE_ADDRESS_STREET1 = exports.IDENTITY_DRIVINGLICENCE_DATEOFBIRTH = exports.IDENTITY_DRIVINGLICENCE_ISSUINGREGION = exports.IDENTITY_DRIVINGLICENCE_ISSUINGCOUNTRY = exports.IDENTITY_DRIVINGLICENCE_EXPIRATIONDATE = exports.IDENTITY_DRIVINGLICENCE_CATEGORY = exports.IDENTITY_DRIVINGLICENCE_IDNUMBER = void 0; +exports.IDENTITY_VISA_EXPIRATIONDATE = exports.IDENTITY_VISA_CATEGORY = exports.IDENTITY_VISA_IDNUMBER = exports.IDENTITY_VISA_FACE = exports.IDENTITY_VISA_CROPPEDBACK = exports.IDENTITY_VISA_CROPPEDFRONT = exports.IDENTITY_VISA_ORIGINALBACK = exports.IDENTITY_VISA_ORIGINALFRONT = exports.IDENTITY_VISA = exports.IDENTITY_IDCARD_ADDRESS_COUNTRY = exports.IDENTITY_IDCARD_ADDRESS_POSTCODE = exports.IDENTITY_IDCARD_ADDRESS_REGION = exports.IDENTITY_IDCARD_ADDRESS_CITY = exports.IDENTITY_IDCARD_ADDRESS_STREET1 = exports.IDENTITY_IDCARD_DATEOFBIRTH = exports.IDENTITY_IDCARD_ISSUINGREGION = exports.IDENTITY_IDCARD_ISSUINGCOUNTRY = exports.IDENTITY_IDCARD_EXPIRATIONDATE = exports.IDENTITY_IDCARD_CATEGORY = exports.IDENTITY_IDCARD_IDNUMBER = exports.IDENTITY_IDCARD_FACE = exports.IDENTITY_IDCARD_CROPPEDBACK = exports.IDENTITY_IDCARD_CROPPEDFRONT = exports.IDENTITY_IDCARD_ORIGINALBACK = exports.IDENTITY_IDCARD_ORIGINALFRONT = exports.IDENTITY_IDCARD = exports.IDENTITY_RESIDENTCARD_ADDRESS_COUNTRY = exports.IDENTITY_RESIDENTCARD_ADDRESS_POSTCODE = exports.IDENTITY_RESIDENTCARD_ADDRESS_REGION = exports.IDENTITY_RESIDENTCARD_ADDRESS_CITY = exports.IDENTITY_RESIDENTCARD_ADDRESS_STREET1 = exports.IDENTITY_RESIDENTCARD_DATEOFBIRTH = exports.IDENTITY_RESIDENTCARD_ISSUINGREGION = exports.IDENTITY_RESIDENTCARD_ISSUINGCOUNTRY = exports.IDENTITY_RESIDENTCARD_EXPIRATIONDATE = exports.IDENTITY_RESIDENTCARD_CATEGORY = exports.IDENTITY_RESIDENTCARD_IDNUMBER = exports.IDENTITY_RESIDENTCARD_FACE = exports.IDENTITY_RESIDENTCARD_CROPPEDBACK = exports.IDENTITY_RESIDENTCARD_CROPPEDFRONT = exports.IDENTITY_RESIDENTCARD_ORIGINALBACK = exports.IDENTITY_RESIDENTCARD_ORIGINALFRONT = exports.IDENTITY_RESIDENTCARD = exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_COUNTRY = exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_POSTCODE = exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_REGION = exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_CITY = exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_STREET1 = exports.IDENTITY_RESIDENCEPERMIT_ADDRESS = exports.IDENTITY_RESIDENCEPERMIT_DATEOFBIRTH = void 0; +exports.IDENTITY_ATTESTATION_RECIPIENT = exports.IDENTITY_ATTESTOR = exports.IDENTITY_RESIDENCECARD = exports.IDENTITY_DOCUMENTS_PASSPORT = exports.IDENTITY_BANKINGDETAILS_SORTCODE = exports.IDENTITY_BANKINGDETAILS_TYPE = exports.IDENTITY_BANKINGDETAILS_NUMBER = exports.IDENTITY_BANKINGDETAILS_PHONENUMBER = exports.IDENTITY_BANKINGDETAILS_LASTNAME = exports.IDENTITY_BANKINGDETAILS_FIRSTNAME = exports.IDENTITY_BANKINGDETAILS_TAXCOUNTRY = exports.IDENTITY_BANKINGDETAILS_TAXNUMBER = exports.IDENTITY_BANKINGDETAILS_POSTALCODE = exports.IDENTITY_BANKINGDETAILS_REGION = exports.IDENTITY_BANKINGDETAILS_CITY = exports.IDENTITY_BANKINGDETAILS_STREET2 = exports.IDENTITY_BANKINGDETAILS_STREET1 = exports.IDENTITY_BANKINGDETAILS_COUNTRY = exports.IDENTITY_BANKINGDETAILS_CURRENCY = exports.IDENTITY_BANKACCOUNT = exports.IDENTITY_DOCUMENTS = exports.IDENTITY_BANKINGDETAILS = exports.IDENTITY_LOCATION = exports.IDENTITY_CONTACTDETAILS = exports.IDENTITY_PERSONALDETAILS = exports.IDENTITY_VISA_ADDRESS_COUNTRY = exports.IDENTITY_VISA_ADDRESS_POSTCODE = exports.IDENTITY_VISA_ADDRESS_REGION = exports.IDENTITY_VISA_ADDRESS_CITY = exports.IDENTITY_VISA_ADDRESS_STREET1 = exports.IDENTITY_VISA_DATEOFBIRTH = exports.IDENTITY_VISA_ISSUINGREGION = exports.IDENTITY_VISA_ISSUINGCOUNTRY = void 0; +exports.IDENTITY_ACCOUNT_ID = { + "vdxfid": "i5Xgd7Aqds922eE8FDBUsKHSgiig39AnfS", + "indexid": "xAMo5ubvVBMgep7A6tqdqhoyiNjgq3j1ci", + "hash160result": "4c5e79bf46593fe959cb1918422eaa8fc82b8916", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.account.id" + } +}; +exports.IDENTITY_ACCOUNT_USERID = { + "vdxfid": "iNKVUvr5GzdCHgybMauK11DdZZUyWE3pe3", + "indexid": "xT9bwjHA8JqrurrdDGZTyPkAbDVzR53C2o", + "hash160result": "93b62bfd8c861ac7a5aa3d3d9f618ccd8c04b5ce", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.account.userid" + } +}; +exports.IDENTITY_ACCOUNT_CREATEDAT = { + "vdxfid": "i42uTbJmVBcPacY3Ak1g95LBg5rBBntQby", + "indexid": "x8s1vPjrLVq4CnR52Rfq7TrihjsBzxAEic", + "hash160result": "c40b12b14582c976e67a2e5992b0fdf67fb21f06", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.account.createdat" + } +}; +exports.IDENTITY_ACCOUNT_COMPLETEDAT = { + "vdxfid": "iRJTZj7osY5EYA7pd7K3UcJVAApkvodDjZ", + "indexid": "xW8a2XYtirHuAKzrUnyCSzq2BpqmpCnnHQ", + "hash160result": "c568b6e1f734f5dc9b754e5932ebdb63f2606bef", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.account.completedat" + } +}; +exports.IDENTITY_ACCOUNT_PREVIOUSATTEMPTID = { + "vdxfid": "iGU6RCWyjU1sscCPLN77XhTESJ21JCTNxF", + "indexid": "xMJCszx4anEYVn5RC3mGW5ymTx32EBfaqs", + "hash160result": "50c2b12bb483802d14beae3c6b7454c6ecc0848e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.account.previousattemptid" + } +}; +exports.IDENTITY_ACCOUNT_SHAREABLEURL = { + "vdxfid": "i92YkV3FVGZfp5Ep3j1sfQUgqUS37M9v82", + "indexid": "xDrfDHULLanLSF7quQg2do1Ds8T3yGCRw3", + "hash160result": "52e9f990e5e89cc1088acd29a2fda0ef140ae73c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.account.shareableurl" + } +}; +exports.IDENTITY_ACCOUNT_TEMPLATEID = { + "vdxfid": "iL5diuVsHAG5DLVeyc8XYdEXR6fFro5G7s", + "indexid": "xQukBhvx8UUjqWNgqHngX1m4SkgGhnybh1", + "hash160result": "37ef653fe6685fca132d77834384702f6cd225b6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.account.templateid" + } +}; +exports.IDENTITY_ACCOUNT_TEMPLATEVERSION = { + "vdxfid": "i7eBZNzKrgFov6c2Sx2QecyEmPq2Mc4BGe", + "indexid": "xCUJ2BRQhzUUYGV4JdgZd1Vmo3r39BsUym", + "hash160result": "e6e490ce8bfde333ab0374880ea0efbb9c12b42d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.account.templateversion" + } +}; +exports.IDENTITY_ACCOUNT_STATUS = { + "vdxfid": "iJf3EbihEtdEpJjbQ6PgUaL3GxDgZRzSWk", + "indexid": "xPV9hQ9n6CquSUcdFn3qSxraJcEhVfWa72", + "hash160result": "d6fc5578c2fbed3251f3aa250c73b58386ec86a6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.account.status" + } +}; +exports.IDENTITY_PHONENUMBER = { + "vdxfid": "iAQY8o4HwupzcJAw9aBtFwgrvWZGQStkge", + "indexid": "xFEebbVNoE3fEU3y1Fr3ELDPxAaHE7V2kN", + "hash160result": "32bc2c7919f626c39679630ee4d6d6d07bcd074c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.phonenumber" + } +}; +exports.IDENTITY_DATEOFBIRTH = { + "vdxfid": "iSZsa7C4esogN3W6fBngUHR6GvSmt7We4j", + "indexid": "xXPz2ud9WC2LzDP8WsSqSfwdJaTnqpHdND", + "hash160result": "ab74371e952a27f615b079d3c084b38b98c84dfd", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.dateofbirth" + } +}; +exports.IDENTITY_OVER18 = { + "vdxfid": "iHPD8vB7jhtbuqPkUqzheqcZdfAfHUFVzM", + "indexid": "xNDKbicCb27GY1GnLXerdE96fKBg9tLUDT", + "hash160result": "28139ce1eae370e76f749066f778466597689098", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.over18" + } +}; +exports.IDENTITY_OVER21 = { + "vdxfid": "iAXYYrZaipc4DAmAKXUFYZxavsf6uBJqaj", + "indexid": "xFMf1ezfa8piqLeCBD8QWxV7xXg7mxMc1Z", + "hash160result": "7a1fee70ace1c048c0a93c120a8a4c5f890f5b4d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.over21" + } +}; +exports.IDENTITY_OVER25 = { + "vdxfid": "iDuForPTZFeFBAgDX1HyrP3d6of7wzrRaS", + "indexid": "xJjNGepYQZruoLZFNgx8pmaA8Tg8qSfnzM", + "hash160result": "2a1e6fa6913ea3659dcaf1c5bc20a96e399d5e72", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.over25" + } +}; +exports.IDENTITY_ACCOUNT_REQUESTING_IPADDRESS = { + "vdxfid": "i4uE1EvnDbq9WGhF5UbBr6fbxNLsgk1eZ3", + "indexid": "x9jLU3Ms4v3p8SaGwAFLpVC8z2MtYJTVwp", + "hash160result": "05a3aa58192812972a2c4e4184af7bb5fbf9a30f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.account.requesting.ipaddress" + } +}; +exports.IDENTITY_EMAIL = { + "vdxfid": "iJ4pq4DCymfbu8SAuXyNhasLeSHFNKPr23", + "indexid": "xNtwHreHq5tGXJKCmDdXfyPsg6JGHUY6X1", + "hash160result": "15a8095b6298bbff5147060d9a6363a9df6c0ea0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.email" + } +}; +exports.IDENTITY_NATIONALITY = { + "vdxfid": "iEUYNTkw6kFhZWto7vyTpQqtdRL7eoKZY2", + "indexid": "xKJeqGC1x4UNBgmpycdcnoNRf5M8btexbt", + "hash160result": "db935713b90281d6aefe5e7b33e5b660962aaa78", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.nationality" + } +}; +exports.IDENTITY_FIRSTNAME = { + "vdxfid": "iLB8SG7ErJtTYcG1f4w9RLuMJPpAsjFkiL", + "indexid": "xR1Eu4YKhd78An93WkbJPjRtL3qBprmMno", + "hash160result": "0bab76359b70b37c858399c2a3776939c5de2fb7", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.firstname" + } +}; +exports.IDENTITY_MIDDLENAME = { + "vdxfid": "iHG6ALRUPyRcgJMsPqBmvUCZxe4PrMfgej", + "indexid": "xN6Cd8rZFHeHJUEuFWqvtrj6zJ5QjX94j5", + "hash160result": "b98bd82034ec86ae5538313c9f5501c086ac3797", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.middlename" + } +}; +exports.IDENTITY_LASTNAME = { + "vdxfid": "iKRmfy4xgjWQyPdXYie6dJezRXF4aKdbHB", + "indexid": "xQFt8mW3Y3j5bZWZQQJFbhBXTBG5S4vdaZ", + "hash160result": "6b597e0c05d1430566b7b17a59da683fb4a6fcae", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.lastname" + } +}; +exports.IDENTITY_GENDER = { + "vdxfid": "iShgSBdiYDQnVwgNcDnSbNYHGU6CTwBDb1", + "indexid": "xXXntz4oPXdT87ZQTuSbZm4pJ87DGEgHpG", + "hash160result": "3baee594e927d47b641c7cf3927ab3229dd0c7fe", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.gender" + } +}; +exports.IDENTITY_HEIGHT = { + "vdxfid": "iLmLmsFMTUm4dd2iMuMe4xaMC8VSZN9soP", + "indexid": "xRbTEfgSJnyjFnukDb1o3M6tDnWTSUiii7", + "hash160result": "e80652253fa52b95cd9ea5ff43d51642ea4fa8bd", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.height" + } +}; +exports.IDENTITY_EYECOLOR = { + "vdxfid": "iRo2XT8tcMtLTpuPJ6V5WxbnVWa2CrcdsJ", + "indexid": "xWd8zFZyTg715znR9n9EVM8KXAb328xGbZ", + "hash160result": "c60fdfcc04173f273aa92a3b1844964b368ad2f4", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.eyecolor" + } +}; +exports.IDENTITY_ETHNICITY = { + "vdxfid": "i9jHPJokwnLoCQ83P6jqezCcEZUD1g34B9", + "indexid": "xEZPr7Eqo6ZTpa15EnPzdNj9GDVDsfToki", + "hash160result": "0476d568a9cf949bc8b6d84dc73e38cf85449b44", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.ethnicity" + } +}; +exports.IDENTITY_WEIGHT = { + "vdxfid": "iMzGK44r6SNkzi3N3AmcZBtuysPvgYiRiT", + "indexid": "xSpNmrVvwkbRcsvPtrRmXaRT1XQwXFe2Ut", + "hash160result": "8abe0e94cb1ff345f1351720acc8eefed91e12cb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.weight" + } +}; +exports.IDENTITY_HOMEADDRESS = { + "vdxfid": "i9A1fD5sVwFFXzEmCJWSRDqN94PXp9oNaS", + "indexid": "xDz881WxMFTvAA7o3zAbPcMuAiQYiT4Vnc", + "hash160result": "072a3abed3a353e001288074d9426285e569503e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.homeaddress" + } +}; +exports.IDENTITY_HOMEADDRESS_STREET1 = { + "vdxfid": "i5BJAwQbrP4Bht8gUpoqSrovuBwfRc6jiv", + "indexid": "xA1QdjqghhGrL41iLWTzRFLTvqxgNsVzXY", + "hash160result": "ff22b196e64c9388daab76a57bcaea50491cae12", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.homeaddress.street1" + } +}; +exports.IDENTITY_HOMEADDRESS_STREET2 = { + "vdxfid": "iMx71C14hrBoWD3yyhYChmhJEw4Kqw1zj4", + "indexid": "xSnDTzS9ZAQU8Nw1qPCMgADqGb5Lgqb4zw", + "hash160result": "efdda473a6a9e98cd91b02d36bfeb5dec784a9ca", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.homeaddress.street2" + } +}; +exports.IDENTITY_HOMEADDRESS_CITY = { + "vdxfid": "i75ZpW5T6wgQEMVxyvqHT9ZaV4fjsQ7kws", + "indexid": "xBugHJWXxFu4rXNzqcVSRY67WigkoCUEUQ", + "hash160result": "fcae40d5d327f13dc0e0c1e80f3db212a4ed8827", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.homeaddress.city" + } +}; +exports.IDENTITY_HOMEADDRESS_REGION = { + "vdxfid": "iRkYck3JowdFWmrM6VUAS8Wtpmxds2fLXS", + "indexid": "xWaf5YUPfFqv8wjNxB8KQX3RrRyenbioh5", + "hash160result": "fa06b90a547658a3efc3cd1797d6b3cd30695af4", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.homeaddress.region" + } +}; +exports.IDENTITY_HOMEADDRESS_POSTCODE = { + "vdxfid": "iAL2FRG8PVi18fN8MatjXhV1YkuZr7PM4T", + "indexid": "xFA8iDhDEovfkqFADGYtW61YaQvahtrhJA", + "hash160result": "b4f4c3a08fdcf32209482fa3d8c7b01201312d4b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.homeaddress.postcode" + } +}; +exports.IDENTITY_HOMEADDRESS_COUNTRY = { + "vdxfid": "iABYGvas6uUDk9ejCkfCVLvE9PPJXgyCKX", + "indexid": "xF1ejj1wxDgtNKXm4SKMTjSmB3QKL8LhQG", + "hash160result": "bafb2cb6d5cc86478622feb8a00097d71d839249", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.homeaddress.country" + } +}; +exports.IDENTITY_IDNUMBER_VALUE = { + "vdxfid": "iQrnvbCNWMaG6PjTmeXzrcuAXKsMzmNJWA", + "indexid": "xVguPPdTMfnviZcVdLC9q1RhYytNuZ3ToS", + "hash160result": "72cf52b2f6b4f68173c933fb046e892870b990ea", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idnumber.value" + } +}; +exports.IDENTITY_IDNUMBER_TYPE = { + "vdxfid": "iSSZX5yUdQh7zLf1gUewH5rVfbXtSq2c4s", + "indexid": "xXGfytQZUiuncWY3YAK6FUP2hFYuQ4yYwW", + "hash160result": "2807f356d687b4c6208ce0379b31043c7fcdebfb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idnumber.type" + } +}; +exports.IDENTITY_VERIFICATION_STATUS = { + "vdxfid": "i8MhqW3ejupmV1M5UyhyhG13dkS8A7g7zg", + "indexid": "xDBpJJUjbE3S7BE7LfN8feXafQT92YQZPm", + "hash160result": "47f2864de74ffe01ccb7eeabf0f2d848e3668e35", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.verification.status" + } +}; +exports.IDENTITY_VERIFICATION_APPROVALS = { + "vdxfid": "iBMkZtqC9yqVrFL4GfYtXckFpYAhRkE2mj", + "indexid": "xGBs2hGH1J4AURD68MD3W1GnrCBiJ3nRgG", + "hash160result": "a98801de1ba5ff5e571dbdde50519483140f7956", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.verification.approvals" + } +}; +exports.IDENTITY_VERIFICATION_APPROVALS_ACCEPTEDTOS = { + "vdxfid": "iH32QkXBKyWEJD6kh9HJ4KMfeiWfPWoHEh", + "indexid": "xMs8sYxGBHitvNynYpwT2htCgNXgHt6VAW", + "hash160result": "bbe4c09ae069561d3c14b04e3b7b96c98622bf94", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.verification.approvals.acceptedtos" + } +}; +exports.IDENTITY_VERIFICATION_APPROVALS_VERIFIEDSMS = { + "vdxfid": "iPgyMDFQ9QMNrqc3ckEBEubDNwLnvubUdW", + "indexid": "xUX5p1gUzia3V1V5URtLDJ7kQbMosPsVj8", + "hash160result": "72853b66aa158531e1f15b9ff075199a1224bddd", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.verification.approvals.verifiedsms" + } +}; +exports.IDENTITY_VERIFICATION_APPROVALS_KYCCHECKED = { + "vdxfid": "iRnbiA4dAPbeuB6KQN2donBHP9mKUHHFZf", + "indexid": "xWciAxVi1hpKXLyMG3gnnAhpQonLQapWPv", + "hash160result": "c6114ffec250b746bde117903b930d9a34d3bdf4", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.verification.approvals.kycchecked" + } +}; +exports.IDENTITY_VERIFICATION_APPROVALS_DOCUMENTSVERIFIED = { + "vdxfid": "iBjML9DHV67MBQyMEHVTSoJPhU8DNeWRTE", + "indexid": "xGZTnweNLQL1oarP5y9cRBpvj89EGt5VSm", + "hash160result": "0a93883010769ff783be5ced074ecfa50dd08e5a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.verification.approvals.documentsverified" + } +}; +exports.IDENTITY_VERIFICATION_APPROVALS_SELFIECHECKED = { + "vdxfid": "iKgeFKoy6WMx9MoEjig5vHoXbyxVFBPWDN", + "indexid": "xQWki8F3wpacmXgGbQLEtgL4ddyWC8UZLv", + "hash160result": "6a044306ef77ce9896ffcd26ee40174651b1ccb1", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.verification.approvals.selfiechecked" + } +}; +exports.IDENTITY_VERIFICATION_APPROVALS_WATCHLISTOK = { + "vdxfid": "iFDB1qKYSrWMRaMCWX6hNGE8HVXB1cNtJu", + "indexid": "xL3HUdkdJAj23kEENCkrLekfK9YBymnLrX", + "hash160result": "e691a2d2af30df6ee21f0eb805a98e11d539ba80", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.verification.approvals.watchlistok" + } +}; +exports.IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK = { + "vdxfid": "i9dva492S7vQphjLiK2UaS7JikZKs5TQsB", + "indexid": "xEU32ra7HS95SscNZzgdYpdqkQaLjnzcyC", + "hash160result": "6ffdbee07124450d29698724573bd6ab07d09743", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.verification.approvals.riskcheckok" + } +}; +exports.IDENTITY_VERIFICATION_APPROVALS_STATUS = { + "vdxfid": "iKhGUcTH4ZQ7uiy933m8f1GbwSLcwJW8ev", + "indexid": "xQXNwQtMuscnXtrAtjRHdPo8y6MdomjAXM", + "hash160result": "00612f17d9cedc346fcd139c0c5b56e666efeab1", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.verification.approvals.status" + } +}; +exports.IDENTITY_DRIVINGLICENCE = { + "vdxfid": "iMYQw33ryywcNyQDjFjiVvFm2kAwG85poV", + "indexid": "xSNXPqUwqJAH19HFawPsUJnJ4QBxCATPNx", + "hash160result": "e2857ddcc4f3301c354a00d1376558a75e802ec6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence" + } +}; +exports.IDENTITY_DRIVINGLICENCE_ORIGINALFRONT = { + "vdxfid": "i3fq6ET2dL8CxC3BJzdYTpUsjEsQaKP7bX", + "indexid": "x8VwZ2t7UeLsaMvDAgHhSD1QkttRPYndPW", + "hash160result": "26bab54e1f760b1abb888229a38a5179cc502302", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.originalfront" + } +}; +exports.IDENTITY_DRIVINGLICENCE_ORIGINALBACK = { + "vdxfid": "i7LTNZvJmm5LjAwMWuryb52yKt7txaV5FW", + "indexid": "xCAZqNMPd5J1MLpPNbX8ZTZWMY8unxdAfs", + "hash160result": "c7b3e9a70908fafc8de3e81f6ac2e0c131c9592a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.originalback" + } +}; +exports.IDENTITY_DRIVINGLICENCE_CROPPEDFRONT = { + "vdxfid": "i8KsL3JJgbJyuqEyEbu5KZkDBFvHscLoM6", + "indexid": "xD9ynqjPXuXeY1816HZEHxGkCuwJoHBx54", + "hash160result": "7b28226a4f3eaae379cddbc84d037cfe587e3535", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.croppedfront" + } +}; +exports.IDENTITY_DRIVINGLICENCE_CROPPEDBACK = { + "vdxfid": "iRwumhx12vtT8CkspBLmKQY8WZywurxVXo", + "indexid": "xWn2EWP5tF77kNdufrzvHo4fYDzxhjXyZz", + "hash160result": "0b6edf21bfe119173b3fffab6118d79a39a580f6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.croppedback" + } +}; +exports.IDENTITY_DRIVINGLICENCE_FACE = { + "vdxfid": "i5i7U4EAbgPzhCRebtbmoZt6pTyqGqP8jj", + "indexid": "xAYDvrfFSzcfKNJgTaFvmxQdr7zr6oGgFh", + "hash160result": "1f47647bf3e71f0c1c2638c99e6a42e6bf118218", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.face" + } +}; +exports.IDENTITY_DRIVINGLICENCE_IDNUMBER = { + "vdxfid": "iBCA8b4zS5ygVgTFqxabke7BBFs92dhcXQ", + "indexid": "xG2GbPW5HQCM7rLHheEkj2diCut9vgFhM2", + "hash160result": "fcf0571278bd1afce6d93f0a99f41437bb91a854", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.idnumber" + } +}; +exports.IDENTITY_DRIVINGLICENCE_CATEGORY = { + "vdxfid": "i5Cm95DZa6FPP66bA6aFfoYL2jaojetHMp", + "indexid": "xA2sbseeRQU41Fyd1nEQeC4s4Pbpf63xB4", + "hash160result": "3b91fccdf59d99b21e442441b89abb31bf09f512", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.category" + } +}; +exports.IDENTITY_DRIVINGLICENCE_EXPIRATIONDATE = { + "vdxfid": "iJvGpPoP1uUkUqn9bAchLyfaGWyy8JGQoX", + "indexid": "xPkPHCETsDhR71fBSrGrKNC7JAzz17RsLk", + "hash160result": "96aee63b3c6094a4d9edbc04b63a8e45688068a9", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.expirationdate" + } +}; +exports.IDENTITY_DRIVINGLICENCE_ISSUINGCOUNTRY = { + "vdxfid": "iBsNEqysX64cQAjiRHHL1msd7LxroGM6Mb", + "indexid": "xGhUheQxNQHH2LckGxwUzAQA8zysfnKDSU", + "hash160result": "f2f24dd2383538493d21ff0aca77c7cd1fe6125c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.issuingcountry" + } +}; +exports.IDENTITY_DRIVINGLICENCE_ISSUINGREGION = { + "vdxfid": "i6gZSDYpK9inexaeFQDSk9GuAmew1ymMFo", + "indexid": "xBWfu1yuATwTH8Tg75sbiXoSCRfwsxQzeR", + "hash160result": "67f4fd5c49250912aecf1eb8ab17f29d590a2f23", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.issuingregion" + } +}; +exports.IDENTITY_DRIVINGLICENCE_DATEOFBIRTH = { + "vdxfid": "iChWUsL1NQwDqcwXbFGxHiCegfquGPyadv", + "indexid": "xHXcwfm6Dj9tTnpZSvw7G6jBiKrvBUhwaw", + "hash160result": "3c7bd13bcdb54368e7590a9f2da5b201b7be2d65", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.dateofbirth" + } +}; +exports.IDENTITY_DRIVINGLICENCE_ADDRESS_STREET1 = { + "vdxfid": "i9xaEvSQ537wuYgcVPRgG3zop9bVzeDTBw", + "indexid": "xEnghisUvMLcXiZeM55qESXLqocWsv6zmJ", + "hash160result": "48dd1caf84c1a49209ca44064846dc4ad0be1e47", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.address.street1" + } +}; +exports.IDENTITY_DRIVINGLICENCE_ADDRESS_CITY = { + "vdxfid": "i6XMEh3jrxzdyoVYoNWhRSncR9oWSnmikd", + "indexid": "xBMThVUpiHDJbyNaf4ArPqK9SopXGndEyv", + "hash160result": "c1f3612774870d1f12320bff317e7790211d7121", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.address.city" + } +}; +exports.IDENTITY_DRIVINGLICENCE_ADDRESS_REGION = { + "vdxfid": "i7sPBSqerD23RAqfN167aYePjfC8LL34UA", + "indexid": "xChVeFGjhXEi3LihDgkGYwAvmKD9CsNunu", + "hash160result": "991d24c053cb59a816e161fe3af2f40a7f2e3330", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.address.region" + } +}; +exports.IDENTITY_DRIVINGLICENCE_ADDRESS_POSTCODE = { + "vdxfid": "i9eHAmpeA3tmpsVeG5EkHuVfALFrmpzLqM", + "indexid": "xEUPdaFj1N7ST3Ng7ktuGJ2CBzGsZbja5V", + "hash160result": "f5905bbdf2eb60b24ccf6851716cc0efe801a943", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.address.postcode" + } +}; +exports.IDENTITY_DRIVINGLICENCE_ADDRESS_COUNTRY = { + "vdxfid": "i3xAMYBKLVdK89kuheXhTjuJTAxozmypj3", + "indexid": "x8nGpLcQBoqykKdwZLBrS8RqUpypqVUEV5", + "hash160result": "459844e00df4387514f31f182a88f7e13b0d3a05", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.address.country" + } +}; +exports.IDENTITY_SELFIECHECK_IMAGE = { + "vdxfid": "iC22PxGqY7Mx3YT9kNrW1d11JNyGL56N8e", + "indexid": "xGr8rkhvPRacfiLBc4Wez1XYL2zHDDbJgD", + "hash160result": "c52d0023cce8c847a5097b6898f867651914b65d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.selfiecheck.image" + } +}; +exports.IDENTITY_SELFIECHECK_VIDEO = { + "vdxfid": "iLfnRYzcdQXR6am8rZk7xNtTUbLZo5NLG6", + "indexid": "xRVttMRhUik5ikeAiFQGvmQzWFMajwrVzX", + "hash160result": "ac0674f6d656d434e0b5b310daaaed554c3a9bbc", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.selfiecheck.video" + } +}; +exports.IDENTITY_EMAIL_ISDELIVERABLE = { + "vdxfid": "iN5Tdse8NSwuW6A4ZavHbHoDyD8aVjn1Ky", + "indexid": "xSua6g5DDmAa8G36RGaSZgKkzs9bSnFbCX", + "hash160result": "8194ee01a0bc66dca2af9ba7c3bba4a24da70dcc", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.email.isdeliverable" + } +}; +exports.IDENTITY_EMAIL_BREACHCOUNT = { + "vdxfid": "iDy1YKGhzVjAiMiuAvFDqxQbmLRhLEjwPo", + "indexid": "xJo817hnqowqLXbw2buNpLw8nzSiAygHhx", + "hash160result": "8144d2d8cafd733bb03847166be8493d275e1473", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.email.breachcount" + } +}; +exports.IDENTITY_EMAIL_FIRSTBREACHEDAT = { + "vdxfid": "i3eSGR4wrLk5djHsnT18dDHrJBFSBBxVST", + "indexid": "x8UYjDW2hexkFuAue8fHbbpPKqGT4mjAzH", + "hash160result": "df796054181f57d3b61d655d604d42d6c6d8df01", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.email.firstbreachedat" + } +}; +exports.IDENTITY_EMAIL_LASTBREACHEDAT = { + "vdxfid": "iCuZWBzmxCoFcRFjXYFgC6g4jT7kzxvhew", + "indexid": "xHjfxzRroX1vEb8mPDuqAVCbm78ms8Hkhd", + "hash160result": "d1b421db4c835cfa67b491342c31f89283427567", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.email.lastbreachedat" + } +}; +exports.IDENTITY_EMAIL_DOMAIN_REGISTEREDAT = { + "vdxfid": "iGxV4SBRZMk5qWrQEKgUS4RoqzpDmyBEpC", + "indexid": "xMnbXEcWQfxkTgjS61LdQSxLseqEcTADNA", + "hash160result": "e195ef220f8e71bfa7bef160291ecaa0164de393", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.email.domain.registeredat" + } +}; +exports.IDENTITY_EMAIL_DOMAIN_FREEPROVIDER = { + "vdxfid": "iLUfvKcg92CYo3BvCuRf5o844d44kGLhJL", + "indexid": "xRJnP83kzLRDRD4x4b5p4Beb6H55fetTy7", + "hash160result": "0b0f213c88a1b0df6cd01721955b1d0c103981ba", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.email.domain.freeprovider" + } +}; +exports.IDENTITY_EMAIL_DOMAIN_CUSTOM = { + "vdxfid": "i4FSBFpQ6Ccjiy2g61GrxhBppv1jDDh6on", + "indexid": "x95Ye4FUwWqQM8uhwgw1w5iMra2k7F1Lfz", + "hash160result": "bea1175185aeaf256aa7f04795b2c8d0c8547e08", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.email.domain.custom" + } +}; +exports.IDENTITY_EMAIL_DOMAIN_DISPOSABLE = { + "vdxfid": "i52PJxRyjKAEkmQFd2oGYgZV3pcsQUcD1T", + "indexid": "x9rVmks4adNuNwHHUiTRX5625UdtJPBQ1w", + "hash160result": "3adf98cb5cc90a074a52a651c50f67f5f0a7fe10", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.email.domain.disposable" + } +}; +exports.IDENTITY_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS = { + "vdxfid": "iCtAZWinafiyf4tmvPxFkKNn5KxayXTPSV", + "indexid": "xHiH2K9sRyweHEmon5cQihuK6yybre797b", + "hash160result": "85477eb8148562614c396ca64fc7563637b13167", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.email.domain.toplevel.suspicious" + } +}; +exports.IDENTITY_PASSPORT = { + "vdxfid": "iKgbqmZ4Ks9SPNQGj5PZ5TgXomYG4CtaXv", + "indexid": "xQWiJZz9BBN71YHJam3i3rD4qRZH1sbLHD", + "hash160result": "775f52820102c994e30a29b1828b064421afcab1", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport" + } +}; +exports.IDENTITY_PASSPORT_ORIGINALFRONT = { + "vdxfid": "iCwT1mHdci9wooC6Q8mtx8QssXzwiL4hxp", + "indexid": "xHmZUZiiU2NcRy58FpS3vWwQuC1xdM48mW", + "hash160result": "25023e23a25ba4daa7ac0a9c96180f5e90acd067", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.originalfront" + } +}; +exports.IDENTITY_PASSPORT_ORIGINALBACK = { + "vdxfid": "iDXKJaroNRKr9GZfLFvH7LttJQaXqGoSrc", + "indexid": "xJMRmPHtDjYWmSShBwaS5jRRL4bYmTdC9J", + "hash160result": "21734b0f37ec51dd77bdab8c10065cf67b61386e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.originalback" + } +}; +exports.IDENTITY_PASSPORT_CROPPEDFRONT = { + "vdxfid": "i4cr6CxCYDHUDjc6UoMsDVAZoNep6Meuyi", + "indexid": "x9SxZ1PHPXW8quV8LV22Bsh6q2fpxtJ6Zd", + "hash160result": "274c241806d31576a57a074cc2f6b4c624078b0c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.croppedfront" + } +}; +exports.IDENTITY_PASSPORT_CROPPEDBACK = { + "vdxfid": "i6wA2ttX7vcxBXmrdmGEa44NZEFBZWoRYa", + "indexid": "xBmGVhKbyEqcohetVSvPYSauatGCUYDMs2", + "hash160result": "f56f1db46ddebc99f3c8954fc8bf1d26a9bef125", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.croppedback" + } +}; +exports.IDENTITY_PASSPORT_FACE = { + "vdxfid": "iLCbvnyU4V3XeMz18CXAG5MCtjb2FjpcZX", + "indexid": "xR2iPbQYuoGCGXs2ytBKETsjvPc35DNZDm", + "hash160result": "26f7dc9d524f84a21c8a9e3f2dc5149f3a3c77b7", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.face" + } +}; +exports.IDENTITY_PASSPORT_IDNUMBER = { + "vdxfid": "iDYih1jmCA1oexyxZ1PQFL5ewyciqoQ2rw", + "indexid": "xJNq9pAr3UEUH8rzQh3ZDicByddjgKM4vN", + "hash160result": "c8a25af227fc07e260119b370da0eae2a9517c6e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.idnumber" + } +}; +exports.IDENTITY_PASSPORT_CATEGORY = { + "vdxfid": "iMtpUJYWZmnnSJyJcshHRdWJZMhZVZZifT", + "indexid": "xSivw6ybR61T4UrLUZMSQ22qb1iaQux7BU", + "hash160result": "84a9f125285d7e93a1e676ed48e3fbe459780aca", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.category" + } +}; +exports.IDENTITY_PASSPORT_EXPIRATIONDATE = { + "vdxfid": "i98TaZ3wTh3qRw2ufeunVY2MD5eKwoamGE", + "indexid": "xDxa3MV2K1GW46uwXLZwTvYtEjfLspcYEK", + "hash160result": "07727b480c654d59cb611ed01715e254eb37053e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.expirationdate" + } +}; +exports.IDENTITY_PASSPORT_ISSUINGCOUNTRY = { + "vdxfid": "iRHGM2GEYeRUuHKSG1wENVA16bdyVRxchn", + "indexid": "xW7NophKPxe9XTCU7hbPLsgY8FezLKmJHi", + "hash160result": "4798dee337b16fc22d26748fb0803738f99831ef", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.issuingcountry" + } +}; +exports.IDENTITY_PASSPORT_ISSUINGREGION = { + "vdxfid": "i6Ay9VdcZjGrJur5SNyhBDZWzxGmo7qUmW", + "indexid": "xB15cJ4hR3VWw5j7J4dr9c642cHnbq2nm9", + "hash160result": "f3d9b605096f4c816de7d72c597fee07e75a961d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.issuingregion" + } +}; +exports.IDENTITY_PASSPORT_DATEOFBIRTH = { + "vdxfid": "iAjG8DwYfKxt9affJy6CUBDDFK5jaeHRLJ", + "indexid": "xFZNb2NdWeBYmkYhAekMSZjkGy6kWqAqyd", + "hash160result": "73eb23619d178f495a24b41aaf6aac107357924f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.dateofbirth" + } +}; +exports.IDENTITY_PASSPORT_ADDRESS_STREET1 = { + "vdxfid": "i7HPJNB16V5pws8xSq4a8pHF29Mcg6sUyy", + "indexid": "xC7VmAc5woJVa31zJWij7Con3oNdXuBysY", + "hash160result": "c28625c4dfc12d3cdd85f8c7272e87a57523c529", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.address.street1" + } +}; +exports.IDENTITY_PASSPORT_ADDRESS_CITY = { + "vdxfid": "iFSLsk21VvWSWLg9a4XFTB3kEN8bLnTB7c", + "indexid": "xLGTLYT6MEj78WZBRkBQRZaHG29cBfjnYu", + "hash160result": "c06884e75232e86de75c6ccbd5605a3352dd3783", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.address.city" + } +}; +exports.IDENTITY_PASSPORT_ADDRESS_REGION = { + "vdxfid": "iFNoUQhExFEYTgrqgy7x22Q6URM7ek9L3J", + "indexid": "xLCuwD8KoZTD5rjsYen6zQvdW5N8Z4oGqf", + "hash160result": "7b7baa6d0d788f434536aa472c57d9de40678c82", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.address.region" + } +}; +exports.IDENTITY_PASSPORT_ADDRESS_POSTCODE = { + "vdxfid": "iS4SakGdB4ek1Q1QAitXUwFEk1RVyi3rLY", + "indexid": "xWtZ3Yhi2NsQdZtS2QYgTKmmmfSWrxdFKY", + "hash160result": "4457551bc48db37393f5ec3ec3d0cf6766dcbcf7", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.address.postcode" + } +}; +exports.IDENTITY_PASSPORT_ADDRESS_COUNTRY = { + "vdxfid": "iB9w9GgcJdGTt3ZuM2pm5qpDBA3UaJdcvj", + "indexid": "xFz3c57h9wV8WDSwCiUv4ELkCp4VNyPHLr", + "hash160result": "dd93bcbecc805e5b1606efafa1ecab6b33e53c54", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.address.country" + } +}; +exports.IDENTITY_RESIDENCEPERMIT = { + "vdxfid": "i8WZetqKFn98rHRZGvAvPuzPyrJeyUMjfb", + "indexid": "xDLg7hGQ76MoUTJb8bq5NJWw1WKftQg9VL", + "hash160result": "712ef00d9937eb4ade0fd3e627c2df1d99503b37", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit" + } +}; +exports.IDENTITY_RESIDENCEPERMIT_ORIGINALFRONT = { + "vdxfid": "iC5NrmPgKckxBjKv7v9HjUMytm4jRtEBgZ", + "indexid": "xGuVKZpmAvycouCwyboShrtWvR5kNYzWoH", + "hash160result": "639ed2ef9da2f5e75fe63e1ccf83d1b54e68585e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.originalfront" + } +}; +exports.IDENTITY_RESIDENCEPERMIT_ORIGINALBACK = { + "vdxfid": "iLTPvrZi8HNALuVmYeAWnSnLdZ5GsAAUcx", + "indexid": "xRHWPeznybapy5NoQKpfkqJsfD6HmQW5eW", + "hash160result": "94d200a22dbdfa7ba47d1970c21eacb65f7543ba", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.originalback" + } +}; +exports.IDENTITY_RESIDENCEPERMIT_CROPPEDFRONT = { + "vdxfid": "i6T3rairykWA5vVEtQqptjp5RBRhTCmsBS", + "indexid": "xBHAKP9wq4ipi6NGk6Vys8LcSqSiKAMKZU", + "hash160result": "14136815f288a4b6426c7f4ab6b28221dcf0a020", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.croppedfront" + } +}; +exports.IDENTITY_RESIDENCEPERMIT_CROPPEDBACK = { + "vdxfid": "iHssgpjB2gsusjjLH36N3KqUQqz7JPXumA", + "indexid": "xNhz9dAFt16aVucN8ikX1iN1SW18D7SNDP", + "hash160result": "ce3cae77f2010009817f1e01de52ce8a493cfc9d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.croppedback" + } +}; +exports.IDENTITY_RESIDENCEPERMIT_FACE = { + "vdxfid": "iNVvVYKcKuredXKvctn5uQxp3kNXoJrwNb", + "indexid": "xTL2xLkhBE5KFhCxUaSEsoVM5QPYfELeHf", + "hash160result": "4dd17db50d569a63cc892d78850ac9de1d0eaed0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.face" + } +}; +exports.IDENTITY_RESIDENCEPERMIT_IDNUMBER = { + "vdxfid": "iMxygBvDFftAnmUCjVLh21etV5v4wt9zdk", + "indexid": "xSo68zMJ6z6qQwMEbAzqzQBRWjw5u6Tm63", + "hash160result": "ab544471e583d6a11245bb971e3ee1ef5ed1d3ca", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.idnumber" + } +}; +exports.IDENTITY_RESIDENCEPERMIT_CATEGORY = { + "vdxfid": "iGbMb21an69VE6iTH2iRtRFKCEUZPJHTwU", + "indexid": "xMRU3pSfdQN9rGbV8iNaromrDtVaCufAXu", + "hash160result": "ae9031bab1ee600e10aa16ec1d4c13def953e48f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.category" + } +}; +exports.IDENTITY_RESIDENCEPERMIT_EXPIRATIONDATE = { + "vdxfid": "iJ48ALemxyMV6DYzeuRMe8Fn78iMZdjSXZ", + "indexid": "xNtEd95rpHa9iPS2Wb5WcWnK8njNXD9HEH", + "hash160result": "d3083b08621d6ff5dc3f7f9cace34f944d7aec9f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.expirationdate" + } +}; +exports.IDENTITY_RESIDENCEPERMIT_ISSUINGCOUNTRY = { + "vdxfid": "i7UhTp4gruQwtkC1bi4RxE4wUAsro6n9Ym", + "indexid": "xCJovcVmiDdcWv53TPiavcbUVptsgMKzdL", + "hash160result": "75e37dc8957c8c6765c60962804d446b2de0e82b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.issuingcountry" + } +}; +exports.IDENTITY_RESIDENCEPERMIT_ISSUINGREGION = { + "vdxfid": "iERBNWk2tyaGJ2w8P1kM88Mdj5WA9qFzbv", + "indexid": "xKFHqKB7kHnvvCpAEhQW6WtAkjXAymjqXM", + "hash160result": "788165581de37b5473c2f127d387f3d7a8630778", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.issuingregion" + } +}; +exports.IDENTITY_RESIDENCEPERMIT_DATEOFBIRTH = { + "vdxfid": "iM62dN7LSHWDuetPi6qAewG6bzYwFrcqBN", + "indexid": "xRv96AYRHbitXpmRZnVKdKnddeZxAivvFE", + "hash160result": "e2533190e4822ab51c5b2029039fbb0d431131c1", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.dateofbirth" + } +}; +exports.IDENTITY_RESIDENCEPERMIT_ADDRESS = { + "vdxfid": "iCA8P2rVs5DjtzQpXEnPJcG4KBs79C9EpL", + "indexid": "xGzEqqHaiPSQXAHrNvSYGznbLqt83gLGV5", + "hash160result": "2c7264a72e1d7937da951620039e48a0c8663e5f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.address" + } +}; +exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_STREET1 = { + "vdxfid": "iMuY2CbmQpCFzodGBtqxogmTb5dYfNbCJa", + "indexid": "xSjeV12rG8QvcyWJ3aW7n5HzcjeZaxtGwr", + "hash160result": "444cbb0dc6f471ecb2261dc7d6731cd97e272dca", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.address.street1" + } +}; +exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_CITY = { + "vdxfid": "iRckJ1VkfYazfVHWJuA9iXTth83ZYp8znz", + "indexid": "xWSrkovqWrofHfAYAapJguzRin4aPEqHJK", + "hash160result": "73e22f5d24515103052ab165736a0198a7d4e0f2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.address.city" + } +}; +exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_REGION = { + "vdxfid": "iBpH337NTJSLjSxbBWuu2wBLu12k4JVGk4", + "indexid": "xGePVqYTJcf1Mcqd3Ca41Khsvf3kyxtNXH", + "hash160result": "2f7b3040cf60259ee4bf6dfc93a4de42ab4e7d5b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.address.region" + } +}; +exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_POSTCODE = { + "vdxfid": "iGKi47jtg6CumKYSUBj57drgLNGzhJY3Gj", + "indexid": "xM9pWvAyXQRaPVRUKsPE62PDN2J1Zp4d6b", + "hash160result": "db85ea63848a6ad2c3a0e82bb29e215c00c2ee8c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.address.postcode" + } +}; +exports.IDENTITY_RESIDENCEPERMIT_ADDRESS_COUNTRY = { + "vdxfid": "i8KD9CUn7Su4YT44WhbD8HYA1K425cFCqM", + "indexid": "xD9Kbzurxm7jAcw6NPFN6g4h2y531jRanx", + "hash160result": "75970ae74cd40419dc78ecef7be22c5ee09d1535", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.address.country" + } +}; +exports.IDENTITY_RESIDENTCARD = { + "vdxfid": "iKkJFFtbxRMJutjoruW47Mc1sCfdGYQrC9", + "indexid": "xQaQi4KgojZyY4cqibAD5k8Ytrge9jwt3u", + "hash160result": "2b737a5733b91d305dcf07d9e75797740da97db2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard" + } +}; +exports.IDENTITY_RESIDENTCARD_ORIGINALFRONT = { + "vdxfid": "iNMJhZ3wie5U2SRF7WSFTpjJo6B6RSTR4t", + "indexid": "xTBRAMV2ZxJ8ecJGyC6QSDFqpkC7KTFMbW", + "hash160result": "e440d2d8bab46633691a12e7bed0ea785bd90ccf", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.originalfront" + } +}; +exports.IDENTITY_RESIDENTCARD_ORIGINALBACK = { + "vdxfid": "i4pAk8J5ec2wn55VattFRr7PyN4J2L13HJ", + "indexid": "x9eHCvjAVvFcQExXSaYQQEdw125Jz84d8u", + "hash160result": "9fa70ca8b49eab8c3e704f78f0e0ae1bc52caf0e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.originalback" + } +}; +exports.IDENTITY_RESIDENTCARD_CROPPEDFRONT = { + "vdxfid": "iLnx7NDcAWtb9uWicdgSaiwco56TywMh5w", + "indexid": "xRd4aAeh1q7Fn5PkUKLbZ7U9pj7UvU8v2V", + "hash160result": "fa7347c3517552a028890dacaf889a6ead39f6bd", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.croppedfront" + } +}; +exports.IDENTITY_RESIDENTCARD_CROPPEDBACK = { + "vdxfid": "i8WjL22L4UeaCDKZuj8R4Uub6zurTPdaLv", + "indexid": "xDLqnpTQunsEpPCbmQna2sS88evsLJL51v", + "hash160result": "b5134fe72682aa4f0dc645ceb73421dc07644337", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.croppedback" + } +}; +exports.IDENTITY_RESIDENTCARD_FACE = { + "vdxfid": "i6dGShbLY2ppZnXSyfvdtdGFkCxBQd2r9Y", + "indexid": "xBTNuW2RPM3VBxQUqMans1nnmryCFH4rRD", + "hash160result": "25a41b37f64414a2477c5c0d1a139d64ce9b8f22", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.face" + } +}; +exports.IDENTITY_RESIDENTCARD_IDNUMBER = { + "vdxfid": "iKFkbwDcQRXjapZcZAXsaMXjgER9CZbwZx", + "indexid": "xQ5s4jehFjkQCzSeQrC2Yk4GhtSA2GbM4B", + "hash160result": "e30d9a01765325e02ca22f60335d4bdb499917ad", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.idnumber" + } +}; +exports.IDENTITY_RESIDENTCARD_CATEGORY = { + "vdxfid": "i46Fgc8ev9zAkjikjHWreqSXkMRpFr5Lsi", + "indexid": "x8vN9QZjmUCqNubnayB1dDy4n1SqAqg4vn", + "hash160result": "c0039a4929d081eec1d1f5ca3040e19bded3c106", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.category" + } +}; +exports.IDENTITY_RESIDENTCARD_EXPIRATIONDATE = { + "vdxfid": "iBA1oFvDABKqbu9i61AEGy1m5fFHdCWkpy", + "indexid": "xFz8G4MJ1VYWE52jwgpPFMYJ7KGJUd6Y4b", + "hash160result": "0866dd99514f509c9ad4584b3f570515f4c74054", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.expirationdate" + } +}; +exports.IDENTITY_RESIDENTCARD_ISSUINGCOUNTRY = { + "vdxfid": "iHBgD199BSEQWREtiW8dP259DX4qg6KjkM", + "indexid": "xN1nfoaE2kT58b7vaBnnMQbgFB5rWuKCtd", + "hash160result": "ef88ffb14a8b66dacc690351fa9c3d35a8036296", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.issuingcountry" + } +}; +exports.IDENTITY_RESIDENTCARD_ISSUINGREGION = { + "vdxfid": "i6jygVNjzZUFEXVgtzWxXpBYf5rwjXF92J", + "indexid": "xBa69HopqsgurhNikgB7WCi5gjsxbi12z3", + "hash160result": "dc31e031328cfe3697527e046a52cc372687d423", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.issuingregion" + } +}; +exports.IDENTITY_RESIDENTCARD_DATEOFBIRTH = { + "vdxfid": "iQfYTwmTxXzxxyFh6XbY2PQVLVwswRoJL1", + "indexid": "xVVevkCYorDdb98ixDFgzmw2N9xtnBn6M2", + "hash160result": "73e0e5f4af76255bc2a3583ad9a7b1d0241470e8", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.dateofbirth" + } +}; +exports.IDENTITY_RESIDENTCARD_ADDRESS_STREET1 = { + "vdxfid": "iJ67qMPN6tyrLXBhbJpKKBZYpkcBzZD8S4", + "indexid": "xNvEJ9pSxDCWxh4jSzUUHa65rQdCviMqur", + "hash160result": "8540d9cb71ca32f4c03caf26a4cffa4d51094da0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.address.street1" + } +}; +exports.IDENTITY_RESIDENTCARD_ADDRESS_CITY = { + "vdxfid": "iLCQ2n5tKHzKcVBv8of1eYmdWEdEY5vTUN", + "indexid": "xR2WVaWyAcCzEf4wzVKAcwJAXteFUoFSux", + "hash160result": "7990100969a22f4b4ba35613b3994219e74d6db7", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.address.city" + } +}; +exports.IDENTITY_RESIDENTCARD_ADDRESS_REGION = { + "vdxfid": "iPWcAQ6zbC9rKaaWAgrpoHmKs5G5SQCprF", + "indexid": "xULidCY5SWNWwkTY2NWymgHrtjH6QfP6JL", + "hash160result": "ff3f1523bfb1fe501ef10f0036c9f059b64bc7db", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.address.region" + } +}; +exports.IDENTITY_RESIDENTCARD_ADDRESS_POSTCODE = { + "vdxfid": "iG1QGYyp4SkiP7b9ngPwkTGC3DxVG3hB16", + "indexid": "xLqWjMQtukyP1HUBeN46iqnj4syW4eat4U", + "hash160result": "f345aa72196b006e2200bd08ed0ea165806c7889", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.address.postcode" + } +}; +exports.IDENTITY_RESIDENTCARD_ADDRESS_COUNTRY = { + "vdxfid": "i4wzngZfZb2QBnjr2TjtoMoMF9roSqQkho", + "indexid": "x9n7FUzkQuF4oxcst9Q3mkKtGospNqDjEQ", + "hash160result": "dd2a94da0a94115ed04de616b7d0ea1b19312a10", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.address.country" + } +}; +exports.IDENTITY_IDCARD = { + "vdxfid": "iK7FrcxNvsej84qZjYR73iGgEV96sGKwTU", + "indexid": "xPwNKRPTnBsPkEibbE5G26oDG9A7j4JSm7", + "hash160result": "4f2b2c852e4cfa5a640988af78c4d02243467cab", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard" + } +}; +exports.IDENTITY_IDCARD_ORIGINALFRONT = { + "vdxfid": "iCnLNq42DxhuK84Nes4UGjFFUuNsGGpuBZ", + "indexid": "xHcSqdV75GvZwHwQWYidF7mnWZPtATN7Ky", + "hash160result": "9f5f63641e6e935628d7602e92814311ea631766", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.originalfront" + } +}; +exports.IDENTITY_IDCARD_ORIGINALBACK = { + "vdxfid": "iJyfvwrUeTRiGxiYw6oJZ3uALsuBt7QTyy", + "indexid": "xPonPkHZVmeNu8bannTTXSRhNXvCpAD3MB", + "hash160result": "df3a44e11ad54673eff910c1320d9f50100b0daa", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.originalback" + } +}; +exports.IDENTITY_IDCARD_CROPPEDFRONT = { + "vdxfid": "iFDp8jWwybweGStGQnYxwhbi8eiucZ29sr", + "indexid": "xL3vbXx2pvAJtcmJGUD7v68FAJjvZmrsga", + "hash160result": "b10845ae9b29f3ed25f33f091398fd0a1536d980", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.croppedfront" + } +}; +exports.IDENTITY_IDCARD_CROPPEDBACK = { + "vdxfid": "i8GpXrygUPpQYVwcoZ7JVRB1xB46xZsMuG", + "indexid": "xD6vzfQmKi35AfpefEmTTohYyq57sdLVxr", + "hash160result": "84c05d2d84ab69db2834df22602f34445ae9a134", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.croppedback" + } +}; +exports.IDENTITY_IDCARD_FACE = { + "vdxfid": "i8sfiwALhk4FtSaWSnBWYwKnWN3G7m3jyU", + "indexid": "xDhnBjbRZ4GvWcTYJTqfXKrKY24GxBC5cg", + "hash160result": "4afc5fda25a15a4627b8426f40594ff2e11d393b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.face" + } +}; +exports.IDENTITY_IDCARD_IDNUMBER = { + "vdxfid": "iBEJB1xD1mpR4kYQbYieW3hNFpe5QmQ6qA", + "indexid": "xG4QdpPHs635gvRSTENoUSDuHUf6JB2izs", + "hash160result": "0af18c033e6ad395bdfb5fbdbf5144d63c1d1055", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.idnumber" + } +}; +exports.IDENTITY_IDCARD_CATEGORY = { + "vdxfid": "i4HCpvV1NJd4Ka8atCtDkXs4XLAkrmtKib", + "indexid": "x97KHiv6Dcqiwk1cjtYNivPbYzBmg48ama", + "hash160result": "68b49fa5bf2ed00672c881c15167fee2c304d408", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.category" + } +}; +exports.IDENTITY_IDCARD_EXPIRATIONDATE = { + "vdxfid": "iNTbsfTmeAm7KUFehtCq3RH1JgbUdTJwCt", + "indexid": "xTHiLTtrVUymwe8gZZrz1ooYLLcVZC5A4n", + "hash160result": "f4b807e32848d5a40815e2aa19cb219c64ae3dd0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.expirationdate" + } +}; +exports.IDENTITY_IDCARD_ISSUINGCOUNTRY = { + "vdxfid": "iJ5qVRWTHerkVreE9UrSfKyphD3XB9s8FA", + "indexid": "xNuwxDwY8y5R82XG1AWbdiWMis4Y3BXDg7", + "hash160result": "2cc5492966de5135e638de253b497cccb8643fa0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.issuingcountry" + } +}; +exports.IDENTITY_IDCARD_ISSUINGREGION = { + "vdxfid": "i8dHTbZ62Bth8NwkxasnKFpvX4EZYuBun4", + "indexid": "xDTPvPzAsW7MkYpnpGXwHeMTYiFaMyp6FD", + "hash160result": "f42f7b71bb43c590b9063755754bf2d534b58038", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.issuingregion" + } +}; +exports.IDENTITY_IDCARD_DATEOFBIRTH = { + "vdxfid": "iGcwhC6znG63pb6jqsRnrtDjXV4aXXsub2", + "indexid": "xMT49zY5daJiSkymhZ5wqGkGZ95bMGYJ9r", + "hash160result": "4d0c72c3369a0ac64711e58ae1b10785f1363190", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.dateofbirth" + } +}; +exports.IDENTITY_IDCARD_ADDRESS_STREET1 = { + "vdxfid": "i6jMXjNE9qioZ2dFricFnEBEQEWK5Kg3PS", + "indexid": "xBZTzXoK19wUBCWHiQGQkchmRtXKugcKWw", + "hash160result": "2cee0d13a2fdeaac83d052ad27610da8bf59b623", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.address.street1" + } +}; +exports.IDENTITY_IDCARD_ADDRESS_CITY = { + "vdxfid": "i3viAeqayk3KDk5tQpYcz6gFs1ayW5vBma", + "indexid": "x8kpdTGfq4FyquxvGWCmxVCntfbzM8iAVb", + "hash160result": "a10bfcd1cfd12d466a276339072d2f2a7ec6f304", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.address.city" + } +}; +exports.IDENTITY_IDCARD_ADDRESS_REGION = { + "vdxfid": "iEHvf3XCFacMihTQPVXxNeo6hBCqggDFie", + "indexid": "xK837qxH6tq2LsLSFBC7M3KdiqDrYBNMK7", + "hash160result": "55af249b3ceb591709c693017e5b7b1cb131a876", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.address.region" + } +}; +exports.IDENTITY_IDCARD_ADDRESS_POSTCODE = { + "vdxfid": "i3yAnt6zdceYxbCBnLwxn2tNdM4BnPkzhT", + "indexid": "x8oHFgY5UvsDam5De2c7kRQuf15ChzdWFA", + "hash160result": "acd086baf0863cff86fc56ec0fbb16dd18d56a05", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.address.postcode" + } +}; +exports.IDENTITY_IDCARD_ADDRESS_COUNTRY = { + "vdxfid": "iA6KVD2C4QJAyKfCS3XfQV8AxmpR9R3XG5", + "indexid": "xEvRx1TGuiWqbVYEHjBpNsehzRqS2fp4qg", + "hash160result": "bab14b514d91d7daa39175c90e29a956dec19548", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.address.country" + } +}; +exports.IDENTITY_VISA = { + "vdxfid": "iDCwZf84AhbJkm4zKZP7Le8h8ukJS9FySA", + "indexid": "xJ342TZ921oyNvx2BF3GK2fEAZmKGeUQUd", + "hash160result": "57faa6b546ac92c71022178b8c5e9fbae9bebe6a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa" + } +}; +exports.IDENTITY_VISA_ORIGINALFRONT = { + "vdxfid": "iGAgzyLDVs5vYFLRgXVnkQpDRKy9Zh1TiV", + "indexid": "xLzoTmmJMBJbARDTYD9wioLkSyzARsVQWr", + "hash160result": "755da3361216260b786ba78fbe68800557223a8b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.originalfront" + } +}; +exports.IDENTITY_VISA_ORIGINALBACK = { + "vdxfid": "i3becgcmf85RiY2PAxsp3fbuGKG8Qc73t1", + "indexid": "x8Rm5V3rWSJ6LhuR2eXy248SHyH9Jjue4S", + "hash160result": "e71909c77e2e0361764d22b81f4f53085fe85801", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.originalback" + } +}; +exports.IDENTITY_VISA_CROPPEDFRONT = { + "vdxfid": "iAapfFQMAQy7USdjRwqzAZ2nWhRMSiQMmV", + "indexid": "xFQw83qS1jBn6cWmHdW98wZKYMSNHsb2wy", + "hash160result": "56ed30f8daf83e3b09eee57517be45b6b8c1f94d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.croppedfront" + } +}; +exports.IDENTITY_VISA_CROPPEDBACK = { + "vdxfid": "i3quMdmv3vAQDBA6nzM8fTiFtqJrw7tcnf", + "indexid": "x8g1pSCzuEP4qM38eg1HdrEnvVKsoXBZ7R", + "hash160result": "1d8106821498549cebc0af6f8d120b9933090b04", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.croppedback" + } +}; +exports.IDENTITY_VISA_FACE = { + "vdxfid": "iAqxnB58655ZcRLAUm2Utib2rguRXT9wZM", + "indexid": "xFg5EyWCwPJEEbDCLSgds77ZtLvSRpw2k9", + "hash160result": "59564e826c8342a2b721708f6a83c9761dc6d650", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.face" + } +}; +exports.IDENTITY_VISA_IDNUMBER = { + "vdxfid": "iQ5LfUtuggDyqbePUB9iWLgxYj7tvDm2VE", + "indexid": "xUuT8HKzXzSeTmXRKrosUjDVaP8upm7rqg", + "hash160result": "77ae761bf6bf7922ff8e47b53bd88107be15f8e1", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.idnumber" + } +}; +exports.IDENTITY_VISA_CATEGORY = { + "vdxfid": "iH4nhrNsZKK6bEkgLDu17fBPR5dnVgitiQ", + "indexid": "xMtuAeoxQdXmDQdiBuZA63hvSjeoT3wsnv", + "hash160result": "8052162609b4da20bb5932ead5b6deedbb861495", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.category" + } +}; +exports.IDENTITY_VISA_EXPIRATIONDATE = { + "vdxfid": "iNW2k7p7hVK2GCc7m1k4mihqh8jd94Dmnh", + "indexid": "xTL9CvFCYoXgtNV9chQDk7ENinkdzPUodD", + "hash160result": "5eaa0aef6ed6d27ee4909bc6ce8619c60346b3d0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.expirationdate" + } +}; +exports.IDENTITY_VISA_ISSUINGCOUNTRY = { + "vdxfid": "i5vDfPKMfCRPXVRhfumjWPEvBFhNMVjtGK", + "indexid": "xAkL8BkSWWe49fJjXbRtUmmTCuiPJGBZ2c", + "hash160result": "ebf49255193b4ffbb3a0487106a4df98833bcc1a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.issuingcountry" + } +}; +exports.IDENTITY_VISA_ISSUINGREGION = { + "vdxfid": "iPRc9Ns6LadQNYU7DqSNyx7LW8W9dPKDjC", + "indexid": "xUFicBJBBtr4ziM95X6XxLdsXnXAYQ1XFN", + "hash160result": "a1217c6e44b1f47faf9d59378206009d8433d5da", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.issuingregion" + } +}; +exports.IDENTITY_VISA_DATEOFBIRTH = { + "vdxfid": "i55bTsxLkCTmE6VvppvG8doYnmxuHhec65", + "indexid": "x9uhvgPRbWgRrGNxgWaR72L5pRyvA4vVWm", + "hash160result": "ed824bbfd195e63d6d5151a07eda49eba60c9a11", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.dateofbirth" + } +}; +exports.IDENTITY_VISA_ADDRESS_STREET1 = { + "vdxfid": "iMzWxFVzJHbQm5YWv9c1eujvrUrPHAGVAc", + "indexid": "xSpdR3w59bp5PFRYmqGAdJGTt8sQ8o4mpu", + "hash160result": "05992eb838a4f562b6b7e0ff84bb05cdac571ecb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.address.street1" + } +}; +exports.IDENTITY_VISA_ADDRESS_CITY = { + "vdxfid": "i8YXgZ7doRhidT5phX6qyRnttV6hZiyWTm", + "indexid": "xDNe9MYiejvPFcxrZCkzwpKRv97iS3TQjA", + "hash160result": "04959daab853c797bbbcb9c5ead7376e4a809a37", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.address.city" + } +}; +exports.IDENTITY_VISA_ADDRESS_REGION = { + "vdxfid": "i6YkTDEi1M1mzuTyzww8hNoksJFpev17Fu", + "indexid": "xBNrv1fnrfESd5M1rdbHfmLHtxGqUoeALR", + "hash160result": "3a47a53e8717444b5d31e8618049daa8cde8b421", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.address.region" + } +}; +exports.IDENTITY_VISA_ADDRESS_POSTCODE = { + "vdxfid": "iBJDLHSLB4cHvaeXazFp25Be3V9yRWmcoK", + "indexid": "xG8Ko5sR2NpxYkXZSfuxzTiB59AzMUATiw", + "hash160result": "dd0d87e3163157402aa16d2017a3ea06d6bccd55", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.address.postcode" + } +}; +exports.IDENTITY_VISA_ADDRESS_COUNTRY = { + "vdxfid": "iQ9Z1PZMMp49rtDuGQSjfEZn3xACfxLAYa", + "indexid": "xUyfUBzSD8GpV46w866tdd6K5cBDbMPuNo", + "hash160result": "c45655a6924c0b377e9182869dc780df690dc4e2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.address.country" + } +}; +exports.IDENTITY_PERSONALDETAILS = { + "vdxfid": "i8SSgM1z7XVoCtoP9CCsMms3zCndaNjtCe", + "indexid": "xDGZ99T4xqiTq4gQzss2LAPb1roeUyLwkU", + "hash160result": "a8fbe89451c1d0a77b336ccf6b0fb7601dd47336", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.personaldetails" + } +}; +exports.IDENTITY_CONTACTDETAILS = { + "vdxfid": "iRLT8V9NN178CvZQusJSHuyuFC2fD2QmE3", + "indexid": "xWAZbHaTDKKnq6SSmYxbGJWSGr3g1GRDYH", + "hash160result": "b9185ad980909708754a484bf11edc9febd8cbef", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.contactdetails" + } +}; +exports.IDENTITY_LOCATION = { + "vdxfid": "iGmiLZ7J6GjxjZ4rkSMsDzyyvWtmMBjnbo", + "indexid": "xMbpoMYNwaxdMiwtc822CPWWxAunLDE1BS", + "hash160result": "15ea60d9ddde976095b0c79ceecef7b034cfd991", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.location" + } +}; +exports.IDENTITY_BANKINGDETAILS = { + "vdxfid": "i8DUrZJJRjNQMJNeJ3Ti6pbpKPJ55LECyJ", + "indexid": "xD3bKMjPH3b4yUFg9j7s5D8MM3K612HEir", + "hash160result": "a7e5de6ac208f110d0509cffeb916b8dd03c0034", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails" + } +}; +exports.IDENTITY_DOCUMENTS = { + "vdxfid": "iCm3ERZoUw2ze1P11QyRUtvhKYovCWFXbT", + "indexid": "xHb9hDztLFFfGBG2s6daTHTEMCpw3tcbVJ", + "hash160result": "ee9f8d5ba7366983cf9b9d3e5e8ac50898a9d865", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.documents" + } +}; +exports.IDENTITY_BANKACCOUNT = { + "vdxfid": "iN4AgB4KEN1C3TfZnYDFUhxn37PdcrZvxT", + "indexid": "xStH8yVQ5gDrfdYbeDsQT6VK4mQeYDjcFm", + "hash160result": "122bf0739d7d1def003656a63c443efb6c14cfcb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankaccount" + } +}; +exports.IDENTITY_BANKINGDETAILS_CURRENCY = { + "vdxfid": "i5k8pb9FHf5VZJKki6him1WMBkpyhe56BY", + "indexid": "xAaFHPaL8yJABUCnZnMsjQ2tDQqzfUkZRm", + "hash160result": "cc655f9f104ad6c25cc65407121fa7ac1208e418", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.currency" + } +}; +exports.IDENTITY_BANKINGDETAILS_COUNTRY = { + "vdxfid": "iHYqZF4Asa4erZR9kJ5G5nWRNGWdiS8vBh", + "indexid": "xNNx23VFitHKUjJBbyjR4B2xPvXebL5g4h", + "hash160result": "cf7870c11608bf6e58890fbfc18ffe0db98d629a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.country" + } +}; +exports.IDENTITY_BANKINGDETAILS_STREET1 = { + "vdxfid": "iRhANjQk2G3aFXiaGtG68kZjdYr2iVXQJJ", + "indexid": "xWXGqXqpsaGEshbc8ZvF796GfCs3bDhrgC", + "hash160result": "bd420c73e6bba2e48542cddf188c23b8c098b6f3", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.street1" + } +}; +exports.IDENTITY_BANKINGDETAILS_STREET2 = { + "vdxfid": "iFWtcLUKAECLrREJr6mxtHM9xPUocxmTSY", + "indexid": "xLM158uQ1YR1Ub7LhnS7rfsgz3VpTpBcCu", + "hash160result": "7f1a53da2e265bab3230d9eec1ed0f36d7041484", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.street2" + } +}; +exports.IDENTITY_BANKINGDETAILS_CITY = { + "vdxfid": "iQxBEB8sXNez25HJCzvnTWtWqXUkEVAuo8", + "indexid": "xVnHgyZxNgseeFAL4gawRuR3sBVm7nyQqt", + "hash160result": "5878bb5b9371344acb1b679316e0e087046c95eb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.city" + } +}; +exports.IDENTITY_BANKINGDETAILS_REGION = { + "vdxfid": "i4HJ5yrzBFEwjiYgzptMcrBsCeBjPYQJFX", + "indexid": "x97QYnJ52ZTcMtRirWYWbEiQEJCkKnxArM", + "hash160result": "7bf3a5ee05846c54bd19032e6ee9069cbc68d808", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.region" + } +}; +exports.IDENTITY_BANKINGDETAILS_POSTALCODE = { + "vdxfid": "iFVaE922Bzrro6rb87d9En2t2AAGx7EivG", + "indexid": "xLKggwT73K5XRGjcyoHJDAZR3pBHqz4Utt", + "hash160result": "ebd93a0f4fb8db6fb0cb8d397c45b41a0142d483", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.postalcode" + } +}; +exports.IDENTITY_BANKINGDETAILS_TAXNUMBER = { + "vdxfid": "i6Gbi3EkYrbREumkLmHUedbzrisXkRzwKY", + "indexid": "xB6iAqfqQAp5s5enCSwdd28XtNtYcHgrDb", + "hash160result": "bcc691f5d53f99e196b291ea2a00a9805ff4a61e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.taxnumber" + } +}; +exports.IDENTITY_BANKINGDETAILS_TAXCOUNTRY = { + "vdxfid": "iMJzAfPjqvWJdYyoWTX79cSjd51HbVc7wC", + "indexid": "xS96dTpphEiyFirqN9BG7zyGej2JTACDB1", + "hash160result": "e19f920e684c7d906dd8c85d72a5d5f0cd6ba4c3", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.taxcountry" + } +}; +exports.IDENTITY_BANKINGDETAILS_FIRSTNAME = { + "vdxfid": "iGAomW7jtsy7zRaoMFU48KvrHahHwdjzi7", + "indexid": "xLzvEJYpkCBncbTqCw8D6iTPKEiJpW3beK", + "hash160result": "d33bd09ba3184bf0e3fa00ad62e92a7a99c83f8b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.firstname" + } +}; +exports.IDENTITY_BANKINGDETAILS_LASTNAME = { + "vdxfid": "iMrvbLJnZawGsdFshtrHM3QKa4pDPbRk3L", + "indexid": "xSh348jsQu9wVo8uZaWSKRvrbiqED1eny3", + "hash160result": "4a0d68f2cafc3cbe827a91fd5038c65878bfaec9", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.lastname" + } +}; +exports.IDENTITY_BANKINGDETAILS_PHONENUMBER = { + "vdxfid": "i9jKPi8ubg5fx3BBmZdiyobJxNgzcmV9et", + "indexid": "xEZRrWZzSzJLaD4DdFHsxC7qz2i1YejHqk", + "hash160result": "b092c8f73031298d26b919f4b398fa9b66f19c44", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.phonenumber" + } +}; +exports.IDENTITY_BANKINGDETAILS_NUMBER = { + "vdxfid": "iKGaF7fZ6yAvwJyxcmpuas2Hn9PZPF99yf", + "indexid": "xQ6ghv6dxHPbZUrzUTV4ZFYpooQaFZG1aa", + "hash160result": "fcceea7c24223218bc9313e8176daea6155e3fad", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.number" + } +}; +exports.IDENTITY_BANKINGDETAILS_TYPE = { + "vdxfid": "iNkzXo7BBcUvCBH8somKyFtAFsR3mmmYuG", + "indexid": "xTb6zbYG2vhapMAAjVRUweQhHXS4csH9eB", + "hash160result": "26dcd354b4b2bd8b939af29fc5ea57a082aa87d3", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.type" + } +}; +exports.IDENTITY_BANKINGDETAILS_SORTCODE = { + "vdxfid": "i8v2y1beTivG8Nyi6Td3VFTc2ExFQJT8pC", + "indexid": "xDk9Rp2jK38vkYrjx9HCTdz93tyGLCaa3E", + "hash160result": "27df54160c8a8a962dd455004c8afac060aeab3b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.sortcode" + } +}; +exports.IDENTITY_DOCUMENTS_PASSPORT = { + "vdxfid": "iJHkDyp8dPnNdrh7P9fzow4gTshpbznkSK", + "indexid": "xP7rgnFDUi13G2a9EqL9nKbDVXiqVHVtyg", + "hash160result": "456f1956c77f7ff59d98dd57030d7ed22afd7fa2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.documents.passport" + } +}; +exports.IDENTITY_RESIDENCECARD = { + "vdxfid": "iQerHJHjqVT32hU1ZUyVYKQEkavs4xFtHo", + "indexid": "xVUxk6ipgofhesM3RAdeWhvmnEwsywApa2", + "hash160result": "0b2227f2bb574fe3cbcc683eecfc4d3bff884ee8", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencecard" + } +}; +exports.IDENTITY_ATTESTOR = { + "vdxfid": "iFNc5DG22Btm69wBDDXatvSPLxzJq53QBa", + "indexid": "xLCiY1h6sW7RiKpD4uBjsJxvNd1Kiej8tW", + "hash160result": "e5d18dab811f87643c1e7a63627172331be38282", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.attestor" + } +}; +exports.IDENTITY_ATTESTATION_RECIPIENT = { + "vdxfid": "iAkd3VBhYQ3MK6PUCtfhXrLVNbqSghxxpn", + "indexid": "xFajWHcnPiG1wGGW4aKrWEs2QFrTbwP7wd", + "hash160result": "71b7cbbfc8be868f6d9f6c481c420b002438d44f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.attestation.recipient" + } +}; diff --git a/dist/vdxf/vdxfdatakeys.d.ts b/dist/vdxf/vdxfdatakeys.d.ts new file mode 100644 index 0000000..2103be3 --- /dev/null +++ b/dist/vdxf/vdxfdatakeys.d.ts @@ -0,0 +1,69 @@ +import { VDXFKeyInterface } from "./keys"; +export declare const DataByteKeyName = "vrsc::data.type.byte"; +export declare const DataByteKey: VDXFKeyInterface; +export declare const DataInt16KeyName = "vrsc::data.type.int16"; +export declare const DataInt16Key: VDXFKeyInterface; +export declare const DataUint16KeyName = "vrsc::data.type.uint16"; +export declare const DataUint16Key: VDXFKeyInterface; +export declare const DataInt32KeyName = "vrsc::data.type.int32"; +export declare const DataInt32Key: VDXFKeyInterface; +export declare const DataUint32KeyName = "vrsc::data.type.uint32"; +export declare const DataUint32Key: VDXFKeyInterface; +export declare const DataInt64KeyName = "vrsc::data.type.int64"; +export declare const DataInt64Key: VDXFKeyInterface; +export declare const DataUint64KeyName = "vrsc::data.type.uint64"; +export declare const DataUint64Key: VDXFKeyInterface; +export declare const DataUint160KeyName = "vrsc::data.type.uint160"; +export declare const DataUint160Key: VDXFKeyInterface; +export declare const DataUint256KeyName = "vrsc::data.type.uint256"; +export declare const DataUint256Key: VDXFKeyInterface; +export declare const DataStringKeyName = "vrsc::data.type.string"; +export declare const DataStringKey: VDXFKeyInterface; +export declare const DataVectorKeyName = "vrsc::data.type.vector"; +export declare const DataVectorKey: VDXFKeyInterface; +export declare const DataByteVectorKeyName = "vrsc::data.type.bytevector"; +export declare const DataByteVectorKey: VDXFKeyInterface; +export declare const DataInt32VectorKeyName = "vrsc::data.type.int32vector"; +export declare const DataInt32VectorKey: VDXFKeyInterface; +export declare const DataInt64VectorKeyName = "vrsc::data.type.int64vector"; +export declare const DataInt64VectorKey: VDXFKeyInterface; +export declare const DataCurrencyMapKeyName = "vrsc::data.type.object.currencymap"; +export declare const DataCurrencyMapKey: VDXFKeyInterface; +export declare const DataRatingsKeyName = "vrsc::data.type.object.ratings"; +export declare const DataRatingsKey: VDXFKeyInterface; +export declare const DataURLKeyName = "vrsc::data.type.object.url"; +export declare const DataURLKey: VDXFKeyInterface; +export declare const DataTransferDestinationKeyName = "vrsc::data.type.object.transferdestination"; +export declare const DataTransferDestinationKey: VDXFKeyInterface; +export declare const UTXORefKeyName = "vrsc::data.type.object.utxoref"; +export declare const UTXORefKey: VDXFKeyInterface; +export declare const CrossChainDataRefKeyName = "vrsc::data.type.object.crosschaindataref"; +export declare const CrossChainDataRefKey: VDXFKeyInterface; +export declare const EncryptionDescriptorKeyName = "vrsc::data.type.encryptiondescriptor"; +export declare const EncryptionDescriptorKey: VDXFKeyInterface; +export declare const SaltedDataKeyName = "vrsc::data.type.salteddata"; +export declare const SaltedDataKey: VDXFKeyInterface; +export declare const DataDescriptorKeyName = "vrsc::data.type.object.datadescriptor"; +export declare const DataDescriptorKey: VDXFKeyInterface; +export declare const SignatureDataKeyName = "vrsc::data.signaturedata"; +export declare const SignatureDataKey: VDXFKeyInterface; +export declare const VectorUint256KeyName = "vrsc::data.mmrhashes"; +export declare const VectorUint256Key: VDXFKeyInterface; +export declare const MMRLinksKeyName = "vrsc::data.mmrlinks"; +export declare const MMRLinksKey: VDXFKeyInterface; +export declare const MMRDescriptorKeyName = "vrsc::data.mmrdescriptor"; +export declare const MMRDescriptorKey: VDXFKeyInterface; +export declare const TypeDefinitionKeyName = "vrsc::data.type.typedefinition"; +export declare const TypeDefinitionKey: VDXFKeyInterface; +export declare const MultiMapKeyName = "vrsc::identity.multimapkey"; +export declare const MultiMapKey: VDXFKeyInterface; +export declare const ContentMultiMapRemoveKeyName = "vrsc::identity.multimapremove"; +export declare const ContentMultiMapRemoveKey: VDXFKeyInterface; +export declare const ProfileMediaKeyName = "vrsc::identity.profile.media"; +export declare const ProfileMediaKey: VDXFKeyInterface; +export declare const ZMemoMessageKeyName = "vrsc::system.zmemo.message"; +export declare const ZMemoMessageKey: VDXFKeyInterface; +export declare const ZMemoSignatureKeyName = "vrsc::system.zmemo.signature"; +export declare const ZMemoSignatureKey: VDXFKeyInterface; +export declare const CurrencyStartNotarizationKeyName = "vrsc::system.currency.startnotarization"; +export declare const CurrencyStartNotarizationKey: VDXFKeyInterface; diff --git a/dist/vdxf/vdxfdatakeys.js b/dist/vdxf/vdxfdatakeys.js new file mode 100644 index 0000000..d70e41f --- /dev/null +++ b/dist/vdxf/vdxfdatakeys.js @@ -0,0 +1,347 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.VectorUint256Key = exports.VectorUint256KeyName = exports.SignatureDataKey = exports.SignatureDataKeyName = exports.DataDescriptorKey = exports.DataDescriptorKeyName = exports.SaltedDataKey = exports.SaltedDataKeyName = exports.EncryptionDescriptorKey = exports.EncryptionDescriptorKeyName = exports.CrossChainDataRefKey = exports.CrossChainDataRefKeyName = exports.UTXORefKey = exports.UTXORefKeyName = exports.DataTransferDestinationKey = exports.DataTransferDestinationKeyName = exports.DataURLKey = exports.DataURLKeyName = exports.DataRatingsKey = exports.DataRatingsKeyName = exports.DataCurrencyMapKey = exports.DataCurrencyMapKeyName = exports.DataInt64VectorKey = exports.DataInt64VectorKeyName = exports.DataInt32VectorKey = exports.DataInt32VectorKeyName = exports.DataByteVectorKey = exports.DataByteVectorKeyName = exports.DataVectorKey = exports.DataVectorKeyName = exports.DataStringKey = exports.DataStringKeyName = exports.DataUint256Key = exports.DataUint256KeyName = exports.DataUint160Key = exports.DataUint160KeyName = exports.DataUint64Key = exports.DataUint64KeyName = exports.DataInt64Key = exports.DataInt64KeyName = exports.DataUint32Key = exports.DataUint32KeyName = exports.DataInt32Key = exports.DataInt32KeyName = exports.DataUint16Key = exports.DataUint16KeyName = exports.DataInt16Key = exports.DataInt16KeyName = exports.DataByteKey = exports.DataByteKeyName = void 0; +exports.CurrencyStartNotarizationKey = exports.CurrencyStartNotarizationKeyName = exports.ZMemoSignatureKey = exports.ZMemoSignatureKeyName = exports.ZMemoMessageKey = exports.ZMemoMessageKeyName = exports.ProfileMediaKey = exports.ProfileMediaKeyName = exports.ContentMultiMapRemoveKey = exports.ContentMultiMapRemoveKeyName = exports.MultiMapKey = exports.MultiMapKeyName = exports.TypeDefinitionKey = exports.TypeDefinitionKeyName = exports.MMRDescriptorKey = exports.MMRDescriptorKeyName = exports.MMRLinksKey = exports.MMRLinksKeyName = void 0; +exports.DataByteKeyName = "vrsc::data.type.byte"; +exports.DataByteKey = { + "vdxfid": "iBXUHbh4iacbeZnzDRxishvBSrYk2S2k7t", + "indexid": "xGMakQ89ZtqGGjg257csr6SiUWZksGmjWp", + "hash160result": "2e97a8bba443773812341e1d761530d3bba04f58", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.byte" + } +}; +exports.DataInt16KeyName = "vrsc::data.type.int16"; +exports.DataInt16Key = { + "vdxfid": "iDtTv3wf1Vk3M2Y46RjLPKtttx5hydwtY1", + "indexid": "xJiaNrNjroxhyCR5x7PVMiRRvc6ipg6N9g", + "hash160result": "ee334ebd432db0b24cc2702eda61c28ff44d3872", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int16" + } +}; +exports.DataUint16KeyName = "vrsc::data.type.uint16"; +exports.DataUint16Key = { + "vdxfid": "iHn7urT2yVfS7pQn6WGAmCVWh4HBLV24n3", + "indexid": "xNcENet7pot6jzHoxBvKjb23iiJCGpekDk", + "hash160result": "5cfc322d2a216145f7b82714115e7953269de59c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint16" + } +}; +exports.DataInt32KeyName = "vrsc::data.type.int32"; +exports.DataInt32Key = { + "vdxfid": "iHpLPprRDv3H5H3ZMaJ9nyHFzkG9xJWZDb", + "indexid": "xNeSrdHW5EFwhSvbDFxJmMoo2QHAtoEaEM", + "hash160result": "3e9ba478b23b13232f28d21051d907ce8fdd509d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int32" + } +}; +exports.DataUint32KeyName = "vrsc::data.type.uint32"; +exports.DataUint32Key = { + "vdxfid": "iKSj5zhd6cSsLudaGhtfmisRNgEM7SPFWY", + "indexid": "xQGqYo8hwvfXy5Wc8PYpk7PxQLFMwfP7Fp", + "hash160result": "f279818aeb4fe768956b350d1fc7216ca0e82aaf", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint32" + } +}; +exports.DataInt64KeyName = "vrsc::data.type.int64"; +exports.DataInt64Key = { + "vdxfid": "iKB3TGi9Dg5HZ4nQAgLQAgp3tuXBaRKHpC", + "indexid": "xQ19v59E4zHxBEfS2MzZ95LavZYCTTeuyg", + "hash160result": "ab3705f8a7fae59786ef897b014df85fcd9533ac", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int64" + } +}; +exports.DataUint64KeyName = "vrsc::data.type.uint64"; +exports.DataUint64Key = { + "vdxfid": "iPamkQf38AeGQ8z4zSsZL7t9kXMeUkYLJL", + "indexid": "xUQtDD67yUrw2Js6r8XiJWQgnBNfNeeoUq", + "hash160result": "bb2ae9ed3e9f400def0724937fbf65f23ef690dc", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint64" + } +}; +exports.DataUint160KeyName = "vrsc::data.type.uint160"; +exports.DataUint160Key = { + "vdxfid": "iAAwdbLyKYL39nJ1eQHaHtb75krg4mV1Lq", + "indexid": "xF146Pn4ArYhmxB3W5wjGH7e7Qsgx9bkpj", + "hash160result": "d97d2295d4c73f6f6f0697c8086bd822d6977549", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint160" + } +}; +exports.DataUint256KeyName = "vrsc::data.type.uint256"; +exports.DataUint256Key = { + "vdxfid": "i8k7g7z6grtGYrNZmZr5TQ872aHssXuuua", + "indexid": "xDaE8vRBYB6wB2FbdFWERnee4EJtjbCtMM", + "hash160result": "939b27bea698d180237c40b2194025acc673cb39", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint256" + } +}; +exports.DataStringKeyName = "vrsc::data.type.string"; +exports.DataStringKey = { + "vdxfid": "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c", + "indexid": "xPwgY6oPdusaAgNK3u5yHCQG5NsHEcBpi5", + "hash160result": "e5c061641228a399169211e666de18448b7b8bab", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.string" + } +}; +// this is a key for a typed vector, which will have the object type key following the vector key +exports.DataVectorKeyName = "vrsc::data.type.vector"; +exports.DataVectorKey = { + "vdxfid": "iAEShwk1xjdGhaUSz3Maa2XR32o3vRuHq7", + "indexid": "xF4ZAkB6p3qwKkMUqj1jYR3x4gp4mGz657", + "hash160result": "503875b0dc301189a98927d3ece56c5f921c1f4a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.vector" + } +}; +exports.DataByteVectorKeyName = "vrsc::data.type.bytevector"; +exports.DataByteVectorKey = { + "vdxfid": "iKMhRLX1JHQihVZx2t2pAWW2uzmK6AzwW3", + "indexid": "xQBot8x69bdPKfSytZgy8u2ZwenKzVjR4X", + "hash160result": "cc3ae6466006629f5105f71325bb2a19107037ae", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.bytevector" + } +}; +exports.DataInt32VectorKeyName = "vrsc::data.type.int32vector"; +exports.DataInt32VectorKey = { + "vdxfid": "iJZt2fcUv1iivbfC3tuPuefabcTppQEoVq", + "indexid": "xPPzVU3ZmKwPYmYDuaZYt3C7dGUqk939N7", + "hash160result": "c0847f3025c408059b5a8f6a9e414a8ed8288da5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int32vector" + } +}; +exports.DataInt64VectorKeyName = "vrsc::data.type.int64vector"; +exports.DataInt64VectorKey = { + "vdxfid": "i4qtYkFS9iNyu2AkqwoSn1xyCdfH9PUvak", + "indexid": "x9g11YgX12beXC3nhdTbkQVWEHgJ2jqfz1", + "hash160result": "c6219ea13884987453692cb14c72d5f6a47c020f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int64vector" + } +}; +exports.DataCurrencyMapKeyName = "vrsc::data.type.object.currencymap"; +exports.DataCurrencyMapKey = { + "vdxfid": "iMrGhzkZq5fpWWSa1RambRySFPb7CuvKuX", + "indexid": "xSgPAoBegPtV8gKbs7EvZpVyH3c858ZUvL", + "hash160result": "25db70c2fcae2571f89201181bec04587e1f8fc9", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.currencymap" + } +}; +exports.DataRatingsKeyName = "vrsc::data.type.object.ratings"; +exports.DataRatingsKey = { + "vdxfid": "iHJComZUXXGniLkDhjYprWYEN8qvQGDoam", + "indexid": "xN8KGZzZNqVTLWdFZRCypu4mPnrwHFKbCK", + "hash160result": "32cad57ff1dc5db4b5ba573ce01bc9c89b0d9e97", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.ratings" + } +}; +exports.DataURLKeyName = "vrsc::data.type.object.url"; +exports.DataURLKey = { + "vdxfid": "iJ7xdhJTJAvJubNnSJFXyA3jujzqGxjLuZ", + "indexid": "xNx56VjY9V8yXmFpHyugwYaGwQ1rCt6J9W", + "hash160result": "7748bfaf53dd2ff63ed5f73a41174c360f30a6a0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.url" + } +}; +exports.DataTransferDestinationKeyName = "vrsc::data.type.object.transferdestination"; +exports.DataTransferDestinationKey = { + "vdxfid": "i91L6zwZQrkbNVMB1AZ1Z671qybexRmeVK", + "indexid": "xDqSZoNeGAyFzfECrrDAXUdYsdcfs3Zuku", + "hash160result": "92f38773849383146037b16a48ea350c1c11ac3c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.transferdestination" + } +}; +exports.UTXORefKeyName = "vrsc::data.type.object.utxoref"; +exports.UTXORefKey = { + "vdxfid": "iNcKvh7mazaXptzHf85q6EtpFYFE7asKC1", + "indexid": "xTSSPVYrSJoCT4sKWojz4dRMHCGF3h9tM4", + "hash160result": "013e760f7451c289672993ea391ae643c21ce4d1", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.utxoref" + } +}; +exports.CrossChainDataRefKeyName = "vrsc::data.type.object.crosschaindataref"; +exports.CrossChainDataRefKey = { + "vdxfid": "iP3euVSzNcXUrLNHnQnR9G6q8jeYuGSxgw", + "indexid": "xTsmNHt5Dvk9UWFKe6Sa7edNAPfZmJVgLc", + "hash160result": "4d33e0aee0f648c7871b2661d1221b57c05aaed6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.crosschaindataref" + } +}; +exports.EncryptionDescriptorKeyName = "vrsc::data.type.encryptiondescriptor"; +exports.EncryptionDescriptorKey = { + "vdxfid": "iHEEK8ipj58BeKZNWuaaR2tDR5RK2kmf9A", + "indexid": "xN4Lmw9uaPLrGVSQNbEjPRQkSjSKxsHUQu", + "hash160result": "8d021acc1b68335bd7d37b28ff773c138ea5dd96", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.encryptiondescriptor" + } +}; +exports.SaltedDataKeyName = "vrsc::data.type.salteddata"; +exports.SaltedDataKey = { + "vdxfid": "i92U1nLuLJkC44FZZ4Lq9zk4qW3HrWAWNo", + "indexid": "xDraUamzBcxrgE8bQjzz8PGbsA4JiFskTD", + "hash160result": "9e13510e01d0d03a7bc90d7a2ef32824f515e33c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.salteddata" + } +}; +exports.DataDescriptorKeyName = "vrsc::data.type.object.datadescriptor"; +exports.DataDescriptorKey = { + "vdxfid": "i4GC1YGEVD21afWudGoFJVdnfjJ5XWnCQv", + "indexid": "x96JULhKLXEgCqPwUxTQGtAKhPK6Qh1iaW", + "hash160result": "4d4f12424ded2033a526a4e2a8835fc5b2eba208", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.datadescriptor" + } +}; +exports.SignatureDataKeyName = "vrsc::data.signaturedata"; +exports.SignatureDataKey = { + "vdxfid": "i7PcVF9wwPtQ6p6jDtCVpohX65pTZuP2ah", + "indexid": "xCDix3b2ni74iyym5ZreoCE47jqUTBFRAb", + "hash160result": "b48b359e9a00042cec64f7f66ac717d388a4f22a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.signaturedata" + } +}; +exports.VectorUint256KeyName = "vrsc::data.mmrhashes"; +exports.VectorUint256Key = { + "vdxfid": "i9UgJ2WxGw95PKdoCXjpfnBShtP5gi9fxS", + "indexid": "xEJnkpx38FMk1VWq4DPyeAhyjYQ6X5Gsti", + "hash160result": "8c1afd59e904f6d2702699963abccbc6d326d841", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.mmrhashes" + } +}; +exports.MMRLinksKeyName = "vrsc::data.mmrlinks"; +exports.MMRLinksKey = { + "vdxfid": "iPQsnA1R8UjHNddZKZ3FxsuKQ5WzKqSC7w", + "indexid": "xUEzExSVynwwzoWbBEhQwGRrRjY1Bc2MYc", + "hash160result": "f535a4e9ac0f94eda01695d16489a4a102d6b1da", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.mmrlinks" + } +}; +exports.MMRDescriptorKeyName = "vrsc::data.mmrdescriptor"; +exports.MMRDescriptorKey = { + "vdxfid": "i9dVDb4LgfMYrZD1JBNP2uaso4bNAkT4Jr", + "indexid": "xETbgPVRXyaDUj639s2Y1J7QpicP4DvZMt", + "hash160result": "97273a4c02d6be002f8d69c3979616732ba68243", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.mmrdescriptor" + } +}; +exports.TypeDefinitionKeyName = "vrsc::data.type.typedefinition"; +exports.TypeDefinitionKey = { + "vdxfid": "iL5MPPHWXQEY3p2Q1UsmGDvXsgPiqd1W1S", + "indexid": "xQuTrBibNiTCfyuRsAXvEcT4uLQjhxrpyL", + "hash160result": "ae8d805d9650c0512a6b6ec33e963386542f18b6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.typedefinition" + } +}; +exports.MultiMapKeyName = "vrsc::identity.multimapkey"; +exports.MultiMapKey = { + "vdxfid": "i3mbggp3NBR77C5JeFQJTpAxmgMidayLLE", + "indexid": "x8bi9VF8DVdmjMxLVw4TSChVoLNjUyapgs", + "hash160result": "6920bb81b420bc95e29a10ed677379b1e39e3a03", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.multimapkey" + } +}; +exports.ContentMultiMapRemoveKeyName = "vrsc::identity.multimapremove"; +exports.ContentMultiMapRemoveKey = { + "vdxfid": "i5Zkx5Z7tEfh42xtKfwbJ5LgEWE9rEgpFY", + "indexid": "xAPsQszCjYtMgCqvBMbkGTsDGAFAmrN33A", + "hash160result": "d393b986e4f82db7bec82d97b186882d739ded16", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.multimapremove" + } +}; +// for any ID, this key indexes content that applies to representing the profile of +// that ID. there may be many mime-type instances of a particular piece of profile media +exports.ProfileMediaKeyName = "vrsc::identity.profile.media"; +exports.ProfileMediaKey = { + "vdxfid": "iEYsp2njSt1M4EVYi9uuAPBU2wpKmThkkr", + "indexid": "xKNzGqDpJCE1gQNaZqa48mi14bqLaG669g", + "hash160result": "e95b2ee1abb130a93900ddaef2d8e528010f7c79", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.profile.media" + } +}; +exports.ZMemoMessageKeyName = "vrsc::system.zmemo.message"; +exports.ZMemoMessageKey = { + "vdxfid": "iNHg1n828PUxktkYeNxC6sdVmuKTipn3L3", + "indexid": "xT7nUaZ6yhhdP4daW4cM5GA2oZLUaNVaBD", + "hash160result": "4a8f418203621f10d1a61701be8dbbbb38fa5cce", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::system.zmemo.message" + } +}; +exports.ZMemoSignatureKeyName = "vrsc::system.zmemo.signature"; +exports.ZMemoSignatureKey = { + "vdxfid": "i7mrLLjUfGYuHJwnsxFvd282hsdn4staJG", + "indexid": "xCbxo9AZWamZuUppjdv5bQeZjXeo1vbaCc", + "hash160result": "7b47c8cd90c4c3ddc542f37ca77473b7325a272f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::system.zmemo.signature" + } +}; +exports.CurrencyStartNotarizationKeyName = "vrsc::system.currency.startnotarization"; +exports.CurrencyStartNotarizationKey = { + "vdxfid": "iRvxVcGLaCXcDiAfnQ5FfeBCo2AiBibAft", + "indexid": "xWm4xQhRRWkGqt3he5jQe2hjpgBj5C7Tj3", + "hash160result": "b537201ca6465976bea7bdb03119644a858052f6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::system.currency.startnotarization" + } +}; diff --git a/src/vdxf/identitydatakeys.ts b/src/vdxf/identitydatakeys.ts new file mode 100644 index 0000000..17868ab --- /dev/null +++ b/src/vdxf/identitydatakeys.ts @@ -0,0 +1,1832 @@ +import { VDXFKeyInterface } from "./keys" + +export const IDENTITY_ACCOUNT_ID: VDXFKeyInterface = { + "vdxfid": "i5Xgd7Aqds922eE8FDBUsKHSgiig39AnfS", + "indexid": "xAMo5ubvVBMgep7A6tqdqhoyiNjgq3j1ci", + "hash160result": "4c5e79bf46593fe959cb1918422eaa8fc82b8916", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.account.id" + } +} + +export const IDENTITY_ACCOUNT_USERID: VDXFKeyInterface = { + "vdxfid": "iNKVUvr5GzdCHgybMauK11DdZZUyWE3pe3", + "indexid": "xT9bwjHA8JqrurrdDGZTyPkAbDVzR53C2o", + "hash160result": "93b62bfd8c861ac7a5aa3d3d9f618ccd8c04b5ce", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.account.userid" + } +} + +export const IDENTITY_ACCOUNT_CREATEDAT: VDXFKeyInterface = { + "vdxfid": "i42uTbJmVBcPacY3Ak1g95LBg5rBBntQby", + "indexid": "x8s1vPjrLVq4CnR52Rfq7TrihjsBzxAEic", + "hash160result": "c40b12b14582c976e67a2e5992b0fdf67fb21f06", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.account.createdat" + } +} + +export const IDENTITY_ACCOUNT_COMPLETEDAT: VDXFKeyInterface = { + "vdxfid": "iRJTZj7osY5EYA7pd7K3UcJVAApkvodDjZ", + "indexid": "xW8a2XYtirHuAKzrUnyCSzq2BpqmpCnnHQ", + "hash160result": "c568b6e1f734f5dc9b754e5932ebdb63f2606bef", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.account.completedat" + } +} + +export const IDENTITY_ACCOUNT_PREVIOUSATTEMPTID: VDXFKeyInterface = { + "vdxfid": "iGU6RCWyjU1sscCPLN77XhTESJ21JCTNxF", + "indexid": "xMJCszx4anEYVn5RC3mGW5ymTx32EBfaqs", + "hash160result": "50c2b12bb483802d14beae3c6b7454c6ecc0848e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.account.previousattemptid" + } +} + +export const IDENTITY_ACCOUNT_SHAREABLEURL: VDXFKeyInterface = { + "vdxfid": "i92YkV3FVGZfp5Ep3j1sfQUgqUS37M9v82", + "indexid": "xDrfDHULLanLSF7quQg2do1Ds8T3yGCRw3", + "hash160result": "52e9f990e5e89cc1088acd29a2fda0ef140ae73c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.account.shareableurl" + } +} + +export const IDENTITY_ACCOUNT_TEMPLATEID: VDXFKeyInterface = { + "vdxfid": "iL5diuVsHAG5DLVeyc8XYdEXR6fFro5G7s", + "indexid": "xQukBhvx8UUjqWNgqHngX1m4SkgGhnybh1", + "hash160result": "37ef653fe6685fca132d77834384702f6cd225b6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.account.templateid" + } +} + +export const IDENTITY_ACCOUNT_TEMPLATEVERSION: VDXFKeyInterface = { + "vdxfid": "i7eBZNzKrgFov6c2Sx2QecyEmPq2Mc4BGe", + "indexid": "xCUJ2BRQhzUUYGV4JdgZd1Vmo3r39BsUym", + "hash160result": "e6e490ce8bfde333ab0374880ea0efbb9c12b42d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.account.templateversion" + } +} + +export const IDENTITY_ACCOUNT_STATUS: VDXFKeyInterface = { + "vdxfid": "iJf3EbihEtdEpJjbQ6PgUaL3GxDgZRzSWk", + "indexid": "xPV9hQ9n6CquSUcdFn3qSxraJcEhVfWa72", + "hash160result": "d6fc5578c2fbed3251f3aa250c73b58386ec86a6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.account.status" + } +} + +export const IDENTITY_PHONENUMBER: VDXFKeyInterface = { + "vdxfid": "iAQY8o4HwupzcJAw9aBtFwgrvWZGQStkge", + "indexid": "xFEebbVNoE3fEU3y1Fr3ELDPxAaHE7V2kN", + "hash160result": "32bc2c7919f626c39679630ee4d6d6d07bcd074c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.phonenumber" + } +} + +export const IDENTITY_DATEOFBIRTH: VDXFKeyInterface = { + "vdxfid": "iSZsa7C4esogN3W6fBngUHR6GvSmt7We4j", + "indexid": "xXPz2ud9WC2LzDP8WsSqSfwdJaTnqpHdND", + "hash160result": "ab74371e952a27f615b079d3c084b38b98c84dfd", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.dateofbirth" + } +} + +export const IDENTITY_OVER18: VDXFKeyInterface = { + "vdxfid": "iHPD8vB7jhtbuqPkUqzheqcZdfAfHUFVzM", + "indexid": "xNDKbicCb27GY1GnLXerdE96fKBg9tLUDT", + "hash160result": "28139ce1eae370e76f749066f778466597689098", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.over18" + } +} + +export const IDENTITY_OVER21: VDXFKeyInterface = { + "vdxfid": "iAXYYrZaipc4DAmAKXUFYZxavsf6uBJqaj", + "indexid": "xFMf1ezfa8piqLeCBD8QWxV7xXg7mxMc1Z", + "hash160result": "7a1fee70ace1c048c0a93c120a8a4c5f890f5b4d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.over21" + } +} + +export const IDENTITY_OVER25: VDXFKeyInterface = { + "vdxfid": "iDuForPTZFeFBAgDX1HyrP3d6of7wzrRaS", + "indexid": "xJjNGepYQZruoLZFNgx8pmaA8Tg8qSfnzM", + "hash160result": "2a1e6fa6913ea3659dcaf1c5bc20a96e399d5e72", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.over25" + } +} + +export const IDENTITY_ACCOUNT_REQUESTING_IPADDRESS: VDXFKeyInterface = { + "vdxfid": "i4uE1EvnDbq9WGhF5UbBr6fbxNLsgk1eZ3", + "indexid": "x9jLU3Ms4v3p8SaGwAFLpVC8z2MtYJTVwp", + "hash160result": "05a3aa58192812972a2c4e4184af7bb5fbf9a30f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.account.requesting.ipaddress" + } +} + +export const IDENTITY_EMAIL: VDXFKeyInterface = { + "vdxfid": "iJ4pq4DCymfbu8SAuXyNhasLeSHFNKPr23", + "indexid": "xNtwHreHq5tGXJKCmDdXfyPsg6JGHUY6X1", + "hash160result": "15a8095b6298bbff5147060d9a6363a9df6c0ea0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.email" + } +} + +export const IDENTITY_NATIONALITY: VDXFKeyInterface = { + "vdxfid": "iEUYNTkw6kFhZWto7vyTpQqtdRL7eoKZY2", + "indexid": "xKJeqGC1x4UNBgmpycdcnoNRf5M8btexbt", + "hash160result": "db935713b90281d6aefe5e7b33e5b660962aaa78", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.nationality" + } +} + +export const IDENTITY_FIRSTNAME: VDXFKeyInterface = { + "vdxfid": "iLB8SG7ErJtTYcG1f4w9RLuMJPpAsjFkiL", + "indexid": "xR1Eu4YKhd78An93WkbJPjRtL3qBprmMno", + "hash160result": "0bab76359b70b37c858399c2a3776939c5de2fb7", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.firstname" + } +} + +export const IDENTITY_MIDDLENAME: VDXFKeyInterface = { + "vdxfid": "iHG6ALRUPyRcgJMsPqBmvUCZxe4PrMfgej", + "indexid": "xN6Cd8rZFHeHJUEuFWqvtrj6zJ5QjX94j5", + "hash160result": "b98bd82034ec86ae5538313c9f5501c086ac3797", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.middlename" + } +} + +export const IDENTITY_LASTNAME: VDXFKeyInterface = { + "vdxfid": "iKRmfy4xgjWQyPdXYie6dJezRXF4aKdbHB", + "indexid": "xQFt8mW3Y3j5bZWZQQJFbhBXTBG5S4vdaZ", + "hash160result": "6b597e0c05d1430566b7b17a59da683fb4a6fcae", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.lastname" + } +} + +export const IDENTITY_GENDER: VDXFKeyInterface = { + "vdxfid": "iShgSBdiYDQnVwgNcDnSbNYHGU6CTwBDb1", + "indexid": "xXXntz4oPXdT87ZQTuSbZm4pJ87DGEgHpG", + "hash160result": "3baee594e927d47b641c7cf3927ab3229dd0c7fe", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.gender" + } +} + +export const IDENTITY_HEIGHT: VDXFKeyInterface = { + "vdxfid": "iLmLmsFMTUm4dd2iMuMe4xaMC8VSZN9soP", + "indexid": "xRbTEfgSJnyjFnukDb1o3M6tDnWTSUiii7", + "hash160result": "e80652253fa52b95cd9ea5ff43d51642ea4fa8bd", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.height" + } +} + +export const IDENTITY_EYECOLOR: VDXFKeyInterface = { + "vdxfid": "iRo2XT8tcMtLTpuPJ6V5WxbnVWa2CrcdsJ", + "indexid": "xWd8zFZyTg715znR9n9EVM8KXAb328xGbZ", + "hash160result": "c60fdfcc04173f273aa92a3b1844964b368ad2f4", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.eyecolor" + } +} + +export const IDENTITY_ETHNICITY: VDXFKeyInterface = { + "vdxfid": "i9jHPJokwnLoCQ83P6jqezCcEZUD1g34B9", + "indexid": "xEZPr7Eqo6ZTpa15EnPzdNj9GDVDsfToki", + "hash160result": "0476d568a9cf949bc8b6d84dc73e38cf85449b44", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.ethnicity" + } +} + +export const IDENTITY_WEIGHT: VDXFKeyInterface = { + "vdxfid": "iMzGK44r6SNkzi3N3AmcZBtuysPvgYiRiT", + "indexid": "xSpNmrVvwkbRcsvPtrRmXaRT1XQwXFe2Ut", + "hash160result": "8abe0e94cb1ff345f1351720acc8eefed91e12cb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.weight" + } +} + +export const IDENTITY_HOMEADDRESS: VDXFKeyInterface = { + "vdxfid": "i9A1fD5sVwFFXzEmCJWSRDqN94PXp9oNaS", + "indexid": "xDz881WxMFTvAA7o3zAbPcMuAiQYiT4Vnc", + "hash160result": "072a3abed3a353e001288074d9426285e569503e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.homeaddress" + } +} + +export const IDENTITY_HOMEADDRESS_STREET1: VDXFKeyInterface = { + "vdxfid": "i5BJAwQbrP4Bht8gUpoqSrovuBwfRc6jiv", + "indexid": "xA1QdjqghhGrL41iLWTzRFLTvqxgNsVzXY", + "hash160result": "ff22b196e64c9388daab76a57bcaea50491cae12", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.homeaddress.street1" + } +} + +export const IDENTITY_HOMEADDRESS_STREET2: VDXFKeyInterface = { + "vdxfid": "iMx71C14hrBoWD3yyhYChmhJEw4Kqw1zj4", + "indexid": "xSnDTzS9ZAQU8Nw1qPCMgADqGb5Lgqb4zw", + "hash160result": "efdda473a6a9e98cd91b02d36bfeb5dec784a9ca", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.homeaddress.street2" + } +} + +export const IDENTITY_HOMEADDRESS_CITY: VDXFKeyInterface = { + "vdxfid": "i75ZpW5T6wgQEMVxyvqHT9ZaV4fjsQ7kws", + "indexid": "xBugHJWXxFu4rXNzqcVSRY67WigkoCUEUQ", + "hash160result": "fcae40d5d327f13dc0e0c1e80f3db212a4ed8827", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.homeaddress.city" + } +} + +export const IDENTITY_HOMEADDRESS_REGION: VDXFKeyInterface = { + "vdxfid": "iRkYck3JowdFWmrM6VUAS8Wtpmxds2fLXS", + "indexid": "xWaf5YUPfFqv8wjNxB8KQX3RrRyenbioh5", + "hash160result": "fa06b90a547658a3efc3cd1797d6b3cd30695af4", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.homeaddress.region" + } +} + +export const IDENTITY_HOMEADDRESS_POSTCODE: VDXFKeyInterface = { + "vdxfid": "iAL2FRG8PVi18fN8MatjXhV1YkuZr7PM4T", + "indexid": "xFA8iDhDEovfkqFADGYtW61YaQvahtrhJA", + "hash160result": "b4f4c3a08fdcf32209482fa3d8c7b01201312d4b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.homeaddress.postcode" + } +} + +export const IDENTITY_HOMEADDRESS_COUNTRY: VDXFKeyInterface = { + "vdxfid": "iABYGvas6uUDk9ejCkfCVLvE9PPJXgyCKX", + "indexid": "xF1ejj1wxDgtNKXm4SKMTjSmB3QKL8LhQG", + "hash160result": "bafb2cb6d5cc86478622feb8a00097d71d839249", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.homeaddress.country" + } +} + +export const IDENTITY_IDNUMBER_VALUE: VDXFKeyInterface = { + "vdxfid": "iQrnvbCNWMaG6PjTmeXzrcuAXKsMzmNJWA", + "indexid": "xVguPPdTMfnviZcVdLC9q1RhYytNuZ3ToS", + "hash160result": "72cf52b2f6b4f68173c933fb046e892870b990ea", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idnumber.value" + } +} + +export const IDENTITY_IDNUMBER_TYPE: VDXFKeyInterface = { + "vdxfid": "iSSZX5yUdQh7zLf1gUewH5rVfbXtSq2c4s", + "indexid": "xXGfytQZUiuncWY3YAK6FUP2hFYuQ4yYwW", + "hash160result": "2807f356d687b4c6208ce0379b31043c7fcdebfb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idnumber.type" + } +} + +export const IDENTITY_VERIFICATION_STATUS: VDXFKeyInterface = { + "vdxfid": "i8MhqW3ejupmV1M5UyhyhG13dkS8A7g7zg", + "indexid": "xDBpJJUjbE3S7BE7LfN8feXafQT92YQZPm", + "hash160result": "47f2864de74ffe01ccb7eeabf0f2d848e3668e35", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.verification.status" + } +} + +export const IDENTITY_VERIFICATION_APPROVALS: VDXFKeyInterface = { + "vdxfid": "iBMkZtqC9yqVrFL4GfYtXckFpYAhRkE2mj", + "indexid": "xGBs2hGH1J4AURD68MD3W1GnrCBiJ3nRgG", + "hash160result": "a98801de1ba5ff5e571dbdde50519483140f7956", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.verification.approvals" + } +} + +export const IDENTITY_VERIFICATION_APPROVALS_ACCEPTEDTOS: VDXFKeyInterface = { + "vdxfid": "iH32QkXBKyWEJD6kh9HJ4KMfeiWfPWoHEh", + "indexid": "xMs8sYxGBHitvNynYpwT2htCgNXgHt6VAW", + "hash160result": "bbe4c09ae069561d3c14b04e3b7b96c98622bf94", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.verification.approvals.acceptedtos" + } +} + +export const IDENTITY_VERIFICATION_APPROVALS_VERIFIEDSMS: VDXFKeyInterface = { + "vdxfid": "iPgyMDFQ9QMNrqc3ckEBEubDNwLnvubUdW", + "indexid": "xUX5p1gUzia3V1V5URtLDJ7kQbMosPsVj8", + "hash160result": "72853b66aa158531e1f15b9ff075199a1224bddd", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.verification.approvals.verifiedsms" + } +} + +export const IDENTITY_VERIFICATION_APPROVALS_KYCCHECKED: VDXFKeyInterface = { + "vdxfid": "iRnbiA4dAPbeuB6KQN2donBHP9mKUHHFZf", + "indexid": "xWciAxVi1hpKXLyMG3gnnAhpQonLQapWPv", + "hash160result": "c6114ffec250b746bde117903b930d9a34d3bdf4", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.verification.approvals.kycchecked" + } +} + +export const IDENTITY_VERIFICATION_APPROVALS_DOCUMENTSVERIFIED: VDXFKeyInterface = { + "vdxfid": "iBjML9DHV67MBQyMEHVTSoJPhU8DNeWRTE", + "indexid": "xGZTnweNLQL1oarP5y9cRBpvj89EGt5VSm", + "hash160result": "0a93883010769ff783be5ced074ecfa50dd08e5a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.verification.approvals.documentsverified" + } +} + +export const IDENTITY_VERIFICATION_APPROVALS_SELFIECHECKED: VDXFKeyInterface = { + "vdxfid": "iKgeFKoy6WMx9MoEjig5vHoXbyxVFBPWDN", + "indexid": "xQWki8F3wpacmXgGbQLEtgL4ddyWC8UZLv", + "hash160result": "6a044306ef77ce9896ffcd26ee40174651b1ccb1", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.verification.approvals.selfiechecked" + } +} + +export const IDENTITY_VERIFICATION_APPROVALS_WATCHLISTOK: VDXFKeyInterface = { + "vdxfid": "iFDB1qKYSrWMRaMCWX6hNGE8HVXB1cNtJu", + "indexid": "xL3HUdkdJAj23kEENCkrLekfK9YBymnLrX", + "hash160result": "e691a2d2af30df6ee21f0eb805a98e11d539ba80", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.verification.approvals.watchlistok" + } +} + +export const IDENTITY_VERIFICATION_APPROVALS_RISKCHECKOK: VDXFKeyInterface = { + "vdxfid": "i9dva492S7vQphjLiK2UaS7JikZKs5TQsB", + "indexid": "xEU32ra7HS95SscNZzgdYpdqkQaLjnzcyC", + "hash160result": "6ffdbee07124450d29698724573bd6ab07d09743", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.verification.approvals.riskcheckok" + } +} + +export const IDENTITY_VERIFICATION_APPROVALS_STATUS: VDXFKeyInterface = { + "vdxfid": "iKhGUcTH4ZQ7uiy933m8f1GbwSLcwJW8ev", + "indexid": "xQXNwQtMuscnXtrAtjRHdPo8y6MdomjAXM", + "hash160result": "00612f17d9cedc346fcd139c0c5b56e666efeab1", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.verification.approvals.status" + } +} + +export const IDENTITY_DRIVINGLICENCE: VDXFKeyInterface = { + "vdxfid": "iMYQw33ryywcNyQDjFjiVvFm2kAwG85poV", + "indexid": "xSNXPqUwqJAH19HFawPsUJnJ4QBxCATPNx", + "hash160result": "e2857ddcc4f3301c354a00d1376558a75e802ec6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence" + } +} + +export const IDENTITY_DRIVINGLICENCE_ORIGINALFRONT: VDXFKeyInterface = { + "vdxfid": "i3fq6ET2dL8CxC3BJzdYTpUsjEsQaKP7bX", + "indexid": "x8VwZ2t7UeLsaMvDAgHhSD1QkttRPYndPW", + "hash160result": "26bab54e1f760b1abb888229a38a5179cc502302", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.originalfront" + } +} + +export const IDENTITY_DRIVINGLICENCE_ORIGINALBACK: VDXFKeyInterface = { + "vdxfid": "i7LTNZvJmm5LjAwMWuryb52yKt7txaV5FW", + "indexid": "xCAZqNMPd5J1MLpPNbX8ZTZWMY8unxdAfs", + "hash160result": "c7b3e9a70908fafc8de3e81f6ac2e0c131c9592a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.originalback" + } +} + +export const IDENTITY_DRIVINGLICENCE_CROPPEDFRONT: VDXFKeyInterface = { + "vdxfid": "i8KsL3JJgbJyuqEyEbu5KZkDBFvHscLoM6", + "indexid": "xD9ynqjPXuXeY1816HZEHxGkCuwJoHBx54", + "hash160result": "7b28226a4f3eaae379cddbc84d037cfe587e3535", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.croppedfront" + } +} + +export const IDENTITY_DRIVINGLICENCE_CROPPEDBACK: VDXFKeyInterface = { + "vdxfid": "iRwumhx12vtT8CkspBLmKQY8WZywurxVXo", + "indexid": "xWn2EWP5tF77kNdufrzvHo4fYDzxhjXyZz", + "hash160result": "0b6edf21bfe119173b3fffab6118d79a39a580f6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.croppedback" + } +} + +export const IDENTITY_DRIVINGLICENCE_FACE: VDXFKeyInterface = { + "vdxfid": "i5i7U4EAbgPzhCRebtbmoZt6pTyqGqP8jj", + "indexid": "xAYDvrfFSzcfKNJgTaFvmxQdr7zr6oGgFh", + "hash160result": "1f47647bf3e71f0c1c2638c99e6a42e6bf118218", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.face" + } +} + +export const IDENTITY_DRIVINGLICENCE_IDNUMBER: VDXFKeyInterface = { + "vdxfid": "iBCA8b4zS5ygVgTFqxabke7BBFs92dhcXQ", + "indexid": "xG2GbPW5HQCM7rLHheEkj2diCut9vgFhM2", + "hash160result": "fcf0571278bd1afce6d93f0a99f41437bb91a854", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.idnumber" + } +} + +export const IDENTITY_DRIVINGLICENCE_CATEGORY: VDXFKeyInterface = { + "vdxfid": "i5Cm95DZa6FPP66bA6aFfoYL2jaojetHMp", + "indexid": "xA2sbseeRQU41Fyd1nEQeC4s4Pbpf63xB4", + "hash160result": "3b91fccdf59d99b21e442441b89abb31bf09f512", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.category" + } +} + +export const IDENTITY_DRIVINGLICENCE_EXPIRATIONDATE: VDXFKeyInterface = { + "vdxfid": "iJvGpPoP1uUkUqn9bAchLyfaGWyy8JGQoX", + "indexid": "xPkPHCETsDhR71fBSrGrKNC7JAzz17RsLk", + "hash160result": "96aee63b3c6094a4d9edbc04b63a8e45688068a9", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.expirationdate" + } +} + +export const IDENTITY_DRIVINGLICENCE_ISSUINGCOUNTRY: VDXFKeyInterface = { + "vdxfid": "iBsNEqysX64cQAjiRHHL1msd7LxroGM6Mb", + "indexid": "xGhUheQxNQHH2LckGxwUzAQA8zysfnKDSU", + "hash160result": "f2f24dd2383538493d21ff0aca77c7cd1fe6125c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.issuingcountry" + } +} + +export const IDENTITY_DRIVINGLICENCE_ISSUINGREGION: VDXFKeyInterface = { + "vdxfid": "i6gZSDYpK9inexaeFQDSk9GuAmew1ymMFo", + "indexid": "xBWfu1yuATwTH8Tg75sbiXoSCRfwsxQzeR", + "hash160result": "67f4fd5c49250912aecf1eb8ab17f29d590a2f23", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.issuingregion" + } +} + +export const IDENTITY_DRIVINGLICENCE_DATEOFBIRTH: VDXFKeyInterface = { + "vdxfid": "iChWUsL1NQwDqcwXbFGxHiCegfquGPyadv", + "indexid": "xHXcwfm6Dj9tTnpZSvw7G6jBiKrvBUhwaw", + "hash160result": "3c7bd13bcdb54368e7590a9f2da5b201b7be2d65", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.dateofbirth" + } +} + +export const IDENTITY_DRIVINGLICENCE_ADDRESS_STREET1: VDXFKeyInterface = { + "vdxfid": "i9xaEvSQ537wuYgcVPRgG3zop9bVzeDTBw", + "indexid": "xEnghisUvMLcXiZeM55qESXLqocWsv6zmJ", + "hash160result": "48dd1caf84c1a49209ca44064846dc4ad0be1e47", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.address.street1" + } +} + +export const IDENTITY_DRIVINGLICENCE_ADDRESS_CITY: VDXFKeyInterface = { + "vdxfid": "i6XMEh3jrxzdyoVYoNWhRSncR9oWSnmikd", + "indexid": "xBMThVUpiHDJbyNaf4ArPqK9SopXGndEyv", + "hash160result": "c1f3612774870d1f12320bff317e7790211d7121", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.address.city" + } +} + +export const IDENTITY_DRIVINGLICENCE_ADDRESS_REGION: VDXFKeyInterface = { + "vdxfid": "i7sPBSqerD23RAqfN167aYePjfC8LL34UA", + "indexid": "xChVeFGjhXEi3LihDgkGYwAvmKD9CsNunu", + "hash160result": "991d24c053cb59a816e161fe3af2f40a7f2e3330", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.address.region" + } +} + +export const IDENTITY_DRIVINGLICENCE_ADDRESS_POSTCODE: VDXFKeyInterface = { + "vdxfid": "i9eHAmpeA3tmpsVeG5EkHuVfALFrmpzLqM", + "indexid": "xEUPdaFj1N7ST3Ng7ktuGJ2CBzGsZbja5V", + "hash160result": "f5905bbdf2eb60b24ccf6851716cc0efe801a943", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.address.postcode" + } +} + +export const IDENTITY_DRIVINGLICENCE_ADDRESS_COUNTRY: VDXFKeyInterface = { + "vdxfid": "i3xAMYBKLVdK89kuheXhTjuJTAxozmypj3", + "indexid": "x8nGpLcQBoqykKdwZLBrS8RqUpypqVUEV5", + "hash160result": "459844e00df4387514f31f182a88f7e13b0d3a05", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.drivinglicence.address.country" + } +} + +export const IDENTITY_SELFIECHECK_IMAGE: VDXFKeyInterface = { + "vdxfid": "iC22PxGqY7Mx3YT9kNrW1d11JNyGL56N8e", + "indexid": "xGr8rkhvPRacfiLBc4Wez1XYL2zHDDbJgD", + "hash160result": "c52d0023cce8c847a5097b6898f867651914b65d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.selfiecheck.image" + } +} + +export const IDENTITY_SELFIECHECK_VIDEO: VDXFKeyInterface = { + "vdxfid": "iLfnRYzcdQXR6am8rZk7xNtTUbLZo5NLG6", + "indexid": "xRVttMRhUik5ikeAiFQGvmQzWFMajwrVzX", + "hash160result": "ac0674f6d656d434e0b5b310daaaed554c3a9bbc", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.selfiecheck.video" + } +} + +export const IDENTITY_EMAIL_ISDELIVERABLE: VDXFKeyInterface = { + "vdxfid": "iN5Tdse8NSwuW6A4ZavHbHoDyD8aVjn1Ky", + "indexid": "xSua6g5DDmAa8G36RGaSZgKkzs9bSnFbCX", + "hash160result": "8194ee01a0bc66dca2af9ba7c3bba4a24da70dcc", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.email.isdeliverable" + } +} + +export const IDENTITY_EMAIL_BREACHCOUNT: VDXFKeyInterface = { + "vdxfid": "iDy1YKGhzVjAiMiuAvFDqxQbmLRhLEjwPo", + "indexid": "xJo817hnqowqLXbw2buNpLw8nzSiAygHhx", + "hash160result": "8144d2d8cafd733bb03847166be8493d275e1473", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.email.breachcount" + } +} + +export const IDENTITY_EMAIL_FIRSTBREACHEDAT: VDXFKeyInterface = { + "vdxfid": "i3eSGR4wrLk5djHsnT18dDHrJBFSBBxVST", + "indexid": "x8UYjDW2hexkFuAue8fHbbpPKqGT4mjAzH", + "hash160result": "df796054181f57d3b61d655d604d42d6c6d8df01", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.email.firstbreachedat" + } +} + +export const IDENTITY_EMAIL_LASTBREACHEDAT: VDXFKeyInterface = { + "vdxfid": "iCuZWBzmxCoFcRFjXYFgC6g4jT7kzxvhew", + "indexid": "xHjfxzRroX1vEb8mPDuqAVCbm78ms8Hkhd", + "hash160result": "d1b421db4c835cfa67b491342c31f89283427567", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.email.lastbreachedat" + } +} + +export const IDENTITY_EMAIL_DOMAIN_REGISTEREDAT: VDXFKeyInterface = { + "vdxfid": "iGxV4SBRZMk5qWrQEKgUS4RoqzpDmyBEpC", + "indexid": "xMnbXEcWQfxkTgjS61LdQSxLseqEcTADNA", + "hash160result": "e195ef220f8e71bfa7bef160291ecaa0164de393", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.email.domain.registeredat" + } +} + +export const IDENTITY_EMAIL_DOMAIN_FREEPROVIDER: VDXFKeyInterface = { + "vdxfid": "iLUfvKcg92CYo3BvCuRf5o844d44kGLhJL", + "indexid": "xRJnP83kzLRDRD4x4b5p4Beb6H55fetTy7", + "hash160result": "0b0f213c88a1b0df6cd01721955b1d0c103981ba", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.email.domain.freeprovider" + } +} + +export const IDENTITY_EMAIL_DOMAIN_CUSTOM: VDXFKeyInterface = { + "vdxfid": "i4FSBFpQ6Ccjiy2g61GrxhBppv1jDDh6on", + "indexid": "x95Ye4FUwWqQM8uhwgw1w5iMra2k7F1Lfz", + "hash160result": "bea1175185aeaf256aa7f04795b2c8d0c8547e08", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.email.domain.custom" + } +} + +export const IDENTITY_EMAIL_DOMAIN_DISPOSABLE: VDXFKeyInterface = { + "vdxfid": "i52PJxRyjKAEkmQFd2oGYgZV3pcsQUcD1T", + "indexid": "x9rVmks4adNuNwHHUiTRX5625UdtJPBQ1w", + "hash160result": "3adf98cb5cc90a074a52a651c50f67f5f0a7fe10", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.email.domain.disposable" + } +} + +export const IDENTITY_EMAIL_DOMAIN_TOPLEVEL_SUSPICIOUS: VDXFKeyInterface = { + "vdxfid": "iCtAZWinafiyf4tmvPxFkKNn5KxayXTPSV", + "indexid": "xHiH2K9sRyweHEmon5cQihuK6yybre797b", + "hash160result": "85477eb8148562614c396ca64fc7563637b13167", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.email.domain.toplevel.suspicious" + } +} + +export const IDENTITY_PASSPORT: VDXFKeyInterface = { + "vdxfid": "iKgbqmZ4Ks9SPNQGj5PZ5TgXomYG4CtaXv", + "indexid": "xQWiJZz9BBN71YHJam3i3rD4qRZH1sbLHD", + "hash160result": "775f52820102c994e30a29b1828b064421afcab1", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport" + } +} + +export const IDENTITY_PASSPORT_ORIGINALFRONT: VDXFKeyInterface = { + "vdxfid": "iCwT1mHdci9wooC6Q8mtx8QssXzwiL4hxp", + "indexid": "xHmZUZiiU2NcRy58FpS3vWwQuC1xdM48mW", + "hash160result": "25023e23a25ba4daa7ac0a9c96180f5e90acd067", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.originalfront" + } +} + +export const IDENTITY_PASSPORT_ORIGINALBACK: VDXFKeyInterface = { + "vdxfid": "iDXKJaroNRKr9GZfLFvH7LttJQaXqGoSrc", + "indexid": "xJMRmPHtDjYWmSShBwaS5jRRL4bYmTdC9J", + "hash160result": "21734b0f37ec51dd77bdab8c10065cf67b61386e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.originalback" + } +} + +export const IDENTITY_PASSPORT_CROPPEDFRONT: VDXFKeyInterface = { + "vdxfid": "i4cr6CxCYDHUDjc6UoMsDVAZoNep6Meuyi", + "indexid": "x9SxZ1PHPXW8quV8LV22Bsh6q2fpxtJ6Zd", + "hash160result": "274c241806d31576a57a074cc2f6b4c624078b0c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.croppedfront" + } +} + +export const IDENTITY_PASSPORT_CROPPEDBACK: VDXFKeyInterface = { + "vdxfid": "i6wA2ttX7vcxBXmrdmGEa44NZEFBZWoRYa", + "indexid": "xBmGVhKbyEqcohetVSvPYSauatGCUYDMs2", + "hash160result": "f56f1db46ddebc99f3c8954fc8bf1d26a9bef125", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.croppedback" + } +} + +export const IDENTITY_PASSPORT_FACE: VDXFKeyInterface = { + "vdxfid": "iLCbvnyU4V3XeMz18CXAG5MCtjb2FjpcZX", + "indexid": "xR2iPbQYuoGCGXs2ytBKETsjvPc35DNZDm", + "hash160result": "26f7dc9d524f84a21c8a9e3f2dc5149f3a3c77b7", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.face" + } +} + +export const IDENTITY_PASSPORT_IDNUMBER: VDXFKeyInterface = { + "vdxfid": "iDYih1jmCA1oexyxZ1PQFL5ewyciqoQ2rw", + "indexid": "xJNq9pAr3UEUH8rzQh3ZDicByddjgKM4vN", + "hash160result": "c8a25af227fc07e260119b370da0eae2a9517c6e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.idnumber" + } +} + +export const IDENTITY_PASSPORT_CATEGORY: VDXFKeyInterface = { + "vdxfid": "iMtpUJYWZmnnSJyJcshHRdWJZMhZVZZifT", + "indexid": "xSivw6ybR61T4UrLUZMSQ22qb1iaQux7BU", + "hash160result": "84a9f125285d7e93a1e676ed48e3fbe459780aca", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.category" + } +} + +export const IDENTITY_PASSPORT_EXPIRATIONDATE: VDXFKeyInterface = { + "vdxfid": "i98TaZ3wTh3qRw2ufeunVY2MD5eKwoamGE", + "indexid": "xDxa3MV2K1GW46uwXLZwTvYtEjfLspcYEK", + "hash160result": "07727b480c654d59cb611ed01715e254eb37053e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.expirationdate" + } +} + +export const IDENTITY_PASSPORT_ISSUINGCOUNTRY: VDXFKeyInterface = { + "vdxfid": "iRHGM2GEYeRUuHKSG1wENVA16bdyVRxchn", + "indexid": "xW7NophKPxe9XTCU7hbPLsgY8FezLKmJHi", + "hash160result": "4798dee337b16fc22d26748fb0803738f99831ef", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.issuingcountry" + } +} + +export const IDENTITY_PASSPORT_ISSUINGREGION: VDXFKeyInterface = { + "vdxfid": "i6Ay9VdcZjGrJur5SNyhBDZWzxGmo7qUmW", + "indexid": "xB15cJ4hR3VWw5j7J4dr9c642cHnbq2nm9", + "hash160result": "f3d9b605096f4c816de7d72c597fee07e75a961d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.issuingregion" + } +} + +export const IDENTITY_PASSPORT_DATEOFBIRTH: VDXFKeyInterface = { + "vdxfid": "iAjG8DwYfKxt9affJy6CUBDDFK5jaeHRLJ", + "indexid": "xFZNb2NdWeBYmkYhAekMSZjkGy6kWqAqyd", + "hash160result": "73eb23619d178f495a24b41aaf6aac107357924f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.dateofbirth" + } +} + +export const IDENTITY_PASSPORT_ADDRESS_STREET1: VDXFKeyInterface = { + "vdxfid": "i7HPJNB16V5pws8xSq4a8pHF29Mcg6sUyy", + "indexid": "xC7VmAc5woJVa31zJWij7Con3oNdXuBysY", + "hash160result": "c28625c4dfc12d3cdd85f8c7272e87a57523c529", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.address.street1" + } +} + +export const IDENTITY_PASSPORT_ADDRESS_CITY: VDXFKeyInterface = { + "vdxfid": "iFSLsk21VvWSWLg9a4XFTB3kEN8bLnTB7c", + "indexid": "xLGTLYT6MEj78WZBRkBQRZaHG29cBfjnYu", + "hash160result": "c06884e75232e86de75c6ccbd5605a3352dd3783", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.address.city" + } +} + +export const IDENTITY_PASSPORT_ADDRESS_REGION: VDXFKeyInterface = { + "vdxfid": "iFNoUQhExFEYTgrqgy7x22Q6URM7ek9L3J", + "indexid": "xLCuwD8KoZTD5rjsYen6zQvdW5N8Z4oGqf", + "hash160result": "7b7baa6d0d788f434536aa472c57d9de40678c82", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.address.region" + } +} + +export const IDENTITY_PASSPORT_ADDRESS_POSTCODE: VDXFKeyInterface = { + "vdxfid": "iS4SakGdB4ek1Q1QAitXUwFEk1RVyi3rLY", + "indexid": "xWtZ3Yhi2NsQdZtS2QYgTKmmmfSWrxdFKY", + "hash160result": "4457551bc48db37393f5ec3ec3d0cf6766dcbcf7", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.address.postcode" + } +} + +export const IDENTITY_PASSPORT_ADDRESS_COUNTRY: VDXFKeyInterface = { + "vdxfid": "iB9w9GgcJdGTt3ZuM2pm5qpDBA3UaJdcvj", + "indexid": "xFz3c57h9wV8WDSwCiUv4ELkCp4VNyPHLr", + "hash160result": "dd93bcbecc805e5b1606efafa1ecab6b33e53c54", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.passport.address.country" + } +} + +export const IDENTITY_RESIDENCEPERMIT: VDXFKeyInterface = { + "vdxfid": "i8WZetqKFn98rHRZGvAvPuzPyrJeyUMjfb", + "indexid": "xDLg7hGQ76MoUTJb8bq5NJWw1WKftQg9VL", + "hash160result": "712ef00d9937eb4ade0fd3e627c2df1d99503b37", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit" + } +} + +export const IDENTITY_RESIDENCEPERMIT_ORIGINALFRONT: VDXFKeyInterface = { + "vdxfid": "iC5NrmPgKckxBjKv7v9HjUMytm4jRtEBgZ", + "indexid": "xGuVKZpmAvycouCwyboShrtWvR5kNYzWoH", + "hash160result": "639ed2ef9da2f5e75fe63e1ccf83d1b54e68585e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.originalfront" + } +} + +export const IDENTITY_RESIDENCEPERMIT_ORIGINALBACK: VDXFKeyInterface = { + "vdxfid": "iLTPvrZi8HNALuVmYeAWnSnLdZ5GsAAUcx", + "indexid": "xRHWPeznybapy5NoQKpfkqJsfD6HmQW5eW", + "hash160result": "94d200a22dbdfa7ba47d1970c21eacb65f7543ba", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.originalback" + } +} + +export const IDENTITY_RESIDENCEPERMIT_CROPPEDFRONT: VDXFKeyInterface = { + "vdxfid": "i6T3rairykWA5vVEtQqptjp5RBRhTCmsBS", + "indexid": "xBHAKP9wq4ipi6NGk6Vys8LcSqSiKAMKZU", + "hash160result": "14136815f288a4b6426c7f4ab6b28221dcf0a020", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.croppedfront" + } +} + +export const IDENTITY_RESIDENCEPERMIT_CROPPEDBACK: VDXFKeyInterface = { + "vdxfid": "iHssgpjB2gsusjjLH36N3KqUQqz7JPXumA", + "indexid": "xNhz9dAFt16aVucN8ikX1iN1SW18D7SNDP", + "hash160result": "ce3cae77f2010009817f1e01de52ce8a493cfc9d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.croppedback" + } +} + +export const IDENTITY_RESIDENCEPERMIT_FACE: VDXFKeyInterface = { + "vdxfid": "iNVvVYKcKuredXKvctn5uQxp3kNXoJrwNb", + "indexid": "xTL2xLkhBE5KFhCxUaSEsoVM5QPYfELeHf", + "hash160result": "4dd17db50d569a63cc892d78850ac9de1d0eaed0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.face" + } +} + +export const IDENTITY_RESIDENCEPERMIT_IDNUMBER: VDXFKeyInterface = { + "vdxfid": "iMxygBvDFftAnmUCjVLh21etV5v4wt9zdk", + "indexid": "xSo68zMJ6z6qQwMEbAzqzQBRWjw5u6Tm63", + "hash160result": "ab544471e583d6a11245bb971e3ee1ef5ed1d3ca", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.idnumber" + } +} + +export const IDENTITY_RESIDENCEPERMIT_CATEGORY: VDXFKeyInterface = { + "vdxfid": "iGbMb21an69VE6iTH2iRtRFKCEUZPJHTwU", + "indexid": "xMRU3pSfdQN9rGbV8iNaromrDtVaCufAXu", + "hash160result": "ae9031bab1ee600e10aa16ec1d4c13def953e48f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.category" + } +} + +export const IDENTITY_RESIDENCEPERMIT_EXPIRATIONDATE: VDXFKeyInterface = { + "vdxfid": "iJ48ALemxyMV6DYzeuRMe8Fn78iMZdjSXZ", + "indexid": "xNtEd95rpHa9iPS2Wb5WcWnK8njNXD9HEH", + "hash160result": "d3083b08621d6ff5dc3f7f9cace34f944d7aec9f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.expirationdate" + } +} + +export const IDENTITY_RESIDENCEPERMIT_ISSUINGCOUNTRY: VDXFKeyInterface = { + "vdxfid": "i7UhTp4gruQwtkC1bi4RxE4wUAsro6n9Ym", + "indexid": "xCJovcVmiDdcWv53TPiavcbUVptsgMKzdL", + "hash160result": "75e37dc8957c8c6765c60962804d446b2de0e82b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.issuingcountry" + } +} + +export const IDENTITY_RESIDENCEPERMIT_ISSUINGREGION: VDXFKeyInterface = { + "vdxfid": "iERBNWk2tyaGJ2w8P1kM88Mdj5WA9qFzbv", + "indexid": "xKFHqKB7kHnvvCpAEhQW6WtAkjXAymjqXM", + "hash160result": "788165581de37b5473c2f127d387f3d7a8630778", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.issuingregion" + } +} + +export const IDENTITY_RESIDENCEPERMIT_DATEOFBIRTH: VDXFKeyInterface = { + "vdxfid": "iM62dN7LSHWDuetPi6qAewG6bzYwFrcqBN", + "indexid": "xRv96AYRHbitXpmRZnVKdKnddeZxAivvFE", + "hash160result": "e2533190e4822ab51c5b2029039fbb0d431131c1", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.dateofbirth" + } +} + +export const IDENTITY_RESIDENCEPERMIT_ADDRESS: VDXFKeyInterface = { + "vdxfid": "iCA8P2rVs5DjtzQpXEnPJcG4KBs79C9EpL", + "indexid": "xGzEqqHaiPSQXAHrNvSYGznbLqt83gLGV5", + "hash160result": "2c7264a72e1d7937da951620039e48a0c8663e5f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.address" + } +} + +export const IDENTITY_RESIDENCEPERMIT_ADDRESS_STREET1: VDXFKeyInterface = { + "vdxfid": "iMuY2CbmQpCFzodGBtqxogmTb5dYfNbCJa", + "indexid": "xSjeV12rG8QvcyWJ3aW7n5HzcjeZaxtGwr", + "hash160result": "444cbb0dc6f471ecb2261dc7d6731cd97e272dca", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.address.street1" + } +} + +export const IDENTITY_RESIDENCEPERMIT_ADDRESS_CITY: VDXFKeyInterface = { + "vdxfid": "iRckJ1VkfYazfVHWJuA9iXTth83ZYp8znz", + "indexid": "xWSrkovqWrofHfAYAapJguzRin4aPEqHJK", + "hash160result": "73e22f5d24515103052ab165736a0198a7d4e0f2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.address.city" + } +} + +export const IDENTITY_RESIDENCEPERMIT_ADDRESS_REGION: VDXFKeyInterface = { + "vdxfid": "iBpH337NTJSLjSxbBWuu2wBLu12k4JVGk4", + "indexid": "xGePVqYTJcf1Mcqd3Ca41Khsvf3kyxtNXH", + "hash160result": "2f7b3040cf60259ee4bf6dfc93a4de42ab4e7d5b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.address.region" + } +} + +export const IDENTITY_RESIDENCEPERMIT_ADDRESS_POSTCODE: VDXFKeyInterface = { + "vdxfid": "iGKi47jtg6CumKYSUBj57drgLNGzhJY3Gj", + "indexid": "xM9pWvAyXQRaPVRUKsPE62PDN2J1Zp4d6b", + "hash160result": "db85ea63848a6ad2c3a0e82bb29e215c00c2ee8c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.address.postcode" + } +} + +export const IDENTITY_RESIDENCEPERMIT_ADDRESS_COUNTRY: VDXFKeyInterface = { + "vdxfid": "i8KD9CUn7Su4YT44WhbD8HYA1K425cFCqM", + "indexid": "xD9Kbzurxm7jAcw6NPFN6g4h2y531jRanx", + "hash160result": "75970ae74cd40419dc78ecef7be22c5ee09d1535", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencepermit.address.country" + } +} + +export const IDENTITY_RESIDENTCARD: VDXFKeyInterface = { + "vdxfid": "iKkJFFtbxRMJutjoruW47Mc1sCfdGYQrC9", + "indexid": "xQaQi4KgojZyY4cqibAD5k8Ytrge9jwt3u", + "hash160result": "2b737a5733b91d305dcf07d9e75797740da97db2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard" + } +} + +export const IDENTITY_RESIDENTCARD_ORIGINALFRONT: VDXFKeyInterface = { + "vdxfid": "iNMJhZ3wie5U2SRF7WSFTpjJo6B6RSTR4t", + "indexid": "xTBRAMV2ZxJ8ecJGyC6QSDFqpkC7KTFMbW", + "hash160result": "e440d2d8bab46633691a12e7bed0ea785bd90ccf", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.originalfront" + } +} + +export const IDENTITY_RESIDENTCARD_ORIGINALBACK: VDXFKeyInterface = { + "vdxfid": "i4pAk8J5ec2wn55VattFRr7PyN4J2L13HJ", + "indexid": "x9eHCvjAVvFcQExXSaYQQEdw125Jz84d8u", + "hash160result": "9fa70ca8b49eab8c3e704f78f0e0ae1bc52caf0e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.originalback" + } +} + +export const IDENTITY_RESIDENTCARD_CROPPEDFRONT: VDXFKeyInterface = { + "vdxfid": "iLnx7NDcAWtb9uWicdgSaiwco56TywMh5w", + "indexid": "xRd4aAeh1q7Fn5PkUKLbZ7U9pj7UvU8v2V", + "hash160result": "fa7347c3517552a028890dacaf889a6ead39f6bd", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.croppedfront" + } +} + +export const IDENTITY_RESIDENTCARD_CROPPEDBACK: VDXFKeyInterface = { + "vdxfid": "i8WjL22L4UeaCDKZuj8R4Uub6zurTPdaLv", + "indexid": "xDLqnpTQunsEpPCbmQna2sS88evsLJL51v", + "hash160result": "b5134fe72682aa4f0dc645ceb73421dc07644337", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.croppedback" + } +} + +export const IDENTITY_RESIDENTCARD_FACE: VDXFKeyInterface = { + "vdxfid": "i6dGShbLY2ppZnXSyfvdtdGFkCxBQd2r9Y", + "indexid": "xBTNuW2RPM3VBxQUqMans1nnmryCFH4rRD", + "hash160result": "25a41b37f64414a2477c5c0d1a139d64ce9b8f22", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.face" + } +} + +export const IDENTITY_RESIDENTCARD_IDNUMBER: VDXFKeyInterface = { + "vdxfid": "iKFkbwDcQRXjapZcZAXsaMXjgER9CZbwZx", + "indexid": "xQ5s4jehFjkQCzSeQrC2Yk4GhtSA2GbM4B", + "hash160result": "e30d9a01765325e02ca22f60335d4bdb499917ad", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.idnumber" + } +} + +export const IDENTITY_RESIDENTCARD_CATEGORY: VDXFKeyInterface = { + "vdxfid": "i46Fgc8ev9zAkjikjHWreqSXkMRpFr5Lsi", + "indexid": "x8vN9QZjmUCqNubnayB1dDy4n1SqAqg4vn", + "hash160result": "c0039a4929d081eec1d1f5ca3040e19bded3c106", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.category" + } +} + +export const IDENTITY_RESIDENTCARD_EXPIRATIONDATE: VDXFKeyInterface = { + "vdxfid": "iBA1oFvDABKqbu9i61AEGy1m5fFHdCWkpy", + "indexid": "xFz8G4MJ1VYWE52jwgpPFMYJ7KGJUd6Y4b", + "hash160result": "0866dd99514f509c9ad4584b3f570515f4c74054", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.expirationdate" + } +} + +export const IDENTITY_RESIDENTCARD_ISSUINGCOUNTRY: VDXFKeyInterface = { + "vdxfid": "iHBgD199BSEQWREtiW8dP259DX4qg6KjkM", + "indexid": "xN1nfoaE2kT58b7vaBnnMQbgFB5rWuKCtd", + "hash160result": "ef88ffb14a8b66dacc690351fa9c3d35a8036296", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.issuingcountry" + } +} + +export const IDENTITY_RESIDENTCARD_ISSUINGREGION: VDXFKeyInterface = { + "vdxfid": "i6jygVNjzZUFEXVgtzWxXpBYf5rwjXF92J", + "indexid": "xBa69HopqsgurhNikgB7WCi5gjsxbi12z3", + "hash160result": "dc31e031328cfe3697527e046a52cc372687d423", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.issuingregion" + } +} + +export const IDENTITY_RESIDENTCARD_DATEOFBIRTH: VDXFKeyInterface = { + "vdxfid": "iQfYTwmTxXzxxyFh6XbY2PQVLVwswRoJL1", + "indexid": "xVVevkCYorDdb98ixDFgzmw2N9xtnBn6M2", + "hash160result": "73e0e5f4af76255bc2a3583ad9a7b1d0241470e8", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.dateofbirth" + } +} + +export const IDENTITY_RESIDENTCARD_ADDRESS_STREET1: VDXFKeyInterface = { + "vdxfid": "iJ67qMPN6tyrLXBhbJpKKBZYpkcBzZD8S4", + "indexid": "xNvEJ9pSxDCWxh4jSzUUHa65rQdCviMqur", + "hash160result": "8540d9cb71ca32f4c03caf26a4cffa4d51094da0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.address.street1" + } +} + +export const IDENTITY_RESIDENTCARD_ADDRESS_CITY: VDXFKeyInterface = { + "vdxfid": "iLCQ2n5tKHzKcVBv8of1eYmdWEdEY5vTUN", + "indexid": "xR2WVaWyAcCzEf4wzVKAcwJAXteFUoFSux", + "hash160result": "7990100969a22f4b4ba35613b3994219e74d6db7", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.address.city" + } +} + +export const IDENTITY_RESIDENTCARD_ADDRESS_REGION: VDXFKeyInterface = { + "vdxfid": "iPWcAQ6zbC9rKaaWAgrpoHmKs5G5SQCprF", + "indexid": "xULidCY5SWNWwkTY2NWymgHrtjH6QfP6JL", + "hash160result": "ff3f1523bfb1fe501ef10f0036c9f059b64bc7db", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.address.region" + } +} + +export const IDENTITY_RESIDENTCARD_ADDRESS_POSTCODE: VDXFKeyInterface = { + "vdxfid": "iG1QGYyp4SkiP7b9ngPwkTGC3DxVG3hB16", + "indexid": "xLqWjMQtukyP1HUBeN46iqnj4syW4eat4U", + "hash160result": "f345aa72196b006e2200bd08ed0ea165806c7889", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.address.postcode" + } +} + +export const IDENTITY_RESIDENTCARD_ADDRESS_COUNTRY: VDXFKeyInterface = { + "vdxfid": "i4wzngZfZb2QBnjr2TjtoMoMF9roSqQkho", + "indexid": "x9n7FUzkQuF4oxcst9Q3mkKtGospNqDjEQ", + "hash160result": "dd2a94da0a94115ed04de616b7d0ea1b19312a10", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residentcard.address.country" + } +} + +export const IDENTITY_IDCARD: VDXFKeyInterface = { + "vdxfid": "iK7FrcxNvsej84qZjYR73iGgEV96sGKwTU", + "indexid": "xPwNKRPTnBsPkEibbE5G26oDG9A7j4JSm7", + "hash160result": "4f2b2c852e4cfa5a640988af78c4d02243467cab", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard" + } +} + +export const IDENTITY_IDCARD_ORIGINALFRONT: VDXFKeyInterface = { + "vdxfid": "iCnLNq42DxhuK84Nes4UGjFFUuNsGGpuBZ", + "indexid": "xHcSqdV75GvZwHwQWYidF7mnWZPtATN7Ky", + "hash160result": "9f5f63641e6e935628d7602e92814311ea631766", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.originalfront" + } +} + +export const IDENTITY_IDCARD_ORIGINALBACK: VDXFKeyInterface = { + "vdxfid": "iJyfvwrUeTRiGxiYw6oJZ3uALsuBt7QTyy", + "indexid": "xPonPkHZVmeNu8bannTTXSRhNXvCpAD3MB", + "hash160result": "df3a44e11ad54673eff910c1320d9f50100b0daa", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.originalback" + } +} + +export const IDENTITY_IDCARD_CROPPEDFRONT: VDXFKeyInterface = { + "vdxfid": "iFDp8jWwybweGStGQnYxwhbi8eiucZ29sr", + "indexid": "xL3vbXx2pvAJtcmJGUD7v68FAJjvZmrsga", + "hash160result": "b10845ae9b29f3ed25f33f091398fd0a1536d980", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.croppedfront" + } +} + +export const IDENTITY_IDCARD_CROPPEDBACK: VDXFKeyInterface = { + "vdxfid": "i8GpXrygUPpQYVwcoZ7JVRB1xB46xZsMuG", + "indexid": "xD6vzfQmKi35AfpefEmTTohYyq57sdLVxr", + "hash160result": "84c05d2d84ab69db2834df22602f34445ae9a134", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.croppedback" + } +} + +export const IDENTITY_IDCARD_FACE: VDXFKeyInterface = { + "vdxfid": "i8sfiwALhk4FtSaWSnBWYwKnWN3G7m3jyU", + "indexid": "xDhnBjbRZ4GvWcTYJTqfXKrKY24GxBC5cg", + "hash160result": "4afc5fda25a15a4627b8426f40594ff2e11d393b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.face" + } +} + +export const IDENTITY_IDCARD_IDNUMBER: VDXFKeyInterface = { + "vdxfid": "iBEJB1xD1mpR4kYQbYieW3hNFpe5QmQ6qA", + "indexid": "xG4QdpPHs635gvRSTENoUSDuHUf6JB2izs", + "hash160result": "0af18c033e6ad395bdfb5fbdbf5144d63c1d1055", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.idnumber" + } +} + +export const IDENTITY_IDCARD_CATEGORY: VDXFKeyInterface = { + "vdxfid": "i4HCpvV1NJd4Ka8atCtDkXs4XLAkrmtKib", + "indexid": "x97KHiv6Dcqiwk1cjtYNivPbYzBmg48ama", + "hash160result": "68b49fa5bf2ed00672c881c15167fee2c304d408", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.category" + } +} + +export const IDENTITY_IDCARD_EXPIRATIONDATE: VDXFKeyInterface = { + "vdxfid": "iNTbsfTmeAm7KUFehtCq3RH1JgbUdTJwCt", + "indexid": "xTHiLTtrVUymwe8gZZrz1ooYLLcVZC5A4n", + "hash160result": "f4b807e32848d5a40815e2aa19cb219c64ae3dd0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.expirationdate" + } +} + +export const IDENTITY_IDCARD_ISSUINGCOUNTRY: VDXFKeyInterface = { + "vdxfid": "iJ5qVRWTHerkVreE9UrSfKyphD3XB9s8FA", + "indexid": "xNuwxDwY8y5R82XG1AWbdiWMis4Y3BXDg7", + "hash160result": "2cc5492966de5135e638de253b497cccb8643fa0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.issuingcountry" + } +} + +export const IDENTITY_IDCARD_ISSUINGREGION: VDXFKeyInterface = { + "vdxfid": "i8dHTbZ62Bth8NwkxasnKFpvX4EZYuBun4", + "indexid": "xDTPvPzAsW7MkYpnpGXwHeMTYiFaMyp6FD", + "hash160result": "f42f7b71bb43c590b9063755754bf2d534b58038", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.issuingregion" + } +} + +export const IDENTITY_IDCARD_DATEOFBIRTH: VDXFKeyInterface = { + "vdxfid": "iGcwhC6znG63pb6jqsRnrtDjXV4aXXsub2", + "indexid": "xMT49zY5daJiSkymhZ5wqGkGZ95bMGYJ9r", + "hash160result": "4d0c72c3369a0ac64711e58ae1b10785f1363190", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.dateofbirth" + } +} + +export const IDENTITY_IDCARD_ADDRESS_STREET1: VDXFKeyInterface = { + "vdxfid": "i6jMXjNE9qioZ2dFricFnEBEQEWK5Kg3PS", + "indexid": "xBZTzXoK19wUBCWHiQGQkchmRtXKugcKWw", + "hash160result": "2cee0d13a2fdeaac83d052ad27610da8bf59b623", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.address.street1" + } +} + +export const IDENTITY_IDCARD_ADDRESS_CITY: VDXFKeyInterface = { + "vdxfid": "i3viAeqayk3KDk5tQpYcz6gFs1ayW5vBma", + "indexid": "x8kpdTGfq4FyquxvGWCmxVCntfbzM8iAVb", + "hash160result": "a10bfcd1cfd12d466a276339072d2f2a7ec6f304", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.address.city" + } +} + +export const IDENTITY_IDCARD_ADDRESS_REGION: VDXFKeyInterface = { + "vdxfid": "iEHvf3XCFacMihTQPVXxNeo6hBCqggDFie", + "indexid": "xK837qxH6tq2LsLSFBC7M3KdiqDrYBNMK7", + "hash160result": "55af249b3ceb591709c693017e5b7b1cb131a876", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.address.region" + } +} + +export const IDENTITY_IDCARD_ADDRESS_POSTCODE: VDXFKeyInterface = { + "vdxfid": "i3yAnt6zdceYxbCBnLwxn2tNdM4BnPkzhT", + "indexid": "x8oHFgY5UvsDam5De2c7kRQuf15ChzdWFA", + "hash160result": "acd086baf0863cff86fc56ec0fbb16dd18d56a05", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.address.postcode" + } +} + +export const IDENTITY_IDCARD_ADDRESS_COUNTRY: VDXFKeyInterface = { + "vdxfid": "iA6KVD2C4QJAyKfCS3XfQV8AxmpR9R3XG5", + "indexid": "xEvRx1TGuiWqbVYEHjBpNsehzRqS2fp4qg", + "hash160result": "bab14b514d91d7daa39175c90e29a956dec19548", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.idcard.address.country" + } +} + +export const IDENTITY_VISA: VDXFKeyInterface = { + "vdxfid": "iDCwZf84AhbJkm4zKZP7Le8h8ukJS9FySA", + "indexid": "xJ342TZ921oyNvx2BF3GK2fEAZmKGeUQUd", + "hash160result": "57faa6b546ac92c71022178b8c5e9fbae9bebe6a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa" + } +} + +export const IDENTITY_VISA_ORIGINALFRONT: VDXFKeyInterface = { + "vdxfid": "iGAgzyLDVs5vYFLRgXVnkQpDRKy9Zh1TiV", + "indexid": "xLzoTmmJMBJbARDTYD9wioLkSyzARsVQWr", + "hash160result": "755da3361216260b786ba78fbe68800557223a8b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.originalfront" + } +} + +export const IDENTITY_VISA_ORIGINALBACK: VDXFKeyInterface = { + "vdxfid": "i3becgcmf85RiY2PAxsp3fbuGKG8Qc73t1", + "indexid": "x8Rm5V3rWSJ6LhuR2eXy248SHyH9Jjue4S", + "hash160result": "e71909c77e2e0361764d22b81f4f53085fe85801", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.originalback" + } +} + +export const IDENTITY_VISA_CROPPEDFRONT: VDXFKeyInterface = { + "vdxfid": "iAapfFQMAQy7USdjRwqzAZ2nWhRMSiQMmV", + "indexid": "xFQw83qS1jBn6cWmHdW98wZKYMSNHsb2wy", + "hash160result": "56ed30f8daf83e3b09eee57517be45b6b8c1f94d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.croppedfront" + } +} + +export const IDENTITY_VISA_CROPPEDBACK: VDXFKeyInterface = { + "vdxfid": "i3quMdmv3vAQDBA6nzM8fTiFtqJrw7tcnf", + "indexid": "x8g1pSCzuEP4qM38eg1HdrEnvVKsoXBZ7R", + "hash160result": "1d8106821498549cebc0af6f8d120b9933090b04", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.croppedback" + } +} + +export const IDENTITY_VISA_FACE: VDXFKeyInterface = { + "vdxfid": "iAqxnB58655ZcRLAUm2Utib2rguRXT9wZM", + "indexid": "xFg5EyWCwPJEEbDCLSgds77ZtLvSRpw2k9", + "hash160result": "59564e826c8342a2b721708f6a83c9761dc6d650", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.face" + } +} + +export const IDENTITY_VISA_IDNUMBER: VDXFKeyInterface = { + "vdxfid": "iQ5LfUtuggDyqbePUB9iWLgxYj7tvDm2VE", + "indexid": "xUuT8HKzXzSeTmXRKrosUjDVaP8upm7rqg", + "hash160result": "77ae761bf6bf7922ff8e47b53bd88107be15f8e1", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.idnumber" + } +} + +export const IDENTITY_VISA_CATEGORY: VDXFKeyInterface = { + "vdxfid": "iH4nhrNsZKK6bEkgLDu17fBPR5dnVgitiQ", + "indexid": "xMtuAeoxQdXmDQdiBuZA63hvSjeoT3wsnv", + "hash160result": "8052162609b4da20bb5932ead5b6deedbb861495", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.category" + } +} + +export const IDENTITY_VISA_EXPIRATIONDATE: VDXFKeyInterface = { + "vdxfid": "iNW2k7p7hVK2GCc7m1k4mihqh8jd94Dmnh", + "indexid": "xTL9CvFCYoXgtNV9chQDk7ENinkdzPUodD", + "hash160result": "5eaa0aef6ed6d27ee4909bc6ce8619c60346b3d0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.expirationdate" + } +} + +export const IDENTITY_VISA_ISSUINGCOUNTRY: VDXFKeyInterface = { + "vdxfid": "i5vDfPKMfCRPXVRhfumjWPEvBFhNMVjtGK", + "indexid": "xAkL8BkSWWe49fJjXbRtUmmTCuiPJGBZ2c", + "hash160result": "ebf49255193b4ffbb3a0487106a4df98833bcc1a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.issuingcountry" + } +} + +export const IDENTITY_VISA_ISSUINGREGION: VDXFKeyInterface = { + "vdxfid": "iPRc9Ns6LadQNYU7DqSNyx7LW8W9dPKDjC", + "indexid": "xUFicBJBBtr4ziM95X6XxLdsXnXAYQ1XFN", + "hash160result": "a1217c6e44b1f47faf9d59378206009d8433d5da", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.issuingregion" + } +} + +export const IDENTITY_VISA_DATEOFBIRTH: VDXFKeyInterface = { + "vdxfid": "i55bTsxLkCTmE6VvppvG8doYnmxuHhec65", + "indexid": "x9uhvgPRbWgRrGNxgWaR72L5pRyvA4vVWm", + "hash160result": "ed824bbfd195e63d6d5151a07eda49eba60c9a11", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.dateofbirth" + } +} + +export const IDENTITY_VISA_ADDRESS_STREET1: VDXFKeyInterface = { + "vdxfid": "iMzWxFVzJHbQm5YWv9c1eujvrUrPHAGVAc", + "indexid": "xSpdR3w59bp5PFRYmqGAdJGTt8sQ8o4mpu", + "hash160result": "05992eb838a4f562b6b7e0ff84bb05cdac571ecb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.address.street1" + } +} + +export const IDENTITY_VISA_ADDRESS_CITY: VDXFKeyInterface = { + "vdxfid": "i8YXgZ7doRhidT5phX6qyRnttV6hZiyWTm", + "indexid": "xDNe9MYiejvPFcxrZCkzwpKRv97iS3TQjA", + "hash160result": "04959daab853c797bbbcb9c5ead7376e4a809a37", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.address.city" + } +} + +export const IDENTITY_VISA_ADDRESS_REGION: VDXFKeyInterface = { + "vdxfid": "i6YkTDEi1M1mzuTyzww8hNoksJFpev17Fu", + "indexid": "xBNrv1fnrfESd5M1rdbHfmLHtxGqUoeALR", + "hash160result": "3a47a53e8717444b5d31e8618049daa8cde8b421", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.address.region" + } +} + +export const IDENTITY_VISA_ADDRESS_POSTCODE: VDXFKeyInterface = { + "vdxfid": "iBJDLHSLB4cHvaeXazFp25Be3V9yRWmcoK", + "indexid": "xG8Ko5sR2NpxYkXZSfuxzTiB59AzMUATiw", + "hash160result": "dd0d87e3163157402aa16d2017a3ea06d6bccd55", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.address.postcode" + } +} + +export const IDENTITY_VISA_ADDRESS_COUNTRY: VDXFKeyInterface = { + "vdxfid": "iQ9Z1PZMMp49rtDuGQSjfEZn3xACfxLAYa", + "indexid": "xUyfUBzSD8GpV46w866tdd6K5cBDbMPuNo", + "hash160result": "c45655a6924c0b377e9182869dc780df690dc4e2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.visa.address.country" + } +} + +export const IDENTITY_PERSONALDETAILS: VDXFKeyInterface = { + "vdxfid": "i8SSgM1z7XVoCtoP9CCsMms3zCndaNjtCe", + "indexid": "xDGZ99T4xqiTq4gQzss2LAPb1roeUyLwkU", + "hash160result": "a8fbe89451c1d0a77b336ccf6b0fb7601dd47336", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.personaldetails" + } +} + +export const IDENTITY_CONTACTDETAILS: VDXFKeyInterface = { + "vdxfid": "iRLT8V9NN178CvZQusJSHuyuFC2fD2QmE3", + "indexid": "xWAZbHaTDKKnq6SSmYxbGJWSGr3g1GRDYH", + "hash160result": "b9185ad980909708754a484bf11edc9febd8cbef", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.contactdetails" + } +} + +export const IDENTITY_LOCATION: VDXFKeyInterface = { + "vdxfid": "iGmiLZ7J6GjxjZ4rkSMsDzyyvWtmMBjnbo", + "indexid": "xMbpoMYNwaxdMiwtc822CPWWxAunLDE1BS", + "hash160result": "15ea60d9ddde976095b0c79ceecef7b034cfd991", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.location" + } +} + +export const IDENTITY_BANKINGDETAILS: VDXFKeyInterface = { + "vdxfid": "i8DUrZJJRjNQMJNeJ3Ti6pbpKPJ55LECyJ", + "indexid": "xD3bKMjPH3b4yUFg9j7s5D8MM3K612HEir", + "hash160result": "a7e5de6ac208f110d0509cffeb916b8dd03c0034", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails" + } +} + +export const IDENTITY_DOCUMENTS: VDXFKeyInterface = { + "vdxfid": "iCm3ERZoUw2ze1P11QyRUtvhKYovCWFXbT", + "indexid": "xHb9hDztLFFfGBG2s6daTHTEMCpw3tcbVJ", + "hash160result": "ee9f8d5ba7366983cf9b9d3e5e8ac50898a9d865", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.documents" + } +} + +export const IDENTITY_BANKACCOUNT: VDXFKeyInterface = { + "vdxfid": "iN4AgB4KEN1C3TfZnYDFUhxn37PdcrZvxT", + "indexid": "xStH8yVQ5gDrfdYbeDsQT6VK4mQeYDjcFm", + "hash160result": "122bf0739d7d1def003656a63c443efb6c14cfcb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankaccount" + } +} + +export const IDENTITY_BANKINGDETAILS_CURRENCY: VDXFKeyInterface = { + "vdxfid": "i5k8pb9FHf5VZJKki6him1WMBkpyhe56BY", + "indexid": "xAaFHPaL8yJABUCnZnMsjQ2tDQqzfUkZRm", + "hash160result": "cc655f9f104ad6c25cc65407121fa7ac1208e418", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.currency" + } +} + +export const IDENTITY_BANKINGDETAILS_COUNTRY: VDXFKeyInterface = { + "vdxfid": "iHYqZF4Asa4erZR9kJ5G5nWRNGWdiS8vBh", + "indexid": "xNNx23VFitHKUjJBbyjR4B2xPvXebL5g4h", + "hash160result": "cf7870c11608bf6e58890fbfc18ffe0db98d629a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.country" + } +} + +export const IDENTITY_BANKINGDETAILS_STREET1: VDXFKeyInterface = { + "vdxfid": "iRhANjQk2G3aFXiaGtG68kZjdYr2iVXQJJ", + "indexid": "xWXGqXqpsaGEshbc8ZvF796GfCs3bDhrgC", + "hash160result": "bd420c73e6bba2e48542cddf188c23b8c098b6f3", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.street1" + } +} + +export const IDENTITY_BANKINGDETAILS_STREET2: VDXFKeyInterface = { + "vdxfid": "iFWtcLUKAECLrREJr6mxtHM9xPUocxmTSY", + "indexid": "xLM158uQ1YR1Ub7LhnS7rfsgz3VpTpBcCu", + "hash160result": "7f1a53da2e265bab3230d9eec1ed0f36d7041484", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.street2" + } +} + +export const IDENTITY_BANKINGDETAILS_CITY: VDXFKeyInterface = { + "vdxfid": "iQxBEB8sXNez25HJCzvnTWtWqXUkEVAuo8", + "indexid": "xVnHgyZxNgseeFAL4gawRuR3sBVm7nyQqt", + "hash160result": "5878bb5b9371344acb1b679316e0e087046c95eb", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.city" + } +} + +export const IDENTITY_BANKINGDETAILS_REGION: VDXFKeyInterface = { + "vdxfid": "i4HJ5yrzBFEwjiYgzptMcrBsCeBjPYQJFX", + "indexid": "x97QYnJ52ZTcMtRirWYWbEiQEJCkKnxArM", + "hash160result": "7bf3a5ee05846c54bd19032e6ee9069cbc68d808", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.region" + } +} + +export const IDENTITY_BANKINGDETAILS_POSTALCODE: VDXFKeyInterface = { + "vdxfid": "iFVaE922Bzrro6rb87d9En2t2AAGx7EivG", + "indexid": "xLKggwT73K5XRGjcyoHJDAZR3pBHqz4Utt", + "hash160result": "ebd93a0f4fb8db6fb0cb8d397c45b41a0142d483", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.postalcode" + } +} + +export const IDENTITY_BANKINGDETAILS_TAXNUMBER: VDXFKeyInterface = { + "vdxfid": "i6Gbi3EkYrbREumkLmHUedbzrisXkRzwKY", + "indexid": "xB6iAqfqQAp5s5enCSwdd28XtNtYcHgrDb", + "hash160result": "bcc691f5d53f99e196b291ea2a00a9805ff4a61e", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.taxnumber" + } +} + +export const IDENTITY_BANKINGDETAILS_TAXCOUNTRY: VDXFKeyInterface = { + "vdxfid": "iMJzAfPjqvWJdYyoWTX79cSjd51HbVc7wC", + "indexid": "xS96dTpphEiyFirqN9BG7zyGej2JTACDB1", + "hash160result": "e19f920e684c7d906dd8c85d72a5d5f0cd6ba4c3", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.taxcountry" + } +} + +export const IDENTITY_BANKINGDETAILS_FIRSTNAME: VDXFKeyInterface = { + "vdxfid": "iGAomW7jtsy7zRaoMFU48KvrHahHwdjzi7", + "indexid": "xLzvEJYpkCBncbTqCw8D6iTPKEiJpW3beK", + "hash160result": "d33bd09ba3184bf0e3fa00ad62e92a7a99c83f8b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.firstname" + } +} + +export const IDENTITY_BANKINGDETAILS_LASTNAME: VDXFKeyInterface = { + "vdxfid": "iMrvbLJnZawGsdFshtrHM3QKa4pDPbRk3L", + "indexid": "xSh348jsQu9wVo8uZaWSKRvrbiqED1eny3", + "hash160result": "4a0d68f2cafc3cbe827a91fd5038c65878bfaec9", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.lastname" + } +} + +export const IDENTITY_BANKINGDETAILS_PHONENUMBER: VDXFKeyInterface = { + "vdxfid": "i9jKPi8ubg5fx3BBmZdiyobJxNgzcmV9et", + "indexid": "xEZRrWZzSzJLaD4DdFHsxC7qz2i1YejHqk", + "hash160result": "b092c8f73031298d26b919f4b398fa9b66f19c44", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.phonenumber" + } +} + +export const IDENTITY_BANKINGDETAILS_NUMBER: VDXFKeyInterface = { + "vdxfid": "iKGaF7fZ6yAvwJyxcmpuas2Hn9PZPF99yf", + "indexid": "xQ6ghv6dxHPbZUrzUTV4ZFYpooQaFZG1aa", + "hash160result": "fcceea7c24223218bc9313e8176daea6155e3fad", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.number" + } +} + +export const IDENTITY_BANKINGDETAILS_TYPE: VDXFKeyInterface = { + "vdxfid": "iNkzXo7BBcUvCBH8somKyFtAFsR3mmmYuG", + "indexid": "xTb6zbYG2vhapMAAjVRUweQhHXS4csH9eB", + "hash160result": "26dcd354b4b2bd8b939af29fc5ea57a082aa87d3", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.type" + } +} + +export const IDENTITY_BANKINGDETAILS_SORTCODE: VDXFKeyInterface = { + "vdxfid": "i8v2y1beTivG8Nyi6Td3VFTc2ExFQJT8pC", + "indexid": "xDk9Rp2jK38vkYrjx9HCTdz93tyGLCaa3E", + "hash160result": "27df54160c8a8a962dd455004c8afac060aeab3b", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.bankingdetails.sortcode" + } +} + +export const IDENTITY_DOCUMENTS_PASSPORT: VDXFKeyInterface = { + "vdxfid": "iJHkDyp8dPnNdrh7P9fzow4gTshpbznkSK", + "indexid": "xP7rgnFDUi13G2a9EqL9nKbDVXiqVHVtyg", + "hash160result": "456f1956c77f7ff59d98dd57030d7ed22afd7fa2", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.documents.passport" + } +} + +export const IDENTITY_RESIDENCECARD: VDXFKeyInterface = { + "vdxfid": "iQerHJHjqVT32hU1ZUyVYKQEkavs4xFtHo", + "indexid": "xVUxk6ipgofhesM3RAdeWhvmnEwsywApa2", + "hash160result": "0b2227f2bb574fe3cbcc683eecfc4d3bff884ee8", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.residencecard" + } +} + +export const IDENTITY_ATTESTOR: VDXFKeyInterface = { + "vdxfid": "iFNc5DG22Btm69wBDDXatvSPLxzJq53QBa", + "indexid": "xLCiY1h6sW7RiKpD4uBjsJxvNd1Kiej8tW", + "hash160result": "e5d18dab811f87643c1e7a63627172331be38282", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.attestor" + } +} + +export const IDENTITY_ATTESTATION_RECIPIENT: VDXFKeyInterface = { + "vdxfid": "iAkd3VBhYQ3MK6PUCtfhXrLVNbqSghxxpn", + "indexid": "xFajWHcnPiG1wGGW4aKrWEs2QFrTbwP7wd", + "hash160result": "71b7cbbfc8be868f6d9f6c481c420b002438d44f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.attestation.recipient" + } +} + diff --git a/src/vdxf/vdxfdatakeys.ts b/src/vdxf/vdxfdatakeys.ts new file mode 100644 index 0000000..f73ca5a --- /dev/null +++ b/src/vdxf/vdxfdatakeys.ts @@ -0,0 +1,438 @@ +import { VDXFKeyInterface } from "./keys" + +export const DataByteKeyName = "vrsc::data.type.byte"; +export const DataByteKey: VDXFKeyInterface = { + "vdxfid": "iBXUHbh4iacbeZnzDRxishvBSrYk2S2k7t", + "indexid": "xGMakQ89ZtqGGjg257csr6SiUWZksGmjWp", + "hash160result": "2e97a8bba443773812341e1d761530d3bba04f58", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.byte" + } +} +export const DataInt16KeyName = "vrsc::data.type.int16"; +export const DataInt16Key: VDXFKeyInterface = { + "vdxfid": "iDtTv3wf1Vk3M2Y46RjLPKtttx5hydwtY1", + "indexid": "xJiaNrNjroxhyCR5x7PVMiRRvc6ipg6N9g", + "hash160result": "ee334ebd432db0b24cc2702eda61c28ff44d3872", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int16" + } +} +export const DataUint16KeyName = "vrsc::data.type.uint16"; +export const DataUint16Key: VDXFKeyInterface = { + + "vdxfid": "iHn7urT2yVfS7pQn6WGAmCVWh4HBLV24n3", + "indexid": "xNcENet7pot6jzHoxBvKjb23iiJCGpekDk", + "hash160result": "5cfc322d2a216145f7b82714115e7953269de59c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint16" + } +} + +export const DataInt32KeyName = "vrsc::data.type.int32"; +export const DataInt32Key: VDXFKeyInterface = { + + "vdxfid": "iHpLPprRDv3H5H3ZMaJ9nyHFzkG9xJWZDb", + "indexid": "xNeSrdHW5EFwhSvbDFxJmMoo2QHAtoEaEM", + "hash160result": "3e9ba478b23b13232f28d21051d907ce8fdd509d", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int32" + } +} + +export const DataUint32KeyName = "vrsc::data.type.uint32"; + +export const DataUint32Key: VDXFKeyInterface = { + + "vdxfid": "iKSj5zhd6cSsLudaGhtfmisRNgEM7SPFWY", + "indexid": "xQGqYo8hwvfXy5Wc8PYpk7PxQLFMwfP7Fp", + "hash160result": "f279818aeb4fe768956b350d1fc7216ca0e82aaf", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint32" + } +} + +export const DataInt64KeyName = "vrsc::data.type.int64"; + +export const DataInt64Key: VDXFKeyInterface = { + + "vdxfid": "iKB3TGi9Dg5HZ4nQAgLQAgp3tuXBaRKHpC", + "indexid": "xQ19v59E4zHxBEfS2MzZ95LavZYCTTeuyg", + "hash160result": "ab3705f8a7fae59786ef897b014df85fcd9533ac", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int64" + } +} + +export const DataUint64KeyName = "vrsc::data.type.uint64"; + +export const DataUint64Key: VDXFKeyInterface = { + + "vdxfid": "iPamkQf38AeGQ8z4zSsZL7t9kXMeUkYLJL", + "indexid": "xUQtDD67yUrw2Js6r8XiJWQgnBNfNeeoUq", + "hash160result": "bb2ae9ed3e9f400def0724937fbf65f23ef690dc", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint64" + } +} + +export const DataUint160KeyName = "vrsc::data.type.uint160"; + +export const DataUint160Key: VDXFKeyInterface = { + + "vdxfid": "iAAwdbLyKYL39nJ1eQHaHtb75krg4mV1Lq", + "indexid": "xF146Pn4ArYhmxB3W5wjGH7e7Qsgx9bkpj", + "hash160result": "d97d2295d4c73f6f6f0697c8086bd822d6977549", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint160" + } +} + +export const DataUint256KeyName = "vrsc::data.type.uint256"; + +export const DataUint256Key: VDXFKeyInterface = { + + "vdxfid": "i8k7g7z6grtGYrNZmZr5TQ872aHssXuuua", + "indexid": "xDaE8vRBYB6wB2FbdFWERnee4EJtjbCtMM", + "hash160result": "939b27bea698d180237c40b2194025acc673cb39", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.uint256" + } +} + +export const DataStringKeyName = "vrsc::data.type.string"; + +export const DataStringKey: VDXFKeyInterface = { + + "vdxfid": "iK7a5JNJnbeuYWVHCDRpJosj3irGJ5Qa8c", + "indexid": "xPwgY6oPdusaAgNK3u5yHCQG5NsHEcBpi5", + "hash160result": "e5c061641228a399169211e666de18448b7b8bab", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.string" + } +} + +// this is a key for a typed vector, which will have the object type key following the vector key +export const DataVectorKeyName = "vrsc::data.type.vector"; +export const DataVectorKey: VDXFKeyInterface = { + + "vdxfid": "iAEShwk1xjdGhaUSz3Maa2XR32o3vRuHq7", + "indexid": "xF4ZAkB6p3qwKkMUqj1jYR3x4gp4mGz657", + "hash160result": "503875b0dc301189a98927d3ece56c5f921c1f4a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.vector" + } +} + +export const DataByteVectorKeyName = "vrsc::data.type.bytevector"; + +export const DataByteVectorKey: VDXFKeyInterface = { + + "vdxfid": "iKMhRLX1JHQihVZx2t2pAWW2uzmK6AzwW3", + "indexid": "xQBot8x69bdPKfSytZgy8u2ZwenKzVjR4X", + "hash160result": "cc3ae6466006629f5105f71325bb2a19107037ae", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.bytevector" + } +} + +export const DataInt32VectorKeyName = "vrsc::data.type.int32vector"; + +export const DataInt32VectorKey: VDXFKeyInterface = { + + "vdxfid": "iJZt2fcUv1iivbfC3tuPuefabcTppQEoVq", + "indexid": "xPPzVU3ZmKwPYmYDuaZYt3C7dGUqk939N7", + "hash160result": "c0847f3025c408059b5a8f6a9e414a8ed8288da5", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int32vector" + } +} + +export const DataInt64VectorKeyName = "vrsc::data.type.int64vector"; + +export const DataInt64VectorKey: VDXFKeyInterface = { + + "vdxfid": "i4qtYkFS9iNyu2AkqwoSn1xyCdfH9PUvak", + "indexid": "x9g11YgX12beXC3nhdTbkQVWEHgJ2jqfz1", + "hash160result": "c6219ea13884987453692cb14c72d5f6a47c020f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.int64vector" + } +} + +export const DataCurrencyMapKeyName = "vrsc::data.type.object.currencymap"; + +export const DataCurrencyMapKey: VDXFKeyInterface = { + + "vdxfid": "iMrGhzkZq5fpWWSa1RambRySFPb7CuvKuX", + "indexid": "xSgPAoBegPtV8gKbs7EvZpVyH3c858ZUvL", + "hash160result": "25db70c2fcae2571f89201181bec04587e1f8fc9", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.currencymap" + } +} + +export const DataRatingsKeyName = "vrsc::data.type.object.ratings"; + +export const DataRatingsKey: VDXFKeyInterface = { + + "vdxfid": "iHJComZUXXGniLkDhjYprWYEN8qvQGDoam", + "indexid": "xN8KGZzZNqVTLWdFZRCypu4mPnrwHFKbCK", + "hash160result": "32cad57ff1dc5db4b5ba573ce01bc9c89b0d9e97", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.ratings" + } +} + +export const DataURLKeyName = "vrsc::data.type.object.url"; + +export const DataURLKey: VDXFKeyInterface = { + + "vdxfid": "iJ7xdhJTJAvJubNnSJFXyA3jujzqGxjLuZ", + "indexid": "xNx56VjY9V8yXmFpHyugwYaGwQ1rCt6J9W", + "hash160result": "7748bfaf53dd2ff63ed5f73a41174c360f30a6a0", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.url" + } +} + +export const DataTransferDestinationKeyName = "vrsc::data.type.object.transferdestination"; + +export const DataTransferDestinationKey: VDXFKeyInterface = { + + "vdxfid": "i91L6zwZQrkbNVMB1AZ1Z671qybexRmeVK", + "indexid": "xDqSZoNeGAyFzfECrrDAXUdYsdcfs3Zuku", + "hash160result": "92f38773849383146037b16a48ea350c1c11ac3c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.transferdestination" + } +} + +export const UTXORefKeyName = "vrsc::data.type.object.utxoref"; + +export const UTXORefKey: VDXFKeyInterface = { + + "vdxfid": "iNcKvh7mazaXptzHf85q6EtpFYFE7asKC1", + "indexid": "xTSSPVYrSJoCT4sKWojz4dRMHCGF3h9tM4", + "hash160result": "013e760f7451c289672993ea391ae643c21ce4d1", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.utxoref" + } +} + +export const CrossChainDataRefKeyName = "vrsc::data.type.object.crosschaindataref"; + +export const CrossChainDataRefKey: VDXFKeyInterface = { + + "vdxfid": "iP3euVSzNcXUrLNHnQnR9G6q8jeYuGSxgw", + "indexid": "xTsmNHt5Dvk9UWFKe6Sa7edNAPfZmJVgLc", + "hash160result": "4d33e0aee0f648c7871b2661d1221b57c05aaed6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.crosschaindataref" + } +} + +export const EncryptionDescriptorKeyName = "vrsc::data.type.encryptiondescriptor"; + +export const EncryptionDescriptorKey: VDXFKeyInterface = { + + "vdxfid": "iHEEK8ipj58BeKZNWuaaR2tDR5RK2kmf9A", + "indexid": "xN4Lmw9uaPLrGVSQNbEjPRQkSjSKxsHUQu", + "hash160result": "8d021acc1b68335bd7d37b28ff773c138ea5dd96", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.encryptiondescriptor" + } +} + +export const SaltedDataKeyName = "vrsc::data.type.salteddata"; + +export const SaltedDataKey: VDXFKeyInterface = { + + "vdxfid": "i92U1nLuLJkC44FZZ4Lq9zk4qW3HrWAWNo", + "indexid": "xDraUamzBcxrgE8bQjzz8PGbsA4JiFskTD", + "hash160result": "9e13510e01d0d03a7bc90d7a2ef32824f515e33c", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.salteddata" + } +} + +export const DataDescriptorKeyName = "vrsc::data.type.object.datadescriptor"; + +export const DataDescriptorKey: VDXFKeyInterface = { + + "vdxfid": "i4GC1YGEVD21afWudGoFJVdnfjJ5XWnCQv", + "indexid": "x96JULhKLXEgCqPwUxTQGtAKhPK6Qh1iaW", + "hash160result": "4d4f12424ded2033a526a4e2a8835fc5b2eba208", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.object.datadescriptor" + } +} + +export const SignatureDataKeyName = "vrsc::data.signaturedata"; + +export const SignatureDataKey: VDXFKeyInterface = { + + "vdxfid": "i7PcVF9wwPtQ6p6jDtCVpohX65pTZuP2ah", + "indexid": "xCDix3b2ni74iyym5ZreoCE47jqUTBFRAb", + "hash160result": "b48b359e9a00042cec64f7f66ac717d388a4f22a", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.signaturedata" + } +} + +export const VectorUint256KeyName = "vrsc::data.mmrhashes"; + +export const VectorUint256Key: VDXFKeyInterface = { + + "vdxfid": "i9UgJ2WxGw95PKdoCXjpfnBShtP5gi9fxS", + "indexid": "xEJnkpx38FMk1VWq4DPyeAhyjYQ6X5Gsti", + "hash160result": "8c1afd59e904f6d2702699963abccbc6d326d841", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.mmrhashes" + } +} + +export const MMRLinksKeyName = "vrsc::data.mmrlinks"; + +export const MMRLinksKey: VDXFKeyInterface = { + + "vdxfid": "iPQsnA1R8UjHNddZKZ3FxsuKQ5WzKqSC7w", + "indexid": "xUEzExSVynwwzoWbBEhQwGRrRjY1Bc2MYc", + "hash160result": "f535a4e9ac0f94eda01695d16489a4a102d6b1da", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.mmrlinks" + } +} + +export const MMRDescriptorKeyName = "vrsc::data.mmrdescriptor"; + +export const MMRDescriptorKey: VDXFKeyInterface = { + + "vdxfid": "i9dVDb4LgfMYrZD1JBNP2uaso4bNAkT4Jr", + "indexid": "xETbgPVRXyaDUj639s2Y1J7QpicP4DvZMt", + "hash160result": "97273a4c02d6be002f8d69c3979616732ba68243", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.mmrdescriptor" + } +} + +export const TypeDefinitionKeyName = "vrsc::data.type.typedefinition"; + +export const TypeDefinitionKey: VDXFKeyInterface = { + + "vdxfid": "iL5MPPHWXQEY3p2Q1UsmGDvXsgPiqd1W1S", + "indexid": "xQuTrBibNiTCfyuRsAXvEcT4uLQjhxrpyL", + "hash160result": "ae8d805d9650c0512a6b6ec33e963386542f18b6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::data.type.typedefinition" + } +} + +export const MultiMapKeyName = "vrsc::identity.multimapkey"; + +export const MultiMapKey: VDXFKeyInterface = { + + "vdxfid": "i3mbggp3NBR77C5JeFQJTpAxmgMidayLLE", + "indexid": "x8bi9VF8DVdmjMxLVw4TSChVoLNjUyapgs", + "hash160result": "6920bb81b420bc95e29a10ed677379b1e39e3a03", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.multimapkey" + } +} + +export const ContentMultiMapRemoveKeyName = "vrsc::identity.multimapremove"; + +export const ContentMultiMapRemoveKey: VDXFKeyInterface = { + + "vdxfid": "i5Zkx5Z7tEfh42xtKfwbJ5LgEWE9rEgpFY", + "indexid": "xAPsQszCjYtMgCqvBMbkGTsDGAFAmrN33A", + "hash160result": "d393b986e4f82db7bec82d97b186882d739ded16", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.multimapremove" + } +} + + +// for any ID, this key indexes content that applies to representing the profile of +// that ID. there may be many mime-type instances of a particular piece of profile media +export const ProfileMediaKeyName = "vrsc::identity.profile.media"; + +export const ProfileMediaKey: VDXFKeyInterface = { + + "vdxfid": "iEYsp2njSt1M4EVYi9uuAPBU2wpKmThkkr", + "indexid": "xKNzGqDpJCE1gQNaZqa48mi14bqLaG669g", + "hash160result": "e95b2ee1abb130a93900ddaef2d8e528010f7c79", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::identity.profile.media" + } +} + +export const ZMemoMessageKeyName = "vrsc::system.zmemo.message"; + +export const ZMemoMessageKey: VDXFKeyInterface = { + + "vdxfid": "iNHg1n828PUxktkYeNxC6sdVmuKTipn3L3", + "indexid": "xT7nUaZ6yhhdP4daW4cM5GA2oZLUaNVaBD", + "hash160result": "4a8f418203621f10d1a61701be8dbbbb38fa5cce", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::system.zmemo.message" + } +} + +export const ZMemoSignatureKeyName = "vrsc::system.zmemo.signature"; + +export const ZMemoSignatureKey: VDXFKeyInterface = { + + "vdxfid": "i7mrLLjUfGYuHJwnsxFvd282hsdn4staJG", + "indexid": "xCbxo9AZWamZuUppjdv5bQeZjXeo1vbaCc", + "hash160result": "7b47c8cd90c4c3ddc542f37ca77473b7325a272f", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::system.zmemo.signature" + } +} + +export const CurrencyStartNotarizationKeyName = "vrsc::system.currency.startnotarization"; + +export const CurrencyStartNotarizationKey: VDXFKeyInterface = { + + "vdxfid": "iRvxVcGLaCXcDiAfnQ5FfeBCo2AiBibAft", + "indexid": "xWm4xQhRRWkGqt3he5jQe2hjpgBj5C7Tj3", + "hash160result": "b537201ca6465976bea7bdb03119644a858052f6", + "qualifiedname": { + "namespace": "i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", + "name": "vrsc::system.currency.startnotarization" + } +} From 032524eb137699eb28751d18c6e649a9af4b281e Mon Sep 17 00:00:00 2001 From: Monkins1010 Date: Wed, 20 Nov 2024 14:18:46 +0000 Subject: [PATCH 118/120] Fix serializers and add tests --- dist/index.d.ts | 1 + dist/index.js | 1 + dist/pbaas/ContentMultiMapRemove.js | 10 +- dist/pbaas/CurrencyValueMap.d.ts | 3 + dist/pbaas/CurrencyValueMap.js | 7 + dist/pbaas/Identity.d.ts | 1 + dist/pbaas/Identity.js | 3 + dist/pbaas/Rating.d.ts | 4 +- dist/pbaas/Rating.js | 6 +- dist/pbaas/SignatureData.js | 4 +- dist/pbaas/VdxfUniValue.js | 2 +- dist/pbaas/transaction/IdentityScript.js | 43 +++++-- dist/utils/cccustom.d.ts | 20 +++ dist/utils/cccustom.js | 23 ++++ .../pbaas/contentMultiMapRemove.test.ts | 27 ++++ src/__tests__/pbaas/crossChainDataRef.test.ts | 29 +++++ src/__tests__/pbaas/currencyValueMap.test.ts | 31 +++++ src/__tests__/pbaas/dataDescriptor.test.ts | 56 +++++++- src/__tests__/pbaas/identity.test.ts | 28 ++++ src/__tests__/pbaas/rating.test.ts | 25 ++++ src/__tests__/pbaas/reservetransfer.test.ts | 43 +------ src/__tests__/pbaas/saltedData.test.ts | 22 ++++ src/__tests__/pbaas/signatureData.test.ts | 24 ++++ src/__tests__/pbaas/vdxfunivalue.test.ts | 120 ++++++++++++++++++ src/__tests__/vdxf/loginconsent.test.ts | 3 +- src/index.ts | 1 + src/pbaas/ContentMultiMapRemove.ts | 10 +- src/pbaas/CrossChainDataRef.ts | 18 ++- src/pbaas/CurrencyValueMap.ts | 12 +- src/pbaas/Identity.ts | 4 + src/pbaas/Rating.ts | 8 +- src/pbaas/SaltedData.ts | 102 +++++++++++++++ src/pbaas/SignatureData.ts | 4 +- src/pbaas/VdxfUniValue.ts | 2 +- src/pbaas/transaction/IdentityScript.ts | 46 +++++-- src/utils/cccustom.ts | 20 +++ 36 files changed, 666 insertions(+), 97 deletions(-) create mode 100644 dist/utils/cccustom.d.ts create mode 100644 dist/utils/cccustom.js create mode 100644 src/__tests__/pbaas/contentMultiMapRemove.test.ts create mode 100644 src/__tests__/pbaas/crossChainDataRef.test.ts create mode 100644 src/__tests__/pbaas/currencyValueMap.test.ts create mode 100644 src/__tests__/pbaas/rating.test.ts create mode 100644 src/__tests__/pbaas/saltedData.test.ts create mode 100644 src/__tests__/pbaas/signatureData.test.ts create mode 100644 src/pbaas/SaltedData.ts create mode 100644 src/utils/cccustom.ts diff --git a/dist/index.d.ts b/dist/index.d.ts index c3e1d5e..ae4f47f 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -11,6 +11,7 @@ export * from './utils/varuint'; export * from './utils/ops'; export * from './utils/evals'; export * from './utils/script'; +export * from './utils/cccustom'; export * from './pbaas/index'; export * from './identity/IdentityDefinition'; export * from './currency/CurrencyDefinition'; diff --git a/dist/index.js b/dist/index.js index 1c8797b..eeef48b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -28,6 +28,7 @@ __exportStar(require("./utils/varuint"), exports); __exportStar(require("./utils/ops"), exports); __exportStar(require("./utils/evals"), exports); __exportStar(require("./utils/script"), exports); +__exportStar(require("./utils/cccustom"), exports); __exportStar(require("./pbaas/index"), exports); __exportStar(require("./identity/IdentityDefinition"), exports); __exportStar(require("./currency/CurrencyDefinition"), exports); diff --git a/dist/pbaas/ContentMultiMapRemove.js b/dist/pbaas/ContentMultiMapRemove.js index 4beb433..7e04b6d 100644 --- a/dist/pbaas/ContentMultiMapRemove.js +++ b/dist/pbaas/ContentMultiMapRemove.js @@ -8,15 +8,15 @@ const vdxf_1 = require("../constants/vdxf"); const { BufferReader, BufferWriter } = bufferutils_1.default; class ContentMultiMapRemove { constructor(data) { - this.version = data.version || new bn_js_1.BN(1, 10); - this.action = data.action || new bn_js_1.BN(0, 10); - this.entry_key = data.entry_key || ""; - this.value_hash = data.value_hash || Buffer.alloc(0); + this.version = (data === null || data === void 0 ? void 0 : data.version) || new bn_js_1.BN(1, 10); + this.action = (data === null || data === void 0 ? void 0 : data.action) || new bn_js_1.BN(0, 10); + this.entry_key = (data === null || data === void 0 ? void 0 : data.entry_key) || ""; + this.value_hash = (data === null || data === void 0 ? void 0 : data.value_hash) || Buffer.alloc(0); } getByteLength() { let byteLength = 0; byteLength += 4; // version uint32 - byteLength + 4; // action uint32 + byteLength += 4; // action uint32 if (this.action != ContentMultiMapRemove.ACTION_CLEAR_MAP) { byteLength += 20; if (this.action != ContentMultiMapRemove.ACTION_REMOVE_ALL_KEY) { diff --git a/dist/pbaas/CurrencyValueMap.d.ts b/dist/pbaas/CurrencyValueMap.d.ts index ffc1d08..155d500 100644 --- a/dist/pbaas/CurrencyValueMap.d.ts +++ b/dist/pbaas/CurrencyValueMap.d.ts @@ -17,4 +17,7 @@ export declare class CurrencyValueMap implements SerializableEntity { toJson(): { [key: string]: string; }; + static fromJson(data: { + [key: string]: string; + }, multivalue?: boolean): CurrencyValueMap; } diff --git a/dist/pbaas/CurrencyValueMap.js b/dist/pbaas/CurrencyValueMap.js index 9a26d01..3f55080 100644 --- a/dist/pbaas/CurrencyValueMap.js +++ b/dist/pbaas/CurrencyValueMap.js @@ -74,5 +74,12 @@ class CurrencyValueMap { } return value_map; } + static fromJson(data, multivalue = false) { + const value_map = new Map(); + for (let key in data) { + value_map.set(key, new bn_js_1.BN(data[key])); + } + return new CurrencyValueMap({ value_map, multivalue }); + } } exports.CurrencyValueMap = CurrencyValueMap; diff --git a/dist/pbaas/Identity.d.ts b/dist/pbaas/Identity.d.ts index 59c96f0..da52ae4 100644 --- a/dist/pbaas/Identity.d.ts +++ b/dist/pbaas/Identity.d.ts @@ -68,6 +68,7 @@ export declare class Identity extends Principal implements SerializableEntity { unlock_after?: BigNumber; }); getByteLength(): number; + clearContentMultiMap(): void; toBuffer(): Buffer; fromBuffer(buffer: Buffer, offset?: number, parseVdxfObjects?: boolean): number; toJson(): VerusCLIVerusIDJson; diff --git a/dist/pbaas/Identity.js b/dist/pbaas/Identity.js index 3cc2d26..67957b5 100644 --- a/dist/pbaas/Identity.js +++ b/dist/pbaas/Identity.js @@ -85,6 +85,9 @@ class Identity extends Principal_1.Principal { } return length; } + clearContentMultiMap() { + this.content_multimap = new ContentMultiMap_1.ContentMultiMap({ kv_content: new Map() }); + } toBuffer() { const writer = new BufferWriter(Buffer.alloc(this.getByteLength())); writer.writeSlice(super.toBuffer()); diff --git a/dist/pbaas/Rating.d.ts b/dist/pbaas/Rating.d.ts index ec6429c..cf550b3 100644 --- a/dist/pbaas/Rating.d.ts +++ b/dist/pbaas/Rating.d.ts @@ -5,7 +5,9 @@ import { SerializableEntity } from '../utils/types/SerializableEntity'; export interface RatingJson { version: number; trustlevel: number; - ratings: Map; + ratingsmap: { + [key: string]: string; + }; } export declare class Rating implements SerializableEntity { static VERSION_INVALID: import("bn.js"); diff --git a/dist/pbaas/Rating.js b/dist/pbaas/Rating.js index a96dc12..dfab329 100644 --- a/dist/pbaas/Rating.js +++ b/dist/pbaas/Rating.js @@ -16,7 +16,7 @@ class Rating { getByteLength() { let byteLength = 0; byteLength += 4; // version uint32 - byteLength + 1; // trust_level uint8 + byteLength += 1; // trust_level uint8 byteLength += varuint_1.default.encodingLength(this.ratings.size); for (const [key, value] of this.ratings) { byteLength += 20; @@ -67,8 +67,8 @@ class Rating { } static fromJson(json) { const ratings = new Map(); - for (const key in json.ratings) { - ratings.set(key, Buffer.from(json.ratings[key], 'hex')); + for (const key in json.ratingsmap) { + ratings.set(key, Buffer.from(json.ratingsmap[key], 'hex')); } return new Rating({ version: new bn_js_1.BN(json.version), diff --git a/dist/pbaas/SignatureData.js b/dist/pbaas/SignatureData.js index 81114da..db90a8d 100644 --- a/dist/pbaas/SignatureData.js +++ b/dist/pbaas/SignatureData.js @@ -36,10 +36,10 @@ class SignatureData { signatureData.identity_ID = data.identityid; signatureData.sig_type = new bn_js_1.BN(data.signaturetype); if (signatureData.hash_type == new bn_js_1.BN(DataDescriptor_1.EHashTypes.HASH_SHA256)) { - signatureData.signature_hash = Buffer.from(data.signaturehash, 'hex').reverse(); + signatureData.signature_hash = Buffer.from(data.signaturehash, 'hex'); } else { - signatureData.signature_hash = Buffer.from(data.signaturehash, 'hex'); + signatureData.signature_hash = Buffer.from(data.signaturehash, 'hex').reverse(); } signatureData.signature_as_vch = Buffer.from(data.signature, 'base64'); signatureData.vdxf_keys = data.vdxfkeys || []; diff --git a/dist/pbaas/VdxfUniValue.js b/dist/pbaas/VdxfUniValue.js index 0a97e84..afce1f1 100644 --- a/dist/pbaas/VdxfUniValue.js +++ b/dist/pbaas/VdxfUniValue.js @@ -282,7 +282,7 @@ class VdxfUniValue { let objSize = 0; checkVal = (0, address_1.toBase58Check)(reader.readSlice(vdxf_1.HASH160_BYTE_LENGTH), vdxf_1.I_ADDR_VERSION); if (checkVal == VDXF_Data.DataCurrencyMapKey.vdxfid) { - const oneCurrencyMap = new CurrencyValueMap_1.CurrencyValueMap(); + const oneCurrencyMap = new CurrencyValueMap_1.CurrencyValueMap({ multivalue: true }); version = reader.readVarInt(); objSize = reader.readCompactSize(); reader.offset = oneCurrencyMap.fromBuffer(reader.buffer, reader.offset); diff --git a/dist/pbaas/transaction/IdentityScript.js b/dist/pbaas/transaction/IdentityScript.js index c40c693..89288fa 100644 --- a/dist/pbaas/transaction/IdentityScript.js +++ b/dist/pbaas/transaction/IdentityScript.js @@ -8,6 +8,8 @@ const SmartTransactionScript_1 = require("./SmartTransactionScript"); const evals_1 = require("../../utils/evals"); const TxDestination_1 = require("../TxDestination"); const IdentityID_1 = require("../IdentityID"); +const cccustom_1 = require("../../utils/cccustom"); +const KeyID_1 = require("../KeyID"); class IdentityScript extends SmartTransactionScript_1.SmartTransactionScript { constructor(master, params) { super(master, params); @@ -17,16 +19,27 @@ class IdentityScript extends SmartTransactionScript_1.SmartTransactionScript { throw new Error("Cannot generate script for outdated identity version"); } const identityAddress = identity.getIdentityAddress(); + const destinationsMaster = identity.isRevoked() ? [ + new TxDestination_1.TxDestination(IdentityID_1.IdentityID.fromAddress(identityAddress)), + new TxDestination_1.TxDestination(identity.recovery_authority) + ] : [ + new TxDestination_1.TxDestination(IdentityID_1.IdentityID.fromAddress(identityAddress)), + new TxDestination_1.TxDestination(identity.revocation_authority), + new TxDestination_1.TxDestination(identity.recovery_authority) + ]; + const destinationsRecovery = [ + new TxDestination_1.TxDestination(identity.recovery_authority) + ]; + if (identity.hasTokenizedIdControl()) { + const addrDestination = new TxDestination_1.TxDestination(KeyID_1.KeyID.fromAddress(cccustom_1.IDENTITY_RECOVER_ADDR)); + destinationsRecovery.push(addrDestination); + } const master = new OptCCParams_1.OptCCParams({ version: Identity_1.Identity.VERSION_CURRENT, eval_code: new bn_js_1.BN(evals_1.EVALS.EVAL_NONE), m: new bn_js_1.BN(1), - n: new bn_js_1.BN(3), - destinations: [ - new TxDestination_1.TxDestination(IdentityID_1.IdentityID.fromAddress(identityAddress)), - new TxDestination_1.TxDestination(identity.revocation_authority), - new TxDestination_1.TxDestination(identity.recovery_authority) - ], + n: new bn_js_1.BN(destinationsMaster.length), + destinations: destinationsMaster, vdata: [] }); const params = new OptCCParams_1.OptCCParams({ @@ -37,7 +50,17 @@ class IdentityScript extends SmartTransactionScript_1.SmartTransactionScript { destinations: [ new TxDestination_1.TxDestination(IdentityID_1.IdentityID.fromAddress(identityAddress)) ], - vdata: [ + vdata: identity.isRevoked() ? [ + identity.toBuffer(), + new OptCCParams_1.OptCCParams({ + version: Identity_1.Identity.VERSION_CURRENT, + eval_code: new bn_js_1.BN(evals_1.EVALS.EVAL_IDENTITY_RECOVER), + m: new bn_js_1.BN(1), + n: new bn_js_1.BN(destinationsRecovery.length), + destinations: destinationsRecovery, + vdata: [] + }).toChunk() + ] : [ identity.toBuffer(), new OptCCParams_1.OptCCParams({ version: Identity_1.Identity.VERSION_CURRENT, @@ -53,10 +76,8 @@ class IdentityScript extends SmartTransactionScript_1.SmartTransactionScript { version: Identity_1.Identity.VERSION_CURRENT, eval_code: new bn_js_1.BN(evals_1.EVALS.EVAL_IDENTITY_RECOVER), m: new bn_js_1.BN(1), - n: new bn_js_1.BN(1), - destinations: [ - new TxDestination_1.TxDestination(identity.recovery_authority) - ], + n: new bn_js_1.BN(destinationsRecovery.length), + destinations: destinationsRecovery, vdata: [] }).toChunk() ] diff --git a/dist/utils/cccustom.d.ts b/dist/utils/cccustom.d.ts new file mode 100644 index 0000000..e5bbe42 --- /dev/null +++ b/dist/utils/cccustom.d.ts @@ -0,0 +1,20 @@ +export declare const STAKE_GUARD_ADDR = "RCG8KwJNDVwpUBcdoa6AoHqHVJsA1uMYMR"; +export declare const PBAAS_DEFINITION_ADDR = "RP7id3CzCnwvzNUZesYJM6ekvsxpEzMqB1"; +export declare const NOTARY_EVIDENCE_ADDR = "RQWMeecjGFF3ZAVeSimRbyG9iMDUHPY5Ny"; +export declare const EARNED_NOTARIZATION_ADDR = "RMYbaxFsCT1xfMmwLCCYAVf2DsxcDTtBmx"; +export declare const ACCEPTED_NOTARIZATION_ADDR = "RDTq9qn1Lthv7fvsdbWz36mGp8HK9XaruZ"; +export declare const FINALIZE_NOTARIZATION_ADDR = "RRbKYitLH9EhQCvCo4bPZqJx3TWxASadxE"; +export declare const RESERVE_OUTPUT_ADDR = "RMXeZGxxRuABFkT4uLSCeuJHLegBNGZq8D"; +export declare const ADVANCED_NAME_RESERVATION_ADDR = "REuGNkgunnw1J4Zx6Y9UCp8YHVZqYATe9D"; +export declare const RESERVE_TRANSFER_ADDR = "RTqQe58LSj2yr5CrwYFwcsAQ1edQwmrkUU"; +export declare const RESERVE_DEPOSIT_ADDR = "RFw9AVfgNKcHe2Vp2eyzHrX65aFD9Ky8df"; +export declare const CROSS_CHAIN_EXPORT_ADDR = "RGkrs7SndcpsV61oKK2jYdMiU8PgkLU2qP"; +export declare const CROSS_CHAIN_IMPORT_ADDR = "RKLN7wFhbrJFkPG8XkKteErAe5CjqoddTm"; +export declare const CURRENCY_STATE_ADDR = "REU1HKkmdwdxKMpfD3QoxeERYd9tfMN6n9"; +export declare const IDENTITY_PRIMARY_ADDR = "RS545EBdK5AzPTaGHNUg78wFuuAzBb74FB"; +export declare const IDENTITY_REVOKE_ADDR = "RG6My2zwh9hBFSgUhZ5UmmUtxBap57aU4N"; +export declare const IDENTITY_RECOVER_ADDR = "RRw9rJMPwdNqC1wgXn5vryJwMDyBgpXjYT"; +export declare const IDENTITY_COMMITMENT_ADDR = "RCySaThHfVBcHZgjJGoBw3un4vcsRJNPYw"; +export declare const IDENTITY_RESERVATION_ADDR = "RDbzJU8rEv4CkMABNUnKQoKDTfnikSm9fM"; +export declare const FINALIZE_EXPORT_ADDR = "REL7oLNeaeoQB1XauiHfcvjKMZC52Uj5xF"; +export declare const FEE_POOL_ADDR = "RQ55dLQ7uGnLx8scXfkaFV6QS6qVBGyxAG"; diff --git a/dist/utils/cccustom.js b/dist/utils/cccustom.js new file mode 100644 index 0000000..1acb4d5 --- /dev/null +++ b/dist/utils/cccustom.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FEE_POOL_ADDR = exports.FINALIZE_EXPORT_ADDR = exports.IDENTITY_RESERVATION_ADDR = exports.IDENTITY_COMMITMENT_ADDR = exports.IDENTITY_RECOVER_ADDR = exports.IDENTITY_REVOKE_ADDR = exports.IDENTITY_PRIMARY_ADDR = exports.CURRENCY_STATE_ADDR = exports.CROSS_CHAIN_IMPORT_ADDR = exports.CROSS_CHAIN_EXPORT_ADDR = exports.RESERVE_DEPOSIT_ADDR = exports.RESERVE_TRANSFER_ADDR = exports.ADVANCED_NAME_RESERVATION_ADDR = exports.RESERVE_OUTPUT_ADDR = exports.FINALIZE_NOTARIZATION_ADDR = exports.ACCEPTED_NOTARIZATION_ADDR = exports.EARNED_NOTARIZATION_ADDR = exports.NOTARY_EVIDENCE_ADDR = exports.PBAAS_DEFINITION_ADDR = exports.STAKE_GUARD_ADDR = void 0; +exports.STAKE_GUARD_ADDR = "RCG8KwJNDVwpUBcdoa6AoHqHVJsA1uMYMR"; +exports.PBAAS_DEFINITION_ADDR = "RP7id3CzCnwvzNUZesYJM6ekvsxpEzMqB1"; +exports.NOTARY_EVIDENCE_ADDR = "RQWMeecjGFF3ZAVeSimRbyG9iMDUHPY5Ny"; +exports.EARNED_NOTARIZATION_ADDR = "RMYbaxFsCT1xfMmwLCCYAVf2DsxcDTtBmx"; +exports.ACCEPTED_NOTARIZATION_ADDR = "RDTq9qn1Lthv7fvsdbWz36mGp8HK9XaruZ"; +exports.FINALIZE_NOTARIZATION_ADDR = "RRbKYitLH9EhQCvCo4bPZqJx3TWxASadxE"; +exports.RESERVE_OUTPUT_ADDR = "RMXeZGxxRuABFkT4uLSCeuJHLegBNGZq8D"; +exports.ADVANCED_NAME_RESERVATION_ADDR = "REuGNkgunnw1J4Zx6Y9UCp8YHVZqYATe9D"; +exports.RESERVE_TRANSFER_ADDR = "RTqQe58LSj2yr5CrwYFwcsAQ1edQwmrkUU"; +exports.RESERVE_DEPOSIT_ADDR = "RFw9AVfgNKcHe2Vp2eyzHrX65aFD9Ky8df"; +exports.CROSS_CHAIN_EXPORT_ADDR = "RGkrs7SndcpsV61oKK2jYdMiU8PgkLU2qP"; +exports.CROSS_CHAIN_IMPORT_ADDR = "RKLN7wFhbrJFkPG8XkKteErAe5CjqoddTm"; +exports.CURRENCY_STATE_ADDR = "REU1HKkmdwdxKMpfD3QoxeERYd9tfMN6n9"; +exports.IDENTITY_PRIMARY_ADDR = "RS545EBdK5AzPTaGHNUg78wFuuAzBb74FB"; +exports.IDENTITY_REVOKE_ADDR = "RG6My2zwh9hBFSgUhZ5UmmUtxBap57aU4N"; +exports.IDENTITY_RECOVER_ADDR = "RRw9rJMPwdNqC1wgXn5vryJwMDyBgpXjYT"; +exports.IDENTITY_COMMITMENT_ADDR = "RCySaThHfVBcHZgjJGoBw3un4vcsRJNPYw"; +exports.IDENTITY_RESERVATION_ADDR = "RDbzJU8rEv4CkMABNUnKQoKDTfnikSm9fM"; +exports.FINALIZE_EXPORT_ADDR = "REL7oLNeaeoQB1XauiHfcvjKMZC52Uj5xF"; +exports.FEE_POOL_ADDR = "RQ55dLQ7uGnLx8scXfkaFV6QS6qVBGyxAG"; diff --git a/src/__tests__/pbaas/contentMultiMapRemove.test.ts b/src/__tests__/pbaas/contentMultiMapRemove.test.ts new file mode 100644 index 0000000..ecfb030 --- /dev/null +++ b/src/__tests__/pbaas/contentMultiMapRemove.test.ts @@ -0,0 +1,27 @@ +import { ContentMultiMapRemove } from "../../pbaas/ContentMultiMapRemove"; +import { DATA_TYPE_STRING } from "../../vdxf"; +import { VDXF_UNI_VALUE_VERSION_CURRENT, VdxfUniValue } from "../../pbaas/VdxfUniValue"; +import { BN } from 'bn.js'; + +describe('Serializes and deserializes ContentMultiMapRemove', () => { + + function testContentMultiMapRemove() { + const c = new ContentMultiMapRemove({ + version: new BN(1), + action: ContentMultiMapRemove.ACTION_REMOVE_ONE_KEYVALUE, + entry_key: "iPsFBfFoCcxtuZNzE8yxPQhXVn4dmytf8j", + value_hash: Buffer.alloc(32).fill("h") + }); + + const cFromBuf = new ContentMultiMapRemove(); + + cFromBuf.fromBuffer(c.toBuffer()); + + expect(cFromBuf.toBuffer().toString('hex')).toBe(c.toBuffer().toString('hex')); + expect(ContentMultiMapRemove.fromJson(c.toJson()).toBuffer().toString("hex")).toBe(cFromBuf.toBuffer().toString('hex')); + } + + test('test CMMR with vdxfunivalue content', () => { + testContentMultiMapRemove(); + }); +}); \ No newline at end of file diff --git a/src/__tests__/pbaas/crossChainDataRef.test.ts b/src/__tests__/pbaas/crossChainDataRef.test.ts new file mode 100644 index 0000000..dfc31b3 --- /dev/null +++ b/src/__tests__/pbaas/crossChainDataRef.test.ts @@ -0,0 +1,29 @@ +import { CrossChainDataRef, CrossChainDataRefJson } from "../../pbaas/CrossChainDataRef"; +import { URLRef, URLRefJson } from '../../pbaas/URLRef'; +import { DATA_TYPE_STRING } from "../../vdxf"; +import { VDXF_UNI_VALUE_VERSION_CURRENT, VdxfUniValue } from "../../pbaas/VdxfUniValue"; +import { BN } from 'bn.js'; + +describe('Serializes and deserializes CrossChainDataRef', () => { + + function testCrossChainDataRef() { + + const url = new URLRef({ + version: new BN(1), + url: "https://verus.io" + }); + + const c = new CrossChainDataRef(url); + + const cFromBuf = new CrossChainDataRef(); + + cFromBuf.fromBuffer(c.toBuffer()); + + expect(cFromBuf.toBuffer().toString('hex')).toBe(c.toBuffer().toString('hex')); + expect(CrossChainDataRef.fromJson(c.toJson() as CrossChainDataRefJson).toBuffer().toString("hex")).toBe(cFromBuf.toBuffer().toString('hex')); + } + + test('test CCDR with vdxfunivalue content', () => { + testCrossChainDataRef(); + }); + }); \ No newline at end of file diff --git a/src/__tests__/pbaas/currencyValueMap.test.ts b/src/__tests__/pbaas/currencyValueMap.test.ts new file mode 100644 index 0000000..348b680 --- /dev/null +++ b/src/__tests__/pbaas/currencyValueMap.test.ts @@ -0,0 +1,31 @@ +import { CurrencyValueMap } from '../../pbaas/CurrencyValueMap'; +import { URLRef, URLRefJson } from '../../pbaas/URLRef'; +import { DATA_TYPE_STRING } from "../../vdxf"; +import { VDXF_UNI_VALUE_VERSION_CURRENT, VdxfUniValue } from "../../pbaas/VdxfUniValue"; +import { BN } from 'bn.js'; +import { BigNumber } from '../../utils/types/BigNumber'; + +describe('Serializes and deserializes CurrencyValueMap', () => { + + function testCurrencyValueMap() { + + const valueMap = new Map(); + + valueMap.set("i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", new BN(100000)); + + const c = new CurrencyValueMap({ + value_map: valueMap, + }); + + const cFromBuf = new CurrencyValueMap(); + + cFromBuf.fromBuffer(c.toBuffer()); + + expect(cFromBuf.toBuffer().toString('hex')).toBe(c.toBuffer().toString('hex')); + expect(CurrencyValueMap.fromJson(c.toJson()).toBuffer().toString("hex")).toBe(cFromBuf.toBuffer().toString('hex')); + } + + test('test CurrencyValueMap with vdxfunivalue content', () => { + testCurrencyValueMap(); + }); +}); \ No newline at end of file diff --git a/src/__tests__/pbaas/dataDescriptor.test.ts b/src/__tests__/pbaas/dataDescriptor.test.ts index cf5e261..6e0f9d5 100644 --- a/src/__tests__/pbaas/dataDescriptor.test.ts +++ b/src/__tests__/pbaas/dataDescriptor.test.ts @@ -1,6 +1,8 @@ import { DataDescriptor, } from "../../pbaas/DataDescriptor"; import { PBaaSEvidenceRef } from "../../pbaas/PBaaSEvidenceRef"; import { UTXORef } from "../../pbaas/UTXORef"; +import { URLRef } from "../../pbaas/URLRef"; +import { IdentityMultimapRef } from "../../pbaas/IdentityMultimapRef"; import { CrossChainDataRef } from "../../pbaas/CrossChainDataRef"; import { VdxfUniValue } from "../../pbaas/VdxfUniValue"; import { SignatureData } from "../../pbaas/SignatureData"; @@ -149,5 +151,57 @@ describe('Serializes and deserializes dataDescriptors', () => { expect(hashes[1].length).toStrictEqual(32); }); - + test('Datadescriptor with URLRef', async () => { + + const urlRef = new URLRef({ version: new BN(1), url: "https://verus.io" }); + + const urlRefMap = new Map(); + urlRefMap.set(VDXF_Data.CrossChainDataRefKey.vdxfid, urlRef); + + const urlRefUniValue = new VdxfUniValue({ values: urlRefMap }); + + const nestedDescriptor = DataDescriptor.fromJson({ + version: 1, + "flags": 2, //FLAG_SALT_PRESENT = 2 + "objectdata": urlRefUniValue.toBuffer().toString('hex'), + "salt": "4f66603f256d3f757b6dc3ea44802d4041d2a1901e06005028fd60b85a5878a2" + }); + + const serializedDesc = nestedDescriptor.toBuffer().toString('hex'); // Serialize the request to a hex string + const newDescriptor = new DataDescriptor(); + + newDescriptor.fromBuffer(Buffer.from(serializedDesc, 'hex')); // Deserialize the request from the hex string + expect(serializedDesc).toStrictEqual(newDescriptor.toBuffer().toString('hex')) // Compare the original serialized request to the new serialized request + }); + test('Datadescriptor with IdentityMultimapRef', async () => { + + const idMultimap = new IdentityMultimapRef({ + version: new BN(1), + flags: new BN(0), + id_ID: "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq", + key: "i4GC1YGEVD21afWudGoFJVdnfjJ5XWnCQv", + height_start: new BN(0), + height_end: new BN(0), + data_hash: Buffer.alloc(0), + system_id: "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq" + }); + + const idMultimapMap = new Map(); + idMultimapMap.set(VDXF_Data.CrossChainDataRefKey.vdxfid, idMultimap); + + const idMultimapUniValue = new VdxfUniValue({ values: idMultimapMap }); + + const nestedDescriptor = DataDescriptor.fromJson({ + version: 1, + "flags": 2, //FLAG_SALT_PRESENT = 2 + "objectdata": idMultimapUniValue.toBuffer().toString('hex'), + "salt": "4f66603f256d3f757b6dc3ea44802d4041d2a1901e06005028fd60b85a5878a2" + }); + + const serializedDesc = nestedDescriptor.toBuffer().toString('hex'); // Serialize the request to a hex string + const newDescriptor = new DataDescriptor(); + + newDescriptor.fromBuffer(Buffer.from(serializedDesc, 'hex')); // Deserialize the request from the hex string + expect(serializedDesc).toStrictEqual(newDescriptor.toBuffer().toString('hex')) // Compare the original serialized request to the new serialized request + }); }); diff --git a/src/__tests__/pbaas/identity.test.ts b/src/__tests__/pbaas/identity.test.ts index 56663d6..b647270 100644 --- a/src/__tests__/pbaas/identity.test.ts +++ b/src/__tests__/pbaas/identity.test.ts @@ -381,4 +381,32 @@ describe('Serializes and deserializes identity properly', () => { expect(() => identity_frombuf.upgradeVersion(Identity.VERSION_VERUSID)).toThrowError(); expect(() => identity_frombuf.upgradeVersion(new BN(10))).toThrowError(); }); + test('clear ID contentmultimap', async () => { + const identityJson = { + "flags": 0, + "identityaddress": "iPsFBfFoCcxtuZNzE8yxPQhXVn4dmytf8j", + "minimumsignatures": 1, + "name": "Chris", + "parent": "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq", + "primaryaddresses": [ + "RKjVHqM4VF2pCfVcwGzKH7CxvfMUE4H6o8" + ], + "recoveryauthority": "iPsFBfFoCcxtuZNzE8yxPQhXVn4dmytf8j", + "revocationauthority": "iPsFBfFoCcxtuZNzE8yxPQhXVn4dmytf8j", + "timelock": 0, + "version": Identity.VERSION_VERUSID.toNumber(), + "privateaddress": "zs1wczplx4kegw32h8g0f7xwl57p5tvnprwdmnzmdnsw50chcl26f7tws92wk2ap03ykaq6jyyztfa" + }; + + const identity_frombuf = Identity.fromJson(identityJson); + + identity_frombuf.clearContentMultiMap(); + + const identity_buf = identity_frombuf.toBuffer(); + + const identity_to_json = new Identity(); + identity_to_json.fromBuffer(identity_buf); + + expect(identity_frombuf.content_multimap.kv_content.size).toBe(0); + }); }); \ No newline at end of file diff --git a/src/__tests__/pbaas/rating.test.ts b/src/__tests__/pbaas/rating.test.ts new file mode 100644 index 0000000..4761185 --- /dev/null +++ b/src/__tests__/pbaas/rating.test.ts @@ -0,0 +1,25 @@ +import { BN } from "bn.js"; +import { PRINCIPAL_DEFAULT_FLAGS, PRINCIPAL_VERSION_CURRENT, Principal } from "../../pbaas/Principal"; +import { Rating } from "../../pbaas/Rating"; +import { fromBase58Check } from "../../utils/address"; +import { KeyID } from "../../pbaas/KeyID"; + +describe('Serializes and deserializes Rating', () => { + test('(de)serialize Rating', () => { + + const ratings = new Map(); + + ratings.set("i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV", Buffer.from("aa", "hex")); + + const r = new Rating({ + version: Rating.VERSION_CURRENT, + trust_level: Rating.TRUST_APPROVED, + ratings + }); + const rFromBuf = new Rating(); + + rFromBuf.fromBuffer(r.toBuffer()) + + expect(rFromBuf.toBuffer().toString('hex')).toBe(r.toBuffer().toString('hex')) + }); + }); \ No newline at end of file diff --git a/src/__tests__/pbaas/reservetransfer.test.ts b/src/__tests__/pbaas/reservetransfer.test.ts index 9806a4e..0cb972e 100644 --- a/src/__tests__/pbaas/reservetransfer.test.ts +++ b/src/__tests__/pbaas/reservetransfer.test.ts @@ -2,7 +2,7 @@ import { BN } from "bn.js"; import { CurrencyValueMap } from "../../pbaas/CurrencyValueMap"; import { ReserveTransfer } from "../../pbaas/ReserveTransfer"; import { BigNumber } from "../../utils/types/BigNumber"; -import { DEST_ETH, DEST_ID, DEST_PKH, TransferDestination, DEST_INVALID } from "../../pbaas/TransferDestination"; +import { DEST_ETH, DEST_ID, DEST_PKH, TransferDestination } from "../../pbaas/TransferDestination"; import { fromBase58Check } from "../../utils/address"; describe('Serializes and deserializes token output properly', () => { @@ -338,45 +338,4 @@ describe('Serializes and deserializes token output properly', () => { expect(transdestid.isETHAccount()).toBe(false); expect(transdestid.isPKH()).toBe(false); }); - - test('transferdestination isValid working as intended', async () => { - const destpkh = "R9J8E2no2HVjQmzX6Ntes2ShSGcn7WiRcx"; - const desteth = "0x1f9090aae28b8a3dceadf281b0f12828e676c326"; - - const transdestpkh = new TransferDestination({ - type: DEST_PKH, - destination_bytes: fromBase58Check(destpkh).hash - }); - expect(transdestpkh.isValid()).toBe(true); - - const transdesteth = new TransferDestination({ - type: DEST_INVALID, - destination_bytes: Buffer.from(desteth.substring(2), 'hex') - }); - expect(transdesteth.isValid()).toBe(false); - }); - - test('transferdestination getAuxDest working as intended', async () => { - const destpkh = "R9J8E2no2HVjQmzX6Ntes2ShSGcn7WiRcx"; - const desteth = "0x1f9090aae28b8a3dceadf281b0f12828e676c326"; - - const auxDest = [new TransferDestination({ - type: DEST_ETH, - destination_bytes: Buffer.from(desteth.substring(2), 'hex') - })] - - const transdestpkh = new TransferDestination({ - type: DEST_PKH, - destination_bytes: fromBase58Check(destpkh).hash, - aux_dests: auxDest - }); - - const extractedAuxDest = transdestpkh.getAuxDest(0); - - expect(extractedAuxDest.getAddressString()).toBe(desteth); - expect(extractedAuxDest.isETHAccount()).toBe(true); - expect(extractedAuxDest.isPKH()).toBe(false); - expect(extractedAuxDest.isIAddr()).toBe(false); - - }); }); \ No newline at end of file diff --git a/src/__tests__/pbaas/saltedData.test.ts b/src/__tests__/pbaas/saltedData.test.ts new file mode 100644 index 0000000..c743a19 --- /dev/null +++ b/src/__tests__/pbaas/saltedData.test.ts @@ -0,0 +1,22 @@ +import { BN } from "bn.js"; +import { PRINCIPAL_DEFAULT_FLAGS, PRINCIPAL_VERSION_CURRENT, Principal } from "../../pbaas/Principal"; +import { Rating } from "../../pbaas/Rating"; +import { fromBase58Check } from "../../utils/address"; +import { SaltedData } from "../../pbaas/SaltedData"; + +describe('Serializes and deserializes SaltedData', () => { + + test('(de)serialize SaltedData', () => { + + const data = Buffer.from("0101010101010101010101010101010101010101010101010101010101010101", "hex"); + const salt = Buffer.from("0202020202020202020202020202020202020202020202020202020202020202", "hex"); + + const s = new SaltedData(data, salt); + + const sFromBuf = new SaltedData(); + + sFromBuf.fromBuffer(s.toBuffer()) + + expect(sFromBuf.toBuffer().toString('hex')).toBe(s.toBuffer().toString('hex')) + }); +}); diff --git a/src/__tests__/pbaas/signatureData.test.ts b/src/__tests__/pbaas/signatureData.test.ts new file mode 100644 index 0000000..56289dc --- /dev/null +++ b/src/__tests__/pbaas/signatureData.test.ts @@ -0,0 +1,24 @@ +import { SignatureData } from "../../pbaas/SignatureData"; + +describe('Serializes and deserializes SignatureData', () => { + test('(de)serialize SignatureData', () => { + + const data = { + "version": 1, + "systemid": "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq", + "hashtype": 1, + "signaturehash": "dfd3e3d82783360dfc675a09e6a226fd43119ef4e8d7cf553af96ea5883b51da", + "identityid": "iKjrTCwoPFRk44fAi2nYNbPG16ZUQjv1NB", + "signaturetype": 1, + "signature": "AgXOCgAAAUEfCiSukK9tg46cYOpHmxzKjNquWDyNc8H58+uLSOYmqlUcNUxWB8j3nzT1RHKeJGygdAwrUj5iZ/A9H3+qYV9H9g==" + } + + const s = SignatureData.fromJson(data); + + const sFromBuf = new SignatureData(); + + sFromBuf.fromBuffer(s.toBuffer()) + + expect(sFromBuf.toBuffer().toString('hex')).toBe(s.toBuffer().toString('hex')) + }); + }); diff --git a/src/__tests__/pbaas/vdxfunivalue.test.ts b/src/__tests__/pbaas/vdxfunivalue.test.ts index f550251..62b85ba 100644 --- a/src/__tests__/pbaas/vdxfunivalue.test.ts +++ b/src/__tests__/pbaas/vdxfunivalue.test.ts @@ -4,6 +4,13 @@ import { KeyID } from "../../pbaas/KeyID"; import { fromBase58Check } from "../../utils/address"; import { VDXF_UNI_VALUE_VERSION_CURRENT, VdxfUniValue } from "../../pbaas/VdxfUniValue"; import { DATA_TYPE_STRING, VERUSPAY_INVOICE_VDXF_KEY } from "../../vdxf"; +import { Rating } from "../../pbaas/Rating"; +import { CurrencyValueMap } from "../../pbaas"; +import { CrossChainDataRef, CrossChainDataRefJson } from "../../pbaas/CrossChainDataRef"; +import { SaltedData } from "../../pbaas/SaltedData"; +import { SignatureData } from "../../pbaas/SignatureData"; +import { MMRDescriptor } from "../../pbaas/MMRDescriptor"; +import { URLRef, URLRefJson } from "../../pbaas/URLRef"; describe('Encodes and decodes VdxfUniValue', () => { test('encode/decode VdxfUniValue with string data', () => { @@ -36,4 +43,117 @@ describe('Encodes and decodes VdxfUniValue', () => { expect(() => vFromBuf.fromBuffer(v.toBuffer(), 0)).toThrowError(); }); + + // This test uses serialized data from the daemon adter putting in the Rating object into a contentmultimap. + const multiMapwithRating = "979e0d9bc8c91be03c57bab5b45ddcf17fd5ca32011c0100000002011af5b8015c64d39ab44c60ead8317f9f5a9b6c4c0101" + + test('fail to encode/decode VdxfUniValue with unknown data', () => { + + const ratingMap = {"version":1, "trustlevel":2, "ratingsmap":{"i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV":"01"}} + + const jsonRating = Rating.fromJson(ratingMap); + + const v = new VdxfUniValue(); + v.fromBuffer(Buffer.from(multiMapwithRating, 'hex')); + + const extractedRating = v.values.get('iHJComZUXXGniLkDhjYprWYEN8qvQGDoam') as Rating; + + expect(jsonRating.toBuffer().toString('hex')).toBe(extractedRating.toBuffer().toString('hex')); + }); + + const multimapwithCurrencymap = "c98f1f7e5804ec1b180192f87125aefcc270db25011d011af5b8015c64d39ab44c60ead8317f9f5a9b6c4c00a0724e1809000000f478f668655" + + const multimapwithcrosschaindataref = "d6ae5ac0571b22d161261b87c748f6e0aee0334d011302011068747470733a2f2f76657275732e696f" + + const multimapwithsignaturedata = "2af2a488d317c76af6f764ec2c04009a9e358bb4019901a6ef9ea235635e328124ff3429db9f9e91b64e2d0120b793323968ea80de4df1fb78963cfb8b604b524f6a7c9069293085e076f44d5df478f668655e60f6b49e2424053166ba2cf2413901000000490205d65f00000141205e483e50265341623cd9a089baf4b913f969b5377d588044c09b7d239870d7f7205a4a4581f440db7d01049ebdfe95f5de7a6b07113f9c7f79dc6fd3da69f245" + + const multimapwithmmrdescriptor = "4382a62b73169697c3698d2f00bed6024c3a279701fd5402010501010549b00ad8606acbf5234700daa308a2c64c1f9466c11d47255a60f8ccf9c74ba82b994a03b9b0331bc6f1bf25bbc8b4453a130d65b6a9dc21f7589967e88e51d930682469b03873c54e7720d89d4a9333fe85519a447b886b6c6c8aabee6fb144e9742b76b745dbdfd83c9a0105808207c6db9c149dcaff5f502baf891642e67e7e303c0ba8130f2bff76d8247929bc7ce55fdf66bac03ea808006dc5e71aa12deaff355985c7770ee7a534d9cea2bfc10851ed5c91467083ffb1f746161f5d567b4be5c98d72300e1762697d5f62067d819ac0b35ac2c712c6e8e04cefaecaf759f38f4fa3ff4d3fc4d1dccbb6b820230df92c25958999741329ed3dafc7825900807cbf6b02becc236ce573158a4f0201057c97c0b93faab9462670a5a13da88d9ca796db968ae9c9f1b88df67c564b73cb63f752248402844522efaa62e5b42ce816d0a9f44ca14efaf6f7fe47d916e77b54266c5cac39c6771e899ebda093c566d33bbf60b4a598ea45bf2f5fb1f0cd782baaf092a880a799e0771144a9e9422eec107e43d23ba9386bb46dde0920d7a908ddf6f4d6261d25c62ca086bb3f570b07d74a59256feed13d64d6fbadd201057bd1ce7cab498d9a87bbf3c8d5f255cf209e87adf01f407751959f2d49f23056597a51240e90d5f758adc92e819f77f698fe754c9ea350c213dbcbffdaeb6d9a55bbaf705af9a375c855e7a8ca486bc65b1bd24c35e13f437a7490ecaffeff0323e7508a6cc4e36c5414b4cd7d3125ffabfa3fe85a56e4f6e539925b20822d2b817613d5eb5daf4893afc57289d0081f8fe225c77e1e4839aa0822b9a5" + + test('deserialize currency map from vdxfuniValue', () => { + const v = new VdxfUniValue(); + v.fromBuffer(Buffer.from(multimapwithCurrencymap, 'hex')); + + const currencyMap = v.values.get('iMrGhzkZq5fpWWSa1RambRySFPb7CuvKuX') as CurrencyValueMap; + + const jsonCurrencyMap = {"i5w5MuNik5NtLcYmNzcvaoixooEebB6MGV":"10000000000000"}; + const currencyMapFromJson = CurrencyValueMap.fromJson(jsonCurrencyMap, true); + + expect(currencyMap.toBuffer().toString('hex')).toBe(currencyMapFromJson.toBuffer().toString('hex')); + }); + + test('deserialize crosschain data ref from vdxfuniValue', () => { + const v = new VdxfUniValue(); + v.fromBuffer(Buffer.from(multimapwithcrosschaindataref, 'hex')); + + const crossChainDataRef = v.values.get('iP3euVSzNcXUrLNHnQnR9G6q8jeYuGSxgw') as CrossChainDataRef; + + const jsonCrossChainDataRef = {"version":"1", "url":"https://verus.io"}; + + const crossChainDataRefFromJson = new CrossChainDataRef(URLRef.fromJson(jsonCrossChainDataRef)); + + expect(crossChainDataRef.toBuffer().toString('hex')).toBe(crossChainDataRefFromJson.toBuffer().toString('hex')); + }); + + test('deserialize signature data from vdxfuniValue', () => { + const v = new VdxfUniValue(); + v.fromBuffer(Buffer.from(multimapwithsignaturedata, 'hex')); + + const signatureData = v.values.get('i7PcVF9wwPtQ6p6jDtCVpohX65pTZuP2ah') as SignatureData; + + const jsonSignatureData = { + "version": 1, + "systemid": "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq", + "hashtype": 1, + "signaturehash": "5d4df476e085302969907c6a4f524b608bfb3c9678fbf14dde80ea68393293b7", + "identityid": "iRmBDWNs2WahXDAvS2TEsJyJwwHXhwcs7w", + "signaturetype": 1, + "signature": "AgXWXwAAAUEgXkg+UCZTQWI82aCJuvS5E/lptTd9WIBEwJt9I5hw1/cgWkpFgfRA230BBJ69/pX13nprBxE/nH953G/T2mnyRQ==" + } + const signatureDataFromJson = SignatureData.fromJson(jsonSignatureData); + + expect(signatureData.toBuffer().toString('hex')).toBe(signatureDataFromJson.toBuffer().toString('hex')); + }); + + test('deserialize mmr descriptor from vdxfuniValue', () => { + const v = new VdxfUniValue(); + v.fromBuffer(Buffer.from(multimapwithmmrdescriptor, 'hex')); + + const mmrDescriptor = v.values.get('i9dVDb4LgfMYrZD1JBNP2uaso4bNAkT4Jr') as MMRDescriptor; + + const jsonMMRDescriptor ={ + "version": 1, + "objecthashtype": 5, + "mmrhashtype": 1, + "mmrroot": { + "version": 1, + "flags": 5, + "objectdata": "b00ad8606acbf5234700daa308a2c64c1f9466c11d47255a60f8ccf9c74ba82b994a03b9b0331bc6f1bf25bbc8b4453a130d65b6a9dc21f7589967e88e51d930682469b03873c54e77", + "epk": "d89d4a9333fe85519a447b886b6c6c8aabee6fb144e9742b76b745dbdfd83c9a" + }, + "mmrhashes": { + "version": 1, + "flags": 5, + "objectdata": "8207c6db9c149dcaff5f502baf891642e67e7e303c0ba8130f2bff76d8247929bc7ce55fdf66bac03ea808006dc5e71aa12deaff355985c7770ee7a534d9cea2bfc10851ed5c91467083ffb1f746161f5d567b4be5c98d72300e1762697d5f62067d819ac0b35ac2c712c6e8e04cefaecaf759f38f4fa3ff4d3fc4d1dccbb6b8", + "epk": "230df92c25958999741329ed3dafc7825900807cbf6b02becc236ce573158a4f" + }, + "datadescriptors": [ + { + "version": 1, + "flags": 5, + "objectdata": "97c0b93faab9462670a5a13da88d9ca796db968ae9c9f1b88df67c564b73cb63f752248402844522efaa62e5b42ce816d0a9f44ca14efaf6f7fe47d916e77b54266c5cac39c6771e899ebda093c566d33bbf60b4a598ea45bf2f5fb1f0cd782baaf092a880a799e0771144a9e9422eec107e43d23ba9386bb46dde09", + "epk": "d7a908ddf6f4d6261d25c62ca086bb3f570b07d74a59256feed13d64d6fbadd2" + }, + { + "version": 1, + "flags": 5, + "objectdata": "d1ce7cab498d9a87bbf3c8d5f255cf209e87adf01f407751959f2d49f23056597a51240e90d5f758adc92e819f77f698fe754c9ea350c213dbcbffdaeb6d9a55bbaf705af9a375c855e7a8ca486bc65b1bd24c35e13f437a7490ecaffeff0323e7508a6cc4e36c5414b4cd7d3125ffabfa3fe85a56e4f6e539925b", + "epk": "822d2b817613d5eb5daf4893afc57289d0081f8fe225c77e1e4839aa0822b9a5" + } + ] + } + const mmrDescriptorFromJson = MMRDescriptor.fromJson(jsonMMRDescriptor); + + expect(mmrDescriptor.toBuffer().toString('hex')).toBe(mmrDescriptorFromJson.toBuffer().toString('hex')); + }); + }); \ No newline at end of file diff --git a/src/__tests__/vdxf/loginconsent.test.ts b/src/__tests__/vdxf/loginconsent.test.ts index 82a9be0..33b8c21 100644 --- a/src/__tests__/vdxf/loginconsent.test.ts +++ b/src/__tests__/vdxf/loginconsent.test.ts @@ -1,5 +1,5 @@ import { Hash160 } from "../../vdxf/classes/Hash160"; -import { ATTESTATION_READ_REQUEST, IDENTITY_NAME_COMMITMENT_TXID, IDENTITY_REGISTRATION_TXID, IDENTITY_VIEW, ID_ADDRESS_VDXF_KEY, ID_FULLYQUALIFIEDNAME_VDXF_KEY, ID_PARENT_VDXF_KEY, ID_SYSTEMID_VDXF_KEY, LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY, LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN, LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL, LOGIN_CONSENT_REDIRECT_VDXF_KEY } from "../../vdxf"; +import { IDENTITY_NAME_COMMITMENT_TXID, IDENTITY_REGISTRATION_TXID, IDENTITY_VIEW, ID_ADDRESS_VDXF_KEY, ID_FULLYQUALIFIEDNAME_VDXF_KEY, ID_PARENT_VDXF_KEY, ID_SYSTEMID_VDXF_KEY, LOGIN_CONSENT_ID_PROVISIONING_WEBHOOK_VDXF_KEY, LOGIN_CONSENT_PROVISIONING_ERROR_KEY_UNKNOWN, LOGIN_CONSENT_PROVISIONING_RESULT_STATE_PENDINGAPPROVAL, LOGIN_CONSENT_REDIRECT_VDXF_KEY } from "../../vdxf"; import { LoginConsentRequest, LoginConsentResponse } from "../../vdxf/classes"; import { ProvisioningInfo, RedirectUri, RequestedPermission, Subject } from "../../vdxf/classes/Challenge"; import { Context } from "../../vdxf/classes/Context"; @@ -219,5 +219,4 @@ describe('Serializes and deserializes signature objects properly', () => { expect(_res.getDecisionHash(10000).toString('hex')).toBe(res.getDecisionHash(10000).toString('hex')) expect(_req.getChallengeHash().toString('hex')).toBe(req.getChallengeHash().toString('hex')) }); - }); diff --git a/src/index.ts b/src/index.ts index bd12e9b..4b73ae4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -13,6 +13,7 @@ export * from './utils/varuint' export * from './utils/ops' export * from './utils/evals' export * from './utils/script' +export * from './utils/cccustom' export * from './pbaas/index' diff --git a/src/pbaas/ContentMultiMapRemove.ts b/src/pbaas/ContentMultiMapRemove.ts index fef60e8..5860f3b 100644 --- a/src/pbaas/ContentMultiMapRemove.ts +++ b/src/pbaas/ContentMultiMapRemove.ts @@ -33,17 +33,17 @@ export class ContentMultiMapRemove implements SerializableEntity { static ACTION_LAST = new BN(4); constructor(data?: { version?: BigNumber, action?: BigNumber, entry_key?: string, value_hash?: Buffer }) { - this.version = data.version || new BN(1, 10); - this.action = data.action || new BN(0, 10); - this.entry_key = data.entry_key || ""; - this.value_hash = data.value_hash || Buffer.alloc(0); + this.version = data?.version || new BN(1, 10); + this.action = data?.action || new BN(0, 10); + this.entry_key = data?.entry_key || ""; + this.value_hash = data?.value_hash || Buffer.alloc(0); } getByteLength() { let byteLength = 0; byteLength += 4; // version uint32 - byteLength + 4; // action uint32 + byteLength += 4; // action uint32 if (this.action != ContentMultiMapRemove.ACTION_CLEAR_MAP) { byteLength += 20 if (this.action != ContentMultiMapRemove.ACTION_REMOVE_ALL_KEY) { diff --git a/src/pbaas/CrossChainDataRef.ts b/src/pbaas/CrossChainDataRef.ts index 8941cc2..2c2bcee 100644 --- a/src/pbaas/CrossChainDataRef.ts +++ b/src/pbaas/CrossChainDataRef.ts @@ -13,7 +13,7 @@ import { URLRef, URLRefJson } from './URLRef'; const { BufferReader, BufferWriter } = bufferutils export type CrossChainDataRefJson = - | (PBaaSEvidenceRefJson & { type: number }) + (PBaaSEvidenceRefJson & { type: number }) | (IdentityMultimapRefJson & { type: number }) | (URLRefJson & { type: number }); @@ -65,13 +65,21 @@ export class CrossChainDataRef implements SerializableEntity { } offset = this.ref.fromBuffer(buffer, reader.offset); - return reader.offset; + return offset; } isValid(): boolean { - return (typeof (this.ref) == typeof (PBaaSEvidenceRef) && this.ref.isValid()) || - (typeof (this.ref) == typeof (IdentityMultimapRef) && this.ref.isValid()) || - (typeof (this.ref) == typeof (URLRef) && this.ref.isValid()); + + switch (this.which()) { + case CrossChainDataRef.TYPE_CROSSCHAIN_DATAREF: + return this.ref.isValid(); + case CrossChainDataRef.TYPE_IDENTITY_DATAREF: + return this.ref.isValid(); + case CrossChainDataRef.TYPE_URL_REF: + return this.ref.isValid(); + default: + return false; + } } toJson() { diff --git a/src/pbaas/CurrencyValueMap.ts b/src/pbaas/CurrencyValueMap.ts index 494ea1c..db60357 100644 --- a/src/pbaas/CurrencyValueMap.ts +++ b/src/pbaas/CurrencyValueMap.ts @@ -76,7 +76,7 @@ export class CurrencyValueMap implements SerializableEntity { return reader.offset; } - + isValid():boolean { for (let [key, value] of this.value_map) @@ -99,4 +99,14 @@ export class CurrencyValueMap implements SerializableEntity { return value_map; } + + static fromJson(data: {[key: string]: string}, multivalue: boolean = false): CurrencyValueMap { + const value_map = new Map(); + + for (let key in data) { + value_map.set(key, new BN(data[key])) + } + + return new CurrencyValueMap({ value_map, multivalue }) + } } \ No newline at end of file diff --git a/src/pbaas/Identity.ts b/src/pbaas/Identity.ts index 6bf3d5c..2ba705a 100644 --- a/src/pbaas/Identity.ts +++ b/src/pbaas/Identity.ts @@ -144,6 +144,10 @@ export class Identity extends Principal implements SerializableEntity { return length; } + clearContentMultiMap() { + this.content_multimap = new ContentMultiMap({ kv_content: new Map() }); + } + toBuffer() { const writer = new BufferWriter(Buffer.alloc(this.getByteLength())); diff --git a/src/pbaas/Rating.ts b/src/pbaas/Rating.ts index 27f980b..be0a868 100644 --- a/src/pbaas/Rating.ts +++ b/src/pbaas/Rating.ts @@ -10,7 +10,7 @@ const { BufferReader, BufferWriter } = bufferutils export interface RatingJson { version: number; trustlevel: number; - ratings: Map; + ratingsmap: {[key: string]: string}; } export class Rating implements SerializableEntity { @@ -39,7 +39,7 @@ export class Rating implements SerializableEntity { let byteLength = 0; byteLength += 4; // version uint32 - byteLength + 1; // trust_level uint8 + byteLength += 1; // trust_level uint8 byteLength += varuint.encodingLength(this.ratings.size); for (const [key, value] of this.ratings) { @@ -112,8 +112,8 @@ export class Rating implements SerializableEntity { const ratings = new Map(); - for (const key in json.ratings) { - ratings.set(key, Buffer.from(json.ratings[key], 'hex')); + for (const key in json.ratingsmap) { + ratings.set(key, Buffer.from(json.ratingsmap[key], 'hex')); } return new Rating({ diff --git a/src/pbaas/SaltedData.ts b/src/pbaas/SaltedData.ts new file mode 100644 index 0000000..e064631 --- /dev/null +++ b/src/pbaas/SaltedData.ts @@ -0,0 +1,102 @@ +import varint from '../utils/varint' +import varuint from '../utils/varuint' +import { fromBase58Check, toBase58Check } from "../utils/address"; +import bufferutils from '../utils/bufferutils' +import { BN } from 'bn.js'; +import { BigNumber } from '../utils/types/BigNumber'; +import { I_ADDR_VERSION } from '../constants/vdxf'; +import { VDXFData } from '../vdxf/index'; +const { BufferReader, BufferWriter } = bufferutils +const createHash = require("create-hash"); +import { VERUS_DATA_SIGNATURE_PREFIX } from "../constants/vdxf"; +import { SaltedDataKey } from '../vdxf/vdxfdatakeys'; + +export class SaltedData extends VDXFData { + + salt: Buffer; + + static VERSION_INVALID = new BN(0); + static FIRST_VERSION = new BN(1); + static LAST_VERSION = new BN(1); + static DEFAULT_VERSION = new BN(1); + + + constructor(data?: Buffer, salt: Buffer = Buffer.alloc(0)) { + super(data); + if (salt.length != 0) { + this.salt = salt; + } + this.vdxfkey = SaltedDataKey.vdxfid; + this.version = SaltedData.DEFAULT_VERSION; + + } + + static fromJson(data: any) { + + const saltedData = new SaltedData(); + + if (data) { + if (data.version) { + saltedData.version = new BN(data.version); + } else { + saltedData.version = SaltedData.DEFAULT_VERSION; + } + if (data.salt) saltedData.salt = Buffer.from(data.salt, 'hex'); + if (data.data) saltedData.data = Buffer.from(data.data, 'hex'); + if (data.key) saltedData.vdxfkey = data.key; + } + + return saltedData; + } + getByteLength() { + let byteLength = 0; + + byteLength += 20; //key + byteLength += varint.encodingLength(this.version); + byteLength += varuint.encodingLength(this.data.length + this.salt.length); + byteLength += this.data.length + this.salt.length; + + return byteLength + } + + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())) + + bufferWriter.writeSlice(fromBase58Check(this.vdxfkey).hash); + bufferWriter.writeVarInt(this.version); + bufferWriter.writeVarSlice(Buffer.concat([this.data, this.salt])); + + return bufferWriter.buffer + } + + fromBuffer(buffer: Buffer, offset: number = 0) { + const reader = new BufferReader(buffer, offset); + + this.vdxfkey = toBase58Check(reader.readSlice(20), I_ADDR_VERSION); + this.version = reader.readVarInt(); + this.data = reader.readVarSlice(); + + this.salt = this.data.slice(this.data.length - 32); + this.data = this.data.slice(0, this.data.length - 32); + + return reader.offset; + } + + toJson(): any { + + return { + version: this.version.toString(), + key: this.vdxfkey, + data: this.data.toString('hex'), + salt: this.salt.toString('hex') + } + } + + getHash(hw: (data: Buffer) => Buffer ):Buffer { + + const hash = hw(Buffer.concat([this.data, this.salt])); + + return hash; + + } +} \ No newline at end of file diff --git a/src/pbaas/SignatureData.ts b/src/pbaas/SignatureData.ts index 8f60874..00601df 100644 --- a/src/pbaas/SignatureData.ts +++ b/src/pbaas/SignatureData.ts @@ -72,9 +72,9 @@ export class SignatureData implements SerializableEntity { signatureData.sig_type = new BN(data.signaturetype); if (signatureData.hash_type == new BN(EHashTypes.HASH_SHA256)) { - signatureData.signature_hash = Buffer.from(data.signaturehash, 'hex').reverse(); - } else { signatureData.signature_hash = Buffer.from(data.signaturehash, 'hex'); + } else { + signatureData.signature_hash = Buffer.from(data.signaturehash, 'hex').reverse(); } signatureData.signature_as_vch = Buffer.from(data.signature, 'base64'); diff --git a/src/pbaas/VdxfUniValue.ts b/src/pbaas/VdxfUniValue.ts index 4bc8c82..26a142f 100644 --- a/src/pbaas/VdxfUniValue.ts +++ b/src/pbaas/VdxfUniValue.ts @@ -350,7 +350,7 @@ export class VdxfUniValue implements SerializableEntity { checkVal = toBase58Check(reader.readSlice(HASH160_BYTE_LENGTH), I_ADDR_VERSION); if (checkVal == VDXF_Data.DataCurrencyMapKey.vdxfid) { - const oneCurrencyMap = new CurrencyValueMap(); + const oneCurrencyMap = new CurrencyValueMap({multivalue:true}); version = reader.readVarInt(); objSize = reader.readCompactSize(); reader.offset = oneCurrencyMap.fromBuffer(reader.buffer, reader.offset); diff --git a/src/pbaas/transaction/IdentityScript.ts b/src/pbaas/transaction/IdentityScript.ts index c7f41c5..f31ed64 100644 --- a/src/pbaas/transaction/IdentityScript.ts +++ b/src/pbaas/transaction/IdentityScript.ts @@ -6,6 +6,8 @@ import { SmartTransactionScript } from "./SmartTransactionScript"; import { EVALS } from "../../utils/evals"; import { TxDestination } from "../TxDestination"; import { IdentityID } from "../IdentityID"; +import { IDENTITY_RECOVER_ADDR } from "../../utils/cccustom"; +import { KeyID } from "../KeyID"; export class IdentityScript extends SmartTransactionScript implements SerializableEntity { constructor(master?: OptCCParams, params?: OptCCParams) { @@ -19,16 +21,30 @@ export class IdentityScript extends SmartTransactionScript implements Serializab const identityAddress = identity.getIdentityAddress(); + const destinationsMaster = identity.isRevoked() ? [ + new TxDestination(IdentityID.fromAddress(identityAddress)), + new TxDestination(identity.recovery_authority) + ] : [ + new TxDestination(IdentityID.fromAddress(identityAddress)), + new TxDestination(identity.revocation_authority), + new TxDestination(identity.recovery_authority) + ]; + + const destinationsRecovery = [ + new TxDestination(identity.recovery_authority) + ] + + if (identity.hasTokenizedIdControl()) { + const addrDestination = new TxDestination(KeyID.fromAddress(IDENTITY_RECOVER_ADDR)); + destinationsRecovery.push(addrDestination); + } + const master = new OptCCParams({ version: Identity.VERSION_CURRENT, eval_code: new BN(EVALS.EVAL_NONE), m: new BN(1), - n: new BN(3), - destinations: [ - new TxDestination(IdentityID.fromAddress(identityAddress)), - new TxDestination(identity.revocation_authority), - new TxDestination(identity.recovery_authority) - ], + n: new BN(destinationsMaster.length), + destinations: destinationsMaster, vdata: [] }) @@ -40,7 +56,17 @@ export class IdentityScript extends SmartTransactionScript implements Serializab destinations: [ new TxDestination(IdentityID.fromAddress(identityAddress)) ], - vdata: [ + vdata: identity.isRevoked() ? [ + identity.toBuffer(), + new OptCCParams({ + version: Identity.VERSION_CURRENT, + eval_code: new BN(EVALS.EVAL_IDENTITY_RECOVER), + m: new BN(1), + n: new BN(destinationsRecovery.length), + destinations: destinationsRecovery, + vdata: [] + }).toChunk() + ] : [ identity.toBuffer(), new OptCCParams({ version: Identity.VERSION_CURRENT, @@ -56,10 +82,8 @@ export class IdentityScript extends SmartTransactionScript implements Serializab version: Identity.VERSION_CURRENT, eval_code: new BN(EVALS.EVAL_IDENTITY_RECOVER), m: new BN(1), - n: new BN(1), - destinations: [ - new TxDestination(identity.recovery_authority) - ], + n: new BN(destinationsRecovery.length), + destinations: destinationsRecovery, vdata: [] }).toChunk() ] diff --git a/src/utils/cccustom.ts b/src/utils/cccustom.ts new file mode 100644 index 0000000..d822f1f --- /dev/null +++ b/src/utils/cccustom.ts @@ -0,0 +1,20 @@ +export const STAKE_GUARD_ADDR = "RCG8KwJNDVwpUBcdoa6AoHqHVJsA1uMYMR"; +export const PBAAS_DEFINITION_ADDR = "RP7id3CzCnwvzNUZesYJM6ekvsxpEzMqB1"; +export const NOTARY_EVIDENCE_ADDR = "RQWMeecjGFF3ZAVeSimRbyG9iMDUHPY5Ny"; +export const EARNED_NOTARIZATION_ADDR = "RMYbaxFsCT1xfMmwLCCYAVf2DsxcDTtBmx"; +export const ACCEPTED_NOTARIZATION_ADDR = "RDTq9qn1Lthv7fvsdbWz36mGp8HK9XaruZ"; +export const FINALIZE_NOTARIZATION_ADDR = "RRbKYitLH9EhQCvCo4bPZqJx3TWxASadxE"; +export const RESERVE_OUTPUT_ADDR = "RMXeZGxxRuABFkT4uLSCeuJHLegBNGZq8D"; +export const ADVANCED_NAME_RESERVATION_ADDR = "REuGNkgunnw1J4Zx6Y9UCp8YHVZqYATe9D"; +export const RESERVE_TRANSFER_ADDR = "RTqQe58LSj2yr5CrwYFwcsAQ1edQwmrkUU"; +export const RESERVE_DEPOSIT_ADDR = "RFw9AVfgNKcHe2Vp2eyzHrX65aFD9Ky8df"; +export const CROSS_CHAIN_EXPORT_ADDR = "RGkrs7SndcpsV61oKK2jYdMiU8PgkLU2qP"; +export const CROSS_CHAIN_IMPORT_ADDR = "RKLN7wFhbrJFkPG8XkKteErAe5CjqoddTm"; +export const CURRENCY_STATE_ADDR = "REU1HKkmdwdxKMpfD3QoxeERYd9tfMN6n9"; +export const IDENTITY_PRIMARY_ADDR = "RS545EBdK5AzPTaGHNUg78wFuuAzBb74FB"; +export const IDENTITY_REVOKE_ADDR = "RG6My2zwh9hBFSgUhZ5UmmUtxBap57aU4N"; +export const IDENTITY_RECOVER_ADDR = "RRw9rJMPwdNqC1wgXn5vryJwMDyBgpXjYT"; +export const IDENTITY_COMMITMENT_ADDR = "RCySaThHfVBcHZgjJGoBw3un4vcsRJNPYw"; +export const IDENTITY_RESERVATION_ADDR = "RDbzJU8rEv4CkMABNUnKQoKDTfnikSm9fM"; +export const FINALIZE_EXPORT_ADDR = "REL7oLNeaeoQB1XauiHfcvjKMZC52Uj5xF"; +export const FEE_POOL_ADDR = "RQ55dLQ7uGnLx8scXfkaFV6QS6qVBGyxAG"; \ No newline at end of file From f2f1fbbd35c2f8ac2c603dc05cccd7342f540687 Mon Sep 17 00:00:00 2001 From: Monkins1010 Date: Wed, 20 Nov 2024 14:23:21 +0000 Subject: [PATCH 119/120] update test --- .../pbaas/transaction/identityscript.test.ts | 70 ++++++++++++++++++- 1 file changed, 68 insertions(+), 2 deletions(-) diff --git a/src/__tests__/pbaas/transaction/identityscript.test.ts b/src/__tests__/pbaas/transaction/identityscript.test.ts index 2d26609..2f45a8c 100644 --- a/src/__tests__/pbaas/transaction/identityscript.test.ts +++ b/src/__tests__/pbaas/transaction/identityscript.test.ts @@ -1,10 +1,11 @@ -import { Identity } from "../../../pbaas/Identity"; +import { Identity, IDENTITY_FLAG_TOKENIZED_CONTROL } from "../../../pbaas/Identity"; +import { OptCCParams } from "../../../pbaas/OptCCParams"; import { IdentityScript } from "../../../pbaas/transaction/IdentityScript"; +import { IDENTITY_RECOVER_ADDR } from "../../../utils/cccustom"; describe('Serializes and deserializes SmartTransactionScripts', () => { test('(de)serialize a basic identity registration outscript (v1) from daemon', () => { const scriptString = "46040300010314a484f66e98c3d787b2ff8854d3ceeb5b61446978150476a348fd730beb2694f54a7114dbf14aa699f9fa150476a348fd730beb2694f54a7114dbf14aa699f9facc4ce304030e0101150476a348fd730beb2694f54a7114dbf14aa699f9fa4c8e010000000000000001143cdad2d09cbc6e164804af104b1f3f56f0d10d78010000001af5b8015c64d39ab44c60ead8317f9f5a9b6c4c0161000076a348fd730beb2694f54a7114dbf14aa699f9fa76a348fd730beb2694f54a7114dbf14aa699f9fa016931943a1979b5e0308a4da1cb62688e6d6433e4501d2c5a474987deee3137144a48978919d7e6a47670501b04030f0101150476a348fd730beb2694f54a7114dbf14aa699f9fa1b0403100101150476a348fd730beb2694f54a7114dbf14aa699f9fa75"; - const script = new IdentityScript(); script.fromBuffer(Buffer.from(scriptString, 'hex')); @@ -27,6 +28,71 @@ describe('Serializes and deserializes SmartTransactionScripts', () => { }); expect(() => IdentityScript.fromIdentity(script.getIdentity())).toThrowError() }); + test('(de)serialize a basic identity registration outscript for a revoked ID', () => { + const idjson = { + "contentmap": { + "53f36cc8554d2a9b1c86e92e77965607e242a513": "6332bd51fca724077577f93ec7eb185a45bd881268e2d9488c9ef087293e5cc4" + }, + "contentmultimap": {}, + "flags": 0, + "identityaddress": "i8byHmWFAeFMajYdgrXiQ9qZ1Y9FqxJUx1", + "minimumsignatures": 1, + "name": "VerusPay", + "parent": "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq", + "primaryaddresses": [ + "RSunNQqKnSwpNBRd6kcenScuQEFUWgL3bZ" + ], + "privateaddress": "zs1wczplx4kegw32h8g0f7xwl57p5tvnprwdmnzmdnsw50chcl26f7tws92wk2ap03ykaq6jyyztfa", + "recoveryauthority": "i9ps1xDcr7eM66Fko6aTkeuvvBPZFLEXRN", + "revocationauthority": "i98Mnj1YugaRzoURXt4aRhdqQDu7rML9J5", + "systemid": "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq", + "timelock": 0, + "version": 3 + } + + const identity = Identity.fromJson(idjson); + identity.revoke(); + + const idscript = IdentityScript.fromIdentity(identity); + + expect(idscript.masterOptCC.destinations.length).toBe(2); + expect(idscript.masterOptCC.destinations[1].toAddress()).toBe("i9ps1xDcr7eM66Fko6aTkeuvvBPZFLEXRN"); + expect(idscript.paramsOptCC.vdata.length).toBe(2); + }); + + test('(de)serialize a basic identity registration outscript for a revoked ID with tokenized ID control', () => { + const idjson = { + "contentmap": { + "53f36cc8554d2a9b1c86e92e77965607e242a513": "6332bd51fca724077577f93ec7eb185a45bd881268e2d9488c9ef087293e5cc4" + }, + "contentmultimap": {}, + "flags": 0, + "identityaddress": "i8byHmWFAeFMajYdgrXiQ9qZ1Y9FqxJUx1", + "minimumsignatures": 1, + "name": "VerusPay", + "parent": "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq", + "primaryaddresses": [ + "RSunNQqKnSwpNBRd6kcenScuQEFUWgL3bZ" + ], + "privateaddress": "zs1wczplx4kegw32h8g0f7xwl57p5tvnprwdmnzmdnsw50chcl26f7tws92wk2ap03ykaq6jyyztfa", + "recoveryauthority": "i9ps1xDcr7eM66Fko6aTkeuvvBPZFLEXRN", + "revocationauthority": "i98Mnj1YugaRzoURXt4aRhdqQDu7rML9J5", + "systemid": "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq", + "timelock": 0, + "version": 3 + } + + const identity = Identity.fromJson(idjson); + identity.flags = identity.flags.xor(IDENTITY_FLAG_TOKENIZED_CONTROL); + + const idscript = IdentityScript.fromIdentity(identity); + + expect(idscript.masterOptCC.destinations.length).toBe(3); + expect(OptCCParams.fromChunk(idscript.paramsOptCC.vdata[2]).destinations[1].toAddress()).toBe(IDENTITY_RECOVER_ADDR); + expect(OptCCParams.fromChunk(idscript.paramsOptCC.vdata[2]).n.toNumber()).toBe(2); + expect(idscript.paramsOptCC.vdata.length).toBe(3); + }); + test('(de)serialize a basic identity registration outscript (v3) from daemon with contentmap', () => { const scriptString = "470403000103150438411ff17100e15b6df8dd72fecbe4fa4964dfea15043e006293b9e3341262eed040048d3a2260367f47150445a96c0179cbb19221c0e8625a2ed691d762fd37cc4d360104030e0101150438411ff17100e15b6df8dd72fecbe4fa4964dfea4ce103000000000000000114c165bce63e47698278f859ee75c35c78eb23e8df01000000a6ef9ea235635e328124ff3429db9f9e91b64e2d085665727573506179000113a542e2075696772ee9861c9b2a4d55c86cf353c45c3e2987f09e8c48d9e2681288bd455a18ebc73ef977750724a7fc51bd32633e006293b9e3341262eed040048d3a2260367f4745a96c0179cbb19221c0e8625a2ed691d762fd370176041f9ab6ca1d155ce87a7c677e9e0d16c9846e6ee62db670751f8be3ead27cb740aa7595d0be24b741a9a6ef9ea235635e328124ff3429db9f9e91b64e2d000000001b04030f010115043e006293b9e3341262eed040048d3a2260367f471b0403100101150445a96c0179cbb19221c0e8625a2ed691d762fd3775"; From 979735d016c6375ea0311d0ecef010bffaa0e335 Mon Sep 17 00:00:00 2001 From: Monkins1010 Date: Wed, 20 Nov 2024 14:24:44 +0000 Subject: [PATCH 120/120] Update dist --- dist/pbaas/CrossChainDataRef.js | 15 ++++-- dist/pbaas/SaltedData.d.ts | 17 +++++++ dist/pbaas/SaltedData.js | 82 +++++++++++++++++++++++++++++++++ 3 files changed, 110 insertions(+), 4 deletions(-) create mode 100644 dist/pbaas/SaltedData.d.ts create mode 100644 dist/pbaas/SaltedData.js diff --git a/dist/pbaas/CrossChainDataRef.js b/dist/pbaas/CrossChainDataRef.js index a0424b1..455b096 100644 --- a/dist/pbaas/CrossChainDataRef.js +++ b/dist/pbaas/CrossChainDataRef.js @@ -45,12 +45,19 @@ class CrossChainDataRef { this.ref = new URLRef_1.URLRef(); } offset = this.ref.fromBuffer(buffer, reader.offset); - return reader.offset; + return offset; } isValid() { - return (typeof (this.ref) == typeof (PBaaSEvidenceRef_1.PBaaSEvidenceRef) && this.ref.isValid()) || - (typeof (this.ref) == typeof (IdentityMultimapRef_1.IdentityMultimapRef) && this.ref.isValid()) || - (typeof (this.ref) == typeof (URLRef_1.URLRef) && this.ref.isValid()); + switch (this.which()) { + case CrossChainDataRef.TYPE_CROSSCHAIN_DATAREF: + return this.ref.isValid(); + case CrossChainDataRef.TYPE_IDENTITY_DATAREF: + return this.ref.isValid(); + case CrossChainDataRef.TYPE_URL_REF: + return this.ref.isValid(); + default: + return false; + } } toJson() { return Object.assign(Object.assign({}, this.ref.toJson()), { type: this.which() }); diff --git a/dist/pbaas/SaltedData.d.ts b/dist/pbaas/SaltedData.d.ts new file mode 100644 index 0000000..8182888 --- /dev/null +++ b/dist/pbaas/SaltedData.d.ts @@ -0,0 +1,17 @@ +/// +/// +import { VDXFData } from '../vdxf/index'; +export declare class SaltedData extends VDXFData { + salt: Buffer; + static VERSION_INVALID: import("bn.js"); + static FIRST_VERSION: import("bn.js"); + static LAST_VERSION: import("bn.js"); + static DEFAULT_VERSION: import("bn.js"); + constructor(data?: Buffer, salt?: Buffer); + static fromJson(data: any): SaltedData; + getByteLength(): number; + toBuffer(): Buffer; + fromBuffer(buffer: Buffer, offset?: number): number; + toJson(): any; + getHash(hw: (data: Buffer) => Buffer): Buffer; +} diff --git a/dist/pbaas/SaltedData.js b/dist/pbaas/SaltedData.js new file mode 100644 index 0000000..cc68520 --- /dev/null +++ b/dist/pbaas/SaltedData.js @@ -0,0 +1,82 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SaltedData = void 0; +const varint_1 = require("../utils/varint"); +const varuint_1 = require("../utils/varuint"); +const address_1 = require("../utils/address"); +const bufferutils_1 = require("../utils/bufferutils"); +const bn_js_1 = require("bn.js"); +const vdxf_1 = require("../constants/vdxf"); +const index_1 = require("../vdxf/index"); +const { BufferReader, BufferWriter } = bufferutils_1.default; +const createHash = require("create-hash"); +const vdxfdatakeys_1 = require("../vdxf/vdxfdatakeys"); +class SaltedData extends index_1.VDXFData { + constructor(data, salt = Buffer.alloc(0)) { + super(data); + if (salt.length != 0) { + this.salt = salt; + } + this.vdxfkey = vdxfdatakeys_1.SaltedDataKey.vdxfid; + this.version = SaltedData.DEFAULT_VERSION; + } + static fromJson(data) { + const saltedData = new SaltedData(); + if (data) { + if (data.version) { + saltedData.version = new bn_js_1.BN(data.version); + } + else { + saltedData.version = SaltedData.DEFAULT_VERSION; + } + if (data.salt) + saltedData.salt = Buffer.from(data.salt, 'hex'); + if (data.data) + saltedData.data = Buffer.from(data.data, 'hex'); + if (data.key) + saltedData.vdxfkey = data.key; + } + return saltedData; + } + getByteLength() { + let byteLength = 0; + byteLength += 20; //key + byteLength += varint_1.default.encodingLength(this.version); + byteLength += varuint_1.default.encodingLength(this.data.length + this.salt.length); + byteLength += this.data.length + this.salt.length; + return byteLength; + } + toBuffer() { + const bufferWriter = new BufferWriter(Buffer.alloc(this.getByteLength())); + bufferWriter.writeSlice((0, address_1.fromBase58Check)(this.vdxfkey).hash); + bufferWriter.writeVarInt(this.version); + bufferWriter.writeVarSlice(Buffer.concat([this.data, this.salt])); + return bufferWriter.buffer; + } + fromBuffer(buffer, offset = 0) { + const reader = new BufferReader(buffer, offset); + this.vdxfkey = (0, address_1.toBase58Check)(reader.readSlice(20), vdxf_1.I_ADDR_VERSION); + this.version = reader.readVarInt(); + this.data = reader.readVarSlice(); + this.salt = this.data.slice(this.data.length - 32); + this.data = this.data.slice(0, this.data.length - 32); + return reader.offset; + } + toJson() { + return { + version: this.version.toString(), + key: this.vdxfkey, + data: this.data.toString('hex'), + salt: this.salt.toString('hex') + }; + } + getHash(hw) { + const hash = hw(Buffer.concat([this.data, this.salt])); + return hash; + } +} +exports.SaltedData = SaltedData; +SaltedData.VERSION_INVALID = new bn_js_1.BN(0); +SaltedData.FIRST_VERSION = new bn_js_1.BN(1); +SaltedData.LAST_VERSION = new bn_js_1.BN(1); +SaltedData.DEFAULT_VERSION = new bn_js_1.BN(1);