@did-btcr2/method 0.18.0 → 0.19.0

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 (262) hide show
  1. package/dist/browser.js +5240 -6079
  2. package/dist/browser.mjs +5240 -6079
  3. package/dist/cjs/core/beacon/aggregation/cohort/index.js +3 -3
  4. package/dist/cjs/core/beacon/aggregation/cohort/index.js.map +1 -1
  5. package/dist/cjs/core/beacon/aggregation/cohort/messages/base.js +1 -9
  6. package/dist/cjs/core/beacon/aggregation/cohort/messages/base.js.map +1 -1
  7. package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/cohort-advert.js +2 -1
  8. package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/cohort-advert.js.map +1 -1
  9. package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/cohort-ready.js +2 -1
  10. package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/cohort-ready.js.map +1 -1
  11. package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/opt-in-accept.js +2 -1
  12. package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/opt-in-accept.js.map +1 -1
  13. package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/opt-in.js +2 -1
  14. package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/opt-in.js.map +1 -1
  15. package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/subscribe.js +2 -1
  16. package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/subscribe.js.map +1 -1
  17. package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/aggregated-nonce.js +2 -1
  18. package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/aggregated-nonce.js.map +1 -1
  19. package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/authorization-request.js +2 -1
  20. package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/authorization-request.js.map +1 -1
  21. package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/nonce-contribution.js +2 -1
  22. package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/nonce-contribution.js.map +1 -1
  23. package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/request-signature.js +2 -1
  24. package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/request-signature.js.map +1 -1
  25. package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/signature-authorization.js +2 -1
  26. package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/signature-authorization.js.map +1 -1
  27. package/dist/cjs/core/beacon/aggregation/communication/adapter/nostr.js +36 -18
  28. package/dist/cjs/core/beacon/aggregation/communication/adapter/nostr.js.map +1 -1
  29. package/dist/cjs/core/beacon/aggregation/coordinator.js +14 -14
  30. package/dist/cjs/core/beacon/aggregation/coordinator.js.map +1 -1
  31. package/dist/cjs/core/beacon/aggregation/participant.js +4 -3
  32. package/dist/cjs/core/beacon/aggregation/participant.js.map +1 -1
  33. package/dist/cjs/core/beacon/aggregation/session/index.js +1 -1
  34. package/dist/cjs/core/beacon/aggregation/session/index.js.map +1 -1
  35. package/dist/cjs/core/beacon/cas-beacon.js +55 -0
  36. package/dist/cjs/core/beacon/cas-beacon.js.map +1 -0
  37. package/dist/cjs/core/beacon/factory.js +11 -10
  38. package/dist/cjs/core/beacon/factory.js.map +1 -1
  39. package/dist/cjs/core/beacon/interfaces.js +32 -0
  40. package/dist/cjs/core/beacon/interfaces.js.map +1 -0
  41. package/dist/cjs/core/beacon/singleton.js +59 -135
  42. package/dist/cjs/core/beacon/singleton.js.map +1 -1
  43. package/dist/cjs/core/beacon/smt-beacon.js +56 -0
  44. package/dist/cjs/core/beacon/smt-beacon.js.map +1 -0
  45. package/dist/cjs/core/beacon/utils.js +67 -105
  46. package/dist/cjs/core/beacon/utils.js.map +1 -1
  47. package/dist/cjs/core/identifier.js +18 -21
  48. package/dist/cjs/core/identifier.js.map +1 -1
  49. package/dist/cjs/core/interfaces.js +2 -0
  50. package/dist/cjs/core/interfaces.js.map +1 -0
  51. package/dist/cjs/core/resolve.js +511 -0
  52. package/dist/cjs/core/resolve.js.map +1 -0
  53. package/dist/cjs/{utils → core}/types.js.map +1 -1
  54. package/dist/cjs/core/{crud/update.js → update.js} +62 -52
  55. package/dist/cjs/core/update.js.map +1 -0
  56. package/dist/cjs/did-btcr2.js +109 -75
  57. package/dist/cjs/did-btcr2.js.map +1 -1
  58. package/dist/cjs/index.js +14 -15
  59. package/dist/cjs/index.js.map +1 -1
  60. package/dist/cjs/utils/appendix.js +10 -18
  61. package/dist/cjs/utils/appendix.js.map +1 -1
  62. package/dist/cjs/utils/did-document.js +51 -58
  63. package/dist/cjs/utils/did-document.js.map +1 -1
  64. package/dist/cjs/utils/general.js +1 -1
  65. package/dist/cjs/utils/general.js.map +1 -1
  66. package/dist/esm/core/beacon/aggregation/cohort/index.js +3 -3
  67. package/dist/esm/core/beacon/aggregation/cohort/index.js.map +1 -1
  68. package/dist/esm/core/beacon/aggregation/cohort/messages/base.js +1 -9
  69. package/dist/esm/core/beacon/aggregation/cohort/messages/base.js.map +1 -1
  70. package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/cohort-advert.js +2 -1
  71. package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/cohort-advert.js.map +1 -1
  72. package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/cohort-ready.js +2 -1
  73. package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/cohort-ready.js.map +1 -1
  74. package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/opt-in-accept.js +2 -1
  75. package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/opt-in-accept.js.map +1 -1
  76. package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/opt-in.js +2 -1
  77. package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/opt-in.js.map +1 -1
  78. package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/subscribe.js +2 -1
  79. package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/subscribe.js.map +1 -1
  80. package/dist/esm/core/beacon/aggregation/cohort/messages/sign/aggregated-nonce.js +2 -1
  81. package/dist/esm/core/beacon/aggregation/cohort/messages/sign/aggregated-nonce.js.map +1 -1
  82. package/dist/esm/core/beacon/aggregation/cohort/messages/sign/authorization-request.js +2 -1
  83. package/dist/esm/core/beacon/aggregation/cohort/messages/sign/authorization-request.js.map +1 -1
  84. package/dist/esm/core/beacon/aggregation/cohort/messages/sign/nonce-contribution.js +2 -1
  85. package/dist/esm/core/beacon/aggregation/cohort/messages/sign/nonce-contribution.js.map +1 -1
  86. package/dist/esm/core/beacon/aggregation/cohort/messages/sign/request-signature.js +2 -1
  87. package/dist/esm/core/beacon/aggregation/cohort/messages/sign/request-signature.js.map +1 -1
  88. package/dist/esm/core/beacon/aggregation/cohort/messages/sign/signature-authorization.js +2 -1
  89. package/dist/esm/core/beacon/aggregation/cohort/messages/sign/signature-authorization.js.map +1 -1
  90. package/dist/esm/core/beacon/aggregation/communication/adapter/nostr.js +36 -18
  91. package/dist/esm/core/beacon/aggregation/communication/adapter/nostr.js.map +1 -1
  92. package/dist/esm/core/beacon/aggregation/coordinator.js +14 -14
  93. package/dist/esm/core/beacon/aggregation/coordinator.js.map +1 -1
  94. package/dist/esm/core/beacon/aggregation/participant.js +4 -3
  95. package/dist/esm/core/beacon/aggregation/participant.js.map +1 -1
  96. package/dist/esm/core/beacon/aggregation/session/index.js +1 -1
  97. package/dist/esm/core/beacon/aggregation/session/index.js.map +1 -1
  98. package/dist/esm/core/beacon/cas-beacon.js +55 -0
  99. package/dist/esm/core/beacon/cas-beacon.js.map +1 -0
  100. package/dist/esm/core/beacon/factory.js +11 -10
  101. package/dist/esm/core/beacon/factory.js.map +1 -1
  102. package/dist/esm/core/beacon/interfaces.js +32 -0
  103. package/dist/esm/core/beacon/interfaces.js.map +1 -0
  104. package/dist/esm/core/beacon/singleton.js +59 -135
  105. package/dist/esm/core/beacon/singleton.js.map +1 -1
  106. package/dist/esm/core/beacon/smt-beacon.js +56 -0
  107. package/dist/esm/core/beacon/smt-beacon.js.map +1 -0
  108. package/dist/esm/core/beacon/utils.js +67 -105
  109. package/dist/esm/core/beacon/utils.js.map +1 -1
  110. package/dist/esm/core/identifier.js +18 -21
  111. package/dist/esm/core/identifier.js.map +1 -1
  112. package/dist/esm/core/interfaces.js +2 -0
  113. package/dist/esm/core/interfaces.js.map +1 -0
  114. package/dist/esm/core/resolve.js +511 -0
  115. package/dist/esm/core/resolve.js.map +1 -0
  116. package/dist/esm/{utils → core}/types.js.map +1 -1
  117. package/dist/esm/core/{crud/update.js → update.js} +62 -52
  118. package/dist/esm/core/update.js.map +1 -0
  119. package/dist/esm/did-btcr2.js +109 -75
  120. package/dist/esm/did-btcr2.js.map +1 -1
  121. package/dist/esm/index.js +14 -15
  122. package/dist/esm/index.js.map +1 -1
  123. package/dist/esm/utils/appendix.js +10 -18
  124. package/dist/esm/utils/appendix.js.map +1 -1
  125. package/dist/esm/utils/did-document.js +51 -58
  126. package/dist/esm/utils/did-document.js.map +1 -1
  127. package/dist/esm/utils/general.js +1 -1
  128. package/dist/esm/utils/general.js.map +1 -1
  129. package/dist/types/core/beacon/aggregation/cohort/index.d.ts +1 -1
  130. package/dist/types/core/beacon/aggregation/cohort/messages/base.d.ts +0 -7
  131. package/dist/types/core/beacon/aggregation/cohort/messages/base.d.ts.map +1 -1
  132. package/dist/types/core/beacon/aggregation/cohort/messages/keygen/cohort-advert.d.ts.map +1 -1
  133. package/dist/types/core/beacon/aggregation/cohort/messages/keygen/cohort-ready.d.ts.map +1 -1
  134. package/dist/types/core/beacon/aggregation/cohort/messages/keygen/opt-in-accept.d.ts.map +1 -1
  135. package/dist/types/core/beacon/aggregation/cohort/messages/keygen/opt-in.d.ts.map +1 -1
  136. package/dist/types/core/beacon/aggregation/cohort/messages/keygen/subscribe.d.ts.map +1 -1
  137. package/dist/types/core/beacon/aggregation/cohort/messages/sign/aggregated-nonce.d.ts.map +1 -1
  138. package/dist/types/core/beacon/aggregation/cohort/messages/sign/authorization-request.d.ts.map +1 -1
  139. package/dist/types/core/beacon/aggregation/cohort/messages/sign/nonce-contribution.d.ts.map +1 -1
  140. package/dist/types/core/beacon/aggregation/cohort/messages/sign/request-signature.d.ts.map +1 -1
  141. package/dist/types/core/beacon/aggregation/cohort/messages/sign/signature-authorization.d.ts.map +1 -1
  142. package/dist/types/core/beacon/aggregation/communication/adapter/nostr.d.ts +13 -5
  143. package/dist/types/core/beacon/aggregation/communication/adapter/nostr.d.ts.map +1 -1
  144. package/dist/types/core/beacon/aggregation/coordinator.d.ts +17 -29
  145. package/dist/types/core/beacon/aggregation/coordinator.d.ts.map +1 -1
  146. package/dist/types/core/beacon/aggregation/participant.d.ts.map +1 -1
  147. package/dist/types/core/beacon/cas-beacon.d.ts +47 -0
  148. package/dist/types/core/beacon/cas-beacon.d.ts.map +1 -0
  149. package/dist/types/core/beacon/factory.d.ts +5 -4
  150. package/dist/types/core/beacon/factory.d.ts.map +1 -1
  151. package/dist/types/core/beacon/interfaces.d.ts +98 -0
  152. package/dist/types/core/beacon/interfaces.d.ts.map +1 -0
  153. package/dist/types/core/beacon/singleton.d.ts +22 -65
  154. package/dist/types/core/beacon/singleton.d.ts.map +1 -1
  155. package/dist/types/core/beacon/smt-beacon.d.ts +48 -0
  156. package/dist/types/core/beacon/smt-beacon.d.ts.map +1 -0
  157. package/dist/types/core/beacon/utils.d.ts +19 -97
  158. package/dist/types/core/beacon/utils.d.ts.map +1 -1
  159. package/dist/types/core/identifier.d.ts.map +1 -1
  160. package/dist/types/core/interfaces.d.ts +94 -0
  161. package/dist/types/core/interfaces.d.ts.map +1 -0
  162. package/dist/types/core/resolve.d.ts +105 -0
  163. package/dist/types/core/resolve.d.ts.map +1 -0
  164. package/dist/types/core/types.d.ts +71 -0
  165. package/dist/types/core/types.d.ts.map +1 -0
  166. package/dist/types/core/{crud/update.d.ts → update.d.ts} +21 -20
  167. package/dist/types/core/update.d.ts.map +1 -0
  168. package/dist/types/did-btcr2.d.ts +45 -57
  169. package/dist/types/did-btcr2.d.ts.map +1 -1
  170. package/dist/types/index.d.ts +14 -15
  171. package/dist/types/index.d.ts.map +1 -1
  172. package/dist/types/utils/appendix.d.ts +5 -10
  173. package/dist/types/utils/appendix.d.ts.map +1 -1
  174. package/dist/types/utils/did-document-builder.d.ts +1 -1
  175. package/dist/types/utils/did-document-builder.d.ts.map +1 -1
  176. package/dist/types/utils/did-document.d.ts +31 -29
  177. package/dist/types/utils/did-document.d.ts.map +1 -1
  178. package/package.json +5 -5
  179. package/src/core/beacon/aggregation/cohort/index.ts +3 -3
  180. package/src/core/beacon/aggregation/cohort/messages/base.ts +1 -12
  181. package/src/core/beacon/aggregation/cohort/messages/keygen/cohort-advert.ts +2 -2
  182. package/src/core/beacon/aggregation/cohort/messages/keygen/cohort-ready.ts +2 -2
  183. package/src/core/beacon/aggregation/cohort/messages/keygen/opt-in-accept.ts +2 -2
  184. package/src/core/beacon/aggregation/cohort/messages/keygen/opt-in.ts +2 -2
  185. package/src/core/beacon/aggregation/cohort/messages/keygen/subscribe.ts +2 -2
  186. package/src/core/beacon/aggregation/cohort/messages/sign/aggregated-nonce.ts +2 -2
  187. package/src/core/beacon/aggregation/cohort/messages/sign/authorization-request.ts +2 -2
  188. package/src/core/beacon/aggregation/cohort/messages/sign/nonce-contribution.ts +2 -2
  189. package/src/core/beacon/aggregation/cohort/messages/sign/request-signature.ts +2 -2
  190. package/src/core/beacon/aggregation/cohort/messages/sign/signature-authorization.ts +2 -2
  191. package/src/core/beacon/aggregation/communication/adapter/nostr.ts +43 -21
  192. package/src/core/beacon/aggregation/coordinator.ts +41 -29
  193. package/src/core/beacon/aggregation/participant.ts +4 -3
  194. package/src/core/beacon/aggregation/session/index.ts +1 -1
  195. package/src/core/beacon/cas-beacon.ts +67 -0
  196. package/src/core/beacon/factory.ts +13 -15
  197. package/src/core/beacon/interfaces.ts +124 -0
  198. package/src/core/beacon/singleton.ts +75 -145
  199. package/src/core/beacon/smt-beacon.ts +70 -0
  200. package/src/core/beacon/utils.ts +80 -170
  201. package/src/core/identifier.ts +21 -24
  202. package/src/core/interfaces.ts +101 -0
  203. package/src/core/resolve.ts +707 -0
  204. package/src/core/types.ts +78 -0
  205. package/src/core/{crud/update.ts → update.ts} +75 -68
  206. package/src/did-btcr2.ts +152 -92
  207. package/src/index.ts +14 -24
  208. package/src/utils/appendix.ts +18 -22
  209. package/src/utils/did-document-builder.ts +1 -1
  210. package/src/utils/did-document.ts +67 -71
  211. package/src/utils/general.ts +1 -1
  212. package/dist/cjs/core/beacon/cid-aggregate.js +0 -116
  213. package/dist/cjs/core/beacon/cid-aggregate.js.map +0 -1
  214. package/dist/cjs/core/beacon/smt-aggregate.js +0 -126
  215. package/dist/cjs/core/beacon/smt-aggregate.js.map +0 -1
  216. package/dist/cjs/core/crud/deactivate.js +0 -14
  217. package/dist/cjs/core/crud/deactivate.js.map +0 -1
  218. package/dist/cjs/core/crud/read.js +0 -679
  219. package/dist/cjs/core/crud/read.js.map +0 -1
  220. package/dist/cjs/core/crud/update.js.map +0 -1
  221. package/dist/cjs/interfaces/beacon.js +0 -41
  222. package/dist/cjs/interfaces/beacon.js.map +0 -1
  223. package/dist/cjs/interfaces/crud.js +0 -2
  224. package/dist/cjs/interfaces/crud.js.map +0 -1
  225. package/dist/esm/core/beacon/cid-aggregate.js +0 -116
  226. package/dist/esm/core/beacon/cid-aggregate.js.map +0 -1
  227. package/dist/esm/core/beacon/smt-aggregate.js +0 -126
  228. package/dist/esm/core/beacon/smt-aggregate.js.map +0 -1
  229. package/dist/esm/core/crud/deactivate.js +0 -14
  230. package/dist/esm/core/crud/deactivate.js.map +0 -1
  231. package/dist/esm/core/crud/read.js +0 -679
  232. package/dist/esm/core/crud/read.js.map +0 -1
  233. package/dist/esm/core/crud/update.js.map +0 -1
  234. package/dist/esm/interfaces/beacon.js +0 -41
  235. package/dist/esm/interfaces/beacon.js.map +0 -1
  236. package/dist/esm/interfaces/crud.js +0 -2
  237. package/dist/esm/interfaces/crud.js.map +0 -1
  238. package/dist/types/core/beacon/cid-aggregate.d.ts +0 -102
  239. package/dist/types/core/beacon/cid-aggregate.d.ts.map +0 -1
  240. package/dist/types/core/beacon/smt-aggregate.d.ts +0 -111
  241. package/dist/types/core/beacon/smt-aggregate.d.ts.map +0 -1
  242. package/dist/types/core/crud/deactivate.d.ts +0 -13
  243. package/dist/types/core/crud/deactivate.d.ts.map +0 -1
  244. package/dist/types/core/crud/read.d.ts +0 -334
  245. package/dist/types/core/crud/read.d.ts.map +0 -1
  246. package/dist/types/core/crud/update.d.ts.map +0 -1
  247. package/dist/types/interfaces/beacon.d.ts +0 -116
  248. package/dist/types/interfaces/beacon.d.ts.map +0 -1
  249. package/dist/types/interfaces/crud.d.ts +0 -32
  250. package/dist/types/interfaces/crud.d.ts.map +0 -1
  251. package/dist/types/utils/types.d.ts +0 -38
  252. package/dist/types/utils/types.d.ts.map +0 -1
  253. package/src/canonicalize.d.ts +0 -6
  254. package/src/core/beacon/cid-aggregate.ts +0 -153
  255. package/src/core/beacon/smt-aggregate.ts +0 -135
  256. package/src/core/crud/deactivate.ts +0 -13
  257. package/src/core/crud/read.ts +0 -948
  258. package/src/interfaces/beacon.ts +0 -137
  259. package/src/interfaces/crud.ts +0 -33
  260. package/src/utils/types.ts +0 -41
  261. /package/dist/cjs/{utils → core}/types.js +0 -0
  262. /package/dist/esm/{utils → core}/types.js +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"read.js","sourceRoot":"","sources":["../../../../src/core/crud/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,wBAAwB,EAGxB,aAAa,EACb,UAAU,EAGV,qBAAqB,EACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAGL,oBAAoB,EACpB,aAAa,EACb,WAAW,EACX,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,MAAM,EACN,WAAW,EACX,YAAY,EAEb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM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,4GAA4G;YAC5G,+DAA+D;YAC/D,wDAAwD;YACxD,4GAA4G;YAC5G,+DAA+D;YAC/D,YAAY;YACZ,2CAA2C;YAC3C,MAAM,MAAM,GAAG,aAAa,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;YACtD,eAAe,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC;QACtE,CAAC;QACD,IAAG,CAAC,eAAe,EAAE,CAAC;YACpB,MAAM,IAAI,WAAW,CACnB,0CAA0C,EAC1C,oBAAoB,EAAE,EAAE,cAAc,EAAE,CACzC,CAAC;QACJ,CAAC;QACD,MAAM,CAAC,KAAK,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC;QACjD,6BAA6B;QAC7B,OAAO,eAAe,CAAC;IACzB,CAAC;CACF"}
