bump version
This commit is contained in:
@@ -512,4 +512,6 @@ export class Nip46Signer implements ISigner {
|
||||
this.getPubkey().then(pubkey => this.broker.signEvent(prep(template, pubkey))),
|
||||
options,
|
||||
)
|
||||
|
||||
cleanup = async () => this.broker.cleanup()
|
||||
}
|
||||
|
||||
@@ -45,6 +45,7 @@ export interface ISigner {
|
||||
nip04: EncryptionImplementation
|
||||
nip44: EncryptionImplementation
|
||||
getPubkey: () => Promise<string>
|
||||
cleanup?: () => Promise<void>
|
||||
}
|
||||
|
||||
export const decrypt = async (signer: ISigner, pubkey: string, message: string) =>
|
||||
@@ -83,6 +84,10 @@ export class WrappedSigner extends Emitter implements ISigner {
|
||||
decrypt: async (pubkey: string, message: string) =>
|
||||
this.wrapMethod("nip44.decrypt", () => this.signer.nip44.decrypt(pubkey, message)),
|
||||
}
|
||||
|
||||
async cleanup() {
|
||||
await this.signer.cleanup?.()
|
||||
}
|
||||
}
|
||||
|
||||
export const signWithOptions = (
|
||||
|
||||
Reference in New Issue
Block a user