@xyo-network/core 2.20.41 → 2.20.42

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 (417) hide show
  1. package/dist/cjs/BoundWitness/Builder/Builder.d.ts +22 -22
  2. package/dist/cjs/BoundWitness/Builder/Builder.js +67 -67
  3. package/dist/cjs/BoundWitness/Builder/index.d.ts +1 -1
  4. package/dist/cjs/BoundWitness/Builder/index.js +4 -4
  5. package/dist/cjs/BoundWitness/Validator/BodyValidator.d.ts +18 -18
  6. package/dist/cjs/BoundWitness/Validator/BodyValidator.js +90 -90
  7. package/dist/cjs/BoundWitness/Validator/MetaValidator.d.ts +14 -14
  8. package/dist/cjs/BoundWitness/Validator/MetaValidator.js +69 -69
  9. package/dist/cjs/BoundWitness/Validator/Validator.d.ts +12 -12
  10. package/dist/cjs/BoundWitness/Validator/Validator.js +45 -45
  11. package/dist/cjs/BoundWitness/Validator/index.d.ts +3 -3
  12. package/dist/cjs/BoundWitness/Validator/index.js +6 -6
  13. package/dist/cjs/BoundWitness/Validator/ip-regex.d.ts +9 -9
  14. package/dist/cjs/BoundWitness/Validator/ip-regex.js +19 -19
  15. package/dist/cjs/BoundWitness/Validator/is-ip.d.ts +4 -4
  16. package/dist/cjs/BoundWitness/Validator/is-ip.js +20 -20
  17. package/dist/cjs/BoundWitness/Wrapper/Wrapper.d.ts +13 -13
  18. package/dist/cjs/BoundWitness/Wrapper/Wrapper.js +29 -29
  19. package/dist/cjs/BoundWitness/Wrapper/index.d.ts +1 -1
  20. package/dist/cjs/BoundWitness/Wrapper/index.js +4 -4
  21. package/dist/cjs/BoundWitness/index.d.ts +4 -4
  22. package/dist/cjs/BoundWitness/index.js +7 -7
  23. package/dist/cjs/BoundWitness/models/Body/XyoBoundWitnessBody.d.ts +11 -11
  24. package/dist/cjs/BoundWitness/models/Body/XyoBoundWitnessBody.js +2 -2
  25. package/dist/cjs/BoundWitness/models/Body/XyoBoundWitnessBodySchema.d.ts +37 -37
  26. package/dist/cjs/BoundWitness/models/Body/XyoBoundWitnessBodySchema.js +19 -19
  27. package/dist/cjs/BoundWitness/models/Body/index.d.ts +2 -2
  28. package/dist/cjs/BoundWitness/models/Body/index.js +5 -5
  29. package/dist/cjs/BoundWitness/models/Meta/XyoBoundWitnessMeta.d.ts +13 -13
  30. package/dist/cjs/BoundWitness/models/Meta/XyoBoundWitnessMeta.js +2 -2
  31. package/dist/cjs/BoundWitness/models/Meta/XyoBoundWitnessMetaSchema.d.ts +85 -85
  32. package/dist/cjs/BoundWitness/models/Meta/XyoBoundWitnessMetaSchema.js +27 -27
  33. package/dist/cjs/BoundWitness/models/Meta/index.d.ts +2 -2
  34. package/dist/cjs/BoundWitness/models/Meta/index.js +5 -5
  35. package/dist/cjs/BoundWitness/models/WithXyoBoundWitnessMeta.d.ts +4 -4
  36. package/dist/cjs/BoundWitness/models/WithXyoBoundWitnessMeta.js +2 -2
  37. package/dist/cjs/BoundWitness/models/XyoBoundWitness.d.ts +5 -5
  38. package/dist/cjs/BoundWitness/models/XyoBoundWitness.js +2 -2
  39. package/dist/cjs/BoundWitness/models/XyoBoundWitnessSchema.d.ts +75 -75
  40. package/dist/cjs/BoundWitness/models/XyoBoundWitnessSchema.js +16 -16
  41. package/dist/cjs/BoundWitness/models/index.d.ts +5 -5
  42. package/dist/cjs/BoundWitness/models/index.js +8 -8
  43. package/dist/cjs/Hasher/XyoAbstractHasher.d.ts +11 -11
  44. package/dist/cjs/Hasher/XyoAbstractHasher.js +33 -33
  45. package/dist/cjs/Hasher/XyoHasher.d.ts +6 -6
  46. package/dist/cjs/Hasher/XyoHasher.js +14 -14
  47. package/dist/cjs/Hasher/index.d.ts +5 -5
  48. package/dist/cjs/Hasher/index.js +8 -8
  49. package/dist/cjs/Hasher/removeEmptyFields.d.ts +1 -1
  50. package/dist/cjs/Hasher/removeEmptyFields.js +19 -19
  51. package/dist/cjs/Hasher/removeFields.d.ts +6 -6
  52. package/dist/cjs/Hasher/removeFields.js +28 -28
  53. package/dist/cjs/Hasher/sortFields.d.ts +1 -1
  54. package/dist/cjs/Hasher/sortFields.js +26 -26
  55. package/dist/cjs/Huri/Huri.d.ts +26 -26
  56. package/dist/cjs/Huri/Huri.js +100 -100
  57. package/dist/cjs/Huri/index.d.ts +1 -1
  58. package/dist/cjs/Huri/index.js +4 -4
  59. package/dist/cjs/Payload/Builder/Builder.d.ts +14 -14
  60. package/dist/cjs/Payload/Builder/Builder.js +30 -30
  61. package/dist/cjs/Payload/Builder/index.d.ts +1 -1
  62. package/dist/cjs/Payload/Builder/index.js +4 -4
  63. package/dist/cjs/Payload/Validator/BodyValidator.d.ts +11 -11
  64. package/dist/cjs/Payload/Validator/BodyValidator.js +30 -30
  65. package/dist/cjs/Payload/Validator/MetaValidator.d.ts +9 -9
  66. package/dist/cjs/Payload/Validator/MetaValidator.js +36 -36
  67. package/dist/cjs/Payload/Validator/Validator.d.ts +11 -11
  68. package/dist/cjs/Payload/Validator/Validator.js +18 -18
  69. package/dist/cjs/Payload/Validator/index.d.ts +3 -3
  70. package/dist/cjs/Payload/Validator/index.js +6 -6
  71. package/dist/cjs/Payload/Wrapper/Validator.d.ts +9 -9
  72. package/dist/cjs/Payload/Wrapper/Validator.js +18 -18
  73. package/dist/cjs/Payload/Wrapper/Wrapper.d.ts +9 -9
  74. package/dist/cjs/Payload/Wrapper/Wrapper.js +20 -20
  75. package/dist/cjs/Payload/Wrapper/index.d.ts +2 -2
  76. package/dist/cjs/Payload/Wrapper/index.js +5 -5
  77. package/dist/cjs/Payload/index.d.ts +4 -4
  78. package/dist/cjs/Payload/index.js +7 -7
  79. package/dist/cjs/Payload/models/Body.d.ts +6 -6
  80. package/dist/cjs/Payload/models/Body.js +2 -2
  81. package/dist/cjs/Payload/models/Meta.d.ts +10 -10
  82. package/dist/cjs/Payload/models/Meta.js +2 -2
  83. package/dist/cjs/Payload/models/WithXyoPayloadMeta.d.ts +4 -4
  84. package/dist/cjs/Payload/models/WithXyoPayloadMeta.js +2 -2
  85. package/dist/cjs/Payload/models/XyoPayload.d.ts +4 -4
  86. package/dist/cjs/Payload/models/XyoPayload.js +2 -2
  87. package/dist/cjs/Payload/models/index.d.ts +4 -4
  88. package/dist/cjs/Payload/models/index.js +7 -7
  89. package/dist/cjs/Query/QueryPayload.d.ts +11 -11
  90. package/dist/cjs/Query/QueryPayload.js +2 -2
  91. package/dist/cjs/Query/index.d.ts +1 -1
  92. package/dist/cjs/Query/index.js +4 -4
  93. package/dist/cjs/Schema/Payload.d.ts +10 -10
  94. package/dist/cjs/Schema/Payload.js +2 -2
  95. package/dist/cjs/Schema/index.d.ts +1 -1
  96. package/dist/cjs/Schema/index.js +4 -4
  97. package/dist/cjs/SchemaNameValidator.d.ts +73 -73
  98. package/dist/cjs/SchemaNameValidator.js +134 -134
  99. package/dist/cjs/Test/index.d.ts +2 -2
  100. package/dist/cjs/Test/index.js +5 -5
  101. package/dist/cjs/Test/testBoundWitness.d.ts +3 -3
  102. package/dist/cjs/Test/testBoundWitness.js +16 -16
  103. package/dist/cjs/Test/testPayload.d.ts +4 -4
  104. package/dist/cjs/Test/testPayload.js +18 -18
  105. package/dist/cjs/Wallet/Account/Account.d.ts +36 -36
  106. package/dist/cjs/Wallet/Account/Account.js +78 -78
  107. package/dist/cjs/Wallet/Account/Key/Data/AbstractData.d.ts +12 -12
  108. package/dist/cjs/Wallet/Account/Key/Data/AbstractData.js +15 -15
  109. package/dist/cjs/Wallet/Account/Key/Data/Data.d.ts +15 -15
  110. package/dist/cjs/Wallet/Account/Key/Data/Data.js +39 -39
  111. package/dist/cjs/Wallet/Account/Key/Data/XyoDataLike.d.ts +4 -4
  112. package/dist/cjs/Wallet/Account/Key/Data/XyoDataLike.js +2 -2
  113. package/dist/cjs/Wallet/Account/Key/Data/index.d.ts +4 -4
  114. package/dist/cjs/Wallet/Account/Key/Data/index.js +7 -7
  115. package/dist/cjs/Wallet/Account/Key/Data/toUint8Array.d.ts +3 -3
  116. package/dist/cjs/Wallet/Account/Key/Data/toUint8Array.js +32 -32
  117. package/dist/cjs/Wallet/Account/Key/XyoAddressValue.d.ts +11 -11
  118. package/dist/cjs/Wallet/Account/Key/XyoAddressValue.js +48 -48
  119. package/dist/cjs/Wallet/Account/Key/XyoEllipticKey.d.ts +5 -5
  120. package/dist/cjs/Wallet/Account/Key/XyoEllipticKey.js +12 -12
  121. package/dist/cjs/Wallet/Account/Key/XyoKeyPair.d.ts +10 -10
  122. package/dist/cjs/Wallet/Account/Key/XyoKeyPair.js +22 -22
  123. package/dist/cjs/Wallet/Account/Key/XyoPrivateKey.d.ts +14 -14
  124. package/dist/cjs/Wallet/Account/Key/XyoPrivateKey.js +55 -55
  125. package/dist/cjs/Wallet/Account/Key/XyoPublicKey.d.ts +10 -10
  126. package/dist/cjs/Wallet/Account/Key/XyoPublicKey.js +21 -21
  127. package/dist/cjs/Wallet/Account/Key/index.d.ts +5 -5
  128. package/dist/cjs/Wallet/Account/Key/index.js +8 -8
  129. package/dist/cjs/Wallet/Account/index.d.ts +2 -2
  130. package/dist/cjs/Wallet/Account/index.js +5 -5
  131. package/dist/cjs/Wallet/Base/Base.d.ts +8 -8
  132. package/dist/cjs/Wallet/Base/Base.js +36 -36
  133. package/dist/cjs/Wallet/Base/Words.d.ts +2 -2
  134. package/dist/cjs/Wallet/Base/Words.js +2643 -2643
  135. package/dist/cjs/Wallet/Base/WordsPayload.d.ts +4 -4
  136. package/dist/cjs/Wallet/Base/WordsPayload.js +2 -2
  137. package/dist/cjs/Wallet/Base/index.d.ts +1 -1
  138. package/dist/cjs/Wallet/Base/index.js +4 -4
  139. package/dist/cjs/Wallet/index.d.ts +2 -2
  140. package/dist/cjs/Wallet/index.js +5 -5
  141. package/dist/cjs/Witness/LegacyWitness.d.ts +14 -14
  142. package/dist/cjs/Witness/LegacyWitness.js +27 -27
  143. package/dist/cjs/Witness/QueryWitness.d.ts +9 -9
  144. package/dist/cjs/Witness/QueryWitness.js +24 -24
  145. package/dist/cjs/Witness/Witness.d.ts +5 -5
  146. package/dist/cjs/Witness/Witness.js +6 -6
  147. package/dist/cjs/Witness/index.d.ts +3 -3
  148. package/dist/cjs/Witness/index.js +6 -6
  149. package/dist/cjs/browser/core/Wallet/Web.d.ts +5 -5
  150. package/dist/cjs/browser/core/Wallet/Web.js +14 -14
  151. package/dist/cjs/browser/core/Wallet/index.d.ts +1 -1
  152. package/dist/cjs/browser/core/Wallet/index.js +4 -4
  153. package/dist/cjs/browser/core/index.d.ts +1 -1
  154. package/dist/cjs/browser/core/index.js +4 -4
  155. package/dist/cjs/browser/index.d.ts +1 -1
  156. package/dist/cjs/browser/index.js +4 -4
  157. package/dist/cjs/browserIndex.d.ts +2 -2
  158. package/dist/cjs/browserIndex.js +5 -5
  159. package/dist/cjs/index.d.ts +2 -2
  160. package/dist/cjs/index.js +5 -5
  161. package/dist/cjs/lib/dns/DnsRecordType.d.ts +14 -14
  162. package/dist/cjs/lib/dns/DnsRecordType.js +18 -18
  163. package/dist/cjs/lib/dns/DnsReturnCode.d.ts +13 -13
  164. package/dist/cjs/lib/dns/DnsReturnCode.js +17 -17
  165. package/dist/cjs/lib/dns/GoogleDnsResult.d.ts +16 -16
  166. package/dist/cjs/lib/dns/GoogleDnsResult.js +2 -2
  167. package/dist/cjs/lib/dns/GoogleDnsResultAnswer.d.ts +7 -7
  168. package/dist/cjs/lib/dns/GoogleDnsResultAnswer.js +2 -2
  169. package/dist/cjs/lib/dns/GoogleDnsResultQuestion.d.ts +10 -10
  170. package/dist/cjs/lib/dns/GoogleDnsResultQuestion.js +2 -2
  171. package/dist/cjs/lib/dns/domainExists.d.ts +7 -7
  172. package/dist/cjs/lib/dns/domainExists.js +18 -18
  173. package/dist/cjs/lib/dns/domainResolve.d.ts +8 -8
  174. package/dist/cjs/lib/dns/domainResolve.js +18 -18
  175. package/dist/cjs/lib/dns/googleDnsOverHttps.d.ts +4 -4
  176. package/dist/cjs/lib/dns/googleDnsOverHttps.js +10 -10
  177. package/dist/cjs/lib/dns/index.d.ts +8 -8
  178. package/dist/cjs/lib/dns/index.js +11 -11
  179. package/dist/cjs/lib/dumpErrors.d.ts +2 -2
  180. package/dist/cjs/lib/dumpErrors.js +9 -9
  181. package/dist/cjs/lib/exists.d.ts +1 -1
  182. package/dist/cjs/lib/exists.js +7 -7
  183. package/dist/cjs/lib/index.d.ts +4 -4
  184. package/dist/cjs/lib/index.js +7 -7
  185. package/dist/cjs/lib/isBrowser.d.ts +1 -1
  186. package/dist/cjs/lib/isBrowser.js +7 -7
  187. package/dist/cjs/lib/isXyoPayloadOfSchemaType.d.ts +6 -6
  188. package/dist/cjs/lib/isXyoPayloadOfSchemaType.js +9 -9
  189. package/dist/cjs/lib/typeOf/TypeOfTypes.d.ts +1 -1
  190. package/dist/cjs/lib/typeOf/TypeOfTypes.js +2 -2
  191. package/dist/cjs/lib/typeOf/ifDefined.d.ts +1 -1
  192. package/dist/cjs/lib/typeOf/ifDefined.js +15 -15
  193. package/dist/cjs/lib/typeOf/ifTypeOf.d.ts +2 -2
  194. package/dist/cjs/lib/typeOf/ifTypeOf.js +11 -11
  195. package/dist/cjs/lib/typeOf/index.d.ts +5 -5
  196. package/dist/cjs/lib/typeOf/index.js +8 -8
  197. package/dist/cjs/lib/typeOf/typeOf.d.ts +2 -2
  198. package/dist/cjs/lib/typeOf/typeOf.js +7 -7
  199. package/dist/cjs/lib/typeOf/validateType.d.ts +2 -2
  200. package/dist/cjs/lib/typeOf/validateType.js +17 -17
  201. package/dist/cjs/models/WithStringIndex.d.ts +1 -1
  202. package/dist/cjs/models/WithStringIndex.js +2 -2
  203. package/dist/cjs/models/index.d.ts +1 -1
  204. package/dist/cjs/models/index.js +4 -4
  205. package/dist/cjs/nodeIndex.d.ts +1 -1
  206. package/dist/cjs/nodeIndex.js +4 -4
  207. package/dist/cjs/shared.d.ts +11 -11
  208. package/dist/cjs/shared.js +14 -14
  209. package/dist/esm/BoundWitness/Builder/Builder.d.ts +22 -22
  210. package/dist/esm/BoundWitness/Builder/Builder.js +65 -65
  211. package/dist/esm/BoundWitness/Builder/index.d.ts +1 -1
  212. package/dist/esm/BoundWitness/Builder/index.js +1 -1
  213. package/dist/esm/BoundWitness/Validator/BodyValidator.d.ts +18 -18
  214. package/dist/esm/BoundWitness/Validator/BodyValidator.js +85 -85
  215. package/dist/esm/BoundWitness/Validator/MetaValidator.d.ts +14 -14
  216. package/dist/esm/BoundWitness/Validator/MetaValidator.js +65 -65
  217. package/dist/esm/BoundWitness/Validator/Validator.d.ts +12 -12
  218. package/dist/esm/BoundWitness/Validator/Validator.js +40 -40
  219. package/dist/esm/BoundWitness/Validator/index.d.ts +3 -3
  220. package/dist/esm/BoundWitness/Validator/index.js +3 -3
  221. package/dist/esm/BoundWitness/Validator/ip-regex.d.ts +9 -9
  222. package/dist/esm/BoundWitness/Validator/ip-regex.js +15 -15
  223. package/dist/esm/BoundWitness/Validator/is-ip.d.ts +4 -4
  224. package/dist/esm/BoundWitness/Validator/is-ip.js +13 -13
  225. package/dist/esm/BoundWitness/Wrapper/Wrapper.d.ts +13 -13
  226. package/dist/esm/BoundWitness/Wrapper/Wrapper.js +23 -23
  227. package/dist/esm/BoundWitness/Wrapper/index.d.ts +1 -1
  228. package/dist/esm/BoundWitness/Wrapper/index.js +1 -1
  229. package/dist/esm/BoundWitness/index.d.ts +4 -4
  230. package/dist/esm/BoundWitness/index.js +4 -4
  231. package/dist/esm/BoundWitness/models/Body/XyoBoundWitnessBody.d.ts +11 -11
  232. package/dist/esm/BoundWitness/models/Body/XyoBoundWitnessBody.js +1 -1
  233. package/dist/esm/BoundWitness/models/Body/XyoBoundWitnessBodySchema.d.ts +37 -37
  234. package/dist/esm/BoundWitness/models/Body/XyoBoundWitnessBodySchema.js +16 -16
  235. package/dist/esm/BoundWitness/models/Body/index.d.ts +2 -2
  236. package/dist/esm/BoundWitness/models/Body/index.js +2 -2
  237. package/dist/esm/BoundWitness/models/Meta/XyoBoundWitnessMeta.d.ts +13 -13
  238. package/dist/esm/BoundWitness/models/Meta/XyoBoundWitnessMeta.js +1 -1
  239. package/dist/esm/BoundWitness/models/Meta/XyoBoundWitnessMetaSchema.d.ts +85 -85
  240. package/dist/esm/BoundWitness/models/Meta/XyoBoundWitnessMetaSchema.js +22 -22
  241. package/dist/esm/BoundWitness/models/Meta/index.d.ts +2 -2
  242. package/dist/esm/BoundWitness/models/Meta/index.js +2 -2
  243. package/dist/esm/BoundWitness/models/WithXyoBoundWitnessMeta.d.ts +4 -4
  244. package/dist/esm/BoundWitness/models/WithXyoBoundWitnessMeta.js +1 -1
  245. package/dist/esm/BoundWitness/models/XyoBoundWitness.d.ts +5 -5
  246. package/dist/esm/BoundWitness/models/XyoBoundWitness.js +1 -1
  247. package/dist/esm/BoundWitness/models/XyoBoundWitnessSchema.d.ts +75 -75
  248. package/dist/esm/BoundWitness/models/XyoBoundWitnessSchema.js +20 -20
  249. package/dist/esm/BoundWitness/models/index.d.ts +5 -5
  250. package/dist/esm/BoundWitness/models/index.js +5 -5
  251. package/dist/esm/Hasher/XyoAbstractHasher.d.ts +11 -11
  252. package/dist/esm/Hasher/XyoAbstractHasher.js +28 -28
  253. package/dist/esm/Hasher/XyoHasher.d.ts +6 -6
  254. package/dist/esm/Hasher/XyoHasher.js +10 -10
  255. package/dist/esm/Hasher/index.d.ts +5 -5
  256. package/dist/esm/Hasher/index.js +5 -5
  257. package/dist/esm/Hasher/removeEmptyFields.d.ts +1 -1
  258. package/dist/esm/Hasher/removeEmptyFields.js +15 -15
  259. package/dist/esm/Hasher/removeFields.d.ts +6 -6
  260. package/dist/esm/Hasher/removeFields.js +21 -21
  261. package/dist/esm/Hasher/sortFields.d.ts +1 -1
  262. package/dist/esm/Hasher/sortFields.js +22 -22
  263. package/dist/esm/Huri/Huri.d.ts +26 -26
  264. package/dist/esm/Huri/Huri.js +89 -89
  265. package/dist/esm/Huri/index.d.ts +1 -1
  266. package/dist/esm/Huri/index.js +1 -1
  267. package/dist/esm/Payload/Builder/Builder.d.ts +14 -14
  268. package/dist/esm/Payload/Builder/Builder.js +29 -29
  269. package/dist/esm/Payload/Builder/index.d.ts +1 -1
  270. package/dist/esm/Payload/Builder/index.js +1 -1
  271. package/dist/esm/Payload/Validator/BodyValidator.d.ts +11 -11
  272. package/dist/esm/Payload/Validator/BodyValidator.js +26 -26
  273. package/dist/esm/Payload/Validator/MetaValidator.d.ts +9 -9
  274. package/dist/esm/Payload/Validator/MetaValidator.js +33 -33
  275. package/dist/esm/Payload/Validator/Validator.d.ts +11 -11
  276. package/dist/esm/Payload/Validator/Validator.js +15 -15
  277. package/dist/esm/Payload/Validator/index.d.ts +3 -3
  278. package/dist/esm/Payload/Validator/index.js +3 -3
  279. package/dist/esm/Payload/Wrapper/Validator.d.ts +9 -9
  280. package/dist/esm/Payload/Wrapper/Validator.js +14 -14
  281. package/dist/esm/Payload/Wrapper/Wrapper.d.ts +9 -9
  282. package/dist/esm/Payload/Wrapper/Wrapper.js +16 -16
  283. package/dist/esm/Payload/Wrapper/index.d.ts +2 -2
  284. package/dist/esm/Payload/Wrapper/index.js +2 -2
  285. package/dist/esm/Payload/index.d.ts +4 -4
  286. package/dist/esm/Payload/index.js +4 -4
  287. package/dist/esm/Payload/models/Body.d.ts +6 -6
  288. package/dist/esm/Payload/models/Body.js +1 -1
  289. package/dist/esm/Payload/models/Meta.d.ts +10 -10
  290. package/dist/esm/Payload/models/Meta.js +1 -1
  291. package/dist/esm/Payload/models/WithXyoPayloadMeta.d.ts +4 -4
  292. package/dist/esm/Payload/models/WithXyoPayloadMeta.js +1 -1
  293. package/dist/esm/Payload/models/XyoPayload.d.ts +4 -4
  294. package/dist/esm/Payload/models/XyoPayload.js +1 -1
  295. package/dist/esm/Payload/models/index.d.ts +4 -4
  296. package/dist/esm/Payload/models/index.js +4 -4
  297. package/dist/esm/Query/QueryPayload.d.ts +11 -11
  298. package/dist/esm/Query/QueryPayload.js +1 -1
  299. package/dist/esm/Query/index.d.ts +1 -1
  300. package/dist/esm/Query/index.js +1 -1
  301. package/dist/esm/Schema/Payload.d.ts +10 -10
  302. package/dist/esm/Schema/Payload.js +1 -1
  303. package/dist/esm/Schema/index.d.ts +1 -1
  304. package/dist/esm/Schema/index.js +1 -1
  305. package/dist/esm/SchemaNameValidator.d.ts +73 -73
  306. package/dist/esm/SchemaNameValidator.js +116 -116
  307. package/dist/esm/Test/index.d.ts +2 -2
  308. package/dist/esm/Test/index.js +2 -2
  309. package/dist/esm/Test/testBoundWitness.d.ts +3 -3
  310. package/dist/esm/Test/testBoundWitness.js +13 -13
  311. package/dist/esm/Test/testPayload.d.ts +4 -4
  312. package/dist/esm/Test/testPayload.js +14 -14
  313. package/dist/esm/Wallet/Account/Account.d.ts +36 -36
  314. package/dist/esm/Wallet/Account/Account.js +70 -70
  315. package/dist/esm/Wallet/Account/Key/Data/AbstractData.d.ts +12 -12
  316. package/dist/esm/Wallet/Account/Key/Data/AbstractData.js +11 -11
  317. package/dist/esm/Wallet/Account/Key/Data/Data.d.ts +15 -15
  318. package/dist/esm/Wallet/Account/Key/Data/Data.js +34 -34
  319. package/dist/esm/Wallet/Account/Key/Data/XyoDataLike.d.ts +4 -4
  320. package/dist/esm/Wallet/Account/Key/Data/XyoDataLike.js +1 -1
  321. package/dist/esm/Wallet/Account/Key/Data/index.d.ts +4 -4
  322. package/dist/esm/Wallet/Account/Key/Data/index.js +4 -4
  323. package/dist/esm/Wallet/Account/Key/Data/toUint8Array.d.ts +3 -3
  324. package/dist/esm/Wallet/Account/Key/Data/toUint8Array.js +30 -30
  325. package/dist/esm/Wallet/Account/Key/XyoAddressValue.d.ts +11 -11
  326. package/dist/esm/Wallet/Account/Key/XyoAddressValue.js +44 -44
  327. package/dist/esm/Wallet/Account/Key/XyoEllipticKey.d.ts +5 -5
  328. package/dist/esm/Wallet/Account/Key/XyoEllipticKey.js +7 -7
  329. package/dist/esm/Wallet/Account/Key/XyoKeyPair.d.ts +10 -10
  330. package/dist/esm/Wallet/Account/Key/XyoKeyPair.js +17 -17
  331. package/dist/esm/Wallet/Account/Key/XyoPrivateKey.d.ts +14 -14
  332. package/dist/esm/Wallet/Account/Key/XyoPrivateKey.js +49 -49
  333. package/dist/esm/Wallet/Account/Key/XyoPublicKey.d.ts +10 -10
  334. package/dist/esm/Wallet/Account/Key/XyoPublicKey.js +17 -17
  335. package/dist/esm/Wallet/Account/Key/index.d.ts +5 -5
  336. package/dist/esm/Wallet/Account/Key/index.js +5 -5
  337. package/dist/esm/Wallet/Account/index.d.ts +2 -2
  338. package/dist/esm/Wallet/Account/index.js +2 -2
  339. package/dist/esm/Wallet/Base/Base.d.ts +8 -8
  340. package/dist/esm/Wallet/Base/Base.js +29 -29
  341. package/dist/esm/Wallet/Base/Words.d.ts +2 -2
  342. package/dist/esm/Wallet/Base/Words.js +2640 -2640
  343. package/dist/esm/Wallet/Base/WordsPayload.d.ts +4 -4
  344. package/dist/esm/Wallet/Base/WordsPayload.js +1 -1
  345. package/dist/esm/Wallet/Base/index.d.ts +1 -1
  346. package/dist/esm/Wallet/Base/index.js +1 -1
  347. package/dist/esm/Wallet/index.d.ts +2 -2
  348. package/dist/esm/Wallet/index.js +2 -2
  349. package/dist/esm/Witness/LegacyWitness.d.ts +14 -14
  350. package/dist/esm/Witness/LegacyWitness.js +18 -18
  351. package/dist/esm/Witness/QueryWitness.d.ts +9 -9
  352. package/dist/esm/Witness/QueryWitness.js +16 -16
  353. package/dist/esm/Witness/Witness.d.ts +5 -5
  354. package/dist/esm/Witness/Witness.js +2 -2
  355. package/dist/esm/Witness/index.d.ts +3 -3
  356. package/dist/esm/Witness/index.js +3 -3
  357. package/dist/esm/browser/core/Wallet/Web.d.ts +5 -5
  358. package/dist/esm/browser/core/Wallet/Web.js +10 -10
  359. package/dist/esm/browser/core/Wallet/index.d.ts +1 -1
  360. package/dist/esm/browser/core/Wallet/index.js +1 -1
  361. package/dist/esm/browser/core/index.d.ts +1 -1
  362. package/dist/esm/browser/core/index.js +1 -1
  363. package/dist/esm/browser/index.d.ts +1 -1
  364. package/dist/esm/browser/index.js +1 -1
  365. package/dist/esm/browserIndex.d.ts +2 -2
  366. package/dist/esm/browserIndex.js +2 -2
  367. package/dist/esm/index.d.ts +2 -2
  368. package/dist/esm/index.js +2 -2
  369. package/dist/esm/lib/dns/DnsRecordType.d.ts +14 -14
  370. package/dist/esm/lib/dns/DnsRecordType.js +15 -15
  371. package/dist/esm/lib/dns/DnsReturnCode.d.ts +13 -13
  372. package/dist/esm/lib/dns/DnsReturnCode.js +14 -14
  373. package/dist/esm/lib/dns/GoogleDnsResult.d.ts +16 -16
  374. package/dist/esm/lib/dns/GoogleDnsResult.js +1 -1
  375. package/dist/esm/lib/dns/GoogleDnsResultAnswer.d.ts +7 -7
  376. package/dist/esm/lib/dns/GoogleDnsResultAnswer.js +1 -1
  377. package/dist/esm/lib/dns/GoogleDnsResultQuestion.d.ts +10 -10
  378. package/dist/esm/lib/dns/GoogleDnsResultQuestion.js +1 -1
  379. package/dist/esm/lib/dns/domainExists.d.ts +7 -7
  380. package/dist/esm/lib/dns/domainExists.js +14 -14
  381. package/dist/esm/lib/dns/domainResolve.d.ts +8 -8
  382. package/dist/esm/lib/dns/domainResolve.js +14 -14
  383. package/dist/esm/lib/dns/googleDnsOverHttps.d.ts +4 -4
  384. package/dist/esm/lib/dns/googleDnsOverHttps.js +6 -6
  385. package/dist/esm/lib/dns/index.d.ts +8 -8
  386. package/dist/esm/lib/dns/index.js +8 -8
  387. package/dist/esm/lib/dumpErrors.d.ts +2 -2
  388. package/dist/esm/lib/dumpErrors.js +6 -6
  389. package/dist/esm/lib/exists.d.ts +1 -1
  390. package/dist/esm/lib/exists.js +3 -3
  391. package/dist/esm/lib/index.d.ts +4 -4
  392. package/dist/esm/lib/index.js +4 -4
  393. package/dist/esm/lib/isBrowser.d.ts +1 -1
  394. package/dist/esm/lib/isBrowser.js +3 -3
  395. package/dist/esm/lib/isXyoPayloadOfSchemaType.d.ts +6 -6
  396. package/dist/esm/lib/isXyoPayloadOfSchemaType.js +5 -5
  397. package/dist/esm/lib/typeOf/TypeOfTypes.d.ts +1 -1
  398. package/dist/esm/lib/typeOf/TypeOfTypes.js +1 -1
  399. package/dist/esm/lib/typeOf/ifDefined.d.ts +1 -1
  400. package/dist/esm/lib/typeOf/ifDefined.js +11 -11
  401. package/dist/esm/lib/typeOf/ifTypeOf.d.ts +2 -2
  402. package/dist/esm/lib/typeOf/ifTypeOf.js +7 -7
  403. package/dist/esm/lib/typeOf/index.d.ts +5 -5
  404. package/dist/esm/lib/typeOf/index.js +5 -5
  405. package/dist/esm/lib/typeOf/typeOf.d.ts +2 -2
  406. package/dist/esm/lib/typeOf/typeOf.js +3 -3
  407. package/dist/esm/lib/typeOf/validateType.d.ts +2 -2
  408. package/dist/esm/lib/typeOf/validateType.js +13 -13
  409. package/dist/esm/models/WithStringIndex.d.ts +1 -1
  410. package/dist/esm/models/WithStringIndex.js +1 -1
  411. package/dist/esm/models/index.d.ts +1 -1
  412. package/dist/esm/models/index.js +1 -1
  413. package/dist/esm/nodeIndex.d.ts +1 -1
  414. package/dist/esm/nodeIndex.js +1 -1
  415. package/dist/esm/shared.d.ts +11 -11
  416. package/dist/esm/shared.js +11 -11
  417. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- export * from './Builder';
