@synonymdev/pubky 0.4.0-rc2 → 0.4.0

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 CHANGED
@@ -103,11 +103,13 @@ await client.signout(publicKey)
103
103
 
104
104
  #### authRequest
105
105
  ```js
106
- let [pubkyauthUrl, sessionPromise] = client.authRequest(relay, capabilities);
106
+ let pubkyAuthRequest = client.authRequest(relay, capabilities);
107
+
108
+ let pubkyauthUrl= pubkyAuthRequest.url();
107
109
 
108
110
  showQr(pubkyauthUrl);
109
111
 
110
- let pubky = await sessionPromise;
112
+ let pubky = await pubkyAuthRequest.response();
111
113
  ```
112
114
 
113
115
  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
116
118
  - relay: A URL to an [HTTP relay](https://httprelay.io/features/link/) endpoint.
117
119
  - capabilities: A list of capabilities required for the app for example `/pub/pubky.app/:rw,/pub/example.com/:r`.
118
120
 
119
- Returns:
120
- - pubkyauthUrl: A url to show to the user to scan or paste into an Authenticator app holding the user [Keypair](#keypair)
121
- - 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.
122
-
123
121
  #### sendAuthToken
124
122
  ```js
125
123
  await client.sendAuthToken(keypair, pubkyauthUrl);