@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
package/src/did-btcr2.ts
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
METHOD_NOT_SUPPORTED,
|
|
6
6
|
MethodError,
|
|
7
7
|
PatchOperation,
|
|
8
|
-
W3C_DID_RESOLUTION_V1
|
|
8
|
+
W3C_DID_RESOLUTION_V1,
|
|
9
9
|
} from '@did-btcr2/common';
|
|
10
10
|
import type { DidResolutionResult } from '@web5/dids';
|
|
11
11
|
import {
|
|
@@ -20,10 +20,10 @@ import * as tinysecp from 'tiny-secp256k1';
|
|
|
20
20
|
import { Resolve } from './core/crud/read.js';
|
|
21
21
|
import { Update } from './core/crud/update.js';
|
|
22
22
|
import { DidResolutionOptions } from './interfaces/crud.js';
|
|
23
|
-
import { Appendix } from './utils/appendix.js';
|
|
24
23
|
import { DidDocument, DidVerificationMethod } from './utils/did-document.js';
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
24
|
+
import { SignalsMetadata } from './utils/types.js';
|
|
25
|
+
import { Identifier } from './core/identifier.js';
|
|
26
|
+
import { Appendix } from './utils/appendix.js';
|
|
27
27
|
|
|
28
28
|
export type Btcr2Identifier = string;
|
|
29
29
|
|
package/src/index.ts
CHANGED
|
@@ -1,26 +1,54 @@
|
|
|
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
|
+
|
|
7
|
+
export * from './core/beacon/aggregation/cohort/messages/sign/aggregated-nonce.js';
|
|
8
|
+
export * from './core/beacon/aggregation/cohort/messages/sign/authorization-request.js';
|
|
9
|
+
export * from './core/beacon/aggregation/cohort/messages/sign/nonce-contribution.js';
|
|
10
|
+
export * from './core/beacon/aggregation/cohort/messages/sign/request-signature.js';
|
|
11
|
+
export * from './core/beacon/aggregation/cohort/messages/sign/signature-authorization.js';
|
|
12
|
+
|
|
13
|
+
export * from './core/beacon/aggregation/cohort/messages/base.js';
|
|
14
|
+
export * from './core/beacon/aggregation/cohort/messages/constants.js';
|
|
15
|
+
export * from './core/beacon/aggregation/cohort/messages/index.js';
|
|
16
|
+
|
|
17
|
+
export * from './core/beacon/aggregation/cohort/index.js';
|
|
18
|
+
export * from './core/beacon/aggregation/cohort/status.js';
|
|
19
|
+
|
|
20
|
+
export * from './core/beacon/aggregation/communication/adapter/did-comm.js';
|
|
21
|
+
export * from './core/beacon/aggregation/communication/adapter/nostr.js';
|
|
22
|
+
export * from './core/beacon/aggregation/communication/error.js';
|
|
23
|
+
export * from './core/beacon/aggregation/communication/factory.js';
|
|
24
|
+
export * from './core/beacon/aggregation/communication/service.js';
|
|
25
|
+
|
|
26
|
+
export * from './core/beacon/aggregation/session/index.js';
|
|
27
|
+
export * from './core/beacon/aggregation/session/status.js';
|
|
28
|
+
|
|
29
|
+
export * from './core/beacon/aggregation/coordinator.js';
|
|
30
|
+
export * from './core/beacon/aggregation/participant.js';
|
|
31
|
+
|
|
1
32
|
export * from './core/beacon/cid-aggregate.js';
|
|
33
|
+
export * from './core/beacon/error.js';
|
|
2
34
|
export * from './core/beacon/factory.js';
|
|
3
35
|
export * from './core/beacon/singleton.js';
|
|
4
36
|
export * from './core/beacon/smt-aggregate.js';
|
|
37
|
+
export * from './core/beacon/utils.js';
|
|
5
38
|
|
|
6
39
|
export * from './core/crud/deactivate.js';
|
|
7
40
|
export * from './core/crud/read.js';
|
|
8
41
|
export * from './core/crud/update.js';
|
|
9
42
|
|
|
10
|
-
export * from './core/
|
|
11
|
-
export * from './core/key-manager/interface.js';
|
|
43
|
+
export * from './core/identifier.js';
|
|
12
44
|
|
|
13
45
|
export * from './interfaces/beacon.js';
|
|
14
46
|
export * from './interfaces/crud.js';
|
|
15
|
-
export * from './interfaces/ibeacon.js';
|
|
16
|
-
|
|
17
|
-
export * from './types/crud.js';
|
|
18
47
|
|
|
19
48
|
export * from './utils/appendix.js';
|
|
20
|
-
export * from './utils/beacons.js';
|
|
21
49
|
export * from './utils/did-document-builder.js';
|
|
22
50
|
export * from './utils/did-document.js';
|
|
23
51
|
export * from './utils/general.js';
|
|
24
|
-
export * from './utils/
|
|
52
|
+
export * from './utils/types.js';
|
|
25
53
|
|
|
26
|
-
export * from './did-btcr2.js';
|
|
54
|
+
export * from './did-btcr2.js';
|
package/src/interfaces/beacon.ts
CHANGED
|
@@ -1,8 +1,78 @@
|
|
|
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
|
+
/**
|
|
7
|
+
* Beacon interface
|
|
8
|
+
* @interface IBeacon
|
|
9
|
+
* @type {IBeacon}
|
|
10
|
+
*/
|
|
11
|
+
export interface IBeacon {
|
|
12
|
+
/**
|
|
13
|
+
* A unique identifier for the Beacon
|
|
14
|
+
* @type {string}
|
|
15
|
+
*/
|
|
16
|
+
id: string;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The type of the Beacon
|
|
20
|
+
* @type {string}
|
|
21
|
+
*/
|
|
22
|
+
type: string;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The service endpoint of the Beacon
|
|
26
|
+
* @type {string}
|
|
27
|
+
*/
|
|
28
|
+
serviceEndpoint: DidServiceEndpoint;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Returns the Beacon Service object
|
|
32
|
+
* @type {BeaconService}
|
|
33
|
+
*/
|
|
34
|
+
service: BeaconService;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Generates a Beacon Signal Transaction
|
|
38
|
+
* @param {string} didUpdatePayload The DID update payload
|
|
39
|
+
* @returns {BeaconSignal} The Beacon Signal
|
|
40
|
+
*/
|
|
41
|
+
generateSignal(didUpdatePayload: string): BeaconSignal;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Processes a Beacon Signal.
|
|
45
|
+
* @param {RawTransactionV2} signal The raw transaction
|
|
46
|
+
* @param {SidecarData} signalsMetadata The signals metadata from the sidecar data
|
|
47
|
+
* @returns {Promise<DidUpdatePayload | undefined>} The DID update payload
|
|
48
|
+
*/
|
|
49
|
+
processSignal(signal: RawTransactionV2, signalsMetadata: SignalsMetadata): Promise<DidUpdatePayload | undefined>;
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Broadcasts a signal.
|
|
54
|
+
* @param {DidUpdatePayload} didUpdatePayload The DID update payload.
|
|
55
|
+
* @returns {Promise<SignalMetadata>} The signal metadata.
|
|
56
|
+
*/
|
|
57
|
+
broadcastSignal(didUpdatePayload: DidUpdatePayload): Promise<SignalsMetadata>;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface BeaconService extends IDidService {
|
|
61
|
+
serviceEndpoint: DidServiceEndpoint;
|
|
62
|
+
casType?: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface BeaconServiceAddress extends BeaconService {
|
|
66
|
+
address: string;
|
|
67
|
+
}
|
|
68
|
+
export interface BeaconSignal {
|
|
69
|
+
beaconId: string;
|
|
70
|
+
beaconType: string;
|
|
71
|
+
beaconAddress: string;
|
|
72
|
+
tx: RawTransactionRest | RawTransactionV2;
|
|
73
|
+
blockheight: number;
|
|
74
|
+
blocktime: UnixTimestamp;
|
|
75
|
+
}
|
|
6
76
|
|
|
7
77
|
/**
|
|
8
78
|
* Implements {@link https://dcdpr.github.io/did-btcr2/#update-beacons | 5. Beacons}.
|
package/src/interfaces/crud.ts
CHANGED
|
@@ -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
|
/**
|
|
7
7
|
* Options for resolving a DID Document
|
package/src/utils/appendix.ts
CHANGED
|
@@ -1,25 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HashBytes, W3C_ZCAP_V1 } from '@did-btcr2/common';
|
|
2
2
|
import { strings } from '@helia/strings';
|
|
3
3
|
import {
|
|
4
4
|
DidDocument,
|
|
5
5
|
DidError,
|
|
6
6
|
DidErrorCode,
|
|
7
7
|
DidService,
|
|
8
|
+
DidVerificationMethod,
|
|
8
9
|
DidVerificationRelationship
|
|
9
10
|
} from '@web5/dids';
|
|
10
11
|
import { createHelia } from 'helia';
|
|
11
12
|
import { CID } from 'multiformats';
|
|
12
13
|
import { create as createDigest } from 'multiformats/hashes/digest';
|
|
13
14
|
import { RootCapability } from '../interfaces/crud.js';
|
|
14
|
-
import { DidVerificationMethod } from './did-document.js';
|
|
15
|
-
|
|
16
|
-
export interface DidComponents {
|
|
17
|
-
hrp: string;
|
|
18
|
-
idType: string;
|
|
19
|
-
version: number;
|
|
20
|
-
network: string;
|
|
21
|
-
genesisBytes: Bytes;
|
|
22
|
-
};
|
|
23
15
|
|
|
24
16
|
/**
|
|
25
17
|
* Implements {@link https://dcdpr.github.io/did-btcr2/#appendix | 9. Appendix} methods.
|
|
@@ -246,7 +238,7 @@ export class Appendix {
|
|
|
246
238
|
const helia = strings(await createHelia());
|
|
247
239
|
|
|
248
240
|
// 2. Set content to the result of fetching the cid from a CAS system. Which CAS systems checked is up to implementation.
|
|
249
|
-
|
|
241
|
+
// TODO: Is this right? Are implementations just supposed to check all CAS they trust?'
|
|
250
242
|
const content = await helia.get(cid, {});
|
|
251
243
|
|
|
252
244
|
// 3. If content for cid cannot be found, set content to null.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DidDocumentError, INVALID_DID_DOCUMENT } from '@did-btcr2/common';
|
|
2
|
-
import { BeaconService } from '../interfaces/
|
|
2
|
+
import { BeaconService } from '../interfaces/beacon.js';
|
|
3
3
|
import { DidDocument, DidVerificationMethod } from './did-document.js';
|
|
4
4
|
|
|
5
5
|
export class DidDocumentBuilder {
|
|
@@ -7,14 +7,13 @@ import {
|
|
|
7
7
|
INVALID_DID_DOCUMENT,
|
|
8
8
|
JSONObject,
|
|
9
9
|
KeyBytes,
|
|
10
|
-
Logger
|
|
11
10
|
} from '@did-btcr2/common';
|
|
12
11
|
import { CompressedSecp256k1PublicKey } from '@did-btcr2/keypair';
|
|
13
12
|
import { DidService, DidDocument as IIDidDocument, DidVerificationMethod as IIDidVerificationMethod } from '@web5/dids';
|
|
14
|
-
import { BeaconService } from '../interfaces/
|
|
13
|
+
import { BeaconService } from '../interfaces/beacon.js';
|
|
14
|
+
import { BeaconUtils } from '../core/beacon/utils.js';
|
|
15
|
+
import { Identifier } from '../core/identifier.js';
|
|
15
16
|
import { Appendix } from './appendix.js';
|
|
16
|
-
import { BeaconUtils } from './beacons.js';
|
|
17
|
-
import { Identifier } from './identifier.js';
|
|
18
17
|
|
|
19
18
|
export const BECH32M_CHARS = '';
|
|
20
19
|
export const DID_REGEX = /did:btcr2:(x1[qpzry9x8gf2tvdw0s3jn54khce6mua7l]*)/g;
|
|
@@ -123,7 +122,6 @@ export class DidDocument implements IDidDocument {
|
|
|
123
122
|
service: Array<BeaconService>;
|
|
124
123
|
|
|
125
124
|
constructor(document: IDidDocument) {
|
|
126
|
-
console.log('Constructing DidDocument with document:', document);
|
|
127
125
|
// Set the ID and ID type
|
|
128
126
|
const idType = document.id.includes('k1')
|
|
129
127
|
? IdentifierTypes.KEY
|
|
@@ -299,8 +297,7 @@ export class DidDocument implements IDidDocument {
|
|
|
299
297
|
try {
|
|
300
298
|
Identifier.decode(id);
|
|
301
299
|
return true;
|
|
302
|
-
} catch
|
|
303
|
-
Logger.error('Invalid DID Document ID', error);
|
|
300
|
+
} catch {
|
|
304
301
|
return false;
|
|
305
302
|
}
|
|
306
303
|
}
|
|
@@ -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
|
|
|
6
6
|
export type FindNextSignals = {
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { BaseMessage } from './base.js';
|
|
2
|
-
export class AdvertMessage extends BaseMessage {
|
|
3
|
-
cohortId;
|
|
4
|
-
cohortSize;
|
|
5
|
-
network = 'signet';
|
|
6
|
-
constructor({ type = 'BEACON_ADVERT', to, from, threadId, cohortId, cohortSize, network }) {
|
|
7
|
-
super({ type, to, from, threadId, body: { cohortId, cohortSize, network } });
|
|
8
|
-
this.cohortId = cohortId;
|
|
9
|
-
this.cohortSize = cohortSize;
|
|
10
|
-
this.network = network;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Initializes an AdvertMessage from a given Advert object.
|
|
14
|
-
* @param {Advert} data - The Advert object to initialize the AdvertMessage.
|
|
15
|
-
* @returns {object} The serialized AdvertMessage.
|
|
16
|
-
*/
|
|
17
|
-
static initialize(data) {
|
|
18
|
-
if (data.type != 'BEACON_ADVERT') {
|
|
19
|
-
throw new Error(`Invalid type: ${data.type}`);
|
|
20
|
-
}
|
|
21
|
-
return new AdvertMessage(data);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=advert.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"advert.js","sourceRoot":"","sources":["../../../../../../src/core/beacon/aggregation/messages/advert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAYxC,MAAM,OAAO,aAAc,SAAQ,WAAW;IACrC,QAAQ,CAAS;IACjB,UAAU,CAAS;IACnB,OAAO,GAAW,QAAQ,CAAC;IAElC,YAAY,EAAE,IAAI,GAAG,eAAe,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAU;QAC/F,KAAK,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,EAAC,CAAC,CAAC;QAC5E,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,UAAU,CAAC,IAAY;QACnC,IAAI,IAAI,CAAC,IAAI,IAAI,eAAe,EAAC,CAAC;YAChC,MAAM,IAAI,KAAK,CAAC,iBAAiB,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QAChD,CAAC;QACD,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../../../src/core/beacon/aggregation/messages/base.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAG,sBAAsB,CAAC;AAmBrD,MAAM,OAAO,WAAW;IACf,IAAI,CAAS;IACb,EAAE,CAAS;IACX,IAAI,CAAS;IACb,QAAQ,CAAU;IAClB,IAAI,CAAW;IAEtB,YAAY,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAQ;QAClD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,QAAQ,CAAC,IAAiB;QACtC,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED;;;OAGG;IACI,IAAI;QACT,OAAO;YACL,IAAI,EAAO,IAAI,CAAC,IAAI;YACpB,EAAE,EAAS,IAAI,CAAC,EAAE;YAClB,IAAI,EAAO,IAAI,CAAC,IAAI;YACpB,QAAQ,EAAG,IAAI,CAAC,QAAQ;YACxB,IAAI,EAAO,IAAI,CAAC,IAAI,IAAI,EAAE;SAC3B,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { BaseMessage } from './base.js';
|
|
2
|
-
import { COHORT_SET } from './keygen.js';
|
|
3
|
-
export class CohortSetMessage extends BaseMessage {
|
|
4
|
-
cohortId;
|
|
5
|
-
beaconAddress;
|
|
6
|
-
cohortKeys;
|
|
7
|
-
constructor({ type = COHORT_SET, to, from, threadId, cohortId, beaconAddress, cohortKeys }) {
|
|
8
|
-
super({ type, to, from, threadId, body: { cohortId, beaconAddress, cohortKeys } });
|
|
9
|
-
this.cohortId = cohortId;
|
|
10
|
-
this.beaconAddress = beaconAddress;
|
|
11
|
-
this.cohortKeys = cohortKeys;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Initializes an CohortSetMessage from a given OptIn object.
|
|
15
|
-
* @param {OptIn} data - The OptIn object to initialize the CohortSetMessage.
|
|
16
|
-
* @returns {object} The serialized CohortSetMessage.
|
|
17
|
-
*/
|
|
18
|
-
static fromJSON(data) {
|
|
19
|
-
if (data.type !== COHORT_SET) {
|
|
20
|
-
throw new Error(`Invalid type: ${data.type}`);
|
|
21
|
-
}
|
|
22
|
-
return new CohortSetMessage(data);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=cohort-set.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cohort-set.js","sourceRoot":"","sources":["../../../../../../src/core/beacon/aggregation/messages/cohort-set.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAYzC,MAAM,OAAO,gBAAiB,SAAQ,WAAW;IACxC,QAAQ,CAAS;IACjB,aAAa,CAAS;IACtB,UAAU,CAAoB;IAErC,YAAY,EAAE,IAAI,GAAG,UAAU,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAa;QACnG,KAAK,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,EAAC,CAAC,CAAC;QAClF,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,QAAQ,CAAC,IAAe;QACpC,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CAAC,iBAAiB,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QAChD,CAAC;QACD,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;CACF"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { MESSAGE_PREFIX } from './base.js';
|
|
2
|
-
export const COHORT_ADVERT = `${MESSAGE_PREFIX}musig2/keygen/cohort_advert`;
|
|
3
|
-
export const COHORT_INVITE = `${MESSAGE_PREFIX}musig2/keygen/cohort_invite`;
|
|
4
|
-
export const OPT_IN = `${MESSAGE_PREFIX}musig2/keygen/opt_in`;
|
|
5
|
-
export const COHORT_SET = `${MESSAGE_PREFIX}musig2/keygen/cohort_set`;
|
|
6
|
-
export const SUBSCRIBE = `${MESSAGE_PREFIX}musig2/keygen/subscribe`;
|
|
7
|
-
export const SUBSCRIBE_ACCEPT = `${MESSAGE_PREFIX}musig2/keygen/subscribe_accept`;
|
|
8
|
-
//# sourceMappingURL=keygen.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keygen.js","sourceRoot":"","sources":["../../../../../../src/core/beacon/aggregation/messages/keygen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,cAAc,6BAA6B,CAAC;AAC5E,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,cAAc,6BAA6B,CAAC;AAC5E,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,cAAc,sBAAsB,CAAC;AAC9D,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,cAAc,0BAA0B,CAAC;AACtE,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,cAAc,yBAAyB,CAAC;AACpE,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,cAAc,gCAAgC,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { BaseMessage } from './base.js';
|
|
2
|
-
import { OPT_IN } from './keygen.js';
|
|
3
|
-
export class OptInMessage extends BaseMessage {
|
|
4
|
-
cohortId;
|
|
5
|
-
participantPk;
|
|
6
|
-
constructor({ type = OPT_IN, to, from, threadId, cohortId, participantPk }) {
|
|
7
|
-
super({ type, to, from, threadId, body: { cohortId, participantPk } });
|
|
8
|
-
this.cohortId = cohortId;
|
|
9
|
-
this.participantPk = participantPk;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Initializes an OptInMessage from a given OptIn object.
|
|
13
|
-
* @param {OptIn} data - The OptIn object to initialize the OptInMessage.
|
|
14
|
-
* @returns {object} The serialized OptInMessage.
|
|
15
|
-
*/
|
|
16
|
-
static fromJSON(data) {
|
|
17
|
-
if (data.type != 'OPT_IN') {
|
|
18
|
-
throw new Error(`Invalid type: ${data.type}`);
|
|
19
|
-
}
|
|
20
|
-
return new OptInMessage(data);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=opt-in.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"opt-in.js","sourceRoot":"","sources":["../../../../../../src/core/beacon/aggregation/messages/opt-in.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAWrC,MAAM,OAAO,YAAa,SAAQ,WAAW;IACpC,QAAQ,CAAS;IACjB,aAAa,CAAa;IAEjC,YAAY,EAAE,IAAI,GAAG,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAS;QAC/E,KAAK,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,aAAa,EAAE,EAAC,CAAC,CAAC;QACtE,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,QAAQ,CAAC,IAAkB;QACvC,IAAI,IAAI,CAAC,IAAI,IAAI,QAAQ,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,iBAAiB,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QAChD,CAAC;QACD,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;CACF"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { MESSAGE_PREFIX } from './base.js';
|
|
2
|
-
export const REQUEST_SIGNATURE = `${MESSAGE_PREFIX}musig2/sign/request_signature`;
|
|
3
|
-
export const AUTHORIZATION_REQUEST = `${MESSAGE_PREFIX}musig2/sign/authorization_request`;
|
|
4
|
-
export const NONCE_CONTRIBUTION = `${MESSAGE_PREFIX}musig2/sign/nonce_contribution`;
|
|
5
|
-
export const AGGREGATED_NONCE = `${MESSAGE_PREFIX}musig2/sign/aggregated_nonce`;
|
|
6
|
-
export const SIGNATURE_AUTHORIZATION = `${MESSAGE_PREFIX}musig2/sign/signature_authorization`;
|
|
7
|
-
//# sourceMappingURL=sign.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sign.js","sourceRoot":"","sources":["../../../../../../src/core/beacon/aggregation/messages/sign.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,cAAc,+BAA+B,CAAC;AAClF,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,cAAc,mCAAmC,CAAC;AAC1F,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,cAAc,gCAAgC,CAAC;AACpF,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,cAAc,8BAA8B,CAAC;AAChF,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,cAAc,qCAAqC,CAAC"}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { TapRootMultiSig } from '@did-btcr2/bitcoin';
|
|
2
|
-
import { COHORT_STATUS } from './status.js';
|
|
3
|
-
export class Musig2Cohort {
|
|
4
|
-
/**
|
|
5
|
-
* Unique identifier for the cohort.
|
|
6
|
-
* @type {string}
|
|
7
|
-
*/
|
|
8
|
-
id;
|
|
9
|
-
/**
|
|
10
|
-
* DID of the coordinator.
|
|
11
|
-
* @type {string}
|
|
12
|
-
*/
|
|
13
|
-
coordinatorDid;
|
|
14
|
-
/**
|
|
15
|
-
* Minimum number of participants required to finalize the cohort.
|
|
16
|
-
* @type {number}
|
|
17
|
-
*/
|
|
18
|
-
minParticipants;
|
|
19
|
-
/**
|
|
20
|
-
* Status of the cohort.
|
|
21
|
-
* @type {string}
|
|
22
|
-
*/
|
|
23
|
-
status;
|
|
24
|
-
/**
|
|
25
|
-
* Network on which the cohort operates (e.g., 'mainnet', 'testnet').
|
|
26
|
-
* @type {string}
|
|
27
|
-
*/
|
|
28
|
-
network;
|
|
29
|
-
/**
|
|
30
|
-
* Pending signature requests, mapping participant DIDs to their pending signatures.
|
|
31
|
-
* @type {Record<string, string>}
|
|
32
|
-
*/
|
|
33
|
-
pendingSignatureRequests = {};
|
|
34
|
-
/**
|
|
35
|
-
* List of participant DIDs.
|
|
36
|
-
* @type {Array<string>}
|
|
37
|
-
*/
|
|
38
|
-
participants = new Array();
|
|
39
|
-
/**
|
|
40
|
-
* List of cohort keys (public keys).
|
|
41
|
-
* @type {Array<Uint8Array>}
|
|
42
|
-
*/
|
|
43
|
-
cohortKeys = new Array();
|
|
44
|
-
/**
|
|
45
|
-
* Taproot Merkle root for the cohort.
|
|
46
|
-
* @type {Uint8Array}
|
|
47
|
-
*/
|
|
48
|
-
trMerkleRoot;
|
|
49
|
-
/**
|
|
50
|
-
* Beacon address for the cohort, calculated from the Taproot multisig.
|
|
51
|
-
* @type {string}
|
|
52
|
-
*/
|
|
53
|
-
beaconAddress;
|
|
54
|
-
/**
|
|
55
|
-
* Creates a new Musig2Cohort instance.
|
|
56
|
-
* @param {Musig2CohortParams} params Parameters for initializing the cohort.
|
|
57
|
-
* @param {string} [params.id] Optional unique identifier for the cohort. If not provided, a random UUID will be generated.
|
|
58
|
-
* @param {number} params.minParticipants Minimum number of participants required to finalize the cohort.
|
|
59
|
-
* @param {string} params.coordinatorDid DID of the coordinator managing the cohort.
|
|
60
|
-
* @param {string} params.status Initial status of the cohort (e.g., 'PENDING', 'COHORT_SET').
|
|
61
|
-
* @param {string} params.network Network on which the cohort operates (e.g., 'mainnet', 'testnet').
|
|
62
|
-
*/
|
|
63
|
-
constructor(params) {
|
|
64
|
-
this.id = params.id || crypto.randomUUID();
|
|
65
|
-
this.minParticipants = params.minParticipants;
|
|
66
|
-
this.coordinatorDid = params.coordinatorDid;
|
|
67
|
-
this.status = params.status || COHORT_STATUS.COHORT_ADVERTISED;
|
|
68
|
-
this.network = params.network;
|
|
69
|
-
}
|
|
70
|
-
finalize() {
|
|
71
|
-
if (this.participants.length < this.minParticipants) {
|
|
72
|
-
throw new Error('Not enough participants to finalize the cohort');
|
|
73
|
-
}
|
|
74
|
-
this.status = COHORT_STATUS.COHORT_SET_STATUS;
|
|
75
|
-
this.beaconAddress = this.calulateBeaconAddress();
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Calculates the beacon Taproot multisig address for the cohort using participant keys.
|
|
79
|
-
* @returns {string} The Taproot address for the cohort.
|
|
80
|
-
* @throws {Error} If the Taproot address cannot be calculated.
|
|
81
|
-
*/
|
|
82
|
-
calulateBeaconAddress() {
|
|
83
|
-
const trMultisig = new TapRootMultiSig(this.cohortKeys, this.cohortKeys.length);
|
|
84
|
-
const branch = trMultisig.musigTree();
|
|
85
|
-
this.trMerkleRoot = branch.hash;
|
|
86
|
-
if (!branch.address) {
|
|
87
|
-
throw new Error('Failed to calculate Taproot address');
|
|
88
|
-
}
|
|
89
|
-
return branch.address;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/core/beacon/aggregation/models/cohort/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAsB,MAAM,aAAa,CAAC;AAUhE,MAAM,OAAO,YAAY;IACvB;;;OAGG;IACI,EAAE,CAAS;IAElB;;;OAGG;IACI,cAAc,CAAS;IAE9B;;;OAGG;IACI,eAAe,CAAS;IAE/B;;;OAGG;IACI,MAAM,CAAqB;IAElC;;;OAGG;IACI,OAAO,CAAS;IAEvB;;;OAGG;IACI,wBAAwB,GAA2B,EAAE,CAAC;IAE7D;;;OAGG;IACI,YAAY,GAAkB,IAAI,KAAK,EAAU,CAAC;IAEzD;;;OAGG;IACI,UAAU,GAAsB,IAAI,KAAK,EAAc,CAAC;IAE/D;;;OAGG;IACI,YAAY,CAAc;IAEjC;;;OAGG;IACI,aAAa,CAAU;IAE9B;;;;;;;;OAQG;IACH,YAAY,MAA0B;QACpC,IAAI,CAAC,EAAE,GAAG,MAAM,CAAC,EAAE,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;QAC3C,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;QAC9C,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;QAC5C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAA4B,IAAI,aAAa,CAAC,iBAAiB,CAAC;QACrF,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IAChC,CAAC;IAEM,QAAQ;QACb,IAAG,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;YACnD,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;QACpE,CAAC;QACD,IAAI,CAAC,MAAM,GAAG,aAAa,CAAC,iBAAiB,CAAC;QAC9C,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC;IACpD,CAAC;IAED;;;;OAIG;IACI,qBAAqB;QAC1B,MAAM,UAAU,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAChF,MAAM,MAAM,GAAG,UAAU,CAAC,SAAS,EAAE,CAAC;QACtC,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC;QAChC,IAAG,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;QACzD,CAAC;QACD,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../../../../../../src/core/beacon/aggregation/models/cohort/status.ts"],"names":[],"mappings":"AACA,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,iDAAgC,CAAA;IAChC,6CAA4B,CAAA;IAC5B,iDAAgC,CAAA;IAChC,yCAAwB,CAAA;AAC1B,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { SchnorrKeyPair, Secp256k1SecretKey } from '@did-btcr2/keypair';
|
|
2
|
-
import { SimplePool, } from 'nostr-tools/pool';
|
|
3
|
-
import { Identifier } from '../../../../utils/identifier.js';
|
|
4
|
-
export class NostrAdapter {
|
|
5
|
-
name = 'nostr';
|
|
6
|
-
config;
|
|
7
|
-
handlers = new Map();
|
|
8
|
-
constructor(config = { keys: {}, components: {}, relays: ['wss://relay.damus.io'] }) {
|
|
9
|
-
this.config = config;
|
|
10
|
-
this.config.keys = this.config.keys || SchnorrKeyPair.generate().raw;
|
|
11
|
-
this.config.did = config.did || Identifier.encode({
|
|
12
|
-
idType: config.components.idType || 'KEY',
|
|
13
|
-
version: config.components.version || 1,
|
|
14
|
-
network: config.components.network || 'signet',
|
|
15
|
-
genesisBytes: this.config.keys.public
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
async start() {
|
|
19
|
-
const pool = new SimplePool();
|
|
20
|
-
pool.subscribe(this.config.relays, { pubkey: this.config.did, kinds: [1059] }, {
|
|
21
|
-
onclose: (reasons) => console.log('Subscription closed for reasons:', reasons),
|
|
22
|
-
onevent: async (event) => {
|
|
23
|
-
console.log('Received event:', event);
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
registerMessageHandler(messageType, handler) {
|
|
28
|
-
this.handlers.set(messageType, handler);
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Sends a message to a recipient using the Nostr protocol.
|
|
32
|
-
* This method is a placeholder and should be implemented with actual Nostr message sending logic.
|
|
33
|
-
* @param message
|
|
34
|
-
* @param recipient
|
|
35
|
-
* @param sender
|
|
36
|
-
*/
|
|
37
|
-
async sendMessage(message, recipient, sender) {
|
|
38
|
-
// TODO: Implement message sending logic via Nostr
|
|
39
|
-
console.log(`Sending message to ${recipient} from ${sender}:`, message);
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Generates a Nostr identity using the Secp256k1SecretKey and Identifier classes.
|
|
43
|
-
* @returns {string} A BTCR2 DID used for communication over the nostr protocol
|
|
44
|
-
*/
|
|
45
|
-
generateIdentity() {
|
|
46
|
-
this.config.keys.secret = Secp256k1SecretKey.random();
|
|
47
|
-
this.config.keys.public = Secp256k1SecretKey.getPublicKey(this.config.keys.secret).compressed;
|
|
48
|
-
this.config.did = Identifier.encode({
|
|
49
|
-
idType: this.config.components.idType || 'KEY',
|
|
50
|
-
version: this.config.components.version || 1,
|
|
51
|
-
network: this.config.components.network || 'signet',
|
|
52
|
-
genesisBytes: this.config.keys.public
|
|
53
|
-
});
|
|
54
|
-
return this.config.did;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
//# sourceMappingURL=nostr.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nostr.js","sourceRoot":"","sources":["../../../../../../src/core/beacon/aggregation/protocol/nostr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExE,OAAO,EAAE,UAAU,GAAG,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAkB7D,MAAM,OAAO,YAAY;IAChB,IAAI,GAAW,OAAO,CAAC;IACtB,MAAM,CAAqB;IAC3B,QAAQ,GAA6C,IAAI,GAAG,EAAE,CAAC;IAEvE,YAAY,SAA6B,EAAE,IAAI,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,sBAAsB,CAAC,EAAE;QACrG,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,cAAc,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC;QACrE,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC;YAChD,MAAM,EAAS,MAAM,CAAC,UAAU,CAAC,MAAM,IAAI,KAAK;YAChD,OAAO,EAAQ,MAAM,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC;YAC7C,OAAO,EAAQ,MAAM,CAAC,UAAU,CAAC,OAAO,IAAI,QAAQ;YACpD,YAAY,EAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAO;SACxC,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,KAAK;QACT,MAAM,IAAI,GAAG,IAAI,UAAU,EAAE,CAAC;QAC9B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,EAAY,EAAE;YACvF,OAAO,EAAG,CAAC,OAAiB,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,kCAAkC,EAAE,OAAO,CAAC;YACzF,OAAO,EAAG,KAAK,EAAE,KAAU,EAAE,EAAE;gBAC7B,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;YACxC,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IAED,sBAAsB,CAAC,WAAmB,EAAE,OAAoC;QAC9E,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,WAAW,CAAC,OAAe,EAAE,SAAiB,EAAE,MAAc;QAClE,kDAAkD;QAClD,OAAO,CAAC,GAAG,CAAC,sBAAsB,SAAS,SAAS,MAAM,GAAG,EAAE,OAAO,CAAC,CAAC;IAC1E,CAAC;IAED;;;OAGG;IACI,gBAAgB;QACrB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,GAAG,kBAAkB,CAAC,MAAM,EAAE,CAAC;QACtD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,GAAG,kBAAkB,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC;QAC9F,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,UAAU,CAAC,MAAM,CACjC;YACE,MAAM,EAAS,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,IAAK,KAAK;YACtD,OAAO,EAAQ,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC;YAClD,OAAO,EAAQ,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,IAAI,QAAQ;YACzD,YAAY,EAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM;SACvC,CACF,CAAC;QACF,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;IACzB,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../../../src/core/beacon/aggregation/protocol/service.ts"],"names":[],"mappings":""}
|