applesauce-signers 0.0.0-next-20250723224513 → 0.0.0-next-20250726160247

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "applesauce-signers",
3
- "version": "0.0.0-next-20250723224513",
3
+ "version": "0.0.0-next-20250726160247",
4
4
  "description": "Signer classes for applesauce",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -36,7 +36,7 @@
36
36
  "@noble/hashes": "^1.7.1",
37
37
  "@noble/secp256k1": "^1.7.1",
38
38
  "@scure/base": "^1.2.4",
39
- "applesauce-core": "0.0.0-next-20250723224513",
39
+ "applesauce-core": "0.0.0-next-20250726160247",
40
40
  "debug": "^4.4.0",
41
41
  "nanoid": "^5.0.9",
42
42
  "nostr-tools": "^2.13"
@@ -1 +0,0 @@
1
- export {};
@@ -1,22 +0,0 @@
1
- import { describe, expect, it } from "vitest";
2
- import * as exports from "../index.js";
3
- describe("exports", () => {
4
- it("should export the expected functions", () => {
5
- expect(Object.keys(exports).sort()).toMatchInlineSnapshot(`
6
- [
7
- "AmberClipboardSigner",
8
- "ExtensionMissingError",
9
- "ExtensionSigner",
10
- "Helpers",
11
- "NostrConnectMethod",
12
- "NostrConnectSigner",
13
- "PasswordSigner",
14
- "Permission",
15
- "ReadonlySigner",
16
- "SerialPortSigner",
17
- "SimpleSigner",
18
- "isErrorResponse",
19
- ]
20
- `);
21
- });
22
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,11 +0,0 @@
1
- import { describe, expect, it } from "vitest";
2
- import * as exports from "../index.js";
3
- describe("exports", () => {
4
- it("should export the expected functions", () => {
5
- expect(Object.keys(exports).sort()).toMatchInlineSnapshot(`
6
- [
7
- "isNIP04",
8
- ]
9
- `);
10
- });
11
- });
package/dist/nip-07.d.ts DELETED
@@ -1,16 +0,0 @@
1
- import { EventTemplate, NostrEvent } from "nostr-tools";
2
- export type ISigner = {
3
- getPublicKey: () => Promise<string>;
4
- signEvent: (template: EventTemplate) => Promise<NostrEvent>;
5
- nip04?: {
6
- encrypt: (pubkey: string, plaintext: string) => Promise<string>;
7
- decrypt: (pubkey: string, ciphertext: string) => Promise<string>;
8
- };
9
- nip44?: {
10
- encrypt: (pubkey: string, plaintext: string) => Promise<string>;
11
- decrypt: (pubkey: string, ciphertext: string) => Promise<string>;
12
- };
13
- };
14
-
15
- /** @deprecated Use ISigner instead */
16
- export type Nip07Interface = ISigner;
package/dist/nip-07.js DELETED
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,21 +0,0 @@
1
- import { describe, expect, it } from "vitest";
2
- import * as exports from "../index.js";
3
- describe("exports", () => {
4
- it("should export the expected functions", () => {
5
- expect(Object.keys(exports).sort()).toMatchInlineSnapshot(`
6
- [
7
- "AmberClipboardSigner",
8
- "ExtensionMissingError",
9
- "ExtensionSigner",
10
- "NostrConnectMethod",
11
- "NostrConnectSigner",
12
- "PasswordSigner",
13
- "Permission",
14
- "ReadonlySigner",
15
- "SerialPortSigner",
16
- "SimpleSigner",
17
- "isErrorResponse",
18
- ]
19
- `);
20
- });
21
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,23 +0,0 @@
1
- import { describe, expect, it, vi } from "vitest";
2
- import { NostrConnectSigner } from "../nostr-connect-signer.js";
3
- import { SimpleSigner } from "../simple-signer.js";
4
- describe("NostrConnectSigner", () => {
5
- describe("connection", () => {
6
- it("should call subscription method with filters", async () => {
7
- const relays = ["wss://relay.signer.com"];
8
- const subscription = vi.fn().mockReturnValue({ subscribe: vi.fn() });
9
- const publish = vi.fn(async () => { });
10
- const client = new SimpleSigner();
11
- const remote = new SimpleSigner();
12
- const signer = new NostrConnectSigner({
13
- relays,
14
- remote: await remote.getPublicKey(),
15
- signer: client,
16
- subscriptionMethod: subscription,
17
- publishMethod: publish,
18
- });
19
- signer.connect();
20
- expect(subscription).toHaveBeenCalledWith(relays, [{ "#p": [await client.getPublicKey()], kinds: [24133] }]);
21
- });
22
- });
23
- });