@originals/sdk 1.2.0 → 1.4.2

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 (244) hide show
  1. package/package.json +1 -1
  2. package/src/did/DIDManager.ts +1 -1
  3. package/src/did/WebVHManager.ts +11 -2
  4. package/src/examples/create-module-original.ts +435 -0
  5. package/src/examples/full-lifecycle-flow.ts +514 -0
  6. package/src/examples/run.ts +59 -4
  7. package/src/index.ts +69 -3
  8. package/src/kinds/KindRegistry.ts +290 -0
  9. package/src/kinds/index.ts +74 -0
  10. package/src/kinds/types.ts +470 -0
  11. package/src/kinds/validators/AgentValidator.ts +257 -0
  12. package/src/kinds/validators/AppValidator.ts +211 -0
  13. package/src/kinds/validators/DatasetValidator.ts +242 -0
  14. package/src/kinds/validators/DocumentValidator.ts +311 -0
  15. package/src/kinds/validators/MediaValidator.ts +269 -0
  16. package/src/kinds/validators/ModuleValidator.ts +225 -0
  17. package/src/kinds/validators/base.ts +276 -0
  18. package/src/kinds/validators/index.ts +12 -0
  19. package/src/lifecycle/LifecycleManager.ts +909 -1
  20. package/src/resources/ResourceManager.ts +655 -0
  21. package/src/resources/index.ts +21 -0
  22. package/src/resources/types.ts +202 -0
  23. package/src/types/common.ts +1 -1
  24. package/src/vc/CredentialManager.ts +647 -2
  25. package/tests/integration/createTypedOriginal.test.ts +379 -0
  26. package/tests/performance/BatchOperations.perf.test.ts +2 -2
  27. package/tests/unit/kinds/KindRegistry.test.ts +329 -0
  28. package/tests/unit/kinds/types.test.ts +409 -0
  29. package/tests/unit/kinds/validators.test.ts +651 -0
  30. package/tests/unit/lifecycle/LifecycleManager.cleanapi.test.ts +441 -0
  31. package/tests/unit/resources/ResourceManager.test.ts +740 -0
  32. package/tests/unit/vc/CredentialManager.helpers.test.ts +527 -0
  33. package/.turbo/turbo-build.log +0 -1
  34. package/dist/adapters/FeeOracleMock.d.ts +0 -6
  35. package/dist/adapters/FeeOracleMock.js +0 -8
  36. package/dist/adapters/index.d.ts +0 -4
  37. package/dist/adapters/index.js +0 -4
  38. package/dist/adapters/providers/OrdHttpProvider.d.ts +0 -56
  39. package/dist/adapters/providers/OrdHttpProvider.js +0 -110
  40. package/dist/adapters/providers/OrdMockProvider.d.ts +0 -70
  41. package/dist/adapters/providers/OrdMockProvider.js +0 -75
  42. package/dist/adapters/types.d.ts +0 -71
  43. package/dist/adapters/types.js +0 -1
  44. package/dist/bitcoin/BitcoinManager.d.ts +0 -15
  45. package/dist/bitcoin/BitcoinManager.js +0 -262
  46. package/dist/bitcoin/BroadcastClient.d.ts +0 -30
  47. package/dist/bitcoin/BroadcastClient.js +0 -35
  48. package/dist/bitcoin/OrdinalsClient.d.ts +0 -21
  49. package/dist/bitcoin/OrdinalsClient.js +0 -105
  50. package/dist/bitcoin/PSBTBuilder.d.ts +0 -24
  51. package/dist/bitcoin/PSBTBuilder.js +0 -80
  52. package/dist/bitcoin/fee-calculation.d.ts +0 -14
  53. package/dist/bitcoin/fee-calculation.js +0 -31
  54. package/dist/bitcoin/providers/OrdNodeProvider.d.ts +0 -38
  55. package/dist/bitcoin/providers/OrdNodeProvider.js +0 -67
  56. package/dist/bitcoin/providers/OrdinalsProvider.d.ts +0 -33
  57. package/dist/bitcoin/providers/OrdinalsProvider.js +0 -50
  58. package/dist/bitcoin/providers/types.d.ts +0 -63
  59. package/dist/bitcoin/providers/types.js +0 -1
  60. package/dist/bitcoin/transactions/commit.d.ts +0 -89
  61. package/dist/bitcoin/transactions/commit.js +0 -311
  62. package/dist/bitcoin/transactions/index.d.ts +0 -7
  63. package/dist/bitcoin/transactions/index.js +0 -8
  64. package/dist/bitcoin/transfer.d.ts +0 -9
  65. package/dist/bitcoin/transfer.js +0 -26
  66. package/dist/bitcoin/utxo-selection.d.ts +0 -78
  67. package/dist/bitcoin/utxo-selection.js +0 -237
  68. package/dist/bitcoin/utxo.d.ts +0 -26
  69. package/dist/bitcoin/utxo.js +0 -78
  70. package/dist/contexts/credentials-v1.json +0 -195
  71. package/dist/contexts/credentials-v2-examples.json +0 -5
  72. package/dist/contexts/credentials-v2.json +0 -301
  73. package/dist/contexts/credentials.json +0 -195
  74. package/dist/contexts/data-integrity-v2.json +0 -81
  75. package/dist/contexts/dids.json +0 -57
  76. package/dist/contexts/ed255192020.json +0 -93
  77. package/dist/contexts/ordinals-plus.json +0 -23
  78. package/dist/contexts/originals.json +0 -22
  79. package/dist/core/OriginalsSDK.d.ts +0 -158
  80. package/dist/core/OriginalsSDK.js +0 -274
  81. package/dist/crypto/Multikey.d.ts +0 -30
  82. package/dist/crypto/Multikey.js +0 -149
  83. package/dist/crypto/Signer.d.ts +0 -21
  84. package/dist/crypto/Signer.js +0 -196
  85. package/dist/crypto/noble-init.d.ts +0 -18
  86. package/dist/crypto/noble-init.js +0 -106
  87. package/dist/did/BtcoDidResolver.d.ts +0 -57
  88. package/dist/did/BtcoDidResolver.js +0 -166
  89. package/dist/did/DIDManager.d.ts +0 -101
  90. package/dist/did/DIDManager.js +0 -493
  91. package/dist/did/Ed25519Verifier.d.ts +0 -30
  92. package/dist/did/Ed25519Verifier.js +0 -59
  93. package/dist/did/KeyManager.d.ts +0 -17
  94. package/dist/did/KeyManager.js +0 -207
  95. package/dist/did/WebVHManager.d.ts +0 -100
  96. package/dist/did/WebVHManager.js +0 -304
  97. package/dist/did/createBtcoDidDocument.d.ts +0 -10
  98. package/dist/did/createBtcoDidDocument.js +0 -42
  99. package/dist/did/providers/OrdinalsClientProviderAdapter.d.ts +0 -23
  100. package/dist/did/providers/OrdinalsClientProviderAdapter.js +0 -51
  101. package/dist/events/EventEmitter.d.ts +0 -115
  102. package/dist/events/EventEmitter.js +0 -198
  103. package/dist/events/index.d.ts +0 -7
  104. package/dist/events/index.js +0 -6
  105. package/dist/events/types.d.ts +0 -286
  106. package/dist/events/types.js +0 -9
  107. package/dist/examples/basic-usage.d.ts +0 -3
  108. package/dist/examples/basic-usage.js +0 -62
  109. package/dist/examples/run.d.ts +0 -1
  110. package/dist/examples/run.js +0 -4
  111. package/dist/index.d.ts +0 -39
  112. package/dist/index.js +0 -47
  113. package/dist/lifecycle/BatchOperations.d.ts +0 -147
  114. package/dist/lifecycle/BatchOperations.js +0 -251
  115. package/dist/lifecycle/LifecycleManager.d.ts +0 -116
  116. package/dist/lifecycle/LifecycleManager.js +0 -971
  117. package/dist/lifecycle/OriginalsAsset.d.ts +0 -164
  118. package/dist/lifecycle/OriginalsAsset.js +0 -380
  119. package/dist/lifecycle/ProvenanceQuery.d.ts +0 -126
  120. package/dist/lifecycle/ProvenanceQuery.js +0 -220
  121. package/dist/lifecycle/ResourceVersioning.d.ts +0 -73
  122. package/dist/lifecycle/ResourceVersioning.js +0 -127
  123. package/dist/migration/MigrationManager.d.ts +0 -86
  124. package/dist/migration/MigrationManager.js +0 -412
  125. package/dist/migration/audit/AuditLogger.d.ts +0 -51
  126. package/dist/migration/audit/AuditLogger.js +0 -156
  127. package/dist/migration/checkpoint/CheckpointManager.d.ts +0 -31
  128. package/dist/migration/checkpoint/CheckpointManager.js +0 -96
  129. package/dist/migration/checkpoint/CheckpointStorage.d.ts +0 -26
  130. package/dist/migration/checkpoint/CheckpointStorage.js +0 -89
  131. package/dist/migration/index.d.ts +0 -22
  132. package/dist/migration/index.js +0 -27
  133. package/dist/migration/operations/BaseMigration.d.ts +0 -48
  134. package/dist/migration/operations/BaseMigration.js +0 -83
  135. package/dist/migration/operations/PeerToBtcoMigration.d.ts +0 -25
  136. package/dist/migration/operations/PeerToBtcoMigration.js +0 -67
  137. package/dist/migration/operations/PeerToWebvhMigration.d.ts +0 -19
  138. package/dist/migration/operations/PeerToWebvhMigration.js +0 -46
  139. package/dist/migration/operations/WebvhToBtcoMigration.d.ts +0 -25
  140. package/dist/migration/operations/WebvhToBtcoMigration.js +0 -67
  141. package/dist/migration/rollback/RollbackManager.d.ts +0 -29
  142. package/dist/migration/rollback/RollbackManager.js +0 -146
  143. package/dist/migration/state/StateMachine.d.ts +0 -25
  144. package/dist/migration/state/StateMachine.js +0 -76
  145. package/dist/migration/state/StateTracker.d.ts +0 -36
  146. package/dist/migration/state/StateTracker.js +0 -123
  147. package/dist/migration/types.d.ts +0 -306
  148. package/dist/migration/types.js +0 -33
  149. package/dist/migration/validation/BitcoinValidator.d.ts +0 -13
  150. package/dist/migration/validation/BitcoinValidator.js +0 -83
  151. package/dist/migration/validation/CredentialValidator.d.ts +0 -13
  152. package/dist/migration/validation/CredentialValidator.js +0 -46
  153. package/dist/migration/validation/DIDCompatibilityValidator.d.ts +0 -16
  154. package/dist/migration/validation/DIDCompatibilityValidator.js +0 -127
  155. package/dist/migration/validation/LifecycleValidator.d.ts +0 -10
  156. package/dist/migration/validation/LifecycleValidator.js +0 -52
  157. package/dist/migration/validation/StorageValidator.d.ts +0 -10
  158. package/dist/migration/validation/StorageValidator.js +0 -65
  159. package/dist/migration/validation/ValidationPipeline.d.ts +0 -29
  160. package/dist/migration/validation/ValidationPipeline.js +0 -180
  161. package/dist/storage/LocalStorageAdapter.d.ts +0 -11
  162. package/dist/storage/LocalStorageAdapter.js +0 -53
  163. package/dist/storage/MemoryStorageAdapter.d.ts +0 -6
  164. package/dist/storage/MemoryStorageAdapter.js +0 -21
  165. package/dist/storage/StorageAdapter.d.ts +0 -16
  166. package/dist/storage/StorageAdapter.js +0 -1
  167. package/dist/storage/index.d.ts +0 -2
  168. package/dist/storage/index.js +0 -2
  169. package/dist/types/bitcoin.d.ts +0 -84
  170. package/dist/types/bitcoin.js +0 -1
  171. package/dist/types/common.d.ts +0 -82
  172. package/dist/types/common.js +0 -1
  173. package/dist/types/credentials.d.ts +0 -75
  174. package/dist/types/credentials.js +0 -1
  175. package/dist/types/did.d.ts +0 -26
  176. package/dist/types/did.js +0 -1
  177. package/dist/types/index.d.ts +0 -5
  178. package/dist/types/index.js +0 -5
  179. package/dist/types/network.d.ts +0 -78
  180. package/dist/types/network.js +0 -145
  181. package/dist/utils/EventLogger.d.ts +0 -71
  182. package/dist/utils/EventLogger.js +0 -232
  183. package/dist/utils/Logger.d.ts +0 -106
  184. package/dist/utils/Logger.js +0 -257
  185. package/dist/utils/MetricsCollector.d.ts +0 -110
  186. package/dist/utils/MetricsCollector.js +0 -264
  187. package/dist/utils/bitcoin-address.d.ts +0 -38
  188. package/dist/utils/bitcoin-address.js +0 -113
  189. package/dist/utils/cbor.d.ts +0 -2
  190. package/dist/utils/cbor.js +0 -9
  191. package/dist/utils/encoding.d.ts +0 -37
  192. package/dist/utils/encoding.js +0 -120
  193. package/dist/utils/hash.d.ts +0 -1
  194. package/dist/utils/hash.js +0 -5
  195. package/dist/utils/retry.d.ts +0 -10
  196. package/dist/utils/retry.js +0 -35
  197. package/dist/utils/satoshi-validation.d.ts +0 -60
  198. package/dist/utils/satoshi-validation.js +0 -156
  199. package/dist/utils/serialization.d.ts +0 -14
  200. package/dist/utils/serialization.js +0 -76
  201. package/dist/utils/telemetry.d.ts +0 -17
  202. package/dist/utils/telemetry.js +0 -24
  203. package/dist/utils/validation.d.ts +0 -5
  204. package/dist/utils/validation.js +0 -98
  205. package/dist/vc/CredentialManager.d.ts +0 -22
  206. package/dist/vc/CredentialManager.js +0 -227
  207. package/dist/vc/Issuer.d.ts +0 -27
  208. package/dist/vc/Issuer.js +0 -70
  209. package/dist/vc/Verifier.d.ts +0 -16
  210. package/dist/vc/Verifier.js +0 -50
  211. package/dist/vc/cryptosuites/bbs.d.ts +0 -44
  212. package/dist/vc/cryptosuites/bbs.js +0 -213
  213. package/dist/vc/cryptosuites/bbsSimple.d.ts +0 -9
  214. package/dist/vc/cryptosuites/bbsSimple.js +0 -12
  215. package/dist/vc/cryptosuites/eddsa.d.ts +0 -30
  216. package/dist/vc/cryptosuites/eddsa.js +0 -81
  217. package/dist/vc/documentLoader.d.ts +0 -16
  218. package/dist/vc/documentLoader.js +0 -59
  219. package/dist/vc/proofs/data-integrity.d.ts +0 -21
  220. package/dist/vc/proofs/data-integrity.js +0 -15
  221. package/dist/vc/utils/jsonld.d.ts +0 -2
  222. package/dist/vc/utils/jsonld.js +0 -15
  223. package/test/logs/did_webvh_QmNTn9Kkp8dQ75WrF9xqJ2kuDp9QhKc3aPiERRMj8XoTBN_example_com.jsonl +0 -1
  224. package/test/logs/did_webvh_QmNu4MNr8Lr5txx5gYNhuhZDchXsZEu3hJXKYuphpWTPDp_example_com_users_etc_passwd.jsonl +0 -1
  225. package/test/logs/did_webvh_QmR9MrGZACzjKETA8SBRNCKG11HxU85c4bVR2qN5eDCfsD_example_com.jsonl +0 -1
  226. package/test/logs/did_webvh_QmUc5suaqRM2P4nrXxZwqYMfqzhdMqjuL7oJaJbEpCQVCd_example_com_users_etc_passwd.jsonl +0 -1
  227. package/test/logs/did_webvh_QmUkiB2RCV2VZ1RTXsCebWN25Eiy9TLvpzDWAJNjhgvB4X_example_com_etc_passwd.jsonl +0 -1
  228. package/test/logs/did_webvh_QmUoRTe8UMwpAQXZSAW7pjAgZK1tq2X3C6Kfxq3UXGcaGy_example_com_secret.jsonl +0 -1
  229. package/test/logs/did_webvh_QmWWot3chx1t6KwTmcE5i2FeDZ5JMkQw3qXycsKDVmJ9Be_example_com_users_alice.jsonl +0 -1
  230. package/test/logs/did_webvh_QmWvVgALL5kjZdpgR7KZay7J8UiiUr834kkRmWeFAxjAuC_example_com_users_etc_passwd.jsonl +0 -1
  231. package/test/logs/did_webvh_QmWwaRQHUZAFcKihFC6xR6tRTTrQhHPTku6azf1egWbpy1_example_com_users_alice.jsonl +0 -1
  232. package/test/logs/did_webvh_QmXJLtkz23r7AozbtXsZMKWnVU6rd38CkVtjdWuATU3Yp6_example_com_users_alice123_profile.jsonl +0 -1
  233. package/test/logs/did_webvh_QmYsce448po14oDE1wXbyaP6wY9HQgHSKLwdezn1k577SF_example_com_my_org_user_name_test_123.jsonl +0 -1
  234. package/test/logs/did_webvh_QmZBeNzzqajxdfwcDUPZ4P8C5YSXyRztrAwmPiKuKUxmAK_example_com.jsonl +0 -1
  235. package/test/logs/did_webvh_QmZhJsqxizwVbRtqCUkmE6XQunSxtxMt3gbTYadVBNAaEq_example_com.jsonl +0 -1
  236. package/test/logs/did_webvh_QmZk7NHU2D57RzzbMq4tWW9gBa9AqtVTWfiRM6RFdwGVj2_example_com.jsonl +0 -1
  237. package/test/logs/did_webvh_QmZshSXp9w8ovH62zGGBS1b5pGGPsuYiu1VQ935sga2hWF_example_com_level1_level2.jsonl +0 -1
  238. package/test/logs/did_webvh_QmbWAmw7HQL7vKJyCsctZihXf1rmT4sGvggKCPKWcUWjw1_example_com.jsonl +0 -1
  239. package/test/logs/did_webvh_QmbdLUMbYs3juR39TLB6hhrFWLcNg45ybUzeBJCS1MhCh1_example_com_C_Windows_System32.jsonl +0 -1
  240. package/test/logs/did_webvh_QmcaQ1Ma4gkSbae85aCm8Mv4rvdT2Sb2RR3JzYwrm5XBq8_example_com_etc_passwd.jsonl +0 -1
  241. package/test/logs/did_webvh_QmcbA7WQhsBqZSoDpKJHjV8Q5o53h8vmgJhQfo6rqTY5ho_example_com.jsonl +0 -1
  242. package/test/logs/did_webvh_Qmdy8uWr2gkUJrXsThynAug3DASTWwb3onEj89LKmMGZYB_example_com.jsonl +0 -1
  243. package/tests/e2e/README.md +0 -97
  244. package/tests/e2e/example.spec.ts +0 -78
