@sovereignfs/sdk 2.0.0 → 2.0.1

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 (2) hide show
  1. package/README.md +13 -7
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,11 +1,16 @@
1
1
  # @sovereignfs/sdk
2
2
 
3
- How a JavaScript app's **server** talks to the Sovereign server it signs people in with. It wraps the generated
4
- [`@sovereignfs/api-client`](../api-client) with what is tedious to do by hand: tokens, failure, and version support. What it
5
- promises is in [`docs/specs/sdk.md`](../../docs/specs/sdk.md); the contract it never goes beyond is
6
- [`spec/core-api/openapi.yaml`](../../spec/core-api/openapi.yaml).
3
+ How a JavaScript app's **server** talks to the Sovereign server it signs people in with. It wraps a client generated from core's
4
+ API contract (bundled in, so there is nothing else to install) with what is tedious to do by hand: tokens, failure, and version
5
+ support. What it promises is in [`docs/specs/sdk.md`](https://github.com/sovereignfs/sovereign/blob/main/docs/specs/sdk.md); the
6
+ contract it never goes beyond is
7
+ [`spec/core-api/openapi.yaml`](https://github.com/sovereignfs/sovereign/blob/main/spec/core-api/openapi.yaml).
8
+
9
+ ```sh
10
+ npm install @sovereignfs/sdk
11
+ ```
7
12
 
8
- > Not published yet.
13
+ It runs on Node 22.3 or later, and on any server runtime that has `fetch` and Web Crypto.
9
14
 
10
15
  ```ts
11
16
  import { createSovereign } from '@sovereignfs/sdk';
@@ -80,12 +85,13 @@ const notice = await core.logoutToken({ sub: 'u1' }, { wrong: 'expired' });
80
85
 
81
86
  This release supports core `>=0.46.0` (`sovereign.core` in `package.json`). A core too old to say what it serves is treated as
82
87
  serving the Directory and the instance document, and nothing else. The guide for an app's developer is
83
- [Using the SDK](../../docs/using-the-sdk.md).
88
+ [Using the SDK](https://github.com/sovereignfs/sovereign/blob/main/docs/using-the-sdk.md).
84
89
 
85
90
  ## Which exports are stable
86
91
 
87
92
  `createSovereign` and the error types are **stable** and change only in a major version; everything else is **experimental** and may
88
- change in a minor version ([`src/stability.ts`](src/stability.ts) lists both).
93
+ change in a minor version
94
+ ([`src/stability.ts`](https://github.com/sovereignfs/sovereign/blob/main/packages/sdk/src/stability.ts) lists both).
89
95
 
90
96
  ## Versions
91
97
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sovereignfs/sdk",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "type": "module",
5
5
  "description": "How a JavaScript app's server talks to the Sovereign server it signs people in with: tokens, failure, version support.",
6
6
  "license": "MPL-2.0",