@enbox/dwn-sdk-js 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/dist/browser.mjs +135 -0
  2. package/dist/browser.mjs.map +7 -0
  3. package/dist/esm/generated/precompiled-validators.js +640 -510
  4. package/dist/esm/generated/precompiled-validators.js.map +1 -1
  5. package/dist/esm/src/core/auth.js +6 -1
  6. package/dist/esm/src/core/auth.js.map +1 -1
  7. package/dist/esm/src/core/dwn-error.js +3 -0
  8. package/dist/esm/src/core/dwn-error.js.map +1 -1
  9. package/dist/esm/src/core/protocol-authorization.js +4 -0
  10. package/dist/esm/src/core/protocol-authorization.js.map +1 -1
  11. package/dist/esm/src/dwn.js +14 -0
  12. package/dist/esm/src/dwn.js.map +1 -1
  13. package/dist/esm/src/handlers/protocols-configure.js.map +1 -1
  14. package/dist/esm/src/handlers/records-delete.js +13 -0
  15. package/dist/esm/src/handlers/records-delete.js.map +1 -1
  16. package/dist/esm/src/handlers/records-subscribe.js +121 -66
  17. package/dist/esm/src/handlers/records-subscribe.js.map +1 -1
  18. package/dist/esm/src/handlers/records-write.js +1 -1
  19. package/dist/esm/src/handlers/records-write.js.map +1 -1
  20. package/dist/esm/src/index.js +1 -1
  21. package/dist/esm/src/index.js.map +1 -1
  22. package/dist/esm/src/interfaces/protocols-configure.js.map +1 -1
  23. package/dist/esm/src/interfaces/records-delete.js +1 -0
  24. package/dist/esm/src/interfaces/records-delete.js.map +1 -1
  25. package/dist/esm/src/interfaces/records-subscribe.js +2 -0
  26. package/dist/esm/src/interfaces/records-subscribe.js.map +1 -1
  27. package/dist/esm/src/interfaces/records-write.js +28 -45
  28. package/dist/esm/src/interfaces/records-write.js.map +1 -1
  29. package/dist/esm/src/jose/jws/general/verifier.js +9 -1
  30. package/dist/esm/src/jose/jws/general/verifier.js.map +1 -1
  31. package/dist/esm/src/smt/smt-utils.js +1 -1
  32. package/dist/esm/src/smt/smt-utils.js.map +1 -1
  33. package/dist/esm/src/types/records-types.js.map +1 -1
  34. package/dist/esm/src/utils/encryption.js +221 -78
  35. package/dist/esm/src/utils/encryption.js.map +1 -1
  36. package/dist/esm/src/utils/hd-key.js +6 -7
  37. package/dist/esm/src/utils/hd-key.js.map +1 -1
  38. package/dist/esm/src/utils/protocols.js +12 -10
  39. package/dist/esm/src/utils/protocols.js.map +1 -1
  40. package/dist/esm/src/utils/records.js +33 -44
  41. package/dist/esm/src/utils/records.js.map +1 -1
  42. package/dist/esm/tests/features/protocol-composition.spec.js +26 -21
  43. package/dist/esm/tests/features/protocol-composition.spec.js.map +1 -1
  44. package/dist/esm/tests/features/records-tags.spec.js +5 -5
  45. package/dist/esm/tests/features/records-tags.spec.js.map +1 -1
  46. package/dist/esm/tests/handlers/records-delete.spec.js +120 -2
  47. package/dist/esm/tests/handlers/records-delete.spec.js.map +1 -1
  48. package/dist/esm/tests/handlers/records-read.spec.js +25 -26
  49. package/dist/esm/tests/handlers/records-read.spec.js.map +1 -1
  50. package/dist/esm/tests/handlers/records-subscribe.spec.js +103 -0
  51. package/dist/esm/tests/handlers/records-subscribe.spec.js.map +1 -1
  52. package/dist/esm/tests/handlers/records-write.spec.js +124 -10
  53. package/dist/esm/tests/handlers/records-write.spec.js.map +1 -1
  54. package/dist/esm/tests/interfaces/messages-get.spec.js +3 -2
  55. package/dist/esm/tests/interfaces/messages-get.spec.js.map +1 -1
  56. package/dist/esm/tests/interfaces/records-write.spec.js +43 -34
  57. package/dist/esm/tests/interfaces/records-write.spec.js.map +1 -1
  58. package/dist/esm/tests/scenarios/end-to-end-tests.spec.js +4 -4
  59. package/dist/esm/tests/scenarios/end-to-end-tests.spec.js.map +1 -1
  60. package/dist/esm/tests/utils/encryption-callbacks.spec.js +21 -24
  61. package/dist/esm/tests/utils/encryption-callbacks.spec.js.map +1 -1
  62. package/dist/esm/tests/utils/encryption.spec.js +69 -66
  63. package/dist/esm/tests/utils/encryption.spec.js.map +1 -1
  64. package/dist/esm/tests/utils/filters.spec.js +1 -0
  65. package/dist/esm/tests/utils/filters.spec.js.map +1 -1
  66. package/dist/esm/tests/utils/test-data-generator.js +28 -7
  67. package/dist/esm/tests/utils/test-data-generator.js.map +1 -1
  68. package/dist/esm/tests/validation/json-schemas/protocols/protocols-configure.spec.js +1 -1
  69. package/dist/esm/tests/validation/json-schemas/protocols/protocols-configure.spec.js.map +1 -1
  70. package/dist/types/generated/precompiled-validators.d.ts.map +1 -1
  71. package/dist/types/src/core/auth.d.ts +3 -1
  72. package/dist/types/src/core/auth.d.ts.map +1 -1
  73. package/dist/types/src/core/dwn-error.d.ts +3 -0
  74. package/dist/types/src/core/dwn-error.d.ts.map +1 -1
  75. package/dist/types/src/core/protocol-authorization.d.ts.map +1 -1
  76. package/dist/types/src/dwn.d.ts +12 -0
  77. package/dist/types/src/dwn.d.ts.map +1 -1
  78. package/dist/types/src/handlers/protocols-configure.d.ts.map +1 -1
  79. package/dist/types/src/handlers/records-delete.d.ts.map +1 -1
  80. package/dist/types/src/handlers/records-subscribe.d.ts +17 -28
  81. package/dist/types/src/handlers/records-subscribe.d.ts.map +1 -1
  82. package/dist/types/src/index.d.ts +4 -4
  83. package/dist/types/src/index.d.ts.map +1 -1
  84. package/dist/types/src/interfaces/records-delete.d.ts +4 -0
  85. package/dist/types/src/interfaces/records-delete.d.ts.map +1 -1
  86. package/dist/types/src/interfaces/records-subscribe.d.ts +4 -1
  87. package/dist/types/src/interfaces/records-subscribe.d.ts.map +1 -1
  88. package/dist/types/src/interfaces/records-write.d.ts +23 -53
  89. package/dist/types/src/interfaces/records-write.d.ts.map +1 -1
  90. package/dist/types/src/jose/jws/general/verifier.d.ts.map +1 -1
  91. package/dist/types/src/types/encryption-types.d.ts +9 -8
  92. package/dist/types/src/types/encryption-types.d.ts.map +1 -1
  93. package/dist/types/src/types/protocols-types.d.ts +65 -16
  94. package/dist/types/src/types/protocols-types.d.ts.map +1 -1
  95. package/dist/types/src/types/records-types.d.ts +7 -26
  96. package/dist/types/src/types/records-types.d.ts.map +1 -1
  97. package/dist/types/src/utils/encryption.d.ts +157 -28
  98. package/dist/types/src/utils/encryption.d.ts.map +1 -1
  99. package/dist/types/src/utils/hd-key.d.ts +2 -3
  100. package/dist/types/src/utils/hd-key.d.ts.map +1 -1
  101. package/dist/types/src/utils/protocols.d.ts.map +1 -1
  102. package/dist/types/src/utils/records.d.ts +3 -4
  103. package/dist/types/src/utils/records.d.ts.map +1 -1
  104. package/dist/types/tests/features/protocol-composition.spec.d.ts.map +1 -1
  105. package/dist/types/tests/handlers/records-delete.spec.d.ts.map +1 -1
  106. package/dist/types/tests/handlers/records-read.spec.d.ts.map +1 -1
  107. package/dist/types/tests/handlers/records-subscribe.spec.d.ts.map +1 -1
  108. package/dist/types/tests/handlers/records-write.spec.d.ts.map +1 -1
  109. package/dist/types/tests/utils/test-data-generator.d.ts +7 -0
  110. package/dist/types/tests/utils/test-data-generator.d.ts.map +1 -1
  111. package/package.json +8 -19
  112. package/src/core/auth.ts +12 -1
  113. package/src/core/dwn-error.ts +3 -0
  114. package/src/core/protocol-authorization.ts +8 -0
  115. package/src/dwn.ts +15 -0
  116. package/src/handlers/protocols-configure.ts +4 -4
  117. package/src/handlers/records-delete.ts +12 -0
  118. package/src/handlers/records-subscribe.ts +174 -75
  119. package/src/handlers/records-write.ts +1 -1
  120. package/src/index.ts +4 -4
  121. package/src/interfaces/protocols-configure.ts +5 -5
  122. package/src/interfaces/records-delete.ts +9 -3
  123. package/src/interfaces/records-subscribe.ts +6 -1
  124. package/src/interfaces/records-write.ts +33 -105
  125. package/src/jose/jws/general/verifier.ts +11 -1
  126. package/src/smt/smt-utils.ts +1 -1
  127. package/src/types/encryption-types.ts +9 -8
  128. package/src/types/protocols-types.ts +72 -18
  129. package/src/types/records-types.ts +7 -29
  130. package/src/utils/encryption.ts +346 -88
  131. package/src/utils/hd-key.ts +9 -10
  132. package/src/utils/protocols.ts +15 -13
  133. package/src/utils/records.ts +47 -55
  134. package/dist/bundles/dwn.js +0 -151
@@ -168,7 +168,7 @@ validate20.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": f
168
168
  export const AuthorizationDelegatedGrant = validate24;