2
- export * from './models';
3
- export * from './Validator';
4
- export * from './Wrapper';
1
+ export * from './Builder';
2
+ export * from './models';
3
+ export * from './Validator';
4
+ export * from './Wrapper';
@@ -1,5 +1,5 @@
1
- export * from './Builder';
2
- export * from './models';
3
- export * from './Validator';
4
- export * from './Wrapper';
1
+ export * from './Builder';
2
+ export * from './models';
3
+ export * from './Validator';
4
+ export * from './Wrapper';
5
5
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
- interface XyoPayloadBody {
2
- [key: string]: unknown;
3
- schema: string;
4
- previousHash?: string;
5
- }
6
- export type { XyoPayloadBody };
1
+ interface XyoPayloadBody {
2
+ [key: string]: unknown;
3
+ schema: string;
4
+ previousHash?: string;
5
+ }
6
+ export type { XyoPayloadBody };
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=Body.js.map
@@ -1,10 +1,10 @@
1
- interface XyoPayloadMeta {
2
- [key: string]: unknown;
3
- _hash?: string;
4
- _client?: string;
5
- _reportedHash?: string;
6
- _timestamp?: number;
7
- _observeDuration?: number;
8
- _archive?: string;
9
- }
10
- export type { XyoPayloadMeta };
1
+ interface XyoPayloadMeta {
2
+ [key: string]: unknown;
3
+ _hash?: string;
4
+ _client?: string;
5
+ _reportedHash?: string;
6
+ _timestamp?: number;
7
+ _observeDuration?: number;
8
+ _archive?: string;
9
+ }
10
+ export type { XyoPayloadMeta };
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=Meta.js.map
@@ -1,4 +1,4 @@
1
- import { XyoPayloadBody } from './Body';
2
- import { XyoPayloadMeta } from './Meta';
3
- declare type WithXyoPayloadMeta<T extends XyoPayloadBody> = T & XyoPayloadMeta;
4
- export type { WithXyoPayloadMeta };
1
+ import { XyoPayloadBody } from './Body';
2
+ import { XyoPayloadMeta } from './Meta';
3
+ declare type WithXyoPayloadMeta<T extends XyoPayloadBody> = T & XyoPayloadMeta;
4
+ export type { WithXyoPayloadMeta };
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=WithXyoPayloadMeta.js.map
@@ -1,4 +1,4 @@
1
- import { XyoPayloadBody } from './Body';
2
- import { WithXyoPayloadMeta } from './WithXyoPayloadMeta';
3
- export declare type XyoPayloadFull = WithXyoPayloadMeta<XyoPayloadBody>;
4
- export declare type XyoPayload<T = XyoPayloadFull> = T extends XyoPayloadFull ? T : XyoPayloadFull & T;
1
+ import { XyoPayloadBody } from './Body';
2
+ import { WithXyoPayloadMeta } from './WithXyoPayloadMeta';
3
+ export declare type XyoPayloadFull = WithXyoPayloadMeta<XyoPayloadBody>;
4
+ export declare type XyoPayload<T = XyoPayloadFull> = T extends XyoPayloadFull ? T : XyoPayloadFull & T;
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=XyoPayload.js.map
@@ -1,4 +1,4 @@
1
- export * from './Body';
2
- export * from './Meta';
3
- export * from './WithXyoPayloadMeta';
4
- export * from './XyoPayload';
1
+ export * from './Body';
2
+ export * from './Meta';
3
+ export * from './WithXyoPayloadMeta';
4
+ export * from './XyoPayload';
@@ -1,5 +1,5 @@
1
- export * from './Body';
2
- export * from './Meta';
3
- export * from './WithXyoPayloadMeta';
4
- export * from './XyoPayload';
1
+ export * from './Body';
2
+ export * from './Meta';
3
+ export * from './WithXyoPayloadMeta';
4
+ export * from './XyoPayload';
5
5
  //# sourceMappingURL=index.js.map
