From 49108e21d8b08e2bd2ba85d5a8a4d31dfab544eb Mon Sep 17 00:00:00 2001 From: nazeh Date: Thu, 13 Feb 2025 20:57:00 +0300 Subject: [PATCH] chore(js): publish @synonymdev/pubky@0.4.0 --- pubky/pkg/README.md | 10 ++++------ pubky/pkg/package.json | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/pubky/pkg/README.md b/pubky/pkg/README.md index a32438d..5a61a04 100644 --- a/pubky/pkg/README.md +++ b/pubky/pkg/README.md @@ -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); diff --git a/pubky/pkg/package.json b/pubky/pkg/package.json index d29d46a..6e035cb 100644 --- a/pubky/pkg/package.json +++ b/pubky/pkg/package.json @@ -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",