applesauce-signers 7.0.0 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventTemplate, UnsignedEvent, verifyEvent } from "applesauce-core/helpers";
|
|
2
|
-
import { Permission } from "nostr-signer
|
|
2
|
+
import { Permission } from "capacitor-plugin-nostr-signer";
|
|
3
3
|
import { ISigner } from "../interop.js";
|
|
4
4
|
export declare class AndroidNativeSigner implements ISigner {
|
|
5
5
|
packageName: string;
|
|
@@ -16,7 +16,7 @@ export declare class AndroidNativeSigner implements ISigner {
|
|
|
16
16
|
decrypt: (pubkey: string, ciphertext: string) => Promise<string>;
|
|
17
17
|
};
|
|
18
18
|
constructor(packageName: string, pubkey?: string);
|
|
19
|
-
static getSignerApps(): Promise<
|
|
19
|
+
static getSignerApps(): Promise<AppInfo[]>;
|
|
20
20
|
setup(): Promise<void>;
|
|
21
21
|
getPublicKey(): Promise<string>;
|
|
22
22
|
signEvent(template: UnsignedEvent | EventTemplate): Promise<import("nostr-tools/core").VerifiedEvent>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getEventHash, normalizeToPubkey, npubEncode, verifyEvent, } from "applesauce-core/helpers";
|
|
2
2
|
import { nanoid } from "nanoid";
|
|
3
|
-
import { NostrSignerPlugin } from "nostr-signer
|
|
3
|
+
import { NostrSignerPlugin } from "capacitor-plugin-nostr-signer";
|
|
4
4
|
export class AndroidNativeSigner {
|
|
5
5
|
packageName;
|
|
6
6
|
connected = false;
|
|
@@ -30,7 +30,7 @@ export class AndroidNativeSigner {
|
|
|
30
30
|
await NostrSignerPlugin.setPackageName(this.packageName);
|
|
31
31
|
if (!this.pubkey) {
|
|
32
32
|
const result = await NostrSignerPlugin.getPublicKey(this.packageName, this.permissions);
|
|
33
|
-
const pubkey = normalizeToPubkey(result.
|
|
33
|
+
const pubkey = normalizeToPubkey(result.pubkey);
|
|
34
34
|
if (!pubkey)
|
|
35
35
|
throw new Error("Invalid public key");
|
|
36
36
|
this.pubkey = pubkey;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "applesauce-signers",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.1",
|
|
4
4
|
"description": "Signer classes for applesauce",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -59,13 +59,13 @@
|
|
|
59
59
|
"vitest": "^4.1.11",
|
|
60
60
|
"vitest-websocket-mock": "^0.5.0"
|
|
61
61
|
},
|
|
62
|
-
"optionalDependencies": {
|
|
63
|
-
"nostr-signer-capacitor-plugin": "^0.0.5"
|
|
64
|
-
},
|
|
65
62
|
"funding": {
|
|
66
63
|
"type": "lightning",
|
|
67
64
|
"url": "lightning:nostrudel@geyser.fund"
|
|
68
65
|
},
|
|
66
|
+
"optionalDependencies": {
|
|
67
|
+
"capacitor-plugin-nostr-signer": "^0.2.0"
|
|
68
|
+
},
|
|
69
69
|
"scripts": {
|
|
70
70
|
"prebuild": "rimraf dist",
|
|
71
71
|
"build": "tsc",
|