@@ -1,11 +1,11 @@
1
- import { XyoPayload } from '../Payload';
2
- export interface XyoQueryPayload extends XyoPayload {
3
- /** @field The preferred schema to use for the answer */
4
- targetSchema?: string;
5
- /** @field The maximum XYO that can be spent executing the query */
6
- budget?: number;
7
- /** @field The frequency on which this query can be rerun */
8
- maxFrequency?: 'once' | 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'year';
9
- /** @field The starting point for the bidding on the query */
10
- minBid?: number;
11
- }
1
+ import { XyoPayload } from '../Payload';
2
+ export interface XyoQueryPayload extends XyoPayload {
3
+ /** @field The preferred schema to use for the answer */
4
+ targetSchema?: string;
5
+ /** @field The maximum XYO that can be spent executing the query */
6
+ budget?: number;
7
+ /** @field The frequency on which this query can be rerun */
8
+ maxFrequency?: 'once' | 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'year';
9
+ /** @field The starting point for the bidding on the query */
10
+ minBid?: number;
11
+ }
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=QueryPayload.js.map
@@ -1 +1 @@
1
- export * from './QueryPayload';
1
+ export * from './QueryPayload';
@@ -1,2 +1,2 @@
1
- export * from './QueryPayload';
1
+ export * from './QueryPayload';
2
2
  //# sourceMappingURL=index.js.map
