@synonymdev/pubky 0.1.10 → 0.1.12

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
@@ -14,6 +14,10 @@ JavaScript implementation of [Pubky](https://github.com/pubky/pubky).
14
14
  npm install @synonymdev/pubky
15
15
  ```
16
16
 
17
+ ### Prerequisites
18
+
19
+ For Nodejs, you need Node v20 or later.
20
+
17
21
  ## Getting started
18
22
 
19
23
  ```js
@@ -110,10 +114,20 @@ let response = await client.get(url)
110
114
  ### delete
111
115
 
112
116
  ```js
113
- let response = await delete(url);
117
+ let response = await client.delete(url);
114
118
  ```
115
119
  - url: A string representing the Pubky URL.
116
120
 
121
+ ### list
122
+ ```js
123
+ let response = await client.list(url, cursor, reverse, limit)
124
+ ```
125
+ - url: A string representing the Pubky URL. The path in that url is the prefix that you want to list files within.
126
+ - cursor: Usually the last URL from previous calls. List urls after/before (depending on `reverse`) the cursor.
127
+ - reverse: Whether or not return urls in reverse order.
128
+ - limit: Number of urls to return.
129
+ - Returns: A list of URLs of the files in the `url` you passed.
130
+
117
131
  ### Keypair
118
132
 
119
133
  #### random
@@ -186,5 +200,5 @@ Use the logged addresses as inputs to `PubkyClient`
186
200
  ```js
187
201
  import { PubkyClient } from '../index.js'
188
202
 
189
- const client = new PubkyClient().testnet();
203
+ const client = PubkyClient().testnet();
190
204
  ```