strip html from description

This commit is contained in:
2023-11-24 14:39:28 -05:00
parent f7c6034fb0
commit 5f6e638903
526 changed files with 4373 additions and 23270 deletions
+12 -1
View File
@@ -93,12 +93,23 @@ You can pass an object with several options to a newly created instance of NDK.
// Import the package
import NDK from "@nostr-dev-kit/ndk";
/ Create a new NDK instance with explicit relays
// Create a new NDK instance with explicit relays
const ndk = new NDK({
explicitRelayUrls: ["wss://a.relay", "wss://another.relay"],
});
```
If the signer implements the `getRelays()` method, NDK will use the relays returned by that method as the explicit relays.
```ts
// Import the package
import NDK, { NDKNip07Signer } from "@nostr-dev-kit/ndk";
// Create a new NDK instance with just a signer (provided the signer implements the getRelays() method)
const nip07signer = new NDKNip07Signer();
const ndk = new NDK({ signer: nip07signer });
```
Note: In normal client use, it's best practice to instantiate NDK as a singleton class. [See more below](#architecture-decisions--suggestions).
## Connecting