nostr-tools 1.3.1 → 1.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.
@@ -1,7 +1,9 @@
1
1
  name: test every commit
2
2
  on:
3
- - push
4
- - pull_request
3
+ push:
4
+ branches:
5
+ - master
6
+ pull_request:
5
7
 
6
8
  jobs:
7
9
  test:
package/README.md CHANGED
@@ -128,7 +128,7 @@ import 'websocket-polyfill'
128
128
  ### Interacting with multiple relays
129
129
 
130
130
  ```js
131
- import {pool} from 'nostr-tools'
131
+ import {SimplePool} from 'nostr-tools'
132
132
 
133
133
  const pool = new SimplePool()
134
134
 
@@ -158,6 +158,11 @@ let events = await pool.list(relays, [{kinds: [0, 1]}])
158
158
  let event = await pool.get(relays, {
159
159
  ids: ['44e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245']
160
160
  })
161
+
162
+ let relaysForEvent = pool.seenOn(
163
+ '44e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245'
164
+ )
165
+ // relaysForEvent will be an array of URLs from relays a given event was seen on
161
166
  ```
162
167
 
163
168
  ### Querying profile data from a NIP-05 address
@@ -288,6 +293,11 @@ Please consult the tests or [the source code](https://github.com/fiatjaf/nostr-t
288
293
  </script>
289
294
  ```
290
295
 
296
+ ## Plumbing
297
+
298
+ 1. Install [`just`](https://just.systems/)
299
+ 2. `just -l`
300
+
291
301
  ## License
292
302
 
293
303
  Public domain.
package/justfile CHANGED
@@ -11,3 +11,6 @@ test: build
11
11
 
12
12
  testOnly file: build
13
13
  jest {{file}}
14
+
15
+ publish: build
16
+ npm publish