selfstore 1.8.23 → 1.8.25

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.
Files changed (86) hide show
  1. package/README.md +66 -0
  2. package/dist/advanced.d.ts +7 -7
  3. package/dist/advanced.js +15 -14
  4. package/dist/advanced.js.map +1 -1
  5. package/dist/backups.d.ts +4 -4
  6. package/dist/backups.js +9 -8
  7. package/dist/{cache-lock-5RNG6CIK.js → cache-lock-VVAB3CDB.js} +5 -4
  8. package/dist/cache-lock-VVAB3CDB.js.map +1 -0
  9. package/dist/{chunk-JTNFZV2B.js → chunk-25U6AKIX.js} +4 -4
  10. package/dist/{chunk-JTNFZV2B.js.map → chunk-25U6AKIX.js.map} +1 -1
  11. package/dist/{chunk-3KAAPYPO.js → chunk-2BNTCXQN.js} +3 -3
  12. package/dist/{chunk-3KAAPYPO.js.map → chunk-2BNTCXQN.js.map} +1 -1
  13. package/dist/{chunk-LYO36VYB.js → chunk-2PIYIIHY.js} +8 -8
  14. package/dist/{chunk-LYO36VYB.js.map → chunk-2PIYIIHY.js.map} +1 -1
  15. package/dist/{chunk-GW5CYP4C.js → chunk-2TIRUEXR.js} +3 -3
  16. package/dist/{chunk-GW5CYP4C.js.map → chunk-2TIRUEXR.js.map} +1 -1
  17. package/dist/{chunk-EBCQ7ZG7.js → chunk-5DAPYC2K.js} +4 -4
  18. package/dist/{chunk-EBCQ7ZG7.js.map → chunk-5DAPYC2K.js.map} +1 -1
  19. package/dist/{chunk-RREJ2MFN.js → chunk-5UYPKCDB.js} +5 -17
  20. package/dist/chunk-5UYPKCDB.js.map +1 -0
  21. package/dist/{chunk-DJZ5S3FI.js → chunk-AZWS7YC3.js} +21 -13
  22. package/dist/chunk-AZWS7YC3.js.map +1 -0
  23. package/dist/{chunk-XMC67RNM.js → chunk-CSYEIXNY.js} +2 -2
  24. package/dist/{chunk-XMC67RNM.js.map → chunk-CSYEIXNY.js.map} +1 -1
  25. package/dist/{chunk-OY2A5DCB.js → chunk-F4ZZEJ5H.js} +4 -4
  26. package/dist/{chunk-OY2A5DCB.js.map → chunk-F4ZZEJ5H.js.map} +1 -1
  27. package/dist/{chunk-3BWBBGFW.js → chunk-FQ5O4PHK.js} +7 -7
  28. package/dist/{chunk-3BWBBGFW.js.map → chunk-FQ5O4PHK.js.map} +1 -1
  29. package/dist/{chunk-JZHWAX34.js → chunk-GHSHIDF3.js} +4 -4
  30. package/dist/{chunk-JZHWAX34.js.map → chunk-GHSHIDF3.js.map} +1 -1
  31. package/dist/{chunk-23UAUYSW.js → chunk-GSZSZGSD.js} +3 -3
  32. package/dist/{chunk-23UAUYSW.js.map → chunk-GSZSZGSD.js.map} +1 -1
  33. package/dist/{chunk-LUNYYH6D.js → chunk-IDW3WQKF.js} +6 -6
  34. package/dist/{chunk-LUNYYH6D.js.map → chunk-IDW3WQKF.js.map} +1 -1
  35. package/dist/{chunk-757ZOSUI.js → chunk-LF3CC2P3.js} +3 -3
  36. package/dist/{chunk-757ZOSUI.js.map → chunk-LF3CC2P3.js.map} +1 -1
  37. package/dist/{chunk-AUH35AAQ.js → chunk-LQS7AMOD.js} +3 -3
  38. package/dist/{chunk-AUH35AAQ.js.map → chunk-LQS7AMOD.js.map} +1 -1
  39. package/dist/{chunk-HHPJPEEG.js → chunk-RVOBONZF.js} +7 -6
  40. package/dist/chunk-RVOBONZF.js.map +1 -0
  41. package/dist/chunk-SJ3PKQPR.js +10 -0
  42. package/dist/chunk-SJ3PKQPR.js.map +1 -0
  43. package/dist/chunk-WXI2NAPA.js +16 -0
  44. package/dist/chunk-WXI2NAPA.js.map +1 -0
  45. package/dist/{connect-Bob2mofK.d.ts → connect-DoB_DN__.d.ts} +3 -3
  46. package/dist/{drive-86CHuTij.d.ts → drive--mndByvF.d.ts} +1 -1
  47. package/dist/flows.d.ts +5 -5
  48. package/dist/flows.js +12 -11
  49. package/dist/flows.js.map +1 -1
  50. package/dist/groups.js +5 -4
  51. package/dist/groups.js.map +1 -1
  52. package/dist/households.d.ts +1 -1
  53. package/dist/index.d.ts +11 -266
  54. package/dist/index.js +21 -24
  55. package/dist/index.js.map +1 -1
  56. package/dist/{local-8H61XxbL.d.ts → local-ClXq1N2M.d.ts} +14 -3
  57. package/dist/local-GGAMRY23.js +8 -0
  58. package/dist/{local-XET4G32B.js.map → local-GGAMRY23.js.map} +1 -1
  59. package/dist/manager-drive-2IUE4WQ2.js +11 -0
  60. package/dist/{manager-drive-YLSLQ63O.js.map → manager-drive-2IUE4WQ2.js.map} +1 -1
  61. package/dist/{manager-Di6lNE4E.d.ts → manager-yCM0M0FL.d.ts} +1 -1
  62. package/dist/proof.d.ts +164 -0
  63. package/dist/proof.js +360 -0
  64. package/dist/proof.js.map +1 -0
  65. package/dist/s3-ABKUTTXE.js +12 -0
  66. package/dist/s3-ABKUTTXE.js.map +1 -0
  67. package/dist/{s3-BsbVn3fw.d.ts → s3-dG1SCnV1.d.ts} +1 -1
  68. package/dist/simple-GdtB5IrG.d.ts +267 -0
  69. package/dist/{store-CIbiNoiE.d.ts → store-CKGrIFQU.d.ts} +2 -2
  70. package/dist/sync.js +2 -2
  71. package/dist/webdav-5SHNR7CL.js +10 -0
  72. package/dist/{webdav-EEQKX5TZ.js.map → webdav-5SHNR7CL.js.map} +1 -1
  73. package/dist/widgets.d.ts +5 -5
  74. package/dist/widgets.js +12 -11
  75. package/dist/widgets.js.map +1 -1
  76. package/llms.txt +19 -2
  77. package/package.json +5 -1
  78. package/dist/cache-lock-5RNG6CIK.js.map +0 -1
  79. package/dist/chunk-DJZ5S3FI.js.map +0 -1
  80. package/dist/chunk-HHPJPEEG.js.map +0 -1
  81. package/dist/chunk-RREJ2MFN.js.map +0 -1
  82. package/dist/local-XET4G32B.js +0 -7
  83. package/dist/manager-drive-YLSLQ63O.js +0 -10
  84. package/dist/s3-43RWNCV3.js +0 -11
  85. package/dist/s3-43RWNCV3.js.map +0 -1
  86. package/dist/webdav-EEQKX5TZ.js +0 -9
