@openclaw/nostr 2026.7.2-beta.3 → 2026.7.2-beta.4
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/dist/api.js +12 -4
- package/dist/{channel-DgBHZ53s.js → channel-DqbdMXMg.js} +785 -412
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{setup-adapter-DEU3o8MF.js → setup-adapter-BjKmSwdW.js} +31 -1
- package/dist/setup-api.js +1 -1
- package/dist/setup-plugin-api.js +4 -2
- package/dist/{setup-surface-BF7_7BEx.js → setup-surface-ChtM-WSY.js} +4 -2
- package/node_modules/nostr-tools/lib/cjs/abstract-pool.js +35 -3
- package/node_modules/nostr-tools/lib/cjs/abstract-pool.js.map +2 -2
- package/node_modules/nostr-tools/lib/cjs/abstract-relay.js +30 -2
- package/node_modules/nostr-tools/lib/cjs/abstract-relay.js.map +2 -2
- package/node_modules/nostr-tools/lib/cjs/index.js +35 -3
- package/node_modules/nostr-tools/lib/cjs/index.js.map +2 -2
- package/node_modules/nostr-tools/lib/cjs/nip46.js +35 -3
- package/node_modules/nostr-tools/lib/cjs/nip46.js.map +2 -2
- package/node_modules/nostr-tools/lib/cjs/nipb0.js +4 -1
- package/node_modules/nostr-tools/lib/cjs/nipb0.js.map +2 -2
- package/node_modules/nostr-tools/lib/cjs/pool.js +35 -3
- package/node_modules/nostr-tools/lib/cjs/pool.js.map +2 -2
- package/node_modules/nostr-tools/lib/cjs/relay.js +30 -2
- package/node_modules/nostr-tools/lib/cjs/relay.js.map +2 -2
- package/node_modules/nostr-tools/lib/esm/abstract-pool.js +35 -3
- package/node_modules/nostr-tools/lib/esm/abstract-pool.js.map +2 -2
- package/node_modules/nostr-tools/lib/esm/abstract-relay.js +30 -2
- package/node_modules/nostr-tools/lib/esm/abstract-relay.js.map +2 -2
- package/node_modules/nostr-tools/lib/esm/index.js +35 -3
- package/node_modules/nostr-tools/lib/esm/index.js.map +2 -2
- package/node_modules/nostr-tools/lib/esm/nip46.js +35 -3
- package/node_modules/nostr-tools/lib/esm/nip46.js.map +2 -2
- package/node_modules/nostr-tools/lib/esm/nipb0.js +4 -1
- package/node_modules/nostr-tools/lib/esm/nipb0.js.map +2 -2
- package/node_modules/nostr-tools/lib/esm/pool.js +35 -3
- package/node_modules/nostr-tools/lib/esm/pool.js.map +2 -2
- package/node_modules/nostr-tools/lib/esm/relay.js +30 -2
- package/node_modules/nostr-tools/lib/esm/relay.js.map +2 -2
- package/node_modules/nostr-tools/lib/nostr.bundle.js +35 -3
- package/node_modules/nostr-tools/lib/nostr.bundle.js.map +2 -2
- package/node_modules/nostr-tools/lib/types/abstract-pool.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/abstract-relay.d.ts +5 -0
- package/node_modules/nostr-tools/lib/types/relay.d.ts +2 -2
- package/node_modules/nostr-tools/package.json +1 -1
- package/npm-shrinkwrap.json +7 -7
- package/openclaw.plugin.json +0 -5
- package/package.json +41 -15
|
@@ -27,6 +27,7 @@ export declare class AbstractSimplePool {
|
|
|
27
27
|
verifyEvent: Nostr['verifyEvent'];
|
|
28
28
|
enablePing: boolean | undefined;
|
|
29
29
|
enableReconnect: boolean;
|
|
30
|
+
idleTimeout: number;
|
|
30
31
|
automaticallyAuth?: (relayURL: string) => null | ((event: EventTemplate) => Promise<VerifiedEvent>);
|
|
31
32
|
trustedRelayURLs: Set<string>;
|
|
32
33
|
onRelayConnectionFailure?: (url: string) => void;
|
|
@@ -5,6 +5,7 @@ export type AbstractRelayConstructorOptions = {
|
|
|
5
5
|
websocketImplementation?: typeof WebSocket;
|
|
6
6
|
enablePing?: boolean;
|
|
7
7
|
enableReconnect?: boolean;
|
|
8
|
+
idleTimeout?: number;
|
|
8
9
|
};
|
|
9
10
|
export declare class SendingOnClosedConnection extends Error {
|
|
10
11
|
constructor(message: string, relay: string);
|
|
@@ -23,12 +24,14 @@ export declare class AbstractRelay {
|
|
|
23
24
|
openSubs: Map<string, Subscription>;
|
|
24
25
|
enablePing: boolean | undefined;
|
|
25
26
|
enableReconnect: boolean;
|
|
27
|
+
idleTimeout: number;
|
|
26
28
|
idleSince: number | undefined;
|
|
27
29
|
ongoingOperations: number;
|
|
28
30
|
private reconnectTimeoutHandle;
|
|
29
31
|
private pingIntervalHandle;
|
|
30
32
|
private reconnectAttempts;
|
|
31
33
|
private skipReconnection;
|
|
34
|
+
private idleTimeoutHandle;
|
|
32
35
|
private connectionPromise;
|
|
33
36
|
private openCountRequests;
|
|
34
37
|
private openEventPublishes;
|
|
@@ -42,6 +45,8 @@ export declare class AbstractRelay {
|
|
|
42
45
|
static connect(url: string, opts: AbstractRelayConstructorOptions & Parameters<AbstractRelay['connect']>[0]): Promise<AbstractRelay>;
|
|
43
46
|
private closeAllSubscriptions;
|
|
44
47
|
get connected(): boolean;
|
|
48
|
+
private clearIdleTimeout;
|
|
49
|
+
scheduleIdleClose(): void;
|
|
45
50
|
private reconnect;
|
|
46
51
|
private handleHardClose;
|
|
47
52
|
connect(opts?: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AbstractRelay, type AbstractRelayConstructorOptions } from './abstract-relay.ts';
|
|
2
2
|
export declare function useWebSocketImplementation(websocketImplementation: any): void;
|
|
3
3
|
export declare class Relay extends AbstractRelay {
|
|
4
|
-
constructor(url: string, options?: Pick<AbstractRelayConstructorOptions, 'enablePing' | 'enableReconnect'>);
|
|
5
|
-
static connect(url: string, options?: Pick<AbstractRelayConstructorOptions, 'enablePing' | 'enableReconnect'>): Promise<Relay>;
|
|
4
|
+
constructor(url: string, options?: Pick<AbstractRelayConstructorOptions, 'enablePing' | 'enableReconnect' | 'idleTimeout'>);
|
|
5
|
+
static connect(url: string, options?: Pick<AbstractRelayConstructorOptions, 'enablePing' | 'enableReconnect' | 'idleTimeout'>): Promise<Relay>;
|
|
6
6
|
}
|
|
7
7
|
export type RelayRecord = Record<string, {
|
|
8
8
|
read: boolean;
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/nostr",
|
|
3
|
-
"version": "2026.7.2-beta.
|
|
3
|
+
"version": "2026.7.2-beta.4",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@openclaw/nostr",
|
|
9
|
-
"version": "2026.7.2-beta.
|
|
9
|
+
"version": "2026.7.2-beta.4",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"nostr-tools": "2.23.
|
|
11
|
+
"nostr-tools": "2.23.12",
|
|
12
12
|
"zod": "4.4.3"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"openclaw": ">=2026.7.2-beta.
|
|
15
|
+
"openclaw": ">=2026.7.2-beta.4"
|
|
16
16
|
},
|
|
17
17
|
"peerDependenciesMeta": {
|
|
18
18
|
"openclaw": {
|
|
@@ -96,9 +96,9 @@
|
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"node_modules/nostr-tools": {
|
|
99
|
-
"version": "2.23.
|
|
100
|
-
"resolved": "https://registry.npmjs.org/nostr-tools/-/nostr-tools-2.23.
|
|
101
|
-
"integrity": "sha512-
|
|
99
|
+
"version": "2.23.12",
|
|
100
|
+
"resolved": "https://registry.npmjs.org/nostr-tools/-/nostr-tools-2.23.12.tgz",
|
|
101
|
+
"integrity": "sha512-dLE9r0b4pCmrOKLUPD0KhUj9IXeh6RwiYoonEWeBh2AaDmlczUjJqJC8pQfggXzKUZ7+uZvhcrKkfwuZk0/e1g==",
|
|
102
102
|
"license": "Unlicense",
|
|
103
103
|
"dependencies": {
|
|
104
104
|
"@noble/ciphers": "2.1.1",
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/nostr",
|
|
3
|
-
"version": "2026.7.2-beta.
|
|
3
|
+
"version": "2026.7.2-beta.4",
|
|
4
4
|
"description": "OpenClaw Nostr channel plugin for NIP-04 encrypted direct messages.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"nostr-tools": "2.23.
|
|
11
|
+
"nostr-tools": "2.23.12",
|
|
12
12
|
"zod": "4.4.3"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"openclaw": ">=2026.7.2-beta.
|
|
15
|
+
"openclaw": ">=2026.7.2-beta.4"
|
|
16
16
|
},
|
|
17
17
|
"peerDependenciesMeta": {
|
|
18
18
|
"openclaw": {
|
|
@@ -26,6 +26,13 @@
|
|
|
26
26
|
"setupEntry": "./dist/setup-entry.js",
|
|
27
27
|
"channel": {
|
|
28
28
|
"id": "nostr",
|
|
29
|
+
"configuredState": {
|
|
30
|
+
"env": {
|
|
31
|
+
"anyOf": [
|
|
32
|
+
"NOSTR_PRIVATE_KEY"
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
},
|
|
29
36
|
"label": "Nostr",
|
|
30
37
|
"selectionLabel": "Nostr (NIP-04 DMs)",
|
|
31
38
|
"docsPath": "/channels/nostr",
|
|
@@ -33,16 +40,35 @@
|
|
|
33
40
|
"blurb": "Decentralized protocol; encrypted DMs via NIP-04.",
|
|
34
41
|
"order": 55,
|
|
35
42
|
"quickstartAllowFrom": true,
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
"setup": {
|
|
44
|
+
"fields": [
|
|
45
|
+
{
|
|
46
|
+
"key": "privateKey",
|
|
47
|
+
"kind": "string",
|
|
48
|
+
"sensitive": true,
|
|
49
|
+
"cli": {
|
|
50
|
+
"flags": "--private-key <key>",
|
|
51
|
+
"description": "Nostr private key"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"key": "relayUrls",
|
|
56
|
+
"kind": "string",
|
|
57
|
+
"cli": {
|
|
58
|
+
"flags": "--relay-urls <urls>",
|
|
59
|
+
"description": "Nostr relay URLs"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"key": "useEnv",
|
|
64
|
+
"kind": "boolean",
|
|
65
|
+
"cli": {
|
|
66
|
+
"flags": "--use-env",
|
|
67
|
+
"description": "Use NOSTR_PRIVATE_KEY"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
46
72
|
},
|
|
47
73
|
"install": {
|
|
48
74
|
"npmSpec": "@openclaw/nostr",
|
|
@@ -50,10 +76,10 @@
|
|
|
50
76
|
"minHostVersion": ">=2026.4.10"
|
|
51
77
|
},
|
|
52
78
|
"compat": {
|
|
53
|
-
"pluginApi": ">=2026.7.2-beta.
|
|
79
|
+
"pluginApi": ">=2026.7.2-beta.4"
|
|
54
80
|
},
|
|
55
81
|
"build": {
|
|
56
|
-
"openclawVersion": "2026.7.2-beta.
|
|
82
|
+
"openclawVersion": "2026.7.2-beta.4"
|
|
57
83
|
},
|
|
58
84
|
"release": {
|
|
59
85
|
"publishToClawHub": true,
|