From a0f4a7d9b5d3bff31424e42535e2987f1a142b8c Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 27 Apr 2023 21:10:51 -0500 Subject: [PATCH] Upgrade nostr-tools, signEvent --> getSignature --- src/deps.ts | 2 +- src/publisher.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/deps.ts b/src/deps.ts index edc893a..5ccdd04 100644 --- a/src/deps.ts +++ b/src/deps.ts @@ -2,5 +2,5 @@ export { type Context, Hono, validator } from 'https://deno.land/x/hono@v3.0.2/m export { cors } from 'https://deno.land/x/hono@v3.0.2/middleware.ts'; export { z } from 'https://deno.land/x/zod@v3.20.5/mod.ts'; export { Author, RelayPool } from 'https://dev.jspm.io/nostr-relaypool@0.5.3'; -export { type Filter, getEventHash, getPublicKey, nip19, signEvent } from 'npm:nostr-tools@^1.7.4'; +export { type Filter, getEventHash, getPublicKey, nip19, signEvent as getSignature } from 'npm:nostr-tools@^1.10.1'; export { default as lmdb } from 'npm:lmdb'; diff --git a/src/publisher.ts b/src/publisher.ts index a152ec1..eaad62e 100644 --- a/src/publisher.ts +++ b/src/publisher.ts @@ -1,4 +1,4 @@ -import { getEventHash, signEvent } from '@/deps.ts'; +import { getEventHash, getSignature } from '@/deps.ts'; import { type Event } from '@/nostr/event.ts'; import { pool } from './client.ts'; @@ -7,7 +7,7 @@ import { publishRelays } from './config.ts'; /** Publish an event to the Nostr relay. */ function publish(event: Event, privatekey: string, relays = publishRelays): void { event.id = getEventHash(event); - event.sig = signEvent(event, privatekey); + event.sig = getSignature(event, privatekey); console.log('Publishing event', event); try { pool.publish(event, relays);