@noy-db/hub 0.4.0-pre.4 → 0.4.0-pre.6
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/README.md +2 -2
- package/dist/api-5QVQX4HG.js +20 -0
- package/dist/attestation/index.js +18 -18
- package/dist/{backup-JL2GOTYQ.js → backup-USYSNCYM.js} +11 -11
- package/dist/blobs/index.js +15 -12
- package/dist/blobs/index.js.map +1 -1
- package/dist/broker/index.js +12 -12
- package/dist/cargo/index.js +34 -36
- package/dist/{chunk-JLHKBAFY.js → chunk-2BVW754E.js} +3 -3
- package/dist/{chunk-T7S4V52L.js → chunk-2PDBYF2O.js} +4 -4
- package/dist/{chunk-YGBIBOCR.js → chunk-2ZSC454H.js} +7 -7
- package/dist/{chunk-IGAIOGCN.js → chunk-32467U5J.js} +4 -4
- package/dist/{chunk-JA5O7UEZ.js → chunk-3GXDB3NQ.js} +6 -6
- package/dist/chunk-3GXDB3NQ.js.map +1 -0
- package/dist/{chunk-U73LHVPF.js → chunk-3S2YNMUS.js} +54 -6
- package/dist/chunk-3S2YNMUS.js.map +1 -0
- package/dist/{chunk-JW3XCZA2.js → chunk-3TZUC4WS.js} +11 -11
- package/dist/{chunk-JA5B3SLH.js → chunk-44Y3P5U6.js} +2 -2
- package/dist/{chunk-25G7U6RD.js → chunk-4B3DL75F.js} +2 -2
- package/dist/{chunk-L4OA7G5T.js → chunk-522MBPE5.js} +2 -2
- package/dist/chunk-5ABOFAHN.js +81 -0
- package/dist/chunk-5ABOFAHN.js.map +1 -0
- package/dist/chunk-5D2ALSM5.js +19 -0
- package/dist/chunk-5D2ALSM5.js.map +1 -0
- package/dist/{chunk-M25ZIEB2.js → chunk-5HSSTOOG.js} +2 -2
- package/dist/{chunk-LLVW4V7R.js → chunk-5WLDZZ6S.js} +3 -3
- package/dist/{chunk-BCOKZC4B.js → chunk-6SSWOUUS.js} +19 -19
- package/dist/chunk-6SSWOUUS.js.map +1 -0
- package/dist/{chunk-IGM563N5.js → chunk-6SYOHUHM.js} +6 -6
- package/dist/chunk-6SYOHUHM.js.map +1 -0
- package/dist/{chunk-7B4GPCX7.js → chunk-7IQWHYL2.js} +5 -5
- package/dist/{chunk-J3VW4J4E.js → chunk-7LP7FFJ2.js} +2 -2
- package/dist/chunk-7LP7FFJ2.js.map +1 -0
- package/dist/{chunk-5P5AAXYA.js → chunk-7U6AB7DZ.js} +7 -7
- package/dist/chunk-7U6AB7DZ.js.map +1 -0
- package/dist/chunk-AFHQATY4.js +47 -0
- package/dist/chunk-AFHQATY4.js.map +1 -0
- package/dist/{chunk-OWE4BNTM.js → chunk-AZXEOEQK.js} +4 -4
- package/dist/{chunk-GBEXTC6Z.js → chunk-BAAUFCJK.js} +3 -3
- package/dist/chunk-BAAUFCJK.js.map +1 -0
- package/dist/{chunk-BZEPJJOK.js → chunk-C2V7AJO2.js} +4 -4
- package/dist/chunk-CADUYBQD.js +151 -0
- package/dist/chunk-CADUYBQD.js.map +1 -0
- package/dist/{chunk-2JZ763FV.js → chunk-D4LAJ737.js} +2 -2
- package/dist/{chunk-5BHNQNBI.js → chunk-DOZFU7OZ.js} +1 -1
- package/dist/chunk-DOZFU7OZ.js.map +1 -0
- package/dist/{chunk-MEKAMERX.js → chunk-E7FSBI6I.js} +29 -29
- package/dist/chunk-E7FSBI6I.js.map +1 -0
- package/dist/{chunk-N4FZ6ITM.js → chunk-EGU4PWQW.js} +2 -2
- package/dist/chunk-EP5L47XV.js +22 -0
- package/dist/chunk-EP5L47XV.js.map +1 -0
- package/dist/{chunk-EW4HFWGJ.js → chunk-EPME33Y4.js} +6 -6
- package/dist/{chunk-W7TCXZWU.js → chunk-EWPS35AR.js} +794 -1045
- package/dist/chunk-EWPS35AR.js.map +1 -0
- package/dist/{chunk-JKWNG3TM.js → chunk-FHHYCBBP.js} +2 -2
- package/dist/{chunk-5BB3N4KU.js → chunk-G4MFQXYX.js} +2 -2
- package/dist/{chunk-KVHWEPT2.js → chunk-GHEMAVTN.js} +2 -2
- package/dist/{chunk-CGPO3ZYB.js → chunk-GQT6J4FJ.js} +15 -2
- package/dist/chunk-GQT6J4FJ.js.map +1 -0
- package/dist/{chunk-XW7NWO4A.js → chunk-GTNRMJYH.js} +2 -2
- package/dist/{chunk-YG2EG6CB.js → chunk-H5GMROCB.js} +4 -4
- package/dist/{chunk-JIMEB4C6.js → chunk-HA7P3BTB.js} +26 -177
- package/dist/chunk-HA7P3BTB.js.map +1 -0
- package/dist/{chunk-5KI3REO3.js → chunk-HDF5R2K6.js} +7 -7
- package/dist/{chunk-V3YB7RGR.js → chunk-HVPW6PCX.js} +3 -3
- package/dist/{chunk-2VUISNGP.js → chunk-HXVRRJBD.js} +5 -5
- package/dist/{chunk-ZJGZDOQO.js → chunk-ICYC5YNI.js} +6 -6
- package/dist/{chunk-KR5EGWI4.js → chunk-IUATR5UE.js} +27 -5
- package/dist/chunk-IUATR5UE.js.map +1 -0
- package/dist/{chunk-AFBJHD55.js → chunk-JGOKAZNB.js} +5 -5
- package/dist/{chunk-XGVDLQJE.js → chunk-JOCMXSR2.js} +3 -3
- package/dist/{chunk-XGVDLQJE.js.map → chunk-JOCMXSR2.js.map} +1 -1
- package/dist/{chunk-HGVFJL63.js → chunk-JTIPVW4J.js} +15 -5
- package/dist/{chunk-HGVFJL63.js.map → chunk-JTIPVW4J.js.map} +1 -1
- package/dist/{chunk-QXPOEAKR.js → chunk-KCZAFDP5.js} +2 -2
- package/dist/{chunk-MSO2C3KG.js → chunk-LC7DSMHR.js} +2 -2
- package/dist/{chunk-OVFCAS7U.js → chunk-LG2GUYRX.js} +9 -9
- package/dist/{chunk-2KL6NDD4.js → chunk-LN3MQFUE.js} +56 -4
- package/dist/chunk-LN3MQFUE.js.map +1 -0
- package/dist/{chunk-QUIG6BZT.js → chunk-M4GO4ZJK.js} +226 -36
- package/dist/chunk-M4GO4ZJK.js.map +1 -0
- package/dist/{chunk-QDNVHA2F.js → chunk-M7W2KYTL.js} +2 -2
- package/dist/{chunk-XULHFSHO.js → chunk-MLCTPWSO.js} +5 -5
- package/dist/chunk-MLCTPWSO.js.map +1 -0
- package/dist/{chunk-PEY6ZTCF.js → chunk-MMVQ3SUO.js} +9 -9
- package/dist/{chunk-PEY6ZTCF.js.map → chunk-MMVQ3SUO.js.map} +1 -1
- package/dist/{chunk-4X6DJZHY.js → chunk-MPPWL64H.js} +26 -43
- package/dist/chunk-MPPWL64H.js.map +1 -0
- package/dist/{chunk-QYJIOWKN.js → chunk-MQBFT2OT.js} +11 -9
- package/dist/chunk-MQBFT2OT.js.map +1 -0
- package/dist/{chunk-IUIVDVXM.js → chunk-MUPZ6IZX.js} +2 -2
- package/dist/{chunk-GZ2GKOF6.js → chunk-NA374QG7.js} +3 -3
- package/dist/chunk-NIKO2BBZ.js +23 -0
- package/dist/chunk-NIKO2BBZ.js.map +1 -0
- package/dist/{chunk-2U7Y7BNJ.js → chunk-ONB627HU.js} +2 -2
- package/dist/{chunk-GYB2QK5H.js → chunk-OWLZONGX.js} +2 -2
- package/dist/{chunk-YHPUDB7Q.js → chunk-OWOT7CFC.js} +2 -2
- package/dist/{chunk-VEX6G3YL.js → chunk-P4NUJVWL.js} +2 -2
- package/dist/chunk-PEOZ34EM.js +13 -0
- package/dist/chunk-PEOZ34EM.js.map +1 -0
- package/dist/{chunk-NM4LVUXH.js → chunk-PTT2NB46.js} +2 -2
- package/dist/chunk-PVEWA2DU.js +23 -0
- package/dist/chunk-PVEWA2DU.js.map +1 -0
- package/dist/{chunk-2ITLQZV5.js → chunk-PWWWMRT7.js} +2 -2
- package/dist/{chunk-FLHOTGOO.js → chunk-QVGEVZ5F.js} +3 -3
- package/dist/{chunk-HKR25MGX.js → chunk-QVIZDLAR.js} +10 -10
- package/dist/chunk-QVIZDLAR.js.map +1 -0
- package/dist/{chunk-OOTTXUNV.js → chunk-RM5EXCFF.js} +2 -2
- package/dist/{chunk-OOTTXUNV.js.map → chunk-RM5EXCFF.js.map} +1 -1
- package/dist/{chunk-OGFPMCSP.js → chunk-SBOHNJUD.js} +2 -2
- package/dist/{chunk-EDC6MLXV.js → chunk-SEU6QHH4.js} +2 -2
- package/dist/chunk-SMY5X46Z.js +14 -0
- package/dist/chunk-SMY5X46Z.js.map +1 -0
- package/dist/{chunk-F4COUZLL.js → chunk-TMR64XPL.js} +2 -2
- package/dist/{chunk-5OZCCLNC.js → chunk-TSNRZSRC.js} +2 -2
- package/dist/{chunk-2RMDVWGB.js → chunk-UNREYBZO.js} +2 -2
- package/dist/{chunk-BLB7P7LS.js → chunk-V2R2VWER.js} +176 -17
- package/dist/chunk-V2R2VWER.js.map +1 -0
- package/dist/{chunk-3XVOLB75.js → chunk-VDTWFN2P.js} +7 -5
- package/dist/chunk-VDTWFN2P.js.map +1 -0
- package/dist/chunk-VKQCVU2Z.js +21 -0
- package/dist/chunk-VKQCVU2Z.js.map +1 -0
- package/dist/{chunk-QCUH2G77.js → chunk-VNJMLOQS.js} +6 -6
- package/dist/{chunk-UEO5CHOP.js → chunk-WCJJQV2D.js} +13 -13
- package/dist/chunk-WCJJQV2D.js.map +1 -0
- package/dist/{chunk-25ZDB25Z.js → chunk-WWBC4KLB.js} +3 -3
- package/dist/chunk-WWBC4KLB.js.map +1 -0
- package/dist/{chunk-V7RGFJ3Z.js → chunk-XG7OZDOS.js} +6 -6
- package/dist/{chunk-GS3Q2KOZ.js → chunk-XONZGK6J.js} +2 -2
- package/dist/{chunk-5SZ24DL5.js → chunk-XSOGLHGY.js} +6 -6
- package/dist/{chunk-CCT4WZI6.js → chunk-XY6MNSAF.js} +5 -5
- package/dist/chunk-XY6MNSAF.js.map +1 -0
- package/dist/chunk-XZHEOSQ2.js +16 -0
- package/dist/chunk-XZHEOSQ2.js.map +1 -0
- package/dist/{chunk-NOT7XA7Q.js → chunk-YGMREQAK.js} +5 -5
- package/dist/{chunk-H4SMS4O2.js → chunk-YJ3TREAC.js} +2 -2
- package/dist/chunk-YMUFFJCO.js +23 -0
- package/dist/chunk-YMUFFJCO.js.map +1 -0
- package/dist/{chunk-E2R5NRZD.js → chunk-Z4D3YGAB.js} +2 -2
- package/dist/{chunk-WJDYZP3U.js → chunk-ZDFU34XY.js} +42 -39
- package/dist/chunk-ZDFU34XY.js.map +1 -0
- package/dist/{chunk-BZK6JEX4.js → chunk-ZF572E2M.js} +5 -5
- package/dist/{chunk-DEQ2JTBR.js → chunk-ZGEFBDPR.js} +4 -4
- package/dist/chunk-ZGEFBDPR.js.map +1 -0
- package/dist/{chunk-QAFWRGVD.js → chunk-ZHMUFYZF.js} +7 -7
- package/dist/{chunk-BVZGNMVM.js → chunk-ZHZ4PET5.js} +3 -3
- package/dist/{chunk-IZX3WZBF.js → chunk-ZM72UO3Y.js} +4 -4
- package/dist/{chunk-STR7WBOB.js → chunk-ZUDAK436.js} +2 -2
- package/dist/{chunk-ITI3SJRB.js → chunk-ZX5FNWH7.js} +2 -2
- package/dist/classified/index.js +5 -5
- package/dist/{classified-marker-7S5IEP6Q.js → classified-marker-SVDRXLD3.js} +3 -3
- package/dist/collection-facade-S5PPKZD5.js +44 -0
- package/dist/{computed-WZNKRLCY.js → computed-33DRJDOC.js} +3 -3
- package/dist/consent/index.js +13 -9
- package/dist/consent/index.js.map +1 -1
- package/dist/{cover-B5MY43CK.js → cover-ADBCTIKN.js} +4 -4
- package/dist/crdt/index.js +4 -0
- package/dist/crdt/index.js.map +1 -1
- package/dist/{dead-filter-KRRD57MR.js → dead-filter-HKDMTMVY.js} +2 -2
- package/dist/delegation-EV7LKJPH.js +25 -0
- package/dist/derivations/index.js +12 -12
- package/dist/derive-5LDJW76F.js +21 -0
- package/dist/dispatch-SPMYNXNW.js +194 -0
- package/dist/dispatch-SPMYNXNW.js.map +1 -0
- package/dist/dispatch-V5MSMQYX.js +72 -0
- package/dist/dispatch-V5MSMQYX.js.map +1 -0
- package/dist/{enclave-YFKA3GJT.js → enclave-ZA7C3H2L.js} +11 -11
- package/dist/executor-FCJEH3FU.js +9 -0
- package/dist/executor-OHET7TF7.js +9 -0
- package/dist/executor-SVHAJZ4A.js +28 -0
- package/dist/export-accessible-S35YKIBL.js +23 -0
- package/dist/extract-partition-UVHAM5WZ.js +38 -0
- package/dist/{fanout-sidecar-HJV3A7PM.js → fanout-sidecar-HRMHC34B.js} +9 -9
- package/dist/find-LEBUXVL7.js +11 -0
- package/dist/forget/index.js +9 -9
- package/dist/guards/index.js +3 -3
- package/dist/history/index.js +16 -12
- package/dist/history/index.js.map +1 -1
- package/dist/i18n/index.js +16 -14
- package/dist/i18n/index.js.map +1 -1
- package/dist/index.d.ts +17 -16
- package/dist/index.js +155 -211
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +4 -2
- package/dist/indexing/index.js.map +1 -1
- package/dist/issue-5X3SMCF4.js +19 -0
- package/dist/kernel/collection.d.ts +0 -1
- package/dist/kernel/enclave/crypto.d.ts +8 -8
- package/dist/kernel/enclave/index.d.ts +2 -2
- package/dist/kernel/errors.d.ts +20 -20
- package/dist/kernel/lazy.d.ts +30 -0
- package/dist/kernel/noydb.d.ts +53 -101
- package/dist/kernel/query/builder.d.ts +10 -10
- package/dist/kernel/query/index.d.ts +0 -6
- package/dist/kernel/query/scan-builder.d.ts +4 -4
- package/dist/kernel/types.d.ts +87 -46
- package/dist/kernel/validation.d.ts +33 -33
- package/dist/kernel/vault.d.ts +12 -149
- package/dist/kernel/via/dispatch.d.ts +7 -0
- package/dist/{ledger-SW6QQOAV.js → ledger-K6JBFL3Z.js} +11 -11
- package/dist/liberate-NHTCKBU4.js +24 -0
- package/dist/{link-set-GNGGCFI4.js → link-set-XVZY2ODC.js} +11 -11
- package/dist/materialized-views/index.js +22 -19
- package/dist/noydb-TI3RFU6M.js +78 -0
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.js +15 -13
- package/dist/pod/index.js +11 -12
- package/dist/{policy-EAXSJNOT.js → policy-QWGJB7P7.js} +5 -5
- package/dist/port/with/collection-options.d.ts +171 -0
- package/dist/port/with/collection-registries.d.ts +62 -0
- package/dist/port/with/strategies.d.ts +2 -2
- package/dist/port/with/team-strategy.d.ts +3 -2
- package/dist/portability/index.js +8 -8
- package/dist/{post-register-A7HCFBP5.js → post-register-5VHHVFJY.js} +6 -6
- package/dist/query/index.js +6 -46
- package/dist/{aggregate → reduce}/index.js +24 -17
- package/dist/reduce/index.js.map +1 -0
- package/dist/register-CEX7R7NE.js +23 -0
- package/dist/registry-7CZWF3EQ.js +9 -0
- package/dist/registry-DIKMRXUC.js +19 -0
- package/dist/registry-EWIB5NTI.js +18 -0
- package/dist/request-withdrawal-AAG57QO4.js +31 -0
- package/dist/{reveal-PB3YG544.js → reveal-7OOT5XPD.js} +6 -6
- package/dist/revoke-U5LCIJMF.js +24 -0
- package/dist/satellites/index.js +1 -1
- package/dist/sealed-record/index.js +12 -12
- package/dist/{seed-EKF4DIBB.js → seed-GVOI6QP6.js} +12 -12
- package/dist/seed-GVOI6QP6.js.map +1 -0
- package/dist/session/index.js +13 -9
- package/dist/session/index.js.map +1 -1
- package/dist/shadow/index.js +6 -2
- package/dist/shadow/index.js.map +1 -1
- package/dist/signer-NAA2OX7H.js +25 -0
- package/dist/snapshots/index.js +14 -10
- package/dist/snapshots/index.js.map +1 -1
- package/dist/{stale-4UNPHWOU.js → stale-BJO2WIN7.js} +11 -10
- package/dist/storage-FL7XXZTN.js +23 -0
- package/dist/{store-coordination-provider-3AELCZ4Y.js → store-coordination-provider-DX5HECK3.js} +3 -3
- package/dist/sync/index.js +14 -10
- package/dist/sync/index.js.map +1 -1
- package/dist/team/index.js +26 -28
- package/dist/tiers/index.js +10 -10
- package/dist/to/index.js +1 -1
- package/dist/tx/index.js +7 -3
- package/dist/tx/index.js.map +1 -1
- package/dist/util/index.js +1 -1
- package/dist/{verify-MXN66IIH.js → verify-5X37OXRY.js} +5 -5
- package/dist/via/blob/index.d.ts +2 -0
- package/dist/via/i18n/core.d.ts +1 -1
- package/dist/via/i18n/index.d.ts +2 -0
- package/dist/via/money/money-reducer.d.ts +2 -2
- package/dist/{walk-H4YE52S2.js → walk-JXMWKKQW.js} +11 -11
- package/dist/with-audit/consent/index.d.ts +2 -0
- package/dist/with-audit/periods/index.d.ts +2 -0
- package/dist/with-audit/portability/export-accessible.d.ts +4 -4
- package/dist/with-audit/portability/request-withdrawal.d.ts +3 -3
- package/dist/with-audit/portability/withdraw-accessible.d.ts +2 -2
- package/dist/with-audit/sealed-record/strategy.d.ts +1 -1
- package/dist/with-cargo/adopt-partition.d.ts +7 -7
- package/dist/with-cargo/floor.d.ts +3 -3
- package/dist/with-cargo/index.d.ts +1 -1
- package/dist/with-commit/crdt/index.d.ts +2 -0
- package/dist/with-commit/history/index.d.ts +2 -0
- package/dist/with-commit/history/time-machine.d.ts +2 -2
- package/dist/with-fork/shadow/index.d.ts +2 -0
- package/dist/with-fork/snapshots/index.d.ts +2 -0
- package/dist/with-formula/derivations/dispatch.d.ts +98 -0
- package/dist/with-formula/materialized-views/dispatch.d.ts +75 -0
- package/dist/with-formula/materialized-views/types.d.ts +7 -7
- package/dist/with-lookup/indexing/index.d.ts +2 -0
- package/dist/with-lookup/{aggregate → reduce}/active.d.ts +8 -8
- package/dist/with-lookup/{aggregate → reduce}/groupby.d.ts +21 -21
- package/dist/with-lookup/reduce/index.d.ts +34 -0
- package/dist/with-lookup/{aggregate → reduce}/reducers.d.ts +10 -10
- package/dist/with-lookup/{aggregate/aggregation.d.ts → reduce/reduction.d.ts} +21 -21
- package/dist/with-lookup/{aggregate → reduce}/strategy.d.ts +15 -15
- package/dist/with-party/custody/liberate.d.ts +3 -3
- package/dist/with-party/session/dev-unlock.d.ts +2 -2
- package/dist/with-party/session/index.d.ts +2 -0
- package/dist/with-party/session/session.d.ts +2 -2
- package/dist/with-party/sync/index.d.ts +2 -0
- package/dist/with-party/team/deed.d.ts +8 -8
- package/dist/with-party/team/index.d.ts +2 -2
- package/dist/with-party/team/keyring.d.ts +39 -20
- package/dist/with-party/team/{managed-passphrase.d.ts → managed-secret.d.ts} +27 -27
- package/dist/with-party/team/noydb-facade.d.ts +43 -42
- package/dist/with-party/team/peer-recover.d.ts +13 -13
- package/dist/with-party/team/recovery.d.ts +5 -5
- package/dist/with-party/team/rotate-recover.d.ts +30 -30
- package/dist/with-pod/bundle.d.ts +30 -30
- package/dist/with-pod/format.d.ts +2 -2
- package/dist/withdraw-accessible-GO6KQJVM.js +28 -0
- package/package.json +6 -34
- package/dist/aggregate/index.js.map +0 -1
- package/dist/api-UPAT2O3M.js +0 -20
- package/dist/as/index.js +0 -30
- package/dist/at/index.js +0 -1
- package/dist/by/index.js +0 -11
- package/dist/chunk-25ZDB25Z.js.map +0 -1
- package/dist/chunk-2KL6NDD4.js.map +0 -1
- package/dist/chunk-2YELV6TV.js +0 -1
- package/dist/chunk-3O62PVDW.js +0 -205
- package/dist/chunk-3O62PVDW.js.map +0 -1
- package/dist/chunk-3XVOLB75.js.map +0 -1
- package/dist/chunk-4X6DJZHY.js.map +0 -1
- package/dist/chunk-5BHNQNBI.js.map +0 -1
- package/dist/chunk-5P5AAXYA.js.map +0 -1
- package/dist/chunk-BCOKZC4B.js.map +0 -1
- package/dist/chunk-BLB7P7LS.js.map +0 -1
- package/dist/chunk-CCT4WZI6.js.map +0 -1
- package/dist/chunk-CGPO3ZYB.js.map +0 -1
- package/dist/chunk-DEQ2JTBR.js.map +0 -1
- package/dist/chunk-GBEXTC6Z.js.map +0 -1
- package/dist/chunk-HKR25MGX.js.map +0 -1
- package/dist/chunk-IGM563N5.js.map +0 -1
- package/dist/chunk-J3VW4J4E.js.map +0 -1
- package/dist/chunk-JA5O7UEZ.js.map +0 -1
- package/dist/chunk-JIMEB4C6.js.map +0 -1
- package/dist/chunk-KMONEHDJ.js +0 -54
- package/dist/chunk-KMONEHDJ.js.map +0 -1
- package/dist/chunk-KR5EGWI4.js.map +0 -1
- package/dist/chunk-LB7FD65R.js +0 -163
- package/dist/chunk-LB7FD65R.js.map +0 -1
- package/dist/chunk-MEKAMERX.js.map +0 -1
- package/dist/chunk-QUIG6BZT.js.map +0 -1
- package/dist/chunk-QYJIOWKN.js.map +0 -1
- package/dist/chunk-U73LHVPF.js.map +0 -1
- package/dist/chunk-UEO5CHOP.js.map +0 -1
- package/dist/chunk-W7TCXZWU.js.map +0 -1
- package/dist/chunk-WEC3JGBA.js +0 -255
- package/dist/chunk-WEC3JGBA.js.map +0 -1
- package/dist/chunk-WJDYZP3U.js.map +0 -1
- package/dist/chunk-XULHFSHO.js.map +0 -1
- package/dist/collection-facade-CMZGQ6IS.js +0 -44
- package/dist/delegation-UT76AQIG.js +0 -25
- package/dist/derive-SGRCCKVP.js +0 -21
- package/dist/executor-TEZYRDN3.js +0 -9
- package/dist/executor-WQQRU6DO.js +0 -9
- package/dist/executor-YORMIBWV.js +0 -26
- package/dist/export-accessible-HXMKW5LJ.js +0 -23
- package/dist/extract-partition-QGQ2R42J.js +0 -38
- package/dist/find-VV6PBIHK.js +0 -11
- package/dist/in/index.js +0 -1
- package/dist/issue-7JJ4Z7E2.js +0 -19
- package/dist/liberate-FK7JI2QX.js +0 -24
- package/dist/noydb-N5IW6OFZ.js +0 -70
- package/dist/on/index.js +0 -17
- package/dist/port/as/index.d.ts +0 -26
- package/dist/port/at/index.d.ts +0 -18
- package/dist/port/in/index.d.ts +0 -21
- package/dist/port/on/index.d.ts +0 -27
- package/dist/port/ui/index.d.ts +0 -21
- package/dist/port/with/index.d.ts +0 -18
- package/dist/register-YBMRLZLO.js +0 -23
- package/dist/registry-3LXKNXWI.js +0 -9
- package/dist/registry-4V4YQCXJ.js +0 -19
- package/dist/registry-ZULMLCJK.js +0 -18
- package/dist/request-withdrawal-SEVUEUDG.js +0 -31
- package/dist/request-withdrawal-SEVUEUDG.js.map +0 -1
- package/dist/revoke-5QULL5GT.js +0 -24
- package/dist/revoke-5QULL5GT.js.map +0 -1
- package/dist/seed-EKF4DIBB.js.map +0 -1
- package/dist/signer-ZMH35FT4.js +0 -25
- package/dist/signer-ZMH35FT4.js.map +0 -1
- package/dist/stale-4UNPHWOU.js.map +0 -1
- package/dist/storage-QOZKQMID.js +0 -23
- package/dist/storage-QOZKQMID.js.map +0 -1
- package/dist/ui/index.js +0 -1
- package/dist/ui/index.js.map +0 -1
- package/dist/with/index.js +0 -31
- package/dist/with/index.js.map +0 -1
- package/dist/with-lookup/aggregate/index.d.ts +0 -23
- package/dist/withdraw-accessible-HPOVNG2G.js +0 -28
- package/dist/withdraw-accessible-HPOVNG2G.js.map +0 -1
- /package/dist/{api-UPAT2O3M.js.map → api-5QVQX4HG.js.map} +0 -0
- /package/dist/{backup-JL2GOTYQ.js.map → backup-USYSNCYM.js.map} +0 -0
- /package/dist/{chunk-JLHKBAFY.js.map → chunk-2BVW754E.js.map} +0 -0
- /package/dist/{chunk-T7S4V52L.js.map → chunk-2PDBYF2O.js.map} +0 -0
- /package/dist/{chunk-YGBIBOCR.js.map → chunk-2ZSC454H.js.map} +0 -0
- /package/dist/{chunk-IGAIOGCN.js.map → chunk-32467U5J.js.map} +0 -0
- /package/dist/{chunk-JW3XCZA2.js.map → chunk-3TZUC4WS.js.map} +0 -0
- /package/dist/{chunk-JA5B3SLH.js.map → chunk-44Y3P5U6.js.map} +0 -0
- /package/dist/{chunk-25G7U6RD.js.map → chunk-4B3DL75F.js.map} +0 -0
- /package/dist/{chunk-L4OA7G5T.js.map → chunk-522MBPE5.js.map} +0 -0
- /package/dist/{chunk-M25ZIEB2.js.map → chunk-5HSSTOOG.js.map} +0 -0
- /package/dist/{chunk-LLVW4V7R.js.map → chunk-5WLDZZ6S.js.map} +0 -0
- /package/dist/{chunk-7B4GPCX7.js.map → chunk-7IQWHYL2.js.map} +0 -0
- /package/dist/{chunk-OWE4BNTM.js.map → chunk-AZXEOEQK.js.map} +0 -0
- /package/dist/{chunk-BZEPJJOK.js.map → chunk-C2V7AJO2.js.map} +0 -0
- /package/dist/{chunk-2JZ763FV.js.map → chunk-D4LAJ737.js.map} +0 -0
- /package/dist/{chunk-N4FZ6ITM.js.map → chunk-EGU4PWQW.js.map} +0 -0
- /package/dist/{chunk-EW4HFWGJ.js.map → chunk-EPME33Y4.js.map} +0 -0
- /package/dist/{chunk-JKWNG3TM.js.map → chunk-FHHYCBBP.js.map} +0 -0
- /package/dist/{chunk-5BB3N4KU.js.map → chunk-G4MFQXYX.js.map} +0 -0
- /package/dist/{chunk-KVHWEPT2.js.map → chunk-GHEMAVTN.js.map} +0 -0
- /package/dist/{chunk-XW7NWO4A.js.map → chunk-GTNRMJYH.js.map} +0 -0
- /package/dist/{chunk-YG2EG6CB.js.map → chunk-H5GMROCB.js.map} +0 -0
- /package/dist/{chunk-5KI3REO3.js.map → chunk-HDF5R2K6.js.map} +0 -0
- /package/dist/{chunk-V3YB7RGR.js.map → chunk-HVPW6PCX.js.map} +0 -0
- /package/dist/{chunk-2VUISNGP.js.map → chunk-HXVRRJBD.js.map} +0 -0
- /package/dist/{chunk-ZJGZDOQO.js.map → chunk-ICYC5YNI.js.map} +0 -0
- /package/dist/{chunk-AFBJHD55.js.map → chunk-JGOKAZNB.js.map} +0 -0
- /package/dist/{chunk-QXPOEAKR.js.map → chunk-KCZAFDP5.js.map} +0 -0
- /package/dist/{chunk-MSO2C3KG.js.map → chunk-LC7DSMHR.js.map} +0 -0
- /package/dist/{chunk-OVFCAS7U.js.map → chunk-LG2GUYRX.js.map} +0 -0
- /package/dist/{chunk-QDNVHA2F.js.map → chunk-M7W2KYTL.js.map} +0 -0
- /package/dist/{chunk-IUIVDVXM.js.map → chunk-MUPZ6IZX.js.map} +0 -0
- /package/dist/{chunk-GZ2GKOF6.js.map → chunk-NA374QG7.js.map} +0 -0
- /package/dist/{chunk-2U7Y7BNJ.js.map → chunk-ONB627HU.js.map} +0 -0
- /package/dist/{chunk-GYB2QK5H.js.map → chunk-OWLZONGX.js.map} +0 -0
- /package/dist/{chunk-YHPUDB7Q.js.map → chunk-OWOT7CFC.js.map} +0 -0
- /package/dist/{chunk-VEX6G3YL.js.map → chunk-P4NUJVWL.js.map} +0 -0
- /package/dist/{chunk-NM4LVUXH.js.map → chunk-PTT2NB46.js.map} +0 -0
- /package/dist/{chunk-2ITLQZV5.js.map → chunk-PWWWMRT7.js.map} +0 -0
- /package/dist/{chunk-FLHOTGOO.js.map → chunk-QVGEVZ5F.js.map} +0 -0
- /package/dist/{chunk-OGFPMCSP.js.map → chunk-SBOHNJUD.js.map} +0 -0
- /package/dist/{chunk-EDC6MLXV.js.map → chunk-SEU6QHH4.js.map} +0 -0
- /package/dist/{chunk-F4COUZLL.js.map → chunk-TMR64XPL.js.map} +0 -0
- /package/dist/{chunk-5OZCCLNC.js.map → chunk-TSNRZSRC.js.map} +0 -0
- /package/dist/{chunk-2RMDVWGB.js.map → chunk-UNREYBZO.js.map} +0 -0
- /package/dist/{chunk-QCUH2G77.js.map → chunk-VNJMLOQS.js.map} +0 -0
- /package/dist/{chunk-V7RGFJ3Z.js.map → chunk-XG7OZDOS.js.map} +0 -0
- /package/dist/{chunk-GS3Q2KOZ.js.map → chunk-XONZGK6J.js.map} +0 -0
- /package/dist/{chunk-5SZ24DL5.js.map → chunk-XSOGLHGY.js.map} +0 -0
- /package/dist/{chunk-NOT7XA7Q.js.map → chunk-YGMREQAK.js.map} +0 -0
- /package/dist/{chunk-H4SMS4O2.js.map → chunk-YJ3TREAC.js.map} +0 -0
- /package/dist/{chunk-E2R5NRZD.js.map → chunk-Z4D3YGAB.js.map} +0 -0
- /package/dist/{chunk-BZK6JEX4.js.map → chunk-ZF572E2M.js.map} +0 -0
- /package/dist/{chunk-QAFWRGVD.js.map → chunk-ZHMUFYZF.js.map} +0 -0
- /package/dist/{chunk-BVZGNMVM.js.map → chunk-ZHZ4PET5.js.map} +0 -0
- /package/dist/{chunk-IZX3WZBF.js.map → chunk-ZM72UO3Y.js.map} +0 -0
- /package/dist/{chunk-STR7WBOB.js.map → chunk-ZUDAK436.js.map} +0 -0
- /package/dist/{chunk-ITI3SJRB.js.map → chunk-ZX5FNWH7.js.map} +0 -0
- /package/dist/{classified-marker-7S5IEP6Q.js.map → classified-marker-SVDRXLD3.js.map} +0 -0
- /package/dist/{as/index.js.map → collection-facade-S5PPKZD5.js.map} +0 -0
- /package/dist/{at/index.js.map → computed-33DRJDOC.js.map} +0 -0
- /package/dist/{by/index.js.map → cover-ADBCTIKN.js.map} +0 -0
- /package/dist/{dead-filter-KRRD57MR.js.map → dead-filter-HKDMTMVY.js.map} +0 -0
- /package/dist/{chunk-2YELV6TV.js.map → delegation-EV7LKJPH.js.map} +0 -0
- /package/dist/{collection-facade-CMZGQ6IS.js.map → derive-5LDJW76F.js.map} +0 -0
- /package/dist/{computed-WZNKRLCY.js.map → enclave-ZA7C3H2L.js.map} +0 -0
- /package/dist/{cover-B5MY43CK.js.map → executor-FCJEH3FU.js.map} +0 -0
- /package/dist/{delegation-UT76AQIG.js.map → executor-OHET7TF7.js.map} +0 -0
- /package/dist/{derive-SGRCCKVP.js.map → executor-SVHAJZ4A.js.map} +0 -0
- /package/dist/{enclave-YFKA3GJT.js.map → export-accessible-S35YKIBL.js.map} +0 -0
- /package/dist/{executor-TEZYRDN3.js.map → extract-partition-UVHAM5WZ.js.map} +0 -0
- /package/dist/{fanout-sidecar-HJV3A7PM.js.map → fanout-sidecar-HRMHC34B.js.map} +0 -0
- /package/dist/{executor-WQQRU6DO.js.map → find-LEBUXVL7.js.map} +0 -0
- /package/dist/{executor-YORMIBWV.js.map → issue-5X3SMCF4.js.map} +0 -0
- /package/dist/{export-accessible-HXMKW5LJ.js.map → ledger-K6JBFL3Z.js.map} +0 -0
- /package/dist/{extract-partition-QGQ2R42J.js.map → liberate-NHTCKBU4.js.map} +0 -0
- /package/dist/{find-VV6PBIHK.js.map → link-set-XVZY2ODC.js.map} +0 -0
- /package/dist/{in/index.js.map → noydb-TI3RFU6M.js.map} +0 -0
- /package/dist/{issue-7JJ4Z7E2.js.map → policy-QWGJB7P7.js.map} +0 -0
- /package/dist/{post-register-A7HCFBP5.js.map → post-register-5VHHVFJY.js.map} +0 -0
- /package/dist/{ledger-SW6QQOAV.js.map → register-CEX7R7NE.js.map} +0 -0
- /package/dist/{liberate-FK7JI2QX.js.map → registry-7CZWF3EQ.js.map} +0 -0
- /package/dist/{link-set-GNGGCFI4.js.map → registry-DIKMRXUC.js.map} +0 -0
- /package/dist/{noydb-N5IW6OFZ.js.map → registry-EWIB5NTI.js.map} +0 -0
- /package/dist/{on/index.js.map → request-withdrawal-AAG57QO4.js.map} +0 -0
- /package/dist/{reveal-PB3YG544.js.map → reveal-7OOT5XPD.js.map} +0 -0
- /package/dist/{policy-EAXSJNOT.js.map → revoke-U5LCIJMF.js.map} +0 -0
- /package/dist/{register-YBMRLZLO.js.map → signer-NAA2OX7H.js.map} +0 -0
- /package/dist/{registry-3LXKNXWI.js.map → stale-BJO2WIN7.js.map} +0 -0
- /package/dist/{registry-4V4YQCXJ.js.map → storage-FL7XXZTN.js.map} +0 -0
- /package/dist/{store-coordination-provider-3AELCZ4Y.js.map → store-coordination-provider-DX5HECK3.js.map} +0 -0
- /package/dist/{verify-MXN66IIH.js.map → verify-5X37OXRY.js.map} +0 -0
- /package/dist/{walk-H4YE52S2.js.map → walk-JXMWKKQW.js.map} +0 -0
- /package/dist/with-lookup/{aggregate → reduce}/canonical-key.d.ts +0 -0
- /package/dist/{registry-ZULMLCJK.js.map → withdraw-accessible-GO6KQJVM.js.map} +0 -0
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Noydb-side auth / recovery / enrollment facade.
|
|
3
3
|
*
|
|
4
4
|
* Holds the tier-2 authenticator enrollment/unlock wrappers, WebAuthn
|
|
5
|
-
* enrollment, auth-config introspection, the tier-1
|
|
5
|
+
* enrollment, auth-config introspection, the tier-1 secret
|
|
6
6
|
* rotate/recover flows, the paper/Shamir recovery rotate/enroll flows,
|
|
7
|
-
* managed-
|
|
7
|
+
* managed-secret recovery, peer-recovery, tier-3 PIN unlock, and the
|
|
8
8
|
* public `getKeyring` accessor.
|
|
9
9
|
*
|
|
10
10
|
* The near-parallel rotate/recover variants (managed vs user vs paper vs
|
|
@@ -16,17 +16,18 @@
|
|
|
16
16
|
* (`assertRecoveryEnrolled`), `openVault`, and the one-shot
|
|
17
17
|
* managed-recovery skip flag stay kernel-resident and arrive as callbacks.
|
|
18
18
|
*
|
|
19
|
-
* Internal service — reached through `noydb.
|
|
19
|
+
* Internal service — reached through `noydb.team.rotateSecret(...)` etc.
|
|
20
20
|
*/
|
|
21
21
|
import type { NoydbOptions, NoydbStore, KeyringAuthenticator } from '../../kernel/types.js';
|
|
22
|
-
import
|
|
22
|
+
import type { RotateResult } from './keyring.js';
|
|
23
|
+
import { type RotateSecretInput, type RecoverSecretInput, type RecoverSecretResult, type RotateRecoveryOptions, type RotateRecoveryResult, type EnrollRecoveryResult, type RecoveryEnrollmentInput, type RecoveryProof } from './rotate-recover.js';
|
|
23
24
|
import { type RecoverUserOptions } from './peer-recover.js';
|
|
24
25
|
import { type PaperRecoveryEntry, type ShamirRecoveryEntry } from './recovery.js';
|
|
25
26
|
import type { Vault } from '../../kernel/vault.js';
|
|
26
27
|
import type { UnlockedKeyring } from './keyring.js';
|
|
27
28
|
import { type EnrollAuthenticatorOptions, type UpdateAuthenticatorOptions } from './authenticators.js';
|
|
28
29
|
import type { QuickUnlockStore, QuickUnlockState } from '../session/unlock-state.js';
|
|
29
|
-
import type {
|
|
30
|
+
import type { SecretPolicy } from '../../kernel/validation.js';
|
|
30
31
|
import type { ActiveTier, FactorProofBundle, GateName, GrantOptions, ReAuthOperation, RevokeOptions, VaultPolicy } from '../../kernel/types.js';
|
|
31
32
|
/** NoydbOptions with the store resolved to a non-optional value (internal use only). */
|
|
32
33
|
type ResolvedNoydbOptions = NoydbOptions & {
|
|
@@ -34,7 +35,7 @@ type ResolvedNoydbOptions = NoydbOptions & {
|
|
|
34
35
|
};
|
|
35
36
|
/** Everything the moving auth/recovery/enrollment methods touched on the Noydb instance's `this.*`. */
|
|
36
37
|
export interface TeamFacadeDeps {
|
|
37
|
-
/** Resolved Noydb options (store, user,
|
|
38
|
+
/** Resolved Noydb options (store, user, secretMode, sealingKey, shamirRecovery, …). */
|
|
38
39
|
readonly options: ResolvedNoydbOptions;
|
|
39
40
|
/** Live unlocked-keyring cache (Noydb-resident; read/written by reference). */
|
|
40
41
|
readonly keyringCache: Map<string, UnlockedKeyring>;
|
|
@@ -72,7 +73,7 @@ export declare class TeamFacade {
|
|
|
72
73
|
/** Gate + run a `revoke` engine. See `Noydb.revoke` for the public contract. */
|
|
73
74
|
runRevoke(engine: (adapter: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, options: RevokeOptions) => Promise<void>, vault: string, options: RevokeOptions, factors?: FactorProofBundle): Promise<void>;
|
|
74
75
|
/** Gate + run a `rotateKeys` engine. See `Noydb.rotate` for the public contract. */
|
|
75
|
-
runRotate(engine: (adapter: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, collections: string[]) => Promise<
|
|
76
|
+
runRotate(engine: (adapter: NoydbStore, vault: string, callerKeyring: UnlockedKeyring, collections: string[]) => Promise<RotateResult>, vault: string, collections: string[]): Promise<RotateResult>;
|
|
76
77
|
/**
|
|
77
78
|
* Add a tier-2 authenticator slot to the calling user's keyring.
|
|
78
79
|
* Each slot independently wraps the SAME KEK under a method-specific
|
|
@@ -143,7 +144,7 @@ export declare class TeamFacade {
|
|
|
143
144
|
* ```ts
|
|
144
145
|
* import { enrollWebAuthn } from '@noy-db/on-webauthn'
|
|
145
146
|
*
|
|
146
|
-
* await db.enrollWebAuthn('demo', async (keyring) => {
|
|
147
|
+
* await db.team.enrollWebAuthn('demo', async (keyring) => {
|
|
147
148
|
* const e = await enrollWebAuthn(keyring, 'demo', { rp: {...} })
|
|
148
149
|
* return {
|
|
149
150
|
* id: `webauthn-${e.credentialId.slice(0, 8)}`,
|
|
@@ -207,38 +208,38 @@ export declare class TeamFacade {
|
|
|
207
208
|
description: string;
|
|
208
209
|
}>>;
|
|
209
210
|
/**
|
|
210
|
-
* Rotate the user's
|
|
211
|
-
* new phrase against the configured `
|
|
212
|
-
* `rotate-
|
|
211
|
+
* Rotate the user's secret (user remembers old). Validates the
|
|
212
|
+
* new phrase against the configured `secret` policy, runs the
|
|
213
|
+
* `rotate-secret` gate, then re-derives + re-wraps every DEK.
|
|
213
214
|
*
|
|
214
215
|
* Tier-2 authenticator slots are dropped — each slot wraps the old
|
|
215
216
|
* KEK and would need its derivation key to be re-presented. Re-enrol
|
|
216
217
|
* via `db.enrollAuthenticator` after rotation.
|
|
217
218
|
*
|
|
218
|
-
* @throws `
|
|
219
|
+
* @throws `WeakSecretError` on a weak new phrase.
|
|
219
220
|
* @throws `PolicyDeniedError` when the gate denies (missing factor, …).
|
|
220
|
-
* @throws `InvalidKeyError` when `
|
|
221
|
+
* @throws `InvalidKeyError` when `oldSecret` is wrong.
|
|
221
222
|
*/
|
|
222
|
-
|
|
223
|
+
rotateSecret(vault: string, input: RotateSecretInput, factors?: FactorProofBundle): Promise<void>;
|
|
223
224
|
/**
|
|
224
|
-
* Reset the
|
|
225
|
+
* Reset the secret using a recovery proof (user forgot the old).
|
|
225
226
|
* Currently supports the `'paper'` profile end-to-end; the
|
|
226
227
|
* other profiles throw {@link RecoveryProfileNotImplementedError}.
|
|
227
228
|
*
|
|
228
229
|
* Burns the used recovery entry on success.
|
|
229
230
|
*/
|
|
230
|
-
|
|
231
|
+
recoverSecret(vault: string, input: RecoverSecretInput, factors?: FactorProofBundle): Promise<RecoverSecretResult>;
|
|
231
232
|
/**
|
|
232
233
|
* Deliberate paper-recovery-code regeneration. User knows their
|
|
233
|
-
*
|
|
234
|
+
* secret but wants a fresh sheet — they lost the printout or
|
|
234
235
|
* suspect compromise of the off-site copy.
|
|
235
236
|
*
|
|
236
|
-
* Symmetric to {@link
|
|
237
|
+
* Symmetric to {@link rotateSecret} for the recovery profile:
|
|
237
238
|
* gated, audit-trackable, ergonomic. Replaces (not appends) the
|
|
238
239
|
* paper sheet under `_meta/recovery-paper` in a single envelope `put`.
|
|
239
240
|
*
|
|
240
241
|
* Gated by the `rotate-recovery` policy gate:
|
|
241
|
-
* - PERSONAL_POLICY: `{ minTier: 1 }` — knowing the
|
|
242
|
+
* - PERSONAL_POLICY: `{ minTier: 1 }` — knowing the secret
|
|
242
243
|
* suffices, matching the lower-level flow's bar.
|
|
243
244
|
* - STRICT_POLICY: `{ minTier: 1, factors: [{ anyOf: ['totp',
|
|
244
245
|
* 'email-otp', 'webauthn-roaming'] }] }` — rotation is an
|
|
@@ -258,13 +259,13 @@ export declare class TeamFacade {
|
|
|
258
259
|
*
|
|
259
260
|
* @example Default count + show-once UI
|
|
260
261
|
* ```ts
|
|
261
|
-
* const { newCodes } = await db.rotateRecovery('acme', { profile: 'paper' })
|
|
262
|
+
* const { newCodes } = await db.team.rotateRecovery('acme', { profile: 'paper' })
|
|
262
263
|
* showCodesToUser(newCodes)
|
|
263
264
|
* ```
|
|
264
265
|
*
|
|
265
266
|
* @example STRICT-policy site with TOTP factor proof
|
|
266
267
|
* ```ts
|
|
267
|
-
* await db.rotateRecovery(
|
|
268
|
+
* await db.team.rotateRecovery(
|
|
268
269
|
* 'acme',
|
|
269
270
|
* { profile: 'paper', count: 10 },
|
|
270
271
|
* { factors: [{ kind: 'totp', proof: '123456' }] },
|
|
@@ -278,7 +279,7 @@ export declare class TeamFacade {
|
|
|
278
279
|
* **Atomic create-and-enroll for managed-mode vaults.**
|
|
279
280
|
*
|
|
280
281
|
* Bootstraps a managed-mode vault and enrolls strong recovery in
|
|
281
|
-
* a single ceremony. Under `
|
|
282
|
+
* a single ceremony. Under `secretMode: 'managed'`, every
|
|
282
283
|
* `openVault` call requires a strong recovery profile (Shamir
|
|
283
284
|
* today) to be enrolled — otherwise it throws
|
|
284
285
|
* {@link ManagedRecoveryNotEnrolledError}. This method bypasses
|
|
@@ -297,11 +298,11 @@ export declare class TeamFacade {
|
|
|
297
298
|
* ```ts
|
|
298
299
|
* const db = await createNoydb({
|
|
299
300
|
* store, user: 'alice',
|
|
300
|
-
*
|
|
301
|
+
* secretMode: 'managed',
|
|
301
302
|
* sealingKey: macosKeychainSealingProvider({ ... }),
|
|
302
303
|
* })
|
|
303
304
|
*
|
|
304
|
-
* const { vault, recoveryEnrollments } = await db.openVaultAndEnrollRecovery('acme', {
|
|
305
|
+
* const { vault, recoveryEnrollments } = await db.team.openVaultAndEnrollRecovery('acme', {
|
|
305
306
|
* recovery: [{ profile: 'shamir', k: 2, n: 3 }],
|
|
306
307
|
* })
|
|
307
308
|
* for (const r of recoveryEnrollments) {
|
|
@@ -320,20 +321,20 @@ export declare class TeamFacade {
|
|
|
320
321
|
readonly recoveryEnrollments: ReadonlyArray<EnrollRecoveryResult>;
|
|
321
322
|
}>;
|
|
322
323
|
/**
|
|
323
|
-
* **Recovery flow under managed-
|
|
324
|
+
* **Recovery flow under managed-secret mode.**
|
|
324
325
|
*
|
|
325
|
-
* Replaces the sealed
|
|
326
|
+
* Replaces the sealed secret of a managed-mode vault with a
|
|
326
327
|
* fresh 256-bit random, sealed under the configured
|
|
327
|
-
* `SealingKeyProvider`. The user never sees the new
|
|
328
|
+
* `SealingKeyProvider`. The user never sees the new secret.
|
|
328
329
|
*
|
|
329
330
|
* Internally:
|
|
330
331
|
* 1. Verify the recovery proof (Shamir today) and unwrap the
|
|
331
332
|
* DEK set.
|
|
332
|
-
* 2. Mint a fresh 256-bit random as the new effective
|
|
333
|
+
* 2. Mint a fresh 256-bit random as the new effective secret.
|
|
333
334
|
* 3. Rewrap the DEK set under a fresh KEK derived from the new
|
|
334
|
-
*
|
|
335
|
+
* secret (via the existing `recoverSecret` path).
|
|
335
336
|
* 4. Seal the random bytes under the provider and overwrite
|
|
336
|
-
* `_meta/sealed-
|
|
337
|
+
* `_meta/sealed-secret`.
|
|
337
338
|
* 5. Drop the keyring cache so the next operation re-derives.
|
|
338
339
|
*
|
|
339
340
|
* The vault's strong-recovery enrollment is preserved across
|
|
@@ -341,13 +342,13 @@ export declare class TeamFacade {
|
|
|
341
342
|
*
|
|
342
343
|
* @throws ValidationError if the Noydb instance is not in managed mode.
|
|
343
344
|
*/
|
|
344
|
-
|
|
345
|
+
recoverManagedSecret(vault: string, options: {
|
|
345
346
|
readonly recoveryProof: RecoveryProof;
|
|
346
|
-
readonly
|
|
347
|
+
readonly secretPolicy?: SecretPolicy;
|
|
347
348
|
}): Promise<void>;
|
|
348
349
|
/**
|
|
349
350
|
* Atomic peer-recovery — re-wraps an EXISTING user's keyring under
|
|
350
|
-
* a fresh temp
|
|
351
|
+
* a fresh temp secret in a single store write. Closes the
|
|
351
352
|
* partial-failure window (the previous compose-from-primitives
|
|
352
353
|
* pattern was `db.revoke + db.grant`, two writes — if the issuer
|
|
353
354
|
* cancelled between them the target was locked out entirely).
|
|
@@ -366,17 +367,17 @@ export declare class TeamFacade {
|
|
|
366
367
|
* recovery / TOTP / email-OTP factor proof at the moment of
|
|
367
368
|
* recovery, so the issuer affirmatively re-asserts identity.
|
|
368
369
|
*
|
|
369
|
-
* The recipient should call `db.
|
|
370
|
+
* The recipient should call `db.rotateSecret` on first session
|
|
370
371
|
* to choose their own phrase — the temp acts as a single-use
|
|
371
372
|
* bridge.
|
|
372
373
|
*
|
|
373
374
|
* ```ts
|
|
374
|
-
* await db.recoverUser('acme', {
|
|
375
|
+
* await db.team.recoverUser('acme', {
|
|
375
376
|
* userId: 'bob',
|
|
376
|
-
*
|
|
377
|
+
* secret: 'temporary-correct-horse-battery-staple-printer',
|
|
377
378
|
* }, { factors: [{ kind: 'recovery' }] })
|
|
378
379
|
* // Bob opens createNoydb({ user: 'bob', secret: tempPhrase })
|
|
379
|
-
* // and immediately calls db.
|
|
380
|
+
* // and immediately calls db.rotateSecret to set his own.
|
|
380
381
|
* ```
|
|
381
382
|
*
|
|
382
383
|
* @throws `NoAccessError` when no keyring exists for the target.
|
|
@@ -395,17 +396,17 @@ export declare class TeamFacade {
|
|
|
395
396
|
* The hub wraps the user's DEK set (not the KEK) under a code-derived
|
|
396
397
|
* AES-GCM key — see `team/recovery.ts` for the rationale. The mint
|
|
397
398
|
* helper {@link mintPaperRecoveryEntry} is the canonical primitive;
|
|
398
|
-
* pair it with `db.getKeyring(vault)` to obtain the live DEK set:
|
|
399
|
+
* pair it with `db.team.getKeyring(vault)` to obtain the live DEK set:
|
|
399
400
|
*
|
|
400
401
|
* ```ts
|
|
401
402
|
* import { mintPaperRecoveryEntry } from '@noy-db/hub'
|
|
402
403
|
*
|
|
403
|
-
* const keyring = await db.getKeyring('acme')
|
|
404
|
+
* const keyring = await db.team.getKeyring('acme')
|
|
404
405
|
* const codes: string[] = ['CORRECT-HORSE-1', 'BATTERY-STAPLE-2', ...]
|
|
405
406
|
* const entries = await Promise.all(
|
|
406
407
|
* codes.map((code, i) => mintPaperRecoveryEntry(keyring.deks, code, `code-${i}`)),
|
|
407
408
|
* )
|
|
408
|
-
* await db.enrollRecovery('acme', { profile: 'paper', entries })
|
|
409
|
+
* await db.team.enrollRecovery('acme', { profile: 'paper', entries })
|
|
409
410
|
* showCodesToUser(codes)
|
|
410
411
|
* ```
|
|
411
412
|
*
|
|
@@ -416,7 +417,7 @@ export declare class TeamFacade {
|
|
|
416
417
|
* ```ts
|
|
417
418
|
* import { generateRecoveryCodeSet } from '@noy-db/on-recovery'
|
|
418
419
|
* const { codes, entries } = await generateRecoveryCodeSet({ deks: keyring.deks, count: 8 })
|
|
419
|
-
* await db.enrollRecovery('acme', { profile: 'paper', entries })
|
|
420
|
+
* await db.team.enrollRecovery('acme', { profile: 'paper', entries })
|
|
420
421
|
* ```
|
|
421
422
|
*/
|
|
422
423
|
enrollRecovery(vault: string, enrollment: RecoveryEnrollmentInput): Promise<EnrollRecoveryResult>;
|
|
@@ -473,7 +474,7 @@ export declare class TeamFacade {
|
|
|
473
474
|
* and no `secret` / `getKeyring` is configured.
|
|
474
475
|
*
|
|
475
476
|
* ```ts
|
|
476
|
-
* const keyring = await db.getKeyring('acme')
|
|
477
|
+
* const keyring = await db.team.getKeyring('acme')
|
|
477
478
|
* // keyring.deks: Map<collection, CryptoKey>
|
|
478
479
|
* // keyring.kek: CryptoKey | null (null for tier-3 / wrap-DEKs sessions)
|
|
479
480
|
* // keyring.role / .permissions / .authenticators
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* gate `peer-recover-user` carries the freshness requirement.
|
|
23
23
|
* 5. **Tier-2 slots dropped.** The slots wrap the OLD KEK under
|
|
24
24
|
* method-derived keys; after recovery the KEK is re-derived
|
|
25
|
-
* from the new temp
|
|
25
|
+
* from the new temp secret. Match `rotateSecret`'s
|
|
26
26
|
* precedent — the recovered user re-enrols slots after picking
|
|
27
27
|
* their own phrase.
|
|
28
28
|
*
|
|
@@ -34,47 +34,47 @@
|
|
|
34
34
|
* @module
|
|
35
35
|
*/
|
|
36
36
|
import type { NoydbStore, Role } from '../../kernel/types.js';
|
|
37
|
-
import { type
|
|
37
|
+
import { type SecretPolicy } from '../../kernel/validation.js';
|
|
38
38
|
import type { UnlockedKeyring } from './keyring.js';
|
|
39
39
|
/** Input shape for {@link recoverUser}. */
|
|
40
40
|
export interface RecoverUserOptions {
|
|
41
41
|
/** Target user id whose keyring is being recovered. */
|
|
42
42
|
readonly userId: string;
|
|
43
43
|
/**
|
|
44
|
-
* Temporary
|
|
45
|
-
* The recipient should call `db.
|
|
44
|
+
* Temporary secret under which the new keyring is wrapped.
|
|
45
|
+
* The recipient should call `db.rotateSecret` immediately on
|
|
46
46
|
* acceptance to choose their own phrase — this temp acts as a
|
|
47
47
|
* single-use bridge in invite / peer-recovery flows.
|
|
48
48
|
*/
|
|
49
|
-
readonly
|
|
49
|
+
readonly secret: string;
|
|
50
50
|
/** Override the target's role. Defaults to the existing target's role. */
|
|
51
51
|
readonly role?: Role;
|
|
52
52
|
/** Override the target's display name. Defaults to existing. */
|
|
53
53
|
readonly displayName?: string;
|
|
54
54
|
/** Validate phrase strength against the configured policy. */
|
|
55
|
-
readonly
|
|
55
|
+
readonly validateSecret?: boolean;
|
|
56
56
|
/**
|
|
57
|
-
* Skip phrase strength validation even when `
|
|
57
|
+
* Skip phrase strength validation even when `validateSecret` is
|
|
58
58
|
* set. The escape hatch matches `grant`'s shape — used when the
|
|
59
59
|
* temp phrase is a high-entropy one-shot string that doesn't need
|
|
60
60
|
* to satisfy the human-typeable rules.
|
|
61
61
|
*/
|
|
62
|
-
readonly
|
|
62
|
+
readonly allowWeakSecret?: boolean;
|
|
63
63
|
/**
|
|
64
64
|
* Optional explicit phrase policy override (passed through to
|
|
65
|
-
* `
|
|
66
|
-
* `
|
|
65
|
+
* `assertStrongSecret`). Mirrors how `grant` accepts a custom
|
|
66
|
+
* `SecretPolicy` for app-specific tightening.
|
|
67
67
|
*/
|
|
68
|
-
readonly
|
|
68
|
+
readonly secretPolicy?: SecretPolicy;
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
71
71
|
* Atomically rewrap the target user's keyring under a fresh temp
|
|
72
|
-
*
|
|
72
|
+
* secret. Single store write; no revoke step; no key rotation.
|
|
73
73
|
*
|
|
74
74
|
* Caller's responsibilities (NOT enforced here):
|
|
75
75
|
* - Run the `peer-recover-user` policy gate first via
|
|
76
76
|
* `Noydb.checkGate` to enforce the freshness factor proof.
|
|
77
|
-
* - Communicate the temp
|
|
77
|
+
* - Communicate the temp secret to the recipient via a secure
|
|
78
78
|
* channel (URL fragment, in-person, etc.) — the hub does not
|
|
79
79
|
* transport secrets.
|
|
80
80
|
*/
|
|
@@ -34,7 +34,7 @@ import type { ShamirRecoveryProvider } from './shamir-recovery-provider.js';
|
|
|
34
34
|
* we wrap a serialized DEK set: the entry holds the AES-GCM
|
|
35
35
|
* ciphertext of `{ deks: { collection: rawDekBase64 } }`. Recovery
|
|
36
36
|
* deserializes the DEK set, then mints a fresh KEK from the new
|
|
37
|
-
*
|
|
37
|
+
* secret and rewraps the DEKs under it.
|
|
38
38
|
*
|
|
39
39
|
* This is the same pattern `@noy-db/on-pin` uses for tier-3 quick
|
|
40
40
|
* resume — the cryptographic guarantee is identical (AES-GCM with a
|
|
@@ -67,8 +67,8 @@ export declare function hasRecoveryEnrolled(store: NoydbStore, vault: string): P
|
|
|
67
67
|
/**
|
|
68
68
|
* Whether at least one **strong** recovery profile is enrolled.
|
|
69
69
|
*
|
|
70
|
-
* "Strong" excludes paper-alone — under managed-
|
|
71
|
-
* user has no memorized
|
|
70
|
+
* "Strong" excludes paper-alone — under managed-secret mode the
|
|
71
|
+
* user has no memorized secret, so a stolen/lost paper sheet
|
|
72
72
|
* would be a single point of total loss. Strong profiles today:
|
|
73
73
|
*
|
|
74
74
|
* - `shamir` (k-of-n threshold; survives loss of up to n-k shares)
|
|
@@ -167,7 +167,7 @@ export declare function unwrapDeksFromShamirEntry(provider: ShamirRecoveryProvid
|
|
|
167
167
|
*
|
|
168
168
|
* Returns the serializable entry (persisted via
|
|
169
169
|
* {@link savePaperRecoveryEntries}). The recovery flow unwraps the
|
|
170
|
-
* DEK set, then mints a fresh KEK from the user's new
|
|
170
|
+
* DEK set, then mints a fresh KEK from the user's new secret.
|
|
171
171
|
*
|
|
172
172
|
* Thin wrapper over {@link mintWrappedDeksBlob} — the crypto
|
|
173
173
|
* lives in the shared primitive; this function just adds paper-
|
|
@@ -182,7 +182,7 @@ export declare function unwrapDeksFromShamirEntry(provider: ShamirRecoveryProvid
|
|
|
182
182
|
export declare function mintPaperRecoveryEntry(deks: Map<string, EnclaveKey>, code: string, codeId: string): Promise<PaperRecoveryEntry>;
|
|
183
183
|
/**
|
|
184
184
|
* Decrypt a recovery entry to recover the raw DEK set. Used by the
|
|
185
|
-
* `
|
|
185
|
+
* `recoverSecret` flow after the user's code has been parsed.
|
|
186
186
|
*
|
|
187
187
|
* Thin wrapper over {@link unwrapDeksFromBlob}.
|
|
188
188
|
*
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Tier-1 change flows — `
|
|
3
|
-
* `
|
|
2
|
+
* Tier-1 change flows — `rotateSecret` (user remembers old) and
|
|
3
|
+
* `recoverSecret` (user supplies a recovery proof).
|
|
4
4
|
*
|
|
5
5
|
* The two flows share the post-verification half — fresh salt, fresh
|
|
6
6
|
* KEK, rewrap every DEK — and differ only in how they re-derive the
|
|
7
7
|
* old KEK:
|
|
8
8
|
*
|
|
9
|
-
* - **Rotate**: derive from the supplied `
|
|
9
|
+
* - **Rotate**: derive from the supplied `oldSecret`.
|
|
10
10
|
* - **Recover (paper)**: unwrap from a `RecoveryCodeEntry` using a
|
|
11
11
|
* user-supplied recovery code. The entry is burned on success.
|
|
12
12
|
*
|
|
@@ -20,12 +20,12 @@ import type { NoydbStore } from '../../kernel/types.js';
|
|
|
20
20
|
import { type EnclaveKey } from '../../kernel/enclave/index.js';
|
|
21
21
|
import { type PaperRecoveryEntry } from './recovery.js';
|
|
22
22
|
import type { ShamirRecoveryProvider } from './shamir-recovery-provider.js';
|
|
23
|
-
import { type
|
|
23
|
+
import { type SecretPolicy } from '../../kernel/validation.js';
|
|
24
24
|
import type { UnlockedKeyring } from './keyring.js';
|
|
25
25
|
import type { KeyringAuthenticator } from '../../kernel/types.js';
|
|
26
26
|
import type { EnrollAuthenticatorOptions } from './authenticators.js';
|
|
27
27
|
/**
|
|
28
|
-
* Context handed to a {@link SlotRewrapCeremony} when `
|
|
28
|
+
* Context handed to a {@link SlotRewrapCeremony} when `rotateSecret`
|
|
29
29
|
* preserves a tier-2 slot. The ceremony's job is to re-derive its
|
|
30
30
|
* method-specific wrapping material (PRF assertion, PBKDF2 of the
|
|
31
31
|
* password, etc.) and wrap the freshly rewrapped DEK set under
|
|
@@ -57,25 +57,25 @@ export interface SlotRewrapContext {
|
|
|
57
57
|
readonly oldSlot: KeyringAuthenticator;
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
|
-
* Callback that re-enrolls one tier-2 slot during `
|
|
60
|
+
* Callback that re-enrolls one tier-2 slot during `rotateSecret`.
|
|
61
61
|
* Returns the new slot's `EnrollAuthenticatorOptions` — same shape
|
|
62
62
|
* the consumer would pass to `db.enrollAuthenticator` for a fresh
|
|
63
63
|
* enrollment. Hub persists the result atomically with the rotation.
|
|
64
64
|
*/
|
|
65
65
|
export type SlotRewrapCeremony = (ctx: SlotRewrapContext) => Promise<EnrollAuthenticatorOptions>;
|
|
66
|
-
/** Caller payload for {@link
|
|
67
|
-
export interface
|
|
68
|
-
readonly
|
|
69
|
-
readonly
|
|
70
|
-
readonly
|
|
71
|
-
readonly
|
|
66
|
+
/** Caller payload for {@link rotateSecret}. */
|
|
67
|
+
export interface RotateSecretInput {
|
|
68
|
+
readonly oldSecret: string;
|
|
69
|
+
readonly newSecret: string;
|
|
70
|
+
readonly secretPolicy?: SecretPolicy;
|
|
71
|
+
readonly allowWeakSecret?: boolean;
|
|
72
72
|
/**
|
|
73
73
|
* Map of slot id → re-enrolment ceremony. Slots whose id appears
|
|
74
74
|
* here are PRESERVED across rotation (the ceremony re-derives the
|
|
75
75
|
* method-specific wrapping under the new keyring); slots whose id
|
|
76
76
|
* is absent are DROPPED (the pre-slot-ceremony behavior).
|
|
77
77
|
*
|
|
78
|
-
* Without this map, `
|
|
78
|
+
* Without this map, `rotateSecret` wipes every tier-2 slot. Consumers building a
|
|
79
79
|
* "rotate without losing my biometric" flow supply ceremonies for
|
|
80
80
|
* each slot they want to keep.
|
|
81
81
|
*
|
|
@@ -90,8 +90,8 @@ export interface RotatePassphraseInput {
|
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
93
|
-
* Re-derive the user's KEK from `
|
|
94
|
-
* under a freshly-derived KEK from `
|
|
93
|
+
* Re-derive the user's KEK from `oldSecret`, rewrap every DEK
|
|
94
|
+
* under a freshly-derived KEK from `newSecret`, and persist.
|
|
95
95
|
*
|
|
96
96
|
* Tier-2 authenticator slots are dropped UNLESS the caller supplies
|
|
97
97
|
* a `slotCeremonies` map — each ceremony re-derives its
|
|
@@ -99,14 +99,14 @@ export interface RotatePassphraseInput {
|
|
|
99
99
|
* the rewrapped slots atomically with the rotation. Slots whose id
|
|
100
100
|
* isn't in the map are still dropped.
|
|
101
101
|
*
|
|
102
|
-
* @throws `InvalidKeyError` if `
|
|
103
|
-
* @throws `
|
|
102
|
+
* @throws `InvalidKeyError` if `oldSecret` does not unwrap the keyring.
|
|
103
|
+
* @throws `WeakSecretError` if `newSecret` fails the strength rule.
|
|
104
104
|
* @throws `ValidationError` if a ceremony's result mismatches the
|
|
105
105
|
* slot's id or method (anti-slot-swap guard).
|
|
106
106
|
*/
|
|
107
|
-
export declare function
|
|
107
|
+
export declare function rotateSecret(store: NoydbStore, vault: string, userId: string, input: RotateSecretInput): Promise<UnlockedKeyring>;
|
|
108
108
|
/**
|
|
109
|
-
* Caller payload for {@link
|
|
109
|
+
* Caller payload for {@link recoverSecret}.
|
|
110
110
|
*
|
|
111
111
|
* `paper` and `shamir` are wired end-to-end.
|
|
112
112
|
* The remaining two profiles (`multi-channel`, `admin-mediated`)
|
|
@@ -129,11 +129,11 @@ export type RecoveryProof = {
|
|
|
129
129
|
readonly shares: ReadonlyArray<string>;
|
|
130
130
|
};
|
|
131
131
|
};
|
|
132
|
-
export interface
|
|
133
|
-
readonly
|
|
132
|
+
export interface RecoverSecretInput {
|
|
133
|
+
readonly newSecret: string;
|
|
134
134
|
readonly recoveryProof: RecoveryProof;
|
|
135
|
-
readonly
|
|
136
|
-
readonly
|
|
135
|
+
readonly secretPolicy?: SecretPolicy;
|
|
136
|
+
readonly allowWeakSecret?: boolean;
|
|
137
137
|
/**
|
|
138
138
|
* After a successful paper-recovery, replace ALL remaining recovery
|
|
139
139
|
* entries with freshly-minted ones. Defaults to `true` (defensive).
|
|
@@ -177,27 +177,27 @@ export interface RecoverPassphraseInput {
|
|
|
177
177
|
readonly codeGenerator?: () => string;
|
|
178
178
|
}
|
|
179
179
|
/**
|
|
180
|
-
* Return shape of `db.
|
|
180
|
+
* Return shape of `db.recoverSecret`. `newCodes` is populated when
|
|
181
181
|
* `rotateRemainingCodes` was enabled and at least one entry was
|
|
182
182
|
* rotated; an empty array means no rotation happened (rotation
|
|
183
183
|
* disabled, or no remaining codes after burn). Show the codes to the
|
|
184
184
|
* user once — they are the canonical credential for future recovery
|
|
185
185
|
* and CANNOT be retrieved again.
|
|
186
186
|
*/
|
|
187
|
-
export interface
|
|
187
|
+
export interface RecoverSecretResult {
|
|
188
188
|
readonly newCodes: readonly string[];
|
|
189
189
|
}
|
|
190
190
|
/**
|
|
191
191
|
* Input for {@link Noydb.rotateRecovery} — deliberate
|
|
192
192
|
* recovery-credential regeneration when the user knows their
|
|
193
|
-
*
|
|
194
|
-
* (shamir). Symmetric to {@link
|
|
193
|
+
* secret but wants a fresh sheet (paper) or fresh shares
|
|
194
|
+
* (shamir). Symmetric to {@link RotateSecretInput}.
|
|
195
195
|
*/
|
|
196
196
|
export type RotateRecoveryOptions = {
|
|
197
197
|
readonly profile: 'paper';
|
|
198
198
|
/** How many fresh codes to mint. Default: existing sheet size. */
|
|
199
199
|
readonly count?: number;
|
|
200
|
-
/** Optional code generator — see {@link
|
|
200
|
+
/** Optional code generator — see {@link RecoverSecretInput.codeGenerator}. */
|
|
201
201
|
readonly codeGenerator?: () => string;
|
|
202
202
|
} | {
|
|
203
203
|
readonly profile: 'shamir';
|
|
@@ -265,11 +265,11 @@ export type RecoveryEnrollmentInput = {
|
|
|
265
265
|
readonly entryId?: string;
|
|
266
266
|
};
|
|
267
267
|
/**
|
|
268
|
-
* Reset the user's
|
|
268
|
+
* Reset the user's secret using a recovery proof.
|
|
269
269
|
* Supports `'paper'` and `'shamir'` profiles. The other profiles throw
|
|
270
270
|
* {@link RecoveryProfileNotImplementedError}.
|
|
271
271
|
*
|
|
272
272
|
* On success, the used recovery entry is burned (deleted from the
|
|
273
273
|
* stored set).
|
|
274
274
|
*/
|
|
275
|
-
export declare function
|
|
275
|
+
export declare function recoverSecret(provider: ShamirRecoveryProvider | undefined, store: NoydbStore, vault: string, userId: string, input: RecoverSecretInput): Promise<UnlockedKeyring>;
|