@mdbase-dev/sdk 0.1.37 → 0.1.38

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 CHANGED
@@ -22,6 +22,26 @@ Pin an exact version, not a range. The npm package trusts the production
22
22
  service only. Staging and LAB builds use separate packages; see
23
23
  [SDK publication](../../../docs/sdk-publication.md).
24
24
 
25
+ ## Pair a self-hosted browser client
26
+
27
+ With `@mdbase-dev/sdk/direct`, pass the operator’s exact server descriptor and
28
+ single-use code to `pairDirect({ server, code })`. Save `{ server, token }` in
29
+ `createDirectGrantStore`, where `token` is the opaque string returned by pairing.
30
+ Pass both values back to `connectDirect({ server, token, app })`. Keep the
31
+ grant out of URLs and logs.
32
+
33
+ For a pinned WebTransport invitation, the SDK uses the invitation’s single
34
+ certificate hash to redeem the code. That authenticated reply authorizes 32
35
+ consecutive 12-day UTC slots. Reconnects use the local clock to select adjacent
36
+ authorized certificates within that calendar. A clock outside the calendar
37
+ causes an `unavailable` error and preserves the saved grant. After the final
38
+ slot, or to change the server descriptor, pair again with a trusted invitation.
39
+ Pairing and reconnecting to an ordinary HTTPS origin use WSS.
40
+
41
+ A `pairDirect` failure with `reason === "code_not_sent"` happened before
42
+ the code left the browser, so the same code can be entered again. Any other
43
+ `unavailable` pairing failure may have redeemed the code.
44
+
25
45
  ## Quick start
26
46
 
27
47
  An app declares itself with its manifest, the `mdbase-app.json` it serves at
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "runtime": {
3
- "sha256": "9105a7424c2eff35a429ace9cd96e6256fc05de28e90e0e92967a43e4d29d1ba",
4
- "bytes": 3982069,
5
- "maxBytes": 3982069,
3
+ "sha256": "1b70aad8903a333cbe422e6b57e8677929c6b556651e69f2a0e7bff1f1ddb52c",
4
+ "bytes": 4004324,
5
+ "maxBytes": 4004324,
6
6
  "source": {
7
7
  "repository": "mdbase-dev/mdbase-connect",
8
- "commit": "6891ac960fc525b5a1da0700915324255a71adcd"
8
+ "commit": "74f2d1018b66ab3ae99bc0afb5fb3a8009b25e23"
9
9
  }
10
10
  },
11
11
  "sqlite": {
@@ -15693,12 +15693,12 @@ function appReleaseTrust() {
15693
15693
  // src/application/asset-pins.json
15694
15694
  var asset_pins_default = {
15695
15695
  runtime: {
15696
- sha256: "9105a7424c2eff35a429ace9cd96e6256fc05de28e90e0e92967a43e4d29d1ba",
15697
- bytes: 3982069,
15698
- maxBytes: 3982069,
15696
+ sha256: "1b70aad8903a333cbe422e6b57e8677929c6b556651e69f2a0e7bff1f1ddb52c",
15697
+ bytes: 4004324,
15698
+ maxBytes: 4004324,
15699
15699
  source: {
15700
15700
  repository: "mdbase-dev/mdbase-connect",
15701
- commit: "6891ac960fc525b5a1da0700915324255a71adcd"
15701
+ commit: "74f2d1018b66ab3ae99bc0afb5fb3a8009b25e23"
15702
15702
  }
15703
15703
  },
15704
15704
  sqlite: {
@@ -50795,12 +50795,12 @@ ${end.comment}` : end.comment;
50795
50795
  // src/application/asset-pins.json
50796
50796
  var asset_pins_default = {
50797
50797
  runtime: {
50798
- sha256: "9105a7424c2eff35a429ace9cd96e6256fc05de28e90e0e92967a43e4d29d1ba",
50799
- bytes: 3982069,
50800
- maxBytes: 3982069,
50798
+ sha256: "1b70aad8903a333cbe422e6b57e8677929c6b556651e69f2a0e7bff1f1ddb52c",
50799
+ bytes: 4004324,
50800
+ maxBytes: 4004324,
50801
50801
  source: {
50802
50802
  repository: "mdbase-dev/mdbase-connect",
50803
- commit: "6891ac960fc525b5a1da0700915324255a71adcd"
50803
+ commit: "74f2d1018b66ab3ae99bc0afb5fb3a8009b25e23"
50804
50804
  }
50805
50805
  },
50806
50806
  sqlite: {