Browse Source

build: add ndk with svelte add-ons

consideration was given to using a shared library built in rust
for this and the cli utility but this was discounted for these
reasons:

1. different data storage and caching requirements
2. ndk is more mature and has extra features for building web
   apps
3. use of shared svelte components in ndk
4. prospect of contributing git specific components to ndk to
   encourage adoption among other clientus
master
DanConwayDev 3 years ago
parent
commit
0b01b857c9
No known key found for this signature in database
GPG Key ID: 68E15486D73F75E1
  1. 7
      package.json
  2. 7
      src/lib/stores/ndk.ts
  3. 702
      yarn.lock

7
package.json

@ -22,5 +22,10 @@ @@ -22,5 +22,10 @@
"typescript": "^5.0.0",
"vite": "^4.2.0"
},
"type": "module"
"type": "module",
"dependencies": {
"@nostr-dev-kit/ndk": "^1.3.0",
"@nostr-dev-kit/ndk-svelte": "^1.3.0",
"@nostr-dev-kit/ndk-svelte-components": "^1.3.0"
}
}

7
src/lib/stores/ndk.ts

@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
import NDKSvelte from '@nostr-dev-kit/ndk-svelte';
export const ndk = new NDKSvelte({
explicitRelayUrls: ['ws://localhost:8080'],
});
ndk.connect();

702
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save