Add APISigner and AdminSigner classes, implement NostrSigner interface

This commit is contained in:
Alex Gleason
2024-02-12 11:52:05 -06:00
parent 1e3f637358
commit 59d53c4a2f
9 changed files with 146 additions and 133 deletions

View File

@@ -1,5 +1,5 @@
import * as pipeline from '@/pipeline.ts';
import { signAdminEvent } from '@/sign.ts';
import { AdminSigner } from '@/signers/AdminSigner.ts';
import { type EventStub } from '@/utils/api.ts';
import { nostrNow } from '@/utils.ts';
@@ -12,7 +12,9 @@ switch (Deno.args[0]) {
}
async function publish(t: EventStub) {
const event = await signAdminEvent({
const signer = new AdminSigner();
const event = await signer.signEvent({
content: '',
created_at: nostrNow(),
tags: [],