@@ -1,41 +0,0 @@
1
- /**
2
- * Implements {@link https://dcdpr.github.io/did-btcr2/#update-beacons | 5. Beacons}.
3
- * Beacons are the mechanism by which a DID controller announces an update to their DID document by broadcasting an
4
- * attestation to this update onto the public Bitcoin network. Beacons are identified by a Bitcoin address and emit
5
- * Beacon Signals by broadcasting a valid Bitcoin transaction that spends from this Beacon address. These transactions
6
- * include attestations to a set of didUpdatePayloads, either in the form of Content Identifiers (CIDs) or Sparse Merkle
7
- * Tree (SMT) roots. Beacons are included as a service in DID documents, with the Service Endpoint identifying a Bitcoin
8
- * address to watch for Beacon Signals. All Beacon Signals broadcast from this Beacon MUST be processed as part of
9
- * resolution (see Read). The type of the Beacon service in the DID document defines how Beacon Signals SHOULD be
10
- * processed.
11
- * did:btcr2 supports different Beacon Types, with each type defining a set of algorithms for:
12
- * 1. How a Beacon can be established and added as a service to a DID document.
13
- * 2. How attestations to DID updates are broadcast within Beacon Signals.
14
- * 3. How a resolver processes a Beacon Signal, identifying, verifying, and applying the authorized mutations to a
15
- * DID document for a specific DID.
16
- * This is an extendable mechanism, such that in the future new Beacon Types could be added. It would be up to the
17
- * resolver to determine if the Beacon Type is a mechanism they support and are willing to trust. If they are unable to
18
- * support a Beacon Type and a DID they are resolving uses that type then the DID MUST be treated as invalid.
19
- * The current, active Beacons of a DID document are specified in the document’s service property. By updating the DID
20
- * document, a DID controller can change the set of Beacons they can use to broadcast updates to their DID document over
21
- * time. Resolution of a DID MUST process signals from all Beacons identified in the latest DID document and apply them
22
- * in order determined by the version specified by the didUpdatePayload.
23
- * All resolvers of did:btcr2 DIDs MUST support the core Beacon Types defined in this specification.
24
- *
25
- * @abstract
26
- * @class Beacon
27
- * @type {Beacon}
28
- */
29
- export class Beacon {
30
- id;
31
- type;
32
- serviceEndpoint;
33
- sidecar;
34
- constructor({ id, type, serviceEndpoint }, sidecar) {
35
- this.id = id;
36
- this.type = type;
37
- this.serviceEndpoint = serviceEndpoint;
38
- this.sidecar = sidecar;
39
- }
40
- }
41
- //# sourceMappingURL=beacon.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"beacon.js","sourceRoot":"","sources":["../../../src/interfaces/beacon.ts"],"names":[],"mappings":"AA4EA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,OAAgB,MAAM;IACnB,EAAE,CAAS;IACX,IAAI,CAAS;IACb,eAAe,CAAqB;IACpC,OAAO,CAAe;IAE7B,YAAY,EAAE,EAAE,EAAE,IAAI,EAAE,eAAe,EAAiB,EAAE,OAAqB;QAC7E,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CAqBF"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=crud.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"crud.js","sourceRoot":"","sources":["../../../src/interfaces/crud.ts"],"names":[],"mappings":""}
@@ -1,102 +0,0 @@
1
- import { RawTransactionV2 } from '@did-btcr2/bitcoin';
2
- import { DidUpdateInvocation, DidUpdatePayload } from '@did-btcr2/common';
3
- import { DidServiceEndpoint } from '@web5/dids';
4
- import { Beacon, BeaconService, BeaconSignal } from '../../interfaces/beacon.js';
5
- import { BeaconSidecarData, CIDAggregateSidecar, SignalsMetadata } from '../../utils/types.js';
6
- /**
7
- * Implements {@link https://dcdpr.github.io/did-btcr2/#cidaggregate-beacon | 5.2 CIDAggregate Beacon}.
8
- *
9
- * A Beacon of the type CIDAggregatoBeacon is a Beacon that publishes Bitcoin transactions containing a Content
10
- * Identifier (CID) announcing an Aggregated DID Update Bundle. An Aggregated DID Update Bundle is a JSON object that
11
- * maps did:btcr2 identifiers to CID values for the individual DID Update Payloads. The Aggregated DID Update Bundle CID
12
- * (bundleCID) SHOULD be resolvable against a Content Addressable Storage (CAS) system such as IPFS, while the CID for
13
- * the DID Update Payload (payloadCID) MAY be resolvable against a CAS or provided through a Sidecar mechanism. It is
14
- * RECOMMENDED that this type of Beacon is only included in a DID document if the DID controller is REQUIRED to
15
- * participate in authorizing Bitcoin transactions from this Beacon. In other words, this Beacon SHOULD identify an
16
- * n-of-n P2TR Bitcoin address where n is the number of unique DID controllers submitting updates through the Beacon.
17
- *
18
- * @class CIDAggregateBeacon
19
- * @type {CIDAggregateBeacon}
20
- * @extends {Beacon}
21
- */
22
- export declare class CIDAggregateBeacon extends Beacon {
23
- /**
24
- * Creates an instance of CIDAggregateBeacon.
25
- * @param {BeaconService} service The service of the Beacon.
26
- * @param {?BeaconSidecarData} [sidecar] The sidecar data of the Beacon.
27
- */
28
- constructor(service: BeaconService, sidecar?: BeaconSidecarData<CIDAggregateSidecar>);
29
- get service(): BeaconService;
30
- /**
31
- * TODO: Finish implementation
32
- *
33
- * Implements {@link https://dcdpr.github.io/did-btcr2/#establish-cidaggregate-beacon | 5.2.1 Establish CIDAggregate Beacon}.
34
- *
35
- * To establish a CIDAggregatorBeacon, a cohort of cooperating parties SHOULD generate an n-of-n P2TR Bitcoin address
36
- * where each party contributes a public key. Furthermore, each party SHOULD verify that their key is part of the
37
- * address and all other keys that are part of the address are keys with controllers able to produce valid signatures.
38
- * To establish a Beacon there are two roles. One is the cohort participant, they want to join a Beacon cohort and
39
- * submit a request to do so with a key and proof of control over that key. The other is the Beacon coordinator, they
40
- * advertise and curate Beacon cohorts by combining Beacon participants into cohorts, verifying proofs of control, and
41
- * producing Beacon addresses.
42
- *
43
- * @param {string} id The identifier of the Beacon.
44
- * @param {string} type The type of the Beacon.
45
- * @param {DidServiceEndpoint} serviceEndpoint The service endpoint of the Beacon.
46
- * @returns {CIDAggregateBeacon} The established CIDAggregate Beacon.
47
- */
48
- static establish(id: string, type: string, serviceEndpoint: DidServiceEndpoint): CIDAggregateBeacon;
49
- /**
50
- * TODO: Figure out if this is necessary or not.
51
- * @param {string} didUpdatePayload The DID Update Payload to generate the signal for.
52
- * @returns {BeaconSignal} The generated signal.
53
- * @throws {MethodError} if the signal is invalid.
54
- */
55
- generateSignal(didUpdatePayload: string): BeaconSignal;
56
- /**
57
- * TODO: Finish implementation
58
- *
59
- * Implements {@link https://dcdpr.github.io/did-btcr2/#process-cidaggregate-beacon-signal | 5.2.3 Process CIDAggregate Beacon Signal}.
60
- *
61
- * A Beacon Signal from a CIDAggregate Beacon is a Bitcoin transaction that contains the hashBytes of a DID Update
62
- * Bundle in its first transaction output. The corresponding DID Update Bundle MUST either be provided through Sidecar
63
- * Data or by converting hashBytes into a IPFS v1 Content Identifier and attempting to retrieve it from Content
64
- * Addressable Storage. The DID Update Bundle maps from did:btcr2 identifiers to hashes of DID Update payloads
65
- * applicable for that identifier. Again this algorithm attempts to retrieve and validate the DID Update Payload
66
- * identified for the identifier being resolved. If successful, the DID Update Payload is returned.
67
- *
68
- * The Process CIDAggregate Beacon Signal algorithm is called by the Process Beacon Signals algorithm as part of the
69
- * Read operation.
70
- *
71
- * It takes as inputs a did:btcr2 identifier, Identifier, a Beacon Signal, tx, and a optional
72
- * object, signalSidecarData, containing any sidecar data provided to the resolver for the Beacon Signal identified by
73
- * the Bitcoin transaction identifier.
74
- *
75
- * It returns the DID Update payload announced by the Beacon Signal for the
76
- * did:btcr2 identifier being resolved or throws an error.
77
- *
78
- * @param {RawTransactionV2} signal Bitcoin transaction representing a Beacon Signal.
79
- * @param {SignalsMetadata} signalsMetadata Optional sidecar data for the Beacon Signal.
80
- * @returns {Promise<DidUpdatePayload | undefined>} The DID Update payload announced by the Beacon Signal.
81
- * @throws {DidError} if the signalTx is invalid or the signalsMetadata is invalid.
82
- */
83
- processSignal(signal: RawTransactionV2, signalsMetadata: SignalsMetadata): Promise<DidUpdateInvocation | undefined>;
84
- /**
85
- * TODO: Finish implementation
86
- *
87
- * Implements {@link https://dcdpr.github.io/did-btcr2/#broadcast-cidaggregate-beacon-signal | 5.2.2 Broadcast CIDAggregate Beacon Signal}.
88
- *
89
- * The Broadcast CIDAggregate Beacon Signal algorithm involving two roles: a set of cohort participants and a Beacon
90
- * coordinator. The Beacon coordinator collects individual DID Update Payload Content Identifiers (CIDs) for specific
91
- * did:btcr2 idntifiers and aggregates them into a DID Update Bundle, which is then published to a Content Addressable
92
- * Storage (CAS). The CID for the DID Update Bundle is included in a Partially Signed Bitcoin Transaction (PSBT) transaction
93
- * output spent from the Beacon’s n-of-n address. Each of the n cohort participants in the Beacon MUST sign the
94
- * transaction before it can be broadcast to the network. It is RECOMMENDED that cohort participants keep a copy of
95
- * the DID Update Bundle and separately pin it to the CAS.
96
- *
97
- * @param {DidUpdatePayload} didUpdatePayload The verificationMethod object to be used for signing.
98
- * @returns {SignalsMetadata} Successful output of a bitcoin transaction.
99
- * @throws {SingletonBeaconError} if the bitcoin address is invalid or unfunded.
100
- */
101
- broadcastSignal(didUpdatePayload: DidUpdatePayload): Promise<SignalsMetadata>;
102
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"cid-aggregate.d.ts","sourceRoot":"","sources":["../../../../src/core/beacon/cid-aggregate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAe,MAAM,mBAAmB,CAAC;AACvF,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE/F;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,kBAAmB,SAAQ,MAAM;IAC5C;;;;OAIG;gBACS,OAAO,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,iBAAiB,CAAC,mBAAmB,CAAC;IAGpF,IAAI,OAAO,IAAI,aAAa,CAM3B;IAGD;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,kBAAkB,GAAG,kBAAkB;IAKnG;;;;;OAKG;IACH,cAAc,CAAC,gBAAgB,EAAE,MAAM,GAAG,YAAY;IAKtD;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,aAAa,CAAC,MAAM,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,GAAG,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC;IAInH;;;;;;;;;;;;;;;;OAgBG;IACH,eAAe,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;CA8B9E"}
@@ -1,111 +0,0 @@
1
- import { RawTransactionV2 } from '@did-btcr2/bitcoin';
2
- import { DidUpdatePayload } from '@did-btcr2/common';
3
- import { DidServiceEndpoint } from '@web5/dids';
4
- import { Beacon, BeaconService, BeaconSignal } from '../../interfaces/beacon.js';
5
- import { BeaconSidecarData, SignalsMetadata, SMTAggregateSidecar } from '../../utils/types.js';
6
- /**
7
- * TODO: Finish implementation
8
- *
9
- * Implements {@link https://dcdpr.github.io/did-btcr2/#smtaggregate-beacon | 5.3 SMTAggregate Beacon}.
10
- *
11
- * A SMTAggregate Beacon is a Beacon whose Beacon Signals are Bitcoin transactions containing the root of a Sparse
12
- * Merkle Tree (SMT). The SMT root attests to a set of DID Update Payloads, however, the updates themselves MUST be
13
- * provided along with a proof of inclusion against the SMT root through a Sidecar mechanism during resolution. Using
14
- * the SMT root a resolver can then verify the inclusion proof for the given DID Update Payload. If a DID document
15
- * includes a SMTAggregator Beacon in their set of Beacon services, then they MUST provide proofs for each signal that
16
- * the Beacon broadcasts. If they did not submit an update to their DID in a signal, then they MUST provide a proof of
17
- * non-inclusion for that signal.
18
- *
19
- * @class SMTAggregateBeacon
20
- * @type {SMTAggregateBeacon}
21
- * @extends {Beacon}
22
- */
23
- export declare class SMTAggregateBeacon extends Beacon {
24
- /**
25
- * Creates an instance of SMTAggregateBeacon.
26
- * @param {BeaconService} service The Beacon service.
27
- * @param {?BeaconSidecarData} [sidecar] Optional sidecar data.
28
- */
29
- constructor(service: BeaconService, sidecar?: BeaconSidecarData<SMTAggregateSidecar>);
30
- /**
31
- * Get the Beacon service.
32
- * @readonly
33
- * @type {BeaconService} The Beacon service.
34
- */
35
- get service(): BeaconService;
36
- /**
37
- * TODO: Figure out if this is necessary or not.
38
- * @param {string} didUpdatePayload The DID Update Payload to generate the signal for.
39
- * @returns {BeaconSignal} The generated signal.
40
- * @throws {MethodError} if the signal is invalid.
41
- */
42
- generateSignal(didUpdatePayload: string): BeaconSignal;
43
- /**
44
- * Implements {@link https://dcdpr.github.io/did-btcr2/#establish-beacon | 5.3.1 Establish Beacon}.
45
- *
46
- * The Establish Beacon algorithm is essentially the same as for the CIDAggregate Beacon in Establish CIDAggregate
47
- * Beacon. A cohort of DID controllers need to coordinate to produce a Bitcoin address that will act as the Beacon.
48
- * It is RECOMMENDED this is an n-of-n P2TR address, with n being the set of DID controllers in the cohort. Once the
49
- * address has been created, and all parties in the cohort acknowledge their intention to participate in that Beacon,
50
- * each DID controller SHOULD add the Beacon as a service to their DID document.
51
- *
52
- * Additionally, the SMTAggregate Beacon cohort participants MUST register the did:btcr2 identifiers they intend use
53
- * this Beacon with. This is so the Beacon coordinator can generate the necessary proofs of both inclusion and
54
- * non-inclusion for each DID.
55
- *
56
- * Static, convenience method for establishing a Beacon object.
57
- *
58
- * @param {string} id The Beacon ID.
59
- * @param {string} type The Beacon type.
60
- * @param {DidServiceEndpoint} serviceEndpoint The service endpoint.
61
- * @returns {Beacon} The Beacon.
62
- */
63
- static establish(id: string, type: string, serviceEndpoint: DidServiceEndpoint): SMTAggregateBeacon;
64
- /**
65
- *
66
- * Implements {@link https://dcdpr.github.io/did-btcr2/#broadcast-smtaggregate-beacon-signal | 5.3.2 Broadcast SMTAggregate Beacon Signal}.
67
- *
68
- * See {@link Beacon.broadcastSignal | Beacon Interface Method broadcastSignal} for more information.
69
- *
70
- * To publish a DID Update Payload, the DID controller MUST get a hash of the DID Update Payload included at the leaf
71
- * of the Sparse Merkle Tree (SMT) identified by their did:btcr2 identifier and receive an inclusion proof for this
72
- * data. If a member of the Beacon cohort does not wish to announce an update in a Beacon Signal, they MUST receive
73
- * and verify a proof of non-inclusion for their DID. Upon verifying the non-inclusion proof against the SMT root
74
- * contained in the Beacon Signal, they SHOULD accept and authorize the signal following the MuSig2 protocol. Once all
75
- * members of the cohort have authorized the signal, it can be broadcast as a transaction to the Bitcoin network. DID
76
- * controllers are responsible for persisting their DID updates and proofs, these will need to be provided through a
77
- * Sidecar mechanism during a resolution process.
78
- *
79
- * @param {DidUpdatePayload} didUpdatePayload The DID Update Payload to broadcast.
80
- * @returns {Promise<SignalMetadata>} The signal metadata.
81
- * @throws {MethodError} if the signal is invalid.
82
- */
83
- broadcastSignal(didUpdatePayload: DidUpdatePayload): Promise<SignalsMetadata>;
84
- /**
85
- * Implements {@link https://dcdpr.github.io/did-btcr2/#process-smtaggregate-beacon-signal | 5.3.3 Process SMTAggregate Beacon Signal}.
86
- *
87
- * See {@link Beacon.processSignal | Beacon Interface Method processSignal} for more information.
88
- *
89
- * A Beacon Signal from a SMTAggregate Beacon is a Bitcoin transaction with the first transaction output of the format
90
- * [OP_RETURN, OP_PUSH32, <32bytes>]. The 32 bytes of data contained within this transaction output represent the root
91
- * of a Sparse Merkle Tree (SMT). This SMT aggregates a set of hashes of DID Update payloads. In order to process
92
- * these Beacon Signals, the resolver MUST have been passed Sidecar data for this signal containing either the DID
93
- * Update payload object and a SMT proof that the hash of this object is in the SMT at the leaf indexed by the
94
- * did:Identifier being resolved. Or theSidecar data:: MUST contain a proof that the leaf indexed by the
95
- * did:Identifier is empty, thereby proving that theSMT:: does not contain an update for their identifier.
96
- *
97
- * The Process SMTAggregate Beacon Signal is called by the Process Beacon Signals algorithm as part of the Read
98
- * operation. It takes as inputs a did:btcr2 identifier, Identifier, a Beacon Signal, tx, and a optional object,
99
- * signalSidecarData, containing any sidecar data provided to the resolver for the Beacon Signal identified by the
100
- * Bitcoin transaction identifier.
101
- *
102
- * It returns the DID Update payload announced by the Beacon Signal for the did:btcr2 identifier being resolved or
103
- * throws an error.
104
- *
105
- * @param {RawTransactionV2} signal The raw transaction signal.
106
- * @param {SignalsMetadata} signalsMetadata The signals metadata.
107
- * @returns {Promise<DidUpdatePayload | undefined>} The updated DID document.
108
- * @throws {MethodError} if the signal is invalid.
109
- */
110
- processSignal(signal: RawTransactionV2, signalsMetadata: SignalsMetadata): Promise<DidUpdatePayload | undefined>;
111
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"smt-aggregate.d.ts","sourceRoot":"","sources":["../../../../src/core/beacon/smt-aggregate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAe,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE/F;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,kBAAmB,SAAQ,MAAM;IAC5C;;;;OAIG;gBACS,OAAO,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,iBAAiB,CAAC,mBAAmB,CAAC;IAIpF;;;;OAIG;IACH,IAAI,OAAO,IAAI,aAAa,CAO3B;IAED;;;;;OAKG;IACI,cAAc,CAAC,gBAAgB,EAAE,MAAM,GAAG,YAAY;IAI7D;;;;;;;;;;;;;;;;;;;OAmBG;WACW,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,kBAAkB,GAAG,kBAAkB;IAI1G;;;;;;;;;;;;;;;;;;OAkBG;IACI,eAAe,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;IAKpF;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACI,aAAa,CAAC,MAAM,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC;CAGxH"}
@@ -1,13 +0,0 @@
1
- import { DidBtcr2 } from '../../did-btcr2.js';
2
- /**
3
- * Implements {@link https://dcdpr.github.io/did-btcr2/#deactivate | 4.4 Deactivate}
4
- * To deactivate a did:btcr2, the DID controller MUST add the property deactivated with the value true on the DID
5
- * document. To do this, the DID controller constructs a valid DID Update Payload with a JSON patch that adds this
6
- * property and announces the payload through a Beacon in their current DID document following the algorithm in Update.
7
- * Once a did:btcr2 has been deactivated this state is considered permanent and resolution MUST terminate.
8
- * @class Deactivate
9
- * @type {Deactivate}
10
- * @extends {DidBtcr2}
11
- */
12
- export declare class Deactivate extends DidBtcr2 {
13
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"deactivate.d.ts","sourceRoot":"","sources":["../../../../src/core/crud/deactivate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C;;;;;;;;;GASG;AACH,qBAAa,UAAW,SAAQ,QAAQ;CAAG"}