@@ -1,195 +0,0 @@
1
- {
2
- "@context": {
3
- "@version": 1.1,
4
- "@protected": true,
5
- "id": "@id",
6
- "type": "@type",
7
- "VerifiableCredential": {
8
- "@id": "https://www.w3.org/2018/credentials#VerifiableCredential",
9
- "@context": {
10
- "@version": 1.1,
11
- "@protected": true,
12
- "id": "@id",
13
- "type": "@type",
14
- "cred": "https://www.w3.org/2018/credentials#",
15
- "sec": "https://w3id.org/security#",
16
- "xsd": "http://www.w3.org/2001/XMLSchema#",
17
- "credentialSchema": {
18
- "@id": "cred:credentialSchema",
19
- "@type": "@id",
20
- "@context": {
21
- "@version": 1.1,
22
- "@protected": true,
23
- "id": "@id",
24
- "type": "@type",
25
- "cred": "https://www.w3.org/2018/credentials#",
26
- "JsonSchemaValidator2018": "cred:JsonSchemaValidator2018"
27
- }
28
- },
29
- "credentialStatus": { "@id": "cred:credentialStatus", "@type": "@id" },
30
- "credentialSubject": { "@id": "cred:credentialSubject", "@type": "@id" },
31
- "evidence": { "@id": "cred:evidence", "@type": "@id" },
32
- "expirationDate": { "@id": "cred:expirationDate", "@type": "xsd:dateTime" },
33
- "holder": { "@id": "cred:holder", "@type": "@id" },
34
- "issued": { "@id": "cred:issued", "@type": "xsd:dateTime" },
35
- "issuer": { "@id": "cred:issuer", "@type": "@id" },
36
- "issuanceDate": { "@id": "cred:issuanceDate", "@type": "xsd:dateTime" },
37
- "proof": { "@id": "sec:proof", "@type": "@id", "@container": "@graph" },
38
- "refreshService": {
39
- "@id": "cred:refreshService",
40
- "@type": "@id",
41
- "@context": {
42
- "@version": 1.1,
43
- "@protected": true,
44
- "id": "@id",
45
- "type": "@type",
46
- "cred": "https://www.w3.org/2018/credentials#",
47
- "ManualRefreshService2018": "cred:ManualRefreshService2018"
48
- }
49
- },
50
- "termsOfUse": { "@id": "cred:termsOfUse", "@type": "@id" },
51
- "validFrom": { "@id": "cred:validFrom", "@type": "xsd:dateTime" },
52
- "validUntil": { "@id": "cred:validUntil", "@type": "xsd:dateTime" }
53
- }
54
- },
55
- "VerifiablePresentation": {
56
- "@id": "https://www.w3.org/2018/credentials#VerifiablePresentation",
57
- "@context": {
58
- "@version": 1.1,
59
- "@protected": true,
60
- "id": "@id",
61
- "type": "@type",
62
- "cred": "https://www.w3.org/2018/credentials#",
63
- "sec": "https://w3id.org/security#",
64
- "holder": { "@id": "cred:holder", "@type": "@id" },
65
- "proof": { "@id": "sec:proof", "@type": "@id", "@container": "@graph" },
66
- "verifiableCredential": { "@id": "cred:verifiableCredential", "@type": "@id", "@container": "@graph" }
67
- }
68
- },
69
- "EcdsaSecp256k1Signature2019": {
70
- "@id": "https://w3id.org/security#EcdsaSecp256k1Signature2019",
71
- "@context": {
72
- "@version": 1.1,
73
- "@protected": true,
74
- "id": "@id",
75
- "type": "@type",
76
- "sec": "https://w3id.org/security#",
77
- "xsd": "http://www.w3.org/2001/XMLSchema#",
78
- "challenge": "sec:challenge",
79
- "created": { "@id": "http://purl.org/dc/terms/created", "@type": "xsd:dateTime" },
80
- "domain": "sec:domain",
81
- "expires": { "@id": "sec:expiration", "@type": "xsd:dateTime" },
82
- "jws": "sec:jws",
83
- "nonce": "sec:nonce",
84
- "proofPurpose": {
85
- "@id": "sec:proofPurpose",
86
- "@type": "@vocab",
87
- "@context": {
88
- "@version": 1.1,
89
- "@protected": true,
90
- "id": "@id",
91
- "type": "@type",
92
- "sec": "https://w3id.org/security#",
93
- "assertionMethod": { "@id": "sec:assertionMethod", "@type": "@id", "@container": "@set" },
94
- "authentication": { "@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set" }
95
- }
96
- },
97
- "proofValue": "sec:proofValue",
98
- "verificationMethod": { "@id": "sec:verificationMethod", "@type": "@id" }
99
- }
100
- },
101
- "EcdsaSecp256r1Signature2019": {
102
- "@id": "https://w3id.org/security#EcdsaSecp256r1Signature2019",
103
- "@context": {
104
- "@version": 1.1,
105
- "@protected": true,
106
- "id": "@id",
107
- "type": "@type",
108
- "sec": "https://w3id.org/security#",
109
- "xsd": "http://www.w3.org/2001/XMLSchema#",
110
- "challenge": "sec:challenge",
111
- "created": { "@id": "http://purl.org/dc/terms/created", "@type": "xsd:dateTime" },
112
- "domain": "sec:domain",
113
- "expires": { "@id": "sec:expiration", "@type": "xsd:dateTime" },
114
- "jws": "sec:jws",
115
- "nonce": "sec:nonce",
116
- "proofPurpose": {
117
- "@id": "sec:proofPurpose",
118
- "@type": "@vocab",
119
- "@context": {
120
- "@version": 1.1,
121
- "@protected": true,
122
- "id": "@id",
123
- "type": "@type",
124
- "sec": "https://w3id.org/security#",
125
- "assertionMethod": { "@id": "sec:assertionMethod", "@type": "@id", "@container": "@set" },
126
- "authentication": { "@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set" }
127
- }
128
- },
129
- "proofValue": "sec:proofValue",
130
- "verificationMethod": { "@id": "sec:verificationMethod", "@type": "@id" }
131
- }
132
- },
133
- "Ed25519Signature2018": {
134
- "@id": "https://w3id.org/security#Ed25519Signature2018",
135
- "@context": {
136
- "@version": 1.1,
137
- "@protected": true,
138
- "id": "@id",
139
- "type": "@type",
140
- "sec": "https://w3id.org/security#",
141
- "xsd": "http://www.w3.org/2001/XMLSchema#",
142
- "challenge": "sec:challenge",
143
- "created": { "@id": "http://purl.org/dc/terms/created", "@type": "xsd:dateTime" },
144
- "domain": "sec:domain",
145
- "expires": { "@id": "sec:expiration", "@type": "xsd:dateTime" },
146
- "jws": "sec:jws",
147
- "nonce": "sec:nonce",
148
- "proofPurpose": {
149
- "@id": "sec:proofPurpose",
150
- "@type": "@vocab",
151
- "@context": {
152
- "@version": 1.1,
153
- "@protected": true,
154
- "id": "@id",
155
- "type": "@type",
156
- "sec": "https://w3id.org/security#",
157
- "assertionMethod": { "@id": "sec:assertionMethod", "@type": "@id", "@container": "@set" },
158
- "authentication": { "@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set" }
159
- }
160
- },
161
- "proofValue": "sec:proofValue",
162
- "verificationMethod": { "@id": "sec:verificationMethod", "@type": "@id" }
163
- }
164
- },
165
- "RsaSignature2018": {
166
- "@id": "https://w3id.org/security#RsaSignature2018",
167
- "@context": {
168
- "@version": 1.1,
169
- "@protected": true,
170
- "challenge": "sec:challenge",
171
- "created": { "@id": "http://purl.org/dc/terms/created", "@type": "xsd:dateTime" },
172
- "domain": "sec:domain",
173
- "expires": { "@id": "sec:expiration", "@type": "xsd:dateTime" },
174
- "jws": "sec:jws",
175
- "nonce": "sec:nonce",
176
- "proofPurpose": {
177
- "@id": "sec:proofPurpose",
178
- "@type": "@vocab",
179
- "@context": {
180
- "@version": 1.1,
181
- "@protected": true,
182
- "id": "@id",
183
- "type": "@type",
184
- "sec": "https://w3id.org/security#",
185
- "assertionMethod": { "@id": "sec:assertionMethod", "@type": "@id", "@container": "@set" },
186
- "authentication": { "@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set" }
187
- }
188
- },
189
- "proofValue": "sec:proofValue",
190
- "verificationMethod": { "@id": "sec:verificationMethod", "@type": "@id" }
191
- }
192
- },
193
- "proof": { "@id": "https://w3id.org/security#proof", "@type": "@id", "@container": "@graph" }
194
- }
195
- }
@@ -1,81 +0,0 @@
1
- {
2
- "@context": {
3
- "id": "@id",
4
- "type": "@type",
5
- "@protected": true,
6
- "proof": {
7
- "@id": "https://w3id.org/security#proof",
8
- "@type": "@id",
9
- "@container": "@graph"
10
- },
11
- "DataIntegrityProof": {
12
- "@id": "https://w3id.org/security#DataIntegrityProof",
13
- "@context": {
14
- "@protected": true,
15
- "id": "@id",
16
- "type": "@type",
17
- "challenge": "https://w3id.org/security#challenge",
18
- "created": {
19
- "@id": "http://purl.org/dc/terms/created",
20
- "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
21
- },
22
- "domain": "https://w3id.org/security#domain",
23
- "expires": {
24
- "@id": "https://w3id.org/security#expiration",
25
- "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
26
- },
27
- "nonce": "https://w3id.org/security#nonce",
28
- "previousProof": {
29
- "@id": "https://w3id.org/security#previousProof",
30
- "@type": "@id"
31
- },
32
- "proofPurpose": {
33
- "@id": "https://w3id.org/security#proofPurpose",
34
- "@type": "@vocab",
35
- "@context": {
36
- "@protected": true,
37
- "id": "@id",
38
- "type": "@type",
39
- "assertionMethod": {
40
- "@id": "https://w3id.org/security#assertionMethod",
41
- "@type": "@id",
42
- "@container": "@set"
43
- },
44
- "authentication": {
45
- "@id": "https://w3id.org/security#authenticationMethod",
46
- "@type": "@id",
47
- "@container": "@set"
48
- },
49
- "capabilityInvocation": {
50
- "@id": "https://w3id.org/security#capabilityInvocationMethod",
51
- "@type": "@id",
52
- "@container": "@set"
53
- },
54
- "capabilityDelegation": {
55
- "@id": "https://w3id.org/security#capabilityDelegationMethod",
56
- "@type": "@id",
57
- "@container": "@set"
58
- },
59
- "keyAgreement": {
60
- "@id": "https://w3id.org/security#keyAgreementMethod",
61
- "@type": "@id",
62
- "@container": "@set"
63
- }
64
- }
65
- },
66
- "cryptosuite": {
67
- "@id": "https://w3id.org/security#cryptosuite",
68
- "@type": "https://w3id.org/security#cryptosuiteString"
69
- },
70
- "proofValue": {
71
- "@id": "https://w3id.org/security#proofValue",
72
- "@type": "https://w3id.org/security#multibase"
73
- },
74
- "verificationMethod": {
75
- "@id": "https://w3id.org/security#verificationMethod",
76
- "@type": "@id"
77
- }
78
- }
79
- }
80
- }
81
- }
@@ -1,57 +0,0 @@
1
- {
2
- "@context": {
3
- "@protected": true,
4
- "id": "@id",
5
- "type": "@type",
6
- "alsoKnownAs": {
7
- "@id": "https://www.w3.org/ns/activitystreams#alsoKnownAs",
8
- "@type": "@id"
9
- },
10
- "assertionMethod": {
11
- "@id": "https://w3id.org/security#assertionMethod",
12
- "@type": "@id",
13
- "@container": "@set"
14
- },
15
- "authentication": {
16
- "@id": "https://w3id.org/security#authenticationMethod",
17
- "@type": "@id",
18
- "@container": "@set"
19
- },
20
- "capabilityDelegation": {
21
- "@id": "https://w3id.org/security#capabilityDelegationMethod",
22
- "@type": "@id",
23
- "@container": "@set"
24
- },
25
- "capabilityInvocation": {
26
- "@id": "https://w3id.org/security#capabilityInvocationMethod",
27
- "@type": "@id",
28
- "@container": "@set"
29
- },
30
- "controller": {
31
- "@id": "https://w3id.org/security#controller",
32
- "@type": "@id"
33
- },
34
- "keyAgreement": {
35
- "@id": "https://w3id.org/security#keyAgreementMethod",
36
- "@type": "@id",
37
- "@container": "@set"
38
- },
39
- "service": {
40
- "@id": "https://www.w3.org/ns/did#service",
41
- "@type": "@id",
42
- "@context": {
43
- "@protected": true,
44
- "id": "@id",
45
- "type": "@type",
46
- "serviceEndpoint": {
47
- "@id": "https://www.w3.org/ns/did#serviceEndpoint",
48
- "@type": "@id"
49
- }
50
- }
51
- },
52
- "verificationMethod": {
53
- "@id": "https://w3id.org/security#verificationMethod",
54
- "@type": "@id"
55
- }
56
- }
57
- }
@@ -1,93 +0,0 @@
1
- {
2
- "@context": {
3
- "id": "@id",
4
- "type": "@type",
5
- "@protected": true,
6
- "proof": {
7
- "@id": "https://w3id.org/security#proof",
8
- "@type": "@id",
9
- "@container": "@graph"
10
- },
11
- "Ed25519VerificationKey2020": {
12
- "@id": "https://w3id.org/security#Ed25519VerificationKey2020",
13
- "@context": {
14
- "@protected": true,
15
- "id": "@id",
16
- "type": "@type",
17
- "controller": {
18
- "@id": "https://w3id.org/security#controller",
19
- "@type": "@id"
20
- },
21
- "revoked": {
22
- "@id": "https://w3id.org/security#revoked",
23
- "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
24
- },
25
- "publicKeyMultibase": {
26
- "@id": "https://w3id.org/security#publicKeyMultibase",
27
- "@type": "https://w3id.org/security#multibase"
28
- }
29
- }
30
- },
31
- "Ed25519Signature2020": {
32
- "@id": "https://w3id.org/security#Ed25519Signature2020",
33
- "@context": {
34
- "@protected": true,
35
- "id": "@id",
36
- "type": "@type",
37
- "challenge": "https://w3id.org/security#challenge",
38
- "created": {
39
- "@id": "http://purl.org/dc/terms/created",
40
- "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
41
- },
42
- "domain": "https://w3id.org/security#domain",
43
- "expires": {
44
- "@id": "https://w3id.org/security#expiration",
45
- "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
46
- },
47
- "nonce": "https://w3id.org/security#nonce",
48
- "proofPurpose": {
49
- "@id": "https://w3id.org/security#proofPurpose",
50
- "@type": "@vocab",
51
- "@context": {
52
- "@protected": true,
53
- "id": "@id",
54
- "type": "@type",
55
- "assertionMethod": {
56
- "@id": "https://w3id.org/security#assertionMethod",
57
- "@type": "@id",
58
- "@container": "@set"
59
- },
60
- "authentication": {
61
- "@id": "https://w3id.org/security#authenticationMethod",
62
- "@type": "@id",
63
- "@container": "@set"
64
- },
65
- "capabilityInvocation": {
66
- "@id": "https://w3id.org/security#capabilityInvocationMethod",
67
- "@type": "@id",
68
- "@container": "@set"
69
- },
70
- "capabilityDelegation": {
71
- "@id": "https://w3id.org/security#capabilityDelegationMethod",
72
- "@type": "@id",
73
- "@container": "@set"
74
- },
75
- "keyAgreement": {
76
- "@id": "https://w3id.org/security#keyAgreementMethod",
77
- "@type": "@id",
78
- "@container": "@set"
79
- }
80
- }
81
- },
82
- "proofValue": {
83
- "@id": "https://w3id.org/security#proofValue",
84
- "@type": "https://w3id.org/security#multibase"
85
- },
86
- "verificationMethod": {
87
- "@id": "https://w3id.org/security#verificationMethod",
88
- "@type": "@id"
89
- }
90
- }
91
- }
92
- }
93
- }
@@ -1,23 +0,0 @@
1
- {
2
- "@context": {
3
- "@version": 1.1,
4
- "id": "@id",
5
- "type": "@type",
6
- "VerifiableCollectible": "https://ordinals.plus/vocab/v1#VerifiableCollectible",
7
- "VerifiableCollectibleCredential": "https://ordinals.plus/vocab/v1#VerifiableCollectibleCredential",
8
- "VerifiableCollectibleTrait": "https://ordinals.plus/vocab/v1#VerifiableCollectibleTrait",
9
- "VerifiableCollectibleTraitCredential": "https://ordinals.plus/vocab/v1#VerifiableCollectibleTraitCredential",
10
- "CuratedCollection": "https://ordinals.plus/vocab/v1#CuratedCollection",
11
- "CuratedCollectionCredential": "https://ordinals.plus/vocab/v1#CuratedCollectionCredential",
12
- "attributes": {
13
- "@id": "https://ordinals.plus/vocab/v1#attributes",
14
- "@container": "@set"
15
- },
16
- "items": {
17
- "@id": "https://ordinals.plus/vocab/v1#items",
18
- "@container": "@set"
19
- },
20
- "traitType": "https://ordinals.plus/vocab/v1#traitType",
21
- "value": "https://ordinals.plus/vocab/v1#traitValue"
22
- }
23
- }
@@ -1,22 +0,0 @@
1
- {
2
- "@context": {
3
- "@version": 1.1,
4
- "type": "@type",
5
- "id": "@id",
6
- "Originals": "https://originals.build",
7
- "OriginalsBundle": "Originals:OriginalsBundle",
8
- "ResourceCreated": "Originals:ResourceCreated",
9
- "ResourceUpdated": "Originals:ResourceUpdated",
10
- "ResourceMigrated": "Originals:ResourceMigrated",
11
- "attributes": {
12
- "@id": "Originals:attributes",
13
- "@container": "@set"
14
- },
15
- "resources": "Originals:resources",
16
- "verifiableCredentials": "Originals:verifiableCredentials",
17
- "content": "Originals:content",
18
- "trait_type": "Originals:trait_type",
19
- "display_type": "Originals:display_type",
20
- "value": "Originals:value"
21
- }
22
- }
@@ -1,158 +0,0 @@
1
- import { DIDManager } from '../did/DIDManager';
2
- import { CredentialManager } from '../vc/CredentialManager';
3
- import { LifecycleManager } from '../lifecycle/LifecycleManager';
4
- import { BitcoinManager } from '../bitcoin/BitcoinManager';
5
- import { OriginalsConfig, KeyStore, ExternalSigner, ExternalVerifier } from '../types';
6
- import { DIDDocument, VerificationMethod, ServiceEndpoint } from '../types/did';
7
- import { Logger } from '../utils/Logger';
8
- import { MetricsCollector } from '../utils/MetricsCollector';
9
- interface DIDLogEntry {
10
- versionId: string;
11
- versionTime: string;
12
- parameters: Record<string, unknown>;
13
- state: Record<string, unknown>;
14
- proof?: Record<string, unknown>[];
15
- }
16
- type DIDLog = DIDLogEntry[];
17
- interface DIDResolutionMeta {
18
- versionId: string;
19
- created: string;
20
- updated: string;
21
- previousLogEntryHash?: string;
22
- updateKeys: string[];
23
- scid: string;
24
- prerotation: boolean;
25
- portable: boolean;
26
- nextKeyHashes: string[];
27
- deactivated: boolean;
28
- witness?: unknown;
29
- watchers?: string[] | null;
30
- error?: string;
31
- problemDetails?: unknown;
32
- latestVersionId?: string;
33
- }
34
- export interface OriginalResult {
35
- did: string;
36
- doc: DIDDocument;
37
- log: DIDLog;
38
- meta: DIDResolutionMeta;
39
- }
40
- export interface CreateDIDOriginalOptions {
41
- type: 'did';
42
- domain: string;
43
- signer: ExternalSigner;
44
- verifier?: ExternalVerifier;
45
- updateKeys: string[];
46
- verificationMethods: VerificationMethod[];
47
- paths?: string[];
48
- controller?: string;
49
- context?: string | string[] | object | object[];
50
- alsoKnownAs?: string[];
51
- portable?: boolean;
52
- nextKeyHashes?: string[];
53
- authentication?: string[];
54
- assertionMethod?: string[];
55
- keyAgreement?: string[];
56
- services?: ServiceEndpoint[];
57
- }
58
- export interface UpdateDIDOriginalOptions {
59
- type: 'did';
60
- log: DIDLog;
61
- signer: ExternalSigner;
62
- verifier?: ExternalVerifier;
63
- updateKeys?: string[];
64
- verificationMethods?: VerificationMethod[];
65
- services?: ServiceEndpoint[];
66
- controller?: string;
67
- context?: string | string[] | object | object[];
68
- alsoKnownAs?: string[];
69
- portable?: boolean;
70
- nextKeyHashes?: string[];
71
- authentication?: string[];
72
- assertionMethod?: string[];
73
- keyAgreement?: string[];
74
- domain?: string;
75
- }
76
- export type CreateOriginalOptions = CreateDIDOriginalOptions;
77
- export type UpdateOriginalOptions = UpdateDIDOriginalOptions;
78
- export interface OriginalsSDKOptions extends Partial<OriginalsConfig> {
79
- keyStore?: KeyStore;
80
- }
81
- export declare class OriginalsSDK {
82
- readonly did: DIDManager;
83
- readonly credentials: CredentialManager;
84
- readonly lifecycle: LifecycleManager;
85
- readonly bitcoin: BitcoinManager;
86
- readonly logger: Logger;
87
- readonly metrics: MetricsCollector;
88
- private eventLogger;
89
- private config;
90
- constructor(config: OriginalsConfig, keyStore?: KeyStore);
91
- /**
92
- * Set up event logging integration
93
- */
94
- private setupEventLogging;
95
- /**
96
- * Validates that the SDK is properly configured for Bitcoin operations.
97
- * Throws a StructuredError if ordinalsProvider is not configured.
98
- *
99
- * @throws {StructuredError} When ordinalsProvider is not configured
100
- */
101
- validateBitcoinConfig(): void;
102
- static create(options?: OriginalsSDKOptions): OriginalsSDK;
103
- /**
104
- * Prepare data for signing using didwebvh-ts's canonical approach
105
- * This is a public static helper method that wraps didwebvh-ts's prepareDataForSigning
106
- * to ensure didwebvh-ts is only imported within the SDK
107
- */
108
- static prepareDIDDataForSigning(document: Record<string, unknown>, proof: Record<string, unknown>): Promise<Uint8Array>;
109
- /**
110
- * Verify a DID signature using Ed25519
111
- * This is a public static helper method that provides browser-compatible Ed25519 verification
112
- * Works with Uint8Array inputs (no Buffer required)
113
- *
114
- * @param signature - The signature bytes (Uint8Array)
115
- * @param message - The message bytes that were signed (Uint8Array)
116
- * @param publicKey - The public key bytes (Uint8Array, should be 32 bytes for Ed25519)
117
- * @returns True if the signature is valid
118
- */
119
- static verifyDIDSignature(signature: Uint8Array, message: Uint8Array, publicKey: Uint8Array): Promise<boolean>;
120
- /**
121
- * Create a new Original
122
- * This is a convenience proxy that routes to the appropriate specialized creation method.
123
- * Currently proxies to createDIDOriginal(), but can be extended for other Original types.
124
- *
125
- * @param options - Creation options (discriminated union by type)
126
- * @returns Created DID, document, log, and metadata
127
- */
128
- static createOriginal(options: CreateOriginalOptions): Promise<OriginalResult>;
129
- /**
130
- * Create a new DID-based Original (DID document/log)
131
- * This wraps didwebvh-ts's createDID function to ensure didwebvh-ts is only imported within the SDK.
132
- *
133
- * A DID-based Original represents a decentralized identity that can be used as the foundation
134
- * for other Originals (e.g., asset Originals, credential Originals, etc.).
135
- *
136
- * @param options - Creation options matching didwebvh-ts createDID interface
137
- * @returns Created DID, document, log, and metadata
138
- */
139
- static createDIDOriginal(options: CreateDIDOriginalOptions): Promise<OriginalResult>;
140
- /**
141
- * Update an existing Original
142
- * This is a convenience proxy that routes to the appropriate specialized update method.
143
- * Currently proxies to updateDIDOriginal(), but can be extended for other Original types.
144
- *
145
- * @param options - Update options (discriminated union by type)
146
- * @returns Updated DID, document, log, and metadata
147
- */
148
- static updateOriginal(options: UpdateOriginalOptions): Promise<OriginalResult>;
149
- /**
150
- * Update an existing DID-based Original (DID document/log)
151
- * This wraps didwebvh-ts's updateDID function to ensure didwebvh-ts is only imported within the SDK.
152
- *
153
- * @param options - Update options matching didwebvh-ts updateDID interface
154
- * @returns Updated DID, document, log, and metadata
155
- */
156
- static updateDIDOriginal(options: UpdateDIDOriginalOptions): Promise<OriginalResult>;
157
- }
158
- export {};