mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-09 16:48:50 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f992c9c967 | ||
|
|
dbf625d6ac | ||
|
|
8622bd11dd | ||
|
|
0970eee70f |
6
justfile
6
justfile
@@ -4,6 +4,7 @@ install-dependencies:
|
|||||||
yarn --ignore-engines
|
yarn --ignore-engines
|
||||||
|
|
||||||
build:
|
build:
|
||||||
|
rm -rf lib
|
||||||
node build.js
|
node build.js
|
||||||
|
|
||||||
test: build
|
test: build
|
||||||
@@ -13,10 +14,9 @@ test-only file: build
|
|||||||
jest {{file}}
|
jest {{file}}
|
||||||
|
|
||||||
emit-types:
|
emit-types:
|
||||||
tsc
|
tsc # see tsconfig.json
|
||||||
|
|
||||||
publish: build
|
publish: build emit-types
|
||||||
emit-types
|
|
||||||
npm publish
|
npm publish
|
||||||
|
|
||||||
format:
|
format:
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ test('encode and decode naddr', () => {
|
|||||||
identifier: 'banana'
|
identifier: 'banana'
|
||||||
})
|
})
|
||||||
expect(naddr).toMatch(/naddr1\w+/)
|
expect(naddr).toMatch(/naddr1\w+/)
|
||||||
console.log(naddr)
|
|
||||||
let {type, data} = nip19.decode(naddr)
|
let {type, data} = nip19.decode(naddr)
|
||||||
expect(type).toEqual('naddr')
|
expect(type).toEqual('naddr')
|
||||||
expect(data.pubkey).toEqual(pk)
|
expect(data.pubkey).toEqual(pk)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nostr-tools",
|
"name": "nostr-tools",
|
||||||
"version": "1.7.2",
|
"version": "1.7.4",
|
||||||
"description": "Tools for making a Nostr client.",
|
"description": "Tools for making a Nostr client.",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@@ -12,17 +12,17 @@ const {
|
|||||||
let pool = new SimplePool()
|
let pool = new SimplePool()
|
||||||
|
|
||||||
let relays = [
|
let relays = [
|
||||||
'wss://nostr-dev.wellorder.net/',
|
'wss://relay.damus.io/',
|
||||||
'wss://relay.nostr.bg/',
|
'wss://relay.nostr.bg/',
|
||||||
'wss://nostr.fmt.wiz.biz/',
|
'wss://nostr.fmt.wiz.biz/',
|
||||||
'wss://relay.nostr.band/',
|
'wss://relay.nostr.band/',
|
||||||
'wss://nostr.zebedee.cloud/'
|
'wss://nos.lol/'
|
||||||
]
|
]
|
||||||
|
|
||||||
afterAll(() => {
|
afterAll(() => {
|
||||||
pool.close([
|
pool.close([
|
||||||
...relays,
|
...relays,
|
||||||
'wss://nostr-relay.untethr.me',
|
'wss://nostr.wine',
|
||||||
'wss://offchain.pub',
|
'wss://offchain.pub',
|
||||||
'wss://eden.nostr.land'
|
'wss://eden.nostr.land'
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const {
|
|||||||
signEvent
|
signEvent
|
||||||
} = require('./lib/nostr.cjs')
|
} = require('./lib/nostr.cjs')
|
||||||
|
|
||||||
let relay = relayInit('wss://nostr-dev.wellorder.net/')
|
let relay = relayInit('wss://relay.damus.io/')
|
||||||
|
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
relay.connect()
|
relay.connect()
|
||||||
|
|||||||
Reference in New Issue
Block a user