Commit Graph

679 Commits

Author SHA1 Message Date
Egge 633696bf46 nip06: return Uint8 instead of string 2024-10-20 10:53:08 -03:00
ciegovolador bf975c9a87 fix(nip59) formated code 2024-10-18 07:20:37 -03:00
fiatjaf 7aa4f09769 tag v2.8.1 2024-10-17 21:57:38 -03:00
Egge f646fcd889 export nip59 2024-10-17 21:51:03 -03:00
ciegovolador 1d89038375
add nip59 (#438)
* feat(nip59) add nip59 based on https://nips.nostr.com/59

* fix(nip59) export the code as nip59

* Update nip59.ts

Co-authored-by: Asai Toshiya <to.asai.60@gmail.com>

* fix(nip59) change GiftWrap kind and using kinds from kinds.ts

---------

Co-authored-by: Asai Toshiya <to.asai.60@gmail.com>
2024-10-17 09:38:04 -03:00
Callum Macdonald 0b5b35714c Add subscription id to `relay.subscribe()`.
fix #439
2024-10-17 09:30:49 -03:00
Vinit e398617fdc chore: use describe block to group NostrTypeGuard tests
this way we don't need to repeat NostrTypeGuard in each tests description
2024-10-11 07:48:46 -03:00
Vinit 1b236faa7b fix: move NostrTypeGuard tests to nip19.test.ts
NostrTypeGuard was moved to nip19.ts in commit 45b25c5bf5
but tests stayed in core.test.ts and started failing because it still imported
NostrTypeGuard from core.ts - which wasn't there.
2024-10-11 07:48:46 -03:00
Asai Toshiya 7064e0b828 make it possible to track relays on publish. 2024-10-10 14:45:37 -03:00
space-shell 4f6976f6f8
fix nip44Decrypt sending "nip44_encrypt" request (#435)
nip44Decrypt sends nip44_decrypt request
2024-09-24 12:56:36 -03:00
António Conselheiro a61cde77ea
Kinds from nip17 nip59 (#434) 2024-09-20 17:05:52 -03:00
fiatjaf 23d95acb26 move Nip05 type to nip05.ts 2024-09-09 14:23:03 -03:00
fiatjaf 13ac04b8f8 nip19: fix ncryptsec type guard.
see https://github.com/nbd-wtf/nostr-tools/pull/409#issuecomment-2338661000
2024-09-09 14:21:29 -03:00
fiatjaf 45b25c5bf5 nip19/nip49: remove nrelay and move bech32 string guard methods from core to nip19. 2024-09-09 14:20:35 -03:00
António Conselheiro ee76d69b4b
including nostr specialized types (#409)
* including nostr types

* including tests for nostr type guard

* fix tests for nostr type guard

* fix linter and add eslint and prettier to devcontainer

* including null in nostr type guard signature

* fix type, ops

* including ncryptsec in nostr type guard

* fix linter for ncryptsec

* including ncryptsec return type for nip49

* fixing names of nostr types and types guards

* fixing names of nostr types and types guards in unit tests descriptions

* fix prettier

* including type guard for nip5
2024-09-09 14:16:23 -03:00
Vinit 21433049b8 fix: eslint no-unused vars violations and setup
@typescript-eslint documents recommends turning off the base
unused-vars rule in eslint explicitly and using '@typescript-eslint/no-unused var'
instead. In this case, the base rule failed to correctly report enums. (reported
unused even though they were used).

Also, fixed two unused variables by adding ignore pattern '_'.
2024-09-06 19:45:50 -03:00
Asai Toshiya e8ff68f0b3 Update README.md 2024-08-15 11:29:18 -03:00
fiatjaf 1b77d6e080 mention nostrify.dev on readme. 2024-08-08 12:13:41 -03:00
Sam Samskies 76d3a91600 authorization should not be in the form data 2024-08-08 12:00:58 -03:00
Sepehr Safari 6f334f31a7 add and improve helpers for nip29 2024-08-01 18:18:13 -03:00
Alex Gleason 9c009ac543 getFilterLimit: handle parameterized replaceable events 2024-07-20 22:00:28 -03:00
Shusui MOYATANI a87099fa5c remove Content-Type header from NIP-96 uploadFile 2024-07-20 09:44:45 -03:00
António Conselheiro 475a22a95f
methods for abstract pool (#419)
* include method to list current pool relays connections and to close all connections

* fix prettier
2024-07-18 13:33:29 -03:00
fiatjaf 54e352d8e2 tag v2.7.1 2024-07-09 07:59:04 -03:00
António Conselheiro 235a1c50cb making AbstractSimplesPool more extendable 2024-07-08 23:49:46 -03:00
António Conselheiro dfc2107569 fix typo and include missing attributes for nip11 and they docs 2024-07-07 21:14:52 -03:00
Shusui MOYATANI 986b9d0cce support fallback tag in NIP-94 2024-07-04 15:07:37 -03:00
fiatjaf 753ff323ea specify websocket error as close reason when no message is available.
fixes https://github.com/nbd-wtf/nostr-tools/issues/411
2024-06-06 15:32:27 -03:00
Alex Gleason f8c3e20f3d getFilterLimit: empty tags return 0 2024-05-30 16:32:55 -03:00
fiatjaf 87a91c2daf fix useWebSocketImplementation so it works with pool on nodejs esm. 2024-05-29 13:39:00 -03:00
Anderson Juhasc 4f1dc9ef1c fixing formatting with Prettier 2024-05-27 10:44:44 -03:00
Anderson Juhasc faa1a9d556 adding nip06 examples to the README 2024-05-27 10:44:44 -03:00
Anderson Juhasc 97d838f254 white spaces removed 2024-05-27 10:44:44 -03:00
Don 260400b24d fix typo in nip07.ts 2024-05-27 10:42:35 -03:00
fiatjaf 6e5ab34a54 tag v2.6.0 2024-05-26 12:04:48 -03:00
fiatjaf 9562c408b3 never import anything from index.ts in submodules. 2024-05-26 12:04:48 -03:00
fiatjaf 4f4de458e9 rename Nip07 to WindowNostr. 2024-05-26 12:00:42 -03:00
António Conselheiro 88454de628
including interface for nip07 (#403)
* including interface for nip07

* fix types for NIP-07

* including NIP-07 export to jsr

* fix readme about nip07

* including in nip7 interface an output signature compatible with the event returned by the signer
2024-05-26 11:58:12 -03:00
Anderson Juhasc 9f5984d78d added functions accountFromSeedWords, extendedKeysFromSeedWords and accountFromExtendedKey to nip06 2024-05-26 08:21:07 -03:00
António Conselheiro 80df21d47f reviewing just installation in devcontainer 2024-05-25 07:28:49 -03:00
António Conselheiro 296e99d2a4 config devcontainer 2024-05-25 07:28:49 -03:00
fiatjaf 1cd9847ad5 filter: fix tests (remove prefix tests). 2024-05-19 14:58:38 -03:00
fiatjaf fa31fdca78 nip46: try to decrypt with nip44 if nip04 fails. 2024-05-19 14:51:39 -03:00
fiatjaf 5876acd67a nip44: make the api less classy. 2024-05-19 14:40:23 -03:00
fiatjaf 44efd49bc0 filter: stop matching against id and pubkey prefixes. 2024-05-19 14:26:42 -03:00
fiatjaf f4f9bece6e tag v2.5.2 2024-05-02 11:38:20 -03:00
hzrd149 e217f751da fix count request in anstract relay 2024-05-02 11:37:50 -03:00
fiatjaf d0ae8b36a2 tag v2.5.1 2024-04-24 17:47:45 -03:00
fiatjaf fd945757be accept localSecretKey as a parameter on nip46.createAccount()
fixes https://github.com/nbd-wtf/nostr-tools/issues/401
2024-04-24 10:12:33 -03:00
Daniele Tonon c12ddd3c53 Add hyphen to BUNKER_REGEX 2024-04-20 16:16:13 -03:00