@@ -1,10 +1,10 @@
1
- import { XyoPayload } from '../Payload';
2
- export interface XyoSchemaPayload extends XyoPayload {
3
- /** @deprecated use definition.$id instead */
4
- name?: string;
5
- definition: {
6
- $id?: string;
7
- [key: string]: unknown;
8
- };
9
- extends?: string;
10
- }
1
+ import { XyoPayload } from '../Payload';
2
+ export interface XyoSchemaPayload extends XyoPayload {
3
+ /** @deprecated use definition.$id instead */
4
+ name?: string;
5
+ definition: {
6
+ $id?: string;
7
+ [key: string]: unknown;
8
+ };
9
+ extends?: string;
10
+ }
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=Payload.js.map
@@ -1 +1 @@
1
- export * from './Payload';
1
+ export * from './Payload';
@@ -1,2 +1,2 @@
1
- export * from './Payload';
1
+ export * from './Payload';
2
2
  //# sourceMappingURL=index.js.map
@@ -1,73 +1,73 @@
1
- /**
2
- * Validates a XYO schema structure and existence
3
- */
4
- export declare class XyoSchemaNameValidator {
5
- schema?: string;
6
- constructor(schema?: string);
7
- private _parts?;
8
- /**
9
- * The schema converted into a string array split on '.'
10
- *
11
- * @returns string[]
12
- */
13
- get parts(): string[] | undefined;
14
- /**
15
- * Levels in the schema
16
- *
17
- * @returns number
18
- */
19
- get levels(): number | undefined;
20
- /**
21
- * Checks whether the schema is all lowercase
22
- *
23
- * @returns boolean
24
- */
25
- get isLowercase(): boolean;
26
- /**
27
- *
28
- * Get a domain for the schema at a certain level
29
- *
30
- * @param level - Zero based level to check
31
- * @returns string
32
- */
33
- private domainLevel;
34
- private _rootDomain?;
35
- /**
36
- * The rootDomain is the first two levels of the schema, in reverse order
37
- * This can be used to determine who 'owns' that schema, based on domain
38
- * registration
39
- *
40
- * @returns string
41
- */
42
- get rootDomain(): string | undefined;
43
- /**
44
- * Checks if the root domain validates via DNS resolution
45
- *
46
- * @returns boolean
47
- */
48
- rootDomainExists(): Promise<boolean>;
49
- /**
50
- * Determines how many levels of the schema's reverse domain
51
- * pass DNS resolution
52
- *
53
- * @returns number (0 if none exist)
54
- */
55
- domainExistanceDepth(): Promise<number>;
56
- /**
57
- * Run all the validations
58
- * @param checkExistance - boolean
59
- * @returns Error[]
60
- */
61
- allDynamic(): Promise<Error[]>;
62
- /**
63
- * Run all static validations
64
- * @returns Error[]
65
- */
66
- all(): Error[];
67
- }
68
- /** @deprectated use XyoSchemaNameValidator instead */
69
- export declare class SchemaValidator extends XyoSchemaNameValidator {
70
- }
71
- /** @deprectated use XyoSchemaNameValidator instead */
72
- export declare class XyoSchemaValidator extends XyoSchemaNameValidator {
73
- }
1
+ /**
2
+ * Validates a XYO schema structure and existence
3
+ */
4
+ export declare class XyoSchemaNameValidator {
5
+ schema?: string;
6
+ constructor(schema?: string);
7
+ private _parts?;
8
+ /**
9
+ * The schema converted into a string array split on '.'
10
+ *
11
+ * @returns string[]
12
+ */
13
+ get parts(): string[] | undefined;
14
+ /**
15
+ * Levels in the schema
16
+ *
17
+ * @returns number
18
+ */
19
+ get levels(): number | undefined;
20
+ /**
21
+ * Checks whether the schema is all lowercase
22
+ *
23
+ * @returns boolean
24
+ */
25
+ get isLowercase(): boolean;
26
+ /**
27
+ *
28
+ * Get a domain for the schema at a certain level
29
+ *
30
+ * @param level - Zero based level to check
31
+ * @returns string
32
+ */
33
+ private domainLevel;
34
+ private _rootDomain?;
35
+ /**
36
+ * The rootDomain is the first two levels of the schema, in reverse order
37
+ * This can be used to determine who 'owns' that schema, based on domain
38
+ * registration
39
+ *
40
+ * @returns string
41
+ */
42
+ get rootDomain(): string | undefined;
43
+ /**
44
+ * Checks if the root domain validates via DNS resolution
45
+ *
46
+ * @returns boolean
47
+ */
48
+ rootDomainExists(): Promise<boolean>;
49
+ /**
50
+ * Determines how many levels of the schema's reverse domain
51
+ * pass DNS resolution
52
+ *
53
+ * @returns number (0 if none exist)
54
+ */
55
+ domainExistanceDepth(): Promise<number>;
56
+ /**
57
+ * Run all the validations
58
+ * @param checkExistance - boolean
59
+ * @returns Error[]
60
+ */
61
+ allDynamic(): Promise<Error[]>;
62
+ /**
63
+ * Run all static validations
64
+ * @returns Error[]
65
+ */
66
+ all(): Error[];
67
+ }
68
+ /** @deprectated use XyoSchemaNameValidator instead */
69
+ export declare class SchemaValidator extends XyoSchemaNameValidator {
70
+ }
71
+ /** @deprectated use XyoSchemaNameValidator instead */
72
+ export declare class XyoSchemaValidator extends XyoSchemaNameValidator {
73
+ }
@@ -1,117 +1,117 @@
1
- import { domainExists } from './lib';
2
- /**
3
- * Validates a XYO schema structure and existence
4
- */
5
- export class XyoSchemaNameValidator {
6
- constructor(schema) {
7
- this.schema = schema;
8
- }
9
- /**
10
- * The schema converted into a string array split on '.'
11
- *
12
- * @returns string[]
13
- */
14
- get parts() {
15
- this._parts = this._parts ?? this.schema?.split('.');
16
- return this._parts;
17
- }
18
- /**
19
- * Levels in the schema
20
- *
21
- * @returns number
22
- */
23
- get levels() {
24
- return this.parts?.length;
25
- }
26
- /**
27
- * Checks whether the schema is all lowercase
28
- *
29
- * @returns boolean
30
- */
31
- get isLowercase() {
32
- return this.schema === this.schema?.toLowerCase();
33
- }
34
- /**
35
- *
36
- * Get a domain for the schema at a certain level
37
- *
38
- * @param level - Zero based level to check
39
- * @returns string
40
- */
41
- domainLevel(level) {
42
- return this.parts
43
- ?.slice(0, level + 1)
44
- .reverse()
45
- .join('.');
46
- }
47
- /**
48
- * The rootDomain is the first two levels of the schema, in reverse order
49
- * This can be used to determine who 'owns' that schema, based on domain
50
- * registration
51
- *
52
- * @returns string
53
- */
54
- get rootDomain() {
55
- this._rootDomain = this._rootDomain ?? this.domainLevel(1);
56
- return this._rootDomain;
57
- }
58
- /**
59
- * Checks if the root domain validates via DNS resolution
60
- *
61
- * @returns boolean
62
- */
63
- async rootDomainExists() {
64
- return await domainExists(this.rootDomain);
65
- }
66
- /**
67
- * Determines how many levels of the schema's reverse domain
68
- * pass DNS resolution
69
- *
70
- * @returns number (0 if none exist)
71
- */
72
- async domainExistanceDepth() {
73
- const levels = this.levels ?? 0;
74
- let level = 0;
75
- while (level < levels) {
76
- if (!(await domainExists(this.domainLevel(level)))) {
77
- break;
78
- }
79
- level += 1;
80
- }
81
- return level;
82
- }
83
- /**
84
- * Run all the validations
85
- * @param checkExistance - boolean
86
- * @returns Error[]
87
- */
88
- async allDynamic() {
89
- const errors = [];
90
- if ((this.schema?.length ?? 0) === 0)
91
- errors.push(Error('schema missing'));
92
- else if (!(await this.rootDomainExists()))
93
- errors.push(Error(`schema root domain must exist [${this.rootDomain}]`));
94
- return errors;
95
- }
96
- /**
97
- * Run all static validations
98
- * @returns Error[]
99
- */
100
- all() {
101
- const errors = [];
102
- if ((this.schema?.length ?? 0) === 0)
103
- errors.push(Error('schema missing'));
104
- else if ((this.levels ?? 0) < 3)
105
- errors.push(Error(`schema levels < 3 [${this.levels}, ${this.schema}]`));
106
- else if (!this.isLowercase)
107
- errors.push(Error(`schema not lowercase [${this.schema}]`));
108
- return errors;
109
- }
110
- }
111
- /** @deprectated use XyoSchemaNameValidator instead */
112
- export class SchemaValidator extends XyoSchemaNameValidator {
113
- }
114
- /** @deprectated use XyoSchemaNameValidator instead */
115
- export class XyoSchemaValidator extends XyoSchemaNameValidator {
116
- }
1
+ import { domainExists } from './lib';
2
+ /**
3
+ * Validates a XYO schema structure and existence
4
+ */
5
+ export class XyoSchemaNameValidator {
6
+ constructor(schema) {
7
+ this.schema = schema;
8
+ }
9
+ /**
10
+ * The schema converted into a string array split on '.'
11
+ *
12
+ * @returns string[]
13
+ */
14
+ get parts() {
15
+ this._parts = this._parts ?? this.schema?.split('.');
16
+ return this._parts;
17
+ }
18
+ /**
19
+ * Levels in the schema
20
+ *
21
+ * @returns number
22
+ */
23
+ get levels() {
24
+ return this.parts?.length;
25
+ }
26
+ /**
27
+ * Checks whether the schema is all lowercase
28
+ *
29
+ * @returns boolean
30
+ */
31
+ get isLowercase() {
32
+ return this.schema === this.schema?.toLowerCase();
33
+ }
34
+ /**
35
+ *
36
+ * Get a domain for the schema at a certain level
37
+ *
38
+ * @param level - Zero based level to check
39
+ * @returns string
40
+ */
41
+ domainLevel(level) {
42
+ return this.parts
43
+ ?.slice(0, level + 1)
44
+ .reverse()
45
+ .join('.');
46
+ }
47
+ /**
48
+ * The rootDomain is the first two levels of the schema, in reverse order
49
+ * This can be used to determine who 'owns' that schema, based on domain
50
+ * registration
51
+ *
52
+ * @returns string
53
+ */
54
+ get rootDomain() {
55
+ this._rootDomain = this._rootDomain ?? this.domainLevel(1);
56
+ return this._rootDomain;
57
+ }
58
+ /**
59
+ * Checks if the root domain validates via DNS resolution
60
+ *
61
+ * @returns boolean
62
+ */
63
+ async rootDomainExists() {
64
+ return await domainExists(this.rootDomain);
65
+ }
66
+ /**
67
+ * Determines how many levels of the schema's reverse domain
68
+ * pass DNS resolution
69
+ *
70
+ * @returns number (0 if none exist)
71
+ */
72
+ async domainExistanceDepth() {
73
+ const levels = this.levels ?? 0;
74
+ let level = 0;
75
+ while (level < levels) {
76
+ if (!(await domainExists(this.domainLevel(level)))) {
77
+ break;
78
+ }
79
+ level += 1;
80
+ }
81
+ return level;
82
+ }
83
+ /**
84
+ * Run all the validations
85
+ * @param checkExistance - boolean
86
+ * @returns Error[]
87
+ */
88
+ async allDynamic() {
89
+ const errors = [];
90
+ if ((this.schema?.length ?? 0) === 0)
91
+ errors.push(Error('schema missing'));
92
+ else if (!(await this.rootDomainExists()))
93
+ errors.push(Error(`schema root domain must exist [${this.rootDomain}]`));
94
+ return errors;
95
+ }
96
+ /**
97
+ * Run all static validations
98
+ * @returns Error[]
99
+ */
100
+ all() {
101
+ const errors = [];
102
+ if ((this.schema?.length ?? 0) === 0)
103
+ errors.push(Error('schema missing'));
104
+ else if ((this.levels ?? 0) < 3)
105
+ errors.push(Error(`schema levels < 3 [${this.levels}, ${this.schema}]`));
106
+ else if (!this.isLowercase)
107
+ errors.push(Error(`schema not lowercase [${this.schema}]`));
108
+ return errors;
109
+ }
110
+ }
111
+ /** @deprectated use XyoSchemaNameValidator instead */
112
+ export class SchemaValidator extends XyoSchemaNameValidator {
113
+ }
114
+ /** @deprectated use XyoSchemaNameValidator instead */
115
+ export class XyoSchemaValidator extends XyoSchemaNameValidator {
116
+ }
117
117
  //# sourceMappingURL=SchemaNameValidator.js.map
