@noy-db/hub 0.6.0-pre.12 → 0.6.0-pre.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-6IBOZN6F.js +20 -0
- package/dist/attestation/index.js +19 -19
- package/dist/{backup-AWHG6ODK.js → backup-FNAYQMLF.js} +15 -14
- package/dist/backup-FNAYQMLF.js.map +1 -0
- package/dist/blobs/index.js +13 -13
- package/dist/broker/index.js +12 -12
- package/dist/cargo/index.js +30 -30
- package/dist/{chunk-DG27IUVI.js → chunk-42IDLU5V.js} +2 -2
- package/dist/{chunk-35EBKWQU.js → chunk-4444HN72.js} +4 -4
- package/dist/{chunk-N35NC4JH.js → chunk-466KGOQB.js} +2 -2
- package/dist/{chunk-ZJADGNYF.js → chunk-4AOERLTV.js} +1 -1
- package/dist/chunk-4AOERLTV.js.map +1 -0
- package/dist/{chunk-SPA5WX3T.js → chunk-4LNFXGNW.js} +64 -70
- package/dist/chunk-4LNFXGNW.js.map +1 -0
- package/dist/{chunk-6OC6YASM.js → chunk-4NI5PR5S.js} +2 -2
- package/dist/{chunk-OUST5WDV.js → chunk-4YUIVHII.js} +5 -5
- package/dist/{chunk-6HFM7EIT.js → chunk-5NKSNW25.js} +2 -2
- package/dist/{chunk-FDX7OWWI.js → chunk-5SK5AFYH.js} +2 -2
- package/dist/{chunk-DMQCLZ4Z.js → chunk-6U7M7AX6.js} +2 -2
- package/dist/{chunk-NSRITINN.js → chunk-6ZFTVY3O.js} +1 -1
- package/dist/chunk-6ZFTVY3O.js.map +1 -0
- package/dist/{chunk-FNSMZQS4.js → chunk-7EIPPOEL.js} +2 -2
- package/dist/{chunk-OXCU7G5I.js → chunk-7J6YERYT.js} +10 -10
- package/dist/{chunk-P2PLXMHO.js → chunk-7VIIEXQ2.js} +15 -12
- package/dist/chunk-7VIIEXQ2.js.map +1 -0
- package/dist/{chunk-AZQVFXJF.js → chunk-A4JJUWSV.js} +3 -3
- package/dist/{chunk-BGQ63MCT.js → chunk-AFSMT3WI.js} +3 -3
- package/dist/{chunk-3FSX6LDG.js → chunk-AMKCY454.js} +2 -2
- package/dist/{chunk-K6TQEDVJ.js → chunk-BVYRPAB2.js} +7 -7
- package/dist/{chunk-7F4DBNSP.js → chunk-C66T4W5P.js} +3 -3
- package/dist/{chunk-UFM3WVIF.js → chunk-C6MI5OCF.js} +6 -6
- package/dist/{chunk-PK3URBVU.js → chunk-CAJ7QAPC.js} +3 -3
- package/dist/{chunk-P2Y2F6EB.js → chunk-CK6Z5DJQ.js} +4 -4
- package/dist/{chunk-G4VQSGXL.js → chunk-CK7IRIRY.js} +5 -5
- package/dist/{chunk-44JENXEG.js → chunk-CNA3QRLM.js} +2 -2
- package/dist/chunk-CNA3QRLM.js.map +1 -0
- package/dist/{chunk-UAHHWR4P.js → chunk-CWX6YIX5.js} +7 -7
- package/dist/{chunk-5XFTL73S.js → chunk-D763JZRO.js} +3 -3
- package/dist/{chunk-ZSKB5BDK.js → chunk-DZWRTWN2.js} +82 -82
- package/dist/{chunk-ZSKB5BDK.js.map → chunk-DZWRTWN2.js.map} +1 -1
- package/dist/{chunk-CCZJJ4I2.js → chunk-ESABIXMQ.js} +4 -4
- package/dist/{chunk-5GMMIDJX.js → chunk-FMZV43QY.js} +4 -4
- package/dist/{chunk-HXGUIPQB.js → chunk-FSZPQCDR.js} +3 -3
- package/dist/{chunk-SYFEJFIO.js → chunk-GBTLOHJM.js} +9 -6
- package/dist/chunk-GBTLOHJM.js.map +1 -0
- package/dist/{chunk-Z7SMBVNM.js → chunk-GE2AGI67.js} +3 -3
- package/dist/{chunk-7VPWXVKU.js → chunk-GJX6DOGD.js} +5 -5
- package/dist/{chunk-VBCDVWRU.js → chunk-GLS7OSZT.js} +7 -7
- package/dist/{chunk-W3TVWF6N.js → chunk-H545OIWE.js} +2 -2
- package/dist/{chunk-VA3PPYTQ.js → chunk-HJAFOPTN.js} +6 -6
- package/dist/{chunk-Z45YRGFO.js → chunk-HNOBRU24.js} +2 -2
- package/dist/{chunk-OI7ZJUYT.js → chunk-HVPQ5QIZ.js} +8 -8
- package/dist/{chunk-AR2JDFAE.js → chunk-HVR74IBG.js} +2 -2
- package/dist/{chunk-HNGSV2YC.js → chunk-I64WQSN3.js} +7 -9
- package/dist/chunk-I64WQSN3.js.map +1 -0
- package/dist/{chunk-2APC6HS6.js → chunk-IMYGJ5HU.js} +2 -2
- package/dist/{chunk-25FGCLYS.js → chunk-IYYGLI2K.js} +6 -6
- package/dist/{chunk-E2TN45ZD.js → chunk-JBMSNYOS.js} +5 -5
- package/dist/{chunk-55LKVALY.js → chunk-JN64WH3U.js} +1 -3
- package/dist/chunk-JN64WH3U.js.map +1 -0
- package/dist/{chunk-RXYYFSBB.js → chunk-JU3JKOY5.js} +3 -3
- package/dist/{chunk-CEJWMBXO.js → chunk-K2MR7ROB.js} +2 -2
- package/dist/{chunk-PGWXE5CR.js → chunk-KCLNKE4W.js} +6 -6
- package/dist/{chunk-LRNODVQX.js → chunk-KPD6HNQD.js} +12 -12
- package/dist/chunk-KPD6HNQD.js.map +1 -0
- package/dist/{chunk-K525AZ5C.js → chunk-KTCQKXHW.js} +3 -3
- package/dist/{chunk-7HF4J7Z5.js → chunk-LBQIKMBH.js} +2 -2
- package/dist/{chunk-EBEKSNKS.js → chunk-LWOSNMHE.js} +11 -11
- package/dist/chunk-LWOSNMHE.js.map +1 -0
- package/dist/{chunk-4HDYQL3J.js → chunk-MVG67SMN.js} +2 -2
- package/dist/{chunk-7MT56F4U.js → chunk-N6OJLR2M.js} +3 -3
- package/dist/{chunk-DIICZPWS.js → chunk-P2UFDX2F.js} +5 -5
- package/dist/{chunk-HVQGCKY4.js → chunk-PCXAUC65.js} +2 -2
- package/dist/{chunk-MSWYQLMQ.js → chunk-PJ5TGJ7U.js} +2 -2
- package/dist/{chunk-CCZ5DEJ7.js → chunk-QEYXKICE.js} +2 -2
- package/dist/{chunk-H4YQSDOI.js → chunk-QI2KXQOM.js} +2 -2
- package/dist/{chunk-UANGJ2YB.js → chunk-QJYTGH5V.js} +11 -10
- package/dist/{chunk-UANGJ2YB.js.map → chunk-QJYTGH5V.js.map} +1 -1
- package/dist/{chunk-FAXZQ5UF.js → chunk-QLMUW7OC.js} +2 -2
- package/dist/{chunk-XXVIHJZY.js → chunk-QQP5KJMS.js} +4 -4
- package/dist/{chunk-VCETL77O.js → chunk-QTDAPDDV.js} +14 -6
- package/dist/chunk-QTDAPDDV.js.map +1 -0
- package/dist/{chunk-RTAMLDWP.js → chunk-QWNYUTI2.js} +2 -2
- package/dist/{chunk-NT432TE6.js → chunk-R7E7X4CQ.js} +3 -3
- package/dist/{chunk-747LRSOO.js → chunk-RBTZLXZJ.js} +2 -2
- package/dist/{chunk-OF3L2SD6.js → chunk-RDPZMUCX.js} +2 -2
- package/dist/{chunk-JIUVJ4M7.js → chunk-RJTGXZT6.js} +2 -2
- package/dist/{chunk-XJIGOFN6.js → chunk-ROFEKKMI.js} +4 -4
- package/dist/{chunk-UHXCLPGC.js → chunk-RVTOCAHQ.js} +2 -2
- package/dist/{chunk-WLYIROCJ.js → chunk-RWPNRCK2.js} +2 -2
- package/dist/{chunk-HNHCQ556.js → chunk-S6CP5FWF.js} +2 -2
- package/dist/{chunk-YY3PEDBR.js → chunk-S77LTWCZ.js} +7 -7
- package/dist/{chunk-JRCYZEHU.js → chunk-SGEI3IJK.js} +2 -2
- package/dist/{chunk-7G6VDWXB.js → chunk-SZZEDEIU.js} +3 -3
- package/dist/{chunk-4UVDI4XE.js → chunk-T7AEAFEE.js} +4 -4
- package/dist/{chunk-B2P7M2D2.js → chunk-THYGVKZB.js} +7 -11
- package/dist/chunk-THYGVKZB.js.map +1 -0
- package/dist/{chunk-FUHKW252.js → chunk-TQ7IRULX.js} +2 -2
- package/dist/{chunk-VJFMXYKP.js → chunk-TQLYMYOK.js} +2 -2
- package/dist/{chunk-QS2PUZC7.js → chunk-UTQLKPBS.js} +6 -6
- package/dist/{chunk-T227WEHE.js → chunk-V2BEYLNR.js} +6 -6
- package/dist/{chunk-HPLWFNG4.js → chunk-V4M4BZNW.js} +2 -2
- package/dist/{chunk-KUDZVJKQ.js → chunk-VTTRWLOR.js} +2 -2
- package/dist/{chunk-L2UHRVB4.js → chunk-VVMSDWRG.js} +5 -5
- package/dist/{chunk-SV4BNALS.js → chunk-WLZKVY33.js} +6 -6
- package/dist/{chunk-TJCRCCPT.js → chunk-XHX3NTRP.js} +4 -4
- package/dist/{chunk-7BEHYALK.js → chunk-Y7MJSOZ7.js} +7 -7
- package/dist/{chunk-7BEHYALK.js.map → chunk-Y7MJSOZ7.js.map} +1 -1
- package/dist/{chunk-YAWK6AWF.js → chunk-YDJXGYYA.js} +2 -2
- package/dist/{chunk-VMCCGUQB.js → chunk-YGJZLOSR.js} +2 -2
- package/dist/{chunk-7TSYBD3E.js → chunk-YH65A6WM.js} +2 -2
- package/dist/{chunk-Y3H4WOP3.js → chunk-YKEJ5P3H.js} +5 -5
- package/dist/{chunk-GV2EFYNV.js → chunk-YODIXNV4.js} +4 -4
- package/dist/{chunk-AHLJSVRL.js → chunk-YVOW35HH.js} +2 -2
- package/dist/{chunk-DEFCPAXD.js → chunk-YZ7BRD26.js} +2 -2
- package/dist/{chunk-NJDQ4YSV.js → chunk-Z3U2YVNM.js} +4 -4
- package/dist/{chunk-RSHNUOSJ.js → chunk-ZHDMT2MJ.js} +6 -6
- package/dist/{chunk-4X5Z5SRV.js → chunk-ZWPUYBNK.js} +35 -8
- package/dist/chunk-ZWPUYBNK.js.map +1 -0
- package/dist/classified/index.js +5 -5
- package/dist/{classified-marker-EHRSGBM7.js → classified-marker-3STDEUFT.js} +3 -3
- package/dist/collection-facade-SGTS3TRS.js +45 -0
- package/dist/{computed-6G5M3UPH.js → computed-5E2OM6EN.js} +3 -3
- package/dist/consent/index.js +10 -10
- package/dist/cover/index.js +3 -3
- package/dist/custody/index.js +11 -11
- package/dist/{dead-filter-ANPRM2LD.js → dead-filter-ZNWVGV5U.js} +2 -2
- package/dist/debug/index.js +1 -1
- package/dist/{delegation-6NUQCURX.js → delegation-LZWFOST7.js} +14 -12
- package/dist/delegation-LZWFOST7.js.map +1 -0
- package/dist/derivations/index.js +12 -12
- package/dist/derive-BWXA2L7D.js +22 -0
- package/dist/directory/index.js +10 -10
- package/dist/{dispatch-EO2QHEXK.js → dispatch-S34AUC43.js} +18 -18
- package/dist/{dispatch-UGU775MV.js → dispatch-TIYW3UDN.js} +5 -5
- package/dist/{enclave-3Z7VTJAW.js → enclave-Y6GMYQMS.js} +11 -9
- package/dist/executor-JDMH2IGK.js +29 -0
- package/dist/executor-PCZN2LTY.js +9 -0
- package/dist/executor-WFTHIDT7.js +9 -0
- package/dist/export-accessible-U6GXZZMQ.js +23 -0
- package/dist/extract-partition-IDI6NDUR.js +38 -0
- package/dist/{fanout-sidecar-3Q6BWNSS.js → fanout-sidecar-BVFOEJTP.js} +9 -9
- package/dist/find-VBNMB42N.js +11 -0
- package/dist/forget/index.js +9 -9
- package/dist/guards/index.js +4 -4
- package/dist/history/index.js +12 -12
- package/dist/i18n/index.js +14 -14
- package/dist/index.d.ts +12 -12
- package/dist/index.js +104 -118
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +2 -2
- package/dist/introspection/index.js +11 -11
- package/dist/issue-TEGTAN7N.js +19 -0
- package/dist/kernel/enclave/crypto.d.ts +24 -4
- package/dist/kernel/enclave/index.d.ts +2 -0
- package/dist/kernel/enclave/record-aad.d.ts +59 -0
- package/dist/kernel/errors.d.ts +6 -10
- package/dist/kernel/sync-policy.d.ts +0 -2
- package/dist/kernel/types.d.ts +3 -6
- package/dist/kernel/vault.d.ts +4 -4
- package/dist/{ledger-ZO5OKKGR.js → ledger-NFLBQASD.js} +11 -11
- package/dist/liberate-SG2PPGAJ.js +24 -0
- package/dist/{link-set-ZZYDZPL4.js → link-set-IPS57KDM.js} +11 -11
- package/dist/{managed-secret-6FITSKDO.js → managed-secret-GFYGPLNI.js} +3 -3
- package/dist/materialized-views/index.js +20 -20
- package/dist/money/index.js +4 -4
- package/dist/noydb-TN2VIJJO.js +83 -0
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.js +12 -12
- package/dist/pod/index.js +72 -84
- package/dist/{bundle-handle-G4R37BQV.js → pod-handle-I4ZME246.js} +6 -6
- package/dist/pod-handle-I4ZME246.js.map +1 -0
- package/dist/policy/index.js +4 -4
- package/dist/port/to/index.d.ts +2 -2
- package/dist/port/with/service-bus.d.ts +0 -4
- package/dist/portability/index.js +8 -8
- package/dist/{post-register-577X4FAU.js → post-register-JUSV3X4E.js} +6 -6
- package/dist/query/index.js +3 -3
- package/dist/reduce/index.js +4 -4
- package/dist/register-UTMPUAQW.js +32 -0
- package/dist/registry-B2S4UNUI.js +19 -0
- package/dist/registry-E4FM32KD.js +9 -0
- package/dist/registry-HACMULJJ.js +9 -0
- package/dist/registry-NDLBGQLJ.js +18 -0
- package/dist/request-withdrawal-Q5G43PR7.js +31 -0
- package/dist/{reveal-PCQYK4NO.js → reveal-YJU7GUYJ.js} +6 -6
- package/dist/revoke-NXOUPYS3.js +24 -0
- package/dist/satellites/index.js +1 -1
- package/dist/schema-update/index.js +2 -2
- package/dist/sealed-record/index.js +12 -12
- package/dist/search/index.js +4 -4
- package/dist/{seed-BVO6SSKH.js → seed-XXLR4KXU.js} +11 -11
- package/dist/sequence/index.js +9 -9
- package/dist/session/index.js +10 -10
- package/dist/shadow/index.js +2 -2
- package/dist/share-link/index.js +1 -1
- package/dist/signer-FCGAUB6E.js +25 -0
- package/dist/snapshots/index.js +10 -10
- package/dist/snapshots/index.js.map +1 -1
- package/dist/{stale-3FW6U4OU.js → stale-OT5NMBXU.js} +10 -10
- package/dist/storage-EWWIFB43.js +23 -0
- package/dist/{store-coordination-provider-3QGSXG3P.js → store-coordination-provider-PPLVM2I2.js} +3 -3
- package/dist/sync/index.js +11 -11
- package/dist/team/index.js +14 -14
- package/dist/tiers/index.js +10 -10
- package/dist/to/index.js +1 -3
- package/dist/to/index.js.map +1 -1
- package/dist/transactions/index.js +4 -4
- package/dist/{ulid-PTAIMDG4.js → ulid-VQW6ERQN.js} +2 -2
- package/dist/util/index.js +1 -1
- package/dist/{verify-RO5RTZOJ.js → verify-SHJXGZGM.js} +5 -5
- package/dist/walk-4NIT2ZBH.js +21 -0
- package/dist/with-cargo/adopt-partition.d.ts +1 -1
- package/dist/with-cargo/extract-partition.d.ts +1 -1
- package/dist/with-cargo/index.d.ts +1 -1
- package/dist/with-party/team/index.d.ts +1 -1
- package/dist/with-party/team/keyring.d.ts +2 -2
- package/dist/with-pod/format.d.ts +10 -12
- package/dist/with-pod/index.d.ts +10 -10
- package/dist/with-pod/open.d.ts +2 -2
- package/dist/with-pod/{bundle-handle.d.ts → pod-handle.d.ts} +2 -2
- package/dist/with-pod/pod-store.d.ts +0 -8
- package/dist/with-pod/{bundle.d.ts → pod.d.ts} +11 -19
- package/dist/with-pod/ulid.d.ts +1 -1
- package/dist/withdraw-accessible-LJG66PZQ.js +28 -0
- package/package.json +3 -3
- package/dist/api-XDMGLURJ.js +0 -20
- package/dist/backup-AWHG6ODK.js.map +0 -1
- package/dist/bundle-handle-G4R37BQV.js.map +0 -1
- package/dist/chunk-44JENXEG.js.map +0 -1
- package/dist/chunk-4X5Z5SRV.js.map +0 -1
- package/dist/chunk-55LKVALY.js.map +0 -1
- package/dist/chunk-B2P7M2D2.js.map +0 -1
- package/dist/chunk-EBEKSNKS.js.map +0 -1
- package/dist/chunk-HNGSV2YC.js.map +0 -1
- package/dist/chunk-LRNODVQX.js.map +0 -1
- package/dist/chunk-NSRITINN.js.map +0 -1
- package/dist/chunk-P2PLXMHO.js.map +0 -1
- package/dist/chunk-SPA5WX3T.js.map +0 -1
- package/dist/chunk-SYFEJFIO.js.map +0 -1
- package/dist/chunk-VCETL77O.js.map +0 -1
- package/dist/chunk-ZJADGNYF.js.map +0 -1
- package/dist/collection-facade-5UJW6QRB.js +0 -45
- package/dist/delegation-6NUQCURX.js.map +0 -1
- package/dist/derive-5PFJNNNU.js +0 -22
- package/dist/executor-AB4BCJO4.js +0 -29
- package/dist/executor-CYJQLKKI.js +0 -9
- package/dist/executor-S4QIKEHW.js +0 -9
- package/dist/export-accessible-JXCJGHCF.js +0 -23
- package/dist/extract-partition-2WDL4FJ5.js +0 -38
- package/dist/find-RBBYKXI7.js +0 -11
- package/dist/issue-EABYJWX5.js +0 -19
- package/dist/liberate-S3JR4TQT.js +0 -24
- package/dist/noydb-SPEVD5JA.js +0 -83
- package/dist/register-OXUXXIWT.js +0 -32
- package/dist/registry-CZVINVQH.js +0 -9
- package/dist/registry-IKUR2MXD.js +0 -9
- package/dist/registry-L3CO5ZAY.js +0 -18
- package/dist/registry-QFIVGS2W.js +0 -19
- package/dist/request-withdrawal-UV42CNR5.js +0 -31
- package/dist/revoke-26DFO36Z.js +0 -24
- package/dist/signer-DDO7QEID.js +0 -25
- package/dist/storage-M7L2EK3F.js +0 -23
- package/dist/walk-OFXQN5US.js +0 -21
- package/dist/withdraw-accessible-7XKYVTMP.js +0 -28
- /package/dist/{api-XDMGLURJ.js.map → api-6IBOZN6F.js.map} +0 -0
- /package/dist/{chunk-DG27IUVI.js.map → chunk-42IDLU5V.js.map} +0 -0
- /package/dist/{chunk-35EBKWQU.js.map → chunk-4444HN72.js.map} +0 -0
- /package/dist/{chunk-N35NC4JH.js.map → chunk-466KGOQB.js.map} +0 -0
- /package/dist/{chunk-6OC6YASM.js.map → chunk-4NI5PR5S.js.map} +0 -0
- /package/dist/{chunk-OUST5WDV.js.map → chunk-4YUIVHII.js.map} +0 -0
- /package/dist/{chunk-6HFM7EIT.js.map → chunk-5NKSNW25.js.map} +0 -0
- /package/dist/{chunk-FDX7OWWI.js.map → chunk-5SK5AFYH.js.map} +0 -0
- /package/dist/{chunk-DMQCLZ4Z.js.map → chunk-6U7M7AX6.js.map} +0 -0
- /package/dist/{chunk-FNSMZQS4.js.map → chunk-7EIPPOEL.js.map} +0 -0
- /package/dist/{chunk-OXCU7G5I.js.map → chunk-7J6YERYT.js.map} +0 -0
- /package/dist/{chunk-AZQVFXJF.js.map → chunk-A4JJUWSV.js.map} +0 -0
- /package/dist/{chunk-BGQ63MCT.js.map → chunk-AFSMT3WI.js.map} +0 -0
- /package/dist/{chunk-3FSX6LDG.js.map → chunk-AMKCY454.js.map} +0 -0
- /package/dist/{chunk-K6TQEDVJ.js.map → chunk-BVYRPAB2.js.map} +0 -0
- /package/dist/{chunk-7F4DBNSP.js.map → chunk-C66T4W5P.js.map} +0 -0
- /package/dist/{chunk-UFM3WVIF.js.map → chunk-C6MI5OCF.js.map} +0 -0
- /package/dist/{chunk-PK3URBVU.js.map → chunk-CAJ7QAPC.js.map} +0 -0
- /package/dist/{chunk-P2Y2F6EB.js.map → chunk-CK6Z5DJQ.js.map} +0 -0
- /package/dist/{chunk-G4VQSGXL.js.map → chunk-CK7IRIRY.js.map} +0 -0
- /package/dist/{chunk-UAHHWR4P.js.map → chunk-CWX6YIX5.js.map} +0 -0
- /package/dist/{chunk-5XFTL73S.js.map → chunk-D763JZRO.js.map} +0 -0
- /package/dist/{chunk-CCZJJ4I2.js.map → chunk-ESABIXMQ.js.map} +0 -0
- /package/dist/{chunk-5GMMIDJX.js.map → chunk-FMZV43QY.js.map} +0 -0
- /package/dist/{chunk-HXGUIPQB.js.map → chunk-FSZPQCDR.js.map} +0 -0
- /package/dist/{chunk-Z7SMBVNM.js.map → chunk-GE2AGI67.js.map} +0 -0
- /package/dist/{chunk-7VPWXVKU.js.map → chunk-GJX6DOGD.js.map} +0 -0
- /package/dist/{chunk-VBCDVWRU.js.map → chunk-GLS7OSZT.js.map} +0 -0
- /package/dist/{chunk-W3TVWF6N.js.map → chunk-H545OIWE.js.map} +0 -0
- /package/dist/{chunk-VA3PPYTQ.js.map → chunk-HJAFOPTN.js.map} +0 -0
- /package/dist/{chunk-Z45YRGFO.js.map → chunk-HNOBRU24.js.map} +0 -0
- /package/dist/{chunk-OI7ZJUYT.js.map → chunk-HVPQ5QIZ.js.map} +0 -0
- /package/dist/{chunk-AR2JDFAE.js.map → chunk-HVR74IBG.js.map} +0 -0
- /package/dist/{chunk-2APC6HS6.js.map → chunk-IMYGJ5HU.js.map} +0 -0
- /package/dist/{chunk-25FGCLYS.js.map → chunk-IYYGLI2K.js.map} +0 -0
- /package/dist/{chunk-E2TN45ZD.js.map → chunk-JBMSNYOS.js.map} +0 -0
- /package/dist/{chunk-RXYYFSBB.js.map → chunk-JU3JKOY5.js.map} +0 -0
- /package/dist/{chunk-CEJWMBXO.js.map → chunk-K2MR7ROB.js.map} +0 -0
- /package/dist/{chunk-PGWXE5CR.js.map → chunk-KCLNKE4W.js.map} +0 -0
- /package/dist/{chunk-K525AZ5C.js.map → chunk-KTCQKXHW.js.map} +0 -0
- /package/dist/{chunk-7HF4J7Z5.js.map → chunk-LBQIKMBH.js.map} +0 -0
- /package/dist/{chunk-4HDYQL3J.js.map → chunk-MVG67SMN.js.map} +0 -0
- /package/dist/{chunk-7MT56F4U.js.map → chunk-N6OJLR2M.js.map} +0 -0
- /package/dist/{chunk-DIICZPWS.js.map → chunk-P2UFDX2F.js.map} +0 -0
- /package/dist/{chunk-HVQGCKY4.js.map → chunk-PCXAUC65.js.map} +0 -0
- /package/dist/{chunk-MSWYQLMQ.js.map → chunk-PJ5TGJ7U.js.map} +0 -0
- /package/dist/{chunk-CCZ5DEJ7.js.map → chunk-QEYXKICE.js.map} +0 -0
- /package/dist/{chunk-H4YQSDOI.js.map → chunk-QI2KXQOM.js.map} +0 -0
- /package/dist/{chunk-FAXZQ5UF.js.map → chunk-QLMUW7OC.js.map} +0 -0
- /package/dist/{chunk-XXVIHJZY.js.map → chunk-QQP5KJMS.js.map} +0 -0
- /package/dist/{chunk-RTAMLDWP.js.map → chunk-QWNYUTI2.js.map} +0 -0
- /package/dist/{chunk-NT432TE6.js.map → chunk-R7E7X4CQ.js.map} +0 -0
- /package/dist/{chunk-747LRSOO.js.map → chunk-RBTZLXZJ.js.map} +0 -0
- /package/dist/{chunk-OF3L2SD6.js.map → chunk-RDPZMUCX.js.map} +0 -0
- /package/dist/{chunk-JIUVJ4M7.js.map → chunk-RJTGXZT6.js.map} +0 -0
- /package/dist/{chunk-XJIGOFN6.js.map → chunk-ROFEKKMI.js.map} +0 -0
- /package/dist/{chunk-UHXCLPGC.js.map → chunk-RVTOCAHQ.js.map} +0 -0
- /package/dist/{chunk-WLYIROCJ.js.map → chunk-RWPNRCK2.js.map} +0 -0
- /package/dist/{chunk-HNHCQ556.js.map → chunk-S6CP5FWF.js.map} +0 -0
- /package/dist/{chunk-YY3PEDBR.js.map → chunk-S77LTWCZ.js.map} +0 -0
- /package/dist/{chunk-JRCYZEHU.js.map → chunk-SGEI3IJK.js.map} +0 -0
- /package/dist/{chunk-7G6VDWXB.js.map → chunk-SZZEDEIU.js.map} +0 -0
- /package/dist/{chunk-4UVDI4XE.js.map → chunk-T7AEAFEE.js.map} +0 -0
- /package/dist/{chunk-FUHKW252.js.map → chunk-TQ7IRULX.js.map} +0 -0
- /package/dist/{chunk-VJFMXYKP.js.map → chunk-TQLYMYOK.js.map} +0 -0
- /package/dist/{chunk-QS2PUZC7.js.map → chunk-UTQLKPBS.js.map} +0 -0
- /package/dist/{chunk-T227WEHE.js.map → chunk-V2BEYLNR.js.map} +0 -0
- /package/dist/{chunk-HPLWFNG4.js.map → chunk-V4M4BZNW.js.map} +0 -0
- /package/dist/{chunk-KUDZVJKQ.js.map → chunk-VTTRWLOR.js.map} +0 -0
- /package/dist/{chunk-L2UHRVB4.js.map → chunk-VVMSDWRG.js.map} +0 -0
- /package/dist/{chunk-SV4BNALS.js.map → chunk-WLZKVY33.js.map} +0 -0
- /package/dist/{chunk-TJCRCCPT.js.map → chunk-XHX3NTRP.js.map} +0 -0
- /package/dist/{chunk-YAWK6AWF.js.map → chunk-YDJXGYYA.js.map} +0 -0
- /package/dist/{chunk-VMCCGUQB.js.map → chunk-YGJZLOSR.js.map} +0 -0
- /package/dist/{chunk-7TSYBD3E.js.map → chunk-YH65A6WM.js.map} +0 -0
- /package/dist/{chunk-Y3H4WOP3.js.map → chunk-YKEJ5P3H.js.map} +0 -0
- /package/dist/{chunk-GV2EFYNV.js.map → chunk-YODIXNV4.js.map} +0 -0
- /package/dist/{chunk-AHLJSVRL.js.map → chunk-YVOW35HH.js.map} +0 -0
- /package/dist/{chunk-DEFCPAXD.js.map → chunk-YZ7BRD26.js.map} +0 -0
- /package/dist/{chunk-NJDQ4YSV.js.map → chunk-Z3U2YVNM.js.map} +0 -0
- /package/dist/{chunk-RSHNUOSJ.js.map → chunk-ZHDMT2MJ.js.map} +0 -0
- /package/dist/{classified-marker-EHRSGBM7.js.map → classified-marker-3STDEUFT.js.map} +0 -0
- /package/dist/{collection-facade-5UJW6QRB.js.map → collection-facade-SGTS3TRS.js.map} +0 -0
- /package/dist/{computed-6G5M3UPH.js.map → computed-5E2OM6EN.js.map} +0 -0
- /package/dist/{dead-filter-ANPRM2LD.js.map → dead-filter-ZNWVGV5U.js.map} +0 -0
- /package/dist/{derive-5PFJNNNU.js.map → derive-BWXA2L7D.js.map} +0 -0
- /package/dist/{dispatch-EO2QHEXK.js.map → dispatch-S34AUC43.js.map} +0 -0
- /package/dist/{dispatch-UGU775MV.js.map → dispatch-TIYW3UDN.js.map} +0 -0
- /package/dist/{enclave-3Z7VTJAW.js.map → enclave-Y6GMYQMS.js.map} +0 -0
- /package/dist/{executor-AB4BCJO4.js.map → executor-JDMH2IGK.js.map} +0 -0
- /package/dist/{executor-CYJQLKKI.js.map → executor-PCZN2LTY.js.map} +0 -0
- /package/dist/{executor-S4QIKEHW.js.map → executor-WFTHIDT7.js.map} +0 -0
- /package/dist/{export-accessible-JXCJGHCF.js.map → export-accessible-U6GXZZMQ.js.map} +0 -0
- /package/dist/{extract-partition-2WDL4FJ5.js.map → extract-partition-IDI6NDUR.js.map} +0 -0
- /package/dist/{fanout-sidecar-3Q6BWNSS.js.map → fanout-sidecar-BVFOEJTP.js.map} +0 -0
- /package/dist/{find-RBBYKXI7.js.map → find-VBNMB42N.js.map} +0 -0
- /package/dist/{issue-EABYJWX5.js.map → issue-TEGTAN7N.js.map} +0 -0
- /package/dist/{ledger-ZO5OKKGR.js.map → ledger-NFLBQASD.js.map} +0 -0
- /package/dist/{liberate-S3JR4TQT.js.map → liberate-SG2PPGAJ.js.map} +0 -0
- /package/dist/{link-set-ZZYDZPL4.js.map → link-set-IPS57KDM.js.map} +0 -0
- /package/dist/{managed-secret-6FITSKDO.js.map → managed-secret-GFYGPLNI.js.map} +0 -0
- /package/dist/{noydb-SPEVD5JA.js.map → noydb-TN2VIJJO.js.map} +0 -0
- /package/dist/{post-register-577X4FAU.js.map → post-register-JUSV3X4E.js.map} +0 -0
- /package/dist/{register-OXUXXIWT.js.map → register-UTMPUAQW.js.map} +0 -0
- /package/dist/{registry-CZVINVQH.js.map → registry-B2S4UNUI.js.map} +0 -0
- /package/dist/{registry-IKUR2MXD.js.map → registry-E4FM32KD.js.map} +0 -0
- /package/dist/{registry-L3CO5ZAY.js.map → registry-HACMULJJ.js.map} +0 -0
- /package/dist/{registry-QFIVGS2W.js.map → registry-NDLBGQLJ.js.map} +0 -0
- /package/dist/{request-withdrawal-UV42CNR5.js.map → request-withdrawal-Q5G43PR7.js.map} +0 -0
- /package/dist/{reveal-PCQYK4NO.js.map → reveal-YJU7GUYJ.js.map} +0 -0
- /package/dist/{revoke-26DFO36Z.js.map → revoke-NXOUPYS3.js.map} +0 -0
- /package/dist/{seed-BVO6SSKH.js.map → seed-XXLR4KXU.js.map} +0 -0
- /package/dist/{signer-DDO7QEID.js.map → signer-FCGAUB6E.js.map} +0 -0
- /package/dist/{stale-3FW6U4OU.js.map → stale-OT5NMBXU.js.map} +0 -0
- /package/dist/{storage-M7L2EK3F.js.map → storage-EWWIFB43.js.map} +0 -0
- /package/dist/{store-coordination-provider-3QGSXG3P.js.map → store-coordination-provider-PPLVM2I2.js.map} +0 -0
- /package/dist/{ulid-PTAIMDG4.js.map → ulid-VQW6ERQN.js.map} +0 -0
- /package/dist/{verify-RO5RTZOJ.js.map → verify-SHJXGZGM.js.map} +0 -0
- /package/dist/{walk-OFXQN5US.js.map → walk-4NIT2ZBH.js.map} +0 -0
- /package/dist/{withdraw-accessible-7XKYVTMP.js.map → withdraw-accessible-LJG66PZQ.js.map} +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
UserApi,
|
|
3
|
+
createUserApi
|
|
4
|
+
} from "./chunk-CAJ7QAPC.js";
|
|
5
|
+
import "./chunk-CK7IRIRY.js";
|
|
6
|
+
import "./chunk-ZWPUYBNK.js";
|
|
7
|
+
import "./chunk-IMYGJ5HU.js";
|
|
8
|
+
import "./chunk-FSZPQCDR.js";
|
|
9
|
+
import "./chunk-HVR74IBG.js";
|
|
10
|
+
import "./chunk-RBTZLXZJ.js";
|
|
11
|
+
import "./chunk-LP7BEXCT.js";
|
|
12
|
+
import "./chunk-QTDAPDDV.js";
|
|
13
|
+
import "./chunk-6ZFTVY3O.js";
|
|
14
|
+
import "./chunk-I64WQSN3.js";
|
|
15
|
+
import "./chunk-PZ5AY32C.js";
|
|
16
|
+
export {
|
|
17
|
+
UserApi,
|
|
18
|
+
createUserApi
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=api-6IBOZN6F.js.map
|
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import {
|
|
2
2
|
issueAttestationCore
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-WLZKVY33.js";
|
|
4
4
|
import {
|
|
5
5
|
getRevokedDocIdsCore,
|
|
6
6
|
publishRevocationListCore,
|
|
7
7
|
revokeDocCore,
|
|
8
8
|
unrevokeDocCore
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-IYYGLI2K.js";
|
|
10
10
|
import {
|
|
11
11
|
ATTESTATIONS_COLLECTION
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-VVMSDWRG.js";
|
|
13
13
|
import {
|
|
14
14
|
NO_ATTESTATION
|
|
15
|
-
} from "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
15
|
+
} from "../chunk-TQLYMYOK.js";
|
|
16
|
+
import "../chunk-4AOERLTV.js";
|
|
17
|
+
import "../chunk-ZWPUYBNK.js";
|
|
18
|
+
import "../chunk-IMYGJ5HU.js";
|
|
19
|
+
import "../chunk-FSZPQCDR.js";
|
|
20
|
+
import "../chunk-HVR74IBG.js";
|
|
21
|
+
import "../chunk-RBTZLXZJ.js";
|
|
22
22
|
import "../chunk-LP7BEXCT.js";
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-
|
|
23
|
+
import "../chunk-QTDAPDDV.js";
|
|
24
|
+
import "../chunk-6ZFTVY3O.js";
|
|
25
25
|
import {
|
|
26
26
|
AttestationError,
|
|
27
27
|
AttestationNotEnabledError
|
|
28
|
-
} from "../chunk-
|
|
28
|
+
} from "../chunk-I64WQSN3.js";
|
|
29
29
|
import "../chunk-PZ5AY32C.js";
|
|
30
30
|
|
|
31
31
|
// src/with-audit/attestation/active.ts
|
|
32
32
|
function withAttestation() {
|
|
33
33
|
return {
|
|
34
34
|
async issueAttestation(ctx, args) {
|
|
35
|
-
const { issueAttestationCore: issueAttestationCore2 } = await import("../issue-
|
|
35
|
+
const { issueAttestationCore: issueAttestationCore2 } = await import("../issue-TEGTAN7N.js");
|
|
36
36
|
return issueAttestationCore2(ctx, args);
|
|
37
37
|
},
|
|
38
38
|
async getDocumentSigningPublicKey(deps) {
|
|
39
|
-
const { loadSigner, loadOrCreateSigner } = await import("../signer-
|
|
39
|
+
const { loadSigner, loadOrCreateSigner } = await import("../signer-FCGAUB6E.js");
|
|
40
40
|
const existing = await loadSigner(deps.adapter, deps.vault, deps.getDEK);
|
|
41
41
|
if (existing) return { keyId: existing.keyId, publicKeyB64: existing.publicKeyB64 };
|
|
42
42
|
if (deps.role !== "owner") {
|
|
@@ -46,19 +46,19 @@ function withAttestation() {
|
|
|
46
46
|
return { keyId: signer.keyId, publicKeyB64: signer.publicKeyB64 };
|
|
47
47
|
},
|
|
48
48
|
async revokeAttestation(ctx, docId) {
|
|
49
|
-
const { revokeDocCore: revokeDocCore2 } = await import("../revoke-
|
|
49
|
+
const { revokeDocCore: revokeDocCore2 } = await import("../revoke-NXOUPYS3.js");
|
|
50
50
|
return revokeDocCore2(ctx, docId);
|
|
51
51
|
},
|
|
52
52
|
async unrevokeAttestation(ctx, docId) {
|
|
53
|
-
const { unrevokeDocCore: unrevokeDocCore2 } = await import("../revoke-
|
|
53
|
+
const { unrevokeDocCore: unrevokeDocCore2 } = await import("../revoke-NXOUPYS3.js");
|
|
54
54
|
return unrevokeDocCore2(ctx, docId);
|
|
55
55
|
},
|
|
56
56
|
async getRevokedDocIds(ctx) {
|
|
57
|
-
const { getRevokedDocIdsCore: getRevokedDocIdsCore2 } = await import("../revoke-
|
|
57
|
+
const { getRevokedDocIdsCore: getRevokedDocIdsCore2 } = await import("../revoke-NXOUPYS3.js");
|
|
58
58
|
return getRevokedDocIdsCore2(ctx);
|
|
59
59
|
},
|
|
60
60
|
async publishRevocationList(ctx) {
|
|
61
|
-
const { publishRevocationListCore: publishRevocationListCore2 } = await import("../revoke-
|
|
61
|
+
const { publishRevocationListCore: publishRevocationListCore2 } = await import("../revoke-NXOUPYS3.js");
|
|
62
62
|
return publishRevocationListCore2(ctx);
|
|
63
63
|
}
|
|
64
64
|
};
|
|
@@ -3,35 +3,36 @@ import {
|
|
|
3
3
|
} from "./chunk-EPFF7LOX.js";
|
|
4
4
|
import {
|
|
5
5
|
SCHEMAS_COLLECTION
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CK6Z5DJQ.js";
|
|
7
7
|
import {
|
|
8
8
|
PERIODS_COLLECTION,
|
|
9
9
|
PERIOD_ARCHIVES_COLLECTION,
|
|
10
10
|
PERIOD_FREEZES_COLLECTION,
|
|
11
11
|
PERIOD_REOPENS_COLLECTION,
|
|
12
12
|
PERIOD_TARGET_PURGES_COLLECTION
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-V4M4BZNW.js";
|
|
14
14
|
import {
|
|
15
15
|
SEQUENCE_COLLECTION
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-GJX6DOGD.js";
|
|
17
17
|
import {
|
|
18
18
|
LEDGER_COLLECTION,
|
|
19
19
|
LEDGER_DELTAS_COLLECTION
|
|
20
20
|
} from "./chunk-I7FD46FF.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-ZWPUYBNK.js";
|
|
22
|
+
import "./chunk-IMYGJ5HU.js";
|
|
23
|
+
import "./chunk-FSZPQCDR.js";
|
|
24
|
+
import "./chunk-HVR74IBG.js";
|
|
25
|
+
import "./chunk-RBTZLXZJ.js";
|
|
26
26
|
import "./chunk-LP7BEXCT.js";
|
|
27
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-QTDAPDDV.js";
|
|
28
28
|
import {
|
|
29
|
-
NOYDB_BACKUP_VERSION
|
|
30
|
-
|
|
29
|
+
NOYDB_BACKUP_VERSION,
|
|
30
|
+
NOYDB_FORMAT_VERSION
|
|
31
|
+
} from "./chunk-6ZFTVY3O.js";
|
|
31
32
|
import {
|
|
32
33
|
BackupCorruptedError,
|
|
33
34
|
BackupLedgerError
|
|
34
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-I64WQSN3.js";
|
|
35
36
|
import "./chunk-PZ5AY32C.js";
|
|
36
37
|
|
|
37
38
|
// src/with-pod/backup.ts
|
|
@@ -124,7 +125,7 @@ async function loadVault(ctx, backupJson) {
|
|
|
124
125
|
await ctx.adapter.saveAll(ctx.vault, backup.collections);
|
|
125
126
|
for (const [userId, keyringFile] of Object.entries(backup.keyrings)) {
|
|
126
127
|
const envelope = {
|
|
127
|
-
_noydb:
|
|
128
|
+
_noydb: NOYDB_FORMAT_VERSION,
|
|
128
129
|
_v: 1,
|
|
129
130
|
_ts: (/* @__PURE__ */ new Date()).toISOString(),
|
|
130
131
|
_iv: "",
|
|
@@ -263,4 +264,4 @@ export {
|
|
|
263
264
|
loadVault,
|
|
264
265
|
verifyBackupIntegrity
|
|
265
266
|
};
|
|
266
|
-
//# sourceMappingURL=backup-
|
|
267
|
+
//# sourceMappingURL=backup-FNAYQMLF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/with-pod/backup.ts"],"sourcesContent":["/**\n * Vault backup / restore / integrity.\n *\n * Holds `dump()` (verifiable encrypted JSON backup, including the blob\n * collections so blob \"covers\" travel in the bundle), `load()` (restore +\n * post-load integrity gate), `verifyBackupIntegrity()` (chain + data-envelope\n * cross-check), and `exportJSON()` (plaintext per-collection export, built on\n * the vault's `exportStream`). Behaviour is byte-identical to the inline\n * `Vault` methods these functions replaced — every dependency the moving code\n * touched on `this.*` arrives via {@link BackupContext}. `Vault` keeps the\n * public methods as thin delegators.\n *\n * Internal — reached through `vault.dump()` / `vault.load()` / etc.\n */\nimport { NOYDB_BACKUP_VERSION } from '../kernel/types.js'\nimport { BackupLedgerError, BackupCorruptedError } from '../kernel/errors.js'\nimport { LEDGER_COLLECTION, LEDGER_DELTAS_COLLECTION } from '../with-commit/history/ledger/constants.js'\nimport { SCHEMAS_COLLECTION } from '../with-shape/persisted-schemas/storage.js'\nimport { SEQUENCE_COLLECTION } from '../with-commit/sequence/index.js'\nimport { MANIFEST_COLLECTION } from '../with-shape/manifest/reserved-collections.js'\n// #1025 — imported from the dependency-light `window.ts`, not `periods.ts`: that\n// module exists precisely so a consumer can name the period collections without\n// dragging the ledger hash-chain machinery (`sha256Hex`/`canonicalJson`) into a\n// bundle that opted out of the periods service. Same reason the sync engine's\n// period-scoped pull imports it.\nimport {\n PERIODS_COLLECTION,\n PERIOD_FREEZES_COLLECTION,\n PERIOD_ARCHIVES_COLLECTION,\n PERIOD_TARGET_PURGES_COLLECTION,\n PERIOD_REOPENS_COLLECTION,\n} from '../with-audit/periods/window.js'\nimport type {\n NoydbStore,\n EncryptedEnvelope,\n VaultBackup,\n VaultSnapshot,\n ExportStreamOptions,\n ExportChunk,\n} from '../kernel/types.js'\nimport type { LedgerStore } from '../with-commit/history/ledger/store.js'\nimport { NOYDB_FORMAT_VERSION } from '../kernel/types.js'\n\n/** Everything the moving backup methods touched on the vault's `this.*`. */\nexport interface BackupContext {\n /** The ciphertext store. */\n readonly adapter: NoydbStore\n /** Vault namespace name. */\n readonly vault: string\n /** The invoking keyring's user id (read fresh per call). */\n userId(): string\n /** The vault's ledger store, or null when history is off. */\n getLedgerOrNull(): LedgerStore | null\n /** Recompute an envelope's `payloadHash` (bound `historyStrategy.envelopePayloadHash`). */\n envelopePayloadHash(envelope: EncryptedEnvelope): Promise<string>\n /**\n * Refresh the in-memory keyring from the freshly-loaded keyring file and\n * rebuild the DEK resolver. No-op when the vault has no `reloadKeyring`\n * callback (plaintext vaults / test constructions).\n */\n reloadKeyringAndRebuildDEK(): Promise<void>\n /** Clear the vault's collection cache (post-load). */\n clearCollectionCache(): void\n /** Reset the ledger store so the next `ledger()` rebuilds its head cache. */\n resetLedgerStore(): void\n /** The vault's decrypt+ACL export stream (used by `exportJSON`). */\n exportStream(opts: ExportStreamOptions): AsyncIterableIterator<ExportChunk>\n}\n\n/** Result of {@link verifyBackupIntegrity}. */\nexport type VerifyBackupResult =\n | { readonly ok: true; readonly head: string; readonly length: number }\n | {\n readonly ok: false\n readonly kind: 'chain'\n readonly divergedAt: number\n readonly message: string\n }\n | {\n readonly ok: false\n readonly kind: 'data'\n readonly collection: string\n readonly id: string\n readonly message: string\n }\n\n/**\n * Dump vault as a verifiable encrypted JSON backup string.\n *\n * backups embed the current ledger head and the full `_ledger` +\n * `_ledger_deltas` internal collections so the receiver can run\n * `verifyBackupIntegrity()` after `load()` and detect any tampering between\n * dump and restore. Backups produced without a ledger skip the integrity check\n * with a warning — both modes round-trip cleanly.\n */\nexport async function dumpVault(ctx: BackupContext): Promise<string> {\n const snapshot = await ctx.adapter.loadAll(ctx.vault)\n\n // Load keyrings (separate path because loadAll filters them out\n // along with all other underscore-prefixed internal collections).\n const keyringIds = await ctx.adapter.list(ctx.vault, '_keyring')\n const keyrings: Record<string, unknown> = {}\n for (const keyringId of keyringIds) {\n const envelope = await ctx.adapter.get(ctx.vault, '_keyring', keyringId)\n if (envelope) {\n keyrings[keyringId] = JSON.parse(envelope._data)\n }\n }\n\n // Load the ledger entries + deltas so the receiver can replay\n // the chain after restore. Without this, `load()` would have an\n // empty ledger and `verifyBackupIntegrity()` would have nothing\n // to compare against.\n //\n // Also enumerate the blob collections so blob content (\"covers\")\n // travels in the bundle (the blob DEK already travels in `_keyring`).\n // Literals are inlined (not imported from blobs/blob-set.ts) to keep\n // the blob runtime out of this kernel hot path — they mirror\n // BLOB_INDEX/CHUNKS/EVICTION_AUDIT_COLLECTION and SLOTS/VERSIONS_PREFIX.\n // The collect-loop skips empty ids, so this no-ops without blobs.\n const internalSnapshot: VaultSnapshot = {}\n const internalNames = [\n LEDGER_COLLECTION, LEDGER_DELTAS_COLLECTION, SCHEMAS_COLLECTION, SEQUENCE_COLLECTION,\n MANIFEST_COLLECTION, // #941: the pod's manifest-set record(s) travel in the bundle too\n // #1025: the accounting-period close state + its companions. The bundle is\n // the backup/restore path, so without these a restore discarded the\n // hash-chained evidence that a month was ever closed — the artifact\n // `closePeriod` exists to produce — and dropped the write gate with it, so\n // the restored vault silently accepted back-dated writes into a sealed\n // month. The companions matter as much as the close: a bounded reopen\n // window (`reopenPeriod({ until })`) is state a restore must not lose.\n PERIODS_COLLECTION,\n PERIOD_REOPENS_COLLECTION,\n PERIOD_FREEZES_COLLECTION,\n PERIOD_ARCHIVES_COLLECTION,\n PERIOD_TARGET_PURGES_COLLECTION,\n '_history', // full-snapshot version history — so history()/getVersion()/diff() survive the bundle\n '_blob_index', '_blob_chunks', '_blob_eviction_audit',\n // #753 spec §7 Q3: `_blob_intent` markers travel too — restoring mid-op\n // state (a blob row without its marker) would reproduce the ambiguity\n // the journal exists to prevent. Note: `_mv_stale` does NOT travel\n // today (a pre-existing, separate gap) — observed here, tracked on\n // #761, not fixed in this pass.\n '_blob_intent',\n // #769: `_blob_slots_<c>` envelopes travel verbatim (raw ciphertext,\n // same DEK, same vault) — including any `SlotRecord.pendingRelease`\n // resume breadcrumb they carry. This is INTENTIONALLY the opposite of\n // `extract-partition`'s `reKeyBlobs`, which STRIPS `pendingRelease`:\n // a full-vault backup restores into the SAME vault it was taken from,\n // so a breadcrumb taken mid-rehome (together with its `_blob_intent`\n // marker, carried above) is resumable on restore — carry-and-resume is\n // correct here. A partition extraction crosses vaults: the breadcrumb's\n // old eTag may not exist in the destination, so it must be stripped\n // there instead. Asymmetry: backup = same-vault-resumable = carry;\n // partition = cross-vault = strip-breadcrumb-carry-marker.\n ...Object.keys(snapshot).flatMap((c) => [`_blob_slots_${c}`, `_blob_versions_${c}`]),\n ]\n for (const internalName of internalNames) {\n const ids = await ctx.adapter.list(ctx.vault, internalName)\n if (ids.length === 0) continue\n const records: Record<string, EncryptedEnvelope> = {}\n for (const id of ids) {\n const envelope = await ctx.adapter.get(ctx.vault, internalName, id)\n if (envelope) records[id] = envelope\n }\n internalSnapshot[internalName] = records\n }\n\n // Embed the ledger head if there's a chain. An empty ledger\n // (fresh vault) leaves `ledgerHead` undefined, which\n // load() treats the same as a legacy backup (no integrity\n // check, console warning). If history is not opted in,\n // `getLedgerOrNull` returns null and we skip embedding entirely\n // — the backup is still valid, just without the integrity head.\n const ledgerForHead = ctx.getLedgerOrNull()\n const head = ledgerForHead ? await ledgerForHead.head() : null\n const backup: VaultBackup = {\n _noydb_backup: NOYDB_BACKUP_VERSION,\n _compartment: ctx.vault,\n _exported_at: new Date().toISOString(),\n _exported_by: ctx.userId(),\n keyrings: keyrings as VaultBackup['keyrings'],\n collections: snapshot,\n ...(Object.keys(internalSnapshot).length > 0\n ? { _internal: internalSnapshot }\n : {}),\n ...(head\n ? {\n ledgerHead: {\n hash: head.hash,\n index: head.entry.index,\n ts: head.entry.ts,\n },\n }\n : {}),\n }\n\n return JSON.stringify(backup)\n}\n\n/**\n * Restore a vault from a verifiable backup. After loading, runs\n * `verifyBackupIntegrity()` to confirm the hash chain, the embedded head, and\n * every data envelope's payload hash. Legacy backups (no `ledgerHead`) load\n * with a console warning and skip the integrity check.\n */\nexport async function loadVault(ctx: BackupContext, backupJson: string): Promise<void> {\n const backup = JSON.parse(backupJson) as VaultBackup\n\n // 1. Restore data collections.\n await ctx.adapter.saveAll(ctx.vault, backup.collections)\n\n // 2. Restore keyrings.\n for (const [userId, keyringFile] of Object.entries(backup.keyrings)) {\n const envelope = {\n _noydb: NOYDB_FORMAT_VERSION,\n _v: 1,\n _ts: new Date().toISOString(),\n _iv: '',\n _data: JSON.stringify(keyringFile),\n }\n await ctx.adapter.put(ctx.vault, '_keyring', userId, envelope)\n }\n\n // 3. Restore internal collections (`_ledger`, `_ledger_deltas`).\n // Required so verifyBackupIntegrity has the chain to walk.\n if (backup._internal) {\n for (const [internalName, records] of Object.entries(backup._internal)) {\n for (const [id, envelope] of Object.entries(records)) {\n await ctx.adapter.put(ctx.vault, internalName, id, envelope)\n }\n }\n }\n\n // 4. Refresh the in-memory keyring from the freshly-loaded\n // keyring file. Without this, the Vault's getDEK\n // closure still holds the OLD session's DEKs, and every\n // decrypt of a loaded ledger entry / data envelope fails\n // with TamperedError because the DEK doesn't match the\n // ciphertext that was encrypted with the SOURCE user's DEK.\n // Skipped for plaintext vaults and for tests that\n // construct Vault without a reloadKeyring callback.\n await ctx.reloadKeyringAndRebuildDEK()\n\n // 5. Clear collection cache + reset the ledger store so the\n // next ledger() call rebuilds its head cache from the\n // freshly-loaded entries.\n ctx.clearCollectionCache()\n ctx.resetLedgerStore()\n\n // 5. Run the verification gate. Legacy backups (no ledgerHead)\n // skip this with a one-line warning so existing consumers can\n // still read them while migrating.\n if (!backup.ledgerHead) {\n console.warn(\n `[noy-db] Loaded a legacy backup with no ledgerHead — ` +\n `verifiable-backup integrity check skipped. ` +\n `Re-export with a ledger-aware build to get tamper detection.`,\n )\n return\n }\n\n const result = await verifyBackupIntegrity(ctx)\n if (!result.ok) {\n // Surface the most specific error class we can. The result\n // shape carries enough info for callers to inspect.\n if (result.kind === 'data') {\n throw new BackupCorruptedError(\n result.collection,\n result.id,\n result.message,\n )\n }\n throw new BackupLedgerError(result.message, result.divergedAt)\n }\n\n // 6. Cross-check: the freshly-verified head must match the\n // value embedded at dump time. A mismatch means someone\n // truncated or extended the chain after dump.\n if (result.head !== backup.ledgerHead.hash) {\n throw new BackupLedgerError(\n `Backup ledger head mismatch: embedded \"${backup.ledgerHead.hash}\" ` +\n `but reconstructed \"${result.head}\".`,\n )\n }\n}\n\n/**\n * End-to-end backup integrity check: `ledger.verify()` (hash chain) plus a data\n * envelope cross-check (every current record's `_data` hash must match the\n * latest `put` entry's `payloadHash`). Returns a discriminated union so callers\n * can distinguish chain vs data failures.\n */\nexport async function verifyBackupIntegrity(ctx: BackupContext): Promise<VerifyBackupResult> {\n // Step 1: chain verification. Without the history strategy there\n // is no ledger; an unaudited backup verifies trivially as `ok`\n // because there's nothing to diverge from.\n const ledgerForVerify = ctx.getLedgerOrNull()\n if (!ledgerForVerify) {\n return { ok: true, head: '', length: 0 }\n }\n const chainResult = await ledgerForVerify.verify()\n if (!chainResult.ok) {\n return {\n ok: false,\n kind: 'chain',\n divergedAt: chainResult.divergedAt,\n message:\n `Ledger chain diverged at index ${chainResult.divergedAt}: ` +\n `expected prevHash \"${chainResult.expected}\" but found \"${chainResult.actual}\".`,\n }\n }\n\n // Step 2: data envelope cross-check. Walk every entry in the\n // ledger and, for the LATEST `put` per (collection, id), recompute\n // the data envelope's payloadHash and compare. Earlier puts of the\n // same id are skipped because the data collection only holds the\n // current version — historical envelopes live in the deltas\n // collection (which is itself protected by the chain).\n // Reuse the ledger we already resolved in step 1.\n const allEntries = await ledgerForVerify.loadAllEntries()\n\n // Find the latest non-delete entry per (collection, id). Walk\n // the entries in reverse so we hit the latest first; mark each\n // (collection, id) as seen and skip subsequent entries.\n const seen = new Set<string>()\n const latest = new Map<\n string,\n { collection: string; id: string; expectedHash: string }\n >()\n for (let i = allEntries.length - 1; i >= 0; i--) {\n const entry = allEntries[i]\n if (!entry) continue\n // Amendment entries are multi-record audit entries whose\n // `collection` and `id` are empty strings — building a `\"/\"`\n // key here would mark that synthetic slot as seen and falsely\n // trip the data check on a record that never existed. Skip\n // them BEFORE the key/seen bookkeeping so they neither\n // tombstone real entries nor enter the latest map.\n if (entry.op === 'amendment' || entry.op === 'lifecycle') continue\n const key = `${entry.collection}/${entry.id}`\n if (seen.has(key)) continue\n seen.add(key)\n // For deletes the data collection should NOT have the record,\n // so we skip — there's nothing to cross-check. Marking the key\n // as seen above ensures any earlier `put` of the same id is\n // also skipped (the record was subsequently deleted).\n if (entry.op === 'delete') continue\n latest.set(key, {\n collection: entry.collection,\n id: entry.id,\n expectedHash: entry.payloadHash,\n })\n }\n\n for (const { collection, id, expectedHash } of latest.values()) {\n const envelope = await ctx.adapter.get(ctx.vault, collection, id)\n if (!envelope) {\n return {\n ok: false,\n kind: 'data',\n collection,\n id,\n message:\n `Ledger expects data record \"${collection}/${id}\" to exist, ` +\n `but the adapter has no envelope for it.`,\n }\n }\n const actualHash = await ctx.envelopePayloadHash(envelope)\n if (actualHash !== expectedHash) {\n return {\n ok: false,\n kind: 'data',\n collection,\n id,\n message:\n `Data envelope \"${collection}/${id}\" has been tampered with: ` +\n `expected payloadHash \"${expectedHash}\", got \"${actualHash}\".`,\n }\n }\n }\n\n return {\n ok: true,\n head: chainResult.head,\n length: chainResult.length,\n }\n}\n\n/**\n * Plaintext per-collection export, built on the vault's `exportStream`. Forces\n * collection granularity (record-by-record output makes no sense in a single\n * string) and merges dictionary snapshots across collections.\n */\nexport async function exportVaultJSON(ctx: BackupContext, opts: ExportStreamOptions = {}): Promise<string> {\n // Force per-collection granularity regardless of caller setting:\n // record-by-record output doesn't make sense in a single string.\n const collections: Record<\n string,\n {\n schema: null\n refs: Record<string, { target: string; mode: 'strict' | 'warn' | 'cascade' }>\n records: unknown[]\n }\n > = {}\n let ledgerHead: ExportChunk['ledgerHead'] | undefined\n // Merged dictionary snapshot across all collections.\n // Only populated when `resolveLabels` is not set.\n const allDictionaries: Record<\n string, // collection name\n Record<string, Record<string, Record<string, string>>>\n > = {}\n\n for await (const chunk of ctx.exportStream({\n granularity: 'collection',\n withLedgerHead: opts.withLedgerHead === true,\n // Thread the export locale so records are read at the\n // `export` layer (i18nText collapsed + dictKey/staticDict labels resolved).\n ...(opts.resolveLabels !== undefined ? { resolveLabels: opts.resolveLabels } : {}),\n })) {\n collections[chunk.collection] = {\n schema: null, // Standard Schema validators are not JSON-serializable\n refs: chunk.refs,\n records: chunk.records,\n }\n if (chunk.ledgerHead) ledgerHead = chunk.ledgerHead\n // Collect dictionary snapshots unless resolveLabels is set\n if (!opts.resolveLabels && chunk.dictionaries) {\n allDictionaries[chunk.collection] = chunk.dictionaries\n }\n }\n\n const hasDictionaries = Object.keys(allDictionaries).length > 0\n return JSON.stringify({\n _noydb_export: 1,\n _compartment: ctx.vault,\n _exported_at: new Date().toISOString(),\n _exported_by: ctx.userId(),\n collections,\n ...(hasDictionaries ? { _dictionaries: allDictionaries } : {}),\n ...(ledgerHead ? { ledgerHead } : {}),\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+FA,eAAsB,UAAU,KAAqC;AACnE,QAAM,WAAW,MAAM,IAAI,QAAQ,QAAQ,IAAI,KAAK;AAIpD,QAAM,aAAa,MAAM,IAAI,QAAQ,KAAK,IAAI,OAAO,UAAU;AAC/D,QAAM,WAAoC,CAAC;AAC3C,aAAW,aAAa,YAAY;AAClC,UAAM,WAAW,MAAM,IAAI,QAAQ,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AAA,IACpB,eAAe;AAAA,IACf,cAAc,IAAI;AAAA,IAClB,eAAc,oBAAI,KAAK,GAAE,YAAY;AAAA,IACrC,cAAc,IAAI,OAAO;AAAA,IACzB;AAAA,IACA,GAAI,kBAAkB,EAAE,eAAe,gBAAgB,IAAI,CAAC;AAAA,IAC5D,GAAI,aAAa,EAAE,WAAW,IAAI,CAAC;AAAA,EACrC,CAAC;AACH;","names":[]}
|
package/dist/blobs/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
detectMimeType,
|
|
17
17
|
isPreCompressed,
|
|
18
18
|
memoryBlobPinStore
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-CWX6YIX5.js";
|
|
20
20
|
import {
|
|
21
21
|
BLOB_EVICTION_AUDIT_COLLECTION,
|
|
22
22
|
EXPORT_AUDIT_COLLECTION,
|
|
@@ -24,21 +24,21 @@ import {
|
|
|
24
24
|
NO_BLOBS,
|
|
25
25
|
createExportBlobsHandle,
|
|
26
26
|
runCompaction
|
|
27
|
-
} from "../chunk-
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
33
|
-
import "../chunk-
|
|
34
|
-
import "../chunk-
|
|
35
|
-
import "../chunk-
|
|
27
|
+
} from "../chunk-P2UFDX2F.js";
|
|
28
|
+
import "../chunk-RVTOCAHQ.js";
|
|
29
|
+
import "../chunk-YVOW35HH.js";
|
|
30
|
+
import "../chunk-AMKCY454.js";
|
|
31
|
+
import "../chunk-ZWPUYBNK.js";
|
|
32
|
+
import "../chunk-IMYGJ5HU.js";
|
|
33
|
+
import "../chunk-FSZPQCDR.js";
|
|
34
|
+
import "../chunk-HVR74IBG.js";
|
|
35
|
+
import "../chunk-RBTZLXZJ.js";
|
|
36
36
|
import "../chunk-LP7BEXCT.js";
|
|
37
|
-
import "../chunk-
|
|
38
|
-
import "../chunk-
|
|
37
|
+
import "../chunk-QTDAPDDV.js";
|
|
38
|
+
import "../chunk-6ZFTVY3O.js";
|
|
39
39
|
import {
|
|
40
40
|
BlobOfflineError
|
|
41
|
-
} from "../chunk-
|
|
41
|
+
} from "../chunk-I64WQSN3.js";
|
|
42
42
|
import "../chunk-PZ5AY32C.js";
|
|
43
43
|
|
|
44
44
|
// src/via/blob/active.ts
|
package/dist/broker/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NO_BROKER
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-H545OIWE.js";
|
|
4
4
|
import {
|
|
5
5
|
issueChallenge,
|
|
6
6
|
verifyBrokerProof
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-ZWPUYBNK.js";
|
|
8
|
+
import "../chunk-IMYGJ5HU.js";
|
|
9
|
+
import "../chunk-FSZPQCDR.js";
|
|
10
|
+
import "../chunk-HVR74IBG.js";
|
|
11
|
+
import "../chunk-RBTZLXZJ.js";
|
|
12
12
|
import "../chunk-LP7BEXCT.js";
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-QTDAPDDV.js";
|
|
14
|
+
import "../chunk-6ZFTVY3O.js";
|
|
15
15
|
import {
|
|
16
16
|
BrokerEnrolmentError,
|
|
17
17
|
BrokerNotEnabledError,
|
|
18
18
|
BrokerProofError
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-I64WQSN3.js";
|
|
20
20
|
import "../chunk-PZ5AY32C.js";
|
|
21
21
|
|
|
22
22
|
// src/with-party/broker/active.ts
|
|
@@ -30,7 +30,7 @@ function withBroker(config) {
|
|
|
30
30
|
const cache = /* @__PURE__ */ new Map();
|
|
31
31
|
return {
|
|
32
32
|
async enroll(ctx) {
|
|
33
|
-
const { enrollSeed } = await import("../seed-
|
|
33
|
+
const { enrollSeed } = await import("../seed-XXLR4KXU.js");
|
|
34
34
|
return enrollSeed({ ...ctx, config });
|
|
35
35
|
},
|
|
36
36
|
async rotate(ctx) {
|
|
@@ -39,7 +39,7 @@ function withBroker(config) {
|
|
|
39
39
|
const inFlight = scoped.map(([, e]) => e.inFlight).filter((p) => p !== void 0);
|
|
40
40
|
await Promise.allSettled(inFlight);
|
|
41
41
|
for (const [key] of scoped) cache.delete(key);
|
|
42
|
-
const { rotateSeed } = await import("../seed-
|
|
42
|
+
const { rotateSeed } = await import("../seed-XXLR4KXU.js");
|
|
43
43
|
return rotateSeed({ ...ctx, config });
|
|
44
44
|
},
|
|
45
45
|
credentialSource(ctx, profile) {
|
|
@@ -56,7 +56,7 @@ function withBroker(config) {
|
|
|
56
56
|
const skewMs = config.skewMs ?? DEFAULT_SKEW_MS;
|
|
57
57
|
const capturedEntry = entry;
|
|
58
58
|
const inFlight = (async () => {
|
|
59
|
-
const { mintStoreCredentials } = await import("../seed-
|
|
59
|
+
const { mintStoreCredentials } = await import("../seed-XXLR4KXU.js");
|
|
60
60
|
const creds = await mintStoreCredentials({ ...ctx, config }, profile);
|
|
61
61
|
capturedEntry.cached = { creds, validUntil: cacheFloor(creds, skewMs) };
|
|
62
62
|
return creds;
|
package/dist/cargo/index.js
CHANGED
|
@@ -6,36 +6,36 @@ import {
|
|
|
6
6
|
diffVault,
|
|
7
7
|
unsealDeks,
|
|
8
8
|
withCargo
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-7VIIEXQ2.js";
|
|
10
10
|
import {
|
|
11
11
|
extractPartition,
|
|
12
12
|
walkClosure
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-KPD6HNQD.js";
|
|
14
14
|
import {
|
|
15
15
|
createDeedOwner,
|
|
16
16
|
isDeedVault,
|
|
17
17
|
liberateVault,
|
|
18
18
|
loadDeedMarker
|
|
19
|
-
} from "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
19
|
+
} from "../chunk-S77LTWCZ.js";
|
|
20
|
+
import "../chunk-4YUIVHII.js";
|
|
21
|
+
import "../chunk-CNA3QRLM.js";
|
|
22
|
+
import "../chunk-CWX6YIX5.js";
|
|
23
23
|
import {
|
|
24
24
|
groupAndReduce,
|
|
25
25
|
reduceRecords
|
|
26
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-ESABIXMQ.js";
|
|
27
27
|
import {
|
|
28
28
|
NO_CARGO,
|
|
29
29
|
isQuorum,
|
|
30
30
|
runDrainBarrier
|
|
31
|
-
} from "../chunk-
|
|
32
|
-
import "../chunk-
|
|
33
|
-
import "../chunk-
|
|
31
|
+
} from "../chunk-42IDLU5V.js";
|
|
32
|
+
import "../chunk-QEYXKICE.js";
|
|
33
|
+
import "../chunk-CK6Z5DJQ.js";
|
|
34
34
|
import {
|
|
35
35
|
CustodyApi
|
|
36
|
-
} from "../chunk-
|
|
37
|
-
import "../chunk-
|
|
38
|
-
import "../chunk-
|
|
36
|
+
} from "../chunk-QQP5KJMS.js";
|
|
37
|
+
import "../chunk-4LNFXGNW.js";
|
|
38
|
+
import "../chunk-GE2AGI67.js";
|
|
39
39
|
import {
|
|
40
40
|
fuseRetrieval
|
|
41
41
|
} from "../chunk-AURFOK3D.js";
|
|
@@ -44,29 +44,29 @@ import "../chunk-CADUYBQD.js";
|
|
|
44
44
|
import {
|
|
45
45
|
readPath
|
|
46
46
|
} from "../chunk-IGJCYUT5.js";
|
|
47
|
-
import "../chunk-
|
|
48
|
-
import "../chunk-
|
|
49
|
-
import "../chunk-
|
|
50
|
-
import "../chunk-
|
|
51
|
-
import "../chunk-
|
|
47
|
+
import "../chunk-SZZEDEIU.js";
|
|
48
|
+
import "../chunk-RVTOCAHQ.js";
|
|
49
|
+
import "../chunk-Y7MJSOZ7.js";
|
|
50
|
+
import "../chunk-CK7IRIRY.js";
|
|
51
|
+
import "../chunk-YVOW35HH.js";
|
|
52
52
|
import {
|
|
53
53
|
generateULID
|
|
54
|
-
} from "../chunk-
|
|
54
|
+
} from "../chunk-4AOERLTV.js";
|
|
55
55
|
import "../chunk-SVLR4POP.js";
|
|
56
|
-
import "../chunk-
|
|
56
|
+
import "../chunk-HJAFOPTN.js";
|
|
57
57
|
import "../chunk-I7FD46FF.js";
|
|
58
|
-
import "../chunk-
|
|
59
|
-
import "../chunk-
|
|
60
|
-
import "../chunk-
|
|
61
|
-
import "../chunk-
|
|
62
|
-
import "../chunk-
|
|
63
|
-
import "../chunk-
|
|
64
|
-
import "../chunk-
|
|
58
|
+
import "../chunk-AMKCY454.js";
|
|
59
|
+
import "../chunk-A4JJUWSV.js";
|
|
60
|
+
import "../chunk-ZWPUYBNK.js";
|
|
61
|
+
import "../chunk-IMYGJ5HU.js";
|
|
62
|
+
import "../chunk-FSZPQCDR.js";
|
|
63
|
+
import "../chunk-HVR74IBG.js";
|
|
64
|
+
import "../chunk-RBTZLXZJ.js";
|
|
65
65
|
import "../chunk-LP7BEXCT.js";
|
|
66
66
|
import {
|
|
67
67
|
sha256Hex
|
|
68
|
-
} from "../chunk-
|
|
69
|
-
import "../chunk-
|
|
68
|
+
} from "../chunk-QTDAPDDV.js";
|
|
69
|
+
import "../chunk-6ZFTVY3O.js";
|
|
70
70
|
import {
|
|
71
71
|
AdoptionStateError,
|
|
72
72
|
CargoNotEnabledError,
|
|
@@ -81,7 +81,7 @@ import {
|
|
|
81
81
|
UnknownShardError,
|
|
82
82
|
ValidationError,
|
|
83
83
|
VaultTemplateNotFoundError
|
|
84
|
-
} from "../chunk-
|
|
84
|
+
} from "../chunk-I64WQSN3.js";
|
|
85
85
|
import "../chunk-PZ5AY32C.js";
|
|
86
86
|
export {
|
|
87
87
|
AdoptionStateError,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CargoNotEnabledError,
|
|
3
3
|
QuiesceTimeoutError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-I64WQSN3.js";
|
|
5
5
|
|
|
6
6
|
// src/with-cargo/strategy.ts
|
|
7
7
|
var NO_CARGO = {
|
|
@@ -60,4 +60,4 @@ export {
|
|
|
60
60
|
isQuorum,
|
|
61
61
|
runDrainBarrier
|
|
62
62
|
};
|
|
63
|
-
//# sourceMappingURL=chunk-
|
|
63
|
+
//# sourceMappingURL=chunk-42IDLU5V.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateULID
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4AOERLTV.js";
|
|
4
4
|
import {
|
|
5
5
|
AmendmentForbiddenError,
|
|
6
6
|
ConflictError,
|
|
7
7
|
InvariantError,
|
|
8
8
|
ValidationError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-I64WQSN3.js";
|
|
10
10
|
|
|
11
11
|
// src/with-commit/tx/atomic-eligibility.ts
|
|
12
12
|
function canCommitAtomically(db, ctx) {
|
|
@@ -270,7 +270,7 @@ async function runTransaction(db, fn, options, txInvariants) {
|
|
|
270
270
|
db._clearActiveTxContext(ctx);
|
|
271
271
|
}
|
|
272
272
|
if (ctx._amendment) {
|
|
273
|
-
const { GuardExecutor } = await import("./executor-
|
|
273
|
+
const { GuardExecutor } = await import("./executor-WFTHIDT7.js");
|
|
274
274
|
try {
|
|
275
275
|
for (const [vaultName, v] of ctx._amendmentVaults) {
|
|
276
276
|
const registry = v._getGuardRegistry();
|
|
@@ -447,4 +447,4 @@ export {
|
|
|
447
447
|
TxCollection,
|
|
448
448
|
runTransaction
|
|
449
449
|
};
|
|
450
|
-
//# sourceMappingURL=chunk-
|
|
450
|
+
//# sourceMappingURL=chunk-4444HN72.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
formatScaledInt,
|
|
5
5
|
parseToScaledInt,
|
|
6
6
|
rescaleScaledInt
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JU3JKOY5.js";
|
|
8
8
|
|
|
9
9
|
// src/via/money/arith.ts
|
|
10
10
|
function parseAmount(label, amount, scale, rounding) {
|
|
@@ -120,4 +120,4 @@ export {
|
|
|
120
120
|
isMoneyString,
|
|
121
121
|
moneyNumber
|
|
122
122
|
};
|
|
123
|
-
//# sourceMappingURL=chunk-
|
|
123
|
+
//# sourceMappingURL=chunk-466KGOQB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/with-pod/ulid.ts"],"sourcesContent":["/**\n * Minimal ULID generator — zero dependencies, Web Crypto API only.\n *\n *. Used by the bundle writer to generate stable opaque\n * handles for `.noydb` containers.\n *\n * **What's a ULID?** A 128-bit identifier encoded as 26 Crockford\n * base32 characters. Layout:\n *\n * ```\n * 01HYABCDEFGHJKMNPQRSTVWXYZ\n * |--------||---------------|\n * 48-bit 80-bit\n * timestamp randomness\n * ```\n *\n * The first 10 chars encode a millisecond Unix timestamp (so ULIDs\n * sort lexicographically by creation time), and the remaining 16\n * chars are random. Crockford base32 omits I/L/O/U to avoid\n * ambiguity in handwriting and URLs.\n *\n * **Why hand-roll instead of pulling in `ulid`?** The package adds\n * a dep, the implementation is ~30 lines, and the bundle module\n * is the only consumer. Adding `ulid` would also drag in its own\n * crypto polyfill that we don't need on Node 18+ or modern\n * browsers.\n *\n * **Privacy consideration:** the timestamp prefix is observable in\n * the bundle header. This is a deliberate trade-off:\n * - Pro: lexicographic sortability lets bundle adapters list\n * newest-first without an extra index.\n * - Con: a casual observer can read the bundle's creation time\n * from the handle. They cannot read it from any OTHER field\n * (the header explicitly forbids `_exported_at`), and a\n * creation timestamp is the same kind of metadata that\n * filesystem mtime would already expose for a downloaded\n * bundle. The leak is therefore equivalent to what's already\n * visible from the file's mtime — not a new exposure.\n *\n * If a future use case needs timestamp-free handles, a v2 of the\n * format could specify \"use the random portion only\" without a\n * format break — `validatePodHeaderFields` only checks the regex\n * shape, not the encoded timestamp.\n */\n\n/**\n * Crockford base32 alphabet — omits I, L, O, U to avoid handwriting\n * and URL-encoding ambiguity. 32 characters covering 5 bits each.\n */\nconst CROCKFORD_ALPHABET = '0123456789ABCDEFGHJKMNPQRSTVWXYZ'\n\n/**\n * Encode a non-negative integer as a fixed-width Crockford base32\n * string. The width is fixed (not the natural log32 length) so\n * leading zeros are preserved — that's required for the timestamp\n * prefix to remain lexicographically sortable.\n *\n * Used twice: once for the 48-bit timestamp portion (10 chars) and\n * once for each 40-bit half of the randomness (8 chars × 2).\n */\nfunction encodeBase32(value: number, length: number): string {\n let out = ''\n let v = value\n for (let i = 0; i < length; i++) {\n out = CROCKFORD_ALPHABET[v % 32]! + out\n v = Math.floor(v / 32)\n }\n return out\n}\n\n/**\n * Generate a fresh ULID. Uses `crypto.getRandomValues` for the\n * randomness portion — same Web Crypto API the rest of the\n * codebase uses for IVs and salt.\n *\n * Returns a 26-character string. Calling twice in the same\n * millisecond produces two distinct ULIDs (the random portion\n * differs); ULIDs from the same millisecond are NOT guaranteed\n * to be monotonically ordered relative to each other, only\n * relative to ULIDs from a different millisecond. The bundle\n * format never relies on intra-millisecond ordering.\n */\nexport function generateULID(): string {\n const now = Date.now()\n\n // 48-bit timestamp → 10 Crockford base32 characters.\n // JavaScript's max safe integer is 2^53 - 1; Date.now() is well\n // within that range until the year ~285,000 AD. Splitting into\n // high and low 24-bit halves keeps every intermediate value\n // inside the safe-integer range and avoids any ambiguity in the\n // base32 encoder above.\n const timestampHigh = Math.floor(now / 0x1000000) // top 24 bits\n const timestampLow = now & 0xffffff // bottom 24 bits\n const tsPart =\n encodeBase32(timestampHigh, 5) + encodeBase32(timestampLow, 5)\n\n // 80-bit randomness → 16 Crockford base32 characters. Split into\n // two 40-bit halves so each fits in JavaScript's safe-integer\n // range (53 bits) and the base32 encoder doesn't have to deal\n // with bigints.\n const randBytes = new Uint8Array(10)\n crypto.getRandomValues(randBytes)\n\n // First 5 bytes (40 bits) → 8 Crockford base32 characters.\n // Reconstruct the 40-bit integer from bytes in big-endian order.\n // Multiplication by 2^32 (instead of bit-shift) avoids JavaScript's\n // 32-bit integer cast on the high byte.\n const rand1 =\n randBytes[0]! * 2 ** 32 +\n (randBytes[1]! << 24 >>> 0) +\n (randBytes[2]! << 16) +\n (randBytes[3]! << 8) +\n randBytes[4]!\n // Same for the second 5 bytes.\n const rand2 =\n randBytes[5]! * 2 ** 32 +\n (randBytes[6]! << 24 >>> 0) +\n (randBytes[7]! << 16) +\n (randBytes[8]! << 8) +\n randBytes[9]!\n const randPart = encodeBase32(rand1, 8) + encodeBase32(rand2, 8)\n\n return tsPart + randPart\n}\n\n/**\n * Validate that a string is a syntactically well-formed ULID. Used\n * by the bundle header validator. Does NOT verify that the\n * timestamp portion decodes to a sensible date — the format only\n * cares about the encoding shape.\n */\nexport function isULID(value: string): boolean {\n return /^[0-9A-HJKMNP-TV-Z]{26}$/.test(value)\n}\n"],"mappings":";AAiDA,IAAM,qBAAqB;AAW3B,SAAS,aAAa,OAAe,QAAwB;AAC3D,MAAI,MAAM;AACV,MAAI,IAAI;AACR,WAAS,IAAI,GAAG,IAAI,QAAQ,KAAK;AAC/B,UAAM,mBAAmB,IAAI,EAAE,IAAK;AACpC,QAAI,KAAK,MAAM,IAAI,EAAE;AAAA,EACvB;AACA,SAAO;AACT;AAcO,SAAS,eAAuB;AACrC,QAAM,MAAM,KAAK,IAAI;AAQrB,QAAM,gBAAgB,KAAK,MAAM,MAAM,QAAS;AAChD,QAAM,eAAe,MAAM;AAC3B,QAAM,SACJ,aAAa,eAAe,CAAC,IAAI,aAAa,cAAc,CAAC;AAM/D,QAAM,YAAY,IAAI,WAAW,EAAE;AACnC,SAAO,gBAAgB,SAAS;AAMhC,QAAM,QACJ,UAAU,CAAC,IAAK,KAAK,MACpB,UAAU,CAAC,KAAM,OAAO,MACxB,UAAU,CAAC,KAAM,OACjB,UAAU,CAAC,KAAM,KAClB,UAAU,CAAC;AAEb,QAAM,QACJ,UAAU,CAAC,IAAK,KAAK,MACpB,UAAU,CAAC,KAAM,OAAO,MACxB,UAAU,CAAC,KAAM,OACjB,UAAU,CAAC,KAAM,KAClB,UAAU,CAAC;AACb,QAAM,WAAW,aAAa,OAAO,CAAC,IAAI,aAAa,OAAO,CAAC;AAE/D,SAAO,SAAS;AAClB;AAQO,SAAS,OAAO,OAAwB;AAC7C,SAAO,2BAA2B,KAAK,KAAK;AAC9C;","names":[]}
|