@drakkar.software/starfish-client 3.0.0-alpha.1 → 3.0.0-alpha.4
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/bindings/zustand.js +44 -3
- package/dist/bindings/zustand.js.map +2 -2
- package/dist/client.d.ts +20 -0
- package/dist/config.d.ts +2 -2
- package/dist/index.js +44 -3
- package/dist/index.js.map +2 -2
- package/dist/types.d.ts +9 -1
- package/package.json +2 -2
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CapCert } from "@drakkar.software/starfish-protocol";
|
|
1
|
+
import type { Alg, CapCert } from "@drakkar.software/starfish-protocol";
|
|
2
2
|
/** Push conflict error (HTTP 409). */
|
|
3
3
|
export declare class ConflictError extends Error {
|
|
4
4
|
constructor();
|
|
@@ -29,11 +29,19 @@ export interface StarfishCapProvider {
|
|
|
29
29
|
* The client then sends it as `X-Starfish-Pub` so the server can verify the
|
|
30
30
|
* request signature against it and check the cap's `aud` allow-list. Omit
|
|
31
31
|
* `pubHex` for device/member caps (the server uses `cap.sub`).
|
|
32
|
+
*
|
|
33
|
+
* `presenterAlg` is the crypto suite of `devEdPrivHex` (the key that signs
|
|
34
|
+
* the request). It matters only for `audience` caps, where the presenter is
|
|
35
|
+
* an arbitrary redeemer whose suite is unrelated to the cap's `issAlg`; the
|
|
36
|
+
* client sends it as `X-Starfish-Alg`. For device/member caps the subject's
|
|
37
|
+
* suite is taken authoritatively from the verified cert, so this is ignored.
|
|
38
|
+
* Defaults to `"ed25519"` when omitted.
|
|
32
39
|
*/
|
|
33
40
|
getCap(): Promise<{
|
|
34
41
|
cap: CapCert;
|
|
35
42
|
devEdPrivHex: string;
|
|
36
43
|
pubHex?: string;
|
|
44
|
+
presenterAlg?: Alg;
|
|
37
45
|
}>;
|
|
38
46
|
}
|
|
39
47
|
/** Options for creating a StarfishClient. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drakkar.software/starfish-client",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.4",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/Drakkar-Software/starfish.git",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@drakkar.software/starfish-protocol": "3.0.0-alpha.
|
|
63
|
+
"@drakkar.software/starfish-protocol": "3.0.0-alpha.4"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@legendapp/state": "^2.0.0",
|