Commit Graph

759 Commits

Author SHA1 Message Date
Egge bbb09420fe export nip17 2024-11-26 11:59:58 -03:00
Asai Toshiya 2e85f7a5fe Revert "nip19: remove note1."
This reverts commit a8a805fb71.
2024-11-26 11:59:58 -03:00
Asai Toshiya b22e2465cc nip19: remove note1. 2024-11-26 11:59:58 -03:00
fiatjaf 43ce7f9377 fix reference to nostr-wasm dependency so it can be installed on deno.
fixes https://github.com/nbd-wtf/nostr-tools/issues/459
2024-11-25 21:33:25 -03:00
fiatjaf 5a55c670fb nip10: fix. 2024-11-13 01:21:54 -03:00
fiatjaf bf0c4d4988 nip10: improve, support quotes, author hints, change the way legacy refs are discovered. 2024-11-04 15:37:39 -03:00
fiatjaf 50fe7c2a8b streamline jsr publishes. 2024-11-02 08:35:52 -03:00
fiatjaf 29270c8c9d nip46: fix legacyDecrypt argument. 2024-11-02 08:13:33 -03:00
fiatjaf cb29d62033 add links to jsr.io 2024-10-31 16:33:24 -03:00
Asai Toshiya 0d237405d9
fix lint error. 2024-10-31 20:43:03 +09:00
Asai Toshiya 659ad36b62 nip05: use stub to test queryProfile(). 2024-10-31 07:51:53 -03:00
Asai Toshiya d062ab8afd make publish() timeout. 2024-10-30 11:55:04 -03:00
Fishcake 94f841f347 Fix fetch to work in the edge and node environments, cleanup type issues
- Fix "TypeError: Invalid redirect value, must be one of "follow" or "manual" ("error" won't be implemented since it does not make sense at the edge; use "manual" and check the response status code)." that is thrown when trying to use fetch in the edge environment  (e.g., workers)
- Cleanup types and variable definitions.
2024-10-28 14:56:10 -03:00
fiatjaf c1d03cf00b nip46: only encrypt with nip44 (breaking). 2024-10-27 14:59:27 -03:00
fiatjaf 29ecdfc5ec fix slow types so we can publish to jsr.io 2024-10-26 14:23:28 -03:00
fiatjaf d3fc4734b4 export missing modules. 2024-10-26 13:10:26 -03:00
fiatjaf 66d0b8a4e1 nip46: export queryBunkerProfile() 2024-10-26 07:24:13 -03:00
fiatjaf e2ec7a4b55 fix types, imports and other stuff on nip17 and nip59. 2024-10-25 22:10:05 -03:00
fiatjaf a72e47135a nip46: we have no business checking the pubkey of the sign_event result. 2024-10-25 21:58:03 -03:00
Anderson Juhasc de7bbfc6a2 organizing and improving nip17 and nip59 2024-10-25 11:49:28 -03:00
fiatjaf f2d421fa4f nip46: remove "nip44_get_key" method as it was removed from the spec. 2024-10-25 10:22:21 -03:00
Anderson Juhasc cae06fc4fe
Implemented NIP-17 support (#449) 2024-10-24 21:10:09 -03:00
fiatjaf 5c538efa38 nip28: fix naming bug. 2024-10-23 17:11:35 -03:00
fiatjaf 013daae91b nip05: fix test. 2024-10-23 17:09:56 -03:00
fiatjaf 75660e7ff1 nip46: cache the received pubkey. 2024-10-23 17:09:41 -03:00
fiatjaf 4c2d2b5ce6 nip46: fix getPublicKey() by making it actually call "get_public_key". 2024-10-23 16:38:14 -03:00
António Conselheiro aba266b8e6
Suggestion: export kinds as named types (#447)
* including kinds for nip17 and nip59

* including kinds as types

* solving linter with prettier
2024-10-23 10:39:39 -03:00
Asai Toshiya d7dcc75ebe nip19: completely remove nrelay. 2024-10-22 13:06:34 -03:00
fiatjaf b18510b460 nip13: speed improvements. 2024-10-22 13:03:29 -03:00
Egge b04e0d16c0 test: fixed nip06 assertion 2024-10-20 10:53:08 -03:00
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