@did-btcr2/method 0.17.2 → 0.18.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.
- package/dist/browser.js +30124 -19552
- package/dist/browser.mjs +30123 -19551
- package/dist/cjs/core/beacon/aggregation/cohort/index.js +225 -0
- package/dist/cjs/core/beacon/aggregation/cohort/index.js.map +1 -0
- package/dist/{esm/core/beacon/aggregation → cjs/core/beacon/aggregation/cohort}/messages/base.js +3 -11
- package/dist/cjs/core/beacon/aggregation/cohort/messages/base.js.map +1 -0
- package/dist/cjs/core/beacon/aggregation/cohort/messages/constants.js +11 -0
- package/dist/cjs/core/beacon/aggregation/cohort/messages/constants.js.map +1 -0
- package/dist/cjs/core/beacon/aggregation/cohort/messages/index.js +98 -0
- package/dist/cjs/core/beacon/aggregation/cohort/messages/index.js.map +1 -0
- package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/cohort-advert.js +30 -0
- package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/cohort-advert.js.map +1 -0
- package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/cohort-ready.js +28 -0
- package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/cohort-ready.js.map +1 -0
- package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/opt-in-accept.js +26 -0
- package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/opt-in-accept.js.map +1 -0
- package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/opt-in.js +22 -0
- package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/opt-in.js.map +1 -0
- package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/subscribe.js +27 -0
- package/dist/cjs/core/beacon/aggregation/cohort/messages/keygen/subscribe.js.map +1 -0
- package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/aggregated-nonce.js +28 -0
- package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/aggregated-nonce.js.map +1 -0
- package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/authorization-request.js +29 -0
- package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/authorization-request.js.map +1 -0
- package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/nonce-contribution.js +29 -0
- package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/nonce-contribution.js.map +1 -0
- package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/request-signature.js +29 -0
- package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/request-signature.js.map +1 -0
- package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/signature-authorization.js +30 -0
- package/dist/cjs/core/beacon/aggregation/cohort/messages/sign/signature-authorization.js.map +1 -0
- package/dist/cjs/core/beacon/aggregation/cohort/status.js.map +1 -0
- package/dist/cjs/core/beacon/aggregation/communication/adapter/did-comm.js +126 -0
- package/dist/cjs/core/beacon/aggregation/communication/adapter/did-comm.js.map +1 -0
- package/dist/cjs/core/beacon/aggregation/communication/adapter/nostr.js +230 -0
- package/dist/cjs/core/beacon/aggregation/communication/adapter/nostr.js.map +1 -0
- package/dist/cjs/core/beacon/aggregation/communication/error.js +12 -0
- package/dist/cjs/core/beacon/aggregation/communication/error.js.map +1 -0
- package/dist/cjs/core/beacon/aggregation/communication/factory.js +21 -0
- package/dist/cjs/core/beacon/aggregation/communication/factory.js.map +1 -0
- package/dist/cjs/core/beacon/aggregation/communication/service.js.map +1 -0
- package/dist/cjs/core/beacon/aggregation/coordinator.js +282 -56
- package/dist/cjs/core/beacon/aggregation/coordinator.js.map +1 -1
- package/dist/cjs/core/beacon/aggregation/participant.js +435 -1
- package/dist/cjs/core/beacon/aggregation/participant.js.map +1 -1
- package/dist/cjs/core/beacon/aggregation/session/index.js +233 -0
- package/dist/cjs/core/beacon/aggregation/session/index.js.map +1 -0
- package/dist/cjs/core/beacon/aggregation/session/status.js +11 -0
- package/dist/cjs/core/beacon/aggregation/session/status.js.map +1 -0
- package/dist/cjs/core/beacon/cid-aggregate.js.map +1 -1
- package/dist/cjs/core/beacon/error.js +37 -0
- package/dist/cjs/core/beacon/error.js.map +1 -0
- package/dist/cjs/core/beacon/factory.js.map +1 -1
- package/dist/cjs/core/beacon/singleton.js +8 -5
- package/dist/cjs/core/beacon/singleton.js.map +1 -1
- package/dist/cjs/core/beacon/smt-aggregate.js.map +1 -1
- package/dist/cjs/{utils/beacons.js → core/beacon/utils.js} +4 -4
- package/dist/cjs/core/beacon/utils.js.map +1 -0
- package/dist/cjs/core/crud/read.js +2 -9
- package/dist/cjs/core/crud/read.js.map +1 -1
- package/dist/cjs/core/crud/update.js +18 -19
- package/dist/cjs/core/crud/update.js.map +1 -1
- package/dist/{esm/utils → cjs/core}/identifier.js +18 -3
- package/dist/cjs/core/identifier.js.map +1 -0
- package/dist/cjs/did-btcr2.js +2 -2
- package/dist/cjs/did-btcr2.js.map +1 -1
- package/dist/cjs/index.js +28 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interfaces/beacon.js.map +1 -1
- package/dist/cjs/utils/appendix.js +2 -3
- package/dist/cjs/utils/appendix.js.map +1 -1
- package/dist/cjs/utils/did-document.js +4 -6
- package/dist/cjs/utils/did-document.js.map +1 -1
- package/dist/cjs/utils/types.js +2 -0
- package/dist/cjs/utils/types.js.map +1 -0
- package/dist/esm/core/beacon/aggregation/cohort/index.js +225 -0
- package/dist/esm/core/beacon/aggregation/cohort/index.js.map +1 -0
- package/dist/{cjs/core/beacon/aggregation → esm/core/beacon/aggregation/cohort}/messages/base.js +3 -11
- package/dist/esm/core/beacon/aggregation/cohort/messages/base.js.map +1 -0
- package/dist/esm/core/beacon/aggregation/cohort/messages/constants.js +11 -0
- package/dist/esm/core/beacon/aggregation/cohort/messages/constants.js.map +1 -0
- package/dist/esm/core/beacon/aggregation/cohort/messages/index.js +98 -0
- package/dist/esm/core/beacon/aggregation/cohort/messages/index.js.map +1 -0
- package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/cohort-advert.js +30 -0
- package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/cohort-advert.js.map +1 -0
- package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/cohort-ready.js +28 -0
- package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/cohort-ready.js.map +1 -0
- package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/opt-in-accept.js +26 -0
- package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/opt-in-accept.js.map +1 -0
- package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/opt-in.js +22 -0
- package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/opt-in.js.map +1 -0
- package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/subscribe.js +27 -0
- package/dist/esm/core/beacon/aggregation/cohort/messages/keygen/subscribe.js.map +1 -0
- package/dist/esm/core/beacon/aggregation/cohort/messages/sign/aggregated-nonce.js +28 -0
- package/dist/esm/core/beacon/aggregation/cohort/messages/sign/aggregated-nonce.js.map +1 -0
- package/dist/esm/core/beacon/aggregation/cohort/messages/sign/authorization-request.js +29 -0
- package/dist/esm/core/beacon/aggregation/cohort/messages/sign/authorization-request.js.map +1 -0
- package/dist/esm/core/beacon/aggregation/cohort/messages/sign/nonce-contribution.js +29 -0
- package/dist/esm/core/beacon/aggregation/cohort/messages/sign/nonce-contribution.js.map +1 -0
- package/dist/esm/core/beacon/aggregation/cohort/messages/sign/request-signature.js +29 -0
- package/dist/esm/core/beacon/aggregation/cohort/messages/sign/request-signature.js.map +1 -0
- package/dist/esm/core/beacon/aggregation/cohort/messages/sign/signature-authorization.js +30 -0
- package/dist/esm/core/beacon/aggregation/cohort/messages/sign/signature-authorization.js.map +1 -0
- package/dist/esm/core/beacon/aggregation/cohort/status.js.map +1 -0
- package/dist/esm/core/beacon/aggregation/communication/adapter/did-comm.js +126 -0
- package/dist/esm/core/beacon/aggregation/communication/adapter/did-comm.js.map +1 -0
- package/dist/esm/core/beacon/aggregation/communication/adapter/nostr.js +230 -0
- package/dist/esm/core/beacon/aggregation/communication/adapter/nostr.js.map +1 -0
- package/dist/esm/core/beacon/aggregation/communication/error.js +12 -0
- package/dist/esm/core/beacon/aggregation/communication/error.js.map +1 -0
- package/dist/esm/core/beacon/aggregation/communication/factory.js +21 -0
- package/dist/esm/core/beacon/aggregation/communication/factory.js.map +1 -0
- package/dist/esm/core/beacon/aggregation/communication/service.js.map +1 -0
- package/dist/esm/core/beacon/aggregation/coordinator.js +282 -56
- package/dist/esm/core/beacon/aggregation/coordinator.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/participant.js +435 -1
- package/dist/esm/core/beacon/aggregation/participant.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/session/index.js +233 -0
- package/dist/esm/core/beacon/aggregation/session/index.js.map +1 -0
- package/dist/esm/core/beacon/aggregation/session/status.js +11 -0
- package/dist/esm/core/beacon/aggregation/session/status.js.map +1 -0
- package/dist/esm/core/beacon/cid-aggregate.js.map +1 -1
- package/dist/esm/core/beacon/error.js +37 -0
- package/dist/esm/core/beacon/error.js.map +1 -0
- package/dist/esm/core/beacon/factory.js.map +1 -1
- package/dist/esm/core/beacon/singleton.js +8 -5
- package/dist/esm/core/beacon/singleton.js.map +1 -1
- package/dist/esm/core/beacon/smt-aggregate.js.map +1 -1
- package/dist/esm/{utils/beacons.js → core/beacon/utils.js} +4 -4
- package/dist/esm/core/beacon/utils.js.map +1 -0
- package/dist/esm/core/crud/read.js +2 -9
- package/dist/esm/core/crud/read.js.map +1 -1
- package/dist/esm/core/crud/update.js +18 -19
- package/dist/esm/core/crud/update.js.map +1 -1
- package/dist/{cjs/utils → esm/core}/identifier.js +18 -3
- package/dist/esm/core/identifier.js.map +1 -0
- package/dist/esm/did-btcr2.js +2 -2
- package/dist/esm/did-btcr2.js.map +1 -1
- package/dist/esm/index.js +28 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces/beacon.js.map +1 -1
- package/dist/esm/utils/appendix.js +2 -3
- package/dist/esm/utils/appendix.js.map +1 -1
- package/dist/esm/utils/did-document.js +4 -6
- package/dist/esm/utils/did-document.js.map +1 -1
- package/dist/esm/utils/types.js +2 -0
- package/dist/esm/utils/types.js.map +1 -0
- package/dist/types/core/beacon/aggregation/cohort/index.d.ts +135 -0
- package/dist/types/core/beacon/aggregation/cohort/index.d.ts.map +1 -0
- package/dist/types/core/beacon/aggregation/{messages → cohort/messages}/base.d.ts +13 -8
- package/dist/types/core/beacon/aggregation/cohort/messages/base.d.ts.map +1 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/constants.d.ts +10 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/constants.d.ts.map +1 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/index.d.ts +64 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/index.d.ts.map +1 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/keygen/cohort-advert.d.ts +28 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/keygen/cohort-advert.d.ts.map +1 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/keygen/cohort-ready.d.ts +26 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/keygen/cohort-ready.d.ts.map +1 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/keygen/opt-in-accept.d.ts +23 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/keygen/opt-in-accept.d.ts.map +1 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/keygen/opt-in.d.ts +19 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/keygen/opt-in.d.ts.map +1 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/keygen/subscribe.d.ts +24 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/keygen/subscribe.d.ts.map +1 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/sign/aggregated-nonce.d.ts +24 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/sign/aggregated-nonce.d.ts.map +1 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/sign/authorization-request.d.ts +25 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/sign/authorization-request.d.ts.map +1 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/sign/nonce-contribution.d.ts +25 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/sign/nonce-contribution.d.ts.map +1 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/sign/request-signature.d.ts +25 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/sign/request-signature.d.ts.map +1 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/sign/signature-authorization.d.ts +26 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/sign/signature-authorization.d.ts.map +1 -0
- package/dist/types/core/beacon/aggregation/cohort/status.d.ts.map +1 -0
- package/dist/types/core/beacon/aggregation/communication/adapter/did-comm.d.ts +88 -0
- package/dist/types/core/beacon/aggregation/communication/adapter/did-comm.d.ts.map +1 -0
- package/dist/types/core/beacon/aggregation/communication/adapter/nostr.d.ts +93 -0
- package/dist/types/core/beacon/aggregation/communication/adapter/nostr.d.ts.map +1 -0
- package/dist/types/core/beacon/aggregation/communication/error.d.ts +7 -0
- package/dist/types/core/beacon/aggregation/communication/error.d.ts.map +1 -0
- package/dist/types/core/beacon/aggregation/communication/factory.d.ts +9 -0
- package/dist/types/core/beacon/aggregation/communication/factory.d.ts.map +1 -0
- package/dist/types/core/beacon/aggregation/communication/service.d.ts +35 -0
- package/dist/types/core/beacon/aggregation/communication/service.d.ts.map +1 -0
- package/dist/types/core/beacon/aggregation/coordinator.d.ts +79 -26
- package/dist/types/core/beacon/aggregation/coordinator.d.ts.map +1 -1
- package/dist/types/core/beacon/aggregation/participant.d.ts +190 -0
- package/dist/types/core/beacon/aggregation/participant.d.ts.map +1 -1
- package/dist/types/core/beacon/aggregation/session/index.d.ts +155 -0
- package/dist/types/core/beacon/aggregation/session/index.d.ts.map +1 -0
- package/dist/types/core/beacon/aggregation/session/status.d.ts +10 -0
- package/dist/types/core/beacon/aggregation/session/status.d.ts.map +1 -0
- package/dist/types/core/beacon/cid-aggregate.d.ts +3 -4
- package/dist/types/core/beacon/cid-aggregate.d.ts.map +1 -1
- package/dist/types/core/beacon/error.d.ts +22 -0
- package/dist/types/core/beacon/error.d.ts.map +1 -0
- package/dist/types/core/beacon/factory.d.ts +2 -3
- package/dist/types/core/beacon/factory.d.ts.map +1 -1
- package/dist/types/core/beacon/singleton.d.ts +2 -3
- package/dist/types/core/beacon/singleton.d.ts.map +1 -1
- package/dist/types/core/beacon/smt-aggregate.d.ts +3 -4
- package/dist/types/core/beacon/smt-aggregate.d.ts.map +1 -1
- package/dist/types/{utils/beacons.d.ts → core/beacon/utils.d.ts} +3 -3
- package/dist/types/core/beacon/utils.d.ts.map +1 -0
- package/dist/types/core/crud/read.d.ts +3 -3
- package/dist/types/core/crud/read.d.ts.map +1 -1
- package/dist/types/core/crud/update.d.ts +1 -1
- package/dist/types/core/crud/update.d.ts.map +1 -1
- package/dist/types/{utils → core}/identifier.d.ts +24 -3
- package/dist/types/core/identifier.d.ts.map +1 -0
- package/dist/types/did-btcr2.d.ts +1 -1
- package/dist/types/did-btcr2.d.ts.map +1 -1
- package/dist/types/index.d.ts +28 -6
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/interfaces/beacon.d.ts +65 -5
- package/dist/types/interfaces/beacon.d.ts.map +1 -1
- package/dist/types/interfaces/crud.d.ts +1 -1
- package/dist/types/interfaces/crud.d.ts.map +1 -1
- package/dist/types/utils/appendix.d.ts +2 -10
- package/dist/types/utils/appendix.d.ts.map +1 -1
- package/dist/types/utils/did-document-builder.d.ts +1 -1
- package/dist/types/utils/did-document-builder.d.ts.map +1 -1
- package/dist/types/utils/did-document.d.ts +1 -1
- package/dist/types/utils/did-document.d.ts.map +1 -1
- package/dist/types/{types/crud.d.ts → utils/types.d.ts} +2 -2
- package/dist/types/utils/types.d.ts.map +1 -0
- package/package.json +4 -3
- package/src/core/beacon/aggregation/cohort/index.ts +292 -0
- package/src/core/beacon/aggregation/{messages → cohort/messages}/base.ts +14 -16
- package/src/core/beacon/aggregation/cohort/messages/constants.ts +12 -0
- package/src/core/beacon/aggregation/cohort/messages/index.ts +143 -0
- package/src/core/beacon/aggregation/cohort/messages/keygen/cohort-advert.ts +43 -0
- package/src/core/beacon/aggregation/cohort/messages/keygen/cohort-ready.ts +39 -0
- package/src/core/beacon/aggregation/cohort/messages/keygen/opt-in-accept.ts +34 -0
- package/src/core/beacon/aggregation/cohort/messages/keygen/opt-in.ts +33 -0
- package/src/core/beacon/aggregation/cohort/messages/keygen/subscribe.ts +35 -0
- package/src/core/beacon/aggregation/cohort/messages/sign/aggregated-nonce.ts +38 -0
- package/src/core/beacon/aggregation/cohort/messages/sign/authorization-request.ts +39 -0
- package/src/core/beacon/aggregation/cohort/messages/sign/nonce-contribution.ts +39 -0
- package/src/core/beacon/aggregation/cohort/messages/sign/request-signature.ts +39 -0
- package/src/core/beacon/aggregation/cohort/messages/sign/signature-authorization.ts +40 -0
- package/src/core/beacon/aggregation/communication/adapter/did-comm.ts +153 -0
- package/src/core/beacon/aggregation/communication/adapter/nostr.ts +300 -0
- package/src/core/beacon/aggregation/communication/error.ts +13 -0
- package/src/core/beacon/aggregation/communication/factory.ts +25 -0
- package/src/core/beacon/aggregation/communication/service.ts +42 -0
- package/src/core/beacon/aggregation/coordinator.ts +338 -67
- package/src/core/beacon/aggregation/participant.ts +512 -0
- package/src/core/beacon/aggregation/session/index.ts +289 -0
- package/src/core/beacon/aggregation/session/status.ts +18 -0
- package/src/core/beacon/cid-aggregate.ts +4 -5
- package/src/core/beacon/error.ts +44 -0
- package/src/core/beacon/factory.ts +2 -3
- package/src/core/beacon/singleton.ts +10 -8
- package/src/core/beacon/smt-aggregate.ts +4 -5
- package/src/{utils/beacons.ts → core/beacon/utils.ts} +5 -5
- package/src/core/crud/read.ts +7 -16
- package/src/core/crud/update.ts +25 -22
- package/src/{utils → core}/identifier.ts +35 -5
- package/src/did-btcr2.ts +4 -4
- package/src/index.ts +36 -8
- package/src/interfaces/beacon.ts +75 -5
- package/src/interfaces/crud.ts +1 -1
- package/src/utils/appendix.ts +3 -11
- package/src/utils/did-document-builder.ts +1 -1
- package/src/utils/did-document.ts +4 -7
- package/src/{types/crud.ts → utils/types.ts} +2 -2
- package/dist/cjs/core/beacon/aggregation/messages/advert.js +0 -24
- package/dist/cjs/core/beacon/aggregation/messages/advert.js.map +0 -1
- package/dist/cjs/core/beacon/aggregation/messages/base.js.map +0 -1
- package/dist/cjs/core/beacon/aggregation/messages/cohort-set.js +0 -25
- package/dist/cjs/core/beacon/aggregation/messages/cohort-set.js.map +0 -1
- package/dist/cjs/core/beacon/aggregation/messages/keygen.js +0 -8
- package/dist/cjs/core/beacon/aggregation/messages/keygen.js.map +0 -1
- package/dist/cjs/core/beacon/aggregation/messages/opt-in.js +0 -23
- package/dist/cjs/core/beacon/aggregation/messages/opt-in.js.map +0 -1
- package/dist/cjs/core/beacon/aggregation/messages/sign.js +0 -7
- package/dist/cjs/core/beacon/aggregation/messages/sign.js.map +0 -1
- package/dist/cjs/core/beacon/aggregation/models/cohort/index.js +0 -92
- package/dist/cjs/core/beacon/aggregation/models/cohort/index.js.map +0 -1
- package/dist/cjs/core/beacon/aggregation/models/cohort/status.js.map +0 -1
- package/dist/cjs/core/beacon/aggregation/protocol/nostr.js +0 -57
- package/dist/cjs/core/beacon/aggregation/protocol/nostr.js.map +0 -1
- package/dist/cjs/core/beacon/aggregation/protocol/service.js.map +0 -1
- package/dist/cjs/core/key-manager/index.js +0 -290
- package/dist/cjs/core/key-manager/index.js.map +0 -1
- package/dist/cjs/core/key-manager/interface.js +0 -2
- package/dist/cjs/core/key-manager/interface.js.map +0 -1
- package/dist/cjs/interfaces/ibeacon.js +0 -2
- package/dist/cjs/interfaces/ibeacon.js.map +0 -1
- package/dist/cjs/types/crud.js +0 -2
- package/dist/cjs/types/crud.js.map +0 -1
- package/dist/cjs/utils/beacons.js.map +0 -1
- package/dist/cjs/utils/identifier.js.map +0 -1
- package/dist/esm/core/beacon/aggregation/messages/advert.js +0 -24
- package/dist/esm/core/beacon/aggregation/messages/advert.js.map +0 -1
- package/dist/esm/core/beacon/aggregation/messages/base.js.map +0 -1
- package/dist/esm/core/beacon/aggregation/messages/cohort-set.js +0 -25
- package/dist/esm/core/beacon/aggregation/messages/cohort-set.js.map +0 -1
- package/dist/esm/core/beacon/aggregation/messages/keygen.js +0 -8
- package/dist/esm/core/beacon/aggregation/messages/keygen.js.map +0 -1
- package/dist/esm/core/beacon/aggregation/messages/opt-in.js +0 -23
- package/dist/esm/core/beacon/aggregation/messages/opt-in.js.map +0 -1
- package/dist/esm/core/beacon/aggregation/messages/sign.js +0 -7
- package/dist/esm/core/beacon/aggregation/messages/sign.js.map +0 -1
- package/dist/esm/core/beacon/aggregation/models/cohort/index.js +0 -92
- package/dist/esm/core/beacon/aggregation/models/cohort/index.js.map +0 -1
- package/dist/esm/core/beacon/aggregation/models/cohort/status.js.map +0 -1
- package/dist/esm/core/beacon/aggregation/protocol/nostr.js +0 -57
- package/dist/esm/core/beacon/aggregation/protocol/nostr.js.map +0 -1
- package/dist/esm/core/beacon/aggregation/protocol/service.js.map +0 -1
- package/dist/esm/core/key-manager/index.js +0 -290
- package/dist/esm/core/key-manager/index.js.map +0 -1
- package/dist/esm/core/key-manager/interface.js +0 -2
- package/dist/esm/core/key-manager/interface.js.map +0 -1
- package/dist/esm/interfaces/ibeacon.js +0 -2
- package/dist/esm/interfaces/ibeacon.js.map +0 -1
- package/dist/esm/types/crud.js +0 -2
- package/dist/esm/types/crud.js.map +0 -1
- package/dist/esm/utils/beacons.js.map +0 -1
- package/dist/esm/utils/identifier.js.map +0 -1
- package/dist/types/core/beacon/aggregation/messages/advert.d.ts +0 -22
- package/dist/types/core/beacon/aggregation/messages/advert.d.ts.map +0 -1
- package/dist/types/core/beacon/aggregation/messages/base.d.ts.map +0 -1
- package/dist/types/core/beacon/aggregation/messages/cohort-set.d.ts +0 -23
- package/dist/types/core/beacon/aggregation/messages/cohort-set.d.ts.map +0 -1
- package/dist/types/core/beacon/aggregation/messages/keygen.d.ts +0 -6
- package/dist/types/core/beacon/aggregation/messages/keygen.d.ts.map +0 -1
- package/dist/types/core/beacon/aggregation/messages/opt-in.d.ts +0 -22
- package/dist/types/core/beacon/aggregation/messages/opt-in.d.ts.map +0 -1
- package/dist/types/core/beacon/aggregation/messages/sign.d.ts +0 -5
- package/dist/types/core/beacon/aggregation/messages/sign.d.ts.map +0 -1
- package/dist/types/core/beacon/aggregation/models/cohort/index.d.ts +0 -77
- package/dist/types/core/beacon/aggregation/models/cohort/index.d.ts.map +0 -1
- package/dist/types/core/beacon/aggregation/models/cohort/status.d.ts.map +0 -1
- package/dist/types/core/beacon/aggregation/protocol/nostr.d.ts +0 -36
- package/dist/types/core/beacon/aggregation/protocol/nostr.d.ts.map +0 -1
- package/dist/types/core/beacon/aggregation/protocol/service.d.ts +0 -6
- package/dist/types/core/beacon/aggregation/protocol/service.d.ts.map +0 -1
- package/dist/types/core/key-manager/index.d.ts +0 -145
- package/dist/types/core/key-manager/index.d.ts.map +0 -1
- package/dist/types/core/key-manager/interface.d.ts +0 -113
- package/dist/types/core/key-manager/interface.d.ts.map +0 -1
- package/dist/types/interfaces/ibeacon.d.ts +0 -65
- package/dist/types/interfaces/ibeacon.d.ts.map +0 -1
- package/dist/types/types/crud.d.ts.map +0 -1
- package/dist/types/utils/beacons.d.ts.map +0 -1
- package/dist/types/utils/identifier.d.ts.map +0 -1
- package/src/core/beacon/aggregation/messages/advert.ts +0 -36
- package/src/core/beacon/aggregation/messages/cohort-set.ts +0 -37
- package/src/core/beacon/aggregation/messages/keygen.ts +0 -8
- package/src/core/beacon/aggregation/messages/opt-in.ts +0 -35
- package/src/core/beacon/aggregation/messages/sign.ts +0 -7
- package/src/core/beacon/aggregation/models/cohort/index.ts +0 -112
- package/src/core/beacon/aggregation/protocol/nostr.ts +0 -81
- package/src/core/beacon/aggregation/protocol/service.ts +0 -6
- package/src/core/key-manager/index.ts +0 -364
- package/src/core/key-manager/interface.ts +0 -129
- package/src/interfaces/ibeacon.ts +0 -75
- /package/dist/cjs/core/beacon/aggregation/{models/cohort → cohort}/status.js +0 -0
- /package/dist/cjs/core/beacon/aggregation/{protocol → communication}/service.js +0 -0
- /package/dist/esm/core/beacon/aggregation/{models/cohort → cohort}/status.js +0 -0
- /package/dist/esm/core/beacon/aggregation/{protocol → communication}/service.js +0 -0
- /package/dist/types/core/beacon/aggregation/{models/cohort → cohort}/status.d.ts +0 -0
- /package/src/core/beacon/aggregation/{models/cohort → cohort}/status.ts +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { KeyBytes, Maybe } from '@did-btcr2/common';
|
|
2
2
|
import { networks } from 'bitcoinjs-lib';
|
|
3
|
-
import { BeaconService, BeaconServiceAddress } from '
|
|
4
|
-
import { DidDocument } from '
|
|
3
|
+
import { BeaconService, BeaconServiceAddress } from '../../interfaces/beacon.js';
|
|
4
|
+
import { DidDocument } from '../../utils/did-document.js';
|
|
5
5
|
export interface GenerateBeaconParams {
|
|
6
6
|
identifier: string;
|
|
7
7
|
publicKey: KeyBytes;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/core/beacon/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,QAAQ,EAAE,KAAK,EAAe,MAAM,mBAAmB,CAAC;AAEjF,OAAO,EAAE,QAAQ,EAAY,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEjF,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,QAAQ,CAAC;IACpB,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;CACd;AACD;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACzC,SAAS,EAAE,QAAQ,CAAC;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AAE,QAAQ,CAAC,OAAO,CAAC;QAC1B,WAAW,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;QACzC,IAAI,EAAE,MAAM,CAAC;KACd,GAAG,aAAa;IAiBjB;;;;;;;OAOG;WACW,sBAAsB,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;QAC7E,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,QAAQ,CAAC;QACpB,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC;QAC1B,IAAI,EAAE,MAAM,CAAC;KACd,GAAG,KAAK,CAAC,aAAa,CAAC;IAexB;;;;;;;;;OASG;WACW,cAAc,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;QACrE,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,QAAQ,CAAC;QACpB,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC;QAC1B,IAAI,EAAE,MAAM,CAAC;KACd,GAAG,aAAa;IAiBjB;;;;;;;OAOG;WACW,iBAAiB,CAAC,MAAM,EAAE,aAAa,GAAG,aAAa;IAIrE;;;;OAIG;WACW,sBAAsB,CAAC,OAAO,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,oBAAoB,CAAC;IAIhG;;;;OAIG;WACW,0BAA0B,CAAC,OAAO,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC;IAK1G;;;;OAIG;WACW,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,EAAE;CAGtE"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { BitcoinCoreRpcClient, BitcoinRestClient, BlockV3 } from '@did-btcr2/bitcoin';
|
|
2
2
|
import { BitcoinNetworkNames, DidUpdatePayload, UnixTimestamp } from '@did-btcr2/common';
|
|
3
|
+
import { BeaconService, BeaconServiceAddress, BeaconSignal } from '../../interfaces/beacon.js';
|
|
3
4
|
import { DidResolutionOptions } from '../../interfaces/crud.js';
|
|
4
|
-
import { BeaconService, BeaconServiceAddress, BeaconSignal } from '../../interfaces/ibeacon.js';
|
|
5
|
-
import { SignalsMetadata } from '../../types/crud.js';
|
|
6
|
-
import { DidComponents } from '../../utils/appendix.js';
|
|
7
5
|
import { DidDocument } from '../../utils/did-document.js';
|
|
6
|
+
import { SignalsMetadata } from '../../utils/types.js';
|
|
7
|
+
import { DidComponents } from '../identifier.js';
|
|
8
8
|
export type FindNextSignalsRestParams = {
|
|
9
9
|
connection: BitcoinRestClient;
|
|
10
10
|
beaconSignals: Array<BeaconSignal>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../../src/core/crud/read.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EAEpB,iBAAiB,EACjB,OAAO,EAMR,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAUhB,aAAa,EACd,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EAAE,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../../src/core/crud/read.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EAEpB,iBAAiB,EACjB,OAAO,EAMR,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAUhB,aAAa,EACd,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/F,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAGL,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,aAAa,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AAiB,EAAE,MAAM,EAAE,CAAC;KAC7B,GAAG,OAAO,CAAC,IAAI,CAAC;IAyBjB;;;;;;;;;;;;;;;OAeG;WACiB,cAAc,CAAC,EAAE,uBAAuB,EAAE,MAAM,EAAE,EAAE;QACtE,uBAAuB,EAAE,WAAW,CAAC;QACrC,MAAM,EAAE,gBAAgB,CAAC;KAC1B,GAAG,OAAO,CAAC,WAAW,CAAC;CAuEzB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DidUpdateInvocation, DidUpdatePayload, PatchOperation } from '@did-btcr2/common';
|
|
2
|
-
import { SignalsMetadata } from '../../types/crud.js';
|
|
3
2
|
import { DidDocument, DidVerificationMethod } from '../../utils/did-document.js';
|
|
3
|
+
import { SignalsMetadata } from '../../utils/types.js';
|
|
4
4
|
export interface ConstructUpdateParams {
|
|
5
5
|
identifier: string;
|
|
6
6
|
sourceDocument: DidDocument;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../src/core/crud/update.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../src/core/crud/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,mBAAmB,EACnB,gBAAgB,EAOhB,cAAc,EAEf,MAAM,mBAAmB,CAAC;AAO3B,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAIvD,MAAM,WAAW,qBAAqB;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,WAAW,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,cAAc,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,YAAa,SAAQ,qBAAqB;IACvD,oBAAoB,EAAE,MAAM,CAAC;IAC7B,SAAS,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,kBAAkB,EAAE,qBAAqB,CAAC;CAC3C,CAAA;AAED;;;;;;;;;;;GAWG;AACH,qBAAa,MAAM;IACjB;;;;;;;;;;;;;;OAcG;WACiB,SAAS,CAAC,EAC5B,UAAU,EACV,cAAc,EACd,eAAe,EACf,KAAK,GACN,EAAE;QACD,UAAU,EAAE,MAAM,CAAC;QACnB,cAAc,EAAE,WAAW,CAAC;QAC5B,eAAe,EAAE,MAAM,CAAC;QACxB,KAAK,EAAE,cAAc,EAAE,CAAC;KACzB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IA8C7B;;;;;;;;;;;;;;OAcG;WACiB,MAAM,CAAC,EACzB,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EACnB,EAAE;QACD,UAAU,EAAE,MAAM,CAAC;QACnB,gBAAgB,EAAE,gBAAgB,CAAC;QACnC,kBAAkB,EAAE,qBAAqB,CAAC;KAC3C,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAuEhC;;;;;;;;;;;;;;OAcG;WACiB,QAAQ,CAAC,EAC3B,cAAc,EACd,SAAS,EACT,mBAAmB,EACpB,EAAE;QACD,cAAc,EAAE,WAAW,CAAC;QAC5B,SAAS,EAAE,MAAM,EAAE,CAAC;QACpB,mBAAmB,EAAE,mBAAmB,CAAC;KAC1C,GAAG,OAAO,CAAC,eAAe,CAAC;CAgD7B"}
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import { Bytes } from '@did-btcr2/common';
|
|
2
2
|
import { SchnorrKeyPair } from '@did-btcr2/keypair';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Components of a did:btcr2 identifier.
|
|
5
|
+
* @interface DidComponents
|
|
6
|
+
* @property {string} hrp The human-readable part of the Bech32m encoding.
|
|
7
|
+
* @property {string} idType Identifier type (key or external).
|
|
8
|
+
* @property {number} version Identifier version.
|
|
9
|
+
* @property {string | number} network Bitcoin network name or number.
|
|
10
|
+
* @property {Bytes} genesisBytes Public key or an intermediate document bytes.
|
|
11
|
+
*/
|
|
12
|
+
export interface DidComponents {
|
|
13
|
+
hrp: string;
|
|
14
|
+
idType: string;
|
|
15
|
+
version: number;
|
|
16
|
+
network: string;
|
|
17
|
+
genesisBytes: Bytes;
|
|
18
|
+
}
|
|
4
19
|
/**
|
|
5
20
|
* Implements {@link https://dcdpr.github.io/did-btcr2/#syntax | 3 Syntax}.
|
|
6
21
|
* A did:btcr2 DID consists of a did:btcr2 prefix, followed by an id-bech32 value, which is a Bech32m encoding of:
|
|
@@ -23,7 +38,7 @@ export declare class Identifier {
|
|
|
23
38
|
* - a key-value representing a secp256k1 public key; or
|
|
24
39
|
* - a hash-value representing the hash of an initiating external DID document.
|
|
25
40
|
*
|
|
26
|
-
* @param {
|
|
41
|
+
* @param {DidComponents} params See {@link DidComponents} for details.
|
|
27
42
|
* @param {IdentifierTypes} params.idType Identifier type (key or external).
|
|
28
43
|
* @param {string} params.network Bitcoin network name.
|
|
29
44
|
* @param {number} params.version Identifier version.
|
|
@@ -33,7 +48,7 @@ export declare class Identifier {
|
|
|
33
48
|
static encode({ idType, version, network, genesisBytes }: {
|
|
34
49
|
idType: string;
|
|
35
50
|
version: number;
|
|
36
|
-
network: string
|
|
51
|
+
network: string;
|
|
37
52
|
genesisBytes: Bytes;
|
|
38
53
|
}): string;
|
|
39
54
|
/**
|
|
@@ -56,4 +71,10 @@ export declare class Identifier {
|
|
|
56
71
|
id: string;
|
|
57
72
|
};
|
|
58
73
|
};
|
|
74
|
+
/**
|
|
75
|
+
* Validates a did:btcr2 identifier.
|
|
76
|
+
* @param {string} identifier The did:btcr2 identifier to validate.
|
|
77
|
+
* @returns {boolean} True if the identifier is valid, false otherwise.
|
|
78
|
+
*/
|
|
79
|
+
static isValid(identifier: string): boolean;
|
|
59
80
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identifier.d.ts","sourceRoot":"","sources":["../../../src/core/identifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,EAAmE,MAAM,mBAAmB,CAAC;AAChI,OAAO,EAAgC,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGlF;;;;;;;;GAQG;AACH,MAAM,WAAW,aAAa;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,KAAK,CAAC;CACvB;AAED;;;;;;;;;;GAUG;AACH,qBAAa,UAAU;IACrB;;;;;;;;;;;;;;;;OAgBG;WACW,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE;QAC/D,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,YAAY,EAAE,KAAK,CAAC;KACrB,GAAG,MAAM;IAuFV;;;;;;;OAOG;WACW,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,aAAa;IA8HvD;;;OAGG;WACW,QAAQ,IAAI;QAAE,IAAI,EAAE,cAAc,CAAC;QAAC,UAAU,EAAE;YAAE,UAAU,EAAE,MAAM,CAAC;YAAC,EAAE,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE;IAYlG;;;;OAIG;IACH,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;CAQ5C"}
|
|
@@ -3,7 +3,7 @@ import type { DidResolutionResult } from '@web5/dids';
|
|
|
3
3
|
import { DidMethod } from '@web5/dids';
|
|
4
4
|
import { DidResolutionOptions } from './interfaces/crud.js';
|
|
5
5
|
import { DidDocument, DidVerificationMethod } from './utils/did-document.js';
|
|
6
|
-
import { SignalsMetadata } from './types
|
|
6
|
+
import { SignalsMetadata } from './utils/types.js';
|
|
7
7
|
export type Btcr2Identifier = string;
|
|
8
8
|
export interface DidCreateOptions {
|
|
9
9
|
/** DID BTCR2 Version Number */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"did-btcr2.d.ts","sourceRoot":"","sources":["../../src/did-btcr2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAEb,QAAQ,EAGR,cAAc,EAEf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAIL,SAAS,EAEV,MAAM,YAAY,CAAC;AAKpB,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"did-btcr2.d.ts","sourceRoot":"","sources":["../../src/did-btcr2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAEb,QAAQ,EAGR,cAAc,EAEf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAIL,SAAS,EAEV,MAAM,YAAY,CAAC;AAKpB,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAInD,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AAErC,MAAM,WAAW,gBAAgB;IAC/B,+BAA+B;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sBAAsB;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAKD;;;;;;;;;;GAUG;AACH,qBAAa,QAAS,YAAW,SAAS;IACxC,uFAAuF;IACvF,OAAc,UAAU,EAAE,MAAM,CAAW;IAE3C;;;;;;;;;;;;;;;;;OAiBG;WACiB,MAAM,CAAC,MAAM,EAAE;QACjC,MAAM,EAAE,KAAK,GAAG,UAAU,CAAC;QAC3B,YAAY,EAAE,QAAQ,GAAG,aAAa,CAAC;QACvC,OAAO,CAAC,EAAE,gBAAgB,CAAC;KAC5B,GAAG,OAAO,CAAC,eAAe,CAAC;IAa5B;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;WACiB,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,kBAAkB,GAAE,oBAAyB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IA2C5H;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;WACiB,MAAM,CAAC,MAAM,EAAE;QACjC,UAAU,EAAE,MAAM,CAAC;QACnB,cAAc,EAAE,WAAW,CAAC;QAC5B,eAAe,EAAE,MAAM,CAAC;QACxB,KAAK,EAAE,cAAc,EAAE,CAAC;QACxB,oBAAoB,EAAE,MAAM,CAAC;QAC7B,SAAS,EAAE,MAAM,EAAE,CAAC;KACrB,GAAG,OAAO,CAAC,eAAe,CAAC;IAuD5B;;;;;;;;;;;OAWG;WACW,gBAAgB,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE;QACxD,WAAW,EAAE,WAAW,CAAC;QACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,GAAG,qBAAqB;CA0B1B"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,20 +1,42 @@
|
|
|
1
|
+
export * from './core/beacon/aggregation/cohort/messages/keygen/cohort-advert.js';
|
|
2
|
+
export * from './core/beacon/aggregation/cohort/messages/keygen/cohort-ready.js';
|
|
3
|
+
export * from './core/beacon/aggregation/cohort/messages/keygen/opt-in-accept.js';
|
|
4
|
+
export * from './core/beacon/aggregation/cohort/messages/keygen/opt-in.js';
|
|
5
|
+
export * from './core/beacon/aggregation/cohort/messages/keygen//subscribe.js';
|
|
6
|
+
export * from './core/beacon/aggregation/cohort/messages/sign/aggregated-nonce.js';
|
|
7
|
+
export * from './core/beacon/aggregation/cohort/messages/sign/authorization-request.js';
|
|
8
|
+
export * from './core/beacon/aggregation/cohort/messages/sign/nonce-contribution.js';
|
|
9
|
+
export * from './core/beacon/aggregation/cohort/messages/sign/request-signature.js';
|
|
10
|
+
export * from './core/beacon/aggregation/cohort/messages/sign/signature-authorization.js';
|
|
11
|
+
export * from './core/beacon/aggregation/cohort/messages/base.js';
|
|
12
|
+
export * from './core/beacon/aggregation/cohort/messages/constants.js';
|
|
13
|
+
export * from './core/beacon/aggregation/cohort/messages/index.js';
|
|
14
|
+
export * from './core/beacon/aggregation/cohort/index.js';
|
|
15
|
+
export * from './core/beacon/aggregation/cohort/status.js';
|
|
16
|
+
export * from './core/beacon/aggregation/communication/adapter/did-comm.js';
|
|
17
|
+
export * from './core/beacon/aggregation/communication/adapter/nostr.js';
|
|
18
|
+
export * from './core/beacon/aggregation/communication/error.js';
|
|
19
|
+
export * from './core/beacon/aggregation/communication/factory.js';
|
|
20
|
+
export * from './core/beacon/aggregation/communication/service.js';
|
|
21
|
+
export * from './core/beacon/aggregation/session/index.js';
|
|
22
|
+
export * from './core/beacon/aggregation/session/status.js';
|
|
23
|
+
export * from './core/beacon/aggregation/coordinator.js';
|
|
24
|
+
export * from './core/beacon/aggregation/participant.js';
|
|
1
25
|
export * from './core/beacon/cid-aggregate.js';
|
|
26
|
+
export * from './core/beacon/error.js';
|
|
2
27
|
export * from './core/beacon/factory.js';
|
|
3
28
|
export * from './core/beacon/singleton.js';
|
|
4
29
|
export * from './core/beacon/smt-aggregate.js';
|
|
30
|
+
export * from './core/beacon/utils.js';
|
|
5
31
|
export * from './core/crud/deactivate.js';
|
|
6
32
|
export * from './core/crud/read.js';
|
|
7
33
|
export * from './core/crud/update.js';
|
|
8
|
-
export * from './core/
|
|
9
|
-
export * from './core/key-manager/interface.js';
|
|
34
|
+
export * from './core/identifier.js';
|
|
10
35
|
export * from './interfaces/beacon.js';
|
|
11
36
|
export * from './interfaces/crud.js';
|
|
12
|
-
export * from './interfaces/ibeacon.js';
|
|
13
|
-
export * from './types/crud.js';
|
|
14
37
|
export * from './utils/appendix.js';
|
|
15
|
-
export * from './utils/beacons.js';
|
|
16
38
|
export * from './utils/did-document-builder.js';
|
|
17
39
|
export * from './utils/did-document.js';
|
|
18
40
|
export * from './utils/general.js';
|
|
19
|
-
export * from './utils/
|
|
41
|
+
export * from './utils/types.js';
|
|
20
42
|
export * from './did-btcr2.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mEAAmE,CAAC;AAClF,cAAc,kEAAkE,CAAC;AACjF,cAAc,mEAAmE,CAAC;AAClF,cAAc,4DAA4D,CAAC;AAC3E,cAAc,gEAAgE,CAAC;AAE/E,cAAc,oEAAoE,CAAC;AACnF,cAAc,yEAAyE,CAAC;AACxF,cAAc,sEAAsE,CAAC;AACrF,cAAc,qEAAqE,CAAC;AACpF,cAAc,2EAA2E,CAAC;AAE1F,cAAc,mDAAmD,CAAC;AAClE,cAAc,wDAAwD,CAAC;AACvE,cAAc,oDAAoD,CAAC;AAEnE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC;AAE3D,cAAc,6DAA6D,CAAC;AAC5E,cAAc,0DAA0D,CAAC;AACzE,cAAc,kDAAkD,CAAC;AACjE,cAAc,oDAAoD,CAAC;AACnE,cAAc,oDAAoD,CAAC;AAEnE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,6CAA6C,CAAC;AAE5D,cAAc,0CAA0C,CAAC;AACzD,cAAc,0CAA0C,CAAC;AAEzD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AAEvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,sBAAsB,CAAC;AAErC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AAErC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AAEjC,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,8 +1,68 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { SidecarData, SignalsMetadata } from '../types
|
|
5
|
-
|
|
1
|
+
import { RawTransactionRest, RawTransactionV2 } from '@did-btcr2/bitcoin';
|
|
2
|
+
import { DidUpdatePayload, UnixTimestamp } from '@did-btcr2/common';
|
|
3
|
+
import { DidServiceEndpoint, DidService as IDidService } from '@web5/dids';
|
|
4
|
+
import { SidecarData, SignalsMetadata } from '../utils/types.js';
|
|
5
|
+
/**
|
|
6
|
+
* Beacon interface
|
|
7
|
+
* @interface IBeacon
|
|
8
|
+
* @type {IBeacon}
|
|
9
|
+
*/
|
|
10
|
+
export interface IBeacon {
|
|
11
|
+
/**
|
|
12
|
+
* A unique identifier for the Beacon
|
|
13
|
+
* @type {string}
|
|
14
|
+
*/
|
|
15
|
+
id: string;
|
|
16
|
+
/**
|
|
17
|
+
* The type of the Beacon
|
|
18
|
+
* @type {string}
|
|
19
|
+
*/
|
|
20
|
+
type: string;
|
|
21
|
+
/**
|
|
22
|
+
* The service endpoint of the Beacon
|
|
23
|
+
* @type {string}
|
|
24
|
+
*/
|
|
25
|
+
serviceEndpoint: DidServiceEndpoint;
|
|
26
|
+
/**
|
|
27
|
+
* Returns the Beacon Service object
|
|
28
|
+
* @type {BeaconService}
|
|
29
|
+
*/
|
|
30
|
+
service: BeaconService;
|
|
31
|
+
/**
|
|
32
|
+
* Generates a Beacon Signal Transaction
|
|
33
|
+
* @param {string} didUpdatePayload The DID update payload
|
|
34
|
+
* @returns {BeaconSignal} The Beacon Signal
|
|
35
|
+
*/
|
|
36
|
+
generateSignal(didUpdatePayload: string): BeaconSignal;
|
|
37
|
+
/**
|
|
38
|
+
* Processes a Beacon Signal.
|
|
39
|
+
* @param {RawTransactionV2} signal The raw transaction
|
|
40
|
+
* @param {SidecarData} signalsMetadata The signals metadata from the sidecar data
|
|
41
|
+
* @returns {Promise<DidUpdatePayload | undefined>} The DID update payload
|
|
42
|
+
*/
|
|
43
|
+
processSignal(signal: RawTransactionV2, signalsMetadata: SignalsMetadata): Promise<DidUpdatePayload | undefined>;
|
|
44
|
+
/**
|
|
45
|
+
* Broadcasts a signal.
|
|
46
|
+
* @param {DidUpdatePayload} didUpdatePayload The DID update payload.
|
|
47
|
+
* @returns {Promise<SignalMetadata>} The signal metadata.
|
|
48
|
+
*/
|
|
49
|
+
broadcastSignal(didUpdatePayload: DidUpdatePayload): Promise<SignalsMetadata>;
|
|
50
|
+
}
|
|
51
|
+
export interface BeaconService extends IDidService {
|
|
52
|
+
serviceEndpoint: DidServiceEndpoint;
|
|
53
|
+
casType?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface BeaconServiceAddress extends BeaconService {
|
|
56
|
+
address: string;
|
|
57
|
+
}
|
|
58
|
+
export interface BeaconSignal {
|
|
59
|
+
beaconId: string;
|
|
60
|
+
beaconType: string;
|
|
61
|
+
beaconAddress: string;
|
|
62
|
+
tx: RawTransactionRest | RawTransactionV2;
|
|
63
|
+
blockheight: number;
|
|
64
|
+
blocktime: UnixTimestamp;
|
|
65
|
+
}
|
|
6
66
|
/**
|
|
7
67
|
* Implements {@link https://dcdpr.github.io/did-btcr2/#update-beacons | 5. Beacons}.
|
|
8
68
|
* Beacons are the mechanism by which a DID controller announces an update to their DID document by broadcasting an
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"beacon.d.ts","sourceRoot":"","sources":["../../../src/interfaces/beacon.ts"],"names":[],"mappings":"AAAA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EAAE,EAAE,kBAAkB,GAAG,gBAAgB,CAAC;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,aAAa,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,8BAAsB,MAAO,YAAW,OAAO;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,kBAAkB,CAAC;IACpC,OAAO,CAAC,EAAE,WAAW,CAAC;gBAEjB,EAAE,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,WAAW;IAO/E;;OAEG;IACH,QAAQ,KAAK,OAAO,IAAI,aAAa,CAAC;IAEtC;;OAEG;IACH,QAAQ,CAAC,cAAc,CAAC,gBAAgB,EAAE,MAAM,GAAG,YAAY;IAE/D;;OAEG;IACH,QAAQ,CAAC,aAAa,CAAC,MAAM,EAAE,kBAAkB,GAAG,gBAAgB,EAAE,eAAe,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC;IAE9I;;OAEG;IACH,QAAQ,CAAC,eAAe,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;CACvF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UnixTimestamp } from '@did-btcr2/common';
|
|
2
2
|
import { DidResolutionOptions as IDidResolutionOptions } from '@web5/dids';
|
|
3
|
-
import { SidecarData } from '../types/crud.js';
|
|
4
3
|
import { DidDocument } from '../utils/did-document.js';
|
|
4
|
+
import { SidecarData } from '../utils/types.js';
|
|
5
5
|
/**
|
|
6
6
|
* Options for resolving a DID Document
|
|
7
7
|
* @param {?number} versionId The versionId for resolving the DID Document
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crud.d.ts","sourceRoot":"","sources":["../../../src/interfaces/crud.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,oBAAoB,IAAI,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"crud.d.ts","sourceRoot":"","sources":["../../../src/interfaces/crud.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,oBAAoB,IAAI,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,WAAW,oBAAqB,SAAQ,qBAAqB;IACjE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,WAAW,cAAc;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;CAC5B;AACD,MAAM,WAAW,oBAAoB;IACnC,uBAAuB,EAAE,WAAW,CAAC;IACrC,uBAAuB,EAAE,MAAM,GAAG,CAAC,CAAC;IACpC,gBAAgB,EAAE,MAAM,GAAG,CAAC,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,OAAO,CAAC,EAAE,oBAAoB,CAAC;CAChC"}
|
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DidDocument, DidService } from '@web5/dids';
|
|
1
|
+
import { HashBytes } from '@did-btcr2/common';
|
|
2
|
+
import { DidDocument, DidService, DidVerificationMethod } from '@web5/dids';
|
|
3
3
|
import { RootCapability } from '../interfaces/crud.js';
|
|
4
|
-
import { DidVerificationMethod } from './did-document.js';
|
|
5
|
-
export interface DidComponents {
|
|
6
|
-
hrp: string;
|
|
7
|
-
idType: string;
|
|
8
|
-
version: number;
|
|
9
|
-
network: string;
|
|
10
|
-
genesisBytes: Bytes;
|
|
11
|
-
}
|
|
12
4
|
/**
|
|
13
5
|
* Implements {@link https://dcdpr.github.io/did-btcr2/#appendix | 9. Appendix} methods.
|
|
14
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appendix.d.ts","sourceRoot":"","sources":["../../../src/utils/appendix.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"appendix.d.ts","sourceRoot":"","sources":["../../../src/utils/appendix.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAe,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EACL,WAAW,EAGX,UAAU,EACV,qBAAqB,EAEtB,MAAM,YAAY,CAAC;AAIpB,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;;GAKG;AACH,qBAAa,QAAQ;IACnB;;;;OAIG;WACW,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS;IAMpE;;;;OAIG;WACW,uBAAuB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,qBAAqB;IAcjF;;;;OAIG;WACW,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,UAAU;IAW3D;;;;;OAKG;WACW,sBAAsB,CAAC,WAAW,EAAE,WAAW,GAAG,qBAAqB,EAAE;IAgBvF;;;;;;;;;;;;;;;;;;;;OAoBG;WACW,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,cAAc;IAwBtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;WACW,kCAAkC,CAAC,YAAY,EAAE,MAAM,GAAG,cAAc;IA+CtF;;;;;;;;;OASG;WACiB,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CAepF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"did-document-builder.d.ts","sourceRoot":"","sources":["../../../src/utils/did-document-builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"did-document-builder.d.ts","sourceRoot":"","sources":["../../../src/utils/did-document-builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAEvE,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,QAAQ,CAA4B;gBAEhC,eAAe,EAAE,OAAO,CAAC,WAAW,CAAC;IAYjD,cAAc,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI;IAOhD,kBAAkB,CAAC,cAAc,EAAE,KAAK,CAAC,MAAM,GAAG,qBAAqB,CAAC,GAAG,IAAI;IAO/E,mBAAmB,CAAC,eAAe,EAAE,KAAK,CAAC,MAAM,GAAG,qBAAqB,CAAC,GAAG,IAAI;IAOjF,wBAAwB,CAAC,oBAAoB,EAAE,KAAK,CAAC,MAAM,GAAG,qBAAqB,CAAC,GAAG,IAAI;IAO3F,wBAAwB,CAAC,oBAAoB,EAAE,KAAK,CAAC,MAAM,GAAG,qBAAqB,CAAC,GAAG,IAAI;IAO3F,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,IAAI;IAOhD,KAAK,IAAI,WAAW;CAWrB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSONObject, KeyBytes } from '@did-btcr2/common';
|
|
2
2
|
import { DidDocument as IIDidDocument, DidVerificationMethod as IIDidVerificationMethod } from '@web5/dids';
|
|
3
|
-
import { BeaconService } from '../interfaces/
|
|
3
|
+
import { BeaconService } from '../interfaces/beacon.js';
|
|
4
4
|
export declare const BECH32M_CHARS = "";
|
|
5
5
|
export declare const DID_REGEX: RegExp;
|
|
6
6
|
export type ExternalData = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"did-document.d.ts","sourceRoot":"","sources":["../../../src/utils/did-document.ts"],"names":[],"mappings":"AACA,OAAO,EAML,UAAU,EACV,QAAQ,
|
|
1
|
+
{"version":3,"file":"did-document.d.ts","sourceRoot":"","sources":["../../../src/utils/did-document.ts"],"names":[],"mappings":"AACA,OAAO,EAML,UAAU,EACV,QAAQ,EACT,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAc,WAAW,IAAI,aAAa,EAAE,qBAAqB,IAAI,uBAAuB,EAAE,MAAM,YAAY,CAAC;AACxH,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAKxD,eAAO,MAAM,aAAa,KAAK,CAAC;AAChC,eAAO,MAAM,SAAS,QAAuD,CAAC;AAE9E,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,kBAAkB,EAAE,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACjD,cAAc,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,qBAAqB,CAAC,CAAC;IACvD,eAAe,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,qBAAqB,CAAC,CAAC;IACxD,oBAAoB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,qBAAqB,CAAC,CAAC;IAC7D,oBAAoB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,qBAAqB,CAAC,CAAC;IAC7D,OAAO,EAAE,KAAK,CAAC,aAAa,CAAC,CAAA;CAC9B,CAAA;AACD,MAAM,MAAM,yBAAyB,GAAG;IACtC,cAAc,CA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Ac;IAO7B;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,SAAS;IASxB;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAOhC;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,0BAA0B;IAIzC;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,eAAe;IAI9B;;;;;OAKG;WACW,gCAAgC,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO;IA6BjF;;;;OAIG;WACW,QAAQ,CAAC,WAAW,EAAE,WAAW,GAAG,uBAAuB,GAAG,WAAW;IAWvF;;;OAGG;IACI,oBAAoB,IAAI,OAAO;IAyBtC;;;OAGG;IACI,cAAc,IAAI,uBAAuB;CAMjD;AAED;;;;;;GAMG;AACH,qBAAa,uBAAwB,SAAQ,WAAW;gBAC1C,QAAQ,EAAE,UAAU;IAIhC;;;;OAIG;IACI,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW;IAO9C;;;;OAIG;WACW,eAAe,CAAC,WAAW,EAAE,WAAW,GAAG,uBAAuB;IAKhF;;;;;;OAMG;WACW,MAAM,CAClB,kBAAkB,EAAE,KAAK,CAAC,qBAAqB,CAAC,EAChD,aAAa,EAAE,yBAAyB,EACxC,OAAO,EAAE,KAAK,CAAC,aAAa,CAAC,GAC5B,uBAAuB;IAK1B;;;;OAIG;WACW,aAAa,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,uBAAuB;IA6B1F;;;;OAIG;WACW,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,uBAAuB;CAGpE;AAED,qBAAa,QAAQ;WACL,OAAO,CAAC,WAAW,EAAE,WAAW,GAAG,uBAAuB,GAAG,OAAO;CAGnF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DidUpdatePayload, ProofBytes } from '@did-btcr2/common';
|
|
2
|
-
import { BeaconService } from '../interfaces/
|
|
3
|
-
import { DidDocument } from '
|
|
2
|
+
import { BeaconService } from '../interfaces/beacon.js';
|
|
3
|
+
import { DidDocument } from './did-document.js';
|
|
4
4
|
import { BlockV3 } from '@did-btcr2/bitcoin';
|
|
5
5
|
export type FindNextSignals = {
|
|
6
6
|
block: BlockV3;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,aAAa,EAAE,CAAA;CACzB,CAAC;AACF,MAAM,MAAM,QAAQ,GAAG;IACrB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AACF,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC;AACzC,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,MAAM,CAAC;CACb;AACD,MAAM,MAAM,eAAe,GAAG;IAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAC;CAAE,CAAC;AAChE,MAAM,WAAW,gBAAiB,SAAQ,OAAO;IAC/C,eAAe,EAAE,eAAe,CAAC;CAClC;AACD,MAAM,WAAW,mBAAoB,SAAQ,OAAO;IAClD,eAAe,EAAE,WAAW,CAAC;IAC7B,eAAe,EAAE,eAAe,CAAC;IACjC,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC3B;AACD,MAAM,WAAW,mBAAoB,SAAQ,OAAO;IAClD,eAAe,EAAE,WAAW,CAAC;IAC7B,eAAe,EAAE,eAAe,CAAC;IACjC,QAAQ,EAAE,UAAU,CAAC;CACtB;AACD,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAC7B,CAAC,SAAS,iBAAiB,GAAG,gBAAgB,GAC9C,CAAC,SAAS,oBAAoB,GAAG,mBAAmB,GACpD,CAAC,SAAS,oBAAoB,GAAG,mBAAmB,GACpD,CAAC,CAAC;AACJ,MAAM,MAAM,WAAW,GAAG,iBAAiB,CAAC,gBAAgB,GAAG,mBAAmB,GAAG,mBAAmB,CAAC,CAAC;AAC1G,MAAM,MAAM,sBAAsB,GAAG;IACnC,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@did-btcr2/method",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Javascript/TypeScript reference implementation of did:btcr2 method, a censorship resistant DID Method using the Bitcoin blockchain as a Verifiable Data Registry to announce changes to the DID document. Core package of the did-btcr2-js monorepo.",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
@@ -83,9 +83,10 @@
|
|
|
83
83
|
"multiformats": "^13.3.1",
|
|
84
84
|
"nostr-tools": "^2.15.0",
|
|
85
85
|
"tiny-secp256k1": "^2.2.3",
|
|
86
|
-
"@did-btcr2/bitcoin": "0.3.
|
|
86
|
+
"@did-btcr2/bitcoin": "0.3.2",
|
|
87
|
+
"@did-btcr2/common": "2.2.2",
|
|
88
|
+
"@did-btcr2/kms": "0.1.1",
|
|
87
89
|
"@did-btcr2/cryptosuite": "3.2.1",
|
|
88
|
-
"@did-btcr2/common": "2.2.1",
|
|
89
90
|
"@did-btcr2/keypair": "0.7.1"
|
|
90
91
|
},
|
|
91
92
|
"devDependencies": {
|