@synonymdev/pubky 0.16.0 → 0.16.2
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 +14 -0
- package/index.cjs +73 -47
- package/index.js +74 -48
- package/package.json +1 -1
- package/pubky.d.ts +21 -5
- package/pubky_bg.wasm +0 -0
package/package.json
CHANGED
package/pubky.d.ts
CHANGED
|
@@ -2051,8 +2051,10 @@ export class SessionStorage {
|
|
|
2051
2051
|
* @param {Uint8Array} body
|
|
2052
2052
|
* @returns {Promise<void>}
|
|
2053
2053
|
* @throws {PubkyError} A lock that has expired or was unlocked rejects with
|
|
2054
|
-
* `RequestError` and status `412`; take a new one and read the file again.
|
|
2055
|
-
*
|
|
2054
|
+
* `RequestError` and status `412`; take a new one and read the file again. A file
|
|
2055
|
+
* that changed since the write was prepared rejects with status `409`, which can
|
|
2056
|
+
* happen when an earlier change the storage backend ran late lands first; read it
|
|
2057
|
+
* again and retry. Otherwise as {@link SessionStorage.putBytes}.
|
|
2056
2058
|
*/
|
|
2057
2059
|
putBytesLocked(lock: StorageLock, body: Uint8Array): Promise<void>;
|
|
2058
2060
|
/**
|
|
@@ -2081,8 +2083,10 @@ export class SessionStorage {
|
|
|
2081
2083
|
* @param {string} body
|
|
2082
2084
|
* @returns {Promise<void>}
|
|
2083
2085
|
* @throws {PubkyError} A lock that has expired or was unlocked rejects with
|
|
2084
|
-
* `RequestError` and status `412`; take a new one and read the file again.
|
|
2085
|
-
*
|
|
2086
|
+
* `RequestError` and status `412`; take a new one and read the file again. A file
|
|
2087
|
+
* that changed since the write was prepared rejects with status `409`, which can
|
|
2088
|
+
* happen when an earlier change the storage backend ran late lands first; read it
|
|
2089
|
+
* again and retry. Otherwise as {@link SessionStorage.putText}.
|
|
2086
2090
|
*/
|
|
2087
2091
|
putTextLocked(lock: StorageLock, body: string): Promise<void>;
|
|
2088
2092
|
/**
|
|
@@ -2143,9 +2147,21 @@ export class Signer {
|
|
|
2143
2147
|
free(): void;
|
|
2144
2148
|
[Symbol.dispose](): void;
|
|
2145
2149
|
/**
|
|
2146
|
-
* Approve a `pubkyauth://` request URL
|
|
2150
|
+
* Approve all capabilities in a `pubkyauth://` auth request URL.
|
|
2147
2151
|
*/
|
|
2148
2152
|
approveAuthRequest(pubkyauth_url: string): Promise<void>;
|
|
2153
|
+
/**
|
|
2154
|
+
* Approve selected capabilities in a `pubkyauth://` auth request URL.
|
|
2155
|
+
*
|
|
2156
|
+
* Scopes and actions must be covered by the request. An empty string
|
|
2157
|
+
* approves no capabilities. V1 grants deliver keys only for approved `e`
|
|
2158
|
+
* scopes. Supports grant and legacy signin/signup requests.
|
|
2159
|
+
* Invalid capabilities or approvals exceeding the request fail before POST.
|
|
2160
|
+
*
|
|
2161
|
+
* @example
|
|
2162
|
+
* await signer.approveAuthWithCapabilities(authUrl, "/pub/example.app/:r");
|
|
2163
|
+
*/
|
|
2164
|
+
approveAuthWithCapabilities(pubkyauth_url: string, approved_capabilities: string): Promise<void>;
|
|
2149
2165
|
/**
|
|
2150
2166
|
* Create a signer from a `Keypair` (prefer `pubky.signer(kp)`).
|
|
2151
2167
|
*
|
package/pubky_bg.wasm
CHANGED
|
Binary file
|