@@ -1,2 +1,2 @@
1
- export * from './testBoundWitness';
2
- export * from './testPayload';
1
+ export * from './testBoundWitness';
2
+ export * from './testPayload';
@@ -1,3 +1,3 @@
1
- export * from './testBoundWitness';
2
- export * from './testPayload';
1
+ export * from './testBoundWitness';
2
+ export * from './testPayload';
3
3
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,3 @@
1
- import { XyoBoundWitness } from '../BoundWitness';
2
- declare const testBoundWitness: XyoBoundWitness;
3
- export { testBoundWitness };
1
+ import { XyoBoundWitness } from '../BoundWitness';
2
+ declare const testBoundWitness: XyoBoundWitness;
3
+ export { testBoundWitness };
@@ -1,14 +1,14 @@
1
- const testBoundWitness = {
2
- _archive: 'temp',
3
- _client: 'js',
4
- _hash: 'b0ffb9ebf872dc316b7be48327256c5316f7cb84d7c706861b18b86af1942dea',
5
- _signatures: ['95100e5fd2012b958e96895870cfac5353c3a33a19314cfd1304ef7d01d052ec2a3ef80d6449cf88d463027fe0d868ed8cfb8b7323d37e93a08570233eea0b17'],
6
- _timestamp: 1650067385598,
7
- addresses: ['5346a2ce56ec4177b67092bda710e150ba6fa046'],
8
- payload_hashes: ['20e14207f952a09f767ff614a648546c037fe524ace0bfe55db31f818aff1f1c'],
9
- payload_schemas: ['network.xyo.test'],
10
- previous_hashes: [null],
11
- schema: 'network.xyo.boundwitness',
12
- };
13
- export { testBoundWitness };
1
+ const testBoundWitness = {
2
+ _archive: 'temp',
3
+ _client: 'js',
4
+ _hash: 'b0ffb9ebf872dc316b7be48327256c5316f7cb84d7c706861b18b86af1942dea',
5
+ _signatures: ['95100e5fd2012b958e96895870cfac5353c3a33a19314cfd1304ef7d01d052ec2a3ef80d6449cf88d463027fe0d868ed8cfb8b7323d37e93a08570233eea0b17'],
6
+ _timestamp: 1650067385598,
7
+ addresses: ['5346a2ce56ec4177b67092bda710e150ba6fa046'],
8
+ payload_hashes: ['20e14207f952a09f767ff614a648546c037fe524ace0bfe55db31f818aff1f1c'],
9
+ payload_schemas: ['network.xyo.test'],
10
+ previous_hashes: [null],
11
+ schema: 'network.xyo.boundwitness',
12
+ };
13
+ export { testBoundWitness };
14
14
  //# sourceMappingURL=testBoundWitness.js.map
@@ -1,4 +1,4 @@
1
- import { XyoPayload } from '../Payload';
2
- declare const testSchema = "network.xyo.test";
3
- declare const testPayload: XyoPayload;
4
- export { testPayload, testSchema };
1
+ import { XyoPayload } from '../Payload';
2
+ declare const testSchema = "network.xyo.test";
3
+ declare const testPayload: XyoPayload;
4
+ export { testPayload, testSchema };