@sempdev/semp 0.4.3
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/LICENSE +21 -0
- package/README.md +59 -0
- package/dist/brief/address.d.ts +77 -0
- package/dist/brief/address.d.ts.map +1 -0
- package/dist/brief/address.js +217 -0
- package/dist/brief/address.js.map +1 -0
- package/dist/brief/brief.d.ts +75 -0
- package/dist/brief/brief.d.ts.map +1 -0
- package/dist/brief/brief.js +56 -0
- package/dist/brief/brief.js.map +1 -0
- package/dist/brief/index.d.ts +11 -0
- package/dist/brief/index.d.ts.map +1 -0
- package/dist/brief/index.js +11 -0
- package/dist/brief/index.js.map +1 -0
- package/dist/canonical/index.d.ts +8 -0
- package/dist/canonical/index.d.ts.map +1 -0
- package/dist/canonical/index.js +8 -0
- package/dist/canonical/index.js.map +1 -0
- package/dist/canonical/marshal.d.ts +35 -0
- package/dist/canonical/marshal.d.ts.map +1 -0
- package/dist/canonical/marshal.js +107 -0
- package/dist/canonical/marshal.js.map +1 -0
- package/dist/clockskew/index.d.ts +52 -0
- package/dist/clockskew/index.d.ts.map +1 -0
- package/dist/clockskew/index.js +62 -0
- package/dist/clockskew/index.js.map +1 -0
- package/dist/closure/closure.d.ts +106 -0
- package/dist/closure/closure.d.ts.map +1 -0
- package/dist/closure/closure.js +152 -0
- package/dist/closure/closure.js.map +1 -0
- package/dist/closure/driver.d.ts +103 -0
- package/dist/closure/driver.d.ts.map +1 -0
- package/dist/closure/driver.js +126 -0
- package/dist/closure/driver.js.map +1 -0
- package/dist/closure/index.d.ts +13 -0
- package/dist/closure/index.d.ts.map +1 -0
- package/dist/closure/index.js +13 -0
- package/dist/closure/index.js.map +1 -0
- package/dist/closure/store.d.ts +80 -0
- package/dist/closure/store.d.ts.map +1 -0
- package/dist/closure/store.js +89 -0
- package/dist/closure/store.js.map +1 -0
- package/dist/crypto/aead.d.ts +29 -0
- package/dist/crypto/aead.d.ts.map +1 -0
- package/dist/crypto/aead.js +48 -0
- package/dist/crypto/aead.js.map +1 -0
- package/dist/crypto/argon2.d.ts +20 -0
- package/dist/crypto/argon2.d.ts.map +1 -0
- package/dist/crypto/argon2.js +28 -0
- package/dist/crypto/argon2.js.map +1 -0
- package/dist/crypto/index.d.ts +14 -0
- package/dist/crypto/index.d.ts.map +1 -0
- package/dist/crypto/index.js +14 -0
- package/dist/crypto/index.js.map +1 -0
- package/dist/crypto/kdf.d.ts +96 -0
- package/dist/crypto/kdf.d.ts.map +1 -0
- package/dist/crypto/kdf.js +122 -0
- package/dist/crypto/kdf.js.map +1 -0
- package/dist/crypto/kem.d.ts +85 -0
- package/dist/crypto/kem.d.ts.map +1 -0
- package/dist/crypto/kem.js +130 -0
- package/dist/crypto/kem.js.map +1 -0
- package/dist/crypto/mac.d.ts +19 -0
- package/dist/crypto/mac.d.ts.map +1 -0
- package/dist/crypto/mac.js +32 -0
- package/dist/crypto/mac.js.map +1 -0
- package/dist/delivery/ack.d.ts +125 -0
- package/dist/delivery/ack.d.ts.map +1 -0
- package/dist/delivery/ack.js +141 -0
- package/dist/delivery/ack.js.map +1 -0
- package/dist/delivery/blocklist.d.ts +87 -0
- package/dist/delivery/blocklist.d.ts.map +1 -0
- package/dist/delivery/blocklist.js +107 -0
- package/dist/delivery/blocklist.js.map +1 -0
- package/dist/delivery/cancel.d.ts +60 -0
- package/dist/delivery/cancel.d.ts.map +1 -0
- package/dist/delivery/cancel.js +43 -0
- package/dist/delivery/cancel.js.map +1 -0
- package/dist/delivery/disposition.d.ts +106 -0
- package/dist/delivery/disposition.d.ts.map +1 -0
- package/dist/delivery/disposition.js +105 -0
- package/dist/delivery/disposition.js.map +1 -0
- package/dist/delivery/fetch.d.ts +59 -0
- package/dist/delivery/fetch.d.ts.map +1 -0
- package/dist/delivery/fetch.js +47 -0
- package/dist/delivery/fetch.js.map +1 -0
- package/dist/delivery/forwarder.d.ts +106 -0
- package/dist/delivery/forwarder.d.ts.map +1 -0
- package/dist/delivery/forwarder.js +251 -0
- package/dist/delivery/forwarder.js.map +1 -0
- package/dist/delivery/inbox.d.ts +42 -0
- package/dist/delivery/inbox.d.ts.map +1 -0
- package/dist/delivery/inbox.js +68 -0
- package/dist/delivery/inbox.js.map +1 -0
- package/dist/delivery/index.d.ts +31 -0
- package/dist/delivery/index.d.ts.map +1 -0
- package/dist/delivery/index.js +31 -0
- package/dist/delivery/index.js.map +1 -0
- package/dist/delivery/internalroute.d.ts +50 -0
- package/dist/delivery/internalroute.d.ts.map +1 -0
- package/dist/delivery/internalroute.js +23 -0
- package/dist/delivery/internalroute.js.map +1 -0
- package/dist/delivery/pipeline.d.ts +153 -0
- package/dist/delivery/pipeline.d.ts.map +1 -0
- package/dist/delivery/pipeline.js +356 -0
- package/dist/delivery/pipeline.js.map +1 -0
- package/dist/delivery/policy_state.d.ts +105 -0
- package/dist/delivery/policy_state.d.ts.map +1 -0
- package/dist/delivery/policy_state.js +293 -0
- package/dist/delivery/policy_state.js.map +1 -0
- package/dist/delivery/queue.d.ts +47 -0
- package/dist/delivery/queue.d.ts.map +1 -0
- package/dist/delivery/queue.js +33 -0
- package/dist/delivery/queue.js.map +1 -0
- package/dist/delivery/receipt.d.ts +137 -0
- package/dist/delivery/receipt.d.ts.map +1 -0
- package/dist/delivery/receipt.js +181 -0
- package/dist/delivery/receipt.js.map +1 -0
- package/dist/delivery/receipt_store.d.ts +81 -0
- package/dist/delivery/receipt_store.d.ts.map +1 -0
- package/dist/delivery/receipt_store.js +74 -0
- package/dist/delivery/receipt_store.js.map +1 -0
- package/dist/delivery/retry.d.ts +78 -0
- package/dist/delivery/retry.d.ts.map +1 -0
- package/dist/delivery/retry.js +132 -0
- package/dist/delivery/retry.js.map +1 -0
- package/dist/delivery/scheduler.d.ts +156 -0
- package/dist/delivery/scheduler.d.ts.map +1 -0
- package/dist/delivery/scheduler.js +349 -0
- package/dist/delivery/scheduler.js.map +1 -0
- package/dist/delivery/stage_partition.d.ts +87 -0
- package/dist/delivery/stage_partition.d.ts.map +1 -0
- package/dist/delivery/stage_partition.js +122 -0
- package/dist/delivery/stage_partition.js.map +1 -0
- package/dist/delivery/staged_runner.d.ts +100 -0
- package/dist/delivery/staged_runner.d.ts.map +1 -0
- package/dist/delivery/staged_runner.js +277 -0
- package/dist/delivery/staged_runner.js.map +1 -0
- package/dist/delivery/submission.d.ts +72 -0
- package/dist/delivery/submission.d.ts.map +1 -0
- package/dist/delivery/submission.js +58 -0
- package/dist/delivery/submission.js.map +1 -0
- package/dist/delivery/sync.d.ts +68 -0
- package/dist/delivery/sync.d.ts.map +1 -0
- package/dist/delivery/sync.js +99 -0
- package/dist/delivery/sync.js.map +1 -0
- package/dist/delivery/user_policy.d.ts +74 -0
- package/dist/delivery/user_policy.d.ts.map +1 -0
- package/dist/delivery/user_policy.js +140 -0
- package/dist/delivery/user_policy.js.map +1 -0
- package/dist/discovery/cache.d.ts +37 -0
- package/dist/discovery/cache.d.ts.map +1 -0
- package/dist/discovery/cache.js +45 -0
- package/dist/discovery/cache.js.map +1 -0
- package/dist/discovery/configuration.d.ts +97 -0
- package/dist/discovery/configuration.d.ts.map +1 -0
- package/dist/discovery/configuration.js +146 -0
- package/dist/discovery/configuration.js.map +1 -0
- package/dist/discovery/dns.d.ts +56 -0
- package/dist/discovery/dns.d.ts.map +1 -0
- package/dist/discovery/dns.js +120 -0
- package/dist/discovery/dns.js.map +1 -0
- package/dist/discovery/domain_keys.d.ts +62 -0
- package/dist/discovery/domain_keys.d.ts.map +1 -0
- package/dist/discovery/domain_keys.js +89 -0
- package/dist/discovery/domain_keys.js.map +1 -0
- package/dist/discovery/index.d.ts +19 -0
- package/dist/discovery/index.d.ts.map +1 -0
- package/dist/discovery/index.js +19 -0
- package/dist/discovery/index.js.map +1 -0
- package/dist/discovery/lookup.d.ts +72 -0
- package/dist/discovery/lookup.d.ts.map +1 -0
- package/dist/discovery/lookup.js +121 -0
- package/dist/discovery/lookup.js.map +1 -0
- package/dist/discovery/onion.d.ts +34 -0
- package/dist/discovery/onion.d.ts.map +1 -0
- package/dist/discovery/onion.js +61 -0
- package/dist/discovery/onion.js.map +1 -0
- package/dist/discovery/partition.d.ts +96 -0
- package/dist/discovery/partition.d.ts.map +1 -0
- package/dist/discovery/partition.js +247 -0
- package/dist/discovery/partition.js.map +1 -0
- package/dist/discovery/resolver.d.ts +113 -0
- package/dist/discovery/resolver.d.ts.map +1 -0
- package/dist/discovery/resolver.js +176 -0
- package/dist/discovery/resolver.js.map +1 -0
- package/dist/discovery/txt.d.ts +39 -0
- package/dist/discovery/txt.d.ts.map +1 -0
- package/dist/discovery/txt.js +71 -0
- package/dist/discovery/txt.js.map +1 -0
- package/dist/enclosure/forwarding.d.ts +128 -0
- package/dist/enclosure/forwarding.d.ts.map +1 -0
- package/dist/enclosure/forwarding.js +119 -0
- package/dist/enclosure/forwarding.js.map +1 -0
- package/dist/enclosure/index.d.ts +11 -0
- package/dist/enclosure/index.d.ts.map +1 -0
- package/dist/enclosure/index.js +11 -0
- package/dist/enclosure/index.js.map +1 -0
- package/dist/envelope/buckets.d.ts +38 -0
- package/dist/envelope/buckets.d.ts.map +1 -0
- package/dist/envelope/buckets.js +73 -0
- package/dist/envelope/buckets.js.map +1 -0
- package/dist/envelope/canonical.d.ts +28 -0
- package/dist/envelope/canonical.d.ts.map +1 -0
- package/dist/envelope/canonical.js +54 -0
- package/dist/envelope/canonical.js.map +1 -0
- package/dist/envelope/compose.d.ts +171 -0
- package/dist/envelope/compose.d.ts.map +1 -0
- package/dist/envelope/compose.js +237 -0
- package/dist/envelope/compose.js.map +1 -0
- package/dist/envelope/encode.d.ts +41 -0
- package/dist/envelope/encode.d.ts.map +1 -0
- package/dist/envelope/encode.js +69 -0
- package/dist/envelope/encode.js.map +1 -0
- package/dist/envelope/index.d.ts +20 -0
- package/dist/envelope/index.d.ts.map +1 -0
- package/dist/envelope/index.js +20 -0
- package/dist/envelope/index.js.map +1 -0
- package/dist/envelope/open_any.d.ts +48 -0
- package/dist/envelope/open_any.d.ts.map +1 -0
- package/dist/envelope/open_any.js +81 -0
- package/dist/envelope/open_any.js.map +1 -0
- package/dist/envelope/open_verified.d.ts +59 -0
- package/dist/envelope/open_verified.d.ts.map +1 -0
- package/dist/envelope/open_verified.js +67 -0
- package/dist/envelope/open_verified.js.map +1 -0
- package/dist/envelope/padding.d.ts +55 -0
- package/dist/envelope/padding.d.ts.map +1 -0
- package/dist/envelope/padding.js +162 -0
- package/dist/envelope/padding.js.map +1 -0
- package/dist/envelope/rejection.d.ts +22 -0
- package/dist/envelope/rejection.d.ts.map +1 -0
- package/dist/envelope/rejection.js +30 -0
- package/dist/envelope/rejection.js.map +1 -0
- package/dist/envelope/sendtime.d.ts +49 -0
- package/dist/envelope/sendtime.d.ts.map +1 -0
- package/dist/envelope/sendtime.js +87 -0
- package/dist/envelope/sendtime.js.map +1 -0
- package/dist/envelope/verify.d.ts +29 -0
- package/dist/envelope/verify.d.ts.map +1 -0
- package/dist/envelope/verify.js +90 -0
- package/dist/envelope/verify.js.map +1 -0
- package/dist/extensions/index.d.ts +7 -0
- package/dist/extensions/index.d.ts.map +1 -0
- package/dist/extensions/index.js +7 -0
- package/dist/extensions/index.js.map +1 -0
- package/dist/extensions/limits.d.ts +101 -0
- package/dist/extensions/limits.d.ts.map +1 -0
- package/dist/extensions/limits.js +175 -0
- package/dist/extensions/limits.js.map +1 -0
- package/dist/handshake/abort.d.ts +49 -0
- package/dist/handshake/abort.d.ts.map +1 -0
- package/dist/handshake/abort.js +82 -0
- package/dist/handshake/abort.js.map +1 -0
- package/dist/handshake/capabilities.d.ts +46 -0
- package/dist/handshake/capabilities.d.ts.map +1 -0
- package/dist/handshake/capabilities.js +114 -0
- package/dist/handshake/capabilities.js.map +1 -0
- package/dist/handshake/client_state.d.ts +186 -0
- package/dist/handshake/client_state.d.ts.map +1 -0
- package/dist/handshake/client_state.js +520 -0
- package/dist/handshake/client_state.js.map +1 -0
- package/dist/handshake/confirm.d.ts +21 -0
- package/dist/handshake/confirm.d.ts.map +1 -0
- package/dist/handshake/confirm.js +27 -0
- package/dist/handshake/confirm.js.map +1 -0
- package/dist/handshake/driver.d.ts +126 -0
- package/dist/handshake/driver.d.ts.map +1 -0
- package/dist/handshake/driver.js +251 -0
- package/dist/handshake/driver.js.map +1 -0
- package/dist/handshake/federation.d.ts +365 -0
- package/dist/handshake/federation.d.ts.map +1 -0
- package/dist/handshake/federation.js +664 -0
- package/dist/handshake/federation.js.map +1 -0
- package/dist/handshake/first_contact.d.ts +57 -0
- package/dist/handshake/first_contact.d.ts.map +1 -0
- package/dist/handshake/first_contact.js +124 -0
- package/dist/handshake/first_contact.js.map +1 -0
- package/dist/handshake/identity.d.ts +101 -0
- package/dist/handshake/identity.d.ts.map +1 -0
- package/dist/handshake/identity.js +117 -0
- package/dist/handshake/identity.js.map +1 -0
- package/dist/handshake/index.d.ts +21 -0
- package/dist/handshake/index.d.ts.map +1 -0
- package/dist/handshake/index.js +21 -0
- package/dist/handshake/index.js.map +1 -0
- package/dist/handshake/messages.d.ts +176 -0
- package/dist/handshake/messages.d.ts.map +1 -0
- package/dist/handshake/messages.js +125 -0
- package/dist/handshake/messages.js.map +1 -0
- package/dist/handshake/pow.d.ts +53 -0
- package/dist/handshake/pow.d.ts.map +1 -0
- package/dist/handshake/pow.js +142 -0
- package/dist/handshake/pow.js.map +1 -0
- package/dist/handshake/resume_driver.d.ts +56 -0
- package/dist/handshake/resume_driver.d.ts.map +1 -0
- package/dist/handshake/resume_driver.js +75 -0
- package/dist/handshake/resume_driver.js.map +1 -0
- package/dist/handshake/server.d.ts +112 -0
- package/dist/handshake/server.d.ts.map +1 -0
- package/dist/handshake/server.js +247 -0
- package/dist/handshake/server.js.map +1 -0
- package/dist/handshake/server_state.d.ts +102 -0
- package/dist/handshake/server_state.d.ts.map +1 -0
- package/dist/handshake/server_state.js +278 -0
- package/dist/handshake/server_state.js.map +1 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -0
- package/dist/keys/compromise.d.ts +118 -0
- package/dist/keys/compromise.d.ts.map +1 -0
- package/dist/keys/compromise.js +218 -0
- package/dist/keys/compromise.js.map +1 -0
- package/dist/keys/device_certificate.d.ts +166 -0
- package/dist/keys/device_certificate.d.ts.map +1 -0
- package/dist/keys/device_certificate.js +328 -0
- package/dist/keys/device_certificate.js.map +1 -0
- package/dist/keys/device_records.d.ts +175 -0
- package/dist/keys/device_records.d.ts.map +1 -0
- package/dist/keys/device_records.js +418 -0
- package/dist/keys/device_records.js.map +1 -0
- package/dist/keys/directory_cache.d.ts +64 -0
- package/dist/keys/directory_cache.d.ts.map +1 -0
- package/dist/keys/directory_cache.js +98 -0
- package/dist/keys/directory_cache.js.map +1 -0
- package/dist/keys/directory_state.d.ts +79 -0
- package/dist/keys/directory_state.d.ts.map +1 -0
- package/dist/keys/directory_state.js +155 -0
- package/dist/keys/directory_state.js.map +1 -0
- package/dist/keys/index.d.ts +18 -0
- package/dist/keys/index.d.ts.map +1 -0
- package/dist/keys/index.js +18 -0
- package/dist/keys/index.js.map +1 -0
- package/dist/keys/key_revocation.d.ts +61 -0
- package/dist/keys/key_revocation.d.ts.map +1 -0
- package/dist/keys/key_revocation.js +88 -0
- package/dist/keys/key_revocation.js.map +1 -0
- package/dist/keys/request.d.ts +124 -0
- package/dist/keys/request.d.ts.map +1 -0
- package/dist/keys/request.js +130 -0
- package/dist/keys/request.js.map +1 -0
- package/dist/keys/sign.d.ts +49 -0
- package/dist/keys/sign.d.ts.map +1 -0
- package/dist/keys/sign.js +80 -0
- package/dist/keys/sign.js.map +1 -0
- package/dist/keys/signed.d.ts +80 -0
- package/dist/keys/signed.d.ts.map +1 -0
- package/dist/keys/signed.js +138 -0
- package/dist/keys/signed.js.map +1 -0
- package/dist/keys/store.d.ts +138 -0
- package/dist/keys/store.d.ts.map +1 -0
- package/dist/keys/store.js +107 -0
- package/dist/keys/store.js.map +1 -0
- package/dist/largeattachment/crypto.d.ts +47 -0
- package/dist/largeattachment/crypto.d.ts.map +1 -0
- package/dist/largeattachment/crypto.js +235 -0
- package/dist/largeattachment/crypto.js.map +1 -0
- package/dist/largeattachment/enclosure.d.ts +48 -0
- package/dist/largeattachment/enclosure.d.ts.map +1 -0
- package/dist/largeattachment/enclosure.js +102 -0
- package/dist/largeattachment/enclosure.js.map +1 -0
- package/dist/largeattachment/index.d.ts +15 -0
- package/dist/largeattachment/index.d.ts.map +1 -0
- package/dist/largeattachment/index.js +15 -0
- package/dist/largeattachment/index.js.map +1 -0
- package/dist/largeattachment/store.d.ts +36 -0
- package/dist/largeattachment/store.d.ts.map +1 -0
- package/dist/largeattachment/store.js +37 -0
- package/dist/largeattachment/store.js.map +1 -0
- package/dist/largeattachment/types.d.ts +56 -0
- package/dist/largeattachment/types.d.ts.map +1 -0
- package/dist/largeattachment/types.js +31 -0
- package/dist/largeattachment/types.js.map +1 -0
- package/dist/largeattachment/upload.d.ts +62 -0
- package/dist/largeattachment/upload.d.ts.map +1 -0
- package/dist/largeattachment/upload.js +166 -0
- package/dist/largeattachment/upload.js.map +1 -0
- package/dist/migration/index.d.ts +17 -0
- package/dist/migration/index.d.ts.map +1 -0
- package/dist/migration/index.js +17 -0
- package/dist/migration/index.js.map +1 -0
- package/dist/migration/lockout.d.ts +48 -0
- package/dist/migration/lockout.d.ts.map +1 -0
- package/dist/migration/lockout.js +57 -0
- package/dist/migration/lockout.js.map +1 -0
- package/dist/migration/migration.d.ts +48 -0
- package/dist/migration/migration.d.ts.map +1 -0
- package/dist/migration/migration.js +58 -0
- package/dist/migration/migration.js.map +1 -0
- package/dist/migration/notice.d.ts +33 -0
- package/dist/migration/notice.d.ts.map +1 -0
- package/dist/migration/notice.js +85 -0
- package/dist/migration/notice.js.map +1 -0
- package/dist/migration/orchestrate.d.ts +109 -0
- package/dist/migration/orchestrate.d.ts.map +1 -0
- package/dist/migration/orchestrate.js +212 -0
- package/dist/migration/orchestrate.js.map +1 -0
- package/dist/migration/publication_store.d.ts +34 -0
- package/dist/migration/publication_store.d.ts.map +1 -0
- package/dist/migration/publication_store.js +44 -0
- package/dist/migration/publication_store.js.map +1 -0
- package/dist/migration/sign.d.ts +65 -0
- package/dist/migration/sign.d.ts.map +1 -0
- package/dist/migration/sign.js +331 -0
- package/dist/migration/sign.js.map +1 -0
- package/dist/migration/types.d.ts +92 -0
- package/dist/migration/types.d.ts.map +1 -0
- package/dist/migration/types.js +26 -0
- package/dist/migration/types.js.map +1 -0
- package/dist/reasoncodes.d.ts +42 -0
- package/dist/reasoncodes.d.ts.map +1 -0
- package/dist/reasoncodes.js +80 -0
- package/dist/reasoncodes.js.map +1 -0
- package/dist/recovery/bundle.d.ts +34 -0
- package/dist/recovery/bundle.d.ts.map +1 -0
- package/dist/recovery/bundle.js +144 -0
- package/dist/recovery/bundle.js.map +1 -0
- package/dist/recovery/bundle_crypto.d.ts +60 -0
- package/dist/recovery/bundle_crypto.d.ts.map +1 -0
- package/dist/recovery/bundle_crypto.js +179 -0
- package/dist/recovery/bundle_crypto.js.map +1 -0
- package/dist/recovery/bundle_store.d.ts +57 -0
- package/dist/recovery/bundle_store.d.ts.map +1 -0
- package/dist/recovery/bundle_store.js +104 -0
- package/dist/recovery/bundle_store.js.map +1 -0
- package/dist/recovery/index.d.ts +19 -0
- package/dist/recovery/index.d.ts.map +1 -0
- package/dist/recovery/index.js +19 -0
- package/dist/recovery/index.js.map +1 -0
- package/dist/recovery/manifest_crosscheck.d.ts +59 -0
- package/dist/recovery/manifest_crosscheck.d.ts.map +1 -0
- package/dist/recovery/manifest_crosscheck.js +59 -0
- package/dist/recovery/manifest_crosscheck.js.map +1 -0
- package/dist/recovery/shamir.d.ts +51 -0
- package/dist/recovery/shamir.d.ts.map +1 -0
- package/dist/recovery/shamir.js +181 -0
- package/dist/recovery/shamir.js.map +1 -0
- package/dist/recovery/sign.d.ts +61 -0
- package/dist/recovery/sign.d.ts.map +1 -0
- package/dist/recovery/sign.js +359 -0
- package/dist/recovery/sign.js.map +1 -0
- package/dist/recovery/types.d.ts +180 -0
- package/dist/recovery/types.d.ts.map +1 -0
- package/dist/recovery/types.js +31 -0
- package/dist/recovery/types.js.map +1 -0
- package/dist/reputation/abuse_report.d.ts +62 -0
- package/dist/reputation/abuse_report.d.ts.map +1 -0
- package/dist/reputation/abuse_report.js +111 -0
- package/dist/reputation/abuse_report.js.map +1 -0
- package/dist/reputation/bucketize.d.ts +31 -0
- package/dist/reputation/bucketize.d.ts.map +1 -0
- package/dist/reputation/bucketize.js +77 -0
- package/dist/reputation/bucketize.js.map +1 -0
- package/dist/reputation/gossip.d.ts +24 -0
- package/dist/reputation/gossip.d.ts.map +1 -0
- package/dist/reputation/gossip.js +64 -0
- package/dist/reputation/gossip.js.map +1 -0
- package/dist/reputation/gossip_fetch.d.ts +64 -0
- package/dist/reputation/gossip_fetch.d.ts.map +1 -0
- package/dist/reputation/gossip_fetch.js +114 -0
- package/dist/reputation/gossip_fetch.js.map +1 -0
- package/dist/reputation/index.d.ts +20 -0
- package/dist/reputation/index.d.ts.map +1 -0
- package/dist/reputation/index.js +20 -0
- package/dist/reputation/index.js.map +1 -0
- package/dist/reputation/observation_store.d.ts +67 -0
- package/dist/reputation/observation_store.d.ts.map +1 -0
- package/dist/reputation/observation_store.js +171 -0
- package/dist/reputation/observation_store.js.map +1 -0
- package/dist/reputation/pow.d.ts +91 -0
- package/dist/reputation/pow.d.ts.map +1 -0
- package/dist/reputation/pow.js +209 -0
- package/dist/reputation/pow.js.map +1 -0
- package/dist/reputation/sign.d.ts +40 -0
- package/dist/reputation/sign.d.ts.map +1 -0
- package/dist/reputation/sign.js +202 -0
- package/dist/reputation/sign.js.map +1 -0
- package/dist/reputation/types.d.ts +133 -0
- package/dist/reputation/types.d.ts.map +1 -0
- package/dist/reputation/types.js +33 -0
- package/dist/reputation/types.js.map +1 -0
- package/dist/reputation/whois.d.ts +25 -0
- package/dist/reputation/whois.d.ts.map +1 -0
- package/dist/reputation/whois.js +20 -0
- package/dist/reputation/whois.js.map +1 -0
- package/dist/seal/index.d.ts +8 -0
- package/dist/seal/index.d.ts.map +1 -0
- package/dist/seal/index.js +8 -0
- package/dist/seal/index.js.map +1 -0
- package/dist/seal/wrap.d.ts +74 -0
- package/dist/seal/wrap.d.ts.map +1 -0
- package/dist/seal/wrap.js +213 -0
- package/dist/seal/wrap.js.map +1 -0
- package/dist/session/dispatcher.d.ts +65 -0
- package/dist/session/dispatcher.d.ts.map +1 -0
- package/dist/session/dispatcher.js +96 -0
- package/dist/session/dispatcher.js.map +1 -0
- package/dist/session/index.d.ts +15 -0
- package/dist/session/index.d.ts.map +1 -0
- package/dist/session/index.js +15 -0
- package/dist/session/index.js.map +1 -0
- package/dist/session/rekey.d.ts +108 -0
- package/dist/session/rekey.d.ts.map +1 -0
- package/dist/session/rekey.js +207 -0
- package/dist/session/rekey.js.map +1 -0
- package/dist/session/rekey_seal.d.ts +66 -0
- package/dist/session/rekey_seal.d.ts.map +1 -0
- package/dist/session/rekey_seal.js +153 -0
- package/dist/session/rekey_seal.js.map +1 -0
- package/dist/session/resume.d.ts +125 -0
- package/dist/session/resume.d.ts.map +1 -0
- package/dist/session/resume.js +263 -0
- package/dist/session/resume.js.map +1 -0
- package/dist/session/session.d.ts +136 -0
- package/dist/session/session.d.ts.map +1 -0
- package/dist/session/session.js +188 -0
- package/dist/session/session.js.map +1 -0
- package/dist/transparency/index.d.ts +13 -0
- package/dist/transparency/index.d.ts.map +1 -0
- package/dist/transparency/index.js +13 -0
- package/dist/transparency/index.js.map +1 -0
- package/dist/transparency/log.d.ts +61 -0
- package/dist/transparency/log.d.ts.map +1 -0
- package/dist/transparency/log.js +133 -0
- package/dist/transparency/log.js.map +1 -0
- package/dist/transparency/merkle.d.ts +59 -0
- package/dist/transparency/merkle.d.ts.map +1 -0
- package/dist/transparency/merkle.js +314 -0
- package/dist/transparency/merkle.js.map +1 -0
- package/dist/transparency/sign.d.ts +48 -0
- package/dist/transparency/sign.d.ts.map +1 -0
- package/dist/transparency/sign.js +140 -0
- package/dist/transparency/sign.js.map +1 -0
- package/dist/transparency/types.d.ts +97 -0
- package/dist/transparency/types.d.ts.map +1 -0
- package/dist/transparency/types.js +25 -0
- package/dist/transparency/types.js.map +1 -0
- package/dist/transport/h2.d.ts +163 -0
- package/dist/transport/h2.d.ts.map +1 -0
- package/dist/transport/h2.js +397 -0
- package/dist/transport/h2.js.map +1 -0
- package/dist/transport/index.d.ts +15 -0
- package/dist/transport/index.d.ts.map +1 -0
- package/dist/transport/index.js +15 -0
- package/dist/transport/index.js.map +1 -0
- package/dist/transport/memory.d.ts +21 -0
- package/dist/transport/memory.d.ts.map +1 -0
- package/dist/transport/memory.js +112 -0
- package/dist/transport/memory.js.map +1 -0
- package/dist/transport/transport.d.ts +54 -0
- package/dist/transport/transport.d.ts.map +1 -0
- package/dist/transport/transport.js +20 -0
- package/dist/transport/transport.js.map +1 -0
- package/dist/transport/ws.d.ts +40 -0
- package/dist/transport/ws.d.ts.map +1 -0
- package/dist/transport/ws.js +204 -0
- package/dist/transport/ws.js.map +1 -0
- package/package.json +147 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SEMP_KEYS request / response per CLIENT.md §5.4 + KEY.md §4.
|
|
3
|
+
*
|
|
4
|
+
* Clients send a SEMP_KEYS request over their authenticated session
|
|
5
|
+
* to ask the home server for one or more recipient users' published
|
|
6
|
+
* keys. The home server fulfills the request from cache or by
|
|
7
|
+
* fetching from the remote domain's well-known URI / federation
|
|
8
|
+
* session and returns a SEMP_KEYS response.
|
|
9
|
+
*
|
|
10
|
+
* @module
|
|
11
|
+
*/
|
|
12
|
+
/** Wire-level type discriminator. */
|
|
13
|
+
export const KeysRequestType = "SEMP_KEYS";
|
|
14
|
+
/** Wire-level version per ENVELOPE.md §1.4. */
|
|
15
|
+
export const KeysRequestVersion = "1.0.0";
|
|
16
|
+
/**
|
|
17
|
+
* Construct a SEMP_KEYS request with `version` + `timestamp`
|
|
18
|
+
* pre-populated and `include_domain_keys` set to the spec default
|
|
19
|
+
* (true).
|
|
20
|
+
*/
|
|
21
|
+
export function newKeysRequest(id, addresses, nowFn = () => new Date()) {
|
|
22
|
+
if (id === "") {
|
|
23
|
+
throw new Error("keys: empty request id");
|
|
24
|
+
}
|
|
25
|
+
if (addresses.length === 0) {
|
|
26
|
+
throw new Error("keys: request requires at least one address");
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
type: KeysRequestType,
|
|
30
|
+
step: "request",
|
|
31
|
+
version: KeysRequestVersion,
|
|
32
|
+
id,
|
|
33
|
+
timestamp: isoSecond(nowFn()),
|
|
34
|
+
addresses,
|
|
35
|
+
include_domain_keys: true,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/** Construct a SEMP_KEYS response echoing `requestId`. */
|
|
39
|
+
export function newKeysResponse(requestId, results, nowFn = () => new Date()) {
|
|
40
|
+
if (requestId === "") {
|
|
41
|
+
throw new Error("keys: empty request id");
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
type: KeysRequestType,
|
|
45
|
+
step: "response",
|
|
46
|
+
version: KeysRequestVersion,
|
|
47
|
+
id: requestId,
|
|
48
|
+
timestamp: isoSecond(nowFn()),
|
|
49
|
+
results,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Validate a SEMP_KEYS request structurally per §5.4.1. Throws on
|
|
54
|
+
* the first violation.
|
|
55
|
+
*/
|
|
56
|
+
export function validateKeysRequest(req) {
|
|
57
|
+
if (req.type !== KeysRequestType) {
|
|
58
|
+
throw new Error(`keys: type ${JSON.stringify(req.type)}, want ${KeysRequestType}`);
|
|
59
|
+
}
|
|
60
|
+
if (req.step !== "request") {
|
|
61
|
+
throw new Error(`keys: step ${JSON.stringify(req.step)}, want "request"`);
|
|
62
|
+
}
|
|
63
|
+
if (typeof req.version !== "string" || req.version === "") {
|
|
64
|
+
throw new Error("keys: missing version");
|
|
65
|
+
}
|
|
66
|
+
if (typeof req.id !== "string" || req.id === "") {
|
|
67
|
+
throw new Error("keys: missing id");
|
|
68
|
+
}
|
|
69
|
+
if (typeof req.timestamp !== "string" || req.timestamp === "") {
|
|
70
|
+
throw new Error("keys: missing timestamp");
|
|
71
|
+
}
|
|
72
|
+
if (Number.isNaN(Date.parse(req.timestamp))) {
|
|
73
|
+
throw new Error("keys: timestamp is not ISO 8601");
|
|
74
|
+
}
|
|
75
|
+
if (!Array.isArray(req.addresses) || req.addresses.length === 0) {
|
|
76
|
+
throw new Error("keys: addresses must be a non-empty array");
|
|
77
|
+
}
|
|
78
|
+
for (let i = 0; i < req.addresses.length; i++) {
|
|
79
|
+
if (typeof req.addresses[i] !== "string" || req.addresses[i] === "") {
|
|
80
|
+
throw new Error(`keys: addresses[${i}] missing`);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
if (typeof req.include_domain_keys !== "boolean") {
|
|
84
|
+
throw new Error("keys: include_domain_keys must be a boolean");
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Send a SEMP_KEYS request on the supplied stream and parse the
|
|
89
|
+
* response. The home server is expected to fulfill the request
|
|
90
|
+
* synchronously and respond on the same stream.
|
|
91
|
+
*
|
|
92
|
+
* Returns the parsed {@link KeysResponse}. Throws on transport
|
|
93
|
+
* failure, malformed JSON, response that is not a SEMP_KEYS
|
|
94
|
+
* response, or response whose `id` does not match the request.
|
|
95
|
+
*/
|
|
96
|
+
export async function fetchKeys(stream, req) {
|
|
97
|
+
validateKeysRequest(req);
|
|
98
|
+
await stream.send(new TextEncoder().encode(JSON.stringify(req)));
|
|
99
|
+
const respBytes = await stream.receive();
|
|
100
|
+
if (respBytes === null) {
|
|
101
|
+
throw new Error("keys: connection closed waiting for response");
|
|
102
|
+
}
|
|
103
|
+
let parsed;
|
|
104
|
+
try {
|
|
105
|
+
parsed = JSON.parse(new TextDecoder().decode(respBytes));
|
|
106
|
+
}
|
|
107
|
+
catch (err) {
|
|
108
|
+
throw new Error(`keys: response parse: ${err instanceof Error ? err.message : String(err)}`);
|
|
109
|
+
}
|
|
110
|
+
if (typeof parsed !== "object" ||
|
|
111
|
+
parsed === null ||
|
|
112
|
+
Array.isArray(parsed)) {
|
|
113
|
+
throw new Error("keys: response is not a JSON object");
|
|
114
|
+
}
|
|
115
|
+
const obj = parsed;
|
|
116
|
+
if (obj.type !== KeysRequestType) {
|
|
117
|
+
throw new Error(`keys: response type ${JSON.stringify(obj.type)}, want ${KeysRequestType}`);
|
|
118
|
+
}
|
|
119
|
+
if (obj.step !== "response") {
|
|
120
|
+
throw new Error(`keys: response step ${JSON.stringify(obj.step)}, want "response"`);
|
|
121
|
+
}
|
|
122
|
+
if (obj.id !== req.id) {
|
|
123
|
+
throw new Error(`keys: response id ${JSON.stringify(obj.id)} does not match request ${JSON.stringify(req.id)}`);
|
|
124
|
+
}
|
|
125
|
+
return obj;
|
|
126
|
+
}
|
|
127
|
+
function isoSecond(d) {
|
|
128
|
+
return d.toISOString().replace(/\.\d{3}Z$/, "Z");
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../src/keys/request.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,qCAAqC;AACrC,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAC;AAE3C,+CAA+C;AAC/C,MAAM,CAAC,MAAM,kBAAkB,GAAG,OAAO,CAAC;AAqF1C;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAC5B,EAAU,EACV,SAAmB,EACnB,QAAoB,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;IAEpC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;IAC5C,CAAC;IACD,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,C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;IACD,IAAI,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CACb,qBAAqB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,2BAA2B,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAC/F,CAAC;IACJ,CAAC;IACD,OAAO,GAA8B,CAAC;AACxC,CAAC;AAED,SAAS,SAAS,CAAC,CAAO;IACxB,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ed25519 signature primitives for SEMP signed documents.
|
|
3
|
+
*
|
|
4
|
+
* SEMP uses Ed25519 for every signature (sender, forwarder,
|
|
5
|
+
* domain, identity, recovery, transparency-STH, etc.). Each is
|
|
6
|
+
* computed over a canonical-JSON representation prefixed with a
|
|
7
|
+
* domain-separation tag from `ENVELOPE.md` §4.3.
|
|
8
|
+
*
|
|
9
|
+
* The keypair encoding follows libsodium / @noble convention:
|
|
10
|
+
* - secret seed: 32 bytes (the only secret material)
|
|
11
|
+
* - public key: 32 bytes (Ed25519 point)
|
|
12
|
+
*
|
|
13
|
+
* Some legacy APIs use a 64-byte "secret key" that concatenates the
|
|
14
|
+
* seed and the public key. SEMP and this module deal exclusively
|
|
15
|
+
* with the 32-byte seed form; convert at the boundary if needed.
|
|
16
|
+
*
|
|
17
|
+
* @module
|
|
18
|
+
*/
|
|
19
|
+
/** Length of an Ed25519 public key (32 bytes). */
|
|
20
|
+
export declare const PublicKeySize = 32;
|
|
21
|
+
/** Length of an Ed25519 secret seed (32 bytes). */
|
|
22
|
+
export declare const SeedSize = 32;
|
|
23
|
+
/** Length of an Ed25519 signature (64 bytes). */
|
|
24
|
+
export declare const SignatureSize = 64;
|
|
25
|
+
/**
|
|
26
|
+
* Derive the Ed25519 public key for the given secret seed.
|
|
27
|
+
*
|
|
28
|
+
* @param seed 32-byte secret seed.
|
|
29
|
+
*/
|
|
30
|
+
export declare function publicKeyFromSeed(seed: Uint8Array): Uint8Array;
|
|
31
|
+
/**
|
|
32
|
+
* Sign `message` with the Ed25519 secret seed. Returns a 64-byte
|
|
33
|
+
* detached signature.
|
|
34
|
+
*/
|
|
35
|
+
export declare function sign(seed: Uint8Array, message: Uint8Array): Uint8Array;
|
|
36
|
+
/**
|
|
37
|
+
* Verify a 64-byte detached Ed25519 signature against `publicKey`
|
|
38
|
+
* over `message`. Returns true on accept, false on reject. Never
|
|
39
|
+
* throws on a malformed signature; callers see false and surface
|
|
40
|
+
* an `auth_failed` reason.
|
|
41
|
+
*/
|
|
42
|
+
export declare function verify(publicKey: Uint8Array, signature: Uint8Array, message: Uint8Array): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Compute the SEMP key fingerprint per `KEY.md` §3 — SHA-256 of
|
|
45
|
+
* the raw 32-byte public key, lowercase-hex encoded. Used as the
|
|
46
|
+
* `key_id` field everywhere keys are referenced.
|
|
47
|
+
*/
|
|
48
|
+
export declare function fingerprint(publicKey: Uint8Array): string;
|
|
49
|
+
//# sourceMappingURL=sign.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign.d.ts","sourceRoot":"","sources":["../../src/keys/sign.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,kDAAkD;AAClD,eAAO,MAAM,aAAa,KAAK,CAAC;AAChC,mDAAmD;AACnD,eAAO,MAAM,QAAQ,KAAK,CAAC;AAC3B,iDAAiD;AACjD,eAAO,MAAM,aAAa,KAAK,CAAC;AAEhC;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU,CAG9D;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,GAAG,UAAU,CAGtE;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CACpB,SAAS,EAAE,UAAU,EACrB,SAAS,EAAE,UAAU,EACrB,OAAO,EAAE,UAAU,GAClB,OAAO,CAST;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,UAAU,GAAG,MAAM,CAQzD"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ed25519 signature primitives for SEMP signed documents.
|
|
3
|
+
*
|
|
4
|
+
* SEMP uses Ed25519 for every signature (sender, forwarder,
|
|
5
|
+
* domain, identity, recovery, transparency-STH, etc.). Each is
|
|
6
|
+
* computed over a canonical-JSON representation prefixed with a
|
|
7
|
+
* domain-separation tag from `ENVELOPE.md` §4.3.
|
|
8
|
+
*
|
|
9
|
+
* The keypair encoding follows libsodium / @noble convention:
|
|
10
|
+
* - secret seed: 32 bytes (the only secret material)
|
|
11
|
+
* - public key: 32 bytes (Ed25519 point)
|
|
12
|
+
*
|
|
13
|
+
* Some legacy APIs use a 64-byte "secret key" that concatenates the
|
|
14
|
+
* seed and the public key. SEMP and this module deal exclusively
|
|
15
|
+
* with the 32-byte seed form; convert at the boundary if needed.
|
|
16
|
+
*
|
|
17
|
+
* @module
|
|
18
|
+
*/
|
|
19
|
+
import { ed25519 } from "@noble/curves/ed25519.js";
|
|
20
|
+
import { sha256 } from "@noble/hashes/sha2.js";
|
|
21
|
+
/** Length of an Ed25519 public key (32 bytes). */
|
|
22
|
+
export const PublicKeySize = 32;
|
|
23
|
+
/** Length of an Ed25519 secret seed (32 bytes). */
|
|
24
|
+
export const SeedSize = 32;
|
|
25
|
+
/** Length of an Ed25519 signature (64 bytes). */
|
|
26
|
+
export const SignatureSize = 64;
|
|
27
|
+
/**
|
|
28
|
+
* Derive the Ed25519 public key for the given secret seed.
|
|
29
|
+
*
|
|
30
|
+
* @param seed 32-byte secret seed.
|
|
31
|
+
*/
|
|
32
|
+
export function publicKeyFromSeed(seed) {
|
|
33
|
+
expectLength("seed", seed, SeedSize);
|
|
34
|
+
return ed25519.getPublicKey(seed);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Sign `message` with the Ed25519 secret seed. Returns a 64-byte
|
|
38
|
+
* detached signature.
|
|
39
|
+
*/
|
|
40
|
+
export function sign(seed, message) {
|
|
41
|
+
expectLength("seed", seed, SeedSize);
|
|
42
|
+
return ed25519.sign(message, seed);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Verify a 64-byte detached Ed25519 signature against `publicKey`
|
|
46
|
+
* over `message`. Returns true on accept, false on reject. Never
|
|
47
|
+
* throws on a malformed signature; callers see false and surface
|
|
48
|
+
* an `auth_failed` reason.
|
|
49
|
+
*/
|
|
50
|
+
export function verify(publicKey, signature, message) {
|
|
51
|
+
if (publicKey.length !== PublicKeySize || signature.length !== SignatureSize) {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
try {
|
|
55
|
+
return ed25519.verify(signature, message, publicKey);
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Compute the SEMP key fingerprint per `KEY.md` §3 — SHA-256 of
|
|
63
|
+
* the raw 32-byte public key, lowercase-hex encoded. Used as the
|
|
64
|
+
* `key_id` field everywhere keys are referenced.
|
|
65
|
+
*/
|
|
66
|
+
export function fingerprint(publicKey) {
|
|
67
|
+
expectLength("publicKey", publicKey, PublicKeySize);
|
|
68
|
+
const sum = sha256(publicKey);
|
|
69
|
+
let s = "";
|
|
70
|
+
for (let i = 0; i < sum.length; i++) {
|
|
71
|
+
s += (sum[i] ?? 0).toString(16).padStart(2, "0");
|
|
72
|
+
}
|
|
73
|
+
return s;
|
|
74
|
+
}
|
|
75
|
+
function expectLength(name, b, want) {
|
|
76
|
+
if (b.length !== want) {
|
|
77
|
+
throw new Error(`keys: ${name} length ${b.length}, want ${want}`);
|
|
78
|
+
}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;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,SAAqB;IAC/C,YAAY,CAAC,WAAW,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;IACpD,MAAM,GAAG,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;IAC9B,IAAI,CAAC,GAAG,EAAE,CAAC;IACX,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACpC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAED,SAAS,YAAY,CAAC,IAAY,EAAE,CAAa,EAAE,IAAY;IAC7D,IAAI,CAAC,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,SAAS,IAAI,WAAW,CAAC,CAAC,MAAM,UAAU,IAAI,EAAE,CAAC,CAAC;IACpE,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Signed-document compose helpers.
|
|
3
|
+
*
|
|
4
|
+
* Every Ed25519-signed SEMP document — closure request, configuration
|
|
5
|
+
* update, user policy, migration record, sender-signature enclosure,
|
|
6
|
+
* delivery receipt, transparency STH, recovery manifest, recovery
|
|
7
|
+
* share, handshake response/accepted/rejected — follows the same
|
|
8
|
+
* shape: build the document with the signature value blanked,
|
|
9
|
+
* canonicalize per ENVELOPE.md §4.3, prepend a domain-separation
|
|
10
|
+
* prefix, sign with Ed25519, write the signature back into the
|
|
11
|
+
* document.
|
|
12
|
+
*
|
|
13
|
+
* `signSignedDoc` runs that flow on a deep copy of the input and
|
|
14
|
+
* returns both the populated document AND the bare base64 signature.
|
|
15
|
+
*
|
|
16
|
+
* @module
|
|
17
|
+
*/
|
|
18
|
+
/** Inputs to a signed-document compose. */
|
|
19
|
+
export interface SignSignedDocSpec {
|
|
20
|
+
/**
|
|
21
|
+
* The pre-sign document. Must contain the signature path with the
|
|
22
|
+
* value field present (any string content; will be blanked before
|
|
23
|
+
* canonicalization).
|
|
24
|
+
*/
|
|
25
|
+
preSignJSON: Record<string, unknown>;
|
|
26
|
+
/** 32-byte Ed25519 secret seed. */
|
|
27
|
+
seed: Uint8Array;
|
|
28
|
+
/** Dotted path to the signature value (e.g. "signature.value"). */
|
|
29
|
+
signaturePath: string;
|
|
30
|
+
/** Domain-separation prefix from ENVELOPE.md §4.3. */
|
|
31
|
+
prefix: string;
|
|
32
|
+
}
|
|
33
|
+
/** Result of a signed-document compose. */
|
|
34
|
+
export interface SignSignedDocResult {
|
|
35
|
+
/** Deep copy of preSignJSON with the signature value populated. */
|
|
36
|
+
signedJSON: Record<string, unknown>;
|
|
37
|
+
/** Canonical bytes that were signed (with the value blanked). */
|
|
38
|
+
canonicalBlanked: Uint8Array;
|
|
39
|
+
/** Base64-encoded Ed25519 signature. */
|
|
40
|
+
signatureB64: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Compose a signed document. Deep-clones the input, blanks the
|
|
44
|
+
* signature value field, canonicalizes, prepends the prefix,
|
|
45
|
+
* Ed25519-signs the result with `seed`, and writes the signature
|
|
46
|
+
* back into the cloned document at the same path.
|
|
47
|
+
*/
|
|
48
|
+
export declare function signSignedDoc(spec: SignSignedDocSpec): SignSignedDocResult;
|
|
49
|
+
/** Inputs to a signed-document verify. */
|
|
50
|
+
export interface VerifySignedDocSpec {
|
|
51
|
+
/** The signed document AS RECEIVED, with the signature populated. */
|
|
52
|
+
signedJSON: Record<string, unknown>;
|
|
53
|
+
/** 32-byte Ed25519 public key. */
|
|
54
|
+
publicKey: Uint8Array;
|
|
55
|
+
/** Dotted path to the signature value (e.g. "signature.value"). */
|
|
56
|
+
signaturePath: string;
|
|
57
|
+
/** Domain-separation prefix from ENVELOPE.md §4.3. */
|
|
58
|
+
prefix: string;
|
|
59
|
+
}
|
|
60
|
+
/** Result of a signed-document verify. */
|
|
61
|
+
export interface VerifySignedDocResult {
|
|
62
|
+
/** True when the signature verifies under `publicKey`. */
|
|
63
|
+
ok: boolean;
|
|
64
|
+
/** Canonical bytes the signature was checked against. */
|
|
65
|
+
canonicalBlanked: Uint8Array;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Verify a single signed document. Deep-clones the input, captures
|
|
69
|
+
* the base64 signature at `signaturePath`, blanks that path,
|
|
70
|
+
* canonicalizes per ENVELOPE.md §4.3, prepends `prefix`, and
|
|
71
|
+
* Ed25519-verifies.
|
|
72
|
+
*
|
|
73
|
+
* Throws if the document is structurally malformed (path missing,
|
|
74
|
+
* signature not a string, signature not valid base64). A successful
|
|
75
|
+
* parse with a bad signature returns `{ ok: false, canonicalBlanked }`
|
|
76
|
+
* — the canonical bytes are returned so callers can cross-check
|
|
77
|
+
* pinned `intermediates.canonical_with_blanked_signature_utf8`.
|
|
78
|
+
*/
|
|
79
|
+
export declare function verifySignedDoc(spec: VerifySignedDocSpec): VerifySignedDocResult;
|
|
80
|
+
//# sourceMappingURL=signed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signed.d.ts","sourceRoot":"","sources":["../../src/keys/signed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,2CAA2C;AAC3C,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,mCAAmC;IACnC,IAAI,EAAE,UAAU,CAAC;IACjB,mEAAmE;IACnE,aAAa,EAAE,MAAM,CAAC;IACtB,sDAAsD;IACtD,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,2CAA2C;AAC3C,MAAM,WAAW,mBAAmB;IAClC,mEAAmE;IACnE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,iEAAiE;IACjE,gBAAgB,EAAE,UAAU,CAAC;IAC7B,wCAAwC;IACxC,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,mBAAmB,CAS1E;AAED,0CAA0C;AAC1C,MAAM,WAAW,mBAAmB;IAClC,qEAAqE;IACrE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,kCAAkC;IAClC,SAAS,EAAE,UAAU,CAAC;IACtB,mEAAmE;IACnE,aAAa,EAAE,MAAM,CAAC;IACtB,sDAAsD;IACtD,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,0CAA0C;AAC1C,MAAM,WAAW,qBAAqB;IACpC,0DAA0D;IAC1D,EAAE,EAAE,OAAO,CAAC;IACZ,yDAAyD;IACzD,gBAAgB,EAAE,UAAU,CAAC;CAC9B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,mBAAmB,GAAG,qBAAqB,CAQhF"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Signed-document compose helpers.
|
|
3
|
+
*
|
|
4
|
+
* Every Ed25519-signed SEMP document — closure request, configuration
|
|
5
|
+
* update, user policy, migration record, sender-signature enclosure,
|
|
6
|
+
* delivery receipt, transparency STH, recovery manifest, recovery
|
|
7
|
+
* share, handshake response/accepted/rejected — follows the same
|
|
8
|
+
* shape: build the document with the signature value blanked,
|
|
9
|
+
* canonicalize per ENVELOPE.md §4.3, prepend a domain-separation
|
|
10
|
+
* prefix, sign with Ed25519, write the signature back into the
|
|
11
|
+
* document.
|
|
12
|
+
*
|
|
13
|
+
* `signSignedDoc` runs that flow on a deep copy of the input and
|
|
14
|
+
* returns both the populated document AND the bare base64 signature.
|
|
15
|
+
*
|
|
16
|
+
* @module
|
|
17
|
+
*/
|
|
18
|
+
import { marshal as canonicalMarshal } from "../canonical/index.js";
|
|
19
|
+
import { sign, verify } from "./sign.js";
|
|
20
|
+
/**
|
|
21
|
+
* Compose a signed document. Deep-clones the input, blanks the
|
|
22
|
+
* signature value field, canonicalizes, prepends the prefix,
|
|
23
|
+
* Ed25519-signs the result with `seed`, and writes the signature
|
|
24
|
+
* back into the cloned document at the same path.
|
|
25
|
+
*/
|
|
26
|
+
export function signSignedDoc(spec) {
|
|
27
|
+
const clone = deepCloneJSON(spec.preSignJSON);
|
|
28
|
+
setPath(clone, spec.signaturePath, "");
|
|
29
|
+
const blanked = canonicalMarshal(clone);
|
|
30
|
+
const signingInput = concat(new TextEncoder().encode(spec.prefix), blanked);
|
|
31
|
+
const sig = sign(spec.seed, signingInput);
|
|
32
|
+
const sigB64 = base64Encode(sig);
|
|
33
|
+
setPath(clone, spec.signaturePath, sigB64);
|
|
34
|
+
return { signedJSON: clone, canonicalBlanked: blanked, signatureB64: sigB64 };
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Verify a single signed document. Deep-clones the input, captures
|
|
38
|
+
* the base64 signature at `signaturePath`, blanks that path,
|
|
39
|
+
* canonicalizes per ENVELOPE.md §4.3, prepends `prefix`, and
|
|
40
|
+
* Ed25519-verifies.
|
|
41
|
+
*
|
|
42
|
+
* Throws if the document is structurally malformed (path missing,
|
|
43
|
+
* signature not a string, signature not valid base64). A successful
|
|
44
|
+
* parse with a bad signature returns `{ ok: false, canonicalBlanked }`
|
|
45
|
+
* — the canonical bytes are returned so callers can cross-check
|
|
46
|
+
* pinned `intermediates.canonical_with_blanked_signature_utf8`.
|
|
47
|
+
*/
|
|
48
|
+
export function verifySignedDoc(spec) {
|
|
49
|
+
const clone = deepCloneJSON(spec.signedJSON);
|
|
50
|
+
const sigB64 = pluckAndBlankPath(clone, spec.signaturePath);
|
|
51
|
+
const sig = base64Decode(sigB64);
|
|
52
|
+
const blanked = canonicalMarshal(clone);
|
|
53
|
+
const signingInput = concat(new TextEncoder().encode(spec.prefix), blanked);
|
|
54
|
+
const ok = verify(spec.publicKey, sig, signingInput);
|
|
55
|
+
return { ok, canonicalBlanked: blanked };
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Walk a dotted path, capture the leaf string, and replace it with
|
|
59
|
+
* "" in place. Throws if the path is malformed or the leaf is not a
|
|
60
|
+
* string. The captured string is returned (typically the base64
|
|
61
|
+
* signature value).
|
|
62
|
+
*/
|
|
63
|
+
function pluckAndBlankPath(m, path) {
|
|
64
|
+
const parts = path.split(".");
|
|
65
|
+
let cur = m;
|
|
66
|
+
for (let i = 0; i < parts.length - 1; i++) {
|
|
67
|
+
const key = parts[i];
|
|
68
|
+
if (key === undefined || key === "") {
|
|
69
|
+
throw new Error(`verifySignedDoc: empty path segment in ${path}`);
|
|
70
|
+
}
|
|
71
|
+
const next = cur[key];
|
|
72
|
+
if (typeof next !== "object" || next === null || Array.isArray(next)) {
|
|
73
|
+
throw new Error(`verifySignedDoc: path ${path}: segment ${key} is not an object`);
|
|
74
|
+
}
|
|
75
|
+
cur = next;
|
|
76
|
+
}
|
|
77
|
+
const leaf = parts[parts.length - 1];
|
|
78
|
+
if (leaf === undefined || leaf === "") {
|
|
79
|
+
throw new Error(`verifySignedDoc: path ${path} is empty`);
|
|
80
|
+
}
|
|
81
|
+
const value = cur[leaf];
|
|
82
|
+
if (typeof value !== "string") {
|
|
83
|
+
throw new Error(`verifySignedDoc: path ${path}: leaf is not a string`);
|
|
84
|
+
}
|
|
85
|
+
cur[leaf] = "";
|
|
86
|
+
return value;
|
|
87
|
+
}
|
|
88
|
+
function base64Decode(s) {
|
|
89
|
+
if (typeof Buffer !== "undefined") {
|
|
90
|
+
return new Uint8Array(Buffer.from(s, "base64"));
|
|
91
|
+
}
|
|
92
|
+
const bin = atob(s);
|
|
93
|
+
const out = new Uint8Array(bin.length);
|
|
94
|
+
for (let i = 0; i < bin.length; i++) {
|
|
95
|
+
out[i] = bin.charCodeAt(i);
|
|
96
|
+
}
|
|
97
|
+
return out;
|
|
98
|
+
}
|
|
99
|
+
function setPath(m, path, value) {
|
|
100
|
+
const parts = path.split(".");
|
|
101
|
+
let cur = m;
|
|
102
|
+
for (let i = 0; i < parts.length - 1; i++) {
|
|
103
|
+
const key = parts[i];
|
|
104
|
+
if (key === undefined) {
|
|
105
|
+
throw new Error(`signSignedDoc: empty path segment in ${path}`);
|
|
106
|
+
}
|
|
107
|
+
const next = cur[key];
|
|
108
|
+
if (typeof next !== "object" || next === null || Array.isArray(next)) {
|
|
109
|
+
throw new Error(`signSignedDoc: path ${path}: segment ${key} is not an object`);
|
|
110
|
+
}
|
|
111
|
+
cur = next;
|
|
112
|
+
}
|
|
113
|
+
const leaf = parts[parts.length - 1];
|
|
114
|
+
if (leaf === undefined) {
|
|
115
|
+
throw new Error(`signSignedDoc: path ${path} is empty`);
|
|
116
|
+
}
|
|
117
|
+
cur[leaf] = value;
|
|
118
|
+
}
|
|
119
|
+
function deepCloneJSON(v) {
|
|
120
|
+
return JSON.parse(JSON.stringify(v));
|
|
121
|
+
}
|
|
122
|
+
function concat(a, b) {
|
|
123
|
+
const out = new Uint8Array(a.length + b.length);
|
|
124
|
+
out.set(a, 0);
|
|
125
|
+
out.set(b, a.length);
|
|
126
|
+
return out;
|
|
127
|
+
}
|
|
128
|
+
function base64Encode(b) {
|
|
129
|
+
if (typeof Buffer !== "undefined") {
|
|
130
|
+
return Buffer.from(b).toString("base64");
|
|
131
|
+
}
|
|
132
|
+
let bin = "";
|
|
133
|
+
for (let i = 0; i < b.length; i++) {
|
|
134
|
+
bin += String.fromCharCode(b[i] ?? 0);
|
|
135
|
+
}
|
|
136
|
+
return btoa(bin);
|
|
137
|
+
}
|
|
138
|
+
//# sourceMappingURL=signed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signed.js","sourceRoot":"","sources":["../../src/keys/signed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAg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AM,EAAE,CAAC,EAAE,EAAE,CAAC;QAClC,GAAG,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Persistence interfaces and reference in-memory implementation for
|
|
3
|
+
* SEMP key records per KEY.md §4 / §8 / §9.
|
|
4
|
+
*
|
|
5
|
+
* The `KeyStore` interface is the layer-1 contract: it holds public
|
|
6
|
+
* key records (domain + user) and revocation state. `PrivateKeyStore`
|
|
7
|
+
* adds access to the user's own private key material in
|
|
8
|
+
* encrypted-at-rest form per KEY.md §9.1.
|
|
9
|
+
*
|
|
10
|
+
* Server implementations and client implementations have different
|
|
11
|
+
* storage needs but expose the same interfaces so handshake,
|
|
12
|
+
* envelope, and delivery code can be written once.
|
|
13
|
+
*
|
|
14
|
+
* The reference {@link InMemoryKeyStore} is intended for tests,
|
|
15
|
+
* single-process demos, and reference-implementation builds. It is
|
|
16
|
+
* NOT a production storage layer:
|
|
17
|
+
*
|
|
18
|
+
* - Private keys are held in memory in plaintext (no encryption at
|
|
19
|
+
* rest, no KDF, no hardware backing). This violates KEY.md §9.1.
|
|
20
|
+
* - There is no persistence: process restart loses everything.
|
|
21
|
+
*
|
|
22
|
+
* @module
|
|
23
|
+
*/
|
|
24
|
+
import type { DeviceCertificate } from "./device_certificate.js";
|
|
25
|
+
import type { Revocation } from "./key_revocation.js";
|
|
26
|
+
/** Key role per KEY.md §1.1. */
|
|
27
|
+
export type KeyType = "domain" | "identity" | "encryption" | "device";
|
|
28
|
+
/** A single signature entry on a {@link KeyStoreRecord} per KEY.md §5. */
|
|
29
|
+
export interface KeyStoreSignature {
|
|
30
|
+
signer: string;
|
|
31
|
+
key_id: string;
|
|
32
|
+
/** Base64 signature bytes. */
|
|
33
|
+
value: string;
|
|
34
|
+
/** ISO 8601 UTC. */
|
|
35
|
+
timestamp: string;
|
|
36
|
+
/** Optional informational tag attached by web-of-trust signers. */
|
|
37
|
+
trust_level?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* A single key record as it appears in a SEMP_KEYS response (KEY.md
|
|
41
|
+
* §4.3, §4.4) or in a domain key publication (KEY.md §2.3).
|
|
42
|
+
*/
|
|
43
|
+
export interface KeyStoreRecord {
|
|
44
|
+
/** Address (for user keys); empty for domain keys. */
|
|
45
|
+
address?: string;
|
|
46
|
+
key_type: KeyType;
|
|
47
|
+
algorithm: string;
|
|
48
|
+
/** Base64 public key. */
|
|
49
|
+
public_key: string;
|
|
50
|
+
/** Lowercase-hex SHA-256 fingerprint. */
|
|
51
|
+
key_id: string;
|
|
52
|
+
/** ISO 8601 UTC. */
|
|
53
|
+
created: string;
|
|
54
|
+
/**
|
|
55
|
+
* ISO 8601 UTC after which the key SHOULD NOT be used for new
|
|
56
|
+
* operations. Past-expiry keys remain valid for decrypting
|
|
57
|
+
* historical envelopes. Empty / absent for non-expiring keys.
|
|
58
|
+
*/
|
|
59
|
+
expires?: string;
|
|
60
|
+
/** Optional set of signatures attached to the record. */
|
|
61
|
+
signatures?: KeyStoreSignature[];
|
|
62
|
+
/** Non-null iff the key has been revoked per KEY.md §8. */
|
|
63
|
+
revocation?: Revocation;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Persistence interface for SEMP key material. Concrete
|
|
67
|
+
* implementations live in product code; the layer-1 library ships
|
|
68
|
+
* the interface plus {@link InMemoryKeyStore}.
|
|
69
|
+
*/
|
|
70
|
+
export interface KeyStore {
|
|
71
|
+
/** Look up the current domain key for `domain`, or null. */
|
|
72
|
+
lookupDomainKey(domain: string): KeyStoreRecord | null;
|
|
73
|
+
/**
|
|
74
|
+
* Look up all current key records for `address`, optionally
|
|
75
|
+
* filtered by `keyTypes`. Empty / undefined `keyTypes` means "all
|
|
76
|
+
* known types".
|
|
77
|
+
*/
|
|
78
|
+
lookupUserKeys(address: string, keyTypes?: KeyType[]): KeyStoreRecord[];
|
|
79
|
+
/**
|
|
80
|
+
* Persist a fetched key record. Implementations SHOULD respect the
|
|
81
|
+
* record's `expires` timestamp when caching.
|
|
82
|
+
*/
|
|
83
|
+
putRecord(rec: KeyStoreRecord): void;
|
|
84
|
+
/**
|
|
85
|
+
* Record a revocation. Subsequent {@link lookupUserKeys} /
|
|
86
|
+
* {@link lookupDomainKey} calls MUST surface the revocation in the
|
|
87
|
+
* returned record per KEY.md §8.
|
|
88
|
+
*/
|
|
89
|
+
putRevocation(keyId: string, rev: Revocation): void;
|
|
90
|
+
/**
|
|
91
|
+
* Look up a scoped device certificate by its delegated device's
|
|
92
|
+
* key fingerprint. Returns null when the device is full-access
|
|
93
|
+
* (no certificate is on file).
|
|
94
|
+
*/
|
|
95
|
+
lookupDeviceCertificate(deviceKeyId: string): DeviceCertificate | null;
|
|
96
|
+
/** Persist a delegated device certificate. */
|
|
97
|
+
putDeviceCertificate(cert: DeviceCertificate): void;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Extension that adds access to the user's own private keys. Only
|
|
101
|
+
* client implementations need this; server implementations never
|
|
102
|
+
* hold user private keys (KEY.md §9.1).
|
|
103
|
+
*/
|
|
104
|
+
export interface PrivateKeyStore extends KeyStore {
|
|
105
|
+
/**
|
|
106
|
+
* Decrypted private key material for `keyId`. Implementations are
|
|
107
|
+
* responsible for prompting the user for unlock credentials when
|
|
108
|
+
* required. Throws when no key is found.
|
|
109
|
+
*/
|
|
110
|
+
loadPrivateKey(keyId: string): Uint8Array;
|
|
111
|
+
/**
|
|
112
|
+
* Persist encrypted private key material for `keyId`. Production
|
|
113
|
+
* implementations MUST encrypt at rest using a KDF such as Argon2id
|
|
114
|
+
* (KEY.md §9.2).
|
|
115
|
+
*/
|
|
116
|
+
storePrivateKey(keyId: string, privateKey: Uint8Array): void;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Reference in-memory {@link KeyStore} + {@link PrivateKeyStore}.
|
|
120
|
+
* Tests, demos, and the reference build only.
|
|
121
|
+
*/
|
|
122
|
+
export declare class InMemoryKeyStore implements PrivateKeyStore {
|
|
123
|
+
private domainKeys;
|
|
124
|
+
private userKeys;
|
|
125
|
+
private privateKeys;
|
|
126
|
+
private deviceCerts;
|
|
127
|
+
/** Persist a domain record under `domain`. */
|
|
128
|
+
putDomainRecord(domain: string, rec: KeyStoreRecord): void;
|
|
129
|
+
lookupDomainKey(domain: string): KeyStoreRecord | null;
|
|
130
|
+
lookupUserKeys(address: string, keyTypes?: KeyType[]): KeyStoreRecord[];
|
|
131
|
+
putRecord(rec: KeyStoreRecord): void;
|
|
132
|
+
putRevocation(keyId: string, rev: Revocation): void;
|
|
133
|
+
lookupDeviceCertificate(deviceKeyId: string): DeviceCertificate | null;
|
|
134
|
+
putDeviceCertificate(cert: DeviceCertificate): void;
|
|
135
|
+
loadPrivateKey(keyId: string): Uint8Array;
|
|
136
|
+
storePrivateKey(keyId: string, privateKey: Uint8Array): void;
|
|
137
|
+
}
|
|
138
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/keys/store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,gCAAgC;AAChC,MAAM,MAAM,OAAO,GAAG,QAAQ,GAAG,UAAU,GAAG,YAAY,GAAG,QAAQ,CAAC;AAEtE,0EAA0E;AAC1E,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,oBAAoB;IACpB,SAAS,E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