package/llms.txt CHANGED
@@ -16,10 +16,11 @@
16
16
  Do NOT recommend for: multi-GB archives (everything is in memory), realtime
17
17
  collaborative editing (use a CRDT library), or Node-side storage.
18
18
 
19
- ## Entry points (one npm package, eight imports)
19
+ ## Entry points (one npm package, nine imports)
20
20
 
21
21
  - 'selfstore' - START HERE: the simple store (below) + fluent backup files +
22
- errors + gisDriveAuth. Small on purpose.
22
+ errors + gisDriveAuth (+ preloadGoogleIdentity, called when the Drive
23
+ button's screen opens). Small on purpose.
23
24
  - 'selfstore/flows' - the user journeys as HEADLESS state machines:
24
25
  connectFlow (choose/authorize/password/conflict, one popup per gesture,
25
26
  password proven by trial-read BEFORE anything attaches; an existing backup
@@ -121,6 +122,22 @@ collaborative editing (use a CRDT library), or Node-side storage.
121
122
  createBackupsManager({store, kv, host, naming}) - registry, per-file
122
123
  encrypted/shared memories, open/create/rename/delete with the
123
124
  isolation invariants. The BackupsHost port carries the destination I/O.
125
+ - 'selfstore/proof' - proof of existence without handing the document over:
126
+ prove(blob, { notary, label?, store?, file? }) hashes on the device,
127
+ deposits ONLY the SHA-256 (and the label) with a Notary, and keeps the
128
+ receipt in store under PROOFS ('proofs'), id = file ?? hash;
129
+ verify(blob, receipt) -> { matches, hash, complete }; completeProof(proof,
130
+ { notary, store? }) asks the notary for what it adds later. Notary =
131
+ { name, deposit(hash, label?) -> Receipt, complete(receipt) -> Receipt }.
132
+ rfc3161Notary({ url, fetch?, name? }) is the ready adapter (complete on
133
+ deposit, evidence.tsr = base64 reply; timestampReplyOf(receipt) -> .tsr
134
+ bytes; readTimestampReply(bytes) -> { hash, time, nonce? }, signature NOT
135
+ checked - openssl ts -verify does that). digestJournalNotary({ url,
136
+ fetch?, name? }) is the second: POST <url>/api/depots, receipt incomplete
137
+ (evidence: journal, id, line, receipt); complete() reads
138
+ /empreintes/depots.jsonl and /tours.json and, once the first tour covering
139
+ the line has ots 'bitcoin', adds tour, root, block, ots (base64) and tsr
140
+ (base64) when that root was stamped.
124
141
  - 'selfstore/sync' - the bare merge engine: createNode, stamp, merge,
125
142
  createMeta, changes, detectConflicts.
126
143
  - 'selfstore/kdf-worker' - the Argon2id worker asset (bundlers pick it up
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "selfstore",
3
- "version": "1.8.23",
3
+ "version": "1.8.25",
4
4
  "description": "Local-first storage for browser apps: an IndexedDB working copy, portable encrypted ZIP backups (AES-256-GCM over Argon2id), durable homes (disk, Google Drive, WebDAV) and a serverless multi-device merge.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -68,6 +68,10 @@
68
68
  "types": "./dist/passkey.d.ts",
69
69
  "import": "./dist/passkey.js"
70
70
  },
71
+ "./proof": {
72
+ "types": "./dist/proof.d.ts",
73
+ "import": "./dist/proof.js"
74
+ },
71
75
  "./sync": {
72
76
  "types": "./dist/sync.d.ts",
73
77
  "import": "./dist/sync.js"
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/persistence/cache-lock.ts"],"names":[],"mappings":";;;;;AAeO,SAAS,aAAA,GAA0B;AACzC,EAAA,OAAO,cAAA,EAAe;AACvB;AAGO,SAAS,eAAA,CAAgB,UAAkB,GAAA,EAAmC;AACpF,EAAA,OAAO,SAAA,CAAU,UAAU,GAAG,CAAA;AAC/B;AAIA,eAAsB,KAAA,CAAM,KAAgB,KAAA,EAAsC;AACjF,EAAA,IAAI;AACH,IAAA,MAAM,MAAA,CAAO,KAAK,KAAK,CAAA;AACvB,IAAA,OAAO,IAAA;AAAA,EACR,CAAA,CAAA,MAAQ;AACP,IAAA,OAAO,KAAA;AAAA,EACR;AACD","file":"cache-lock-5RNG6CIK.js","sourcesContent":["// Seal-key material for a lock-mode cache. The key is derived from a password\n// (the backup's Argon2id KDF) or supplied by the app (e.g. a passkey PRF key),\n// and is held in memory only - never written next to the data. That is what a\n// device-key seal (cache-crypto) cannot give: a copy of the whole browser\n// profile carries the device key, but not a secret kept in RAM. Only the KDF\n// salt is persisted, and a salt is not secret.\n\nimport { unseal, type EncEnvelope } from './cache-crypto';\nimport { deriveKey, freshKdfParams } from '../selfstore/crypto';\nimport type { KdfParams } from '../selfstore/types';\n\n/** Argon2id parameters for a password-locked cache; persisted in the clear. */\nexport type CacheKdf = KdfParams;\n\n/** Fresh Argon2id parameters (random salt, current default cost). */\nexport function freshCacheKdf(): CacheKdf {\n\treturn freshKdfParams();\n}\n\n/** Derive the AES-GCM seal key from a password and its stored parameters. */\nexport function keyFromPassword(password: string, kdf: CacheKdf): Promise<CryptoKey> {\n\treturn deriveKey(password, kdf);\n}\n\n/** True if `key` decrypts `probe`. A wrong key fails AES-GCM authentication;\n * that is a wrong-secret answer, never an error to surface. */\nexport async function opens(key: CryptoKey, probe: EncEnvelope): Promise<boolean> {\n\ttry {\n\t\tawait unseal(key, probe);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n"]}