Skip to content

Commit

Permalink
add notice and development instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
dskvr committed Jun 24, 2024
1 parent a3125d9 commit 85b380c
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 8 deletions.
39 changes: 36 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
> ATTENTION! This repo is under heavy development and does not work yet. There are a number of upstream dependencies that are not yet published.
# @nostrwatch/ndk

An NDK extension that adds support for [NIP-66]()
An NDK extension that adds advanced support to fetch complete [NIP-66]() datasets

[![semver](https://img.shields.io/npm/v/nostrwatch-ndk)](https://github.com/sandwichfarm/nostrwatch-ndk/releases/latest)
[![cov](https://sandwichfarm.github.io/nostrwatch-ndk/badges/coverage.svg)](https://github.com/sandwichfarm/nostrwatch-ndk/actions)
Expand All @@ -11,14 +13,45 @@ An NDK extension that adds support for [NIP-66]()
![npm bundle size](https://img.shields.io/bundlephobia/minzip/nostrwatch-ndk)
![npm bundle size](https://img.shields.io/bundlephobia/min/nostrwatch-ndk)

# Install
## TODO
- [ ] NIP-66 NDK PR
- [ ] Extend upstream NDKEvents
- [ ] Implement Fetchers
- [ ] Implement Helpers

## Install

```
npm install @nostrwatch/ndk
pnpm install @nostrwatch/ndk
yarn add @nostrwatch/ndk
```

# Links
## Usage
```typescript
import { FetchRelayMonitors, FetchRelays } from "@nostrwatch/ndk";
..
```

## Testing
```
npm run test
pnpm run test
yarn test
```

## Build Docs
```
npx typedoc src/index.ts --out docs --ignoreCompilerErrors
```

Serve them with
```
npm run serve-docs
pnpm run serve-docs
yarn serve-docs
```

## Links
- [Reference Docs](https://nostrwatch-ndk.github.io)
- Guides [WIP]
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
"license": "ISC",
"dependencies": {
"@nostr-dev-kit/ndk": "file:.yalc/@nostr-dev-kit/ndk",
"import2": "1.0.3"
"@nostr-fetch/adapter-ndk": "0.15.1",
"import2": "1.0.3",
"nostr-fetch": "0.15.1"
},
"devDependencies": {
"@types/node": "20.14.8",
Expand Down
6 changes: 4 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export { RelayMonitors } from './fetch-monitors';
export { RelayMonitor } from './kinds/relay-monitor';

export { EventGeoCoded } from './kinds/geocoded';
export { RelayDiscovery } from './kinds/relay-discovery';
export { RelayMeta } from './kinds/relay-meta';
export { RelayMonitor } from './kinds/relay-monitor';
export { RelayMeta } from './kinds/relay-meta';
26 changes: 24 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
dependencies:
"@noble/hashes" "1.3.2"

"@noble/curves@^1.4.0":
"@noble/curves@^1.1.0", "@noble/curves@^1.4.0":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.4.0.tgz#f05771ef64da724997f69ee1261b2417a49522d6"
integrity sha512-p+4cb332SFCrReJkCYe8Xzm0OWi4Jji5jVdIZRL/PmacmDkFNw6MrrV+gGpiPxLHbV+zKFRywUWbaseT+tZRXg==
Expand All @@ -246,7 +246,7 @@
resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39"
integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==

"@noble/[email protected]", "@noble/hashes@^1.3.1":
"@noble/[email protected]", "@noble/hashes@^1.2.0", "@noble/hashes@^1.3.1":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.4.0.tgz#45814aa329f30e4fe0ba49426f49dfccdd066426"
integrity sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==
Expand Down Expand Up @@ -298,6 +298,21 @@
utf8-buffer "^1.0.0"
websocket-polyfill "^0.0.3"

"@nostr-fetch/[email protected]":
version "0.15.1"
resolved "https://registry.yarnpkg.com/@nostr-fetch/adapter-ndk/-/adapter-ndk-0.15.1.tgz#2f33bc3bf5b1885de277994599f908d39d40c9cc"
integrity sha512-srbJGP6jO00IpCNJxuIiD9SfXbRkP1yS2fNjLqobfiWoLaOnz/bjTil9V/jdDDivtVrw4X6OzYgO+TPVzYovpQ==
dependencies:
"@nostr-fetch/kernel" "^0.15.1"

"@nostr-fetch/kernel@^0.15.1":
version "0.15.1"
resolved "https://registry.yarnpkg.com/@nostr-fetch/kernel/-/kernel-0.15.1.tgz#68196eb09e7875cd00a7a331c57f0b651fbb2675"
integrity sha512-+KX+n3v9ha2ki5BGL12isw+BrlK36aANkDD98SQMzt+5VFRCnfkFiJSkx+kjAKm0BXdA3YCTRhrqVOYEDuvohQ==
dependencies:
"@noble/curves" "^1.1.0"
"@noble/hashes" "^1.2.0"

"@pkgjs/parseargs@^0.11.0":
version "0.11.0"
resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33"
Expand Down Expand Up @@ -1505,6 +1520,13 @@ nopt@1:
dependencies:
abbrev "1"

[email protected]:
version "0.15.1"
resolved "https://registry.yarnpkg.com/nostr-fetch/-/nostr-fetch-0.15.1.tgz#4f9e20621df517526691f58b45bab8744e5cded6"
integrity sha512-SyXdAsUM3qnuoz35tyX3mwxY1BU5sBsr1JCIMXiV5Ej7uSkyBjnBkzsXH5CYq0p42hI9z6xwfuFqnkvBsaTmJA==
dependencies:
"@nostr-fetch/kernel" "^0.15.1"

nostr-tools@^2.5.2:
version "2.7.0"
resolved "https://registry.yarnpkg.com/nostr-tools/-/nostr-tools-2.7.0.tgz#5c125300465e8d418198e40ed51f3a4563bdb4a7"
Expand Down

0 comments on commit 85b380c

Please sign in to comment.