chore(js): publish @synonymdev/pubky@0.4.0

This commit is contained in:
nazeh
2025-02-13 20:57:00 +03:00
parent f1d4125d29
commit 49108e21d8
2 changed files with 5 additions and 7 deletions

View File

@@ -103,11 +103,13 @@ await client.signout(publicKey)
#### authRequest
```js
let [pubkyauthUrl, sessionPromise] = client.authRequest(relay, capabilities);
let pubkyAuthRequest = client.authRequest(relay, capabilities);
let pubkyauthUrl= pubkyAuthRequest.url();
showQr(pubkyauthUrl);
let pubky = await sessionPromise;
let pubky = await pubkyAuthRequest.response();
```
Sign in to a user's Homeserver, without access to their [Keypair](#keypair), nor even [PublicKey](#publickey),
@@ -116,10 +118,6 @@ instead request permissions (showing the user pubkyauthUrl), and await a Session
- relay: A URL to an [HTTP relay](https://httprelay.io/features/link/) endpoint.
- capabilities: A list of capabilities required for the app for example `/pub/pubky.app/:rw,/pub/example.com/:r`.
Returns:
- pubkyauthUrl: A url to show to the user to scan or paste into an Authenticator app holding the user [Keypair](#keypair)
- sessionPromise: A promise that resolves into a [PublicKey](#publickey) on success, which you can use in `client.session(pubky)` to resolve more information about the Session.
#### sendAuthToken
```js
await client.sendAuthToken(keypair, pubkyauthUrl);

View File

@@ -2,7 +2,7 @@
"name": "@synonymdev/pubky",
"type": "module",
"description": "Pubky client",
"version": "0.4.0-rc.4",
"version": "0.4.0",
"license": "MIT",
"repository": {
"type": "git",