Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nip 55 #1

Merged
merged 847 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
847 commits
Select commit Hold shift + click to select a range
651823a
delete events from cache
pablof7z Mar 25, 2024
7a4ae01
Add delete to eventcarddropdownmenu
pablof7z Mar 25, 2024
6c2eff1
URL normalization
pablof7z Mar 25, 2024
c2db3c1
Support blocked relays
pablof7z Mar 25, 2024
0996abc
format
pablof7z Mar 25, 2024
61dee30
Minor debugging changes
pablof7z Mar 25, 2024
ad50b15
Emit from pool when connecting
pablof7z Mar 25, 2024
28c4894
Foramt
pablof7z Mar 25, 2024
3a7a3e7
Debugging
pablof7z Mar 25, 2024
f637393
Refactor OutboxTracker to handle tracking users in batches
pablof7z Mar 25, 2024
fd79939
Refactor follows function to use fetchEvent instead of fetchEvents
pablof7z Mar 25, 2024
d7c53ca
format
pablof7z Mar 25, 2024
6196d35
Fetch relay lists for users from 10002 and 3 in parallel
pablof7z Mar 25, 2024
28af87c
Make outbox calculation great again
pablof7z Mar 25, 2024
92dfac8
Merge branch 'master' into m
pablof7z Mar 25, 2024
bc9cc05
move md files
pablof7z Mar 25, 2024
393466d
use r tags because "lets index absolutely everything just in case"
pablof7z Mar 25, 2024
f1d4d11
correct import
pablof7z Mar 25, 2024
6d92481
add utxo's notepress reference
pablof7z Mar 28, 2024
4f5caa2
picture before image (#178)
gzuuus Apr 1, 2024
1fdc617
Move event validation and signature verification in-house (#200)
erskingardner Apr 1, 2024
fa9f02f
Aggregate, cache, deduplicate NIP-05 queries and Zap settings queries…
pablof7z Apr 4, 2024
68c3fb2
improve markdown rendering
pablof7z Apr 4, 2024
d9c0600
Cache NIP-05 and zap specs
pablof7z Apr 4, 2024
6134c29
format, fix tests, generate docs, version bump
pablof7z Apr 4, 2024
5303d80
fix bad release
pablof7z Apr 4, 2024
3176847
NIP46: Fixed wrong parsing of rpc response when requesting decryption…
Pleb5 Apr 5, 2024
5114dd0
Remove hexpubkey references everywhere (#199)
erskingardner Apr 5, 2024
5822532
Improve hashtag regex (#201)
verbiricha Apr 5, 2024
d59f0f2
remove console.logs
pablof7z Apr 5, 2024
949d26a
Add LRU cache for zappers
pablof7z Apr 7, 2024
1b4ff06
unused import (#205)
gsovereignty Apr 7, 2024
92389a5
add created_at to NDKUserProfile (#204)
arkin0x Apr 7, 2024
a857b85
fix url conversion issue
pablof7z Apr 7, 2024
6fd9ddc
threading utility functions
pablof7z Apr 9, 2024
5a25db5
increase LRU cache size of outbox tracker
pablof7z Apr 9, 2024
ba2a206
improve LRU caches
pablof7z Apr 9, 2024
28f4198
Remove duplicate method calls (#212)
erskingardner Apr 10, 2024
d92ad5e
Update package manager and add engines (#211)
erskingardner Apr 10, 2024
735beda
Update nostr-tools on ndk-cache-dexie and fix types (#209)
erskingardner Apr 10, 2024
af4294b
Squashed commit of the following:
pablof7z Apr 10, 2024
03e1b9f
Squashed commit of the following:
pablof7z Apr 10, 2024
a805f1d
update pnpm-lock
pablof7z Apr 10, 2024
ed7cdc4
avoid verifying signatures of cached events
pablof7z Apr 10, 2024
91d873c
allow offloading signature verification to an async web worker
pablof7z Apr 11, 2024
fcd41ba
fix bug where we are REQing events even if they were cached and the f…
pablof7z Apr 15, 2024
0b8f331
fix unfollow function
pablof7z Apr 15, 2024
f2898ad
handle more reply cases
pablof7z Apr 15, 2024
27b10cc
correct timestamp of bad events
pablof7z Apr 15, 2024
1e854f7
better event content rendering and mentions
pablof7z Apr 15, 2024
a602d0c
cache events on an LRU too
pablof7z Apr 15, 2024
2b7d836
fix nip46 login with nip05 (#214)
sepehr-safari Apr 16, 2024
89b5b3f
nip46 fixes on create_account
pablof7z Apr 16, 2024
6814f0c
fix event fetching from tag when there is no relay hint
pablof7z Apr 16, 2024
7e50e4b
Incease performance of signature verification
pablof7z Apr 16, 2024
9b92cd9
fix incorrect tagging when quoting an event
pablof7z Apr 17, 2024
4423d3d
allow clicking on mentions
pablof7z Apr 17, 2024
b525f39
keep event tags in LRU cache too
pablof7z Apr 19, 2024
a77aa5d
fix broken subscription unref
pablof7z Apr 19, 2024
026090f
attempt to load 10002 from cache first
pablof7z Apr 19, 2024
321fbc4
optimize serialization and avoid grouping subscriptions that will not…
pablof7z Apr 19, 2024
a00658e
allow forcing a tag (for q tagging)
pablof7z Apr 19, 2024
717271c
truncate npub by default
pablof7z Apr 19, 2024
033fce9
lay groundwork for ratioed signature validation
pablof7z Apr 19, 2024
69dbc4c
prioritize already-connected relays
pablof7z Apr 19, 2024
89cbe80
fix race condition when using synchronous cache
pablof7z Apr 19, 2024
fba73eb
improve outbox tracking
pablof7z Apr 19, 2024
0185897
bump
pablof7z Apr 19, 2024
9f5f717
fix for when using a pubkey with a secret
pablof7z Apr 19, 2024
e40312b
get all profiles that match a filter function from a cache
pablof7z Apr 23, 2024
7c1b652
support deprecated replies
pablof7z Apr 23, 2024
ecdcecd
bump
pablof7z Apr 23, 2024
44ab157
allow passing-in sanitizeHtml options
pablof7z Apr 24, 2024
7cd209e
Track events per relay when already seen (#218)
May 2, 2024
0af033f
allow scheduling more than one event
pablof7z May 13, 2024
8112e87
better support for empty d tag
pablof7z May 13, 2024
c1cbfaf
small thread handling improvements
pablof7z May 13, 2024
5b3fb49
allow changing which component is used to render embedded components
pablof7z May 13, 2024
a040a2e
naive changes to how events are interpreted for signature
pablof7z May 13, 2024
f7c13ea
fix build
pablof7z May 13, 2024
0835d47
readd createFeedback
pablof7z May 13, 2024
dda2994
improve logic to avoid avoid duplicated relays
pablof7z May 14, 2024
a5c5a89
format & bump
pablof7z May 14, 2024
6db7f70
if reconnecting to a relay whose reconnection was delayed, don't reat…
pablof7z May 14, 2024
f5b79ae
lower case normalize
pablof7z May 14, 2024
c1a0f08
export normalize
pablof7z May 14, 2024
a054af3
Update nostr-tools on NDK & fix tests (#210)
erskingardner May 14, 2024
b6968c8
fix some tests
pablof7z May 17, 2024
94018b4
add convenience method to update replaceable event id,sig,created_at …
pablof7z May 23, 2024
548f4d8
add optimistic updates
pablof7z May 24, 2024
305d2d4
bump
pablof7z May 24, 2024
6f6ece1
render wiki entries as markdown
pablof7z May 24, 2024
c717bd1
wip
pablof7z May 24, 2024
3ad5885
Adds `devcontainer` (#170)
anon-dev-gh May 24, 2024
391bcac
feat: store profile event in NDKUserProfile (#229)
gzuuus May 27, 2024
1611f78
correct unfollow method logic and event tagging (#230)
vlazic May 28, 2024
db40d53
reduce debugging
pablof7z May 31, 2024
4d322b4
fixes NIP-42
pablof7z May 31, 2024
ac480f5
allow passing in subscription options for root/reply fetchers
pablof7z May 31, 2024
dc83de2
improve how EOSE is handled on NDK-svelte
pablof7z May 31, 2024
def06ef
control that we don't unnecessarily load more stuff into the LRU beyo…
pablof7z May 31, 2024
f2863dc
remove unused call
pablof7z May 31, 2024
c0f6ed1
bump
pablof7z May 31, 2024
947f5f3
fix bug that was causing groupable subscriptions not to be cleared pr…
pablof7z Jun 8, 2024
4ab2273
fix issue with failing to send over a closed connection
pablof7z Jun 8, 2024
74c0474
fix: only count missing EOSE from connected relays
pablof7z Jun 8, 2024
3029124
add methods to access and manage unpublished events from the cache
pablof7z Jun 10, 2024
db9c2b0
extract code to set active user and make fetching theri data more eff…
pablof7z Jun 10, 2024
7fea357
formatting noop
pablof7z Jun 10, 2024
ec83ddc
fix: close subscription on EOSE at the relay level
pablof7z Jun 10, 2024
8471d17
be more efficient at fetching uses' relay lists
pablof7z Jun 10, 2024
b872c93
remove unused code
pablof7z Jun 10, 2024
abb3cd9
add tests to ndk-cache-dexie
pablof7z Jun 20, 2024
eb452e3
move docs
pablof7z Jun 21, 2024
e65d7da
move docs
pablof7z Jun 21, 2024
5202414
change base
pablof7z Jun 21, 2024
785d5a1
update tests
pablof7z Jun 21, 2024
b4578a7
typedoc
pablof7z Jun 21, 2024
32ba493
typedoc
pablof7z Jun 21, 2024
df1c282
wip
pablof7z Jun 21, 2024
d45d4e1
improve typedoc
pablof7z Jun 21, 2024
ed80f68
lint
pablof7z Jun 21, 2024
b0179a6
api link
pablof7z Jun 21, 2024
75b0b93
subscription management
pablof7z Jun 21, 2024
18c55bb
optimize which relays are set on zap requests
pablof7z Jun 21, 2024
e8ad796
chore: Add onEvent callback to NDKSvelte subscription options
pablof7z Jun 24, 2024
4358df8
chore: Add event ID to unpublished event in NDKCacheAdapterDexie
pablof7z Jun 24, 2024
f76ab71
fix NIP-42 authentication
pablof7z Jun 24, 2024
e353c1c
improve url normalization and be more careful on connection management
pablof7z Jun 25, 2024
fad09fb
fix auth.md to renamed NDKAuthPolicies -> NDKRelayAuthPolicies (#243)
jeremyd Jun 26, 2024
6ae9d53
NDK Nostr Cache Adapter
pablof7z Jun 26, 2024
97bafc5
refactor outbox and be smarter abotu the relays we publish to (accoun…
pablof7z Jun 26, 2024
7699d49
add BUILD.md (closes: #244)
pablof7z Jun 27, 2024
26c7ee7
30818 component powered by svelte-asciidoc. (#247)
fiatjaf Jun 30, 2024
cbe10f7
filterForEventsTaggingId
pablof7z Jun 27, 2024
1ee9093
index event kinds and add byKinds filter
pablof7z Jul 1, 2024
251ae38
pnpm-lock
pablof7z Jul 1, 2024
0ae9071
ignoreDeadLinks
pablof7z Jul 1, 2024
2d90603
ignoreDeadLinks
pablof7z Jul 1, 2024
4dd675a
apply limit filter
pablof7z Jul 1, 2024
cdb656f
Squashed commit of the following:
pablof7z Aug 2, 2024
36ea99b
fix docs
pablof7z Aug 2, 2024
4bdda16
30818 component powered by svelte-asciidoc. (#257)
fiatjaf Aug 18, 2024
d017af1
update svelte-asciidoc. (#267)
fiatjaf Sep 11, 2024
86ede3c
Update README.md (#261)
JohnZolton Sep 11, 2024
1a7fb27
Add DM receive relay list to NDKKinds (#259)
erskingardner Sep 11, 2024
e30c052
fix bad state store
pablof7z Aug 19, 2024
eef9911
pnpm-lock
pablof7z Sep 24, 2024
4cd11cb
refactor a bunch ndk-wallet stuff
pablof7z Sep 24, 2024
c2da07d
remove a bunch of unneeded packages
pablof7z Sep 24, 2024
f8c4d9d
cap the number of relay hints we add
pablof7z Sep 24, 2024
98ca0f0
add NIP-78 interface
pablof7z Sep 24, 2024
a800a71
track at which timestamp we cached events
pablof7z Sep 24, 2024
d6cfa8a
properly handled abandoned subscriptions closing
pablof7z Sep 24, 2024
5ac3ce8
use urlFactory to generate URLs on rendering engine
pablof7z Sep 24, 2024
4de471f
package dependencies
pablof7z Sep 24, 2024
722345b
nip-44 support
pablof7z Sep 28, 2024
d2c323c
generate NIP-60 quote events and wip refactor of ndk-wallet's service
pablof7z Sep 29, 2024
543067b
upgrade cashu-ts
pablof7z Sep 30, 2024
8852717
format
pablof7z Sep 30, 2024
d3b2589
add wallet change events
pablof7z Oct 6, 2024
4156f33
bump version
pablof7z Oct 6, 2024
95beb5d
provide a way to skip receiving an optimistic publish callback
pablof7z Oct 21, 2024
4351ec4
provide a way to create nuts of specific denomincation(s)
pablof7z Oct 21, 2024
575a481
add lib
pablof7z Oct 26, 2024
0191977
Revert "add lib"
pablof7z Oct 26, 2024
8b97971
add lib
pablof7z Oct 26, 2024
1653cec
* Change markdown parser for a more modular approach that enables sve…
pablof7z Oct 26, 2024
9092542
release
pablof7z Oct 26, 2024
0a7e4d8
version
pablof7z Oct 26, 2024
2c1e9ad
add NDKWallet receiveToken
pablof7z Oct 28, 2024
e4f27c7
better history tagging
pablof7z Oct 28, 2024
1e0848e
default bunker == user pubkey
pablof7z Oct 27, 2024
e157e81
avoid doubling the number of tokens
pablof7z Oct 28, 2024
b866eed
add a convenient way to gather network traffic
pablof7z Oct 31, 2024
f5e4e47
improve filter fingerprint -- allow grouping when time constraints ha…
pablof7z Oct 31, 2024
93c484c
fix incorrect grouping of subscriptions with the same fingerprint
pablof7z Oct 31, 2024
5cd0179
be more tolerant with incorrect nip04 encryption
pablof7z Oct 31, 2024
56fafcd
if we run into duplicate proofs throughout the same or different toke…
pablof7z Oct 31, 2024
1b93f99
apply orphan tokens to the default wallet
pablof7z Oct 31, 2024
5bed70c
fix: authed relays weren't reported as connected on connectedRelays
pablof7z Oct 30, 2024
873ad4a
concatenate subscriptions that use a limit -- this is better than tre…
pablof7z Oct 31, 2024
f2a0cce
add netDebug direction
pablof7z Nov 2, 2024
6711fb5
nip46 fixes
pablof7z Nov 2, 2024
3f72989
document netDebug in the introduction
pablof7z Nov 2, 2024
2a34c43
lol
pablof7z Nov 2, 2024
5939a3e
fix: authed relays weren't reported as connected on connectedRelays
pablof7z Oct 30, 2024
7bddeff
skip by default, PRE that have been tagged as "deleted"
pablof7z Nov 12, 2024
09640b3
document how to check for unpublished events from the cache
pablof7z Nov 3, 2024
26e0d32
add kind:7373
pablof7z Nov 3, 2024
28b5246
correct types
pablof7z Nov 13, 2024
db0b637
fix (NDKRelayConnectivity) reconnection Issues (#280)
cuervoshi Nov 17, 2024
4dc980c
early return when encountering an empty-filter bug
pablof7z Nov 17, 2024
86da6a5
update closeOnEose example in readme (#264)
asoltys Nov 19, 2024
5f5c274
remove old directories
pablof7z Nov 19, 2024
a2bb478
add Olas as a reference
pablof7z Nov 19, 2024
fb3032d
commit initial version of ndk-mobile (#281)
pablof7z Nov 20, 2024
0fcdfa8
add default export
pablof7z Nov 21, 2024
e147bfd
remove lockfile
pablof7z Nov 21, 2024
86c2893
nasty way of fixing the dependency but turbo is getting in the way
pablof7z Nov 21, 2024
9d09304
format
pablof7z Nov 21, 2024
563b341
fixes
pablof7z Nov 21, 2024
53765fc
handle both nip04 and nip44 encryption
pablof7z Nov 22, 2024
5119a53
add kind 20 and 22
pablof7z Nov 22, 2024
1f1a50a
useNDKSessionEventKind
pablof7z Nov 22, 2024
79ff8f1
change build script so it works on windows (theres still people using…
pablof7z Nov 22, 2024
bed2f8d
nip46 fixes
pablof7z Nov 23, 2024
ed29a9d
add useNDKSessionEvents
pablof7z Nov 25, 2024
1301db9
add sync profile fetching from cache
pablof7z Nov 27, 2024
f2b307d
add useUserProfile hook
pablof7z Nov 27, 2024
d419fcc
add LRU cache for profiles
pablof7z Nov 27, 2024
6b3ea8b
add LRU cache for profiles
pablof7z Nov 27, 2024
c5390d4
add useUserProfile
pablof7z Nov 29, 2024
9127400
simplify client tag check
pablof7z Nov 29, 2024
28b9932
fix client tag
pablof7z Nov 30, 2024
901e603
fix bug where user profile information could be returned out of order…
pablof7z Dec 2, 2024
3118daa
include stringified reposted event when reposting, and k-tag non kind…
pablof7z Dec 2, 2024
86c5d4f
allow users to explicitly include muted pubkeys
pablof7z Dec 2, 2024
689305c
Squashed commit of the following:
pablof7z Nov 30, 2024
d12b136
change default encryption scheme to nip44
pablof7z Dec 4, 2024
36bdc2e
add validation to check if nip07 extension supports nip44
pablof7z Dec 4, 2024
d40ddd5
fix nip07 bad commit
pablof7z Dec 4, 2024
99c17f2
be more thorough finding the wallet that can unlock a nutzap
pablof7z Dec 5, 2024
ac43e25
track wallet stuff on the session
pablof7z Dec 5, 2024
0bad661
delete events from cache when we see a deletion
pablof7z Dec 5, 2024
778b22c
fix zap missing event tag
pablof7z Dec 5, 2024
c644826
wallet docs
pablof7z Dec 5, 2024
35987be
add pubkey hint to e tags
pablof7z Dec 5, 2024
8926079
remove unused package
pablof7z Dec 5, 2024
8f25984
improve how event deletion is handled in the cache
pablof7z Dec 5, 2024
2b78365
add support for Svelte 5's runes
pablof7z Dec 7, 2024
fc06dd3
change github workflow
pablof7z Dec 9, 2024
31b6387
change github workflow
pablof7z Dec 9, 2024
18daf2b
Fix github workflow
pablof7z Dec 9, 2024
d43fecf
skip deleted events by default
pablof7z Dec 9, 2024
5da9c99
add support in dexie cache to retrieve profile info synchronously
pablof7z Dec 7, 2024
4ed75a6
add NIP-22 support
pablof7z Dec 7, 2024
42c2143
Store NWC pairing code
pablof7z Dec 14, 2024
a321927
allow users to automatically store wallet settings
pablof7z Dec 14, 2024
30d3ce6
wip
pablof7z Dec 16, 2024
3878d89
fix bad replaceable event write
pablof7z Dec 16, 2024
5e01601
refactor some wallet code
pablof7z Dec 17, 2024
56b8306
upgrade ndk-mobile packages
pablof7z Dec 17, 2024
c317048
add protections to avoid double-counting proofs
pablof7z Dec 17, 2024
71dd758
cache warnings
pablof7z Dec 17, 2024
779df14
add fee on wallet change
pablof7z Dec 18, 2024
2ae1d17
relay indicator component
pablof7z Dec 19, 2024
4b5fa3d
Breaking apart NDKCashuWallet
pablof7z Dec 20, 2024
350aebf
WIP: begin nip-55 integration in ndk-mobile
jchiarulli Jan 8, 2025
91a33ab
Merge remote-tracking branch 'upstream/master' into nip-55
jchiarulli Jan 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
5 changes: 5 additions & 0 deletions .changeset/cold-pianos-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nostr-dev-kit/ndk": minor
---

deprecate user.zap/ndk.zap -- use new NDKZapper instead
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/eighty-toes-refuse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nostr-dev-kit/ndk": patch
---

move NWC to ndk-wallet
5 changes: 5 additions & 0 deletions .changeset/fifty-llamas-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nostr-dev-kit/ndk": patch
---

add pubkey hint to e tags
5 changes: 5 additions & 0 deletions .changeset/flat-garlics-taste.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nostr-dev-kit/ndk-mobile": patch
---

add useUserProfile hook
5 changes: 5 additions & 0 deletions .changeset/fresh-oranges-guess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nostr-dev-kit/ndk-svelte": minor
---

add support for Svelte 5's runes
5 changes: 5 additions & 0 deletions .changeset/great-keys-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nostr-dev-kit/ndk-mobile": patch
---

add LRU cache for profiles
5 changes: 5 additions & 0 deletions .changeset/khaki-pets-smell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nostr-dev-kit/ndk": patch
---

fix bug where both a and e tags were going in zap requests
5 changes: 5 additions & 0 deletions .changeset/pretty-berries-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nostr-dev-kit/ndk-wallet": patch
---

NWC support
5 changes: 5 additions & 0 deletions .changeset/purple-fireants-invite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nostr-dev-kit/ndk-mobile": patch
---

add sync profile fetching from cache
5 changes: 5 additions & 0 deletions .changeset/silly-cows-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nostr-dev-kit/ndk-cache-dexie": patch
---

add support in dexie cache to retrieve profile info synchronously
5 changes: 5 additions & 0 deletions .changeset/strong-files-fly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nostr-dev-kit/ndk": patch
---

add NIP-22 support
13 changes: 13 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# FIXME: Hardcoded node version
# FIXME: Use prod and dev stages!
FROM node:20-slim

RUN corepack enable

# FIXME: We need to use a WORKDIR because of
# https://stackoverflow.com/a/65443098 but
# the choice of the actual dir is quite arbitrary.
COPY . /app
WORKDIR /app

RUN pnpm install
29 changes: 29 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node
{
"name": "NDK devcontainer",
"build": {
// Path is relative to the devcontainer.json file.
"dockerfile": "Dockerfile",
"context": "../"
},
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
}
}
},
// Add pnpm bin to path, so we have turbo available
"postStartCommand": "echo 'export PATH=$(pnpm bin):$PATH' >> ~/.bashrc && . ~/.bashrc"
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "yarn install",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
13 changes: 13 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.DS_Store
node_modules
build
dist
package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ["@nostr-dev-kit/custom"],
};
66 changes: 66 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Sample workflow for building and deploying a VitePress site to GitHub Pages
#
name: Deploy VitePress site to Pages

on:
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
# using the `master` branch as the default branch.
push:
branches:
- '*'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Not needed if lastUpdated is not enabled
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Setup PNPM
uses: pnpm/action-setup@v4
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: pnpm install # or pnpm install / yarn install / bun install
- name: Build with VitePress
run: pnpm docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
- name: Build typedoc
run: cd ndk && pnpm typedoc --out ../docs/.vitepress/dist/api
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
dist
docs
coverage
**/.changeset
**/.svelte-kit
16 changes: 16 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"useTabs": false,
"tabWidth": 4,
"singleQuote": false,
"semi": true,
"trailingComma": "es5",
"printWidth": 100,
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
]
}
20 changes: 20 additions & 0 deletions BUILD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Build NDK

NDK is structured as a monorepo using `pnpm` as the package manager.

```
git clone https://github.com/nostr-dev-kit/ndk
cd ndk
pnpm install
pnpm build
```

If you only care about building ndk core and not the family of packages you can just

```
git clone https://github.com/nostr-dev-kit/ndk
cd ndk
pnpm install
cd ndk
pnpm build
```
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Pablo Fernandez

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
45 changes: 45 additions & 0 deletions REFERENCES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Open source Nostr apps using NDK

This is a running list of applications using NDK that are open source. Use these codebases to understand
how others handle Nostr things using NDK.

If you are the author of an application that uses NDK, send a pull-request to this repo adding your application
to this list.

- [Highlighter](https://github.com/kind-0/highlighter) - By [@pablof7z](https://njump.me/npub1l2vyh47mk2p0qlsku7hg0vn29faehy9hy34ygaclpn66ukqp3afqutajft)
- Svelte, frontend
- [nsecBunker](https://github.com/kind-0/nsecbunkerd) - By [@pablof7z](https://njump.me/npub1l2vyh47mk2p0qlsku7hg0vn29faehy9hy34ygaclpn66ukqp3afqutajft)
- Typescript, backend
- [Highlighter Chrome Extension](https://github.com/pablof7z/highlighter-chrome-extension/) - By [@pablof7z](https://njump.me/npub1l2vyh47mk2p0qlsku7hg0vn29faehy9hy34ygaclpn66ukqp3afqutajft)
- Typescript, Chrome extension
- [Nostr Data Vending Machine](https://github.com/pablof7z/nostr-data-vending-machine) - By [@pablof7z](https://njump.me/npub1l2vyh47mk2p0qlsku7hg0vn29faehy9hy34ygaclpn66ukqp3afqutajft)
- Typescript, backend
- [Nostr Chat Widget](https://github.com/pablof7z/nostr-chat-widget) - By [@pablof7z](https://njump.me/npub1l2vyh47mk2p0qlsku7hg0vn29faehy9hy34ygaclpn66ukqp3afqutajft)
- Svelte, Rollup, embeddable widget
- [Zapstr](https://github.com/zapstr/zapstr) - By [@pablof7z](https://njump.me/npub1l2vyh47mk2p0qlsku7hg0vn29faehy9hy34ygaclpn66ukqp3afqutajft)
- Svelte, Frontend
- [Ostrich.work](https://github.com/erskingardner/ostrich.work) - By [@jeffg](https://njump.me/npub1zuuajd7u3sx8xu92yav9jwxpr839cs0kc3q6t56vd5u9q033xmhsk6c2uc)
- Svelte, frontend
- [Listr.lol](https://github.com/erskingardner/listr) - By [@jeffg](https://njump.me/npub1zuuajd7u3sx8xu92yav9jwxpr839cs0kc3q6t56vd5u9q033xmhsk6c2uc)
- Svelte, frontend
- [Lume](https://github.com/luminous-devs/lume) - By [@reya](https://njump.me/npub1zfss807aer0j26mwp2la0ume0jqde3823rmu97ra6sgyyg956e0s6xw445)
- Tauri, Desktop app
- [Nostr App Manager](https://github.com/nostrband/nostr-app-manager) - By [@nostrband](https://njump.me/npub1wc4rc9wxl2gfzxl384g0cw3f79nrms0sfdpe02y7aasy7c3we4sqd0qywr)
- React, Frontend
- [Stemstr](https://github.com/stemstr/Client) - By [@stemstr](https://njump.me/npub1stemstrls4f5plqeqkeq43gtjhtycuqd9w25v5r5z5ygaq2n2sjsd6mul5)
- [Audgit.ai](https://github.com/ArcadeLabsInc/audgit.ai) - By [@ArcadeLabsInc](https://njump.me/npub1tlv67m7xvlyplzexuynmfpguvyet0sjffce3y8vu0suuyuwgzauqjk7fdm)
- [Swarmstr](https://github.com/ptrio42/swarmstr.com) - By [@pitiunited](https://njump.me/npub178umpxtdflcm7a08nexvs4mu384kx0ngg9w8ltm5eut6q7lcp0vq05qrg4)
- [zapddit](https://github.com/vivganes/zapddit) - By [@vivganes](https://njump.me/npub1ltx67888tz7lqnxlrg06x234vjnq349tcfyp52r0lstclp548mcqnuz40t)
- [Nuxstr](https://github.com/Sebastix/nuxstr) - By [@Sebastix](https://njump.me/[email protected])
- Nuxt (Vue), frontend
- [Flockstr](https://github.com/zmeyer44/flockstr) - By [@zach](https://njump.me/npub1zach44xjpc4yyhx6pgse2cj2pf98838kja03dv2e8ly8lfr094vqvm5dy5)
- [Flare.pub](https://github.com/zmeyer44/flare) - By [@zach](https://njump.me/npub1zach44xjpc4yyhx6pgse2cj2pf98838kja03dv2e8ly8lfr094vqvm5dy5)
- [Pinstr.app](https://github.com/sepehr-safari/pinstr) - By [@sepehr](https://njump.me/nprofile1qqsru22d9lfnnwck54qr4phrvey50h2q33xc0gqxv5j03ftn4efu4rspr9mhxue69uhhyetvv9ujuumwdae8gtnnda3kjctv9uq3wamnwvaz7tmjwdekccte9ehx7um5wghx6mm99uq36amnwvaz7tmwdaehgu3wd46hg6tw09mkzmrvv46zucm0d5hsv6ffvh)
- React, Nostr Web Client
- [Nostr-Hooks](https://github.com/ostyjs/nostr-hooks) - By [@sepehr](https://njump.me/nprofile1qqsru22d9lfnnwck54qr4phrvey50h2q33xc0gqxv5j03ftn4efu4rspr9mhxue69uhhyetvv9ujuumwdae8gtnnda3kjctv9uq3wamnwvaz7tmjwdekccte9ehx7um5wghx6mm99uq36amnwvaz7tmwdaehgu3wd46hg6tw09mkzmrvv46zucm0d5hsv6ffvh)
- Stateful wrapper library of React hooks around NDK.
- [magicCity h=n](https://github.com/tezosmiami/hicetnunc) - By [@hicetnunc2000](https://github.com/hicetnunc2000/), [@tezosmiami](https://njump.me/npub190rqwj0nud4uhvmaeg7cgn0gypu0s09j87vqjluhfhju0req2khsskh9w7)
- [notepress](https://github.com/utxo-one/notepress) - By [@utxo](httsp://njump.me/[email protected])
- No frameworks! A very simple long-form (NIP-23) reader
- [Olas 🌊](https://github.com/pablof7z/snapstr) - By [@pablof7z](https://njump.me/f7z.io)
- React Native, mobile-only app
Loading
Loading