Remove CustomEvent

This commit is contained in:
Jon Staab
2024-08-19 08:59:39 -07:00
parent 975d51cafa
commit 8d3ca2ef6a
25 changed files with 124 additions and 120 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
import {EventTemplate} from '@welshman/util'
import {StampedEvent} from '@welshman/util'
import {hash, own, Sign, ISigner, EncryptionImplementation} from '../util'
export type Nip07 = {
@@ -30,8 +30,8 @@ export class Nip07Signer implements ISigner {
getPubkey = async () => getNip07()!.getPublicKey()!
sign = async (template: EventTemplate) => {
const event = hash(own(await this.getPubkey(), template))
sign = async (template: StampedEvent) => {
const event = hash(own(template, await this.getPubkey()))
return this.#then(ext => ext.signEvent(event))
}