mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-09 00:28:51 +00:00
tweak readme.
This commit is contained in:
@@ -35,7 +35,7 @@ let event = finalizeEvent({
|
|||||||
created_at: Math.floor(Date.now() / 1000),
|
created_at: Math.floor(Date.now() / 1000),
|
||||||
tags: [],
|
tags: [],
|
||||||
content: 'hello',
|
content: 'hello',
|
||||||
}, privateKey)
|
}, sk)
|
||||||
|
|
||||||
let isGood = verifyEvent(event)
|
let isGood = verifyEvent(event)
|
||||||
```
|
```
|
||||||
@@ -223,6 +223,7 @@ import { decode, nprofileEncode, neventEncode, npubEncode } from 'nostr-tools/ni
|
|||||||
import { setNostrWasm, generateSecretKey, finalizeEvent, verifyEvent } from 'nostr-tools/wasm'
|
import { setNostrWasm, generateSecretKey, finalizeEvent, verifyEvent } from 'nostr-tools/wasm'
|
||||||
import { initNostrWasm } from 'nostr-wasm'
|
import { initNostrWasm } from 'nostr-wasm'
|
||||||
|
|
||||||
|
// make sure this promise resolves before your app starts calling finalizeEvent or verifyEvent
|
||||||
initNostrWasm().then(setNostrWasm)
|
initNostrWasm().then(setNostrWasm)
|
||||||
|
|
||||||
// or use 'nostr-wasm/gzipped' or even 'nostr-wasm/headless',
|
// or use 'nostr-wasm/gzipped' or even 'nostr-wasm/headless',
|
||||||
|
|||||||
Reference in New Issue
Block a user