169
169
  const schema37 = { "$id": "https://identity.foundation/dwn/json-schemas/authorization-delegated-grant.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "additionalProperties": false, "properties": { "signature": { "$ref": "https://identity.foundation/dwn/json-schemas/general-jws.json" }, "authorDelegatedGrant": { "$ref": "https://identity.foundation/dwn/json-schemas/records-write-data-encoded.json" } } };
170
170
  const schema38 = { "$id": "https://identity.foundation/dwn/json-schemas/records-write-data-encoded.json", "$ref": "https://identity.foundation/dwn/json-schemas/records-write-unidentified.json", "unevaluatedProperties": false, "type": "object", "required": ["recordId", "authorization", "encodedData"], "properties": { "encodedData": { "type": "string" } } };
171
- const schema39 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/records-write-unidentified.json", "type": "object", "required": ["descriptor"], "properties": { "recordId": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600, "pattern": "^[a-zA-Z0-9]+(/[a-zA-Z0-9]+)*$" }, "attestation": { "$ref": "https://identity.foundation/dwn/json-schemas/general-jws.json" }, "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization-owner.json" }, "encryption": { "type": "object", "properties": { "algorithm": { "type": "string", "enum": ["A256CTR"] }, "initializationVector": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url" }, "keyEncryption": { "type": "array", "minItems": 1, "items": { "type": "object", "properties": { "rootKeyId": { "type": "string" }, "derivationScheme": { "type": "string", "enum": ["dataFormats", "protocolContext", "protocolPath", "schemas"] }, "derivedPublicKey": { "$ref": "https://identity.foundation/dwn/json-schemas/public-jwk.json" }, "algorithm": { "type": "string", "enum": ["ECIES-ES256K"] }, "encryptedKey": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url" }, "initializationVector": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url" }, "ephemeralPublicKey": { "$ref": "https://identity.foundation/dwn/json-schemas/public-jwk.json" }, "messageAuthenticationCode": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url" } }, "additionalProperties": false, "required": ["rootKeyId", "derivationScheme", "algorithm", "encryptedKey", "initializationVector", "ephemeralPublicKey", "messageAuthenticationCode"] } } }, "additionalProperties": false, "required": ["algorithm", "initializationVector", "keyEncryption"] }, "descriptor": { "type": "object", "properties": { "interface": { "enum": ["Records"], "type": "string" }, "method": { "enum": ["Write"], "type": "string" }, "recipient": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/did" }, "protocol": { "type": "string" }, "protocolPath": { "type": "string", "pattern": "^[a-zA-Z]+(/[a-zA-Z]+)*$" }, "schema": { "type": "string" }, "tags": { "type": "object", "minProperties": 1, "maxProperties": 10, "additionalProperties": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "minItems": 1, "maxItems": 10, "items": { "type": "string" } }, { "type": "array", "minItems": 1, "maxItems": 10, "items": { "type": "number" } }] } }, "parentId": { "type": "string" }, "dataCid": { "type": "string" }, "dataSize": { "type": "number" }, "dateCreated": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "messageTimestamp": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "published": { "type": "boolean" }, "datePublished": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "dataFormat": { "type": "string" }, "permissionGrantId": { "type": "string" } }, "additionalProperties": false, "required": ["interface", "method", "dataCid", "dataSize", "dateCreated", "messageTimestamp", "dataFormat"], "dependencies": { "parentId": ["protocol"] }, "allOf": [{ "$comment": "rule defining `published` and `datePublished` relationship", "anyOf": [{ "properties": { "published": { "type": "boolean", "enum": [true] } }, "required": ["published", "datePublished"] }, { "properties": { "published": { "type": "boolean", "enum": [false] } }, "not": { "required": ["datePublished"] } }, { "allOf": [{ "not": { "required": ["published"] } }, { "not": { "required": ["datePublished"] } }] }] }] } }, "$comment": "rule defining `protocol` and `contextId` relationship", "anyOf": [{ "properties": { "descriptor": { "type": "object", "required": ["protocol", "protocolPath"] } }, "required": ["contextId"] }, { "allOf": [{ "not": { "required": ["contextId"] } }, { "properties": { "descriptor": { "type": "object", "not": { "required": ["protocol"] } } } }, { "properties": { "descriptor": { "type": "object", "not": { "required": ["protocolPath"] } } } }] }] };
171
+ const schema39 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/records-write-unidentified.json", "type": "object", "required": ["descriptor"], "properties": { "recordId": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600, "pattern": "^[a-zA-Z0-9]+(/[a-zA-Z0-9]+)*$" }, "attestation": { "$ref": "https://identity.foundation/dwn/json-schemas/general-jws.json" }, "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization-owner.json" }, "encryption": { "type": "object", "properties": { "protected": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url" }, "iv": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url" }, "tag": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url" }, "recipients": { "type": "array", "minItems": 1, "items": { "type": "object", "properties": { "header": { "type": "object", "properties": { "kid": { "type": "string" }, "epk": { "$ref": "https://identity.foundation/dwn/json-schemas/public-jwk.json" }, "derivationScheme": { "type": "string", "enum": ["dataFormats", "protocolContext", "protocolPath", "schemas"] }, "derivedPublicKey": { "$ref": "https://identity.foundation/dwn/json-schemas/public-jwk.json" } }, "additionalProperties": false, "required": ["kid", "epk", "derivationScheme"] }, "encrypted_key": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url" } }, "additionalProperties": false, "required": ["header", "encrypted_key"] } } }, "additionalProperties": false, "required": ["protected", "iv", "tag", "recipients"] }, "descriptor": { "type": "object", "properties": { "interface": { "enum": ["Records"], "type": "string" }, "method": { "enum": ["Write"], "type": "string" }, "recipient": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/did" }, "protocol": { "type": "string" }, "protocolPath": { "type": "string", "pattern": "^[a-zA-Z]+(/[a-zA-Z]+)*$" }, "schema": { "type": "string" }, "tags": { "type": "object", "minProperties": 1, "maxProperties": 10, "additionalProperties": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "minItems": 1, "maxItems": 10, "items": { "type": "string" } }, { "type": "array", "minItems": 1, "maxItems": 10, "items": { "type": "number" } }] } }, "parentId": { "type": "string" }, "dataCid": { "type": "string" }, "dataSize": { "type": "number" }, "dateCreated": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "messageTimestamp": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "published": { "type": "boolean" }, "datePublished": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "dataFormat": { "type": "string" }, "permissionGrantId": { "type": "string" } }, "additionalProperties": false, "required": ["interface", "method", "dataCid", "dataSize", "dateCreated", "messageTimestamp", "dataFormat"], "dependencies": { "parentId": ["protocol"] }, "allOf": [{ "$comment": "rule defining `published` and `datePublished` relationship", "anyOf": [{ "properties": { "published": { "type": "boolean", "enum": [true] } }, "required": ["published", "datePublished"] }, { "properties": { "published": { "type": "boolean", "enum": [false] } }, "not": { "required": ["datePublished"] } }, { "allOf": [{ "not": { "required": ["published"] } }, { "not": { "required": ["datePublished"] } }] }] }] } }, "$comment": "rule defining `protocol` and `contextId` relationship", "anyOf": [{ "properties": { "descriptor": { "type": "object", "required": ["protocol", "protocolPath"] } }, "required": ["contextId"] }, { "allOf": [{ "not": { "required": ["contextId"] } }, { "properties": { "descriptor": { "type": "object", "not": { "required": ["protocol"] } } } }, { "properties": { "descriptor": { "type": "object", "not": { "required": ["protocolPath"] } } } }] }] };
172
172
  const schema47 = { "type": "string", "pattern": "^did:([a-z0-9]+):((?:(?:[a-zA-Z0-9._-]|(?:%[0-9a-fA-F]{2}))*:)*((?:[a-zA-Z0-9._-]|(?:%[0-9a-fA-F]{2}))+))((;[a-zA-Z0-9_.:%-]+=[a-zA-Z0-9_.:%-]*)*)(/[^#?]*)?([?][^#]*)?(#.*)?$" };
173
173
  const schema48 = { "type": "string", "pattern": "^\\d{4}-[0-1]\\d-[0-3]\\dT(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)\\.\\d{6}Z$" };
174
174
  const func1 = (_a = func1Mod.default) !== null && _a !== void 0 ? _a : func1Mod;
@@ -1757,30 +1757,35 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
1757
1757
  if (errors === _errs26) {
1758
1758
  if (data7 && typeof data7 == "object" && !Array.isArray(data7)) {
1759
1759
  let missing6;
1760
- if ((((data7.algorithm === undefined) && (missing6 = "algorithm")) || ((data7.initializationVector === undefined) && (missing6 = "initializationVector"))) || ((data7.keyEncryption === undefined) && (missing6 = "keyEncryption"))) {
1760
+ if (((((data7.protected === undefined) && (missing6 = "protected")) || ((data7.iv === undefined) && (missing6 = "iv"))) || ((data7.tag === undefined) && (missing6 = "tag"))) || ((data7.recipients === undefined) && (missing6 = "recipients"))) {
1761
1761
  validate27.errors = [{ instancePath: instancePath + "/encryption", schemaPath: "#/properties/encryption/required", keyword: "required", params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'" }];
1762
1762
  return false;
1763
1763
  }
1764
1764
  else {
1765
1765
  const _errs28 = errors;
1766
1766
  for (const key0 in data7) {
1767
- if (!(((key0 === "algorithm") || (key0 === "initializationVector")) || (key0 === "keyEncryption"))) {
1767
+ if (!((((key0 === "protected") || (key0 === "iv")) || (key0 === "tag")) || (key0 === "recipients"))) {
1768
1768
  validate27.errors = [{ instancePath: instancePath + "/encryption", schemaPath: "#/properties/encryption/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
1769
1769
  return false;
1770
1770
  break;
1771
1771
  }
1772
1772
  }
1773
1773
  if (_errs28 === errors) {
1774
- if (data7.algorithm !== undefined) {
1775
- let data8 = data7.algorithm;
1774
+ if (data7.protected !== undefined) {
1775
+ let data8 = data7.protected;
1776
1776
  const _errs29 = errors;
1777
- if (typeof data8 !== "string") {
1778
- validate27.errors = [{ instancePath: instancePath + "/encryption/algorithm", schemaPath: "#/properties/encryption/properties/algorithm/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1779
- return false;
1780
- }
1781
- if (!(data8 === "A256CTR")) {
1782
- validate27.errors = [{ instancePath: instancePath + "/encryption/algorithm", schemaPath: "#/properties/encryption/properties/algorithm/enum", keyword: "enum", params: { allowedValues: schema39.properties.encryption.properties.algorithm.enum }, message: "must be equal to one of the allowed values" }];
1783
- return false;
1777
+ const _errs30 = errors;
1778
+ if (errors === _errs30) {
1779
+ if (typeof data8 === "string") {
1780
+ if (!pattern4.test(data8)) {
1781
+ validate27.errors = [{ instancePath: instancePath + "/encryption/protected", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9_-]+$" }, message: "must match pattern \"" + "^[A-Za-z0-9_-]+$" + "\"" }];
1782
+ return false;
1783
+ }
1784
+ }
1785
+ else {
1786
+ validate27.errors = [{ instancePath: instancePath + "/encryption/protected", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1787
+ return false;
1788
+ }
1784
1789
  }
1785
1790
  var valid9 = _errs29 === errors;
1786
1791
  }
@@ -1788,226 +1793,218 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
1788
1793
  var valid9 = true;
1789
1794
  }
1790
1795
  if (valid9) {
1791
- if (data7.initializationVector !== undefined) {
1792
- let data9 = data7.initializationVector;
1793
- const _errs31 = errors;
1796
+ if (data7.iv !== undefined) {
1797
+ let data9 = data7.iv;
1794
1798
  const _errs32 = errors;
1795
- if (errors === _errs32) {
1799
+ const _errs33 = errors;
1800
+ if (errors === _errs33) {
1796
1801
  if (typeof data9 === "string") {
1797
1802
  if (!pattern4.test(data9)) {
1798
- validate27.errors = [{ instancePath: instancePath + "/encryption/initializationVector", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9_-]+$" }, message: "must match pattern \"" + "^[A-Za-z0-9_-]+$" + "\"" }];
1803
+ validate27.errors = [{ instancePath: instancePath + "/encryption/iv", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9_-]+$" }, message: "must match pattern \"" + "^[A-Za-z0-9_-]+$" + "\"" }];
1799
1804
  return false;
1800
1805
  }
1801
1806
  }
1802
1807
  else {
1803
- validate27.errors = [{ instancePath: instancePath + "/encryption/initializationVector", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1808
+ validate27.errors = [{ instancePath: instancePath + "/encryption/iv", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1804
1809
  return false;
1805
1810
  }
1806
1811
  }
1807
- var valid9 = _errs31 === errors;
1812
+ var valid9 = _errs32 === errors;
1808
1813
  }
1809
1814
  else {
1810
1815
  var valid9 = true;
1811
1816
  }
1812
1817
  if (valid9) {
1813
- if (data7.keyEncryption !== undefined) {
1814
- let data10 = data7.keyEncryption;
1815
- const _errs34 = errors;
1816
- if (errors === _errs34) {
1817
- if (Array.isArray(data10)) {
1818
- if (data10.length < 1) {
1819
- validate27.errors = [{ instancePath: instancePath + "/encryption/keyEncryption", schemaPath: "#/properties/encryption/properties/keyEncryption/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" }];
1818
+ if (data7.tag !== undefined) {
1819
+ let data10 = data7.tag;
1820
+ const _errs35 = errors;
1821
+ const _errs36 = errors;
1822
+ if (errors === _errs36) {
1823
+ if (typeof data10 === "string") {
1824
+ if (!pattern4.test(data10)) {
1825
+ validate27.errors = [{ instancePath: instancePath + "/encryption/tag", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9_-]+$" }, message: "must match pattern \"" + "^[A-Za-z0-9_-]+$" + "\"" }];
1820
1826
  return false;
1821
1827
  }
1822
- else {
1823
- var valid11 = true;
1824
- const len0 = data10.length;
1825
- for (let i0 = 0; i0 < len0; i0++) {
1826
- let data11 = data10[i0];
1827
- const _errs36 = errors;
1828
- if (errors === _errs36) {
1829
- if (data11 && typeof data11 == "object" && !Array.isArray(data11)) {
1830
- let missing7;
1831
- if ((((((((data11.rootKeyId === undefined) && (missing7 = "rootKeyId")) || ((data11.derivationScheme === undefined) && (missing7 = "derivationScheme"))) || ((data11.algorithm === undefined) && (missing7 = "algorithm"))) || ((data11.encryptedKey === undefined) && (missing7 = "encryptedKey"))) || ((data11.initializationVector === undefined) && (missing7 = "initializationVector"))) || ((data11.ephemeralPublicKey === undefined) && (missing7 = "ephemeralPublicKey"))) || ((data11.messageAuthenticationCode === undefined) && (missing7 = "messageAuthenticationCode"))) {
1832
- validate27.errors = [{ instancePath: instancePath + "/encryption/keyEncryption/" + i0, schemaPath: "#/properties/encryption/properties/keyEncryption/items/required", keyword: "required", params: { missingProperty: missing7 }, message: "must have required property '" + missing7 + "'" }];
1833
- return false;
1834
- }
1835
- else {
1836
- const _errs38 = errors;
1837
- for (const key1 in data11) {
1838
- if (!((((((((key1 === "rootKeyId") || (key1 === "derivationScheme")) || (key1 === "derivedPublicKey")) || (key1 === "algorithm")) || (key1 === "encryptedKey")) || (key1 === "initializationVector")) || (key1 === "ephemeralPublicKey")) || (key1 === "messageAuthenticationCode"))) {
1839
- validate27.errors = [{ instancePath: instancePath + "/encryption/keyEncryption/" + i0, schemaPath: "#/properties/encryption/properties/keyEncryption/items/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
1840
- return false;
1841
- break;
1842
- }
1828
+ }
1829
+ else {
1830
+ validate27.errors = [{ instancePath: instancePath + "/encryption/tag", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1831
+ return false;
1832
+ }
1833
+ }
1834
+ var valid9 = _errs35 === errors;
1835
+ }
1836
+ else {
1837
+ var valid9 = true;
1838
+ }
1839
+ if (valid9) {
1840
+ if (data7.recipients !== undefined) {
1841
+ let data11 = data7.recipients;
1842
+ const _errs38 = errors;
1843
+ if (errors === _errs38) {
1844
+ if (Array.isArray(data11)) {
1845
+ if (data11.length < 1) {
1846
+ validate27.errors = [{ instancePath: instancePath + "/encryption/recipients", schemaPath: "#/properties/encryption/properties/recipients/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" }];
1847
+ return false;
1848
+ }
1849
+ else {
1850
+ var valid13 = true;
1851
+ const len0 = data11.length;
1852
+ for (let i0 = 0; i0 < len0; i0++) {
1853
+ let data12 = data11[i0];
1854
+ const _errs40 = errors;
1855
+ if (errors === _errs40) {
1856
+ if (data12 && typeof data12 == "object" && !Array.isArray(data12)) {
1857
+ let missing7;
1858
+ if (((data12.header === undefined) && (missing7 = "header")) || ((data12.encrypted_key === undefined) && (missing7 = "encrypted_key"))) {
1859
+ validate27.errors = [{ instancePath: instancePath + "/encryption/recipients/" + i0, schemaPath: "#/properties/encryption/properties/recipients/items/required", keyword: "required", params: { missingProperty: missing7 }, message: "must have required property '" + missing7 + "'" }];
1860
+ return false;
1843
1861
  }
1844
- if (_errs38 === errors) {
1845
- if (data11.rootKeyId !== undefined) {
1846
- const _errs39 = errors;
1847
- if (typeof data11.rootKeyId !== "string") {
1848
- validate27.errors = [{ instancePath: instancePath + "/encryption/keyEncryption/" + i0 + "/rootKeyId", schemaPath: "#/properties/encryption/properties/keyEncryption/items/properties/rootKeyId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1862
+ else {
1863
+ const _errs42 = errors;
1864
+ for (const key1 in data12) {
1865
+ if (!((key1 === "header") || (key1 === "encrypted_key"))) {
1866
+ validate27.errors = [{ instancePath: instancePath + "/encryption/recipients/" + i0, schemaPath: "#/properties/encryption/properties/recipients/items/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
1849
1867
  return false;
1868
+ break;
1850
1869
  }
1851
- var valid12 = _errs39 === errors;
1852
1870
  }
1853
- else {
1854
- var valid12 = true;
1855
- }
1856
- if (valid12) {
1857
- if (data11.derivationScheme !== undefined) {
1858
- let data13 = data11.derivationScheme;
1859
- const _errs41 = errors;
1860
- if (typeof data13 !== "string") {
1861
- validate27.errors = [{ instancePath: instancePath + "/encryption/keyEncryption/" + i0 + "/derivationScheme", schemaPath: "#/properties/encryption/properties/keyEncryption/items/properties/derivationScheme/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1862
- return false;
1863
- }
1864
- if (!((((data13 === "dataFormats") || (data13 === "protocolContext")) || (data13 === "protocolPath")) || (data13 === "schemas"))) {
1865
- validate27.errors = [{ instancePath: instancePath + "/encryption/keyEncryption/" + i0 + "/derivationScheme", schemaPath: "#/properties/encryption/properties/keyEncryption/items/properties/derivationScheme/enum", keyword: "enum", params: { allowedValues: schema39.properties.encryption.properties.keyEncryption.items.properties.derivationScheme.enum }, message: "must be equal to one of the allowed values" }];
1866
- return false;
1867
- }
1868
- var valid12 = _errs41 === errors;
1869
- }
1870
- else {
1871
- var valid12 = true;
1872
- }
1873
- if (valid12) {
1874
- if (data11.derivedPublicKey !== undefined) {
1875
- const _errs43 = errors;
1876
- if (!(validate32(data11.derivedPublicKey, { instancePath: instancePath + "/encryption/keyEncryption/" + i0 + "/derivedPublicKey", parentData: data11, parentDataProperty: "derivedPublicKey", rootData, dynamicAnchors }))) {
1877
- vErrors = vErrors === null ? validate32.errors : vErrors.concat(validate32.errors);
1878
- errors = vErrors.length;
1879
- }
1880
- var valid12 = _errs43 === errors;
1881
- }
1882
- else {
1883
- var valid12 = true;
1884
- }
1885
- if (valid12) {
1886
- if (data11.algorithm !== undefined) {
1887
- let data15 = data11.algorithm;
1888
- const _errs44 = errors;
1889
- if (typeof data15 !== "string") {
1890
- validate27.errors = [{ instancePath: instancePath + "/encryption/keyEncryption/" + i0 + "/algorithm", schemaPath: "#/properties/encryption/properties/keyEncryption/items/properties/algorithm/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1891
- return false;
1892
- }
1893
- if (!(data15 === "ECIES-ES256K")) {
1894
- validate27.errors = [{ instancePath: instancePath + "/encryption/keyEncryption/" + i0 + "/algorithm", schemaPath: "#/properties/encryption/properties/keyEncryption/items/properties/algorithm/enum", keyword: "enum", params: { allowedValues: schema39.properties.encryption.properties.keyEncryption.items.properties.algorithm.enum }, message: "must be equal to one of the allowed values" }];
1871
+ if (_errs42 === errors) {
1872
+ if (data12.header !== undefined) {
1873
+ let data13 = data12.header;
1874
+ const _errs43 = errors;
1875
+ if (errors === _errs43) {
1876
+ if (data13 && typeof data13 == "object" && !Array.isArray(data13)) {
1877
+ let missing8;
1878
+ if ((((data13.kid === undefined) && (missing8 = "kid")) || ((data13.epk === undefined) && (missing8 = "epk"))) || ((data13.derivationScheme === undefined) && (missing8 = "derivationScheme"))) {
1879
+ validate27.errors = [{ instancePath: instancePath + "/encryption/recipients/" + i0 + "/header", schemaPath: "#/properties/encryption/properties/recipients/items/properties/header/required", keyword: "required", params: { missingProperty: missing8 }, message: "must have required property '" + missing8 + "'" }];
1895
1880
  return false;
1896
1881
  }
1897
- var valid12 = _errs44 === errors;
1898
- }
1899
- else {
1900
- var valid12 = true;
1901
- }
1902
- if (valid12) {
1903
- if (data11.encryptedKey !== undefined) {
1904
- let data16 = data11.encryptedKey;
1905
- const _errs46 = errors;
1906
- const _errs47 = errors;
1907
- if (errors === _errs47) {
1908
- if (typeof data16 === "string") {
1909
- if (!pattern4.test(data16)) {
1910
- validate27.errors = [{ instancePath: instancePath + "/encryption/keyEncryption/" + i0 + "/encryptedKey", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9_-]+$" }, message: "must match pattern \"" + "^[A-Za-z0-9_-]+$" + "\"" }];
1882
+ else {
1883
+ const _errs45 = errors;
1884
+ for (const key2 in data13) {
1885
+ if (!((((key2 === "kid") || (key2 === "epk")) || (key2 === "derivationScheme")) || (key2 === "derivedPublicKey"))) {
1886
+ validate27.errors = [{ instancePath: instancePath + "/encryption/recipients/" + i0 + "/header", schemaPath: "#/properties/encryption/properties/recipients/items/properties/header/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" }];
1887
+ return false;
1888
+ break;
1889
+ }
1890
+ }
1891
+ if (_errs45 === errors) {
1892
+ if (data13.kid !== undefined) {
1893
+ const _errs46 = errors;
1894
+ if (typeof data13.kid !== "string") {
1895
+ validate27.errors = [{ instancePath: instancePath + "/encryption/recipients/" + i0 + "/header/kid", schemaPath: "#/properties/encryption/properties/recipients/items/properties/header/properties/kid/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1911
1896
  return false;
1912
1897
  }
1898
+ var valid15 = _errs46 === errors;
1913
1899
  }
1914
1900
  else {
1915
- validate27.errors = [{ instancePath: instancePath + "/encryption/keyEncryption/" + i0 + "/encryptedKey", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1916
- return false;
1901
+ var valid15 = true;
1917
1902
  }
1918
- }
1919
- var valid12 = _errs46 === errors;
1920
- }
1921
- else {
1922
- var valid12 = true;
1923
- }
1924
- if (valid12) {
1925
- if (data11.initializationVector !== undefined) {
1926
- let data17 = data11.initializationVector;
1927
- const _errs49 = errors;
1928
- const _errs50 = errors;
1929
- if (errors === _errs50) {
1930
- if (typeof data17 === "string") {
1931
- if (!pattern4.test(data17)) {
1932
- validate27.errors = [{ instancePath: instancePath + "/encryption/keyEncryption/" + i0 + "/initializationVector", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9_-]+$" }, message: "must match pattern \"" + "^[A-Za-z0-9_-]+$" + "\"" }];
1933
- return false;
1903
+ if (valid15) {
1904
+ if (data13.epk !== undefined) {
1905
+ const _errs48 = errors;
1906
+ if (!(validate32(data13.epk, { instancePath: instancePath + "/encryption/recipients/" + i0 + "/header/epk", parentData: data13, parentDataProperty: "epk", rootData, dynamicAnchors }))) {
1907
+ vErrors = vErrors === null ? validate32.errors : vErrors.concat(validate32.errors);
1908
+ errors = vErrors.length;
1934
1909
  }
1910
+ var valid15 = _errs48 === errors;
1935
1911
  }
1936
1912
  else {
1937
- validate27.errors = [{ instancePath: instancePath + "/encryption/keyEncryption/" + i0 + "/initializationVector", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1938
- return false;
1939
- }
1940
- }
1941
- var valid12 = _errs49 === errors;
1942
- }
1943
- else {
1944
- var valid12 = true;
1945
- }
1946
- if (valid12) {
1947
- if (data11.ephemeralPublicKey !== undefined) {
1948
- const _errs52 = errors;
1949
- if (!(validate32(data11.ephemeralPublicKey, { instancePath: instancePath + "/encryption/keyEncryption/" + i0 + "/ephemeralPublicKey", parentData: data11, parentDataProperty: "ephemeralPublicKey", rootData, dynamicAnchors }))) {
1950
- vErrors = vErrors === null ? validate32.errors : vErrors.concat(validate32.errors);
1951
- errors = vErrors.length;
1913
+ var valid15 = true;
1952
1914
  }
1953
- var valid12 = _errs52 === errors;
1954
- }
1955
- else {
1956
- var valid12 = true;
1957
- }
1958
- if (valid12) {
1959
- if (data11.messageAuthenticationCode !== undefined) {
1960
- let data19 = data11.messageAuthenticationCode;
1961
- const _errs53 = errors;
1962
- const _errs54 = errors;
1963
- if (errors === _errs54) {
1964
- if (typeof data19 === "string") {
1965
- if (!pattern4.test(data19)) {
1966
- validate27.errors = [{ instancePath: instancePath + "/encryption/keyEncryption/" + i0 + "/messageAuthenticationCode", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9_-]+$" }, message: "must match pattern \"" + "^[A-Za-z0-9_-]+$" + "\"" }];
1967
- return false;
1915
+ if (valid15) {
1916
+ if (data13.derivationScheme !== undefined) {
1917
+ let data16 = data13.derivationScheme;
1918
+ const _errs49 = errors;
1919
+ if (typeof data16 !== "string") {
1920
+ validate27.errors = [{ instancePath: instancePath + "/encryption/recipients/" + i0 + "/header/derivationScheme", schemaPath: "#/properties/encryption/properties/recipients/items/properties/header/properties/derivationScheme/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1921
+ return false;
1922
+ }
1923
+ if (!((((data16 === "dataFormats") || (data16 === "protocolContext")) || (data16 === "protocolPath")) || (data16 === "schemas"))) {
1924
+ validate27.errors = [{ instancePath: instancePath + "/encryption/recipients/" + i0 + "/header/derivationScheme", schemaPath: "#/properties/encryption/properties/recipients/items/properties/header/properties/derivationScheme/enum", keyword: "enum", params: { allowedValues: schema39.properties.encryption.properties.recipients.items.properties.header.properties.derivationScheme.enum }, message: "must be equal to one of the allowed values" }];
1925
+ return false;
1926
+ }
1927
+ var valid15 = _errs49 === errors;
1928
+ }
1929
+ else {
1930
+ var valid15 = true;
1931
+ }
1932
+ if (valid15) {
1933
+ if (data13.derivedPublicKey !== undefined) {
1934
+ const _errs51 = errors;
1935
+ if (!(validate32(data13.derivedPublicKey, { instancePath: instancePath + "/encryption/recipients/" + i0 + "/header/derivedPublicKey", parentData: data13, parentDataProperty: "derivedPublicKey", rootData, dynamicAnchors }))) {
1936
+ vErrors = vErrors === null ? validate32.errors : vErrors.concat(validate32.errors);
1937
+ errors = vErrors.length;
1968
1938
  }
1939
+ var valid15 = _errs51 === errors;
1969
1940
  }
1970
1941
  else {
1971
- validate27.errors = [{ instancePath: instancePath + "/encryption/keyEncryption/" + i0 + "/messageAuthenticationCode", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1972
- return false;
1942
+ var valid15 = true;
1973
1943
  }
1974
1944
  }
1975
- var valid12 = _errs53 === errors;
1976
- }
1977
- else {
1978
- var valid12 = true;
1979
1945
  }
1980
1946
  }
1981
1947
  }
1982
1948
  }
1983
1949
  }
1950
+ else {
1951
+ validate27.errors = [{ instancePath: instancePath + "/encryption/recipients/" + i0 + "/header", schemaPath: "#/properties/encryption/properties/recipients/items/properties/header/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
1952
+ return false;
1953
+ }
1954
+ }
1955
+ var valid14 = _errs43 === errors;
1956
+ }
1957
+ else {
1958
+ var valid14 = true;
1959
+ }
1960
+ if (valid14) {
1961
+ if (data12.encrypted_key !== undefined) {
1962
+ let data18 = data12.encrypted_key;
1963
+ const _errs52 = errors;
1964
+ const _errs53 = errors;
1965
+ if (errors === _errs53) {
1966
+ if (typeof data18 === "string") {
1967
+ if (!pattern4.test(data18)) {
1968
+ validate27.errors = [{ instancePath: instancePath + "/encryption/recipients/" + i0 + "/encrypted_key", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9_-]+$" }, message: "must match pattern \"" + "^[A-Za-z0-9_-]+$" + "\"" }];
1969
+ return false;
1970
+ }
1971
+ }
1972
+ else {
1973
+ validate27.errors = [{ instancePath: instancePath + "/encryption/recipients/" + i0 + "/encrypted_key", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1974
+ return false;
1975
+ }
1976
+ }
1977
+ var valid14 = _errs52 === errors;
1978
+ }
1979
+ else {
1980
+ var valid14 = true;
1984
1981
  }
1985
1982
  }
1986
1983
  }
1987
1984
  }
1988
1985
  }
1986
+ else {
1987
+ validate27.errors = [{ instancePath: instancePath + "/encryption/recipients/" + i0, schemaPath: "#/properties/encryption/properties/recipients/items/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
1988
+ return false;
1989
+ }
1989
1990
  }
1990
- else {
1991
- validate27.errors = [{ instancePath: instancePath + "/encryption/keyEncryption/" + i0, schemaPath: "#/properties/encryption/properties/keyEncryption/items/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
1992
- return false;
1991
+ var valid13 = _errs40 === errors;
1992
+ if (!valid13) {
1993
+ break;
1993
1994
  }
1994
1995
  }
1995
- var valid11 = _errs36 === errors;
1996
- if (!valid11) {
1997
- break;
1998
- }
1999
1996
  }
2000
1997
  }
1998
+ else {
1999
+ validate27.errors = [{ instancePath: instancePath + "/encryption/recipients", schemaPath: "#/properties/encryption/properties/recipients/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
2000
+ return false;
2001
+ }
2001
2002
  }
2002
- else {
2003
- validate27.errors = [{ instancePath: instancePath + "/encryption/keyEncryption", schemaPath: "#/properties/encryption/properties/keyEncryption/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
2004
- return false;
2005
- }
2003
+ var valid9 = _errs38 === errors;
2004
+ }
2005
+ else {
2006
+ var valid9 = true;
2006
2007
  }
2007
- var valid9 = _errs34 === errors;
2008
- }
2009
- else {
2010
- var valid9 = true;
2011
2008
  }
2012
2009
  }
2013
2010
  }
@@ -2026,15 +2023,15 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2026
2023
  }
2027
2024
  if (valid8) {
2028
2025
  if (data.descriptor !== undefined) {
2029
- let data20 = data.descriptor;
2030
- const _errs56 = errors;
2026
+ let data19 = data.descriptor;
2027
+ const _errs55 = errors;
2028
+ const _errs59 = errors;
2029
+ let valid18 = false;
2031
2030
  const _errs60 = errors;
2032
- let valid17 = false;
2033
- const _errs61 = errors;
2034
- if (data20 && typeof data20 == "object" && !Array.isArray(data20)) {
2035
- let missing8;
2036
- if (((data20.published === undefined) && (missing8 = "published")) || ((data20.datePublished === undefined) && (missing8 = "datePublished"))) {
2037
- const err12 = { instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/0/anyOf/0/required", keyword: "required", params: { missingProperty: missing8 }, message: "must have required property '" + missing8 + "'" };
2031
+ if (data19 && typeof data19 == "object" && !Array.isArray(data19)) {
2032
+ let missing9;
2033
+ if (((data19.published === undefined) && (missing9 = "published")) || ((data19.datePublished === undefined) && (missing9 = "datePublished"))) {
2034
+ const err12 = { instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/0/anyOf/0/required", keyword: "required", params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'" };
2038
2035
  if (vErrors === null) {
2039
2036
  vErrors = [err12];
2040
2037
  }
@@ -2044,9 +2041,9 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2044
2041
  errors++;
2045
2042
  }
2046
2043
  else {
2047
- if (data20.published !== undefined) {
2048
- let data21 = data20.published;
2049
- if (typeof data21 !== "boolean") {
2044
+ if (data19.published !== undefined) {
2045
+ let data20 = data19.published;
2046
+ if (typeof data20 !== "boolean") {
2050
2047
  const err13 = { instancePath: instancePath + "/descriptor/published", schemaPath: "#/properties/descriptor/allOf/0/anyOf/0/properties/published/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
2051
2048
  if (vErrors === null) {
2052
2049
  vErrors = [err13];
@@ -2056,7 +2053,7 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2056
2053
  }
2057
2054
  errors++;
2058
2055
  }
2059
- if (!(data21 === true)) {
2056
+ if (!(data20 === true)) {
2060
2057
  const err14 = { instancePath: instancePath + "/descriptor/published", schemaPath: "#/properties/descriptor/allOf/0/anyOf/0/properties/published/enum", keyword: "enum", params: { allowedValues: schema39.properties.descriptor.allOf[0].anyOf[0].properties.published.enum }, message: "must be equal to one of the allowed values" };
2061
2058
  if (vErrors === null) {
2062
2059
  vErrors = [err14];
@@ -2069,18 +2066,18 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2069
2066
  }
2070
2067
  }
2071
2068
  }
2072
- var _valid1 = _errs61 === errors;
2073
- valid17 = valid17 || _valid1;
2069
+ var _valid1 = _errs60 === errors;
2070
+ valid18 = valid18 || _valid1;
2074
2071
  if (_valid1) {
2075
2072
  var props3 = {};
2076
2073
  props3.published = true;
2077
2074
  }
2075
+ const _errs63 = errors;
2078
2076
  const _errs64 = errors;
2079
2077
  const _errs65 = errors;
2080
- const _errs66 = errors;
2081
- if (data20 && typeof data20 == "object" && !Array.isArray(data20)) {
2082
- let missing9;
2083
- if ((data20.datePublished === undefined) && (missing9 = "datePublished")) {
2078
+ if (data19 && typeof data19 == "object" && !Array.isArray(data19)) {
2079
+ let missing10;
2080
+ if ((data19.datePublished === undefined) && (missing10 = "datePublished")) {
2084
2081
  const err15 = {};
2085
2082
  if (vErrors === null) {
2086
2083
  vErrors = [err15];
@@ -2091,8 +2088,8 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2091
2088
  errors++;
2092
2089
  }
2093
2090
  }
2094
- var valid19 = _errs66 === errors;
2095
- if (valid19) {
2091
+ var valid20 = _errs65 === errors;
2092
+ if (valid20) {
2096
2093
  const err16 = { instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/0/anyOf/1/not", keyword: "not", params: {}, message: "must NOT be valid" };
2097
2094
  if (vErrors === null) {
2098
2095
  vErrors = [err16];
@@ -2103,21 +2100,21 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2103
2100
  errors++;
2104
2101
  }
2105
2102
  else {
2106
- errors = _errs65;
2103
+ errors = _errs64;
2107
2104
  if (vErrors !== null) {
2108
- if (_errs65) {
2109
- vErrors.length = _errs65;
2105
+ if (_errs64) {
2106
+ vErrors.length = _errs64;
2110
2107
  }
2111
2108
  else {
2112
2109
  vErrors = null;
2113
2110
  }
2114
2111
  }
2115
2112
  }
2116
- if (errors === _errs64) {
2117
- if (data20 && typeof data20 == "object" && !Array.isArray(data20)) {
2118
- if (data20.published !== undefined) {
2119
- let data22 = data20.published;
2120
- if (typeof data22 !== "boolean") {
2113
+ if (errors === _errs63) {
2114
+ if (data19 && typeof data19 == "object" && !Array.isArray(data19)) {
2115
+ if (data19.published !== undefined) {
2116
+ let data21 = data19.published;
2117
+ if (typeof data21 !== "boolean") {
2121
2118
  const err17 = { instancePath: instancePath + "/descriptor/published", schemaPath: "#/properties/descriptor/allOf/0/anyOf/1/properties/published/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
2122
2119
  if (vErrors === null) {
2123
2120
  vErrors = [err17];
@@ -2127,7 +2124,7 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2127
2124
  }
2128
2125
  errors++;
2129
2126
  }
2130
- if (!(data22 === false)) {
2127
+ if (!(data21 === false)) {
2131
2128
  const err18 = { instancePath: instancePath + "/descriptor/published", schemaPath: "#/properties/descriptor/allOf/0/anyOf/1/properties/published/enum", keyword: "enum", params: { allowedValues: schema39.properties.descriptor.allOf[0].anyOf[1].properties.published.enum }, message: "must be equal to one of the allowed values" };
2132
2129
  if (vErrors === null) {
2133
2130
  vErrors = [err18];
@@ -2140,21 +2137,21 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2140
2137
  }
2141
2138
  }
2142
2139
  }
2143
- var _valid1 = _errs64 === errors;
2144
- valid17 = valid17 || _valid1;
2140
+ var _valid1 = _errs63 === errors;
2141
+ valid18 = valid18 || _valid1;
2145
2142
  if (_valid1) {
2146
2143
  if (props3 !== true) {
2147
2144
  props3 = props3 || {};
2148
2145
  props3.published = true;
2149
2146
  }
2150
2147
  }
2148
+ const _errs68 = errors;
2151
2149
  const _errs69 = errors;
2152
2150
  const _errs70 = errors;
2153
2151
  const _errs71 = errors;
2154
- const _errs72 = errors;
2155
- if (data20 && typeof data20 == "object" && !Array.isArray(data20)) {
2156
- let missing10;
2157
- if ((data20.published === undefined) && (missing10 = "published")) {
2152
+ if (data19 && typeof data19 == "object" && !Array.isArray(data19)) {
2153
+ let missing11;
2154
+ if ((data19.published === undefined) && (missing11 = "published")) {
2158
2155
  const err19 = {};
2159
2156
  if (vErrors === null) {
2160
2157
  vErrors = [err19];
@@ -2165,8 +2162,8 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2165
2162
  errors++;
2166
2163
  }
2167
2164
  }
2168
- var valid22 = _errs72 === errors;
2169
- if (valid22) {
2165
+ var valid23 = _errs71 === errors;
2166
+ if (valid23) {
2170
2167
  const err20 = { instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/0/anyOf/2/allOf/0/not", keyword: "not", params: {}, message: "must NOT be valid" };
2171
2168
  if (vErrors === null) {
2172
2169
  vErrors = [err20];
@@ -2177,24 +2174,24 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2177
2174
  errors++;
2178
2175
  }
2179
2176
  else {
2180
- errors = _errs71;
2177
+ errors = _errs70;
2181
2178
  if (vErrors !== null) {
2182
- if (_errs71) {
2183
- vErrors.length = _errs71;
2179
+ if (_errs70) {
2180
+ vErrors.length = _errs70;
2184
2181
  }
2185
2182
  else {
2186
2183
  vErrors = null;
2187
2184
  }
2188
2185
  }
2189
2186
  }
2190
- var valid21 = _errs70 === errors;
2191
- if (valid21) {
2187
+ var valid22 = _errs69 === errors;
2188
+ if (valid22) {
2189
+ const _errs72 = errors;
2192
2190
  const _errs73 = errors;
2193
2191
  const _errs74 = errors;
2194
- const _errs75 = errors;
2195
- if (data20 && typeof data20 == "object" && !Array.isArray(data20)) {
2196
- let missing11;
2197
- if ((data20.datePublished === undefined) && (missing11 = "datePublished")) {
2192
+ if (data19 && typeof data19 == "object" && !Array.isArray(data19)) {
2193
+ let missing12;
2194
+ if ((data19.datePublished === undefined) && (missing12 = "datePublished")) {
2198
2195
  const err21 = {};
2199
2196
  if (vErrors === null) {
2200
2197
  vErrors = [err21];
@@ -2205,8 +2202,8 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2205
2202
  errors++;
2206
2203
  }
2207
2204
  }
2208
- var valid23 = _errs75 === errors;
2209
- if (valid23) {
2205
+ var valid24 = _errs74 === errors;
2206
+ if (valid24) {
2210
2207
  const err22 = { instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/0/anyOf/2/allOf/1/not", keyword: "not", params: {}, message: "must NOT be valid" };
2211
2208
  if (vErrors === null) {
2212
2209
  vErrors = [err22];
@@ -2217,21 +2214,21 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2217
2214
  errors++;
2218
2215
  }
2219
2216
  else {
2220
- errors = _errs74;
2217
+ errors = _errs73;
2221
2218
  if (vErrors !== null) {
2222
- if (_errs74) {
2223
- vErrors.length = _errs74;
2219
+ if (_errs73) {
2220
+ vErrors.length = _errs73;
2224
2221
  }
2225
2222
  else {
2226
2223
  vErrors = null;
2227
2224
  }
2228
2225
  }
2229
2226
  }
2230
- var valid21 = _errs73 === errors;
2227
+ var valid22 = _errs72 === errors;
2231
2228
  }
2232
- var _valid1 = _errs69 === errors;
2233
- valid17 = valid17 || _valid1;
2234
- if (!valid17) {
2229
+ var _valid1 = _errs68 === errors;
2230
+ valid18 = valid18 || _valid1;
2231
+ if (!valid18) {
2235
2232
  const err23 = { instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/0/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
2236
2233
  if (vErrors === null) {
2237
2234
  vErrors = [err23];
@@ -2244,83 +2241,83 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2244
2241
  return false;
2245
2242
  }
2246
2243
  else {
2247
- errors = _errs60;
2244
+ errors = _errs59;
2248
2245
  if (vErrors !== null) {
2249
- if (_errs60) {
2250
- vErrors.length = _errs60;
2246
+ if (_errs59) {
2247
+ vErrors.length = _errs59;
2251
2248
  }
2252
2249
  else {
2253
2250
  vErrors = null;
2254
2251
  }
2255
2252
  }
2256
2253
  }
2257
- if (errors === _errs56) {
2258
- if (data20 && typeof data20 == "object" && !Array.isArray(data20)) {
2259
- let missing12;
2260
- if ((((((((data20.interface === undefined) && (missing12 = "interface")) || ((data20.method === undefined) && (missing12 = "method"))) || ((data20.dataCid === undefined) && (missing12 = "dataCid"))) || ((data20.dataSize === undefined) && (missing12 = "dataSize"))) || ((data20.dateCreated === undefined) && (missing12 = "dateCreated"))) || ((data20.messageTimestamp === undefined) && (missing12 = "messageTimestamp"))) || ((data20.dataFormat === undefined) && (missing12 = "dataFormat"))) {
2261
- validate27.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/required", keyword: "required", params: { missingProperty: missing12 }, message: "must have required property '" + missing12 + "'" }];
2254
+ if (errors === _errs55) {
2255
+ if (data19 && typeof data19 == "object" && !Array.isArray(data19)) {
2256
+ let missing13;
2257
+ if ((((((((data19.interface === undefined) && (missing13 = "interface")) || ((data19.method === undefined) && (missing13 = "method"))) || ((data19.dataCid === undefined) && (missing13 = "dataCid"))) || ((data19.dataSize === undefined) && (missing13 = "dataSize"))) || ((data19.dateCreated === undefined) && (missing13 = "dateCreated"))) || ((data19.messageTimestamp === undefined) && (missing13 = "messageTimestamp"))) || ((data19.dataFormat === undefined) && (missing13 = "dataFormat"))) {
2258
+ validate27.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/required", keyword: "required", params: { missingProperty: missing13 }, message: "must have required property '" + missing13 + "'" }];
2262
2259
  return false;
2263
2260
  }
2264
2261
  else {
2265
- const _errs76 = errors;
2266
- for (const key2 in data20) {
2267
- if (!(func2.call(schema39.properties.descriptor.properties, key2))) {
2268
- validate27.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" }];
2262
+ const _errs75 = errors;
2263
+ for (const key3 in data19) {
2264
+ if (!(func2.call(schema39.properties.descriptor.properties, key3))) {
2265
+ validate27.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key3 }, message: "must NOT have additional properties" }];
2269
2266
  return false;
2270
2267
  break;
2271
2268
  }
2272
2269
  }
2273
- if (_errs76 === errors) {
2274
- let missing13;
2275
- if (data20.parentId !== undefined && ((data20.protocol === undefined) && (missing13 = "protocol"))) {
2270
+ if (_errs75 === errors) {
2271
+ let missing14;
2272
+ if (data19.parentId !== undefined && ((data19.protocol === undefined) && (missing14 = "protocol"))) {
2276
2273
  validate27.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/dependencies", keyword: "dependencies", params: { property: "parentId",
2277
- missingProperty: missing13,
2274
+ missingProperty: missing14,
2278
2275
  depsCount: 1,
2279
2276
  deps: "protocol" }, message: "must have property protocol when property parentId is present" }];
2280
2277
  return false;
2281
2278
  }
2282
2279
  else {
2283
- if (data20.interface !== undefined) {
2284
- let data23 = data20.interface;
2285
- const _errs77 = errors;
2286
- if (typeof data23 !== "string") {
2280
+ if (data19.interface !== undefined) {
2281
+ let data22 = data19.interface;
2282
+ const _errs76 = errors;
2283
+ if (typeof data22 !== "string") {
2287
2284
  validate27.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
2288
2285
  return false;
2289
2286
  }
2290
- if (!(data23 === "Records")) {
2287
+ if (!(data22 === "Records")) {
2291
2288
  validate27.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues: schema39.properties.descriptor.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
2292
2289
  return false;
2293
2290
  }
2294
- var valid25 = _errs77 === errors;
2291
+ var valid26 = _errs76 === errors;
2295
2292
  }
2296
2293
  else {
2297
- var valid25 = true;
2294
+ var valid26 = true;
2298
2295
  }
2299
- if (valid25) {
2300
- if (data20.method !== undefined) {
2301
- let data24 = data20.method;
2302
- const _errs79 = errors;
2303
- if (typeof data24 !== "string") {
2296
+ if (valid26) {
2297
+ if (data19.method !== undefined) {
2298
+ let data23 = data19.method;
2299
+ const _errs78 = errors;
2300
+ if (typeof data23 !== "string") {
2304
2301
  validate27.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
2305
2302
  return false;
2306
2303
  }
2307
- if (!(data24 === "Write")) {
2304
+ if (!(data23 === "Write")) {
2308
2305
  validate27.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues: schema39.properties.descriptor.properties.method.enum }, message: "must be equal to one of the allowed values" }];
2309
2306
  return false;
2310
2307
  }
2311
- var valid25 = _errs79 === errors;
2308
+ var valid26 = _errs78 === errors;
2312
2309
  }
2313
2310
  else {
2314
- var valid25 = true;
2311
+ var valid26 = true;
2315
2312
  }
2316
- if (valid25) {
2317
- if (data20.recipient !== undefined) {
2318
- let data25 = data20.recipient;
2313
+ if (valid26) {
2314
+ if (data19.recipient !== undefined) {
2315
+ let data24 = data19.recipient;
2316
+ const _errs80 = errors;
2319
2317
  const _errs81 = errors;
2320
- const _errs82 = errors;
2321
- if (errors === _errs82) {
2322
- if (typeof data25 === "string") {
2323
- if (!pattern12.test(data25)) {
2318
+ if (errors === _errs81) {
2319
+ if (typeof data24 === "string") {
2320
+ if (!pattern12.test(data24)) {
2324
2321
  validate27.errors = [{ instancePath: instancePath + "/descriptor/recipient", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/did/pattern", keyword: "pattern", params: { pattern: "^did:([a-z0-9]+):((?:(?:[a-zA-Z0-9._-]|(?:%[0-9a-fA-F]{2}))*:)*((?:[a-zA-Z0-9._-]|(?:%[0-9a-fA-F]{2}))+))((;[a-zA-Z0-9_.:%-]+=[a-zA-Z0-9_.:%-]*)*)(/[^#?]*)?([?][^#]*)?(#.*)?$" }, message: "must match pattern \"" + "^did:([a-z0-9]+):((?:(?:[a-zA-Z0-9._-]|(?:%[0-9a-fA-F]{2}))*:)*((?:[a-zA-Z0-9._-]|(?:%[0-9a-fA-F]{2}))+))((;[a-zA-Z0-9_.:%-]+=[a-zA-Z0-9_.:%-]*)*)(/[^#?]*)?([?][^#]*)?(#.*)?$" + "\"" }];
2325
2322
  return false;
2326
2323
  }
@@ -2330,30 +2327,30 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2330
2327
  return false;
2331
2328
  }
2332
2329
  }
2333
- var valid25 = _errs81 === errors;
2330
+ var valid26 = _errs80 === errors;
2334
2331
  }
2335
2332
  else {
2336
- var valid25 = true;
2333
+ var valid26 = true;
2337
2334
  }
2338
- if (valid25) {
2339
- if (data20.protocol !== undefined) {
2340
- const _errs84 = errors;
2341
- if (typeof data20.protocol !== "string") {
2335
+ if (valid26) {
2336
+ if (data19.protocol !== undefined) {
2337
+ const _errs83 = errors;
2338
+ if (typeof data19.protocol !== "string") {
2342
2339
  validate27.errors = [{ instancePath: instancePath + "/descriptor/protocol", schemaPath: "#/properties/descriptor/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
2343
2340
  return false;
2344
2341
  }
2345
- var valid25 = _errs84 === errors;
2342
+ var valid26 = _errs83 === errors;
2346
2343
  }
2347
2344
  else {
2348
- var valid25 = true;
2345
+ var valid26 = true;
2349
2346
  }
2350
- if (valid25) {
2351
- if (data20.protocolPath !== undefined) {
2352
- let data27 = data20.protocolPath;
2353
- const _errs86 = errors;
2354
- if (errors === _errs86) {
2355
- if (typeof data27 === "string") {
2356
- if (!pattern13.test(data27)) {
2347
+ if (valid26) {
2348
+ if (data19.protocolPath !== undefined) {
2349
+ let data26 = data19.protocolPath;
2350
+ const _errs85 = errors;
2351
+ if (errors === _errs85) {
2352
+ if (typeof data26 === "string") {
2353
+ if (!pattern13.test(data26)) {
2357
2354
  validate27.errors = [{ instancePath: instancePath + "/descriptor/protocolPath", schemaPath: "#/properties/descriptor/properties/protocolPath/pattern", keyword: "pattern", params: { pattern: "^[a-zA-Z]+(/[a-zA-Z]+)*$" }, message: "must match pattern \"" + "^[a-zA-Z]+(/[a-zA-Z]+)*$" + "\"" }];
2358
2355
  return false;
2359
2356
  }
@@ -2363,48 +2360,48 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2363
2360
  return false;
2364
2361
  }
2365
2362
  }
2366
- var valid25 = _errs86 === errors;
2363
+ var valid26 = _errs85 === errors;
2367
2364
  }
2368
2365
  else {
2369
- var valid25 = true;
2366
+ var valid26 = true;
2370
2367
  }
2371
- if (valid25) {
2372
- if (data20.schema !== undefined) {
2373
- const _errs88 = errors;
2374
- if (typeof data20.schema !== "string") {
2368
+ if (valid26) {
2369
+ if (data19.schema !== undefined) {
2370
+ const _errs87 = errors;
2371
+ if (typeof data19.schema !== "string") {
2375
2372
  validate27.errors = [{ instancePath: instancePath + "/descriptor/schema", schemaPath: "#/properties/descriptor/properties/schema/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
2376
2373
  return false;
2377
2374
  }
2378
- var valid25 = _errs88 === errors;
2375
+ var valid26 = _errs87 === errors;
2379
2376
  }
2380
2377
  else {
2381
- var valid25 = true;
2378
+ var valid26 = true;
2382
2379
  }
2383
- if (valid25) {
2384
- if (data20.tags !== undefined) {
2385
- let data29 = data20.tags;
2386
- const _errs90 = errors;
2387
- if (errors === _errs90) {
2388
- if (data29 && typeof data29 == "object" && !Array.isArray(data29)) {
2389
- if (Object.keys(data29).length > 10) {
2380
+ if (valid26) {
2381
+ if (data19.tags !== undefined) {
2382
+ let data28 = data19.tags;
2383
+ const _errs89 = errors;
2384
+ if (errors === _errs89) {
2385
+ if (data28 && typeof data28 == "object" && !Array.isArray(data28)) {
2386
+ if (Object.keys(data28).length > 10) {
2390
2387
  validate27.errors = [{ instancePath: instancePath + "/descriptor/tags", schemaPath: "#/properties/descriptor/properties/tags/maxProperties", keyword: "maxProperties", params: { limit: 10 }, message: "must NOT have more than 10 properties" }];
2391
2388
  return false;
2392
2389
  }
2393
2390
  else {
2394
- if (Object.keys(data29).length < 1) {
2391
+ if (Object.keys(data28).length < 1) {
2395
2392
  validate27.errors = [{ instancePath: instancePath + "/descriptor/tags", schemaPath: "#/properties/descriptor/properties/tags/minProperties", keyword: "minProperties", params: { limit: 1 }, message: "must NOT have fewer than 1 properties" }];
2396
2393
  return false;
2397
2394
  }
2398
2395
  else {
2399
- for (const key3 in data29) {
2400
- let data30 = data29[key3];
2396
+ for (const key4 in data28) {
2397
+ let data29 = data28[key4];
2398
+ const _errs92 = errors;
2401
2399
  const _errs93 = errors;
2402
- const _errs94 = errors;
2403
- let valid28 = false;
2400
+ let valid29 = false;
2404
2401
  let passing0 = null;
2405
- const _errs95 = errors;
2406
- if (typeof data30 !== "string") {
2407
- const err24 = { instancePath: instancePath + "/descriptor/tags/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2402
+ const _errs94 = errors;
2403
+ if (typeof data29 !== "string") {
2404
+ const err24 = { instancePath: instancePath + "/descriptor/tags/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2408
2405
  if (vErrors === null) {
2409
2406
  vErrors = [err24];
2410
2407
  }
@@ -2413,14 +2410,14 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2413
2410
  }
2414
2411
  errors++;
2415
2412
  }
2416
- var _valid2 = _errs95 === errors;
2413
+ var _valid2 = _errs94 === errors;
2417
2414
  if (_valid2) {
2418
- valid28 = true;
2415
+ valid29 = true;
2419
2416
  passing0 = 0;
2420
2417
  }
2421
- const _errs97 = errors;
2422
- if (!((typeof data30 == "number") && (isFinite(data30)))) {
2423
- const err25 = { instancePath: instancePath + "/descriptor/tags/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/1/type", keyword: "type", params: { type: "number" }, message: "must be number" };
2418
+ const _errs96 = errors;
2419
+ if (!((typeof data29 == "number") && (isFinite(data29)))) {
2420
+ const err25 = { instancePath: instancePath + "/descriptor/tags/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/1/type", keyword: "type", params: { type: "number" }, message: "must be number" };
2424
2421
  if (vErrors === null) {
2425
2422
  vErrors = [err25];
2426
2423
  }
@@ -2429,19 +2426,19 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2429
2426
  }
2430
2427
  errors++;
2431
2428
  }
2432
- var _valid2 = _errs97 === errors;
2433
- if (_valid2 && valid28) {
2434
- valid28 = false;
2429
+ var _valid2 = _errs96 === errors;
2430
+ if (_valid2 && valid29) {
2431
+ valid29 = false;
2435
2432
  passing0 = [passing0, 1];
2436
2433
  }
2437
2434
  else {
2438
2435
  if (_valid2) {
2439
- valid28 = true;
2436
+ valid29 = true;
2440
2437
  passing0 = 1;
2441
2438
  }
2442
- const _errs99 = errors;
2443
- if (typeof data30 !== "boolean") {
2444
- const err26 = { instancePath: instancePath + "/descriptor/tags/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/2/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
2439
+ const _errs98 = errors;
2440
+ if (typeof data29 !== "boolean") {
2441
+ const err26 = { instancePath: instancePath + "/descriptor/tags/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/2/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
2445
2442
  if (vErrors === null) {
2446
2443
  vErrors = [err26];
2447
2444
  }
@@ -2450,21 +2447,21 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2450
2447
  }
2451
2448
  errors++;
2452
2449
  }
2453
- var _valid2 = _errs99 === errors;
2454
- if (_valid2 && valid28) {
2455
- valid28 = false;
2450
+ var _valid2 = _errs98 === errors;
2451
+ if (_valid2 && valid29) {
2452
+ valid29 = false;
2456
2453
  passing0 = [passing0, 2];
2457
2454
  }
2458
2455
  else {
2459
2456
  if (_valid2) {
2460
- valid28 = true;
2457
+ valid29 = true;
2461
2458
  passing0 = 2;
2462
2459
  }
2463
- const _errs101 = errors;
2464
- if (errors === _errs101) {
2465
- if (Array.isArray(data30)) {
2466
- if (data30.length > 10) {
2467
- const err27 = { instancePath: instancePath + "/descriptor/tags/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/3/maxItems", keyword: "maxItems", params: { limit: 10 }, message: "must NOT have more than 10 items" };
2460
+ const _errs100 = errors;
2461
+ if (errors === _errs100) {
2462
+ if (Array.isArray(data29)) {
2463
+ if (data29.length > 10) {
2464
+ const err27 = { instancePath: instancePath + "/descriptor/tags/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/3/maxItems", keyword: "maxItems", params: { limit: 10 }, message: "must NOT have more than 10 items" };
2468
2465
  if (vErrors === null) {
2469
2466
  vErrors = [err27];
2470
2467
  }
@@ -2474,8 +2471,8 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2474
2471
  errors++;
2475
2472
  }
2476
2473
  else {
2477
- if (data30.length < 1) {
2478
- const err28 = { instancePath: instancePath + "/descriptor/tags/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/3/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
2474
+ if (data29.length < 1) {
2475
+ const err28 = { instancePath: instancePath + "/descriptor/tags/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/3/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
2479
2476
  if (vErrors === null) {
2480
2477
  vErrors = [err28];
2481
2478
  }
@@ -2485,12 +2482,12 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2485
2482
  errors++;
2486
2483
  }
2487
2484
  else {
2488
- var valid29 = true;
2489
- const len1 = data30.length;
2485
+ var valid30 = true;
2486
+ const len1 = data29.length;
2490
2487
  for (let i1 = 0; i1 < len1; i1++) {
2491
- const _errs103 = errors;
2492
- if (typeof data30[i1] !== "string") {
2493
- const err29 = { instancePath: instancePath + "/descriptor/tags/" + key3.replace(/~/g, "~0").replace(/\//g, "~1") + "/" + i1, schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/3/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2488
+ const _errs102 = errors;
2489
+ if (typeof data29[i1] !== "string") {
2490
+ const err29 = { instancePath: instancePath + "/descriptor/tags/" + key4.replace(/~/g, "~0").replace(/\//g, "~1") + "/" + i1, schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/3/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2494
2491
  if (vErrors === null) {
2495
2492
  vErrors = [err29];
2496
2493
  }
@@ -2499,8 +2496,8 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2499
2496
  }
2500
2497
  errors++;
2501
2498
  }
2502
- var valid29 = _errs103 === errors;
2503
- if (!valid29) {
2499
+ var valid30 = _errs102 === errors;
2500
+ if (!valid30) {
2504
2501
  break;
2505
2502
  }
2506
2503
  }
@@ -2508,7 +2505,7 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2508
2505
  }
2509
2506
  }
2510
2507
  else {
2511
- const err30 = { instancePath: instancePath + "/descriptor/tags/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/3/type", keyword: "type", params: { type: "array" }, message: "must be array" };
2508
+ const err30 = { instancePath: instancePath + "/descriptor/tags/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/3/type", keyword: "type", params: { type: "array" }, message: "must be array" };
2512
2509
  if (vErrors === null) {
2513
2510
  vErrors = [err30];
2514
2511
  }
@@ -2518,22 +2515,22 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2518
2515
  errors++;
2519
2516
  }
2520
2517
  }
2521
- var _valid2 = _errs101 === errors;
2522
- if (_valid2 && valid28) {
2523
- valid28 = false;
2518
+ var _valid2 = _errs100 === errors;
2519
+ if (_valid2 && valid29) {
2520
+ valid29 = false;
2524
2521
  passing0 = [passing0, 3];
2525
2522
  }
2526
2523
  else {
2527
2524
  if (_valid2) {
2528
- valid28 = true;
2525
+ valid29 = true;
2529
2526
  passing0 = 3;
2530
2527
  var items0 = true;
2531
2528
  }
2532
- const _errs105 = errors;
2533
- if (errors === _errs105) {
2534
- if (Array.isArray(data30)) {
2535
- if (data30.length > 10) {
2536
- const err31 = { instancePath: instancePath + "/descriptor/tags/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/4/maxItems", keyword: "maxItems", params: { limit: 10 }, message: "must NOT have more than 10 items" };
2529
+ const _errs104 = errors;
2530
+ if (errors === _errs104) {
2531
+ if (Array.isArray(data29)) {
2532
+ if (data29.length > 10) {
2533
+ const err31 = { instancePath: instancePath + "/descriptor/tags/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/4/maxItems", keyword: "maxItems", params: { limit: 10 }, message: "must NOT have more than 10 items" };
2537
2534
  if (vErrors === null) {
2538
2535
  vErrors = [err31];
2539
2536
  }
@@ -2543,8 +2540,8 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2543
2540
  errors++;
2544
2541
  }
2545
2542
  else {
2546
- if (data30.length < 1) {
2547
- const err32 = { instancePath: instancePath + "/descriptor/tags/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/4/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
2543
+ if (data29.length < 1) {
2544
+ const err32 = { instancePath: instancePath + "/descriptor/tags/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/4/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
2548
2545
  if (vErrors === null) {
2549
2546
  vErrors = [err32];
2550
2547
  }
@@ -2554,13 +2551,13 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2554
2551
  errors++;
2555
2552
  }
2556
2553
  else {
2557
- var valid30 = true;
2558
- const len2 = data30.length;
2554
+ var valid31 = true;
2555
+ const len2 = data29.length;
2559
2556
  for (let i2 = 0; i2 < len2; i2++) {
2560
- let data32 = data30[i2];
2561
- const _errs107 = errors;
2562
- if (!((typeof data32 == "number") && (isFinite(data32)))) {
2563
- const err33 = { instancePath: instancePath + "/descriptor/tags/" + key3.replace(/~/g, "~0").replace(/\//g, "~1") + "/" + i2, schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/4/items/type", keyword: "type", params: { type: "number" }, message: "must be number" };
2557
+ let data31 = data29[i2];
2558
+ const _errs106 = errors;
2559
+ if (!((typeof data31 == "number") && (isFinite(data31)))) {
2560
+ const err33 = { instancePath: instancePath + "/descriptor/tags/" + key4.replace(/~/g, "~0").replace(/\//g, "~1") + "/" + i2, schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/4/items/type", keyword: "type", params: { type: "number" }, message: "must be number" };
2564
2561
  if (vErrors === null) {
2565
2562
  vErrors = [err33];
2566
2563
  }
@@ -2569,8 +2566,8 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2569
2566
  }
2570
2567
  errors++;
2571
2568
  }
2572
- var valid30 = _errs107 === errors;
2573
- if (!valid30) {
2569
+ var valid31 = _errs106 === errors;
2570
+ if (!valid31) {
2574
2571
  break;
2575
2572
  }
2576
2573
  }
@@ -2578,7 +2575,7 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2578
2575
  }
2579
2576
  }
2580
2577
  else {
2581
- const err34 = { instancePath: instancePath + "/descriptor/tags/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/4/type", keyword: "type", params: { type: "array" }, message: "must be array" };
2578
+ const err34 = { instancePath: instancePath + "/descriptor/tags/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/4/type", keyword: "type", params: { type: "array" }, message: "must be array" };
2582
2579
  if (vErrors === null) {
2583
2580
  vErrors = [err34];
2584
2581
  }
@@ -2588,14 +2585,14 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2588
2585
  errors++;
2589
2586
  }
2590
2587
  }
2591
- var _valid2 = _errs105 === errors;
2592
- if (_valid2 && valid28) {
2593
- valid28 = false;
2588
+ var _valid2 = _errs104 === errors;
2589
+ if (_valid2 && valid29) {
2590
+ valid29 = false;
2594
2591
  passing0 = [passing0, 4];
2595
2592
  }
2596
2593
  else {
2597
2594
  if (_valid2) {
2598
- valid28 = true;
2595
+ valid29 = true;
2599
2596
  passing0 = 4;
2600
2597
  if (items0 !== true) {
2601
2598
  items0 = true;
@@ -2605,8 +2602,8 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2605
2602
  }
2606
2603
  }
2607
2604
  }
2608
- if (!valid28) {
2609
- const err35 = { instancePath: instancePath + "/descriptor/tags/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
2605
+ if (!valid29) {
2606
+ const err35 = { instancePath: instancePath + "/descriptor/tags/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
2610
2607
  if (vErrors === null) {
2611
2608
  vErrors = [err35];
2612
2609
  }
@@ -2618,18 +2615,18 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2618
2615
  return false;
2619
2616
  }
2620
2617
  else {
2621
- errors = _errs94;
2618
+ errors = _errs93;
2622
2619
  if (vErrors !== null) {
2623
- if (_errs94) {
2624
- vErrors.length = _errs94;
2620
+ if (_errs93) {
2621
+ vErrors.length = _errs93;
2625
2622
  }
2626
2623
  else {
2627
2624
  vErrors = null;
2628
2625
  }
2629
2626
  }
2630
2627
  }
2631
- var valid27 = _errs93 === errors;
2632
- if (!valid27) {
2628
+ var valid28 = _errs92 === errors;
2629
+ if (!valid28) {
2633
2630
  break;
2634
2631
  }
2635
2632
  }
@@ -2641,56 +2638,56 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2641
2638
  return false;
2642
2639
  }
2643
2640
  }
2644
- var valid25 = _errs90 === errors;
2641
+ var valid26 = _errs89 === errors;
2645
2642
  }
2646
2643
  else {
2647
- var valid25 = true;
2644
+ var valid26 = true;
2648
2645
  }
2649
- if (valid25) {
2650
- if (data20.parentId !== undefined) {
2651
- const _errs109 = errors;
2652
- if (typeof data20.parentId !== "string") {
2646
+ if (valid26) {
2647
+ if (data19.parentId !== undefined) {
2648
+ const _errs108 = errors;
2649
+ if (typeof data19.parentId !== "string") {
2653
2650
  validate27.errors = [{ instancePath: instancePath + "/descriptor/parentId", schemaPath: "#/properties/descriptor/properties/parentId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
2654
2651
  return false;
2655
2652
  }
2656
- var valid25 = _errs109 === errors;
2653
+ var valid26 = _errs108 === errors;
2657
2654
  }
2658
2655
  else {
2659
- var valid25 = true;
2656
+ var valid26 = true;
2660
2657
  }
2661
- if (valid25) {
2662
- if (data20.dataCid !== undefined) {
2663
- const _errs111 = errors;
2664
- if (typeof data20.dataCid !== "string") {
2658
+ if (valid26) {
2659
+ if (data19.dataCid !== undefined) {
2660
+ const _errs110 = errors;
2661
+ if (typeof data19.dataCid !== "string") {
2665
2662
  validate27.errors = [{ instancePath: instancePath + "/descriptor/dataCid", schemaPath: "#/properties/descriptor/properties/dataCid/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
2666
2663
  return false;
2667
2664
  }
2668
- var valid25 = _errs111 === errors;
2665
+ var valid26 = _errs110 === errors;
2669
2666
  }
2670
2667
  else {
2671
- var valid25 = true;
2668
+ var valid26 = true;
2672
2669
  }
2673
- if (valid25) {
2674
- if (data20.dataSize !== undefined) {
2675
- let data35 = data20.dataSize;
2676
- const _errs113 = errors;
2677
- if (!((typeof data35 == "number") && (isFinite(data35)))) {
2670
+ if (valid26) {
2671
+ if (data19.dataSize !== undefined) {
2672
+ let data34 = data19.dataSize;
2673
+ const _errs112 = errors;
2674
+ if (!((typeof data34 == "number") && (isFinite(data34)))) {
2678
2675
  validate27.errors = [{ instancePath: instancePath + "/descriptor/dataSize", schemaPath: "#/properties/descriptor/properties/dataSize/type", keyword: "type", params: { type: "number" }, message: "must be number" }];
2679
2676
  return false;
2680
2677
  }
2681
- var valid25 = _errs113 === errors;
2678
+ var valid26 = _errs112 === errors;
2682
2679
  }
2683
2680
  else {
2684
- var valid25 = true;
2681
+ var valid26 = true;
2685
2682
  }
2686
- if (valid25) {
2687
- if (data20.dateCreated !== undefined) {
2688
- let data36 = data20.dateCreated;
2683
+ if (valid26) {
2684
+ if (data19.dateCreated !== undefined) {
2685
+ let data35 = data19.dateCreated;
2686
+ const _errs114 = errors;
2689
2687
  const _errs115 = errors;
2690
- const _errs116 = errors;
2691
- if (errors === _errs116) {
2692
- if (typeof data36 === "string") {
2693
- if (!pattern14.test(data36)) {
2688
+ if (errors === _errs115) {
2689
+ if (typeof data35 === "string") {
2690
+ if (!pattern14.test(data35)) {
2694
2691
  validate27.errors = [{ instancePath: instancePath + "/descriptor/dateCreated", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time/pattern", keyword: "pattern", params: { pattern: "^\\d{4}-[0-1]\\d-[0-3]\\dT(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)\\.\\d{6}Z$" }, message: "must match pattern \"" + "^\\d{4}-[0-1]\\d-[0-3]\\dT(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)\\.\\d{6}Z$" + "\"" }];
2695
2692
  return false;
2696
2693
  }
@@ -2700,19 +2697,19 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2700
2697
  return false;
2701
2698
  }
2702
2699
  }
2703
- var valid25 = _errs115 === errors;
2700
+ var valid26 = _errs114 === errors;
2704
2701
  }
2705
2702
  else {
2706
- var valid25 = true;
2703
+ var valid26 = true;
2707
2704
  }
2708
- if (valid25) {
2709
- if (data20.messageTimestamp !== undefined) {
2710
- let data37 = data20.messageTimestamp;
2705
+ if (valid26) {
2706
+ if (data19.messageTimestamp !== undefined) {
2707
+ let data36 = data19.messageTimestamp;
2708
+ const _errs117 = errors;
2711
2709
  const _errs118 = errors;
2712
- const _errs119 = errors;
2713
- if (errors === _errs119) {
2714
- if (typeof data37 === "string") {
2715
- if (!pattern14.test(data37)) {
2710
+ if (errors === _errs118) {
2711
+ if (typeof data36 === "string") {
2712
+ if (!pattern14.test(data36)) {
2716
2713
  validate27.errors = [{ instancePath: instancePath + "/descriptor/messageTimestamp", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time/pattern", keyword: "pattern", params: { pattern: "^\\d{4}-[0-1]\\d-[0-3]\\dT(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)\\.\\d{6}Z$" }, message: "must match pattern \"" + "^\\d{4}-[0-1]\\d-[0-3]\\dT(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)\\.\\d{6}Z$" + "\"" }];
2717
2714
  return false;
2718
2715
  }
@@ -2722,31 +2719,31 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2722
2719
  return false;
2723
2720
  }
2724
2721
  }
2725
- var valid25 = _errs118 === errors;
2722
+ var valid26 = _errs117 === errors;
2726
2723
  }
2727
2724
  else {
2728
- var valid25 = true;
2725
+ var valid26 = true;
2729
2726
  }
2730
- if (valid25) {
2731
- if (data20.published !== undefined) {
2732
- const _errs121 = errors;
2733
- if (typeof data20.published !== "boolean") {
2727
+ if (valid26) {
2728
+ if (data19.published !== undefined) {
2729
+ const _errs120 = errors;
2730
+ if (typeof data19.published !== "boolean") {
2734
2731
  validate27.errors = [{ instancePath: instancePath + "/descriptor/published", schemaPath: "#/properties/descriptor/properties/published/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
2735
2732
  return false;
2736
2733
  }
2737
- var valid25 = _errs121 === errors;
2734
+ var valid26 = _errs120 === errors;
2738
2735
  }
2739
2736
  else {
2740
- var valid25 = true;
2737
+ var valid26 = true;
2741
2738
  }
2742
- if (valid25) {
2743
- if (data20.datePublished !== undefined) {
2744
- let data39 = data20.datePublished;
2739
+ if (valid26) {
2740
+ if (data19.datePublished !== undefined) {
2741
+ let data38 = data19.datePublished;
2742
+ const _errs122 = errors;
2745
2743
  const _errs123 = errors;
2746
- const _errs124 = errors;
2747
- if (errors === _errs124) {
2748
- if (typeof data39 === "string") {
2749
- if (!pattern14.test(data39)) {
2744
+ if (errors === _errs123) {
2745
+ if (typeof data38 === "string") {
2746
+ if (!pattern14.test(data38)) {
2750
2747
  validate27.errors = [{ instancePath: instancePath + "/descriptor/datePublished", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time/pattern", keyword: "pattern", params: { pattern: "^\\d{4}-[0-1]\\d-[0-3]\\dT(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)\\.\\d{6}Z$" }, message: "must match pattern \"" + "^\\d{4}-[0-1]\\d-[0-3]\\dT(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)\\.\\d{6}Z$" + "\"" }];
2751
2748
  return false;
2752
2749
  }
@@ -2756,34 +2753,34 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2756
2753
  return false;
2757
2754
  }
2758
2755
  }
2759
- var valid25 = _errs123 === errors;
2756
+ var valid26 = _errs122 === errors;
2760
2757
  }
2761
2758
  else {
2762
- var valid25 = true;
2759
+ var valid26 = true;
2763
2760
  }
2764
- if (valid25) {
2765
- if (data20.dataFormat !== undefined) {
2766
- const _errs126 = errors;
2767
- if (typeof data20.dataFormat !== "string") {
2761
+ if (valid26) {
2762
+ if (data19.dataFormat !== undefined) {
2763
+ const _errs125 = errors;
2764
+ if (typeof data19.dataFormat !== "string") {
2768
2765
  validate27.errors = [{ instancePath: instancePath + "/descriptor/dataFormat", schemaPath: "#/properties/descriptor/properties/dataFormat/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
2769
2766
  return false;
2770
2767
  }
2771
- var valid25 = _errs126 === errors;
2768
+ var valid26 = _errs125 === errors;
2772
2769
  }
2773
2770
  else {
2774
- var valid25 = true;
2771
+ var valid26 = true;
2775
2772
  }
2776
- if (valid25) {
2777
- if (data20.permissionGrantId !== undefined) {
2778
- const _errs128 = errors;
2779
- if (typeof data20.permissionGrantId !== "string") {
2773
+ if (valid26) {
2774
+ if (data19.permissionGrantId !== undefined) {
2775
+ const _errs127 = errors;
2776
+ if (typeof data19.permissionGrantId !== "string") {
2780
2777
  validate27.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantId", schemaPath: "#/properties/descriptor/properties/permissionGrantId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
2781
2778
  return false;
2782
2779
  }
2783
- var valid25 = _errs128 === errors;
2780
+ var valid26 = _errs127 === errors;
2784
2781
  }
2785
2782
  else {
2786
- var valid25 = true;
2783
+ var valid26 = true;
2787
2784
  }
2788
2785
  }
2789
2786
  }
@@ -2809,7 +2806,7 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2809
2806
  return false;
2810
2807
  }
2811
2808
  }
2812
- var valid8 = _errs56 === errors;
2809
+ var valid8 = _errs55 === errors;
2813
2810
  }
2814
2811
  else {
2815
2812
  var valid8 = true;
@@ -5381,7 +5378,7 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
5381
5378
  } validate45.errors = vErrors; return errors === 0; }
5382
5379
  validate45.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
5383
5380
  export const RecordsSubscribe = validate48;
5384
- const schema73 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/records-subscribe.json", "type": "object", "additionalProperties": false, "required": ["descriptor"], "properties": { "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization-delegated-grant.json" }, "descriptor": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "messageTimestamp", "filter"], "properties": { "interface": { "enum": ["Records"], "type": "string" }, "method": { "enum": ["Subscribe"], "type": "string" }, "messageTimestamp": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "filter": { "$ref": "https://identity.foundation/dwn/json-schemas/records-filter.json" } } } } };
5381
+ const schema73 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/records-subscribe.json", "type": "object", "additionalProperties": false, "required": ["descriptor"], "properties": { "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization-delegated-grant.json" }, "descriptor": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "messageTimestamp", "filter"], "properties": { "interface": { "enum": ["Records"], "type": "string" }, "method": { "enum": ["Subscribe"], "type": "string" }, "messageTimestamp": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "filter": { "$ref": "https://identity.foundation/dwn/json-schemas/records-filter.json" }, "pagination": { "type": "object", "additionalProperties": false, "properties": { "limit": { "type": "number", "minimum": 1 }, "cursor": { "$ref": "https://identity.foundation/dwn/json-schemas/pagination-cursor.json" } } }, "dateSort": { "enum": ["createdAscending", "createdDescending", "publishedAscending", "publishedDescending", "updatedAscending", "updatedDescending"], "type": "string" } } } } };
5385
5382
  function validate48(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/records-subscribe.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate48.evaluated; if (evaluated0.dynamicProps) {
5386
5383
  evaluated0.props = undefined;
5387
5384
  } if (evaluated0.dynamicItems) {
@@ -5428,7 +5425,7 @@ function validate48(data, { instancePath = "", parentData, parentDataProperty, r
5428
5425
  else {
5429
5426
  const _errs5 = errors;
5430
5427
  for (const key1 in data1) {
5431
- if (!((((key1 === "interface") || (key1 === "method")) || (key1 === "messageTimestamp")) || (key1 === "filter"))) {
5428
+ if (!((((((key1 === "interface") || (key1 === "method")) || (key1 === "messageTimestamp")) || (key1 === "filter")) || (key1 === "pagination")) || (key1 === "dateSort"))) {
5432
5429
  validate48.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
5433
5430
  return false;
5434
5431
  break;
@@ -5502,6 +5499,139 @@ function validate48(data, { instancePath = "", parentData, parentDataProperty, r
5502
5499
  else {
5503
5500
  var valid1 = true;
5504
5501
  }
5502
+ if (valid1) {
5503
+ if (data1.pagination !== undefined) {
5504
+ let data6 = data1.pagination;
5505
+ const _errs14 = errors;
5506
+ if (errors === _errs14) {
5507
+ if (data6 && typeof data6 == "object" && !Array.isArray(data6)) {
5508
+ const _errs16 = errors;
5509
+ for (const key2 in data6) {
5510
+ if (!((key2 === "limit") || (key2 === "cursor"))) {
5511
+ validate48.errors = [{ instancePath: instancePath + "/descriptor/pagination", schemaPath: "#/properties/descriptor/properties/pagination/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" }];
5512
+ return false;
5513
+ break;
5514
+ }
5515
+ }
5516
+ if (_errs16 === errors) {
5517
+ if (data6.limit !== undefined) {
5518
+ let data7 = data6.limit;
5519
+ const _errs17 = errors;
5520
+ if (errors === _errs17) {
5521
+ if ((typeof data7 == "number") && (isFinite(data7))) {
5522
+ if (data7 < 1 || isNaN(data7)) {
5523
+ validate48.errors = [{ instancePath: instancePath + "/descriptor/pagination/limit", schemaPath: "#/properties/descriptor/properties/pagination/properties/limit/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" }];
5524
+ return false;
5525
+ }
5526
+ }
5527
+ else {
5528
+ validate48.errors = [{ instancePath: instancePath + "/descriptor/pagination/limit", schemaPath: "#/properties/descriptor/properties/pagination/properties/limit/type", keyword: "type", params: { type: "number" }, message: "must be number" }];
5529
+ return false;
5530
+ }
5531
+ }
5532
+ var valid3 = _errs17 === errors;
5533
+ }
5534
+ else {
5535
+ var valid3 = true;
5536
+ }
5537
+ if (valid3) {
5538
+ if (data6.cursor !== undefined) {
5539
+ let data8 = data6.cursor;
5540
+ const _errs19 = errors;
5541
+ const _errs20 = errors;
5542
+ if (errors === _errs20) {
5543
+ if (data8 && typeof data8 == "object" && !Array.isArray(data8)) {
5544
+ if (Object.keys(data8).length < 1) {
5545
+ validate48.errors = [{ instancePath: instancePath + "/descriptor/pagination/cursor", schemaPath: "https://identity.foundation/dwn/json-schemas/pagination-cursor.json/minProperties", keyword: "minProperties", params: { limit: 1 }, message: "must NOT have fewer than 1 properties" }];
5546
+ return false;
5547
+ }
5548
+ else {
5549
+ let missing2;
5550
+ if (((data8.messageCid === undefined) && (missing2 = "messageCid")) || ((data8.value === undefined) && (missing2 = "value"))) {
5551
+ validate48.errors = [{ instancePath: instancePath + "/descriptor/pagination/cursor", schemaPath: "https://identity.foundation/dwn/json-schemas/pagination-cursor.json/required", keyword: "required", params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'" }];
5552
+ return false;
5553
+ }
5554
+ else {
5555
+ const _errs22 = errors;
5556
+ for (const key3 in data8) {
5557
+ if (!((key3 === "messageCid") || (key3 === "value"))) {
5558
+ validate48.errors = [{ instancePath: instancePath + "/descriptor/pagination/cursor", schemaPath: "https://identity.foundation/dwn/json-schemas/pagination-cursor.json/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key3 }, message: "must NOT have additional properties" }];
5559
+ return false;
5560
+ break;
5561
+ }
5562
+ }
5563
+ if (_errs22 === errors) {
5564
+ if (data8.messageCid !== undefined) {
5565
+ const _errs23 = errors;
5566
+ if (typeof data8.messageCid !== "string") {
5567
+ validate48.errors = [{ instancePath: instancePath + "/descriptor/pagination/cursor/messageCid", schemaPath: "https://identity.foundation/dwn/json-schemas/pagination-cursor.json/properties/messageCid/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
5568
+ return false;
5569
+ }
5570
+ var valid5 = _errs23 === errors;
5571
+ }
5572
+ else {
5573
+ var valid5 = true;
5574
+ }
5575
+ if (valid5) {
5576
+ if (data8.value !== undefined) {
5577
+ let data10 = data8.value;
5578
+ const _errs25 = errors;
5579
+ if ((typeof data10 !== "string") && (!((typeof data10 == "number") && (isFinite(data10))))) {
5580
+ validate48.errors = [{ instancePath: instancePath + "/descriptor/pagination/cursor/value", schemaPath: "https://identity.foundation/dwn/json-schemas/pagination-cursor.json/properties/value/type", keyword: "type", params: { type: schema72.properties.value.type }, message: "must be string,number" }];
5581
+ return false;
5582
+ }
5583
+ var valid5 = _errs25 === errors;
5584
+ }
5585
+ else {
5586
+ var valid5 = true;
5587
+ }
5588
+ }
5589
+ }
5590
+ }
5591
+ }
5592
+ }
5593
+ else {
5594
+ validate48.errors = [{ instancePath: instancePath + "/descriptor/pagination/cursor", schemaPath: "https://identity.foundation/dwn/json-schemas/pagination-cursor.json/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
5595
+ return false;
5596
+ }
5597
+ }
5598
+ var valid3 = _errs19 === errors;
5599
+ }
5600
+ else {
5601
+ var valid3 = true;
5602
+ }
5603
+ }
5604
+ }
5605
+ }
5606
+ else {
5607
+ validate48.errors = [{ instancePath: instancePath + "/descriptor/pagination", schemaPath: "#/properties/descriptor/properties/pagination/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
5608
+ return false;
5609
+ }
5610
+ }
5611
+ var valid1 = _errs14 === errors;
5612
+ }
5613
+ else {
5614
+ var valid1 = true;
5615
+ }
5616
+ if (valid1) {
5617
+ if (data1.dateSort !== undefined) {
5618
+ let data11 = data1.dateSort;
5619
+ const _errs27 = errors;
5620
+ if (typeof data11 !== "string") {
5621
+ validate48.errors = [{ instancePath: instancePath + "/descriptor/dateSort", schemaPath: "#/properties/descriptor/properties/dateSort/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
5622
+ return false;
5623
+ }
5624
+ if (!((((((data11 === "createdAscending") || (data11 === "createdDescending")) || (data11 === "publishedAscending")) || (data11 === "publishedDescending")) || (data11 === "updatedAscending")) || (data11 === "updatedDescending"))) {
5625
+ validate48.errors = [{ instancePath: instancePath + "/descriptor/dateSort", schemaPath: "#/properties/descriptor/properties/dateSort/enum", keyword: "enum", params: { allowedValues: schema73.properties.descriptor.properties.dateSort.enum }, message: "must be equal to one of the allowed values" }];
5626
+ return false;
5627
+ }
5628
+ var valid1 = _errs27 === errors;
5629
+ }
5630
+ else {
5631
+ var valid1 = true;
5632
+ }
5633
+ }
5634
+ }
5505
5635
  }
5506
5636
  }
5507
5637
  }
@@ -5529,7 +5659,7 @@ function validate48(data, { instancePath = "", parentData, parentDataProperty, r
5529
5659
  } validate48.errors = vErrors; return errors === 0; }
5530
5660
  validate48.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
5531
5661
  export const RecordsWrite = validate51;
5532
- const schema75 = { "$id": "https://identity.foundation/dwn/json-schemas/records-write.json", "$ref": "https://identity.foundation/dwn/json-schemas/records-write-unidentified.json", "unevaluatedProperties": false, "type": "object", "required": ["recordId", "authorization"] };
5662
+ const schema76 = { "$id": "https://identity.foundation/dwn/json-schemas/records-write.json", "$ref": "https://identity.foundation/dwn/json-schemas/records-write-unidentified.json", "unevaluatedProperties": false, "type": "object", "required": ["recordId", "authorization"] };
5533
5663
  function validate51(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/records-write.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate51.evaluated; if (evaluated0.dynamicProps) {
5534
5664
  evaluated0.props = undefined;
5535
5665
  } if (evaluated0.dynamicItems) {
@@ -6282,7 +6412,7 @@ else {
6282
6412
  validate53.evaluated = { "dynamicProps": true, "dynamicItems": false };
6283
6413
  export const GeneralJws = validate21;
6284
6414
  export const JwkVerificationMethod = validate54;
6285
- const schema77 = { "$id": "https://identity.foundation/dwn/json-schemas/jwk-verification-method.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "additionalProperties": false, "required": ["id", "type", "controller", "publicKeyJwk"], "properties": { "id": { "type": "string" }, "type": { "enum": ["JsonWebKey", "JsonWebKey2020"] }, "controller": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/did" }, "publicKeyJwk": { "$ref": "https://identity.foundation/dwn/json-schemas/public-jwk.json" } } };
6415
+ const schema78 = { "$id": "https://identity.foundation/dwn/json-schemas/jwk-verification-method.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "additionalProperties": false, "required": ["id", "type", "controller", "publicKeyJwk"], "properties": { "id": { "type": "string" }, "type": { "enum": ["JsonWebKey", "JsonWebKey2020"] }, "controller": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/did" }, "publicKeyJwk": { "$ref": "https://identity.foundation/dwn/json-schemas/public-jwk.json" } } };
6286
6416
  function validate54(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/jwk-verification-method.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate54.evaluated; if (evaluated0.dynamicProps) {
6287
6417
  evaluated0.props = undefined;
6288
6418
  } if (evaluated0.dynamicItems) {
@@ -6320,7 +6450,7 @@ function validate54(data, { instancePath = "", parentData, parentDataProperty, r
6320
6450
  let data1 = data.type;
6321
6451
  const _errs4 = errors;
6322
6452
  if (!((data1 === "JsonWebKey") || (data1 === "JsonWebKey2020"))) {
6323
- validate54.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/properties/type/enum", keyword: "enum", params: { allowedValues: schema77.properties.type.enum }, message: "must be equal to one of the allowed values" }];
6453
+ validate54.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/properties/type/enum", keyword: "enum", params: { allowedValues: schema78.properties.type.enum }, message: "must be equal to one of the allowed values" }];
6324
6454
  return false;
6325
6455
  }
6326
6456
  var valid0 = _errs4 === errors;
@@ -6375,7 +6505,7 @@ function validate54(data, { instancePath = "", parentData, parentDataProperty, r
6375
6505
  } validate54.errors = vErrors; return errors === 0; }
6376
6506
  validate54.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
6377
6507
  export const MessagesFilter = validate56;
6378
- const schema79 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/messages-filter.json", "type": "object", "additionalProperties": false, "minProperties": 1, "properties": { "interface": { "enum": ["Protocols", "Records"], "type": "string" }, "method": { "enum": ["Configure", "Delete", "Write"], "type": "string" }, "protocol": { "type": "string" }, "messageTimestamp": { "type": "object", "minProperties": 1, "additionalProperties": false, "properties": { "from": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "to": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" } } } } };
6508
+ const schema80 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/messages-filter.json", "type": "object", "additionalProperties": false, "minProperties": 1, "properties": { "interface": { "enum": ["Messages", "Protocols", "Records"], "type": "string" }, "method": { "enum": ["Configure", "Delete", "Write"], "type": "string" }, "protocol": { "type": "string" }, "messageTimestamp": { "type": "object", "minProperties": 1, "additionalProperties": false, "properties": { "from": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "to": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" } } } } };
6379
6509
  function validate56(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/messages-filter.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate56.evaluated; if (evaluated0.dynamicProps) {
6380
6510
  evaluated0.props = undefined;
6381
6511
  } if (evaluated0.dynamicItems) {
@@ -6403,8 +6533,8 @@ function validate56(data, { instancePath = "", parentData, parentDataProperty, r
6403
6533
  validate56.errors = [{ instancePath: instancePath + "/interface", schemaPath: "#/properties/interface/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
6404
6534
  return false;
6405
6535
  }
6406
- if (!((data0 === "Protocols") || (data0 === "Records"))) {
6407
- validate56.errors = [{ instancePath: instancePath + "/interface", schemaPath: "#/properties/interface/enum", keyword: "enum", params: { allowedValues: schema79.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
6536
+ if (!(((data0 === "Messages") || (data0 === "Protocols")) || (data0 === "Records"))) {
6537
+ validate56.errors = [{ instancePath: instancePath + "/interface", schemaPath: "#/properties/interface/enum", keyword: "enum", params: { allowedValues: schema80.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
6408
6538
  return false;
6409
6539
  }
6410
6540
  var valid0 = _errs2 === errors;
@@ -6421,7 +6551,7 @@ function validate56(data, { instancePath = "", parentData, parentDataProperty, r
6421
6551
  return false;
6422
6552
  }
6423
6553
  if (!(((data1 === "Configure") || (data1 === "Delete")) || (data1 === "Write"))) {
6424
- validate56.errors = [{ instancePath: instancePath + "/method", schemaPath: "#/properties/method/enum", keyword: "enum", params: { allowedValues: schema79.properties.method.enum }, message: "must be equal to one of the allowed values" }];
6554
+ validate56.errors = [{ instancePath: instancePath + "/method", schemaPath: "#/properties/method/enum", keyword: "enum", params: { allowedValues: schema80.properties.method.enum }, message: "must be equal to one of the allowed values" }];
6425
6555
  return false;
6426
6556
  }
6427
6557
  var valid0 = _errs4 === errors;
@@ -6531,7 +6661,7 @@ function validate56(data, { instancePath = "", parentData, parentDataProperty, r
6531
6661
  } validate56.errors = vErrors; return errors === 0; }
6532
6662
  validate56.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
6533
6663
  export const MessagesRead = validate57;
6534
- const schema82 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/messages-read.json", "type": "object", "additionalProperties": false, "required": ["authorization", "descriptor"], "properties": { "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization.json" }, "descriptor": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "messageTimestamp"], "properties": { "interface": { "enum": ["Messages"], "type": "string" }, "method": { "enum": ["Read"], "type": "string" }, "messageTimestamp": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "messageCid": { "type": "string" }, "permissionGrantId": { "type": "string" } } } } };
6664
+ const schema83 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/messages-read.json", "type": "object", "additionalProperties": false, "required": ["authorization", "descriptor"], "properties": { "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization.json" }, "descriptor": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "messageTimestamp", "messageCid"], "properties": { "interface": { "enum": ["Messages"], "type": "string" }, "method": { "enum": ["Read"], "type": "string" }, "messageTimestamp": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "messageCid": { "type": "string" }, "permissionGrantId": { "type": "string" } } } } };
6535
6665
  function validate57(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/messages-read.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate57.evaluated; if (evaluated0.dynamicProps) {
6536
6666
  evaluated0.props = undefined;
6537
6667
  } if (evaluated0.dynamicItems) {
@@ -6571,7 +6701,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
6571
6701
  if (errors === _errs3) {
6572
6702
  if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
6573
6703
  let missing1;
6574
- if ((((data1.interface === undefined) && (missing1 = "interface")) || ((data1.method === undefined) && (missing1 = "method"))) || ((data1.messageTimestamp === undefined) && (missing1 = "messageTimestamp"))) {
6704
+ if (((((data1.interface === undefined) && (missing1 = "interface")) || ((data1.method === undefined) && (missing1 = "method"))) || ((data1.messageTimestamp === undefined) && (missing1 = "messageTimestamp"))) || ((data1.messageCid === undefined) && (missing1 = "messageCid"))) {
6575
6705
  validate57.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
6576
6706
  return false;
6577
6707
  }
@@ -6593,7 +6723,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
6593
6723
  return false;
6594
6724
  }
6595
6725
  if (!(data2 === "Messages")) {
6596
- validate57.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues: schema82.properties.descriptor.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
6726
+ validate57.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues: schema83.properties.descriptor.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
6597
6727
  return false;
6598
6728
  }
6599
6729
  var valid1 = _errs6 === errors;
@@ -6610,7 +6740,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
6610
6740
  return false;
6611
6741
  }
6612
6742
  if (!(data3 === "Read")) {
6613
- validate57.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues: schema82.properties.descriptor.properties.method.enum }, message: "must be equal to one of the allowed values" }];
6743
+ validate57.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues: schema83.properties.descriptor.properties.method.enum }, message: "must be equal to one of the allowed values" }];
6614
6744
  return false;
6615
6745
  }
6616
6746
  var valid1 = _errs8 === errors;
@@ -6692,7 +6822,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
6692
6822
  } validate57.errors = vErrors; return errors === 0; }
6693
6823
  validate57.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
6694
6824
  export const MessagesSubscribe = validate59;
6695
- const schema84 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/messages-subscribe.json", "type": "object", "additionalProperties": false, "required": ["descriptor", "authorization"], "properties": { "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization.json" }, "descriptor": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "messageTimestamp", "filters"], "properties": { "interface": { "enum": ["Messages"], "type": "string" }, "method": { "enum": ["Subscribe"], "type": "string" }, "messageTimestamp": { "type": "string" }, "filters": { "type": "array", "items": { "$ref": "https://identity.foundation/dwn/json-schemas/messages-filter.json" } }, "permissionGrantId": { "type": "string" } } } } };
6825
+ const schema85 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/messages-subscribe.json", "type": "object", "additionalProperties": false, "required": ["descriptor", "authorization"], "properties": { "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization.json" }, "descriptor": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "messageTimestamp", "filters"], "properties": { "interface": { "enum": ["Messages"], "type": "string" }, "method": { "enum": ["Subscribe"], "type": "string" }, "messageTimestamp": { "type": "string" }, "filters": { "type": "array", "items": { "$ref": "https://identity.foundation/dwn/json-schemas/messages-filter.json" } }, "permissionGrantId": { "type": "string" } } } } };
6696
6826
  function validate59(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/messages-subscribe.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate59.evaluated; if (evaluated0.dynamicProps) {
6697
6827
  evaluated0.props = undefined;
6698
6828
  } if (evaluated0.dynamicItems) {
@@ -6754,7 +6884,7 @@ function validate59(data, { instancePath = "", parentData, parentDataProperty, r
6754
6884
  return false;
6755
6885
  }
6756
6886
  if (!(data2 === "Messages")) {
6757
- validate59.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues: schema84.properties.descriptor.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
6887
+ validate59.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues: schema85.properties.descriptor.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
6758
6888
  return false;
6759
6889
  }
6760
6890
  var valid1 = _errs6 === errors;
@@ -6771,7 +6901,7 @@ function validate59(data, { instancePath = "", parentData, parentDataProperty, r
6771
6901
  return false;
6772
6902
  }
6773
6903
  if (!(data3 === "Subscribe")) {
6774
- validate59.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues: schema84.properties.descriptor.properties.method.enum }, message: "must be equal to one of the allowed values" }];
6904
+ validate59.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues: schema85.properties.descriptor.properties.method.enum }, message: "must be equal to one of the allowed values" }];
6775
6905
  return false;
6776
6906
  }
6777
6907
  var valid1 = _errs8 === errors;
@@ -6861,7 +6991,7 @@ function validate59(data, { instancePath = "", parentData, parentDataProperty, r
6861
6991
  } validate59.errors = vErrors; return errors === 0; }
6862
6992
  validate59.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
6863
6993
  export const MessagesSync = validate62;
6864
- const schema85 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/messages-sync.json", "type": "object", "additionalProperties": false, "required": ["authorization", "descriptor"], "properties": { "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization.json" }, "descriptor": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "messageTimestamp", "action"], "properties": { "interface": { "enum": ["Messages"], "type": "string" }, "method": { "enum": ["Sync"], "type": "string" }, "messageTimestamp": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "action": { "enum": ["root", "subtree", "leaves"], "type": "string" }, "protocol": { "type": "string" }, "prefix": { "type": "string", "pattern": "^[01]*$" }, "permissionGrantId": { "type": "string" } }, "allOf": [{ "if": { "properties": { "action": { "const": "subtree" } } }, "then": { "required": ["prefix"] } }, { "if": { "properties": { "action": { "const": "leaves" } } }, "then": { "required": ["prefix"] } }] } } };
6994
+ const schema86 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/messages-sync.json", "type": "object", "additionalProperties": false, "required": ["authorization", "descriptor"], "properties": { "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization.json" }, "descriptor": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "messageTimestamp", "action"], "properties": { "interface": { "enum": ["Messages"], "type": "string" }, "method": { "enum": ["Sync"], "type": "string" }, "messageTimestamp": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "action": { "enum": ["root", "subtree", "leaves"], "type": "string" }, "protocol": { "type": "string" }, "prefix": { "type": "string", "pattern": "^[01]*$" }, "permissionGrantId": { "type": "string" } }, "allOf": [{ "if": { "properties": { "action": { "const": "subtree" } } }, "then": { "required": ["prefix"] } }, { "if": { "properties": { "action": { "const": "leaves" } } }, "then": { "required": ["prefix"] } }] } } };
6865
6995
  const pattern37 = new RegExp("^[01]*$", "u");
6866
6996
  function validate62(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/messages-sync.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate62.evaluated; if (evaluated0.dynamicProps) {
6867
6997
  evaluated0.props = undefined;
@@ -7032,7 +7162,7 @@ function validate62(data, { instancePath = "", parentData, parentDataProperty, r
7032
7162
  return false;
7033
7163
  }
7034
7164
  if (!(data4 === "Messages")) {
7035
- validate62.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues: schema85.properties.descriptor.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
7165
+ validate62.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues: schema86.properties.descriptor.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
7036
7166
  return false;
7037
7167
  }
7038
7168
  var valid6 = _errs16 === errors;
@@ -7049,7 +7179,7 @@ function validate62(data, { instancePath = "", parentData, parentDataProperty, r
7049
7179
  return false;
7050
7180
  }
7051
7181
  if (!(data5 === "Sync")) {
7052
- validate62.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues: schema85.properties.descriptor.properties.method.enum }, message: "must be equal to one of the allowed values" }];
7182
+ validate62.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues: schema86.properties.descriptor.properties.method.enum }, message: "must be equal to one of the allowed values" }];
7053
7183
  return false;
7054
7184
  }
7055
7185
  var valid6 = _errs18 === errors;
@@ -7088,7 +7218,7 @@ function validate62(data, { instancePath = "", parentData, parentDataProperty, r
7088
7218
  return false;
7089
7219
  }
7090
7220
  if (!(((data7 === "root") || (data7 === "subtree")) || (data7 === "leaves"))) {
7091
- validate62.errors = [{ instancePath: instancePath + "/descriptor/action", schemaPath: "#/properties/descriptor/properties/action/enum", keyword: "enum", params: { allowedValues: schema85.properties.descriptor.properties.action.enum }, message: "must be equal to one of the allowed values" }];
7221
+ validate62.errors = [{ instancePath: instancePath + "/descriptor/action", schemaPath: "#/properties/descriptor/properties/action/enum", keyword: "enum", params: { allowedValues: schema86.properties.descriptor.properties.action.enum }, message: "must be equal to one of the allowed values" }];
7092
7222
  return false;
7093
7223
  }
7094
7224
  var valid6 = _errs23 === errors;
@@ -7477,20 +7607,20 @@ function validate65(data, { instancePath = "", parentData, parentDataProperty, r
7477
7607
  } validate65.errors = vErrors; return errors === 0; }
7478
7608
  validate65.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
7479
7609
  export const PermissionGrantData = validate66;
7480
- const schema89 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/permission-grant-data.json", "type": "object", "additionalProperties": false, "required": ["dateExpires", "scope"], "properties": { "description": { "type": "string" }, "dateExpires": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "requestId": { "type": "string" }, "delegated": { "type": "boolean" }, "scope": { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/scope" }, "conditions": { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions" } } };
7481
- const schema105 = { "type": "object", "additionalProperties": false, "properties": { "publication": { "enum": ["Required", "Prohibited"], "type": "string" } } };
7482
- const schema92 = { "oneOf": [{ "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-subscribe-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-sync-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-configure-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-query-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-subscribe-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope" }] };
7483
- const schema94 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Messages" }, "method": { "const": "Read" }, "protocol": { "type": "string" } } };
7484
- const schema95 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Messages" }, "method": { "const": "Subscribe" }, "protocol": { "type": "string" } } };
7485
- const schema96 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Messages" }, "method": { "const": "Sync" }, "protocol": { "type": "string" } } };
7486
- const schema97 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Protocols" }, "method": { "const": "Configure" }, "protocol": { "type": "string" } } };
7487
- const schema98 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Protocols" }, "method": { "const": "Query" }, "protocol": { "type": "string" } } };
7488
- const schema99 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Read" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string" } } };
7489
- const schema100 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Delete" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string" } } };
7490
- const schema101 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Write" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string" } } };
7491
- const schema102 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Query" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string" } } };
7492
- const schema103 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Subscribe" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string" } } };
7493
- const schema104 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Count" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string" } } };
7610
+ const schema90 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/permission-grant-data.json", "type": "object", "additionalProperties": false, "required": ["dateExpires", "scope"], "properties": { "description": { "type": "string" }, "dateExpires": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "requestId": { "type": "string" }, "delegated": { "type": "boolean" }, "scope": { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/scope" }, "conditions": { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions" } } };
7611
+ const schema106 = { "type": "object", "additionalProperties": false, "properties": { "publication": { "enum": ["Required", "Prohibited"], "type": "string" } } };
7612
+ const schema93 = { "oneOf": [{ "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-subscribe-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-sync-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-configure-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-query-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-subscribe-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope" }] };
7613
+ const schema95 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Messages" }, "method": { "const": "Read" }, "protocol": { "type": "string" } } };
7614
+ const schema96 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Messages" }, "method": { "const": "Subscribe" }, "protocol": { "type": "string" } } };
7615
+ const schema97 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Messages" }, "method": { "const": "Sync" }, "protocol": { "type": "string" } } };
7616
+ const schema98 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Protocols" }, "method": { "const": "Configure" }, "protocol": { "type": "string" } } };
7617
+ const schema99 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Protocols" }, "method": { "const": "Query" }, "protocol": { "type": "string" } } };
7618
+ const schema100 = { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Read" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string" } } };
7619
+ const schema101 = { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Delete" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string" } } };
7620
+ const schema102 = { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Write" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string" } } };
7621
+ const schema103 = { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Query" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string" } } };
7622
+ const schema104 = { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Subscribe" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string" } } };
7623
+ const schema105 = { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Count" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string" } } };
7494
7624
  function validate68(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate68.evaluated; if (evaluated0.dynamicProps) {
7495
7625
  evaluated0.props = undefined;
7496
7626
  } if (evaluated0.dynamicItems) {
@@ -8049,7 +8179,7 @@ else {
8049
8179
  if (errors === _errs42) {
8050
8180
  if (data && typeof data == "object" && !Array.isArray(data)) {
8051
8181
  let missing5;
8052
- if (((data.interface === undefined) && (missing5 = "interface")) || ((data.method === undefined) && (missing5 = "method"))) {
8182
+ if ((((data.interface === undefined) && (missing5 = "interface")) || ((data.method === undefined) && (missing5 = "method"))) || ((data.protocol === undefined) && (missing5 = "protocol"))) {
8053
8183
  const err30 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope/required", keyword: "required", params: { missingProperty: missing5 }, message: "must have required property '" + missing5 + "'" };
8054
8184
  if (vErrors === null) {
8055
8185
  vErrors = [err30];
@@ -8215,7 +8345,7 @@ else {
8215
8345
  if (errors === _errs54) {
8216
8346
  if (data && typeof data == "object" && !Array.isArray(data)) {
8217
8347
  let missing6;
8218
- if (((data.interface === undefined) && (missing6 = "interface")) || ((data.method === undefined) && (missing6 = "method"))) {
8348
+ if ((((data.interface === undefined) && (missing6 = "interface")) || ((data.method === undefined) && (missing6 = "method"))) || ((data.protocol === undefined) && (missing6 = "protocol"))) {
8219
8349
  const err39 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope/required", keyword: "required", params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'" };
8220
8350
  if (vErrors === null) {
8221
8351
  vErrors = [err39];
@@ -8381,7 +8511,7 @@ else {
8381
8511
  if (errors === _errs66) {
8382
8512
  if (data && typeof data == "object" && !Array.isArray(data)) {
8383
8513
  let missing7;
8384
- if (((data.interface === undefined) && (missing7 = "interface")) || ((data.method === undefined) && (missing7 = "method"))) {
8514
+ if ((((data.interface === undefined) && (missing7 = "interface")) || ((data.method === undefined) && (missing7 = "method"))) || ((data.protocol === undefined) && (missing7 = "protocol"))) {
8385
8515
  const err48 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope/required", keyword: "required", params: { missingProperty: missing7 }, message: "must have required property '" + missing7 + "'" };
8386
8516
  if (vErrors === null) {
8387
8517
  vErrors = [err48];
@@ -8547,7 +8677,7 @@ else {
8547
8677
  if (errors === _errs78) {
8548
8678
  if (data && typeof data == "object" && !Array.isArray(data)) {
8549
8679
  let missing8;
8550
- if (((data.interface === undefined) && (missing8 = "interface")) || ((data.method === undefined) && (missing8 = "method"))) {
8680
+ if ((((data.interface === undefined) && (missing8 = "interface")) || ((data.method === undefined) && (missing8 = "method"))) || ((data.protocol === undefined) && (missing8 = "protocol"))) {
8551
8681
  const err57 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope/required", keyword: "required", params: { missingProperty: missing8 }, message: "must have required property '" + missing8 + "'" };
8552
8682
  if (vErrors === null) {
8553
8683
  vErrors = [err57];
@@ -8713,7 +8843,7 @@ else {
8713
8843
  if (errors === _errs90) {
8714
8844
  if (data && typeof data == "object" && !Array.isArray(data)) {
8715
8845
  let missing9;
8716
- if (((data.interface === undefined) && (missing9 = "interface")) || ((data.method === undefined) && (missing9 = "method"))) {
8846
+ if ((((data.interface === undefined) && (missing9 = "interface")) || ((data.method === undefined) && (missing9 = "method"))) || ((data.protocol === undefined) && (missing9 = "protocol"))) {
8717
8847
  const err66 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-subscribe-scope/required", keyword: "required", params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'" };
8718
8848
  if (vErrors === null) {
8719
8849
  vErrors = [err66];
@@ -8879,7 +9009,7 @@ else {
8879
9009
  if (errors === _errs102) {
8880
9010
  if (data && typeof data == "object" && !Array.isArray(data)) {
8881
9011
  let missing10;
8882
- if (((data.interface === undefined) && (missing10 = "interface")) || ((data.method === undefined) && (missing10 = "method"))) {
9012
+ if ((((data.interface === undefined) && (missing10 = "interface")) || ((data.method === undefined) && (missing10 = "method"))) || ((data.protocol === undefined) && (missing10 = "protocol"))) {
8883
9013
  const err75 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope/required", keyword: "required", params: { missingProperty: missing10 }, message: "must have required property '" + missing10 + "'" };
8884
9014
  if (vErrors === null) {
8885
9015
  vErrors = [err75];
@@ -9186,7 +9316,7 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
9186
9316
  return false;
9187
9317
  }
9188
9318
  if (!((data6 === "Required") || (data6 === "Prohibited"))) {
9189
- validate66.errors = [{ instancePath: instancePath + "/conditions/publication", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions/properties/publication/enum", keyword: "enum", params: { allowedValues: schema105.properties.publication.enum }, message: "must be equal to one of the allowed values" }];
9319
+ validate66.errors = [{ instancePath: instancePath + "/conditions/publication", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions/properties/publication/enum", keyword: "enum", params: { allowedValues: schema106.properties.publication.enum }, message: "must be equal to one of the allowed values" }];
9190
9320
  return false;
9191
9321
  }
9192
9322
  }
@@ -9217,7 +9347,7 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
9217
9347
  } validate66.errors = vErrors; return errors === 0; }
9218
9348
  validate66.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
9219
9349
  export const PermissionRequestData = validate71;
9220
- const schema106 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/permission-request-data.json", "type": "object", "additionalProperties": false, "required": ["delegated", "scope"], "properties": { "description": { "type": "string" }, "delegated": { "type": "boolean" }, "scope": { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/scope" }, "conditions": { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions" } } };
9350
+ const schema107 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/permission-request-data.json", "type": "object", "additionalProperties": false, "required": ["delegated", "scope"], "properties": { "description": { "type": "string" }, "delegated": { "type": "boolean" }, "scope": { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/scope" }, "conditions": { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions" } } };
9221
9351
  function validate72(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate72.evaluated; if (evaluated0.dynamicProps) {
9222
9352
  evaluated0.props = undefined;
9223
9353
  } if (evaluated0.dynamicItems) {
@@ -9776,7 +9906,7 @@ else {
9776
9906
  if (errors === _errs42) {
9777
9907
  if (data && typeof data == "object" && !Array.isArray(data)) {
9778
9908
  let missing5;
9779
- if (((data.interface === undefined) && (missing5 = "interface")) || ((data.method === undefined) && (missing5 = "method"))) {
9909
+ if ((((data.interface === undefined) && (missing5 = "interface")) || ((data.method === undefined) && (missing5 = "method"))) || ((data.protocol === undefined) && (missing5 = "protocol"))) {
9780
9910
  const err30 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope/required", keyword: "required", params: { missingProperty: missing5 }, message: "must have required property '" + missing5 + "'" };
9781
9911
  if (vErrors === null) {
9782
9912
  vErrors = [err30];
@@ -9942,7 +10072,7 @@ else {
9942
10072
  if (errors === _errs54) {
9943
10073
  if (data && typeof data == "object" && !Array.isArray(data)) {
9944
10074
  let missing6;
9945
- if (((data.interface === undefined) && (missing6 = "interface")) || ((data.method === undefined) && (missing6 = "method"))) {
10075
+ if ((((data.interface === undefined) && (missing6 = "interface")) || ((data.method === undefined) && (missing6 = "method"))) || ((data.protocol === undefined) && (missing6 = "protocol"))) {
9946
10076
  const err39 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope/required", keyword: "required", params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'" };
9947
10077
  if (vErrors === null) {
9948
10078
  vErrors = [err39];
@@ -10108,7 +10238,7 @@ else {
10108
10238
  if (errors === _errs66) {
10109
10239
  if (data && typeof data == "object" && !Array.isArray(data)) {
10110
10240
  let missing7;
10111
- if (((data.interface === undefined) && (missing7 = "interface")) || ((data.method === undefined) && (missing7 = "method"))) {
10241
+ if ((((data.interface === undefined) && (missing7 = "interface")) || ((data.method === undefined) && (missing7 = "method"))) || ((data.protocol === undefined) && (missing7 = "protocol"))) {
10112
10242
  const err48 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope/required", keyword: "required", params: { missingProperty: missing7 }, message: "must have required property '" + missing7 + "'" };
10113
10243
  if (vErrors === null) {
10114
10244
  vErrors = [err48];
@@ -10274,7 +10404,7 @@ else {
10274
10404
  if (errors === _errs78) {
10275
10405
  if (data && typeof data == "object" && !Array.isArray(data)) {
10276
10406
  let missing8;
10277
- if (((data.interface === undefined) && (missing8 = "interface")) || ((data.method === undefined) && (missing8 = "method"))) {
10407
+ if ((((data.interface === undefined) && (missing8 = "interface")) || ((data.method === undefined) && (missing8 = "method"))) || ((data.protocol === undefined) && (missing8 = "protocol"))) {
10278
10408
  const err57 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope/required", keyword: "required", params: { missingProperty: missing8 }, message: "must have required property '" + missing8 + "'" };
10279
10409
  if (vErrors === null) {
10280
10410
  vErrors = [err57];
@@ -10440,7 +10570,7 @@ else {
10440
10570
  if (errors === _errs90) {
10441
10571
  if (data && typeof data == "object" && !Array.isArray(data)) {
10442
10572
  let missing9;
10443
- if (((data.interface === undefined) && (missing9 = "interface")) || ((data.method === undefined) && (missing9 = "method"))) {
10573
+ if ((((data.interface === undefined) && (missing9 = "interface")) || ((data.method === undefined) && (missing9 = "method"))) || ((data.protocol === undefined) && (missing9 = "protocol"))) {
10444
10574
  const err66 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-subscribe-scope/required", keyword: "required", params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'" };
10445
10575
  if (vErrors === null) {
10446
10576
  vErrors = [err66];
@@ -10606,7 +10736,7 @@ else {
10606
10736
  if (errors === _errs102) {
10607
10737
  if (data && typeof data == "object" && !Array.isArray(data)) {
10608
10738
  let missing10;
10609
- if (((data.interface === undefined) && (missing10 = "interface")) || ((data.method === undefined) && (missing10 = "method"))) {
10739
+ if ((((data.interface === undefined) && (missing10 = "interface")) || ((data.method === undefined) && (missing10 = "method"))) || ((data.protocol === undefined) && (missing10 = "protocol"))) {
10610
10740
  const err75 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope/required", keyword: "required", params: { missingProperty: missing10 }, message: "must have required property '" + missing10 + "'" };
10611
10741
  if (vErrors === null) {
10612
10742
  vErrors = [err75];
@@ -10879,7 +11009,7 @@ function validate71(data, { instancePath = "", parentData, parentDataProperty, r
10879
11009
  return false;
10880
11010
  }
10881
11011
  if (!((data4 === "Required") || (data4 === "Prohibited"))) {
10882
- validate71.errors = [{ instancePath: instancePath + "/conditions/publication", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions/properties/publication/enum", keyword: "enum", params: { allowedValues: schema105.properties.publication.enum }, message: "must be equal to one of the allowed values" }];
11012
+ validate71.errors = [{ instancePath: instancePath + "/conditions/publication", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions/properties/publication/enum", keyword: "enum", params: { allowedValues: schema106.properties.publication.enum }, message: "must be equal to one of the allowed values" }];
10883
11013
  return false;
10884
11014
  }
10885
11015
  }
@@ -10908,7 +11038,7 @@ function validate71(data, { instancePath = "", parentData, parentDataProperty, r
10908
11038
  } validate71.errors = vErrors; return errors === 0; }
10909
11039
  validate71.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
10910
11040
  export const PermissionRevocationData = validate74;
10911
- const schema120 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/permission-revoke-data.json", "type": "object", "additionalProperties": false, "properties": { "description": { "type": "string" } } };
11041
+ const schema121 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/permission-revoke-data.json", "type": "object", "additionalProperties": false, "properties": { "description": { "type": "string" } } };
10912
11042
  function validate74(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/permission-revoke-data.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate74.evaluated; if (evaluated0.dynamicProps) {
10913
11043
  evaluated0.props = undefined;
10914
11044
  } if (evaluated0.dynamicItems) {
@@ -10939,7 +11069,7 @@ function validate74(data, { instancePath = "", parentData, parentDataProperty, r
10939
11069
  } validate74.errors = vErrors; return errors === 0; }
10940
11070
  validate74.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
10941
11071
  export const PermissionsDefinitions = validate67;
10942
- const schema91 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/permissions/defs.json", "type": "object", "$defs": { "scope": { "oneOf": [{ "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-subscribe-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-sync-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-configure-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-query-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-subscribe-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope" }] }, "conditions": { "type": "object", "additionalProperties": false, "properties": { "publication": { "enum": ["Required", "Prohibited"], "type": "string" } } } } };
11072
+ const schema92 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/permissions/defs.json", "type": "object", "$defs": { "scope": { "oneOf": [{ "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-subscribe-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-sync-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-configure-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-query-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-subscribe-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope" }] }, "conditions": { "type": "object", "additionalProperties": false, "properties": { "publication": { "enum": ["Required", "Prohibited"], "type": "string" } } } } };
10943
11073
  function validate67(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/permissions/defs.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate67.evaluated; if (evaluated0.dynamicProps) {
10944
11074
  evaluated0.props = undefined;
10945
11075
  } if (evaluated0.dynamicItems) {
@@ -10950,7 +11080,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
10950
11080
  } validate67.errors = vErrors; return errors === 0; }
10951
11081
  validate67.evaluated = { "dynamicProps": false, "dynamicItems": false };
10952
11082
  export const PermissionsScopes = validate69;
10953
- const schema93 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json", "type": "object", "$defs": { "messages-read-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Messages" }, "method": { "const": "Read" }, "protocol": { "type": "string" } } }, "messages-subscribe-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Messages" }, "method": { "const": "Subscribe" }, "protocol": { "type": "string" } } }, "messages-sync-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Messages" }, "method": { "const": "Sync" }, "protocol": { "type": "string" } } }, "protocols-configure-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Protocols" }, "method": { "const": "Configure" }, "protocol": { "type": "string" } } }, "protocols-query-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Protocols" }, "method": { "const": "Query" }, "protocol": { "type": "string" } } }, "records-delete-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Delete" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string" } } }, "records-read-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Read" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string" } } }, "records-write-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Write" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string" } } }, "records-query-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Query" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string" } } }, "records-subscribe-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Subscribe" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string" } } }, "records-count-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Count" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string" } } } } };
11083
+ const schema94 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json", "type": "object", "$defs": { "messages-read-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Messages" }, "method": { "const": "Read" }, "protocol": { "type": "string" } } }, "messages-subscribe-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Messages" }, "method": { "const": "Subscribe" }, "protocol": { "type": "string" } } }, "messages-sync-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Messages" }, "method": { "const": "Sync" }, "protocol": { "type": "string" } } }, "protocols-configure-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Protocols" }, "method": { "const": "Configure" }, "protocol": { "type": "string" } } }, "protocols-query-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Protocols" }, "method": { "const": "Query" }, "protocol": { "type": "string" } } }, "records-delete-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Delete" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string" } } }, "records-read-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Read" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string" } } }, "records-write-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Write" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string" } } }, "records-query-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Query" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string" } } }, "records-subscribe-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Subscribe" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string" } } }, "records-count-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Count" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string" } } } } };
10954
11084
  function validate69(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/permissions/scopes.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate69.evaluated; if (evaluated0.dynamicProps) {
10955
11085
  evaluated0.props = undefined;
10956
11086
  } if (evaluated0.dynamicItems) {
@@ -10961,10 +11091,10 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
10961
11091
  } validate69.errors = vErrors; return errors === 0; }
10962
11092
  validate69.evaluated = { "dynamicProps": false, "dynamicItems": false };
10963
11093
  export const ProtocolDefinition = validate75;
10964
- const schema121 = { "$id": "https://identity.foundation/dwn/json-schemas/protocol-definition.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "additionalProperties": false, "required": ["protocol", "published", "types", "structure"], "properties": { "protocol": { "type": "string" }, "published": { "type": "boolean" }, "uses": { "$comment": "Maps alias names to external protocol URIs for composition. Each alias can be used in $ref values and cross-protocol role/of references using 'alias:path' syntax.", "type": "object", "minProperties": 1, "patternProperties": { "^[a-zA-Z][a-zA-Z0-9_-]*$": { "type": "string" } }, "additionalProperties": false }, "types": { "type": "object", "patternProperties": { ".*": { "type": "object", "additionalProperties": false, "properties": { "schema": { "type": "string" }, "dataFormats": { "type": "array", "minItems": 1, "items": { "type": "string" } }, "encryptionRequired": { "type": "boolean" } } } } }, "structure": { "type": "object", "patternProperties": { ".*": { "$ref": "https://identity.foundation/dwn/json-schemas/protocol-rule-set.json" } } } } };
11094
+ const schema122 = { "$id": "https://identity.foundation/dwn/json-schemas/protocol-definition.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "additionalProperties": false, "required": ["protocol", "published", "types", "structure"], "properties": { "protocol": { "type": "string" }, "published": { "type": "boolean" }, "uses": { "$comment": "Maps alias names to external protocol URIs for composition. Each alias can be used in $ref values and cross-protocol role/of references using 'alias:path' syntax.", "type": "object", "minProperties": 1, "patternProperties": { "^[a-zA-Z][a-zA-Z0-9_-]*$": { "type": "string" } }, "additionalProperties": false }, "types": { "type": "object", "patternProperties": { ".*": { "type": "object", "additionalProperties": false, "properties": { "schema": { "type": "string" }, "dataFormats": { "type": "array", "minItems": 1, "items": { "type": "string" } }, "encryptionRequired": { "type": "boolean" } } } } }, "structure": { "type": "object", "patternProperties": { ".*": { "$ref": "https://identity.foundation/dwn/json-schemas/protocol-rule-set.json" } } } } };
10965
11095
  const pattern39 = new RegExp("^[a-zA-Z][a-zA-Z0-9_-]*$", "u");
10966
11096
  const pattern41 = new RegExp(".*", "u");
10967
- const schema122 = { "$id": "https://identity.foundation/dwn/json-schemas/protocol-rule-set.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "additionalProperties": false, "properties": { "$encryption": { "type": "object", "additionalProperties": false, "properties": { "rootKeyId": { "type": "string" }, "publicKeyJwk": { "$ref": "https://identity.foundation/dwn/json-schemas/public-jwk.json" } }, "required": ["rootKeyId", "publicKeyJwk"] }, "$actions": { "type": "array", "minItems": 1, "items": { "type": "object", "oneOf": [{ "required": ["who", "can"], "additionalProperties": false, "properties": { "who": { "type": "string", "enum": ["anyone", "author", "recipient"] }, "of": { "type": "string" }, "can": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": ["co-delete", "co-prune", "co-update", "create", "delete", "prune", "read", "update"] } } } }, { "required": ["role", "can"], "additionalProperties": false, "properties": { "role": { "$comment": "Must be the protocol path of a role record type", "type": "string" }, "can": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": ["co-delete", "co-prune", "co-update", "create", "delete", "prune", "read", "update"] } } } }] } }, "$role": { "$comment": "When `true`, this turns a record into `role` that may be used within a context/sub-context", "type": "boolean" }, "$ref": { "$comment": "References a type from an external protocol declared in `uses`. Format: 'alias:typePath'. A $ref node is a pure attachment point and must not have $actions, $role, $size, $tags, or $encryption.", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*:.+$" }, "$size": { "type": "object", "additionalProperties": false, "properties": { "min": { "type": "number", "minimum": 0 }, "max": { "type": "number", "minimum": 0 } } }, "$tags": { "type": "object", "minProperties": 1, "properties": { "$requiredTags": { "type": "array", "items": { "type": "string" } }, "$allowUndefinedTags": { "type": "boolean" } }, "patternProperties": { "^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$": { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": ["string", "number", "integer", "boolean", "array"] }, "items": { "type": "object", "properties": { "type": { "enum": ["string", "number", "integer"] } }, "patternProperties": { "^(enum|minimum|maximum|exclusiveMinimum|exclusiveMaximum|minLength|maxLength)$": {} } }, "contains": { "type": "object", "properties": { "type": { "enum": ["string", "number", "integer"] } }, "patternProperties": { "^(enum|minimum|maximum|exclusiveMinimum|exclusiveMaximum|minLength|maxLength)$": {} } } }, "patternProperties": { "^(enum|minimum|maximum|exclusiveMinimum|exclusiveMaximum|minLength|maxLength|minItems|maxItems|uniqueItems|minContains|maxContains)$": {} } } } } }, "patternProperties": { "^[^$].*$": { "$ref": "https://identity.foundation/dwn/json-schemas/protocol-rule-set.json" } } };
11097
+ const schema123 = { "$id": "https://identity.foundation/dwn/json-schemas/protocol-rule-set.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "additionalProperties": false, "properties": { "$encryption": { "type": "object", "additionalProperties": false, "properties": { "rootKeyId": { "type": "string" }, "publicKeyJwk": { "$ref": "https://identity.foundation/dwn/json-schemas/public-jwk.json" } }, "required": ["rootKeyId", "publicKeyJwk"] }, "$actions": { "type": "array", "minItems": 1, "items": { "type": "object", "oneOf": [{ "required": ["who", "can"], "additionalProperties": false, "properties": { "who": { "type": "string", "enum": ["anyone", "author", "recipient"] }, "of": { "type": "string" }, "can": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": ["co-delete", "co-prune", "co-update", "create", "delete", "prune", "read", "update"] } } } }, { "required": ["role", "can"], "additionalProperties": false, "properties": { "role": { "$comment": "Must be the protocol path of a role record type", "type": "string" }, "can": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": ["co-delete", "co-prune", "co-update", "create", "delete", "prune", "read", "update"] } } } }] } }, "$role": { "$comment": "When `true`, this turns a record into `role` that may be used within a context/sub-context", "type": "boolean" }, "$ref": { "$comment": "References a type from an external protocol declared in `uses`. Format: 'alias:typePath'. A $ref node is a pure attachment point and must not have $actions, $role, $size, $tags, or $encryption.", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*:.+$" }, "$size": { "type": "object", "additionalProperties": false, "properties": { "min": { "type": "number", "minimum": 0 }, "max": { "type": "number", "minimum": 0 } } }, "$tags": { "type": "object", "minProperties": 1, "properties": { "$requiredTags": { "type": "array", "items": { "type": "string" } }, "$allowUndefinedTags": { "type": "boolean" } }, "patternProperties": { "^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$": { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": ["string", "number", "integer", "boolean", "array"] }, "items": { "type": "object", "properties": { "type": { "enum": ["string", "number", "integer"] } }, "patternProperties": { "^(enum|minimum|maximum|exclusiveMinimum|exclusiveMaximum|minLength|maxLength)$": {} } }, "contains": { "type": "object", "properties": { "type": { "enum": ["string", "number", "integer"] } }, "patternProperties": { "^(enum|minimum|maximum|exclusiveMinimum|exclusiveMaximum|minLength|maxLength)$": {} } } }, "patternProperties": { "^(enum|minimum|maximum|exclusiveMinimum|exclusiveMaximum|minLength|maxLength|minItems|maxItems|uniqueItems|minContains|maxContains)$": {} } } } } }, "patternProperties": { "^[^$].*$": { "$ref": "https://identity.foundation/dwn/json-schemas/protocol-rule-set.json" } } };
10968
11098
  const pattern43 = new RegExp("^[^$].*$", "u");
10969
11099
  const pattern44 = new RegExp("^[a-zA-Z][a-zA-Z0-9_-]*:.+$", "u");
10970
11100
  const pattern45 = new RegExp("^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$", "u");
@@ -11109,7 +11239,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
11109
11239
  errors++;
11110
11240
  }
11111
11241
  if (!(((data5 === "anyone") || (data5 === "author")) || (data5 === "recipient"))) {
11112
- const err3 = { instancePath: instancePath + "/$actions/" + i0 + "/who", schemaPath: "#/properties/%24actions/items/oneOf/0/properties/who/enum", keyword: "enum", params: { allowedValues: schema122.properties.$actions.items.oneOf[0].properties.who.enum }, message: "must be equal to one of the allowed values" };
11242
+ const err3 = { instancePath: instancePath + "/$actions/" + i0 + "/who", schemaPath: "#/properties/%24actions/items/oneOf/0/properties/who/enum", keyword: "enum", params: { allowedValues: schema123.properties.$actions.items.oneOf[0].properties.who.enum }, message: "must be equal to one of the allowed values" };
11113
11243
  if (vErrors === null) {
11114
11244
  vErrors = [err3];
11115
11245
  }
@@ -11174,7 +11304,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
11174
11304
  errors++;
11175
11305
  }
11176
11306
  if (!((((((((data8 === "co-delete") || (data8 === "co-prune")) || (data8 === "co-update")) || (data8 === "create")) || (data8 === "delete")) || (data8 === "prune")) || (data8 === "read")) || (data8 === "update"))) {
11177
- const err7 = { instancePath: instancePath + "/$actions/" + i0 + "/can/" + i1, schemaPath: "#/properties/%24actions/items/oneOf/0/properties/can/items/enum", keyword: "enum", params: { allowedValues: schema122.properties.$actions.items.oneOf[0].properties.can.items.enum }, message: "must be equal to one of the allowed values" };
11307
+ const err7 = { instancePath: instancePath + "/$actions/" + i0 + "/can/" + i1, schemaPath: "#/properties/%24actions/items/oneOf/0/properties/can/items/enum", keyword: "enum", params: { allowedValues: schema123.properties.$actions.items.oneOf[0].properties.can.items.enum }, message: "must be equal to one of the allowed values" };
11178
11308
  if (vErrors === null) {
11179
11309
  vErrors = [err7];
11180
11310
  }
@@ -11296,7 +11426,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
11296
11426
  errors++;
11297
11427
  }
11298
11428
  if (!((((((((data11 === "co-delete") || (data11 === "co-prune")) || (data11 === "co-update")) || (data11 === "create")) || (data11 === "delete")) || (data11 === "prune")) || (data11 === "read")) || (data11 === "update"))) {
11299
- const err14 = { instancePath: instancePath + "/$actions/" + i0 + "/can/" + i2, schemaPath: "#/properties/%24actions/items/oneOf/1/properties/can/items/enum", keyword: "enum", params: { allowedValues: schema122.properties.$actions.items.oneOf[1].properties.can.items.enum }, message: "must be equal to one of the allowed values" };
11429
+ const err14 = { instancePath: instancePath + "/$actions/" + i0 + "/can/" + i2, schemaPath: "#/properties/%24actions/items/oneOf/1/properties/can/items/enum", keyword: "enum", params: { allowedValues: schema123.properties.$actions.items.oneOf[1].properties.can.items.enum }, message: "must be equal to one of the allowed values" };
11300
11430
  if (vErrors === null) {
11301
11431
  vErrors = [err14];
11302
11432
  }
@@ -11563,7 +11693,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
11563
11693
  let data22 = data21.type;
11564
11694
  const _errs56 = errors;
11565
11695
  if (!(((((data22 === "string") || (data22 === "number")) || (data22 === "integer")) || (data22 === "boolean")) || (data22 === "array"))) {
11566
- validate76.errors = [{ instancePath: instancePath + "/$tags/" + key5.replace(/~/g, "~0").replace(/\//g, "~1") + "/type", schemaPath: "#/properties/%24tags/patternProperties/%5E(%3F!%5C%24requiredTags%24%7C%5C%24allowUndefinedTags%24).*%24/properties/type/enum", keyword: "enum", params: { allowedValues: schema122.properties.$tags.patternProperties["^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$"].properties.type.enum }, message: "must be equal to one of the allowed values" }];
11696
+ validate76.errors = [{ instancePath: instancePath + "/$tags/" + key5.replace(/~/g, "~0").replace(/\//g, "~1") + "/type", schemaPath: "#/properties/%24tags/patternProperties/%5E(%3F!%5C%24requiredTags%24%7C%5C%24allowUndefinedTags%24).*%24/properties/type/enum", keyword: "enum", params: { allowedValues: schema123.properties.$tags.patternProperties["^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$"].properties.type.enum }, message: "must be equal to one of the allowed values" }];
11567
11697
  return false;
11568
11698
  }
11569
11699
  var valid12 = _errs56 === errors;
@@ -11581,7 +11711,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
11581
11711
  let data24 = data23.type;
11582
11712
  const _errs59 = errors;
11583
11713
  if (!(((data24 === "string") || (data24 === "number")) || (data24 === "integer"))) {
11584
- validate76.errors = [{ instancePath: instancePath + "/$tags/" + key5.replace(/~/g, "~0").replace(/\//g, "~1") + "/items/type", schemaPath: "#/properties/%24tags/patternProperties/%5E(%3F!%5C%24requiredTags%24%7C%5C%24allowUndefinedTags%24).*%24/properties/items/properties/type/enum", keyword: "enum", params: { allowedValues: schema122.properties.$tags.patternProperties["^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$"].properties.items.properties.type.enum }, message: "must be equal to one of the allowed values" }];
11714
+ validate76.errors = [{ instancePath: instancePath + "/$tags/" + key5.replace(/~/g, "~0").replace(/\//g, "~1") + "/items/type", schemaPath: "#/properties/%24tags/patternProperties/%5E(%3F!%5C%24requiredTags%24%7C%5C%24allowUndefinedTags%24).*%24/properties/items/properties/type/enum", keyword: "enum", params: { allowedValues: schema123.properties.$tags.patternProperties["^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$"].properties.items.properties.type.enum }, message: "must be equal to one of the allowed values" }];
11585
11715
  return false;
11586
11716
  }
11587
11717
  var valid13 = _errs59 === errors;
@@ -11619,7 +11749,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
11619
11749
  let data26 = data25.type;
11620
11750
  const _errs62 = errors;
11621
11751
  if (!(((data26 === "string") || (data26 === "number")) || (data26 === "integer"))) {
11622
- validate76.errors = [{ instancePath: instancePath + "/$tags/" + key5.replace(/~/g, "~0").replace(/\//g, "~1") + "/contains/type", schemaPath: "#/properties/%24tags/patternProperties/%5E(%3F!%5C%24requiredTags%24%7C%5C%24allowUndefinedTags%24).*%24/properties/contains/properties/type/enum", keyword: "enum", params: { allowedValues: schema122.properties.$tags.patternProperties["^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$"].properties.contains.properties.type.enum }, message: "must be equal to one of the allowed values" }];
11752
+ validate76.errors = [{ instancePath: instancePath + "/$tags/" + key5.replace(/~/g, "~0").replace(/\//g, "~1") + "/contains/type", schemaPath: "#/properties/%24tags/patternProperties/%5E(%3F!%5C%24requiredTags%24%7C%5C%24allowUndefinedTags%24).*%24/properties/contains/properties/type/enum", keyword: "enum", params: { allowedValues: schema123.properties.$tags.patternProperties["^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$"].properties.contains.properties.type.enum }, message: "must be equal to one of the allowed values" }];
11623
11753
  return false;
11624
11754
  }
11625
11755
  var valid15 = _errs62 === errors;
@@ -11939,7 +12069,7 @@ function validate75(data, { instancePath = "", parentData, parentDataProperty, r
11939
12069
  validate75.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
11940
12070
  export const ProtocolRuleSet = validate76;
11941
12071
  export const ProtocolsConfigure = validate79;
11942
- const schema123 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/protocols-configure.json", "type": "object", "additionalProperties": false, "required": ["authorization", "descriptor"], "properties": { "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization-delegated-grant.json" }, "descriptor": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "messageTimestamp", "definition"], "properties": { "interface": { "enum": ["Protocols"], "type": "string" }, "method": { "enum": ["Configure"], "type": "string" }, "messageTimestamp": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "definition": { "$ref": "https://identity.foundation/dwn/json-schemas/protocol-definition.json" }, "permissionGrantId": { "type": "string" } } } } };
12072
+ const schema124 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/protocols-configure.json", "type": "object", "additionalProperties": false, "required": ["authorization", "descriptor"], "properties": { "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization-delegated-grant.json" }, "descriptor": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "messageTimestamp", "definition"], "properties": { "interface": { "enum": ["Protocols"], "type": "string" }, "method": { "enum": ["Configure"], "type": "string" }, "messageTimestamp": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "definition": { "$ref": "https://identity.foundation/dwn/json-schemas/protocol-definition.json" }, "permissionGrantId": { "type": "string" } } } } };
11943
12073
  function validate79(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/protocols-configure.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate79.evaluated; if (evaluated0.dynamicProps) {
11944
12074
  evaluated0.props = undefined;
11945
12075
  } if (evaluated0.dynamicItems) {
@@ -12001,7 +12131,7 @@ function validate79(data, { instancePath = "", parentData, parentDataProperty, r
12001
12131
  return false;
12002
12132
  }
12003
12133
  if (!(data2 === "Protocols")) {
12004
- validate79.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues: schema123.properties.descriptor.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
12134
+ validate79.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues: schema124.properties.descriptor.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
12005
12135
  return false;
12006
12136
  }
12007
12137
  var valid1 = _errs6 === errors;
@@ -12018,7 +12148,7 @@ function validate79(data, { instancePath = "", parentData, parentDataProperty, r
12018
12148
  return false;
12019
12149
  }
12020
12150
  if (!(data3 === "Configure")) {
12021
- validate79.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues: schema123.properties.descriptor.properties.method.enum }, message: "must be equal to one of the allowed values" }];
12151
+ validate79.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues: schema124.properties.descriptor.properties.method.enum }, message: "must be equal to one of the allowed values" }];
12022
12152
  return false;
12023
12153
  }
12024
12154
  var valid1 = _errs8 === errors;
@@ -12100,7 +12230,7 @@ function validate79(data, { instancePath = "", parentData, parentDataProperty, r
12100
12230
  } validate79.errors = vErrors; return errors === 0; }
12101
12231
  validate79.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
12102
12232
  export const ProtocolsQuery = validate82;
12103
- const schema125 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/protocols-query.json", "type": "object", "additionalProperties": false, "required": ["descriptor"], "properties": { "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization.json" }, "descriptor": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "messageTimestamp"], "properties": { "interface": { "enum": ["Protocols"], "type": "string" }, "method": { "enum": ["Query"], "type": "string" }, "messageTimestamp": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "filter": { "type": "object", "minProperties": 1, "additionalProperties": false, "properties": { "protocol": { "type": "string" }, "recipient": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/did" } } }, "permissionGrantId": { "type": "string" } } } } };
12233
+ const schema126 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/protocols-query.json", "type": "object", "additionalProperties": false, "required": ["descriptor"], "properties": { "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization.json" }, "descriptor": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "messageTimestamp"], "properties": { "interface": { "enum": ["Protocols"], "type": "string" }, "method": { "enum": ["Query"], "type": "string" }, "messageTimestamp": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "filter": { "type": "object", "minProperties": 1, "additionalProperties": false, "properties": { "protocol": { "type": "string" }, "recipient": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/did" } } }, "permissionGrantId": { "type": "string" } } } } };
12104
12234
  function validate82(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/protocols-query.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate82.evaluated; if (evaluated0.dynamicProps) {
12105
12235
  evaluated0.props = undefined;
12106
12236
  } if (evaluated0.dynamicItems) {
@@ -12162,7 +12292,7 @@ function validate82(data, { instancePath = "", parentData, parentDataProperty, r
12162
12292
  return false;
12163
12293
  }
12164
12294
  if (!(data2 === "Protocols")) {
12165
- validate82.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues: schema125.properties.descriptor.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
12295
+ validate82.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues: schema126.properties.descriptor.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
12166
12296
  return false;
12167
12297
  }
12168
12298
  var valid1 = _errs6 === errors;
@@ -12179,7 +12309,7 @@ function validate82(data, { instancePath = "", parentData, parentDataProperty, r
12179
12309
  return false;
12180
12310
  }
12181
12311
  if (!(data3 === "Query")) {
12182
- validate82.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues: schema125.properties.descriptor.properties.method.enum }, message: "must be equal to one of the allowed values" }];
12312
+ validate82.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues: schema126.properties.descriptor.properties.method.enum }, message: "must be equal to one of the allowed values" }];
12183
12313
  return false;
12184
12314
  }
12185
12315
  var valid1 = _errs8 === errors;
@@ -12316,7 +12446,7 @@ function validate82(data, { instancePath = "", parentData, parentDataProperty, r
12316
12446
  } validate82.errors = vErrors; return errors === 0; }
12317
12447
  validate82.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
12318
12448
  export const RecordsRead = validate84;
12319
- const schema128 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/records-read.json", "type": "object", "additionalProperties": false, "required": ["descriptor"], "properties": { "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization-delegated-grant.json" }, "descriptor": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "messageTimestamp", "filter"], "properties": { "interface": { "enum": ["Records"], "type": "string" }, "method": { "enum": ["Read"], "type": "string" }, "messageTimestamp": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "filter": { "$ref": "https://identity.foundation/dwn/json-schemas/records-filter.json" }, "permissionGrantId": { "type": "string" }, "dateSort": { "enum": ["createdAscending", "createdDescending", "publishedAscending", "publishedDescending", "updatedAscending", "updatedDescending"], "type": "string" } } } } };
12449
+ const schema129 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/records-read.json", "type": "object", "additionalProperties": false, "required": ["descriptor"], "properties": { "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization-delegated-grant.json" }, "descriptor": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "messageTimestamp", "filter"], "properties": { "interface": { "enum": ["Records"], "type": "string" }, "method": { "enum": ["Read"], "type": "string" }, "messageTimestamp": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "filter": { "$ref": "https://identity.foundation/dwn/json-schemas/records-filter.json" }, "permissionGrantId": { "type": "string" }, "dateSort": { "enum": ["createdAscending", "createdDescending", "publishedAscending", "publishedDescending", "updatedAscending", "updatedDescending"], "type": "string" } } } } };
12320
12450
  function validate84(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/records-read.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate84.evaluated; if (evaluated0.dynamicProps) {
12321
12451
  evaluated0.props = undefined;
12322
12452
  } if (evaluated0.dynamicItems) {
@@ -12378,7 +12508,7 @@ function validate84(data, { instancePath = "", parentData, parentDataProperty, r
12378
12508
  return false;
12379
12509
  }
12380
12510
  if (!(data2 === "Records")) {
12381
- validate84.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues: schema128.properties.descriptor.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
12511
+ validate84.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues: schema129.properties.descriptor.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
12382
12512
  return false;
12383
12513
  }
12384
12514
  var valid1 = _errs6 === errors;
@@ -12395,7 +12525,7 @@ function validate84(data, { instancePath = "", parentData, parentDataProperty, r
12395
12525
  return false;
12396
12526
  }
12397
12527
  if (!(data3 === "Read")) {
12398
- validate84.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues: schema128.properties.descriptor.properties.method.enum }, message: "must be equal to one of the allowed values" }];
12528
+ validate84.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues: schema129.properties.descriptor.properties.method.enum }, message: "must be equal to one of the allowed values" }];
12399
12529
  return false;
12400
12530
  }
12401
12531
  var valid1 = _errs8 === errors;
@@ -12458,7 +12588,7 @@ function validate84(data, { instancePath = "", parentData, parentDataProperty, r
12458
12588
  return false;
12459
12589
  }
12460
12590
  if (!((((((data7 === "createdAscending") || (data7 === "createdDescending")) || (data7 === "publishedAscending")) || (data7 === "publishedDescending")) || (data7 === "updatedAscending")) || (data7 === "updatedDescending"))) {
12461
- validate84.errors = [{ instancePath: instancePath + "/descriptor/dateSort", schemaPath: "#/properties/descriptor/properties/dateSort/enum", keyword: "enum", params: { allowedValues: schema128.properties.descriptor.properties.dateSort.enum }, message: "must be equal to one of the allowed values" }];
12591
+ validate84.errors = [{ instancePath: instancePath + "/descriptor/dateSort", schemaPath: "#/properties/descriptor/properties/dateSort/enum", keyword: "enum", params: { allowedValues: schema129.properties.descriptor.properties.dateSort.enum }, message: "must be equal to one of the allowed values" }];
12462
12592
  return false;
12463
12593
  }
12464
12594
  var valid1 = _errs16 === errors;
@@ -12497,7 +12627,7 @@ validate84.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": f
12497
12627
  export const RecordsFilter = validate41;
12498
12628
  export const PublicJwk = validate32;
12499
12629
  export const GenericSignaturePayload = validate87;
12500
- const schema130 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/signature-payloads/generic-signature-payload.json", "type": "object", "additionalProperties": false, "required": ["descriptorCid"], "properties": { "descriptorCid": { "type": "string" }, "delegatedGrantId": { "type": "string" }, "permissionGrantId": { "type": "string" }, "protocolRole": { "$comment": "Used in the Records interface to authorize role-authorized actions for protocol records", "type": "string" } } };
12630
+ const schema131 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/signature-payloads/generic-signature-payload.json", "type": "object", "additionalProperties": false, "required": ["descriptorCid"], "properties": { "descriptorCid": { "type": "string" }, "delegatedGrantId": { "type": "string" }, "permissionGrantId": { "type": "string" }, "protocolRole": { "$comment": "Used in the Records interface to authorize role-authorized actions for protocol records", "type": "string" } } };
12501
12631
  function validate87(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/signature-payloads/generic-signature-payload.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate87.evaluated; if (evaluated0.dynamicProps) {
12502
12632
  evaluated0.props = undefined;
12503
12633
  } if (evaluated0.dynamicItems) {
@@ -12579,7 +12709,7 @@ function validate87(data, { instancePath = "", parentData, parentDataProperty, r
12579
12709
  } validate87.errors = vErrors; return errors === 0; }
12580
12710
  validate87.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
12581
12711
  export const RecordsWriteSignaturePayload = validate88;
12582
- const schema131 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/signature-payloads/records-write-signature-payload.json", "type": "object", "additionalProperties": false, "required": ["descriptorCid", "recordId"], "properties": { "descriptorCid": { "type": "string" }, "recordId": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "attestationCid": { "type": "string" }, "encryptionCid": { "type": "string" }, "delegatedGrantId": { "type": "string" }, "permissionGrantId": { "type": "string" }, "protocolRole": { "type": "string" } } };
12712
+ const schema132 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/signature-payloads/records-write-signature-payload.json", "type": "object", "additionalProperties": false, "required": ["descriptorCid", "recordId"], "properties": { "descriptorCid": { "type": "string" }, "recordId": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "attestationCid": { "type": "string" }, "encryptionCid": { "type": "string" }, "delegatedGrantId": { "type": "string" }, "permissionGrantId": { "type": "string" }, "protocolRole": { "type": "string" } } };
12583
12713
  function validate88(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/signature-payloads/records-write-signature-payload.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate88.evaluated; if (evaluated0.dynamicProps) {
12584
12714
  evaluated0.props = undefined;
12585
12715
  } if (evaluated0.dynamicItems) {